3 include <doveclip.scad>
5 // Dimensions of the main GPS body
11 // Dimensions of the bezel area round the edges
16 // Dimensions of the speaker at the back
21 // Dimensions of the plug and wire
29 // Dimensions of the hole in the tray
30 // width and height (vertical) at the top
33 // depths (back to front distance):
34 nestledl = 38.8 - 0.5;
35 nestledr = 42.7 - 0.5;
36 // differences in width, depth, at bottom:
46 // Adjustment for the GPS attitude
48 gpsrightwardoffset = 5;
49 gpsrearwardoffset = 2;
51 // Amount of wire protrusion to allow for
54 // Slops and steps etc.
59 // Dimensions for strength only
62 plugstrutt = min(outert, 5);
65 module GpsPlugPlug(slop){
66 effhslop = slop - plughstep;
67 effplugw = plugw + slop*2;
68 effplugh = plugh + effhslop*2;
69 translate([plug2lhs-slop, plug2bot-effhslop, -1])
70 cube([effplugw, effplugh, outert+2]);
73 module GpsBodyOuterBevel(len){
76 linear_extrude(height=len+2) {
77 polygon([[-outerbackbevel, 0],
80 [ 0, -outerbackbevel]]);
86 module GpsBody() { ////toplevel
90 cube([outerw, outerh, outert]);
91 translate([bezelw, bezelboth, screent])
92 cube([outerw-bezelw*2, outerh-bezelboth-bezeltoph, outert]);
93 translate([outerw-spkr2rhs, spkr2bot, -1])
94 cylinder(r=spkrdia/2, h=outert+2);
96 translate([plug2lhs+plugw/2, plug2bot+plugh/2, 0])
97 cylinder(r=(plugw+plugh)/2, h=outert);
98 for (x=[plug2lhs-plugstrutw, plug2lhs+plugw])
99 translate([x, 0.1, 0])
100 cube([plugstrutw, outerh-0.2, plugstrutt-0.10]);
103 for (x=[0,outerw]) translate([x,0,0]) GpsBodyOuterBevel(outerh);
104 for (y=[0,outerh]) translate([0,y,0])
105 rotate([0,0,-90]) GpsBodyOuterBevel(outerw);
110 plugwireh = plug2bot + plugwiremoreh;
111 translate([-plugslop,0,0]) GpsPlugPlug(-plugslop);
112 mirror([0,0,1]) translate([plug2lhs, plug2bot, 0]) {
113 cube([plugw, plugh, plugtotald-0.05]);
114 translate([0, -plugwireh, pluggapd])
115 cube([plugw, plugwireh+0.05, plugtotald-pluggapd]);
121 module GpsLHSMask(xslop=0){
122 translate([plug2lhs + plugw+plugh+plugstrutw,
125 for (iter=[-100/lhsteethu : 100/lhsteethu]) {
126 translate([0, iter*lhsteethu*2, 0]) {
127 linear_extrude(height=100) {
130 [lhsteethu,lhsteethu],
132 [-300, lhsteethu*2+0.1]]);
139 module GpsAssembled(){ ////toplevel
154 GpsLHSMask(bodylhsrhsslop);
158 module GpsPlugT(){ ////toplevel
159 rotate([0,-90,0]) GpsPlug();
162 module NestleCubeCutout(ca,cb,d){
166 linear_extrude(height=d){
167 polygon([[ca, -nestleh-1],
179 midd = min(nestledl,nestledr);
180 midddb = max(nestleddbl,nestleddbr);
183 based1 = midd - midddb;
185 basew1 = +nestledwl-nestlew;
187 cutd0 = based0 + nestlewallmin;
188 cutd1 = based1 - nestlewallmin;
189 cutw0 = basew0 - nestlewallmin;
190 cutw1 = basew1 + nestlewallmin;
192 translate([-(basew0+basew1)/2, -(based0+based1)/2, 0]) difference(){
194 (points=[[ +0 , +0, 0], // 0
195 [ +0 , +nestledr, 0], // 1
196 [ -midw , +midd, 0], // 2
197 [ -nestlew, +nestledl, 0], // 3
198 [ -nestlew, +0, 0], // 4
199 [-nestledwr+0 , +nestleddf +0, -nestleh], // 5
200 [-nestledwr+0 , -nestleddbr+nestledr, -nestleh], // 6
201 [ -midw , -midddb +midd, -nestleh], // 7
202 [+nestledwl-nestlew, -nestleddbl+nestledl, -nestleh], // 8
203 [+nestledwl-nestlew, +nestleddf +0, -nestleh]], // 9
204 triangles=[[0,1,6],[6,5,0],
209 [4,3,2],[2,1,0],[0,4,2],
210 [7,8,9],[5,6,7],[7,9,5]],
213 NestleCubeCutout(cutw1, cutw0, max(nestledl,nestledr));
214 rotate([0,0,90]) NestleCubeCutout(cutd0, cutd1, nestlew);
218 translate([gpsrightwardoffset,-gpsrearwardoffset,0])
219 rotate([0,0,gpsazimuth])
220 translate([nestledoveclipw/2,0,DoveClip_depth()-0.5])
222 DoveClipPairSane(count=3, h=nestledoveclipw);