rewrote check_and_fix_path. Old version was broken/undef errors

added regions_equal (but probably not best version)
removed debug echo from roundinglscad
assert on invalid arc() radius inpu
new "fast_distance" method for skin()
tweaked skin() docs
support regions for path_sweep
This commit is contained in:
Adrian Mariano
2021-03-12 18:40:24 -05:00
parent 6f9ea55bc8
commit f90e89c761
4 changed files with 134 additions and 42 deletions

View File

@@ -554,7 +554,7 @@ function arc(N, r, angle, d, cp, points, width, thickness, start, wedge=false, l
)
assert(is_vector(cp,2),"Centerpoint must be a 2d vector")
assert(angle!=0, "Arc has zero length")
assert(r>0, "Arc radius invalid")
assert(is_def(r) && r>0, "Arc radius invalid")
let(
N = max(3, is_undef(N)? ceil(segs(r)*abs(angle)/360) : N),
arcpoints = [for(i=[0:N-1]) let(theta = start + i*angle/(N-1)) r*[cos(theta),sin(theta)]+cp],