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:
44 // Amount of wire protrusion to allow for
47 // Slops and steps etc.
52 // Dimensions for strength only
55 plugstrutt = min(outert, 5);
57 module GpsPlugPlug(slop){
58 effhslop = slop - plughstep;
59 effplugw = plugw + slop*2;
60 effplugh = plugh + effhslop*2;
61 translate([plug2lhs-slop, plug2bot-effhslop, -1])
62 cube([effplugw, effplugh, outert+2]);
65 module GpsBodyOuterBevel(len){
68 linear_extrude(height=len+2) {
69 polygon([[-outerbackbevel, 0],
72 [ 0, -outerbackbevel]]);
78 module GpsBody() { ////toplevel
82 cube([outerw, outerh, outert]);
83 translate([bezelw, bezelboth, screent])
84 cube([outerw-bezelw*2, outerh-bezelboth-bezeltoph, outert]);
85 translate([outerw-spkr2rhs, spkr2bot, -1])
86 cylinder(r=spkrdia/2, h=outert+2);
88 translate([plug2lhs+plugw/2, plug2bot+plugh/2, 0])
89 cylinder(r=(plugw+plugh)/2, h=outert);
90 for (x=[plug2lhs-plugstrutw, plug2lhs+plugw])
91 translate([x, 0.1, 0])
92 cube([plugstrutw, outerh-0.2, plugstrutt-0.10]);
95 for (x=[0,outerw]) translate([x,0,0]) GpsBodyOuterBevel(outerh);
96 for (y=[0,outerh]) translate([0,y,0])
97 rotate([0,0,-90]) GpsBodyOuterBevel(outerw);
102 plugwireh = plug2bot + plugwiremoreh;
103 translate([-plugslop,0,0]) GpsPlugPlug(-plugslop);
104 mirror([0,0,1]) translate([plug2lhs, plug2bot, 0]) {
105 cube([plugw, plugh, plugtotald-0.05]);
106 translate([0, -plugwireh, pluggapd])
107 cube([plugw, plugwireh+0.05, plugtotald-pluggapd]);
113 module GpsLHSMask(xslop=0){
114 translate([plug2lhs + plugw+plugh+plugstrutw,
117 for (iter=[-100/lhsteethu : 100/lhsteethu]) {
118 translate([0, iter*lhsteethu*2, 0]) {
119 linear_extrude(height=100) {
122 [lhsteethu,lhsteethu],
124 [-300, lhsteethu*2+0.1]]);
131 module GpsAssembled(){ ////toplevel
146 GpsLHSMask(bodylhsrhsslop);
150 module GpsPlugT(){ ////toplevel
151 rotate([0,-90,0]) GpsPlug();
154 module NestleCubeCutout(ca,cb,d){
158 linear_extrude(height=d){
159 polygon([[ca, -nestleh-1],
171 midd = min(nestledl,nestledr);
172 midddb = max(nestleddbl,nestleddbr);
175 based1 = midd - midddb;
177 basew1 = +nestledwl-nestlew;
179 cutd0 = based0 + nestlewallmin;
180 cutd1 = based1 - nestlewallmin;
181 cutw0 = basew0 - nestlewallmin;
182 cutw1 = basew1 + nestlewallmin;
184 translate([-(basew0+basew1)/2, -(based0+based1)/2, 0]) difference(){
186 (points=[[ +0 , +0, 0], // 0
187 [ +0 , +nestledr, 0], // 1
188 [ -midw , +midd, 0], // 2
189 [ -nestlew, +nestledl, 0], // 3
190 [ -nestlew, +0, 0], // 4
191 [-nestledwr+0 , +nestleddf +0, -nestleh], // 5
192 [-nestledwr+0 , -nestleddbr+nestledr, -nestleh], // 6
193 [ -midw , -midddb +midd, -nestleh], // 7
194 [+nestledwl-nestlew, -nestleddbl+nestledl, -nestleh], // 8
195 [+nestledwl-nestlew, +nestleddf +0, -nestleh]], // 9
196 triangles=[[0,1,6],[6,5,0],
201 [4,3,2],[2,1,0],[0,4,2],
202 [7,8,9],[5,6,7],[7,9,5]],
205 NestleCubeCutout(cutw1, cutw0, max(nestledl,nestledr));
206 rotate([0,0,90]) NestleCubeCutout(cutd0, cutd1, nestlew);