From 29e842d4e08aad00358711e4cc5fe1516c92fdaf Mon Sep 17 00:00:00 2001 From: Eric Trombly Date: Fri, 10 Jul 2020 16:22:08 -0500 Subject: [PATCH] fix attributeError if edge can't be flipped --- src/Mod/Path/PathScripts/PathPocketShapeGui.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Mod/Path/PathScripts/PathPocketShapeGui.py b/src/Mod/Path/PathScripts/PathPocketShapeGui.py index 739808cad5..17beb048ab 100644 --- a/src/Mod/Path/PathScripts/PathPocketShapeGui.py +++ b/src/Mod/Path/PathScripts/PathPocketShapeGui.py @@ -261,7 +261,11 @@ class TaskPanelExtensionPage(PathOpGui.TaskPanelPage): if extendCorners: def edgesMatchShape(e0, e1): - return PathGeom.edgesMatch(e0, e1) or PathGeom.edgesMatch(e0, PathGeom.flipEdge(e1)) + flipped = PathGeom.flipEdge(e1) + if flipped: + return PathGeom.edgesMatch(e0, e1) or PathGeom.edgesMatch(e0, flipped) + else: + return PathGeom.edgesMatch(e0, e1) self.extensionEdges = extensionEdges # pylint: disable=attribute-defined-outside-init for edgeList in Part.sortEdges(list(extensionEdges.keys())):