Download presentation
Presentation is loading. Please wait.
Published byJewel Thomasina Randall Modified over 9 years ago
1
1 ROOT CATIA P. Biryukov (p.biryukov@gsi.de) (progress report)
2
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
3
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
4 Example: CATIA->ROOT Create a geometry in CATIA
5
5 Mark the geometry
6
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
7 0 TGeoBBox world 0 1 2 3 4 5 6 7 8 @end 1 TGeoTrd2 trd2 0 1 2 3 4 5 6 7 8 @end 2 TGeoTube tube 0 1 2 3 4 @end Example: CATIA->ROOT Write geometry description 2 TGeoTube tube 0 1 2 3 4 @end
8
8 0 TGeoBBox world 0 1 2 3 4 5 6 7 8 @end 1 TGeoTrd2 trd2 0 1 2 3 4 5 6 7 8 @end 2 TGeoTube tube 0 1 2 3 4 @end Example: CATIA->ROOT Write geometry description 2 TGeoTube tube 0 1 2 3 4 @end Number of a record in the file (0, 1, 2,...)
9
9 0 TGeoBBox world 0 1 2 3 4 5 6 7 8 @end 1 TGeoTrd2 trd2 0 1 2 3 4 5 6 7 8 @end 2 TGeoTube tube 0 1 2 3 4 @end Example: CATIA->ROOT Write geometry description 2 TGeoTube tube 0 1 2 3 4 @end Type of the shape (TGeoBBox, TGeoTube, etc)
10
10 0 TGeoBBox world 0 1 2 3 4 5 6 7 8 @end 1 TGeoTrd2 trd2 0 1 2 3 4 5 6 7 8 @end 2 TGeoTube tube 0 1 2 3 4 @end Example: CATIA->ROOT Write geometry description 2 TGeoTube tube 0 1 2 3 4 @end Name of the shape
11
11 0 TGeoBBox world 0 1 2 3 4 5 6 7 8 @end 1 TGeoTrd2 trd2 0 1 2 3 4 5 6 7 8 @end 2 TGeoTube tube 0 1 2 3 4 @end Example: CATIA->ROOT Write geometry description 2 TGeoTube tube 0 1 2 3 4 @end Parent's number
12
12 0 TGeoBBox world 0 1 2 3 4 5 6 7 8 @end 1 TGeoTrd2 trd2 0 1 2 3 4 5 6 7 8 @end 2 TGeoTube tube 0 1 2 3 4 @end Example: CATIA->ROOT Write geometry description 2 TGeoTube tube 0 1 2 3 4 @end 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
13 0 TGeoBBox world 0 1 2 3 4 5 6 7 8 @end 1 TGeoTrd2 trd2 0 1 2 3 4 5 6 7 8 @end 2 TGeoTube tube 0 1 2 3 4 @end Example: CATIA->ROOT Write geometry description 2 TGeoTube tube 0 1 2 3 4 @end End of the record (all strings in the file must be ended with "@end")
14
14 0 TGeoBBox world 0 1 2 3 4 5 6 7 8 @end 1 TGeoTrd2 trd2 0 1 2 3 4 5 6 7 8 @end 2 TGeoTube tube 0 1 2 3 4 @end Example: CATIA->ROOT Write geometry description 2 TGeoTrap 0 1 2 3 4 @end
15
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
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
17...now it could be changed... Example: CATIA->ROOT
18
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
19 Example: ROOT->CATIA The program creates myDetector.txt file 0 TGeoBBox world 0 1 2 3 4 5 6 7 8 @end 1 catiaPoint (0)Point -100 -100 -100 @end 2 catiaPoint (1)Point -100 100 -100 @end 3 catiaPoint (2)Point 100 100 -100 @end 4 catiaPoint (3)Point 100 -100 -100 @end 5 catiaPoint (4)Point -100 -100 100 @end 6 catiaPoint (5)Point -100 100 100 @end 7 catiaPoint (6)Point 100 100 100 @end 8 catiaPoint (7)Point 100 -100 100 @end 9 TGeoTrd2 trd2 0 10 11 12 13 14 15 16 17 @end 10 catiaPoint (0)Point -60 -50 -80 @end 11 catiaPoint (1)Point -60 50 -80 @end 12 catiaPoint (2)Point 60 50 -80 @end 13 catiaPoint (3)Point 60 -50 -80 @end 14 catiaPoint (4)Point -30 -100 0 @end 15 catiaPoint (5)Point -30 100 0 @end 16 catiaPoint (6)Point 30 100 0 @end 17 catiaPoint (7)Point 30 -100 0 @end 18 TGeoTube tube 0 19 20 21 22 @end 19 catiaPoint (0)BottomCentre 0 50 60 @end 20 catiaPoint (1)RMinPoint1 -20 50 60 @end 21 catiaPoint (2)RMax -30 50 60 @end 22 catiaPoint (3)TopCentre 0 -50 60 @end 9 TGeoTrd2 trd2 0 10 11 12 13 14 15 16 17 @end 10 catiaPoint (0)Point -60 -50 -80 @end
20
20 Example: ROOT->CATIA Load geometry
21
21 Example: Comparing Compare("myDetectorNew", "myDetectorOld", "myDetectorCmp"); myDetectorNew.stp myDetectorNew.txt myDetectorOld.stp myDetectorOld.txt myDetectorCmp.stp myDetectorCmp.txt
22
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
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
24 The end Web site http://www-hades.gsi.de/~biryukov/catia-root/ Problem: "What is required exactly?"
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.