Skip to content

Commit

Permalink
Arch: fixed remaining bugs in structures + use facemakers - fixes #2523
Browse files Browse the repository at this point in the history
  • Loading branch information
yorikvanhavre committed Nov 12, 2016
1 parent 9683bab commit 1537ecf
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Mod/Arch/ArchStructure.py
Expand Up @@ -480,6 +480,8 @@ def getExtrusionData(self,obj):
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:
Expand Down Expand Up @@ -540,8 +542,9 @@ def onChanged(self,obj,prop):
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)
Expand Down

0 comments on commit 1537ecf

Please sign in to comment.