mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-29 00:03:17 +00:00
74906ac9fe
When two GizmoDimension hit regions overlap (a short dimension nested inside a longer one along the same axis), the larger one used to win because hit boxes are scaled by world-space length — the long box fully contains the short one, leaving the short gizmo unreachable. The larger gizmo stays clickable at its exposed ends, so smaller-wins is the right UX default. Sets self.select_bias = -self._dimension_length inside GizmoDimension.set_dimension_length. The smaller gizmo writes a less-negative depth value in the GPU select buffer and wins the tie-break. select_bias is unused elsewhere in the codebase, so icon and arrow gizmos keep bias=0 and are unaffected (icons correctly still win against dimensions, since 0 > -length). Adds test/bim/module/drawing/test_dimension_gizmo_priority.py with 5 cases: direct ordering, monotonicity across length ranges, abs() handling for signed dimensions, and NaN/Inf safety. Generated with the assistance of an AI coding tool.