summaryrefslogtreecommitdiff
path: root/example.scad
diff options
context:
space:
mode:
Diffstat (limited to 'example.scad')
-rw-r--r--example.scad20
1 files changed, 16 insertions, 4 deletions
diff --git a/example.scad b/example.scad
index 1a5445f..35fa12e 100644
--- a/example.scad
+++ b/example.scad
@@ -1,8 +1,20 @@
+function r_from_dia(d) = d / 2;
+
+module rotcy(rot, r, h) {
+ rot(rot) cylinder(r = r, h = h);
+}
+
difference() {
- sphere(r = 10);
- cylinder(r = 5, h = 15);
- rot([90 0 0]) cylinder(r = 5, h = 15);
- rot([0 90 0]) cylinder(r = 5, h = 15);
+ sphere(r = r_from_dia(size));
+ rotcy([ 0 0 0], cy_r, cy_h);
+ rotcy([90 0 0], cy_r, cy_h);
+ rotcy([ 0 90 0], cy_r, cy_h);
}
+size = 10;
+hole = 2;
+
+cy_r = r_from_dia(hole);
+cy_h = r_from_dia(size * 1.5);
+
contact: Jan Huwald // Impressum