From 7a69d6f20e238d230a1e5fb7a51dcddffceff059 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Perdig=C3=A3o?= Date: Wed, 26 Feb 2025 13:12:35 -0300 Subject: [PATCH] Fix issue when updating wall x_angle with obtuse angle. See #5938 --- src/bonsai/bonsai/bim/module/model/wall.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bonsai/bonsai/bim/module/model/wall.py b/src/bonsai/bonsai/bim/module/model/wall.py index 5b60551143..abe2f5607f 100644 --- a/src/bonsai/bonsai/bim/module/model/wall.py +++ b/src/bonsai/bonsai/bim/module/model/wall.py @@ -1480,7 +1480,7 @@ class DumbWallJoiner: results["direction"] = Vector(item.ExtrudedDirection.DirectionRatios) results["x_angle"] = Vector((0, 1)).angle_signed(Vector((y, z))) results["is_sloped"] = True - results["height"] = (item.Depth * self.unit_scale) / (1 / cos(results["x_angle"])) + results["height"] = (item.Depth * self.unit_scale) / abs(1 / cos(results["x_angle"])) break elif item.is_a("IfcBooleanClippingResult"): # should be before IfcBooleanResult check item = item.FirstOperand