3 include <doveclip.scad>
5 // Dimensions of the main GPS body
11 // Dimensions for the model
12 model_outerw = outerw + 2.5;
13 model_outerh = outerh - 0.2;
14 model_outert = outert - 1.0;
16 // Dimensions of the bezel area round the edges
21 // Dimensions of the speaker at the back
26 // Dimensions of the plug and wire
34 // Dimensions of the hole in the tray
35 // width and height (vertical) at the top
38 // depths (back to front distance):
39 nestledl = 38.8 - 0.5;
40 nestledr = 42.7 - 0.5;
41 // differences in width, depth, at bottom:
51 // Adjustment for the GPS attitude
53 gpsrightwardoffset = 5;
54 gpsrearwardoffset = 2;
56 // Amount of wire protrusion to allow for
59 // Slops and steps etc.
64 // Dimensions for strength only
67 plugstrutt = min(model_outert, 5);
70 module GpsPlugPlug(slop){
71 effhslop = slop - plughstep;
72 effplugw = plugw + slop*2;
73 effplugh = plugh + effhslop*2;
74 translate([plug2lhs-slop, plug2bot-effhslop, -1])
75 cube([effplugw, effplugh, model_outert+2]);
78 module GpsBodyOuterBevel(len){
81 linear_extrude(height=len+2) {
82 polygon([[-outerbackbevel, 0],
85 [ 0, -outerbackbevel]]);
91 module GpsBody() { ////toplevel
95 cube([model_outerw, model_outerh, model_outert]);
96 translate([bezelw, bezelboth, screent])
97 cube([model_outerw-bezelw*2,
98 model_outerh-bezelboth-bezeltoph,
100 translate([model_outerw-spkr2rhs, spkr2bot, -1])
101 cylinder(r=spkrdia/2, h=model_outert+2);
103 translate([plug2lhs+plugw/2, plug2bot+plugh/2, 0])
104 cylinder(r=(plugw+plugh)/2, h=model_outert);
105 for (x=[plug2lhs-plugstrutw, plug2lhs+plugw])
106 translate([x, 0.1, 0])
107 cube([plugstrutw, model_outerh-0.2, plugstrutt-0.10]);
110 for (x=[0,model_outerw]) translate([x,0,0]) GpsBodyOuterBevel(model_outerh);
111 for (y=[0,model_outerh]) translate([0,y,0])
112 rotate([0,0,-90]) GpsBodyOuterBevel(model_outerw);
117 plugwireh = plug2bot + plugwiremoreh;
118 translate([-plugslop,0,0]) GpsPlugPlug(-plugslop);
119 mirror([0,0,1]) translate([plug2lhs, plug2bot, 0]) {
120 cube([plugw, plugh, plugtotald-0.05]);
121 translate([0, -plugwireh, pluggapd])
122 cube([plugw, plugwireh+0.05, plugtotald-pluggapd]);
128 module GpsLHSMask(xslop=0){
129 translate([plug2lhs + plugw+plugh+plugstrutw,
132 for (iter=[-100/lhsteethu : 100/lhsteethu]) {
133 translate([0, iter*lhsteethu*2, 0]) {
134 linear_extrude(height=100) {
137 [lhsteethu,lhsteethu],
139 [-300, lhsteethu*2+0.1]]);
146 module GpsAssembled(){ ////toplevel
161 GpsLHSMask(bodylhsrhsslop);
165 module GpsPlugT(){ ////toplevel
166 rotate([0,-90,0]) GpsPlug();
169 module NestleCubeCutout(ca,cb,d){
173 linear_extrude(height=d){
174 polygon([[ca, -nestleh-1],
184 module NestleCube(){ ////toplevel
186 midd = min(nestledl,nestledr);
187 midddb = max(nestleddbl,nestleddbr);
190 based1 = midd - midddb;
192 basew1 = +nestledwl-nestlew;
194 cutd0 = based0 + nestlewallmin;
195 cutd1 = based1 - nestlewallmin;
196 cutw0 = basew0 - nestlewallmin;
197 cutw1 = basew1 + nestlewallmin;
199 translate([-(basew0+basew1)/2, -(based0+based1)/2, 0]) difference(){
201 (points=[[ +0 , +0, 0], // 0
202 [ +0 , +nestledr, 0], // 1
203 [ -midw , +midd, 0], // 2
204 [ -nestlew, +nestledl, 0], // 3
205 [ -nestlew, +0, 0], // 4
206 [-nestledwr+0 , +nestleddf +0, -nestleh], // 5
207 [-nestledwr+0 , -nestleddbr+nestledr, -nestleh], // 6
208 [ -midw , -midddb +midd, -nestleh], // 7
209 [+nestledwl-nestlew, -nestleddbl+nestledl, -nestleh], // 8
210 [+nestledwl-nestlew, +nestleddf +0, -nestleh]], // 9
211 triangles=[[0,1,6],[6,5,0],
216 [4,3,2],[2,1,0],[0,4,2],
217 [7,8,9],[5,6,7],[7,9,5]],
220 NestleCubeCutout(cutw1, cutw0, max(nestledl,nestledr));
221 rotate([0,0,90]) NestleCubeCutout(cutd0, cutd1, nestlew);
225 translate([gpsrightwardoffset,-gpsrearwardoffset,0])
226 rotate([0,0,gpsazimuth])
227 translate([nestledoveclipw/2,0,DoveClip_depth()-0.5])
229 DoveClipPairSane(count=3, h=nestledoveclipw);
232 module NestleCubePin(){ ////toplevel
233 DoveClipPin(nestledoveclipw*0.4);