eic / npsim

DD4hep-based simulation plugins, front-end, and related utilities
0 stars 2 forks source link

feat: support TGeoTessellated in npdet_to_step #23

Closed wdconinc closed 7 months ago

wdconinc commented 7 months ago

Briefly, what does this PR introduce?

This PR adds support for TGeoTessellated volumes in the export to STEP. Storing meshes in STEP is not really the most efficient way (BHCAL is 71MB as STEP), but it simplifies some workflows.

What kind of change does this PR introduce?

Please check if this PR fulfills the following:

Does this PR introduce breaking changes? What changes might users need to make to their code?

No.

Does this PR change default behavior?

Yes, adds support for TGeoTessellated.

wdconinc commented 7 months ago

Not sure I understand it, but this gives reasonable approximations with part --level 1 (but not higher; level 3 takes ages).

npdet_to_step part -l 1 HcalBarrel -o epic_bhcal_l1 $DETECTOR_PATH/epic_bhcal.xml parallel_world_volume Drawing 1

npdet_to_step part -l 2 HcalBarrel -o epic_bhcal_l2 $DETECTOR_PATH/epic_bhcal.xml parallel_world_volume Drawing 1 (1)

wdconinc commented 7 months ago

So, this exports the mesh as a bunch of step surfaces, which isn't wrong (it's just useless from a cad pov). It does allow us to re-enable the bhcal in the step export.

To get this to show up as solid requires a few steps through vertices, edges, wires, faces, and shells. This is trickier than I want to spend time on now. So even though this won't resolve the issue entirely, I would like to get this merged without that functionality.