aboutsummaryrefslogtreecommitdiff
path: root/lib/dice.scad
diff options
context:
space:
mode:
Diffstat (limited to 'lib/dice.scad')
-rw-r--r--lib/dice.scad20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/dice.scad b/lib/dice.scad
index 92eccbb..fedc2ed 100644
--- a/lib/dice.scad
+++ b/lib/dice.scad
@@ -222,3 +222,23 @@ module d20(size=false, side=false) {
}
}
+module d2(size=false, side=false, h=3) {
+ l = side ? side : size;
+ if (l == false) {
+ echo("ERROR: d4: one of side or size should be defined");
+ }
+ r = l/2;
+ difference() {
+ intersection() {
+ sphere(r=r, $fn=64);
+ cylinder(r=r, h=h);
+ }
+ }
+}
+
+module coin_faces(l, h=3) {
+ union() {
+ children(0);
+ translate([0, 0, h]) children(1);
+ }
+}