Skip to content

Commit a2ad134

Browse files
sawenzelclaude
andcommitted
Upgrade the CAD to TGeo converter
This upgrades O2_CADtoTGeo.py to carry every CAD solid in the most exact representation that accepts it, and installs it as o2-cad-to-tgeo. - --csg recognises ROOT CSG primitives and booleans, and emits an O2FlatCSG for a part that decomposes into cells. - --exact-surfaces emits an O2BVHSurfaceSolid from trimmed CAD surfaces, and --recognize-surfaces recovers planes, cylinders, cones and spheres stored as NURBS. - --mesh carries the remaining parts as a triangle mesh. - --media-json rebuilds the original media of geometry exported by o2-tgeo-to-cad, and --in-field takes tracking parameters from the live field. - The cadsupport package holds the recognition, decomposition and emission stages, covered by --self-test. - examples/ ships Bagger.step and as1-oc-214.stp with their material tables, and validation/ holds the oracle gate, the closure test and the demo. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 2807d8d commit a2ad134

69 files changed

Lines changed: 47695 additions & 1712 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Detectors/CADSupport/CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,19 @@ o2_add_executable(
7474
PUBLIC_LINK_LIBRARIES O2::CADSupport ROOT::Geom ROOT::GeomPainter ROOT::RIO
7575
nlohmann_json::nlohmann_json)
7676

