Merge pull request #4136 from gauna85/PathEngrave

[Path] Sort edges before splitting at selected vertex
This commit is contained in:
sliptonic
2020-12-14 12:27:54 -06:00
committed by GitHub

View File

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