Fix bug in where wiresForPath would error on empty list

This commit is contained in:
sliptonic
2020-10-30 15:57:04 -05:00
parent fcb5f95b55
commit 4fc7a0e599

View File

@@ -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))