fix check in path_cut for cuts at endpoints

This commit is contained in:
Adrian Mariano 2024-01-26 18:06:43 -05:00
parent 0d9d5d8e6d
commit 76e376e28b

View file

@ -798,8 +798,8 @@ function path_cut(path,cutdist,closed) =
let(closed=default(closed,false)) let(closed=default(closed,false))
assert(is_bool(closed)) assert(is_bool(closed))
assert(is_vector(cutdist)) assert(is_vector(cutdist))
assert(last(cutdist)<path_length(path,closed=closed),"Cut distances must be smaller than the path length") assert(last(cutdist)<path_length(path,closed=closed)-EPSILON,"Cut distances must be smaller than the path length")
assert(cutdist[0]>0, "Cut distances must be strictly positive") assert(cutdist[0]>EPSILON, "Cut distances must be strictly positive")
let( let(
cutlist = path_cut_points(path,cutdist,closed=closed) cutlist = path_cut_points(path,cutdist,closed=closed)
) )