aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorElena ``of Valhalla'' Grandi <valhalla@trueelena.org>2026-07-08 20:20:38 +0200
committerElena ``of Valhalla'' Grandi <valhalla@trueelena.org>2026-07-08 20:20:38 +0200
commit4971ccafd0d6fb1da8131f60e87e71327741044b (patch)
tree34027f8409ff0d527983801e4e8c771f102f7f72 /lib
parent8d7c37afc40a9033e3406ea9fff97b7b9babaf86 (diff)
Some coins / d2
Diffstat (limited to 'lib')
-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);
+ }
+}