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.
This commit is contained in:
Roy-043
2024-06-13 15:20:25 +02:00
committed by GitHub
parent 1780ea4760
commit 4f37e3738d

View File

@@ -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)