aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--designs/fudge.scad17
-rw-r--r--lib/faces/fudge.scad20
-rw-r--r--src/fudge.scad31
-rw-r--r--src/polyhedra.scad8
4 files changed, 37 insertions, 39 deletions
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 <polyhedra.scad>;
-
-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);
- }
-}