chiark / gitweb /
anke-gps-bracket: introduce model_outer[wht]. nfc
[reprap-play.git] / anke-gps-bracket.scad
index 37c4c7152b273c00f04ccacb4d6f50b80808e342..08b5b4f2c0f3146f724feffa543dbc6b9a551896 100644 (file)
@@ -1,11 +1,18 @@
 // -*- C -*-
 
+include <doveclip.scad>
+
 // Dimensions of the main GPS body
-outerw = 120 + 2.5;
-outerh =  75 - 0.2;
-outert =  15 - 1.0;
+outerw = 120;
+outerh =  75;
+outert =  15;
 outerbackbevel = 3;
 
+// Dimensions for the model
+model_outerw = outerw + 2.5;
+model_outerh = outerh - 0.2;
+model_outert = outert - 1.0;
+
 // Dimensions of the bezel area round the edges
 bezelw =    11 - 0.5;
 bezelboth = 11 - 0.5;
@@ -41,6 +48,11 @@ nestleddbr = 3.6;
 nestlewallmin = 4;
 nestleceilmin = 4;
 
+// Adjustment for the GPS attitude
+gpsazimuth = 45;
+gpsrightwardoffset = 5;
+gpsrearwardoffset = 2;
+
 // Amount of wire protrusion to allow for
 plugwiremoreh = 25;
 
@@ -52,14 +64,15 @@ bodylhsrhsslop = 0.5;
 // Dimensions for strength only
 screent = 1.0;
 plugstrutw = 4;
-plugstrutt = min(outert, 5);
+plugstrutt = min(model_outert, 5);
+nestledoveclipw = 20;
 
 module GpsPlugPlug(slop){
   effhslop = slop - plughstep;
   effplugw = plugw + slop*2;
   effplugh = plugh + effhslop*2;
   translate([plug2lhs-slop, plug2bot-effhslop, -1])
-    cube([effplugw, effplugh, outert+2]);
+    cube([effplugw, effplugh, model_outert+2]);
 }
 
 module GpsBodyOuterBevel(len){
@@ -79,22 +92,24 @@ module GpsBody() { ////toplevel
   difference(){
     union(){
       difference(){
-       cube([outerw, outerh, outert]);
+       cube([model_outerw, model_outerh, model_outert]);
        translate([bezelw, bezelboth, screent])
-         cube([outerw-bezelw*2, outerh-bezelboth-bezeltoph, outert]);
-       translate([outerw-spkr2rhs, spkr2bot, -1])
-         cylinder(r=spkrdia/2, h=outert+2);
+         cube([model_outerw-bezelw*2,
+               model_outerh-bezelboth-bezeltoph,
+               model_outert]);
+       translate([model_outerw-spkr2rhs, spkr2bot, -1])
+         cylinder(r=spkrdia/2, h=model_outert+2);
       }
       translate([plug2lhs+plugw/2, plug2bot+plugh/2, 0])
-       cylinder(r=(plugw+plugh)/2, h=outert);
+       cylinder(r=(plugw+plugh)/2, h=model_outert);
       for (x=[plug2lhs-plugstrutw, plug2lhs+plugw])
        translate([x, 0.1, 0])
-         cube([plugstrutw, outerh-0.2, plugstrutt-0.10]);
+         cube([plugstrutw, model_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);
+    for (x=[0,model_outerw]) translate([x,0,0]) GpsBodyOuterBevel(model_outerh);
+    for (y=[0,model_outerh]) translate([0,y,0])
+      rotate([0,0,-90]) GpsBodyOuterBevel(model_outerw);
   }
 }
 
@@ -166,7 +181,7 @@ module NestleCubeCutout(ca,cb,d){
   }
 }
 
-module NestleCube(){
+module NestleCube(){ ////toplevel
   midw = nestlew/2;
   midd = min(nestledl,nestledr);
   midddb = max(nestleddbl,nestleddbr);
@@ -206,10 +221,20 @@ module NestleCube(){
       rotate([0,0,90]) NestleCubeCutout(cutd0, cutd1, nestlew);
     }
   }
+
+  translate([gpsrightwardoffset,-gpsrearwardoffset,0])
+    rotate([0,0,gpsazimuth])
+    translate([nestledoveclipw/2,0,DoveClip_depth()-0.5])
+    rotate([0,-90,0])
+    DoveClipPairSane(count=3, h=nestledoveclipw);
+}
+
+module NestleCubePin(){ ////toplevel
+  DoveClipPin(nestledoveclipw*0.4);
 }
 
 //GpsPlugT();
 //GpsAssembled();
 //GpsBody();
-
-NestleCube();
+//NestleCube();
+//NestleCubePin();