From c03cf4ce58f9f633e0786dc691a5b94292b82c24 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Mon, 10 Mar 2025 23:06:16 +1100 Subject: [PATCH] Fix #6303. I messed up the commit in 1259607a --- src/bonsai/bonsai/tool/loader.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/bonsai/bonsai/tool/loader.py b/src/bonsai/bonsai/tool/loader.py index e7fd1185a5..3ca43735c8 100644 --- a/src/bonsai/bonsai/tool/loader.py +++ b/src/bonsai/bonsai/tool/loader.py @@ -1036,18 +1036,22 @@ class Loader(bonsai.core.tool.Loader): bm = bmesh.new() bm.from_mesh(mesh) prev_co = None - # no = Vector((0.0, 1.0, 0.0)) if not usage: sense_factor = 1 # Assume the extrusion vector points in the direction sense no = cls.get_extrusion_vector(element).normalized() co = Vector((0.0, 0.0, offset)) elif usage.LayerSetDirection == "AXIS2": co = Vector((0.0, offset, 0.0)) + no = cls.get_extrusion_vector(element).normalized() no = no.cross(Vector([1.0, 0.0, 0.0])) elif usage.LayerSetDirection == "AXIS3": co = Vector((0.0, 0.0, offset)) no = cls.get_extrusion_vector(element).normalized() no = Vector([0.0, 0.0, 1.0 if no.z > 0 else -1.0]) + elif usage.LayerSetDirection == "AXIS3": + co = Vector((0.0, 0.0, offset)) + no = cls.get_extrusion_vector(element).normalized() + no = Vector([1.0 if no.x > 0 else -1.0, 0.0, 0.0]) # Cache this body = ifcopenshell.util.representation.get_context(tool.Ifc.get(), "Model", "Body", "MODEL_VIEW") styles = {}