diff --git a/src/Mod/Arch/ArchPanel.py b/src/Mod/Arch/ArchPanel.py index 18d96be44b26..72a063702e02 100644 --- a/src/Mod/Arch/ArchPanel.py +++ b/src/Mod/Arch/ArchPanel.py @@ -949,7 +949,10 @@ def getTags(self,obj,transform=False): w.Placement = obj.Placement.multiply(w.Placement) outp.append(w) if self.sheettag is not None: - outp.append(self.sheettag) + w = self.sheettag.copy() + if transform: + w.Placement = obj.Placement.multiply(w.Placement) + outp.append(w) return outp diff --git a/src/Mod/Path/PathScripts/PathContour.py b/src/Mod/Path/PathScripts/PathContour.py index 8ea6483c0d96..e6000e25f944 100644 --- a/src/Mod/Path/PathScripts/PathContour.py +++ b/src/Mod/Path/PathScripts/PathContour.py @@ -227,15 +227,16 @@ def execute(self, obj): baseobject.Proxy.execute(baseobject) for subobj in baseobject.Group: # process the group of panels if isinstance(subobj.Proxy, ArchPanel.PanelCut): - subobj.Proxy.execute(subobj) - contourwire = TechDraw.findOuterWire(subobj.Shape.Edges) - if contourwire is not None: - edgelist = contourwire.Edges - edgelist = Part.__sortEdges__(edgelist) - try: - output += self._buildPathLibarea(obj, edgelist) - except: - FreeCAD.Console.PrintError("Something unexpected happened. Unable to generate a contour path. Check project and tool config.") + shapes = baseobject.Proxy.getOutlines(baseobject, transform=True) + for shape in shapes: + for wire in shape.Wires: + edgelist = wire.Edges + edgelist = Part.__sortEdges__(edgelist) + PathLog.debug("Processing panel perimeter. edges found: {}".format(len(edgelist))) # subobj.Proxy.execute(subobj) + try: + output += self._buildPathLibarea(obj, edgelist) + except: + FreeCAD.Console.PrintError("Something unexpected happened. Unable to generate a contour path. Check project and tool config.") else: contourwire = TechDraw.findShapeOutline(baseobject.Shape, 1, Vector(0, 0, 1)) diff --git a/src/Mod/Path/PathScripts/PathDrilling.py b/src/Mod/Path/PathScripts/PathDrilling.py index 5499c467ff9c..4a80927a295d 100644 --- a/src/Mod/Path/PathScripts/PathDrilling.py +++ b/src/Mod/Path/PathScripts/PathDrilling.py @@ -205,6 +205,7 @@ def findHoles(self, obj, shape): tooldiameter = obj.ToolController.Proxy.getTool(obj.ToolController).Diameter PathLog.debug('search for holes larger than tooldiameter: {}: '.format(tooldiameter)) if dgu.isPlanar(shape): + PathLog.debug("shape is planar") for i in range(len(shape.Edges)): candidateEdgeName = "Edge" + str(i +1) e = shape.getElement(candidateEdgeName) @@ -215,6 +216,7 @@ def findHoles(self, obj, shape): diameter = e.BoundBox.XLength holelist.append((candidateEdgeName, e, x, y, diameter)) else: + PathLog.debug("shape is not planar") for i in range(len(shape.Faces)): candidateFaceName = "Face" + str(i + 1) f = shape.getElement(candidateFaceName) diff --git a/src/Mod/Path/PathScripts/PathEngrave.py b/src/Mod/Path/PathScripts/PathEngrave.py index 6ab7b183f8b5..45605e260501 100644 --- a/src/Mod/Path/PathScripts/PathEngrave.py +++ b/src/Mod/Path/PathScripts/PathEngrave.py @@ -131,7 +131,8 @@ def execute(self, obj): output += self.buildpathocc(obj, wires) elif isinstance(baseobject.Proxy, ArchPanel.PanelSheet): # process the sheet - shapes = baseobject.Proxy.getTags(baseobject) + + shapes = baseobject.Proxy.getTags(baseobject, transform=True) for shape in shapes: output += "G0 Z" + PathUtils.fmt(obj.ClearanceHeight.Value) + "F " + PathUtils.fmt(self.vertRapid) + "\n" for w in shape.Wires: diff --git a/src/Mod/Path/PathScripts/PathProfile.py b/src/Mod/Path/PathScripts/PathProfile.py index 440117ff652c..864ea8c3f8fd 100644 --- a/src/Mod/Path/PathScripts/PathProfile.py +++ b/src/Mod/Path/PathScripts/PathProfile.py @@ -284,7 +284,7 @@ def execute(self, obj): if hasattr(baseobject, "Proxy"): if isinstance(baseobject.Proxy, ArchPanel.PanelSheet): # process the sheet if obj.processPerimeter: - shapes = baseobject.Proxy.getOutlines(baseobject, transform=False) + shapes = baseobject.Proxy.getOutlines(baseobject, transform=True) for shape in shapes: for wire in shape.Wires: edgelist = wire.Edges @@ -295,7 +295,7 @@ def execute(self, obj): except: FreeCAD.Console.PrintError("Something unexpected happened. Unable to generate a contour path. Check project and tool config.") - shapes = baseobject.Proxy.getHoles(baseobject, transform=False) + shapes = baseobject.Proxy.getHoles(baseobject, transform=True) for shape in shapes: for wire in shape.Wires: drillable = PathUtils.isDrillable(baseobject.Proxy, wire)