From 4fc7a0e5995668f71e6ece4809640ed210841a9d Mon Sep 17 00:00:00 2001 From: sliptonic Date: Fri, 30 Oct 2020 15:57:04 -0500 Subject: [PATCH] Fix bug in where wiresForPath would error on empty list --- src/Mod/Path/PathScripts/PathGeom.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Mod/Path/PathScripts/PathGeom.py b/src/Mod/Path/PathScripts/PathGeom.py index 69f116f594..5c70b63701 100644 --- a/src/Mod/Path/PathScripts/PathGeom.py +++ b/src/Mod/Path/PathScripts/PathGeom.py @@ -400,8 +400,9 @@ def wiresForPath(path, startPoint = Vector(0, 0, 0)): edges.append(edgeForCmd(cmd, startPoint)) startPoint = commandEndPoint(cmd, startPoint) elif cmd.Name in CmdMoveRapid: - wires.append(Part.Wire(edges)) - edges = [] + if len(edges) > 0: + wires.append(Part.Wire(edges)) + edges = [] startPoint = commandEndPoint(cmd, startPoint) if edges: wires.append(Part.Wire(edges))