fix path_chamfer_and_rounding to accept 1-regions and check that input

is a path
This commit is contained in:
Adrian Mariano 2022-01-01 13:50:16 -05:00
parent 1d5c34eeb6
commit 5fb0335fa3

View file

@ -727,7 +727,11 @@ function path_torsion(path, closed=false) =
// stroke(path2, closed=true);
function path_chamfer_and_rounding(path, closed=true, chamfer, rounding) =
let (
path = deduplicate(path,closed=true),
p = force_path(path)
)
assert(is_path(p),"Input 'path' is not a path")
let(
path = deduplicate(p,closed=true),
lp = len(path),
chamfer = is_undef(chamfer)? repeat(0,lp) :
is_vector(chamfer)? list_pad(chamfer,lp,0) :