Files
IfcOpenShell/src/bonsai
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-03-13 20:26:22 +05:00
2024-08-14 16:49:34 +05:00
2024-08-13 23:09:50 +10:00
2026-01-30 16:05:27 +05:00
2026-03-06 19:07:32 +05:00
2026-01-30 17:32:30 +11:00
2024-08-14 16:49:34 +05:00
2026-01-26 17:13:18 +05:00

Bonsai

An add-on to Blender to allow BIM functionality.

More information on the Bonsai website.