From 1bfb049f9cdd10e81d7c4b360ad49a6706c715e7 Mon Sep 17 00:00:00 2001 From: Elena of Valhalla'' Grandi Date: Sun, 22 Jun 2014 14:57:53 +0200 Subject: Fudge die: migrated to new layout / lib --- designs/fudge.scad | 17 +++++++++++++++++ lib/faces/fudge.scad | 20 ++++++++++++++++++++ src/fudge.scad | 31 ------------------------------- src/polyhedra.scad | 8 -------- 4 files changed, 37 insertions(+), 39 deletions(-) create mode 100644 designs/fudge.scad create mode 100644 lib/faces/fudge.scad delete mode 100644 src/fudge.scad delete mode 100644 src/polyhedra.scad diff --git a/designs/fudge.scad b/designs/fudge.scad new file mode 100644 index 0000000..d10e05f --- /dev/null +++ b/designs/fudge.scad @@ -0,0 +1,17 @@ +use <../lib/dice.scad> +use <../lib/utils.scad> +use <../lib/faces/fudge.scad> +use <../lib/faces/empty.scad> + +size = 16; + +side = s2s_d6(size); + +rotate([180, 0, 0]) d6(size) { + empty(side); + fudge_plus(side); + fudge_minus(side); + fudge_plus(side); + fudge_minus(side); + empty(side); +} diff --git a/lib/faces/fudge.scad b/lib/faces/fudge.scad new file mode 100644 index 0000000..c0b2ea2 --- /dev/null +++ b/lib/faces/fudge.scad @@ -0,0 +1,20 @@ + +module fudge_plus(l) { + union() { + hull() { + translate([-l*0.3,0,0]) sphere(l/10); + translate([l*0.3,0,0]) sphere(l/10); + } + hull() { + translate([0,-l*0.3,0]) sphere(l/10); + translate([0,l*0.3,0]) sphere(l/10); + } + } +} + +module fudge_minus(l) { + hull() { + translate([0,-l*0.3,0]) sphere(l/10); + translate([0,l*0.3,0]) sphere(l/10); + } +} diff --git a/src/fudge.scad b/src/fudge.scad deleted file mode 100644 index 52e0798..0000000 --- a/src/fudge.scad +++ /dev/null @@ -1,31 +0,0 @@ -use ; - -len=16; - -module plus(len) { - union() { - hull() { - translate([-len*0.3,0,0]) sphere(len/10); - translate([len*0.3,0,0]) sphere(len/10); - } - hull() { - translate([0,-len*0.3,0]) sphere(len/10); - translate([0,len*0.3,0]) sphere(len/10); - } - } -} - -module minus(len) { - hull() { - translate([0,-len*0.3,0]) sphere(len/10); - translate([0,len*0.3,0]) sphere(len/10); - } -} - -difference() { - d6(len); - translate([0,len/2,0]) rotate([90,0,0]) plus(len); - translate([0,-len/2,0]) rotate([90,0,0]) plus(len); - translate([len/2,0,0]) rotate([0,90,0]) minus(len); - translate([-len/2,0,0]) rotate([0,90,0]) minus(len); -} diff --git a/src/polyhedra.scad b/src/polyhedra.scad deleted file mode 100644 index 0cee714..0000000 --- a/src/polyhedra.scad +++ /dev/null @@ -1,8 +0,0 @@ - - -module d6(len) { - intersection() { - cube(len, center=true); - sphere(len*0.79); - } -} -- cgit v1.2.3