// Module names are of the form poly_(). As a result, // you can associate a polygon in this OpenSCAD program with the corresponding // SVG element in the Inkscape document by looking for the XML element with // the attribute id="inkscape-path-id". // fudge value is used to ensure that subtracted solids are a tad taller // in the z dimension than the polygon being subtracted from. This helps // keep the resulting .stl file manifold. fudge = 0.1; module poly_zralok(h) { //X scale([4, 4, 1]) scale([25.4/90, -25.4/90, 1]) union() { linear_extrude(height=h) polygon([[-40.858498,-11.592409],[-36.000007,-7.186634],[-33.292523,-4.816239],[-30.650064,-2.097776],[-28.260519,1.146054],[-26.311774,5.092548],[-24.991719,9.919005],[-24.488240,15.802721],[-22.472086,13.769083],[-21.197935,11.835814],[-20.431276,9.944958],[-19.937597,8.038558],[-18.831129,3.947296],[-17.749317,1.646520],[-16.002434,-0.901629],[-9.938983,-0.709674],[-4.476799,0.401865],[0.417619,2.381753],[4.777772,5.178751],[4.896437,8.595874],[4.588235,11.746205],[3.374607,17.673601],[16.671266,12.060941],[19.631686,15.655756],[22.803045,18.842606],[26.055475,21.533858],[29.259107,23.641879],[32.284071,25.079035],[35.000500,25.757693],[37.278524,25.590219],[38.988276,24.488981],[39.977084,23.001132],[40.590364,21.299700],[40.858498,19.414019],[40.811872,17.373426],[39.895872,12.944845],[38.085432,8.248636],[35.623624,3.519485],[32.753518,-1.007929],[29.718183,-5.098920],[26.760691,-8.518809],[25.843283,-13.048453],[24.312444,-17.402831],[22.318589,-21.624919],[20.012136,-25.757693],[19.215932,-22.789169],[18.002881,-20.081175],[16.257657,-17.705789],[13.864936,-15.735089],[8.737787,-16.794256],[4.076750,-17.260681],[-0.218945,-17.176811],[-4.250067,-16.585098],[-8.117386,-15.527989],[-11.921669,-14.047935],[-19.744206,-9.988789],[-24.432088,-11.201856],[-29.088590,-12.097069],[-34.351474,-12.339046],[-40.858498,-11.592409]]); } } //X poly_zralok(5); draft = 0; eps = 0.01; infty = 100; kuzel_def = [ [ 6.5, 0 ], [ 6.5, 1.5 ], [ 3.5, 4 ], [ 2.5, 6 ], [ 1.5, 13.0 ], [ 0.5, 15.0 ], ]; module kuzel() { for (i = [0 : len(kuzel_def)-2]) { translate([0, 0, kuzel_def[i][1]]) cylinder(r1 = kuzel_def[i][0], r2 = kuzel_def[i+1][0], h = kuzel_def[i+1][1] + eps - kuzel_def[i][1]); } }; difference(){ minkowski(){ poly_zralok(eps); if (draft == 1) { kuzel($fn = 6); } else { kuzel($fn = 32); } } translate([0,0,-infty/2]) poly_zralok(infty); };