Files
IfcOpenShell/src
Ryan Schultz 385d4aa409 Self-heal inconsistent slab extrusion depth on import
In slice_layerset_mesh (loader.py), detect when an AXIS3 slab's stored
extrusion.Depth is inconsistent with the sum of its LayerThicknesses
(i.e. depth_scale != 1.0). This was caused by old Bonsai code in
change_thickness that incorrectly scaled extrusion.Depth by
1/cos(obj.rotation_euler.x) for ObjectPlacement-rotated slabs, making
the mesh 1.414× too tall for 45°-rotated slabs.

Two-part fix applied on first import of affected files:
1. Scale mesh vertices in Z (from the mesh bottom) by 1/depth_scale so
   the local Z span equals total_perp_thickness × unit_scale, giving
   the correct physical slab geometry immediately.
2. Write the corrected extrusion.Depth = total_perp_thickness /
   extrusion_vec.z back to the IFC data so future imports load the
   correct geometry without requiring this correction.

Files saved after this fix will open correctly with depth_scale = 1.0
and no vertex adjustment needed.
2026-03-14 13:14:51 -05:00
..
2026-02-27 14:52:55 +05:00
2026-01-26 17:10:02 +05:00
2026-02-26 17:01:54 +05:00
2026-02-27 14:52:55 +05:00
2026-01-26 17:13:18 +05:00
2026-01-26 17:13:18 +05:00
2026-02-27 14:52:55 +05:00
2025-12-19 18:53:14 +05:00
2025-12-19 18:53:14 +05:00
2025-12-19 18:53:14 +05:00
2025-12-19 18:53:14 +05:00
2025-12-22 18:44:42 +05:00
2025-12-22 18:44:42 +05:00
2026-02-13 10:03:05 +01:00
2026-03-13 20:26:22 +05:00
2026-01-26 17:13:18 +05:00
2026-02-27 14:52:55 +05:00
2025-12-19 18:53:14 +05:00
2025-12-22 18:44:42 +05:00