initial commit
[ETG_Helmet] / ENCLOSURE / imlogo.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_path4979(h)
13 {
14   scale([25.4/90, -25.4/90, 1]) union()
15   {
16     difference()
17     {
18        linear_extrude(height=h)
19          polygon([[-23.825770,-15.344797],[-25.920100,-14.941067],[-27.759022,-13.724261],[-28.978599,-11.882280],[-29.385125,-9.788241],[-28.978599,-7.695538],[-27.759022,-5.857567],[-25.920092,-4.633949],[-23.825769,-4.226076],[-21.731443,-4.633949],[-19.892506,-5.857567],[-18.672931,-7.695538],[-18.266406,-9.788241],[-18.672931,-11.882280],[-19.892506,-13.724261],[-21.731431,-14.941067],[-23.825770,-15.344797]]);
20        translate([0, 0, -fudge])
21          linear_extrude(height=h+2*fudge)
22            polygon([[-23.825770,-11.710392],[-23.105787,-11.568942],[-22.472731,-11.143990],[-22.051491,-10.509076],[-21.911078,-9.785724],[-22.051491,-9.061035],[-22.472731,-8.422106],[-23.110636,-8.000864],[-23.833633,-7.860450],[-24.556630,-8.000864],[-25.194538,-8.422106],[-25.615778,-9.061035],[-25.756191,-9.785724],[-25.615778,-10.509076],[-25.194538,-11.143990],[-24.553614,-11.568942],[-23.825770,-11.710392]]);
23     }
24   }
25 }
26
27 module poly_path4985(h)
28 {
29   scale([25.4/90, -25.4/90, 1]) union()
30   {
31     linear_extrude(height=h)
32       polygon([[-29.385131,3.357699],[-29.385131,9.898133],[-28.927811,12.229864],[-27.680268,14.135783],[-25.829132,15.421722],[-23.561034,15.893517],[-21.292935,15.421722],[-19.441805,14.135783],[-18.194267,12.229864],[-17.736949,9.898133],[-17.736949,3.357699],[-18.194267,1.025970],[-19.441805,-0.879949],[-21.292935,-2.165889],[-23.561034,-2.637685],[-25.829132,-2.165889],[-27.680268,-0.879949],[-28.927811,1.025970]]);
33   }
34 }
35
36 module poly_path4981(h)
37 {
38   scale([25.4/90, -25.4/90, 1]) union()
39   {
40     linear_extrude(height=h)
41       polygon([[1.853195,-9.855255],[1.853195,9.874515],[2.311263,12.217128],[3.559743,14.130366],[5.410046,15.420429],[7.673582,15.893517],[9.941401,15.420429],[11.793905,14.130366],[13.043196,12.217128],[13.501382,9.874515],[13.501382,-9.855255],[13.043196,-12.197871],[11.793905,-14.111110],[9.941401,-15.401173],[7.673582,-15.874261],[5.410046,-15.401173],[3.559743,-14.111110],[2.311263,-12.197871]]);
42   }
43 }
44
45 module poly_path4558(h)
46 {
47   scale([25.4/90, -25.4/90, 1]) union()
48   {
49     difference()
50     {
51        linear_extrude(height=h)
52          polygon([[0.728210,-45.410558],[-4.446731,-45.194608],[-9.560968,-44.395604],[-14.560738,-43.020482],[-19.392283,-41.076180],[-24.001841,-38.569635],[-28.335652,-35.507785],[-32.339954,-31.897566],[-35.960988,-27.745917],[-38.611935,-23.927244],[-40.821859,-19.936895],[-42.594881,-15.806977],[-43.935120,-11.569599],[-44.846694,-7.256869],[-45.333725,-2.900895],[-45.400332,1.466214],[-45.050633,5.812351],[-44.288750,10.105406],[-43.118801,14.313271],[-41.544906,18.403839],[-39.571184,22.345001],[-37.201756,26.104648],[-34.440741,29.650673],[-31.292258,32.950966],[-27.760427,35.973420],[-23.941712,38.624295],[-19.951232,40.834040],[-15.821106,42.606792],[-11.583457,43.946685],[-7.270404,44.857853],[-2.914070,45.344433],[1.453426,45.410558],[5.799961,45.060363],[10.093416,44.297983],[14.301668,43.127554],[18.392598,41.553209],[22.334084,39.579085],[26.094005,37.209315],[29.640241,34.448034],[32.940669,31.299378],[35.963170,27.767480],[38.614057,23.948754],[40.823811,19.958264],[42.596568,15.828132],[43.936463,11.590477],[44.847632,7.277421],[45.334210,2.921085],[45.400332,-1.446411],[45.050134,-5.792945],[44.287751,-10.086398],[43.117319,-14.294647],[41.542974,-18.385573],[39.568850,-22.327054],[37.199083,-26.086970],[34.437809,-29.633200],[31.289163,-32.933623],[27.757280,-35.956118],[24.668642,-38.143648],[21.462693,-40.039362],[14.767771,-42.964272],[7.810337,-44.748715],[0.728210,-45.410558]]);
53        translate([0, 0, -fudge])
54          linear_extrude(height=h+2*fudge)
55            polygon([[0.670610,-41.837524],[7.195603,-41.227786],[13.605743,-39.583715],[19.774018,-36.888888],[25.573420,-33.126881],[28.827463,-30.342163],[31.728426,-27.301387],[34.272498,-24.034147],[36.455867,-20.570035],[38.274722,-16.938645],[39.725252,-13.169569],[40.803645,-9.292400],[41.506091,-5.336732],[41.828779,-1.332158],[41.767897,2.691730],[41.319633,6.705339],[40.480178,10.679074],[39.245719,14.583345],[37.612445,18.388556],[35.576546,22.065116],[33.134210,25.583430],[30.349486,28.837471],[27.308705,31.738431],[24.041459,34.282498],[20.577342,36.465862],[16.945947,38.284711],[13.176867,39.735235],[9.299696,40.813623],[5.344028,41.516063],[1.339454,41.838744],[-2.684431,41.777856],[-6.698034,41.329588],[-10.671763,40.490128],[-14.576023,39.255665],[-18.381221,37.622388],[-22.057765,35.586487],[-25.576060,33.144150],[-28.830040,30.359483],[-31.730829,27.318845],[-34.274632,24.051816],[-36.457653,20.587978],[-38.276098,16.956911],[-39.726170,13.188196],[-40.804075,9.311414],[-41.506017,5.356145],[-41.828201,1.351970],[-41.766832,-2.671529],[-41.318114,-6.684772],[-40.478252,-10.658179],[-39.243451,-14.562168],[-37.609915,-18.367159],[-35.573850,-22.043571],[-33.131459,-25.561824],[-29.795322,-29.386877],[-26.106122,-32.713138],[-22.113372,-35.534206],[-17.866587,-37.843676],[-13.415280,-39.635145],[-8.808966,-40.902212],[-4.097158,-41.638472],[0.670630,-41.837524]]);
56     }
57   }
58 }
59
60 module poly_path4977(h)
61 {
62   scale([25.4/90, -25.4/90, 1]) union()
63   {
64     linear_extrude(height=h)
65       polygon([[-14.030705,-9.855255],[-14.030705,9.874515],[-13.572634,12.217128],[-12.324148,14.130366],[-10.473839,15.420429],[-8.210301,15.893517],[-5.942486,15.420429],[-4.089985,14.130366],[-2.840694,12.217128],[-2.382509,9.874515],[-2.382509,-9.855255],[-2.840694,-12.197871],[-4.089985,-14.111110],[-5.942486,-15.401173],[-8.210301,-15.874261],[-10.473839,-15.401173],[-12.324148,-14.111110],[-13.572634,-12.197871]]);
66   }
67 }
68
69 module poly_path49837(h)
70 {
71   scale([25.4/90, -25.4/90, 1]) union()
72   {
73     linear_extrude(height=h)
74       polygon([[17.737094,-9.855255],[17.737094,9.874515],[18.195163,12.217128],[19.443644,14.130366],[21.293949,15.420429],[23.557490,15.893517],[25.825300,15.420429],[27.677800,14.130366],[28.927091,12.217128],[29.385277,9.874515],[29.385277,-9.855255],[28.927091,-12.197871],[27.677800,-14.111110],[25.825300,-15.401173],[23.557490,-15.874261],[21.293949,-15.401173],[19.443644,-14.111110],[18.195163,-12.197871]]);
75   }
76 }
77
78 module imlogo(h)
79 {
80
81 poly_path4979(h);
82 poly_path4985(h);
83 poly_path4981(h);
84 poly_path4558(h);
85 poly_path4977(h);
86 poly_path49837(h);
87 }
Contact me: dev (at) shalnoff (dot) com
PGP fingerprint: A6B8 3B23 6013 F18A 0C71 198B 83D8 C64D 917A 5717