mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-08-21 19:31:51 +02:00
Simplify two is_list calls for one is_path
This also checks the coordinates are all finite numbers, but that still matches the mentioned assertion.
This commit is contained in:
@@ -413,7 +413,7 @@ function skin(profiles, slices, refine=1, method="direct", sampling, caps, close
|
|||||||
assert(is_def(slices),"\nThe slices argument must be specified.")
|
assert(is_def(slices),"\nThe slices argument must be specified.")
|
||||||
assert(is_list(profiles) && len(profiles)>1, "\nMust provide at least two profiles.")
|
assert(is_list(profiles) && len(profiles)>1, "\nMust provide at least two profiles.")
|
||||||
// If the user forgets the first element should be a list, the other messages aren't as precisely helpful
|
// If the user forgets the first element should be a list, the other messages aren't as precisely helpful
|
||||||
assert(is_list(profiles)&&is_list(profiles[0])&&is_list(profiles[0][0]), "\nThe first argument to `skin` must be a list of paths")
|
assert(is_list(profiles)&&is_path(profiles[0]), "\nThe first argument to `skin` must be a list of paths")
|
||||||
let(
|
let(
|
||||||
profiles = [for(p=profiles) if (is_region(p) && len(p)==1) p[0] else p]
|
profiles = [for(p=profiles) if (is_region(p) && len(p)==1) p[0] else p]
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user