summaryrefslogtreecommitdiff
path: root/example.scad
diff options
context:
space:
mode:
Diffstat (limited to 'example.scad')
-rw-r--r--example.scad39
1 files changed, 26 insertions, 13 deletions
diff --git a/example.scad b/example.scad
index 35fa12e..7a80a5d 100644
--- a/example.scad
+++ b/example.scad
@@ -1,20 +1,33 @@
-function r_from_dia(d) = d / 2;
+module test001()
+{
+ function r_from_dia(d) = d / 2;
-module rotcy(rot, r, h) {
- rot(rot) cylinder(r = r, h = h);
-}
+ module rotcy(rot, r, h) {
+ rot(rot) cylinder(r = r, h = h);
+ }
+
+ difference() {
+ 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);
+ }
-difference() {
- 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);
}
-size = 10;
-hole = 2;
+module test002()
+{
+ difference() {
+ cube(1);
+ trans([0.5, 0.5, 0.5]) cube(1);
+ }
+}
-cy_r = r_from_dia(hole);
-cy_h = r_from_dia(size * 1.5);
+test002();
contact: Jan Huwald // Impressum