opengate icon indicating copy to clipboard operation
opengate copied to clipboard

Import a solid from an STL file

Open solenedietsch opened this issue 1 year ago • 2 comments

Hello, I couldn't find an option for loading an STL file and importing a complex shape in the Python package. From my understanding, this feature seems to be available in GEANT4 through the 'tessellated volume' class, but it doesn't appear to be exposed in opengate. I referenced the following resources for information:

GEANT4 Tessellated Solids: https://geant4-userdoc.web.cern.ch/UsersGuides/ForApplicationDeveloper/html/Detector/Geometry/geomSolids.html#tessellated-solids OpenGate Documentation: https://opengate.readthedocs.io/en/latest/defining_a_geometry.html#how-to-build-a-tessellated-volume

I'm eager to explore this capability and would appreciate your guidance or confirmation if I missed this option somewhere in the repository. Thank you!

solenedietsch avatar Sep 18 '23 08:09 solenedietsch

Hi, yes, indeed, the STL management is not (yet) included in the opengate python package. It is feasible and planned, but not with a high priority right now. If you want to work on this topic, this is great and we can arrange a meeting to discuss it together so I can guide you ;) If not, you will have to wait a bit, sorry. I will try to chase the team that work on the previous version Cheers

dsarrut avatar Sep 18 '23 09:09 dsarrut

Hi,

I created some code to use STL files in GATE10. https://github.com/GitFuchs/opengate/tree/STL

Unfortunately it still has an issue. The simulation runs fine, but at the end when python is exiting it causes a segmentation fault. Apparently there are some references to objects which have been deleted already, causing the segmentation fault. Cheers

GitFuchs avatar Dec 11 '23 13:12 GitFuchs