zoglauer / megalib

MEGAlib - the Medium-Energy Gamma-ray Astronomy library
http://megalibtoolkit.com
Other
41 stars 32 forks source link

FEATURE REQUEST: import geometry file form CAD #58

Open iiiian opened 3 years ago

iiiian commented 3 years ago

It will be super nice if we can import some format of CAD file into megalib geometry file. For some mechanically structure, it's kind of complex. Is this feature possible?

jpbreuer commented 1 month ago

Hello! I have been looking at trying to do this recently using the cadmesh library since it should be something like including an additional header file to a project.

I have gone through the megalib documentation, but I could not find what I think I need. Is there some 'lower-level' type documentation of how exactly megalib is translating the geometry files into the geant4-compatible syntax? I figured that one way to add CAD to the geometry file would be to have some kind of in between scripting hack that adds some lines into the final geometry file, but I am not sure how megalib is handling this and all of the different headers right now.

If you could please provide some details I will try to take a look at it. Thanks!