diff --git a/src/Mod/Path/PathScripts/PathEngraveBase.py b/src/Mod/Path/PathScripts/PathEngraveBase.py index 4fdbc18a6b..abaf413dc8 100644 --- a/src/Mod/Path/PathScripts/PathEngraveBase.py +++ b/src/Mod/Path/PathScripts/PathEngraveBase.py @@ -30,6 +30,7 @@ import copy # lazily loaded modules from lazy_loader.lazy_loader import LazyLoader DraftGeomUtils = LazyLoader('DraftGeomUtils', globals(), 'DraftGeomUtils') +Part = LazyLoader('Part', globals(), 'Part') from PySide import QtCore @@ -69,9 +70,11 @@ class ObjectOp(PathOp.ObjectOp): # reorder the wire if hasattr(obj, 'StartVertex'): - offset = DraftGeomUtils.rebaseWire(offset, obj.StartVertex) + start_idx = obj.StartVertex edges = copy.copy(PathOpTools.orientWire(offset, forward).Edges) + edges = Part.sortEdges(edges)[0]; + last = None for z in zValues: