Skip to content

Commit 75fdc46

Browse files
sawenzelclaude
andcommitted
Add the TGeo to CAD exporter
This adds O2_TGeoToCAD.py, which writes a TGeo geometry out as a STEP file. - O2_TGeoToCAD.py walks the TGeoVolume DAG and writes one STEP file that keeps the XCAF assembly tree. - A logical volume becomes one definition, referenced from every node that places it. - --carve-mothers subtracts the placed daughters from a mother solid for a CAD-facing export. - --media-json records the source media, so converting the STEP back rebuilds them verbatim. - The wrapper o2-tgeo-to-cad is installed into bin and runs the script from $O2_ROOT/share/CADSupport/tools. - --self-test covers the mapping. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent fd36ad2 commit 75fdc46

3 files changed

Lines changed: 2903 additions & 0 deletions

File tree

Detectors/CADSupport/CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,12 @@ o2_add_executable(
7373
IS_BENCHMARK
7474
PUBLIC_LINK_LIBRARIES O2::CADSupport ROOT::Geom ROOT::GeomPainter ROOT::RIO
7575
nlohmann_json::nlohmann_json)
76+
77+
install(PROGRAMS tools/o2-tgeo-to-cad
78+
DESTINATION ${CMAKE_INSTALL_BINDIR})
79+
80+
install(DIRECTORY tools/
81+
DESTINATION ${CMAKE_INSTALL_DATADIR}/CADSupport/tools
82+
USE_SOURCE_PERMISSIONS
83+
PATTERN "__pycache__" EXCLUDE
84+
PATTERN "o2-tgeo-to-cad" EXCLUDE)

0 commit comments

Comments
 (0)