This commit is contained in:
Adrian Mariano 2021-03-09 06:39:28 -05:00
parent 26eb60f2e4
commit 539d612b3c

View file

@ -1273,7 +1273,7 @@ function _path_cut_points(path, dists, closed=false, pind=0, dtotal=0, dind=0, r
let(
lastpt = len(result)==0? [] : select(result,-1)[0], // location of last cut point
dpartial = len(result)==0? 0 : norm(lastpt-select(path,pind)), // remaining length in segment
nextpoint = dists[dind] <= dpartial+dtotal // Do we have enough length left on the current segment?
nextpoint = dists[dind] < dpartial+dtotal // Do we have enough length left on the current segment?
? [lerp(lastpt,select(path,pind),(dists[dind]-dtotal)/dpartial),pind]
: _path_cut_single(path, dists[dind]-dtotal-dpartial, closed, pind)
)