Arch: fixed remaining bugs in structures + use facemakers - fixes #2523
This commit is contained in:
parent
9683babcc8
commit
1537ecf9e4
|
@ -480,6 +480,8 @@ class _Structure(ArchComponent.Component):
|
|||
except:
|
||||
FreeCAD.Console.PrintError(translate("Arch","Facemaker returned an error")+"\n")
|
||||
return None
|
||||
if len(baseface.Faces) > 1:
|
||||
baseface = baseface.Faces[0]
|
||||
normal = baseface.normalAt(0,0)
|
||||
if not baseface:
|
||||
for w in obj.Base.Shape.Wires:
|
||||
|
@ -540,8 +542,9 @@ class _Structure(ArchComponent.Component):
|
|||
if obj.Tool:
|
||||
nodes = obj.Tool.Shape
|
||||
elif extdata[1].Length > 0:
|
||||
import Part
|
||||
nodes = Part.Line(nodes.CenterOfMass,nodes.CenterOfMass.add(extdata[1])).toShape()
|
||||
if hasattr(nodes,"CenterOfMass"):
|
||||
import Part
|
||||
nodes = Part.Line(nodes.CenterOfMass,nodes.CenterOfMass.add(extdata[1])).toShape()
|
||||
offset = FreeCAD.Vector()
|
||||
if hasattr(obj,"NodesOffset"):
|
||||
offset = FreeCAD.Vector(0,0,obj.NodesOffset.Value)
|
||||
|
|
Loading…
Reference in New Issue
Block a user