mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-08-01 14:00:30 +02:00
more error messages for star()
improve speed and flexibility of apply() fix triangulation bug add support for single point 2d solutions in polygon_line_intersection
This commit is contained in:
@@ -1563,7 +1563,9 @@ function star(n, r, ir, d, or, od, id, step, realign=false, align_tip, align_pit
|
||||
)
|
||||
assert(is_def(n), "Must specify number of points, n")
|
||||
assert(count==1, "Must specify exactly one of ir, id, step")
|
||||
assert(stepOK, str("Parameter 'step' must be between 2 and ",floor(n/2-1/2)," for ",n," point star"))
|
||||
assert(stepOK, n==4 ? "Parameter 'step' not allowed for 4 point stars"
|
||||
: n==5 || n==6 ? str("Parameter 'step' must be 2 for ",n," point stars")
|
||||
: str("Parameter 'step' must be between 2 and ",floor(n/2-1/2)," for ",n," point stars"))
|
||||
let(
|
||||
mat = !is_undef(_mat) ? _mat :
|
||||
( realign? rot(-180/n, planar=true) : affine2d_identity() ) * (
|
||||
|
Reference in New Issue
Block a user