]> www.fi.muni.cz Git - things.git/blob - pou.scad
rocket: alternative rod holder
[things.git] / pou.scad
1 draft = 0;
2 eps = 0.01;
3 infty = 100;
4
5 kuzel_def = [
6         [ 6.5, 0 ],
7         [ 6.5, 1.5 ],
8         [ 3.5, 4 ],
9         [ 2.5, 6 ],
10         [ 1.5, 13.0 ],
11         [ 0.5, 15.0 ],
12 ];
13
14 module kuzel() {
15         for (i = [0 : len(kuzel_def)-2]) {
16                 translate([0, 0, kuzel_def[i][1]])
17                         cylinder(r1 = kuzel_def[i][0],
18                                 r2 = kuzel_def[i+1][0],
19                                 h = kuzel_def[i+1][1] + eps - kuzel_def[i][1]);
20         }
21 };
22
23 module shape(h)
24 {
25   scale([-25.4/90, -25.4/90, 1])
26   linear_extrude(height=h)
27       polygon([[-62.981743,-13.968809],[-57.485636,-23.153091],[-51.612757,-32.124381],[-45.246060,-40.734784],[-38.268503,-48.836399],[-33.629542,-53.619417],[-28.708248,-58.157765],[-23.418495,-62.197553],[-17.674153,-65.484889],[-12.540471,-67.582703],[-7.155991,-69.105790],[-1.644374,-69.917857],[3.870717,-69.882609],[9.430029,-68.862425],[14.814034,-66.973368],[19.954181,-64.418601],[24.781917,-61.401289],[28.674216,-58.504563],[32.345386,-55.335875],[39.143446,-48.362449],[45.414306,-40.840691],[51.396177,-33.130279],[55.827669,-27.073308],[59.958752,-20.800003],[63.769000,-14.330855],[67.237987,-7.686359],[70.603722,-0.624420],[73.686963,6.583926],[76.238824,13.960475],[78.010417,21.527021],[78.609701,25.924640],[78.847637,30.382195],[78.587753,34.809875],[77.693577,39.117871],[76.212437,43.037814],[74.193874,46.757392],[71.707308,50.191087],[68.822157,53.253381],[64.108711,56.974161],[58.877157,60.030614],[53.311096,62.525552],[47.594127,64.561791],[43.029787,65.860834],[38.394008,66.880616],[28.966096,68.257604],[19.426319,69.043175],[9.890607,69.587751],[1.494177,69.910265],[-6.914763,69.917857],[-15.317178,69.603334],[-23.694033,68.959501],[-35.407504,67.590359],[-41.184739,66.483379],[-46.823083,64.875911],[-52.528632,62.783886],[-58.116498,60.316526],[-63.364667,57.301756],[-68.051123,53.567501],[-71.462263,49.827608],[-74.368544,45.627780],[-76.650805,41.078630],[-78.189885,36.290771],[-78.847637,31.145452],[-78.638779,25.908332],[-77.809428,20.679412],[-76.605703,15.558691],[-74.091015,7.843741],[-70.808619,0.385392],[-67.018775,-6.868183],[-62.981743,-13.968809]]);
28 };
29
30 difference(){
31         minkowski(){
32                 shape(eps);
33                 if (draft == 1) {
34                         kuzel($fn = 6);
35                 } else {
36                         kuzel($fn = 32);
37                 }
38         }
39         translate([0,0,-infty/2]) shape(infty);
40 };