Skip to content

Commit

Permalink
Merge pull request #4136 from gauna85/PathEngrave
Browse files Browse the repository at this point in the history
[Path] Sort edges before splitting at selected vertex
  • Loading branch information
sliptonic committed Dec 14, 2020
2 parents b6a83cb + 864ea59 commit 3a07613
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Mod/Path/PathScripts/PathEngraveBase.py
Expand Up @@ -30,6 +30,7 @@
# lazily loaded modules
from lazy_loader.lazy_loader import LazyLoader
DraftGeomUtils = LazyLoader('DraftGeomUtils', globals(), 'DraftGeomUtils')
Part = LazyLoader('Part', globals(), 'Part')

from PySide import QtCore

Expand Down Expand Up @@ -69,9 +70,11 @@ def buildpathocc(self, obj, wires, zValues, relZ=False, forward=True, start_idx=

# 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:
Expand Down

0 comments on commit 3a07613

Please sign in to comment.