]> www.fi.muni.cz Git - things.git/blob - terarko-podlozka.scad
53641fac33a8ec88c0e284116f8d5f73a499a40b
[things.git] / terarko-podlozka.scad
1 infty = 300;
2 eps = 0.01;
3
4 wall = 1.0;
5
6 squares = 3;
7
8 bottom_l = 6;
9 top_l = 3;
10 top_h = 3.5;
11 string_h = 1.5;
12 square_l = 20;
13
14 module stem() {
15         hull() {
16                 cylinder(r = wall/2, h = string_h, $fn = 16);
17                 translate([square_l, 0, 0])
18                 cylinder(r = wall/2, h = string_h, $fn = 16);
19         }
20         // tip
21         for (x = [-1, 1])
22                 translate([(1-x)*square_l/2, 0, 0])
23                 scale([x, 1, 1])
24                 hull() {
25                                 cylinder(r = wall/2, h = top_h, $fn = 16);
26                         translate([top_l, 0, 0])
27                                 cylinder(r = wall/2, h = top_h, $fn = 16);
28                         translate([bottom_l, 0, 0])
29                                 cylinder(r = wall/2, h = string_h, $fn = 16);
30                 }
31 }
32
33 for (y = [-squares/2:squares/2])
34 for (x = [-squares/2:squares/2-1])
35         translate([x*square_l, y*square_l, 0])
36                 stem();
37
38 rotate([0, 0, 90])
39 for (y = [-squares/2:squares/2])
40 for (x = [-squares/2:squares/2-1])
41         translate([x*square_l, y*square_l, 0])
42                 stem();
43