X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=anke-gps-bracket.scad;h=4f01028ddfa507e647d1cff7e941d5461a23350d;hb=e77d7adad39deae4836be0f86d5b57be98d0b6c1;hp=5831f559af015ad5c9b06eb701293d216a3ebed1;hpb=f9af1bf66febdda31d0c3041bee4446002140a04;p=reprap-play.git diff --git a/anke-gps-bracket.scad b/anke-gps-bracket.scad index 5831f55..4f01028 100644 --- a/anke-gps-bracket.scad +++ b/anke-gps-bracket.scad @@ -1,5 +1,7 @@ // -*- C -*- +include + // Dimensions of the main GPS body outerw = 120 + 2.5; outerh = 75 - 0.2; @@ -24,6 +26,28 @@ plug2lhs = 11; 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 = 4; +nestleceilmin = 4; + +// Adjustment for the GPS attitude +gpsazimuth = 45; +gpsrightwardoffset = 5; +gpsrearwardoffset = 2; + // Amount of wire protrusion to allow for plugwiremoreh = 25; @@ -36,6 +60,7 @@ bodylhsrhsslop = 0.5; screent = 1.0; plugstrutw = 4; plugstrutt = min(outert, 5); +nestledoveclipw = 20; module GpsPlugPlug(slop){ effhslop = slop - plughstep; @@ -83,7 +108,7 @@ module GpsBody() { ////toplevel 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]) @@ -134,6 +159,75 @@ module GpsPlugT(){ ////toplevel rotate([0,-90,0]) GpsPlug(); } +module NestleCubeCutout(ca,cb,d){ + dist = cb - ca; + mirror([0,1,0]){ + rotate([90,0,0]){ + linear_extrude(height=d){ + polygon([[ca, -nestleh-1], + [ca, -dist/2], + [(ca+cb)/2, 0], + [cb, -dist/2], + [cb, -nestleh-1]]); + } + } + } +} + +module NestleCube(){ ////toplevel + midw = nestlew/2; + midd = min(nestledl,nestledr); + midddb = max(nestleddbl,nestleddbr); + + based0 = nestleddf; + based1 = midd - midddb; + basew0 = -nestledwr; + basew1 = +nestledwl-nestlew; + + cutd0 = based0 + nestlewallmin; + cutd1 = based1 - nestlewallmin; + cutw0 = basew0 - nestlewallmin; + cutw1 = basew1 + nestlewallmin; + + translate([-(basew0+basew1)/2, -(based0+based1)/2, 0]) 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); + intersection(){ + NestleCubeCutout(cutw1, cutw0, max(nestledl,nestledr)); + 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(); +//NestleCubePin();