From 4971ccafd0d6fb1da8131f60e87e71327741044b Mon Sep 17 00:00:00 2001 From: Elena ``of Valhalla'' Grandi Date: Wed, 8 Jul 2026 20:20:38 +0200 Subject: Some coins / d2 --- lib/dice.scad | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'lib/dice.scad') 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); + } +} -- cgit v1.2.3