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

Add rounded N-gon

parent 1bc154b3
No related branches found
No related tags found
No related merge requests found
......@@ -37,3 +37,19 @@ module roundRect(w, h, r) {
square([w, h], center=true);
}
}
/**
*
* TODO: Proper documentation!
*
* `d` the diameter; measured corner-to-corner for even corner numbers
* `n` number of corners
* `r` corner radius
*/
module roundNGon(d, n, r) {
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