77-
install(PROGRAMS tools/o2-tgeo-to-cad
77+
install(PROGRAMS tools/o2-cad-to-tgeo
78+
tools/o2-tgeo-to-cad
79+
tools/compat/O2_CADtoTGeo.py
7880
tools/compat/O2_TGeoToCAD.py
7981
DESTINATION ${CMAKE_INSTALL_BINDIR})
8082

8183
install(DIRECTORY tools/
8284
DESTINATION ${CMAKE_INSTALL_DATADIR}/CADSupport/tools
8385
USE_SOURCE_PERMISSIONS
8486
PATTERN "__pycache__" EXCLUDE
87+
PATTERN "o2-cad-to-tgeo" EXCLUDE
8588
PATTERN "o2-tgeo-to-cad" EXCLUDE
8689
PATTERN "compat" EXCLUDE)
90+
91+
install(DIRECTORY examples/
92+
DESTINATION ${CMAKE_INSTALL_DATADIR}/CADSupport/examples)

Detectors/CADSupport/examples/ExcavatorArm.step

Lines changed: 11687 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Type,"[CAD/Document] Type","[Part/CAD/Document] Part Number","[Part/CAD/Document] Version","[Part/CAD/Document] Name",[CAD] Mass (kg),[CAD] Material
2+
CAD,Mechanical/Part,Base,AA.01,Base,,Stainless Steel
3+
CAD,Mechanical/Part,BasePin,AA.01,BasePin,,Stainless Steel
4+
CAD,Mechanical/Part,Boom,AA.01,Boom,,Stainless Steel
5+
CAD,Mechanical/Part,BoomCylinderInner,AA.01,BoomCylinderInner,,Stainless Steel
6+
CAD,Mechanical/Part,BoomCylinderOuter,AA.01,BoomCylinderOuter,,Stainless Steel
7+
CAD,Mechanical/Part,Stick,AA.01,Stick,,Stainless Steel
8+
CAD,Mechanical/Part,StickCylinderInner,AA.01,StickCylinderInner,,Stainless Steel
9+
CAD,Mechanical/Part,StickCylinderOuter,AA.01,StickCylinderOuter,,Stainless Steel
10+
CAD,Mechanical/Part,Bucket,AA.01,Bucket,,Stainless Steel
11+
CAD,Mechanical/Part,BucketCylinderInner,AA.01,BucketCylinderInner,,Stainless Steel
12+
CAD,Mechanical/Part,BucketCylinderOuter,AA.01,BucketCylinderOuter,,Stainless Steel
13+
CAD,Mechanical/Part,BucketLink1,AA.01,BucketLink1,,Stainless Steel
14+
CAD,Mechanical/Part,BucketLink2,AA.01,BucketLink2,,Stainless Steel
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
11,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
2+
#REF!,,Bill Of Material Report,,,Part present in various sub assemblies,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
3+
,,Part Number,"ST2487728, Rev: 1.01",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
4+
,,Name,IRIS 3 SECTORS ASSY. WIITH BEAM PIPE,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
5+
,,CERN Drawing Reference,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
6+
,,Date,03-03-2026,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
7+
,,Extracted by,Pascal Jean Secouet (psecouet),,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
8+
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
9+
Parts and CAD Documents,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
10+
Type,"[CAD/Document] Type, Type","[Part/CAD/Document] Part Number, Document Number, Document Number","[Part/CAD/Document] Version, Version, Version","[Part/CAD/Document] Name, Definition, Title",[CAD] Mass (kg),[CAD] Material,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
11+
CAD,Mechanical/Part,ST0923290_01,AA.00,UHV GATE VALVE SERIES 108 DN63 CF,9.568453,Stainless Steel,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
12+
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
13+
CAD,Mechanical/Part,ST2487458_01,AA.03,IRIS BELLOWS-3 SECTORS DECENTRE,0.21233,St. Steel EN 1.4306 (304L),,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
14+
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
15+
CAD,Mechanical/Part,ST2487195_01,AA.04,TRANSITION FOIL-3 SECTORS,0.0532305,Cu Be C17410 (TH02),,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
16+
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
17+
CAD,Mechanical/Part,ST2487462_01,AA.09,ACTUATOR LINK-2ND VACUUM-3 sectors-DECENTRE,4.71115,Alu EN AW-5083 (H116),,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
18+
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
19+
CAD,Mechanical/Part,ST1829909_01,AA.01,MD100HSMSL1X000Z,7.23448,Alu EN AW-5083 (H116),,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
20+
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
21+
CAD,Mechanical/Part,ST1782525_01,AA.04,BEAM PIPE C SIDE-DOUBLE VACUUM-VERSION 072023,1.51881,St. Steel EN 1.4306 (304L),,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
22+
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
23+
CAD,Mechanical/Part,ST2487461_01,AA.04,SMALL ROTATIVE RING-2ND VACUUM-3 sectors-DECENTRE,0.0105409,Alu EN AW-5083 (H116),,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
24+
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
25+
CAD,Mechanical/Part,ST2487721_01,AA.02,CENTRAL PIPE-IRIS-2ND VACUUM-3 sectors-DECENTRE,0.313133,Carbon Fiber,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
26+
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
27+
CAD,Mechanical/Part,ST2487459_01,AA.04,ROTATIVE RING-2ND VACUUM-3 sectors-DECENTRE,0.0155589,Alu EN AW-5083 (H116),,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
28+
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
29+
CAD,Mechanical/Part,ST2487736_01,AA.07,EXTERNAL BP SECONDARY VACUUM-3 SECTORS-DECENTRE,7.23049,Alu EN AW-5083 (H116),,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
30+
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
31+
CAD,Mechanical/Part,ST1873216_01,AA.00,UHV GATE VALVE SERIES 108 DN100CF-CUSTOM,10.803705,Stainless Steel,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
32+
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
33+
CAD,Mechanical/Part,ST1A38526_01,AA.04,IRIS BASE-3 SECTORS-SYM,0.0721655,Alu EN AW-6082 (T6),,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
34+
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
35+
CAD,Mechanical/Part,ST1A38495_01,AA.04,IRIS BASE-3 sectors,0.0891183,Alu EN AW-6082 (T6),,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
36+
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
37+
CAD,Mechanical/Part,ST2487455_01,AA.09,VACUUM VESSEL-SECONDARY VACUUM-3 sectors,7.27557,Alu EN AW-5083 (H116),,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
38+
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
39+
CAD,Mechanical/Part,ST2500409_01,AA.02,MICROCHANNEL-3 sectors,0.0896362,Carbon Fiber,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
40+
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
41+
CAD,Mechanical/Part,ST1A38494_01,AA.05,IRIS 1/3 SECTOR-CENTRAL PIPE,0.0608399,Alu EN AW-5083 (O-H111),,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
42+
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
43+
CAD,Mechanical/Part,ST2487457_01,AA.03,EXTERNAL RF CONTACT FOR IRIS 3 SECTORS DECENTRE,0.0439901,Cu Be C17410 (TH02),,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
44+
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
45+
CAD,Mechanical/Part,ST1A38476_01,AA.05,IRIS 1/3 SECTOR-END CAP 1,0.0176523,Alu EN AW-5083 (H116),,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
46+
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
47+
CAD,Mechanical/Part,ST2500394_01,AA.03,ITS4-CHIPS-3sectors,2.5503,Copper,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
48+
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
49+
CAD,Mechanical/Part,ST1A38486_01,AA.06,IRIS 1/3 SECTOR-END CAP 2,0.0176523,Alu EN AW-5083 (H116),,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
50+
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
51+
CAD,Mechanical/Part,ST2513437_01,AA.03,SILICON SENSORS IRIS TRACKER-B0-B1-B2,0.0204394,Silicium - Silicon,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

0 commit comments

Comments
 (0)