Skip to content
Snippets Groups Projects
Commit 984cd48c authored by fxk8y's avatar fxk8y :spider:
Browse files

Finishing roundNGon's parameter checking

parent 668241b2
No related branches found
No related tags found
No related merge requests found
assertDiameterMsg = "diameter out of range[ >= 0 ]";
/**
......@@ -48,6 +49,11 @@ module roundRect(w, h, r) {
* `r` corner radius
*/
module roundNGon(d, n, r) {
assert(d >= 0, assertDiameterMsg);
assert(r > 0 && r < d/2, "radius out of range[ 0 < r < d/2 ]");
assert(n > 2, "corner count out of range[ > 2 ]");
minkowski() {
circle(d=d - 2*r, $fn=n);
if (r > 0) circle(r=r);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment