Hello,
I am looking for best practice hints on how to import CAD constructed objects (mostly Autodesk Inventor) into geant4 simulations.
Is there a smart way to do this, without too much manual interference? Maybe a more convenient way compared to export/import every individual part of an assembly as a tesselated (CADMesh2?) object?
Using the intermediate step via Blender allows me to conveniently automate some tasks with python:
Rework mesh: merge co-planar faces, triangulate polygons with more than 3 or 4 faces
Shrink surface along normals to avoid (numerical) overlap of objects
Create mapping of material / color: Material assignments in Autodesk Inventor are exported as different colors / textures in a material file. Simple lookup-table approach
export to ply files
Create code-blocks from a simple template to include mesh files into g4 project: SetMaterial, SetVisAttributes