improve speed in trivial path subdivision (subdivide_path)

fix bug in bezier_patch_points when u,v are singletons
add bezier_patch_normals
This commit is contained in:
Adrian Mariano
2022-04-15 16:12:53 -04:00
parent 82b4b284a9
commit 99b20da8be
2 changed files with 61 additions and 14 deletions

View File

@@ -412,6 +412,7 @@ function subdivide_path(path, n, refine, maxlen, closed=true, exact, method) =
let(path = force_path(path))
assert(is_path(path))
assert(num_defined([n,refine,maxlen]),"Must give exactly one of n, refine, and maxlen")
refine==1 || n==len(path) ? path :
is_def(maxlen) ?
assert(is_undef(method), "Cannot give method with maxlen")
assert(is_undef(exact), "Cannot give exact with maxlen")