1 ROOT CATIA P. Biryukov (progress report)
2Aim The aim of the work is to make ROOT geometry available in CATIA and vice versa The aim of the work is to make ROOT geometry available in CATIA and vice versa ROOT->CATIA 1.export geometry from ROOT using RootToCatia(char *fn) function (automatically) 2.import geometry to CATIA using macros (automatically) CATIA ROOT Geometry
3Aim The aim of the work is to make ROOT geometry available in CATIA and vice versa The aim of the work is to make ROOT geometry available in CATIA and vice versa CATIA-> ROOT 1.mark geometry in CATIA and specify geometry names (manually) 2.export STEP file with geometry (automatically by CATIA) 3.create file with geometry description (partly automatically using macros in CATIA) 4.convert geometry using CatiaToRoot (char *fn) function (automatically) ROOTCATIA Geometry (STEP) Types, Hierarchy
4 Example: CATIA->ROOT Create a geometry in CATIA
5 Mark the geometry
6... #51=CARTESIAN_POINT('world.1',(-100.,-100.,-100.)) ; #55=CRTESIAN_POINT('world.2',(-100.,100.,-100.)) ; #56=CARTESIAN_POINT('world.3',(100.,100.,-100.)) ; #57=CARTESIAN_POINT('world.4',(100.,-100.,-100.)) ; #58=CARTESIAN_POINT('world.5',(-100.,-100.,100.)) ; #59=CARTESIAN_POINT('world.6',(-100.,100.,100.)) ; #60=CARTESIAN_POINT('world.7',(100.,100.,100.)) ; #61=CARTESIAN_POINT('world.8',(100.,-100.,100.)) ; #62=CARTESIAN_POINT('trd2.1',(-100.,-50.,-100.)) ; #63=CARTESIAN_POINT('trd2.2',(-100.,50.,-100.)) ; #64=CARTESIAN_POINT('trd2.3',(100.,50.,-100.)) ; #65=CARTESIAN_POINT('trd2.4',(100.,-50.,-100.)) ; #66=CARTESIAN_POINT('trd2.5',(-10.,-100.,20.)) ; #67=CARTESIAN_POINT('trd2.6',(-10.,100.,20.)) ; #68=CARTESIAN_POINT('trd2.7',(10.,100.,20.)) ; #69=CARTESIAN_POINT('trd2.8',(10.,-100.,20.)) ; #70=CARTESIAN_POINT('tube.1',(0.,100.,60.)) ; #71=CARTESIAN_POINT('tube.2',(-10.,100.,60.)) ; #72=CARTESIAN_POINT('tube.3',(-40.,100.,60.)) ; #73=CARTESIAN_POINT('tube.4',(0.,-100.,60.)) ;... Example: CATIA->ROOT Export the geometry into a STEP file
7 0 TGeoBBox world TGeoTrd2 trd TGeoTube tube Example: CATIA->ROOT Write geometry description 2 TGeoTube tube
8 0 TGeoBBox world TGeoTrd2 trd TGeoTube tube Example: CATIA->ROOT Write geometry description 2 TGeoTube tube Number of a record in the file (0, 1, 2,...)
9 0 TGeoBBox world TGeoTrd2 trd TGeoTube tube Example: CATIA->ROOT Write geometry description 2 TGeoTube tube Type of the shape (TGeoBBox, TGeoTube, etc)
10 0 TGeoBBox world TGeoTrd2 trd TGeoTube tube Example: CATIA->ROOT Write geometry description 2 TGeoTube tube Name of the shape
11 0 TGeoBBox world TGeoTrd2 trd TGeoTube tube Example: CATIA->ROOT Write geometry description 2 TGeoTube tube Parent's number
12 0 TGeoBBox world TGeoTrd2 trd TGeoTube tube Example: CATIA->ROOT Write geometry description 2 TGeoTube tube Names of points, as they are named in STEP file (e. g. in STEP file point could have a name "tube.3" or "myBox.LeftBottom")
13 0 TGeoBBox world TGeoTrd2 trd TGeoTube tube Example: CATIA->ROOT Write geometry description 2 TGeoTube tube End of the record (all strings in the file must be ended with
14 0 TGeoBBox world TGeoTrd2 trd TGeoTube tube Example: CATIA->ROOT Write geometry description 2 TGeoTrap
15 Example: CATIA->ROOT Execute "StepToRoot" function StepToRoot(" myDetector "); it loads STEP file (myDetector.stp) it loads geometry description file (myDetector.txt) and it saves ROOT file (myDetector.root)
16 And as a result of the previous steps the following ROOT geometry was created and saved into myDetector.root file Example: CATIA->ROOT
17...now it could be changed... Example: CATIA->ROOT
18 Example: CATIA->ROOT Execute "StepToRoot" function RootToCatia(" myDetector "); it loads ROOT file (myDetector.root) and it saves file with geometry for CATIA (myDetector.txt)
19 Example: ROOT->CATIA The program creates myDetector.txt file 0 TGeoBBox world catiaPoint (0)Point catiaPoint (1)Point catiaPoint (2)Point catiaPoint (3)Point catiaPoint (4)Point catiaPoint (5)Point catiaPoint (6)Point catiaPoint (7)Point TGeoTrd2 trd catiaPoint (0)Point catiaPoint (1)Point catiaPoint (2)Point catiaPoint (3)Point catiaPoint (4)Point catiaPoint (5)Point catiaPoint (6)Point catiaPoint (7)Point TGeoTube tube catiaPoint (0)BottomCentre catiaPoint (1)RMinPoint catiaPoint (2)RMax catiaPoint (3)TopCentre TGeoTrd2 trd catiaPoint (0)Point
20 Example: ROOT->CATIA Load geometry
21 Example: Comparing Compare("myDetectorNew", "myDetectorOld", "myDetectorCmp"); myDetectorNew.stp myDetectorNew.txt myDetectorOld.stp myDetectorOld.txt myDetectorCmp.stp myDetectorCmp.txt
22 TGeoBox TGeoPara TGeoTrd1 TGeoTrd2 TGeoTrap TGeoGtra TGeoArb8 TGeoTube TGeoTubSeg TGeoCtub TGeoEltu TGeoCone TGeoConSeg TGeoPcon TGeoPgon TGeoSphere TGeoTorus TGeoXtru TGeoParaboloid TGeoHype TGeoBox TGeoPara TGeoTrd1 TGeoTrd2 TGeoTrap TGeoGtra TGeoArb8 TGeoTube TGeoTubSeg TGeoCtub TGeoEltu TGeoCone TGeoConSeg TGeoPcon TGeoPgon TGeoSphere TGeoTorus TGeoXtru TGeoParaboloid TGeoHype Progress Ready Not Ready is being made TGeoGtra can be converted from ROOT to CATIA, but not from CATIA to ROOT TGeoTorus can be converted from CATIA to ROOT and from ROOT to CATIA, but can not be recreated as a solid in CATIA (However it could be recreated as points)
23 TGeoBox TGeoPara TGeoTrd1 TGeoTrd2 TGeoTrap TGeoGtra TGeoArb8 TGeoTube TGeoTubSeg TGeoCtub TGeoEltu TGeoCone TGeoConSeg TGeoPcon TGeoPgon TGeoSphere TGeoTorus TGeoXtru TGeoParaboloid TGeoHype TGeoBox TGeoPara TGeoTrd1 TGeoTrd2 TGeoTrap TGeoGtra TGeoArb8 TGeoTube TGeoTubSeg TGeoCtub TGeoEltu TGeoCone TGeoConSeg TGeoPcon TGeoPgon TGeoSphere TGeoTorus TGeoXtru TGeoParaboloid TGeoHypeTGeoBoxTGeoPara TGeoTrd1 TGeoTrd2 TGeoTrap TGeoGtra TGeoArb8 TGeoTube TGeoTubSeg...and so on Marking geometry
24 The end Web site Problem: "What is required exactly?"