Logo ROOT   6.10/09
Reference Guide
TGeoToOCC.h
Go to the documentation of this file.
1 // @(#)geom/geocad:$Id$
2 // Author: Cinzia Luzzi 5/5/2012
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2012, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TGeoToOCC
13 #define ROOT_TGeoToOCC
14 
15 //Cascade
16 #include <Standard_Version.hxx>
17 
18 #define Printf Printf_opencascade
19 #include <TopoDS_Shape.hxx>
20 #include <TopoDS_Wire.hxx>
21 #undef Printf
22 
23 //Root
24 #include "TGeoXtru.h"
25 #include "TGeoCompositeShape.h"
26 
27 #include <fstream>
28 
29 
30 class TGeoToOCC
31 {
32 private:
33  void OCCDocCreation();
34  TopoDS_Shape OCC_Arb8(Double_t dz, Double_t * ivert, Double_t * points);
35  TopoDS_Shape OCC_EllTube(Double_t Dx, Double_t Dy, Double_t Dz);
36  TopoDS_Shape OCC_Torus(Double_t Rmin, Double_t Rmax, Double_t Rtor, Double_t SPhi, Double_t DPhi);
37  TopoDS_Shape OCC_Sphere(Double_t rmin, Double_t rmax, Double_t phi1, Double_t Dphi, Double_t theta1, Double_t Dtheta);
38  TopoDS_Shape OCC_Tube(Double_t rmin, Double_t rmax, Double_t dz, Double_t phi1, Double_t phi2);
39  TopoDS_Shape OCC_Cones(Double_t rmin1, Double_t rmax1, Double_t rmin2, Double_t rmax2, Double_t dz, Double_t phi1, Double_t phi2);
40  TopoDS_Shape OCC_Cuttub(Double_t rmin, Double_t rmax, Double_t dz, Double_t phi1, Double_t Dphi,const Double_t * Nlow,const Double_t * Nhigh);
41  TopoDS_Shape OCC_Hype(Double_t rmin, Double_t rmax,Double_t stin, Double_t stout, Double_t dz );
42  TopoDS_Wire Polygon(Double_t *x, Double_t *y, Double_t z, Int_t num );
43  TopoDS_Shape OCC_ParaTrap (Double_t *vertex);
44  TopoDS_Shape Gtra_Arb8Creation(Double_t *vertex, Int_t *faces, Int_t fNumber);
45  TopoDS_Shape OCC_Pcon(Double_t startPhi, Double_t deltaPhi,Int_t zNum, Double_t *rMin, Double_t *rMax, Double_t *z);
46  TopoDS_Shape OCC_Xtru(TGeoXtru * TG_Xtru);
47  TopoDS_Shape OCC_Pgon(Int_t np, Int_t nz, Double_t * p, Double_t phi1, Double_t DPhi, Int_t numpoint);
48  TopoDS_Shape OCC_Box(Double_t dx, Double_t dy, Double_t dz, Double_t OX, Double_t OY, Double_t OZ);
49  TopoDS_Shape OCC_Trd(Double_t dx1, Double_t dx2, Double_t dy1, Double_t dy2, Double_t dz);
50  ofstream out;
51  TopoDS_Shape fOccShape;
52 
53 public:
54  TGeoToOCC();
55  virtual ~TGeoToOCC();
56  TopoDS_Shape OCC_SimpleShape(TGeoShape *TG_Shape);
57  TopoDS_Shape OCC_CompositeShape(TGeoCompositeShape *cs, TGeoHMatrix matrix);
58  TopoDS_Shape Reverse(TopoDS_Shape Shape);
59 
60 };
61 #endif
62 
63 
TopoDS_Shape OCC_Pgon(Int_t np, Int_t nz, Double_t *p, Double_t phi1, Double_t DPhi, Int_t numpoint)
Definition: TGeoToOCC.cxx:940
TopoDS_Shape OCC_Cuttub(Double_t rmin, Double_t rmax, Double_t dz, Double_t phi1, Double_t Dphi, const Double_t *Nlow, const Double_t *Nhigh)
Definition: TGeoToOCC.cxx:491
TopoDS_Shape OCC_Xtru(TGeoXtru *TG_Xtru)
Definition: TGeoToOCC.cxx:588
TopoDS_Shape Gtra_Arb8Creation(Double_t *vertex, Int_t *faces, Int_t fNumber)
TopoDS_Shape OCC_Torus(Double_t Rmin, Double_t Rmax, Double_t Rtor, Double_t SPhi, Double_t DPhi)
Definition: TGeoToOCC.cxx:347
Matrix class used for computing global transformations Should NOT be used for node definition...
Definition: TGeoMatrix.h:408
int Int_t
Definition: RtypesCore.h:41
TopoDS_Shape OCC_Arb8(Double_t dz, Double_t *ivert, Double_t *points)
Definition: TGeoToOCC.cxx:705
TopoDS_Shape OCC_Trd(Double_t dx1, Double_t dx2, Double_t dy1, Double_t dy2, Double_t dz)
Definition: TGeoToOCC.cxx:846
Double_t x[n]
Definition: legend1.C:17
REAL * vertex
Definition: triangle.c:512
point * points
Definition: X3DBuffer.c:20
Class handling Boolean composition of shapes.
ofstream out
Definition: TGeoToOCC.h:50
Base abstract class for all shapes.
Definition: TGeoShape.h:25
TopoDS_Shape OCC_Pcon(Double_t startPhi, Double_t deltaPhi, Int_t zNum, Double_t *rMin, Double_t *rMax, Double_t *z)
Definition: TGeoToOCC.cxx:901
TopoDS_Shape OCC_Cones(Double_t rmin1, Double_t rmax1, Double_t rmin2, Double_t rmax2, Double_t dz, Double_t phi1, Double_t phi2)
Definition: TGeoToOCC.cxx:460
TopoDS_Shape OCC_EllTube(Double_t Dx, Double_t Dy, Double_t Dz)
Definition: TGeoToOCC.cxx:322
void OCCDocCreation()
TopoDS_Shape OCC_Box(Double_t dx, Double_t dy, Double_t dz, Double_t OX, Double_t OY, Double_t OZ)
Definition: TGeoToOCC.cxx:836
TopoDS_Shape OCC_Tube(Double_t rmin, Double_t rmax, Double_t dz, Double_t phi1, Double_t phi2)
Definition: TGeoToOCC.cxx:422
TopoDS_Wire Polygon(Double_t *x, Double_t *y, Double_t z, Int_t num)
Definition: TGeoToOCC.cxx:886
An extrusion with fixed outline shape in x-y and a sequence of z extents (segments).
Definition: TGeoXtru.h:21
double Double_t
Definition: RtypesCore.h:55
TopoDS_Shape OCC_CompositeShape(TGeoCompositeShape *cs, TGeoHMatrix matrix)
Definition: TGeoToOCC.cxx:225
Double_t y[n]
Definition: legend1.C:17
TopoDS_Shape OCC_Sphere(Double_t rmin, Double_t rmax, Double_t phi1, Double_t Dphi, Double_t theta1, Double_t Dtheta)
Definition: TGeoToOCC.cxx:374
TopoDS_Shape OCC_ParaTrap(Double_t *vertex)
Definition: TGeoToOCC.cxx:670
TopoDS_Shape OCC_SimpleShape(TGeoShape *TG_Shape)
Definition: TGeoToOCC.cxx:129
you should not use this method at all Int_t Int_t z
Definition: TRolke.cxx:630
TopoDS_Shape Reverse(TopoDS_Shape Shape)
Definition: TGeoToOCC.cxx:1038
TopoDS_Shape fOccShape
Definition: TGeoToOCC.h:51
virtual ~TGeoToOCC()
Definition: TGeoToOCC.cxx:124
TopoDS_Shape OCC_Hype(Double_t rmin, Double_t rmax, Double_t stin, Double_t stout, Double_t dz)
Definition: TGeoToOCC.cxx:613