Native .stp/ step file support on GEANT4?

Hello, everyone,

There are many advantages to using CAD software to develop models and prototypes for particle detectors. I use FreeCAD, for example, to design my detector pieces and readily 3D print a prototype.

However, it is challenging to reproduce the CAD model in GEANT4. It is time-consuming and limited to the GEANT4 primitives.

Sometimes I import the CAD model into the simulation with CADMesh. I love it, but converting a detailed CAD geometry into a meshed object seems counterproductive.

As an alternative to mesh, we have the STEP files, supported by nearly all CAD programs on the market. So here is my question. What would be the best way to start developing step-file support in GEANT4? What are the foreseeable challenges of implementing that?

Thanks a lot, and take it easy, everyone!

PS: I know there is GDML, but it is not as widespread as STEP.

I think the major challenge is that Geant4 is optimized to find whether a track crosses a volume, while CAD programs rarely need this knowledge optimized for speed. Timewise, STEP has plenty of things to be implemented, i.e., developer’s time invested, while a conversion STEP to GDML takes a minute, just once per geometry.