// -*- C -*-
// Dimensions of the main GPS body
-outerw = 120 - 0.5;
-outerh = 75 - 0.5;
-outert = 15;
+outerw = 120 + 2.5;
+outerh = 75 - 0.2;
+outert = 15 - 1.0;
+outerbackbevel = 3;
// Dimensions of the bezel area round the edges
bezelw = 11 - 0.5;
plugtotald = 15;
pluggapd = 5;
+// Dimensions of the hole in the tray
+// width and height (vertical) at the top
+nestleh = 53;
+nestlew = 55.4 - 0.5;
+// depths (back to front distance):
+nestledl = 38.8 - 0.5;
+nestledr = 42.7 - 0.5;
+// differences in width, depth, at bottom:
+nestledwl = 3.0;
+nestledwr = 2.4;
+nestleddf = 4.0;
+nestleddbl = 3.3;
+nestleddbr = 3.6;
+
+nestlewallmin = 5;
+
// Amount of wire protrusion to allow for
plugwiremoreh = 25;
cube([effplugw, effplugh, outert+2]);
}
-module GpsBody() {
+module GpsBodyOuterBevel(len){
+ translate([0,-1,0]) {
+ rotate([-90,0,0]) {
+ linear_extrude(height=len+2) {
+ polygon([[-outerbackbevel, 0],
+ [ 0, outerbackbevel],
+ [outerbackbevel, 0],
+ [ 0, -outerbackbevel]]);
+ }
+ }
+ }
+}
+
+module GpsBody() { ////toplevel
difference(){
union(){
difference(){
translate([outerw-spkr2rhs, spkr2bot, -1])
cylinder(r=spkrdia/2, h=outert+2);
}
- translate([plug2lhs+plugw/2, plug2bot+plugh/2, 0.05])
- cylinder(r=(plugw+plugh)/2, h=outert-0.02);
+ translate([plug2lhs+plugw/2, plug2bot+plugh/2, 0])
+ cylinder(r=(plugw+plugh)/2, h=outert);
for (x=[plug2lhs-plugstrutw, plug2lhs+plugw])
- translate([x, 0.1, 0.05])
+ translate([x, 0.1, 0])
cube([plugstrutw, outerh-0.2, plugstrutt-0.10]);
}
GpsPlugPlug(0);
+ for (x=[0,outerw]) translate([x,0,0]) GpsBodyOuterBevel(outerh);
+ for (y=[0,outerh]) translate([0,y,0])
+ rotate([0,0,-90]) GpsBodyOuterBevel(outerw);
}
}
module GpsPlug() {
plugwireh = plug2bot + plugwiremoreh;
- GpsPlugPlug(-plugslop);
+ translate([-plugslop,0,0]) GpsPlugPlug(-plugslop);
mirror([0,0,1]) translate([plug2lhs, plug2bot, 0]) {
cube([plugw, plugh, plugtotald-0.05]);
translate([0, -plugwireh, pluggapd])
GpsPlug();
}
-module GpsBodyLT(){ ////toplevel
+module GpsBodyLT(){
intersection(){
GpsBody();
GpsLHSMask();
}
}
-module GpsBodyRT(){ ////toplevel
+module GpsBodyRT(){
difference(){
GpsBody();
GpsLHSMask(bodylhsrhsslop);
rotate([0,-90,0]) GpsPlug();
}
+module InsertionCube(){
+ midw = nestlew/2;
+ midd = min(nestledl,nestledr);
+ midddb = max(nestleddbl,nestleddbr);
+
+ based0 = nestleddf;
+ based1 = midd - midddb;
+ basew0 = -nestledwr;
+ basew1 = +nestledwl-nestlew;
+
+ difference(){
+ polyhedron
+ (points=[[ +0 , +0, 0], // 0
+ [ +0 , +nestledr, 0], // 1
+ [ -midw , +midd, 0], // 2
+ [ -nestlew, +nestledl, 0], // 3
+ [ -nestlew, +0, 0], // 4
+ [-nestledwr+0 , +nestleddf +0, -nestleh], // 5
+ [-nestledwr+0 , -nestleddbr+nestledr, -nestleh], // 6
+ [ -midw , -midddb +midd, -nestleh], // 7
+ [+nestledwl-nestlew, -nestleddbl+nestledl, -nestleh], // 8
+ [+nestledwl-nestlew, +nestleddf +0, -nestleh]], // 9
+ triangles=[[0,1,6],[6,5,0],
+ [1,2,7],[7,6,1],
+ [2,3,8],[8,7,2],
+ [3,4,9],[9,8,3],
+ [4,0,5],[5,9,4],
+ [4,3,2],[2,1,0],[0,4,2],
+ [7,8,9],[5,6,7],[7,9,5]],
+ convexity=3);
+ }
+}
+
//GpsPlugT();
//GpsAssembled();
-//GpsLHSMask();
-//GpsBodyLT();
-//GpsBodyRT();
+//GpsBody();
+
+InsertionCube();