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 // Amount of wire protrusion to allow for
30 // Slops and steps etc.
35 // Dimensions for strength only
38 plugstrutt = min(outert, 5);
40 module GpsPlugPlug(slop){
41 effhslop = slop - plughstep;
42 effplugw = plugw + slop*2;
43 effplugh = plugh + effhslop*2;
44 translate([plug2lhs-slop, plug2bot-effhslop, -1])
45 cube([effplugw, effplugh, outert+2]);
48 module GpsBodyOuterBevel(len){
51 linear_extrude(height=len+2) {
52 polygon([[-outerbackbevel, 0],
55 [ 0, -outerbackbevel]]);
61 module GpsBody() { ////toplevel
65 cube([outerw, outerh, outert]);
66 translate([bezelw, bezelboth, screent])
67 cube([outerw-bezelw*2, outerh-bezelboth-bezeltoph, outert]);
68 translate([outerw-spkr2rhs, spkr2bot, -1])
69 cylinder(r=spkrdia/2, h=outert+2);
71 translate([plug2lhs+plugw/2, plug2bot+plugh/2, 0])
72 cylinder(r=(plugw+plugh)/2, h=outert);
73 for (x=[plug2lhs-plugstrutw, plug2lhs+plugw])
74 translate([x, 0.1, 0])
75 cube([plugstrutw, outerh-0.2, plugstrutt-0.10]);
78 for (x=[0,outerw]) translate([x,0,0]) GpsBodyOuterBevel(outerh);
79 for (y=[0,outerh]) translate([0,y,0])
80 rotate([0,0,-90]) GpsBodyOuterBevel(outerw);
85 plugwireh = plug2bot + plugwiremoreh;
86 translate([-plugslop,0,0]) GpsPlugPlug(-plugslop);
87 mirror([0,0,1]) translate([plug2lhs, plug2bot, 0]) {
88 cube([plugw, plugh, plugtotald-0.05]);
89 translate([0, -plugwireh, pluggapd])
90 cube([plugw, plugwireh+0.05, plugtotald-pluggapd]);
96 module GpsLHSMask(xslop=0){
97 translate([plug2lhs + plugw+plugh+plugstrutw,
100 for (iter=[-100/lhsteethu : 100/lhsteethu]) {
101 translate([0, iter*lhsteethu*2, 0]) {
102 linear_extrude(height=100) {
105 [lhsteethu,lhsteethu],
107 [-300, lhsteethu*2+0.1]]);
114 module GpsAssembled(){ ////toplevel
129 GpsLHSMask(bodylhsrhsslop);
133 module GpsPlugT(){ ////toplevel
134 rotate([0,-90,0]) GpsPlug();