summaryrefslogtreecommitdiff
path: root/examples/example006.scad
diff options
context:
space:
mode:
authorclifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c>2009-07-14 21:47:32 (GMT)
committerclifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c>2009-07-14 21:47:32 (GMT)
commitcc3291a4f1def85273e0e1cc6e43bb0079965946 (patch)
tree03ff099c015e6611a45e70318069026bbbff6115 /examples/example006.scad
parentf950feace3beaeec9bd5a6d6e65f7790bd80a9d8 (diff)
Clifford Wolf:
Added convexity handling Split up example.scad file to examples/* git-svn-id: http://svn.clifford.at/openscad/trunk@56 b57f626f-c46c-0410-a088-ec61d464b74c
Diffstat (limited to 'examples/example006.scad')
-rw-r--r--examples/example006.scad44
1 files changed, 44 insertions, 0 deletions
diff --git a/examples/example006.scad b/examples/example006.scad
new file mode 100644
index 0000000..26143a1
--- /dev/null
+++ b/examples/example006.scad
@@ -0,0 +1,44 @@
+
+module example006()
+{
+ module edgeprofile()
+ {
+ render(convexity = 2) difference() {
+ cube([20 20 150], center = true);
+ translate([-10 -10 0])
+ cylinder(h = 80, r = 10, center = true);
+ translate([-10 -10 +40])
+ sphere(r = 10);
+ translate([-10 -10 -40])
+ sphere(r = 10);
+ }
+ }
+
+ difference()
+ {
+ cube(100, center = true);
+ for (rot = [ [0 0 0], [1 0 0], [0 1 0] ]) {
+ rotate(90, rot)
+ for (p = [[+1 +1 0], [-1 +1 90], [-1 -1 180], [+1 -1 270]]) {
+ translate([ p[0]*50, p[1]*50, 0 ])
+ rotate(p[2], [0 0 1])
+ edgeprofile();
+ }
+ }
+ for (i = [
+ [ 0, 0, [ [0 0] ] ],
+ [ 90, 0, [ [-20 -20], [+20 +20] ] ],
+ [ 180, 0, [ [-20 -25], [-20 0], [-20 +25], [+20 -25], [+20 0], [+20 +25] ] ],
+ [ 270, 0, [ [0 0], [-25 -25], [+25 -25], [-25 +25], [+25 +25] ] ],
+ [ 0, 90, [ [-25 -25], [0 0], [+25 +25] ] ],
+ [ 0, -90, [ [-25 -25], [+25 -25], [-25 +25], [+25 +25] ] ]
+ ]) {
+ rotate(i[0], [0 0 1]) rotate(i[1], [1 0 0]) translate([0 -50 0])
+ for (j = i[2])
+ translate([j[0], 0, j[1]]) sphere(10);
+ }
+ }
+}
+
+example006();
+
contact: Jan Huwald // Impressum