Logo ROOT   6.08/07
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 #ifndef ROOT_TGeoXtru
25 #include "TGeoXtru.h"
26 #endif
27 #ifndef ROOT_TGeoCompositeShape
28 #include "TGeoCompositeShape.h"
29 #endif
30 
31 #include <fstream>
32 
33 
34 class TGeoToOCC
35 {
36 private:
37  void OCCDocCreation();
38  TopoDS_Shape OCC_Arb8(Double_t dz, Double_t * ivert, Double_t * points);
39  TopoDS_Shape OCC_EllTube(Double_t Dx, Double_t Dy, Double_t Dz);
40  TopoDS_Shape OCC_Torus(Double_t Rmin, Double_t Rmax, Double_t Rtor, Double_t SPhi, Double_t DPhi);
41  TopoDS_Shape OCC_Sphere(Double_t rmin, Double_t rmax, Double_t phi1, Double_t Dphi, Double_t theta1, Double_t Dtheta);
42  TopoDS_Shape OCC_Tube(Double_t rmin, Double_t rmax, Double_t dz, Double_t phi1, Double_t phi2);
43  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);
44  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);
45  TopoDS_Shape OCC_Hype(Double_t rmin, Double_t rmax,Double_t stin, Double_t stout, Double_t dz );
46  TopoDS_Wire Polygon(Double_t *x, Double_t *y, Double_t z, Int_t num );
47  TopoDS_Shape OCC_ParaTrap (Double_t *vertex);
48  TopoDS_Shape Gtra_Arb8Creation(Double_t *vertex, Int_t *faces, Int_t fNumber);
49  TopoDS_Shape OCC_Pcon(Double_t startPhi, Double_t deltaPhi,Int_t zNum, Double_t *rMin, Double_t *rMax, Double_t *z);
50  TopoDS_Shape OCC_Xtru(TGeoXtru * TG_Xtru);
51  TopoDS_Shape OCC_Pgon(Int_t np, Int_t nz, Double_t * p, Double_t phi1, Double_t DPhi, Int_t numpoint);
52  TopoDS_Shape OCC_Box(Double_t dx, Double_t dy, Double_t dz, Double_t OX, Double_t OY, Double_t OZ);
53  TopoDS_Shape OCC_Trd(Double_t dx1, Double_t dx2, Double_t dy1, Double_t dy2, Double_t dz);
54  ofstream out;
55  TopoDS_Shape fOccShape;
56 
57 public:
58  TGeoToOCC();
59  virtual ~TGeoToOCC();
60  TopoDS_Shape OCC_SimpleShape(TGeoShape *TG_Shape);
61  TopoDS_Shape OCC_CompositeShape(TGeoCompositeShape *cs, TGeoHMatrix matrix);
62  TopoDS_Shape Reverse(TopoDS_Shape Shape);
63 
64 };
65 #endif
66 
67 
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:410
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:54
Base abstract class for all shapes.
Definition: TGeoShape.h:27
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:55
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