diff --git a/src/Mod/Path/PathScripts/PathContour.py b/src/Mod/Path/PathScripts/PathContour.py index 5fda503367..69b1a9541a 100644 --- a/src/Mod/Path/PathScripts/PathContour.py +++ b/src/Mod/Path/PathScripts/PathContour.py @@ -30,6 +30,7 @@ from PathScripts import PathUtils from PathScripts.PathUtils import depth_params from PySide import QtCore import TechDraw +import ArchPanel LOG_MODULE = 'PathContour' PathLog.setLevel(PathLog.Level.INFO, LOG_MODULE) @@ -220,14 +221,30 @@ class ObjectContour: baseobject = parentJob.Base if baseobject is None: return - contourwire = TechDraw.findShapeOutline(baseobject.Shape, 1, Vector(0, 0, 1)) - 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.") + if isinstance(baseobject.Proxy, ArchPanel.PanelSheet): # process the sheet + 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.") + else: + contourwire = TechDraw.findShapeOutline(baseobject.Shape, 1, Vector(0, 0, 1)) + + 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.") if obj.Active: path = Path.Path(output) obj.Path = path