Skip to content

Commit

Permalink
Path: Fix for optimizeLinearSegments
Browse files Browse the repository at this point in the history
Reduce cumulative error by holding onto the original point in a sequence
of linear optimizations. In testing, this fixes artifacts I have seen on
very finely sampled paths with very gradual curvature.

Further improvements are needed for this optimization, but at least this
change avoids a regression over the status quo.
  • Loading branch information
gwicke committed Jun 7, 2020
1 parent 9a67154 commit 7c65487
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Mod/Path/PathScripts/PathSurface.py
Expand Up @@ -2093,7 +2093,7 @@ def _optimizeLinearSegments(self, line):
for nxt in line[2:]:
if not pnt.isOnLineSegment(prv, nxt):
pts.append(pnt)
prv = pnt
prv = pnt
pnt = nxt
pts.append(line[-1])
return pts
Expand Down

0 comments on commit 7c65487

Please sign in to comment.