]> www.fi.muni.cz Git - things.git/blob - skysurfer-motor-cover.scad
switch holder.scad
[things.git] / skysurfer-motor-cover.scad
1
2 // Module names are of the form poly_<inkscape-path-id>().  As a result,
3 // you can associate a polygon in this OpenSCAD program with the corresponding
4 // SVG element in the Inkscape document by looking for the XML element with
5 // the attribute id="inkscape-path-id".
6
7 // fudge value is used to ensure that subtracted solids are a tad taller
8 // in the z dimension than the polygon being subtracted from.  This helps
9 // keep the resulting .stl file manifold.
10 fudge = 0.1;
11
12 module poly_outline()
13 {
14 translate([35.01, -17.5, 0])
15       polygon([[-34.993000,-7.750540],[-35.002600,-7.283950],[-30.390825,-6.787054],[-19.036880,-5.237750],[-5.577521,-2.848014],[4.953350,-0.739700],[12.407086,0.839569],[19.933820,2.756390],[29.405920,5.806369],[35.001720,7.750540],[35.002600,7.248370],[29.490142,5.319456],[20.070500,2.275930],[12.517434,0.353189],[5.050970,-1.227980],[-5.481264,-3.336864],[-18.958800,-5.729930],[-30.353692,-7.267481],[-34.993080,-7.750540]]);
16 }
17
18 infty = 200;
19
20 module outline_border() {
21         rotate([0, -90, 0])
22         linear_extrude(height=0.5) poly_outline();
23 }
24
25 module body() {
26         // main shape
27         rotate_extrude(angle = 210)
28         rotate([0, 0, 90])
29         poly_outline();
30
31         // inner side supports
32         for (i = [-1,1]) scale([1, i, 1])
33         for (y = [0:0.25:3.5])
34                 translate([0, y, 0])
35                 outline_border();
36 }
37
38 difference() {
39         body();
40         translate([5, -infty/2,-infty/2]) cube(infty);
41 }