eic / npsim

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

npdet_to_step exports to incorrect units (mm/cm) #20

Closed wdconinc closed 2 months ago

wdconinc commented 7 months ago

Environment: (where does this bug occur, have you tried other environments)

Steps to reproduce: (give a step by step account of how to trigger the bug)

  1. Inside eic-shell, with /opt/detector/setup.sh
  2. npdet_to_step part -l 4 DIRC -o DIRC $DETECTOR_PATH/epic_dirc_only.xml
  3. Open DIRC.stp in freecad or other cad program.

Expected Result: (what do you expect when you execute the steps above)

DIRC bars are 1m, i.e. 1000mm.

Actual Result: (what do you get when you execute the steps above)

DIRC bars are 100mm: image

Also, DIRC.stp includes incorrect entity for the given units:

#20 = ( LENGTH_UNIT() NAMED_UNIT(*) SI_UNIT(.MILLI.,.METRE.) );

Likely needs https://dev.opencascade.org/doc/refman/html/class_x_c_a_f_doc___length_unit.html somewhere.