3 // Dimensions of the main GPS body
9 // Dimensions of the bezel area round the edges
14 // Dimensions of the speaker at the back
19 // Dimensions of the plug and wire
27 // Dimensions of the hole in the tray
28 // width and height (vertical) at the top
31 // depths (back to front distance):
32 nestledl = 38.8 - 0.5;
33 nestledr = 42.7 - 0.5;
34 // differences in width, depth, at bottom:
43 // Amount of wire protrusion to allow for
46 // Slops and steps etc.
51 // Dimensions for strength only
54 plugstrutt = min(outert, 5);
56 module GpsPlugPlug(slop){
57 effhslop = slop - plughstep;
58 effplugw = plugw + slop*2;
59 effplugh = plugh + effhslop*2;
60 translate([plug2lhs-slop, plug2bot-effhslop, -1])
61 cube([effplugw, effplugh, outert+2]);
64 module GpsBodyOuterBevel(len){
67 linear_extrude(height=len+2) {
68 polygon([[-outerbackbevel, 0],
71 [ 0, -outerbackbevel]]);
77 module GpsBody() { ////toplevel
81 cube([outerw, outerh, outert]);
82 translate([bezelw, bezelboth, screent])
83 cube([outerw-bezelw*2, outerh-bezelboth-bezeltoph, outert]);
84 translate([outerw-spkr2rhs, spkr2bot, -1])
85 cylinder(r=spkrdia/2, h=outert+2);
87 translate([plug2lhs+plugw/2, plug2bot+plugh/2, 0])
88 cylinder(r=(plugw+plugh)/2, h=outert);
89 for (x=[plug2lhs-plugstrutw, plug2lhs+plugw])
90 translate([x, 0.1, 0])
91 cube([plugstrutw, outerh-0.2, plugstrutt-0.10]);
94 for (x=[0,outerw]) translate([x,0,0]) GpsBodyOuterBevel(outerh);
95 for (y=[0,outerh]) translate([0,y,0])
96 rotate([0,0,-90]) GpsBodyOuterBevel(outerw);
101 plugwireh = plug2bot + plugwiremoreh;
102 translate([-plugslop,0,0]) GpsPlugPlug(-plugslop);
103 mirror([0,0,1]) translate([plug2lhs, plug2bot, 0]) {
104 cube([plugw, plugh, plugtotald-0.05]);
105 translate([0, -plugwireh, pluggapd])
106 cube([plugw, plugwireh+0.05, plugtotald-pluggapd]);
112 module GpsLHSMask(xslop=0){
113 translate([plug2lhs + plugw+plugh+plugstrutw,
116 for (iter=[-100/lhsteethu : 100/lhsteethu]) {
117 translate([0, iter*lhsteethu*2, 0]) {
118 linear_extrude(height=100) {
121 [lhsteethu,lhsteethu],
123 [-300, lhsteethu*2+0.1]]);
130 module GpsAssembled(){ ////toplevel
145 GpsLHSMask(bodylhsrhsslop);
149 module GpsPlugT(){ ////toplevel
150 rotate([0,-90,0]) GpsPlug();
155 midd = min(nestledl,nestledr);
156 midddb = max(nestleddbl,nestleddbr);
159 based1 = midd - midddb;
161 basew1 = +nestledwl-nestlew;
165 (points=[[ +0 , +0, 0], // 0
166 [ +0 , +nestledr, 0], // 1
167 [ -midw , +midd, 0], // 2
168 [ -nestlew, +nestledl, 0], // 3
169 [ -nestlew, +0, 0], // 4
170 [-nestledwr+0 , +nestleddf +0, -nestleh], // 5
171 [-nestledwr+0 , -nestleddbr+nestledr, -nestleh], // 6
172 [ -midw , -midddb +midd, -nestleh], // 7
173 [+nestledwl-nestlew, -nestleddbl+nestledl, -nestleh], // 8
174 [+nestledwl-nestlew, +nestleddf +0, -nestleh]], // 9
175 triangles=[[0,1,6],[6,5,0],
180 [4,3,2],[2,1,0],[0,4,2],
181 [7,8,9],[5,6,7],[7,9,5]],