CAD geometry best practice

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?

Thanks a lot in advance :slight_smile:

1 Like

for those interested, my approach now is the following:

  1. Export geometry to single OBJ file
  2. Import this file into Blender
  3. Export each object to separate PLY files
  4. Import to geant4 with CADMesh

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 :wink:
  • export to ply files
  • Create code-blocks from a simple template to include mesh files into g4 project: SetMaterial, SetVisAttributes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.