Interplay between ROOT and CATIA P Biryukov p
Interplay between ROOT and CATIA P. Biryukov (p. biryukov@gsi. de)
Aim • The aim of the work is to make ROOT geometry available in CATIA and vice versa (It is assumed that this technique will be used during future GSI project, in particular in CBM experiment)
Future GSI project The proposed project FAIR (Facility for Antiproton and Ion Research) is an international accelerator facility of the next generation. It builds on the experience and technological developments already made at the existing GSI facility, and incorporates new technological concepts. At its heart is a double ring facility with five times the circumference of the current SIS. A system of cooler-storage rings for effective beam cooling at high energies and various experimental halls will be connected to the facility.
Future GSI project The proposed project FAIR (Facility for Antiproton and Ion Research) is an international accelerator facility of the next generation. It builds on the experience and technological developments already made at the existing GSI facility, and incorporates new technological concepts. At its heart is a double ring facility with five times the circumference of the current SIS. A system of cooler-storage rings for effective beam cooling at high energies and various experimental halls will be connected to the facility.
Future GSI project http: //www. gsi. de/fair/index_e. html FAIR (Facility for Antiproton and Ion Research) is an international accelerator facility of the next generation.
Software Simulation • ROOT-VMC • GEANT 4 (in future) CAD • CATIA (v 5. 14) • Auto. CAD (might be) STEP (ISO-10303)
CATIA is the CAD/CAM/CAE commercial software suite developed by Dassault Systemes and marketed world-wide by IBM. It is commonly referred to as a 3 D PLM software. All stages of product development are supported, from conceptualization, through design (CAD) and manufacturing (CAM) until analysis (CAE). It provides an open development architecture through interfaces which can be used to customize or develop applications. The API's are supported in Fortran and C for V 4 and Visual Basic and C++ for V 5. These API's are called as CAA 2 (or CAA V 5). The CAA 2 are COM based interfaces. These interfaces provide a seamless integration for products developed on the CATIA suite of software. Catia V 4 is principally a surface based boundary representation package. Catia V 5 is a parametric solid/surface feature based package. CATIA is widely used throughout the engineering industry, especially in the automotive and aerospace sectors, where Catia V 4, Catia V 5 and NX (Unigraphics) are three dominant systems. Dassault Systemes http: //www. 3 ds. com
STEP is the ISO standard for the exchange of product data (ISO-10303) It is an evolving standard which covers the whole Product Life Cycle in terms of data sharing, storage and exchange. STEP is replacing other CAE exchange standards like IGES, DXF, SET and VDAFS, as well as allow for complete descriptions in electronic form of all data related to Manufacturable Products.
Problem Different representation of geometry in ROOT and CATIA: CATIA • no hierarchy • solids composed of surfaces, edges, vertexes ROOT • hierarchy • solids as primitives
Solution Composed/monolithic solids: • Key points Different styles of hierarchy: • additional information about ROOT's hierarchy is needed
Solution: key points TGeo. Eltu TGeo. Box TGeo. Para TGeo. Trd 1 TGeo. Trd 2 TGeo. Trap TGeo. Gtra TGeo. Arb 8 TGeo. Tube
Data transfer Root. To. Catia(char *fn) (C++ function) *. root Catia. To. Root(char *fn) (C++ function) File with geometry description • key points • hierarchy • names of the solids CATIA's file CATIA's macros File with geometry description • hierarchy • names of the solids STEP file • key points
Example: Root. To. Catia/Catia. To. Root void main() { {. . . Root. To. Catia("Sample"); Catia. To. Root("Sample"); . . . } } Sample. root Sample. txt Sample. stp CATIA Sample. root
Example: Root. To. Catia/Catia. To. Root Linux ubiryukov> convert Catia. To. Root 1 Sample Name of the program Direction Zoom (or Root. To. Catia) File name
void Sample () { g. System->Load("lib. Geom")) geom=new TGeo. Manager("simple 1", "Simple geometry"); Example: Sample. C TGeo. Material *mat. Vacuum = new TGeo. Material("Vacuum", 0, 0, 0); TGeo. Medium *Vacuum = new TGeo. Medium("Vacuum", 1, mat. Vacuum); TGeo. Medium *medium=Vacuum; TGeo. Volume *top = geom->Make. Box("TOP", medium, 1000. , 150. , 100. ); top->Set. Line. Color(k. White); geom->Set. Top. Volume(top); TGeo. Volume *v. A = geom->Make. Eltu("v. A", medium, 100. , 150. , 10. ); v. A->Set. Line. Color(k. Red); TGeo. Volume *v. B = geom->Make. Box("v. B", medium, 50. , 70. , 1. ); v. B->Set. Line. Color(k. Yellow); v. A->Add. Node(v. B, 1, new TGeo. Combi. Trans(0, 0, -9, new TGeo. Rotation("", 0, 0, 0))); v. A->Add. Node(v. B, 2, new TGeo. Combi. Trans(0, 0, 9, new TGeo. Rotation("", 0, 0, 0))); top->Add. Node(v. A, 1, new TGeo. Combi. Trans(-200, 0, -50, new TGeo. Rotation("", 0, 0, 0))); top->Add. Node(v. A, 2, new TGeo. Combi. Trans(0, 0, 0, new TGeo. Rotation("", 0, 0, 0))); top->Add. Node(v. A, 3, new TGeo. Combi. Trans(200, 0, 50, new TGeo. Rotation("", 0, 0, 0))); geom->Close. Geometry(); geom->Export("Sample. root"); }
Geometry in ROOT Sample. root
Data transfer Root. To. Catia(char *fn) (C++ function) *. root Catia. To. Root(char *fn) (C++ function) File with geometry description • key points • hierarchy • names of the solids CATIA's file CATIA's macros File with geometry description • hierarchy • names of the solids STEP file • key points
Example: ROOT->CATIA Root. To. Catia(char *fn) Sample. root Sample. txt (File with geometry description) 0 TGeo. BBox TOP 1 0 1 2 3 4 5 6 7 8 @end 1 catia. Point (1)Point -1000. 000000 -150. 000000 -100. 000000 @end 2 catia. Point (2)Point -1000. 000000 150. 000000 -100. 000000 @end 3 catia. Point (3)Point 1000. 000000 150. 000000 -100. 000000 @end 4 catia. Point (4)Point 1000. 000000 -150. 000000 -100. 000000 @end 5 catia. Point (5)Point -1000. 000000 -150. 000000 100. 000000 @end 6 catia. Point (6)Point -1000. 000000 150. 000000 100. 000000 @end 7 catia. Point (7)Point 1000. 000000 150. 000000 100. 000000 @end 8 catia. Point (8)Point 1000. 000000 -150. 000000 100. 000000 @end 9 TGeo. Eltu v. A 2 0 10 11 12 13 @end 10 catia. Point (0)Bottom. Centre -200. 000000 -60. 000000 @end 11 catia. Point (0)A -100. 000000 -60. 000000 @end 12 catia. Point (1)B -200. 000000 150. 000000 -60. 000000 @end 13 catia. Point (2)Top. Centre -200. 000000 -40. 000000 @end
File format: ROOT->CATIA 0 TGeo. BBox TOP 1 0 1 2 3 4 5 6 7 8 @end NUMBER TYPE NAME UID NUM_PARENT of a record TGeo. Tube of the volume's number of a in the file TGeo. Trd 1 logical serial parent volume. . volume number in the list of volumes
File format: ROOT->CATIA 0 TGeo. BBox TOP 1 0 1 2 3 4 5 6 7 8 @end NUM_PARENT number of a parent volume 1 TGeo. BBox my. Box 0 0 1 2 3 4 5 6 7 8 @end
File format: ROOT->CATIA 0 TGeo. BBox TOP 1 0 1 2 3 4 5 6 7 8 @end NUM_POINT 1 number of a record that contain information about point
File format: ROOT->CATIA 0 TGeo. BBox TOP 1 0 1 2 3 4 5 6 7 8 @end 1 catia. Point (1)Point -1000. 0 -150. 0 -100. 0 @end 2 catia. Point (2)Point -1000. 0 150. 0 -100. 0 @end 3 catia. Point (3)Point 1000. 0 150. 0 -100. 0 @end Type Name Cartesian ordinates
File format: ROOT->CATIA 0 TGeo. BBox TOP 1 0 1 2 3 4 5 6 7 8 @end end of the record
Data transfer Root. To. Catia(char *fn) (C++ function) *. root Root. To. Catia(char *fn) (C++ function) File with geometry description • key points • hierarchy • names of the solids CATIA's file CATIA's macros File with geometry description • hierarchy • names of the solids STEP file • key points
Example Sample. txt (File with geometry description) CATIA's macros CATIA
Example: In CATIA
Example: In CATIA
In CATIA NAME TYPE NUMBER UID of the record in the file NUM_PARENT any comments do not process current body key points
Example: In CATIA
Data transfer Root. To. Catia(char *fn) (C++ function) *. root Catia. To. Root(char *fn) (C++ function) File with geometry description • key points • hierarchy • names of the solids CATIA's file CATIA's macros File with geometry description • hierarchy • names of the solids STEP file • key points
Example: CATIA's macros Sample. txt (File with geometry description) Sample. stp (STEP file)
Example: CATIA->ROOT Text file (geometry description) – Sample. txt. . . 14 TGeo. BBox v. B 3 9 14. (1)Point 14. (2)Point 14. (3)Point 14. (4)Point 14. (5)Point 14. (6)Point 14. (7)Point 14. (8)Point @end. . . STEP file - Sample. stp. . . #142=CARTESIAN_POINT('14. (3)Point', (-150. , 70. , -60. )) ; #143=CARTESIAN_POINT('14. (4)Point', (-150. , -70. , -60. )) ; #144=CARTESIAN_POINT('14. (5)Point', (-250. , -70. , -58. )) ; #145=CARTESIAN_POINT('14. (6)Point', (-250. , 70. , -58. )) ; #146=CARTESIAN_POINT('14. (7)Point', (-150. , 70. , -58. )) ; #147=CARTESIAN_POINT('14. (8)Point', (-150. , -70. , -58. )) ; #148=CARTESIAN_POINT('23. (1)Point', (-250. , -70. , -42. )) ; #149=CARTESIAN_POINT('23. (2)Point', (-250. , 70. , -42. )) ; . . .
Data transfer Root. To. Catia(char *fn) (C++ function) *. root Catia. To. Root(char *fn) (C++ function) File with geometry description • key points • hierarchy • names of the solids CATIA's file CATIA's macros File with geometry description • hierarchy • names of the solids STEP file • key points
Example: Sample. txt (File with geometry description) Catia. To. Root(char *fn) Sample. root Sample. stp (STEP file) Sample. root
Data transfer Root. To. Catia(char *fn) (C++ function) *. root Catia. To. Root(char *fn) (C++ function) File with geometry description • key points • hierarchy • names of the solids CATIA's file CATIA's macros File with geometry description • hierarchy • names of the solids STEP file • key points
Progress *. root->*. txt->CATIA-> *. txt/*. stp->*. root) TGeo. Box TGeo. Para TGeo. Trd 1 TGeo. Trd 2 TGeo. Trap TGeo. Gtra TGeo. Arb 8 TGeo. Tube. Seg TGeo. Eltu TGeo. Ctub TGeo. Cone. Seg TGeo. Torus TGeo. Sphere TGeo. Pgon TGeo. Pcon
Example
Example
Example
Future plans • Finish all the solids • Check everything e h T d n E • Improve hierarchy support • Improve geometry marking technique • Feedback from users
- Slides: 41