Arch: Fixed regression in structures

This commit is contained in:
Yorik van Havre
2020-11-26 13:47:55 +01:00
parent 7be81376f4
commit 216a25755b
2 changed files with 3 additions and 1 deletions

View File

@@ -615,6 +615,8 @@ class Component(ArchIFC.IfcProduct):
# Get the object's normal.
n = DraftGeomUtils.getNormal(shape[0])
if (not n) or (not n.Length):
n = FreeCAD.Vector(0, 0, 1)
# Reverse the normal if the hint vector and the normal vector have more
# than a 90 degree angle between them.

View File

@@ -739,7 +739,7 @@ class _Structure(ArchComponent.Component):
if obj.Base.Shape.Solids:
return None
elif obj.Base.Shape.Faces:
if not DraftGeomUtils.isCoplanar(obj.Base.Shape.Faces,tolerance=0.01):
if not DraftGeomUtils.isCoplanar(obj.Base.Shape.Faces,tol=0.01):
return None
else:
base,placement = self.rebase(obj.Base.Shape)