From 4f37e3738da63da1d9e7bf817325ec249d391774 Mon Sep 17 00:00:00 2001 From: Roy-043 <70520633+Roy-043@users.noreply.github.com> Date: Thu, 13 Jun 2024 15:20:25 +0200 Subject: [PATCH] BIM: Fix handling of Wall normal (#14540) The `Part.makeLine()` code is unnecessary and also risky as length can be zero. See first image in #14524. --- src/Mod/BIM/ArchWall.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Mod/BIM/ArchWall.py b/src/Mod/BIM/ArchWall.py index e6e3bccbec..b096682d26 100644 --- a/src/Mod/BIM/ArchWall.py +++ b/src/Mod/BIM/ArchWall.py @@ -718,11 +718,10 @@ class _Wall(ArchComponent.Component): return None if obj.Normal == Vector(0,0,0): if obj.Base: - baseshape = obj.Base.Shape + normal = DraftGeomUtils.get_shape_normal(obj.Base.Shape) + if normal is None: + normal = Vector(0,0,1) else: - baseshape = Part.makeLine((0,0,0),(length,0,0)) - normal = DraftGeomUtils.get_shape_normal(baseshape) - if normal == None: normal = Vector(0,0,1) else: normal = Vector(obj.Normal)