mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-01-16 13:50:23 +01:00
Improved error message for skin()
This commit is contained in:
parent
a495528398
commit
5269b26703
@ -399,8 +399,10 @@ function skin(profiles, slices, refine=1, method="direct", sampling, caps, close
|
||||
assert(!closed || !caps, "Cannot make closed shape with caps")
|
||||
let(
|
||||
profile_dim=array_dim(profiles,2),
|
||||
profiles_zcheck = (profile_dim != 2) || (profile_dim==2 && is_list(z) && len(z)==len(profiles)),
|
||||
profiles_ok = (profile_dim==2 && is_list(z) && len(z)==len(profiles)) || profile_dim==3
|
||||
)
|
||||
assert(profiles_zcheck, "z parameter is invalid or has the wrong length.")
|
||||
assert(profiles_ok,"Profiles must all be 3d or must all be 2d, with matching length z parameter.")
|
||||
assert(is_undef(z) || profile_dim==2, "Do not specify z with 3d profiles")
|
||||
assert(profile_dim==3 || len(z)==len(profiles),"Length of z does not match length of profiles.")
|
||||
|
Loading…
x
Reference in New Issue
Block a user