File indexing completed on 2024-11-16 10:01:29
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TGeoToOCC
0013 #define ROOT_TGeoToOCC
0014
0015 #include <fstream>
0016
0017 #include <Standard_Version.hxx>
0018
0019 #define Printf Printf_opencascade
0020 #include <TopoDS_Shape.hxx>
0021 #include <TopoDS_Wire.hxx>
0022 #undef Printf
0023
0024
0025 #include "TGeoXtru.h"
0026 #include "TGeoCompositeShape.h"
0027 #include "TGeoTessellated.h"
0028
0029 #include <fstream>
0030
0031
0032 class TGeoToOCC
0033 {
0034 private:
0035 void OCCDocCreation();
0036 TopoDS_Shape OCC_Arb8(Double_t dz, Double_t * ivert, Double_t * points);
0037 TopoDS_Shape OCC_EllTube(Double_t Dx, Double_t Dy, Double_t Dz);
0038 TopoDS_Shape OCC_Torus(Double_t Rmin, Double_t Rmax, Double_t Rtor, Double_t SPhi, Double_t DPhi);
0039 TopoDS_Shape OCC_Sphere(Double_t rmin, Double_t rmax, Double_t phi1, Double_t Dphi, Double_t theta1, Double_t Dtheta);
0040 TopoDS_Shape OCC_Tube(Double_t rmin, Double_t rmax, Double_t dz, Double_t phi1, Double_t phi2);
0041 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);
0042 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);
0043 TopoDS_Shape OCC_Hype(Double_t rmin, Double_t rmax,Double_t stin, Double_t stout, Double_t dz );
0044 TopoDS_Wire Polygon(Double_t *x, Double_t *y, Double_t z, Int_t num );
0045 TopoDS_Shape OCC_ParaTrap (Double_t *vertex);
0046 TopoDS_Shape Gtra_Arb8Creation(Double_t *vertex, Int_t *faces, Int_t fNumber);
0047 TopoDS_Shape OCC_Pcon(Double_t startPhi, Double_t deltaPhi,Int_t zNum, Double_t *rMin, Double_t *rMax, Double_t *z);
0048 TopoDS_Shape OCC_Xtru(TGeoXtru * TG_Xtru);
0049 TopoDS_Shape OCC_Pgon(Int_t np, Int_t nz, Double_t * p, Double_t phi1, Double_t DPhi, Int_t numpoint);
0050 TopoDS_Shape OCC_Box(Double_t dx, Double_t dy, Double_t dz, Double_t OX, Double_t OY, Double_t OZ);
0051 TopoDS_Shape OCC_Trd(Double_t dx1, Double_t dx2, Double_t dy1, Double_t dy2, Double_t dz);
0052 TopoDS_Shape OCC_Mesh(TGeoTessellated *tess);
0053 std::ofstream out;
0054 TopoDS_Shape fOccShape;
0055
0056 public:
0057 TGeoToOCC();
0058 virtual ~TGeoToOCC();
0059 TopoDS_Shape OCC_SimpleShape(TGeoShape *TG_Shape);
0060 TopoDS_Shape OCC_CompositeShape(TGeoCompositeShape *cs, TGeoHMatrix matrix);
0061 TopoDS_Shape Reverse(TopoDS_Shape Shape);
0062
0063 };
0064 #endif
0065
0066