chiark / gitweb /
anke-gps-bracket: move plug slop to one side of plug so it can print
[reprap-play.git] / anke-gps-bracket.scad
index a928a74cb383585d575b9ef13604c4f830e37833..13e7026c1893f439ecbff66aa8fd9e28dd9958af 100644 (file)
@@ -1,9 +1,10 @@
 // -*- 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;
@@ -44,7 +45,20 @@ module GpsPlugPlug(slop){
     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(){
@@ -54,19 +68,22 @@ module GpsBody() {
        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])
@@ -99,14 +116,14 @@ module GpsAssembled(){ ////toplevel
   GpsPlug();
 }
 
-module GpsBodyLT(){ ////toplevel
+module GpsBodyLT(){
   intersection(){
     GpsBody();
     GpsLHSMask();
   }
 }
 
-module GpsBodyRT(){ ////toplevel
+module GpsBodyRT(){
   difference(){
     GpsBody();
     GpsLHSMask(bodylhsrhsslop);
@@ -119,6 +136,4 @@ module GpsPlugT(){ ////toplevel
 
 //GpsPlugT();
 //GpsAssembled();
-//GpsLHSMask();
-//GpsBodyLT();
-//GpsBodyRT();
+//GpsBody();