initial commit
[ETG_Helmet] / ENCLOSURE / speaker.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_rect4558(h)
13 {
14   scale([25.4/90, -25.4/90, 1]) union()
15   {
16     difference()
17     {
18        linear_extrude(height=h)
19          polygon([[-46.014650,-37.750980],[-47.944814,-37.362974],[-49.517570,-36.303700],[-50.576171,-34.730271],[-50.963870,-32.799800],[-50.963870,32.801760],[-50.576171,34.731924],[-49.517570,36.304680],[-47.944814,37.363281],[-46.014650,37.750980],[46.012700,37.750980],[47.943169,37.363281],[49.516595,36.304680],[50.575866,34.731924],[50.963870,32.801760],[50.963870,-32.799800],[50.575866,-34.730271],[49.516595,-36.303700],[47.943169,-37.362974],[46.012700,-37.750980],[-46.014650,-37.750980]]);
20        translate([0, 0, -fudge])
21          linear_extrude(height=h+2*fudge)
22            polygon([[-12.172850,-34.776370],[12.170900,-34.776370],[15.736471,-34.597471],[19.196803,-34.072255],[22.534677,-33.217940],[25.732872,-32.051748],[28.774169,-30.590898],[31.641347,-28.852610],[34.317188,-26.854103],[36.784470,-24.612599],[39.025974,-22.145316],[41.024480,-19.469475],[42.762768,-16.602296],[44.223618,-13.560998],[45.389810,-10.362801],[46.244125,-7.024926],[46.769341,-3.564592],[46.948240,0.000980],[46.769341,3.566529],[46.244125,7.026799],[45.389810,10.364577],[44.223618,13.562647],[42.762768,16.603797],[41.024480,19.470810],[39.025974,22.146475],[36.784470,24.613575],[34.317188,26.854897],[31.641347,28.853227],[28.774169,30.591350],[25.732872,32.052053],[22.534677,33.218120],[19.196803,34.072338],[15.736471,34.597493],[12.170900,34.776370],[-12.172850,34.776370],[-15.738400,34.597493],[-19.198672,34.072338],[-22.536450,33.218120],[-25.734521,32.052053],[-28.775671,30.591350],[-31.642685,28.853227],[-34.318349,26.854897],[-36.785449,24.613575],[-39.026770,22.146475],[-41.025100,19.470810],[-42.763222,16.603797],[-44.223924,13.562647],[-45.389991,10.364577],[-46.244209,7.026799],[-46.769363,3.566529],[-46.948240,0.000980],[-46.769363,-3.564592],[-46.244209,-7.024926],[-45.389991,-10.362801],[-44.223924,-13.560998],[-42.763222,-16.602296],[-41.025100,-19.469475],[-39.026770,-22.145316],[-36.785449,-24.612599],[-34.318349,-26.854103],[-31.642685,-28.852610],[-28.775671,-30.590898],[-25.734521,-32.051748],[-22.536450,-33.217940],[-19.198672,-34.072255],[-15.738400,-34.597471],[-12.172850,-34.776370]]);
23     }
24   }
25 }
26
27 module speaker(h)
28 {
29
30 poly_rect4558(h);
31 }
32
33 // speaker(5);
Contact me: dev (at) shalnoff (dot) com
PGP fingerprint: A6B8 3B23 6013 F18A 0C71 198B 83D8 C64D 917A 5717