You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
add a GDMLVolume type to import a complete GDML geometry subtree
preserve the OpenGATE world and place the imported GDML root inside a selected mother volume
support GDML setup selection, schema validation, name stripping, and parser overlap checks
add user documentation and a regression test
Motivation
OpenGATE currently supports exporting geometry to GDML for visualization, but does not provide a native volume type for importing an existing GDML geometry into a simulation.
This change allows externally generated Geant4 geometries to be reused directly inside an OpenGATE geometry hierarchy.
Validation
clean editable rebuild of opengate_core
G4GDMLParser availability and construction verified
GDML solids, materials, logical volumes, and placements imported successfully
particle transport through the imported geometry verified
KillActor attachment to the imported GDML subtree verified
You are too fast @qmisslin ;) ! The actions will probably fail because G4 is not installed with the gdml/XercesC but we will look at it.
Thanks David ! The CI logs seem to confirm your hypothesis.
test113_gdml_volume.py passes on the Ubuntu jobs, but it fails on all Windows jobs (Python 3.11 to 3.14) because G4GDMLParser is not exposed in the Windows opengate-core wheel.
The current Windows build script appears to compile Geant4 without GEANT4_USE_GDML=ON and without an explicit Xerces-C dependency, whereas the Linux and macOS builds already enable GDML.
The other Ubuntu failures come from test111_jobs_run_sequential.py and seem unrelated to this PR.
Would you prefer that we enable GDML/Xerces-C in the Windows build, or that the GDML regression test be skipped when the installed Geant4 does not provide GDML support?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
G4GDMLParserinopengate_coreGDMLVolumetype to import a complete GDML geometry subtreeMotivation
OpenGATE currently supports exporting geometry to GDML for visualization, but does not provide a native volume type for importing an existing GDML geometry into a simulation.
This change allows externally generated Geant4 geometries to be reused directly inside an OpenGATE geometry hierarchy.
Validation
opengate_coreG4GDMLParseravailability and construction verifiedKillActorattachment to the imported GDML subtree verifiedtest113_gdml_volume.pypassespre-commithooks pass: