4 // nestlecube does not fit
5 // nestlecube doveclip at wrong angle
7 include <doveclip.scad>
9 // Dimensions of the main GPS body
15 // Dimensions for the holder
16 holder_outerw = outerw - 0.0;
17 holder_outerh = outerh + 0.0;
18 holder_outert = outert + 0.0;
20 // Dimensions for the model
21 model_outerw = outerw + 2.5;
22 model_outerh = outerh - 0.2;
23 model_outert = outert - 1.0;
25 // Dimensions of the bezel area round the edges
30 // Dimensions of the speaker at the back
35 // Dimensions of the plug and wire
43 // Dimensions of the hole in the tray
44 // width and height (vertical) at the top
47 // depths (back to front distance):
48 nestledl = 38.3 + 1.9;
49 nestledr = 42.2 + 1.7;
50 // differences in width, depth, at bottom:
60 // Adjustment for the GPS attitude and position
63 gpsrightwardoffset = 5;
64 gpsrearwardoffset = 2;
65 gpsrightwardoffsetonbar = 0;
67 // Amount of wire protrusion to allow for
70 // Slops and steps etc.
77 // Dimensions for strength only
80 plugstrutt = min(model_outert, 5);
82 holderh = model_outerh * 0.5;
90 // Consequential values
91 holderdcw = DoveClipPairSane_width(holderdccount);
93 module GpsPlugPlug(slop){
94 effhslop = slop - plughstep;
95 effplugw = plugw + slop*2;
96 effplugh = plugh + effhslop*2;
97 translate([plug2lhs-slop, plug2bot-effhslop, -1])
98 cube([effplugw, effplugh, model_outert+2]);
101 module GpsBodyOuterBevel(len){
102 translate([0,-1,0]) {
104 linear_extrude(height=len+2) {
105 polygon([[-outerbackbevel, 0],
106 [ 0, outerbackbevel],
108 [ 0, -outerbackbevel]]);
114 module GpsBody() { ////toplevel
118 cube([model_outerw, model_outerh, model_outert]);
119 translate([bezelw, bezelboth, screent])
120 cube([model_outerw-bezelw*2,
121 model_outerh-bezelboth-bezeltoph,
123 translate([model_outerw-spkr2rhs, spkr2bot, -1])
124 cylinder(r=spkrdia/2, h=model_outert+2);
126 translate([plug2lhs+plugw/2, plug2bot+plugh/2, 0])
127 cylinder(r=(plugw+plugh)/2, h=model_outert);
128 for (x=[plug2lhs-plugstrutw, plug2lhs+plugw])
129 translate([x, 0.1, 0])
130 cube([plugstrutw, model_outerh-0.2, plugstrutt-0.10]);
133 for (x=[0,model_outerw]) translate([x,0,0]) GpsBodyOuterBevel(model_outerh);
134 for (y=[0,model_outerh]) translate([0,y,0])
135 rotate([0,0,-90]) GpsBodyOuterBevel(model_outerw);
140 plugwireh = plug2bot + plugwiremoreh;
141 translate([-plugslop,0,0]) GpsPlugPlug(-plugslop);
142 mirror([0,0,1]) translate([plug2lhs, plug2bot, 0]) {
143 cube([plugw, plugh, plugtotald-0.05]);
144 translate([0, -plugwireh, pluggapd])
145 cube([plugw, plugwireh+0.05, plugtotald-pluggapd]);
151 module GpsLHSMask(xslop=0){
152 translate([plug2lhs + plugw+plugh+plugstrutw,
155 for (iter=[-100/lhsteethu : 100/lhsteethu]) {
156 translate([0, iter*lhsteethu*2, 0]) {
157 linear_extrude(height=100) {
160 [lhsteethu,lhsteethu],
162 [-300, lhsteethu*2+0.1]]);
169 module GpsAssembled(){ ////toplevel
184 GpsLHSMask(bodylhsrhsslop);
188 module GpsPlugT(){ ////toplevel
189 rotate([0,-90,0]) GpsPlug();
192 module NestleCubeCutout(ca,cb,d){
196 linear_extrude(height=d){
197 polygon([[ca, -nestleh-1],
207 module NestleCube(){ ////toplevel
209 midd = min(nestledl,nestledr);
210 midddb = max(nestleddbl,nestleddbr);
213 based1 = midd - midddb;
215 basew1 = +nestledwl-nestlew;
217 cutd0 = based0 + nestlewallmin;
218 cutd1 = based1 - nestlewallmin;
219 cutw0 = basew0 - nestlewallmin;
220 cutw1 = basew1 + nestlewallmin;
222 translate([-(basew0+basew1)/2, -(based0+based1)/2, 0]) {
225 (points=[[ +0 , +0, 0], // 0
226 [ +0 , +nestledr, 0], // 1
227 [ -midw , +midd, 0], // 2
228 [ -nestlew, +nestledl, 0], // 3
229 [ -nestlew, +0, 0], // 4
230 [-nestledwr+0 , +nestleddf +0, -nestleh], // 5
231 [-nestledwr+0 , -nestleddbr+nestledr, -nestleh], // 6
232 [ -midw , -midddb +midd, -nestleh], // 7
233 [+nestledwl-nestlew, -nestleddbl+nestledl, -nestleh], // 8
234 [+nestledwl-nestlew, +nestleddf +0, -nestleh]], // 9
235 triangles=[[0,1,6],[6,5,0],
240 [4,3,2],[2,1,0],[0,4,2],
241 [7,8,9],[5,6,7],[7,9,5]],
244 NestleCubeCutout(cutw1, cutw0, max(nestledl,nestledr));
245 rotate([0,0,90]) NestleCubeCutout(cutd0, cutd1, nestlew);
250 translate([gpsrightwardoffset,-gpsrearwardoffset,0])
251 rotate([0,0,gpsazimuth])
252 translate([nestledoveclipw/2,0,DoveClip_depth()-0.5])
254 DoveClipPairSane(count=3, h=nestledoveclipw);
257 module NestleCubePin(){ ////toplevel
258 DoveClipPin(nestledoveclipw*0.4);
261 module HolderSideL(){ ////toplevel
262 minz = -(bezelw - holderbezelmore) - holderbackt;
263 holdert = holder_outert + holderwallt*2;
264 cylr = 0.5*sqrt(holderdcw*holderdcw + holderdoveclipl*holderdoveclipl);
269 cube([holderh + holderhgap + cylr,
272 translate([holderh + holderhgap + cylr, holdert/2, 0]) {
273 cylinder(r=cylr, h=-minz);
274 rotate([0,0,gpselevation])
275 translate([0, -holderdoveclipl/2, -minz + DoveClip_depth()])
277 DoveClipPairSane(count=holderdccount, h=holderdoveclipl);
280 translate([-holderh-1,
289 module HolderSideR(){ ////toplevel
290 mirror([0,1,0]) HolderSideL();
293 module ChassisBar(){ ////toplevel
294 dist = holder_outerw - 2*((bezelw - holderbezelmore) + DoveClip_depth());
298 translate([dist/2, cliph/2, 0])
299 DoveClipPairSane(h=holderdoveclipl, count=holderdccount);
300 translate([-1, 0, 0])
301 cube([dist/2 - DoveClip_depth() + 1.1, chassish, chassist]);
304 translate([-gpsrightwardoffsetonbar, -DoveClip_depth(), 0])
306 DoveClipPairSane(h=nestledoveclipw, count=3,
307 baseextend=chassist/2);
310 module HolderSidePin(){ ////toplevel
311 DoveClipPin(holderdoveclipl*0.5);
314 module Pins(){ ///toplevel
315 for (i=[1:4*holderdccount]) {
316 translate([i*10, 0, 0]) HolderSidePin();
319 translate([i*10, 20, 0]) NestleCubePin();