diff options
author | clifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c> | 2009-06-21 08:59:53 (GMT) |
---|---|---|
committer | clifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c> | 2009-06-21 08:59:53 (GMT) |
commit | 0e4681913485cb450493e9a35ae297d88f12b19d (patch) | |
tree | 22d3ee0037b6afe9b4b74a854e52c3a2cebd5a8b /example.scad | |
parent | 1c2472067c3843342f56b5833c284106ab349417 (diff) |
Clifford Wolf:
Parser seams to be fully functional now
git-svn-id: http://svn.clifford.at/openscad/trunk@5 b57f626f-c46c-0410-a088-ec61d464b74c
Diffstat (limited to 'example.scad')
-rw-r--r-- | example.scad | 20 |
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); + |