aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorElena of Valhalla'' Grandi <valhalla@trueelena.org>2013-12-07 21:57:37 +0100
committerElena of Valhalla'' Grandi <valhalla@trueelena.org>2013-12-07 21:57:37 +0100
commit3383067cf5958242bff20bf998789106ed3f7a49 (patch)
treebd918db71b73b9c6b6bbd06b7ab6698513e0c6b5 /src
First die: fudge
Diffstat (limited to 'src')
-rw-r--r--src/fudge.scad31
-rw-r--r--src/polyhedra.scad8
2 files changed, 39 insertions, 0 deletions
diff --git a/src/fudge.scad b/src/fudge.scad
new file mode 100644
index 0000000..52e0798
--- /dev/null
+++ b/src/fudge.scad
@@ -0,0 +1,31 @@
+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
new file mode 100644
index 0000000..0cee714
--- /dev/null
+++ b/src/polyhedra.scad
@@ -0,0 +1,8 @@
+
+
+module d6(len) {
+ intersection() {
+ cube(len, center=true);
+ sphere(len*0.79);
+ }
+}