mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2025-01-01 09:49:45 +00:00
fix path_chamfer_and_rounding to accept 1-regions and check that input
is a path
This commit is contained in:
parent
1d5c34eeb6
commit
5fb0335fa3
1 changed files with 5 additions and 1 deletions
|
@ -727,7 +727,11 @@ function path_torsion(path, closed=false) =
|
||||||
// stroke(path2, closed=true);
|
// stroke(path2, closed=true);
|
||||||
function path_chamfer_and_rounding(path, closed=true, chamfer, rounding) =
|
function path_chamfer_and_rounding(path, closed=true, chamfer, rounding) =
|
||||||
let (
|
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),
|
lp = len(path),
|
||||||
chamfer = is_undef(chamfer)? repeat(0,lp) :
|
chamfer = is_undef(chamfer)? repeat(0,lp) :
|
||||||
is_vector(chamfer)? list_pad(chamfer,lp,0) :
|
is_vector(chamfer)? list_pad(chamfer,lp,0) :
|
||||||
|
|
Loading…
Reference in a new issue