Path: Sort edges before splitting at selected vertex

This commit is contained in:
Stefan Endres
2020-12-13 14:33:18 +01:00
parent 512d5c6141
commit e7085cb47e

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: