summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorclifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c>2010-01-30 07:41:55 (GMT)
committerclifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c>2010-01-30 07:41:55 (GMT)
commitfc1914a43c9aca1f236715a57cbe1526bc34aa43 (patch)
treea44f89764ed72c5710100b5ee9c6eba7e9ce580e /examples
parentb67fc38872af0d99da3558739b945109dc88bcb9 (diff)
Clifford Wolf:
Added projection() statement git-svn-id: http://svn.clifford.at/openscad/trunk@372 b57f626f-c46c-0410-a088-ec61d464b74c
Diffstat (limited to 'examples')
-rw-r--r--examples/example021.scad32
1 files changed, 32 insertions, 0 deletions
diff --git a/examples/example021.scad b/examples/example021.scad
new file mode 100644
index 0000000..f5dfb78
--- /dev/null
+++ b/examples/example021.scad
@@ -0,0 +1,32 @@
+
+module thing()
+{
+ $fa = 30;
+ difference() {
+ sphere(r = 25);
+ cylinder(h = 62.5, r1 = 12.5, r2 = 6.25, center = true);
+ rotate(90, [ 1, 0, 0 ]) cylinder(h = 62.5,
+ r1 = 12.5, r2 = 6.25, center = true);
+ rotate(90, [ 0, 1, 0 ]) cylinder(h = 62.5,
+ r1 = 12.5, r2 = 6.25, center = true);
+ }
+}
+
+module demo_proj()
+{
+ linear_extrude(center = true, height = 0.5) projection(cut = false) thing();
+ % thing();
+}
+
+module demo_cut()
+{
+ for (i=[-20:5:+20]) {
+ rotate(-30, [ 1, 1, 0 ]) translate([ 0, 0, -i ])
+ linear_extrude(center = true, height = 0.5) projection(cut = true)
+ translate([ 0, 0, i ]) rotate(+30, [ 1, 1, 0 ]) thing();
+ }
+ % thing();
+}
+
+translate([ -30, 0, 0 ]) demo_proj();
+translate([ +30, 0, 0 ]) demo_cut();
contact: Jan Huwald // Impressum