mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 17:58:20 +00:00
fbfbe93550
Three related cleanups in one pass: * **Per-gizmo preferences removed.** The ``visibility_pref`` field on IconSlot, the ``prefs.gizmos.<feature>.<icon>`` PropertyGroups, and the dispatcher that surfaced them in the addon preferences UI are all gone. ``update_gizmo_visibility`` loses its ``pref_enabled`` parameter — visibility is now driven purely by editing state and modal gating. bim/ui.py drops ~257 lines of dead PropertyGroup definitions; bim/__init__.py and tool/parametric.py shed their matching wiring; door / wall slot declarations stop referencing the now-nonexistent prefs. * **Dynamic-wall face normals fixed.** ``regenerate_wall_mesh_from_props`` in wall.py now calls ``bmesh.ops.recalc_face_normals`` before writing the mesh. Without it, walls regenerated from the parametric edit draft could ship with inward-facing normals on some faces, which rendered as visual holes under any backface-cull or normal-aware shading. ``test/bim/module/model/test_wall_preview_mesh.py`` pins the invariant (every face's normal points away from the wall centre). * **Color constants DRY.** ``COLOR_RED`` / ``COLOR_GREEN`` / ``COLOR_BLUE`` / ``COLOR_NEUTRAL`` now live at module scope in gizmos.py; the BaseParametricGizmoGroup class attributes alias the same tuples so ``self.COLOR_GREEN`` keeps working. IconSlot declarations in stair.py (plus / minus) and array.py (count_minus / count_plus / delete) now reference the named constants instead of duplicating the RGB tuples inline. Verified: headless smoke green at 1267 BIM_OT_ classes, test_parametric_registry.py 8/8, wall lane 31/31 (includes the new preview-mesh test). ruff + black clean on the touched files. Generated with the assistance of an AI coding tool.