From b287c8604cad902c1a7d5af8551ecbb710e75c39 Mon Sep 17 00:00:00 2001 From: paul lee Date: Fri, 6 Aug 2021 01:26:46 +0800 Subject: [PATCH] [ArchWall] Fix MakeBlocks to work if Base is Sketch Forum Discussion - https://forum.freecadweb.org/viewtopic.php?f=23&t=60771 --- src/Mod/Arch/ArchWall.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Mod/Arch/ArchWall.py b/src/Mod/Arch/ArchWall.py index 4e4a37ef04..7cb5ffd639 100644 --- a/src/Mod/Arch/ArchWall.py +++ b/src/Mod/Arch/ArchWall.py @@ -850,7 +850,14 @@ class _Wall(ArchComponent.Component): offset = obj.OffsetFirst.Value else: offset = obj.OffsetSecond.Value - for edge in self.basewires[0].Edges: + # only 1 wire (first) is supported + if obj.Base.isDerivedFrom("Sketcher::SketchObject"): + # if obj.Base is Sketch, self.baseWires[0] returned is already a list of edge + baseEdges = self.basewires[0] + else: + # otherwise, it is wire + baseEdges = self.basewires[0].Edges + for edge in baseEdges: while offset < (edge.Length-obj.Joint.Value): #print i," Edge ",edge," : ",edge.Length," - ",offset if offset: