// -*- C -*-
-// todo
-// nestlecube does not fit
-// nestlecube doveclip at wrong angle
-
include <doveclip.scad>
// Dimensions of the main GPS body
// Dimensions of the hole in the tray
// width and height (vertical) at the top
nestleh = 53;
-nestlew = 55.4 - 0.5;
+nestlew = 60.9;
// depths (back to front distance):
-nestledl = 38.8 - 0.5;
-nestledr = 42.7 - 0.5;
+nestledl = 38.3 + 1.9;
+nestledr = 42.2 + 1.7;
// differences in width, depth, at bottom:
nestledwl = 3.0;
nestledwr = 2.4;
nestleddbl = 3.3;
nestleddbr = 3.6;
-nestlewallmin = 4;
-nestleceilmin = 4;
-
// Adjustment for the GPS attitude and position
gpsazimuth = 45;
gpselevation = 40;
bodylhsrhsslop = 0.5;
holderhgap = 5;
holderbezelmore = 2;
+nestlebevel = 2;
// Dimensions for strength only
screent = 1.0;
holderdoveclipl = 15;
chassish = 13;
chassist = 13;
+nestlefloorh = 2.0;
+nestleceilh = 2.0;
+nestlewallmin = 3.0;
// Consequential values
holderdcw = DoveClipPairSane_width(holderdccount);
module NestleCubeCutout(ca,cb,d){
dist = cb - ca;
+ cuth = -nestleh + nestlefloorh;
mirror([0,1,0]){
+ translate([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]]);
+ linear_extrude(height=d+2){
+ polygon([[ca+nestlebevel, cuth],
+ [ca, cuth+nestlebevel*2],
+ [ca, -dist/2-nestleceilh],
+ [(ca+cb)/2, -nestleceilh],
+ [cb, -dist/2-nestleceilh],
+ [cb, cuth+nestlebevel*2],
+ [cb-nestlebevel, cuth]]);
}
}
}
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);
+ bevth = -nestleh + nestlebevel*2;
+ bevw = nestlebevel;
+ bevd = nestlebevel;
+
+ 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, bevth], // 5
+ [-nestledwr+0 , -nestleddbr+nestledr, bevth], // 6
+ [ -midw , -midddb +midd, bevth], // 7
+ [+nestledwl-nestlew, -nestleddbl+nestledl, bevth], // 8
+ [+nestledwl-nestlew, +nestleddf +0, bevth], // 9
+ [-nestledwr+0 -bevw, +nestleddf +0 +bevd, -nestleh], // 10
+ [-nestledwr+0 -bevw, -nestleddbr+nestledr-bevd, -nestleh], // 11
+ [ -midw , -midddb +midd -bevd, -nestleh], // 12
+ [+nestledwl-nestlew+bevw, -nestleddbl+nestledl-bevd, -nestleh], // 13
+ [+nestledwl-nestlew+bevw, +nestleddf +0 +bevd, -nestleh]], // 14
+ triangles=[// main side panels
+ [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],
+ [0,1,6],[6,5,0],
+ // bevels
+ [6,7,12],[12,11,6],
+ [7,8,13],[13,12,7],
+ [8,9,14],[14,13,8],
+ [9,5,10],[10,14,9],
+ [5,6,11],[11,10,5],
+ // top and bottom
+ [4,3,2],[2,1,0],[0,4,2],
+ [12,13,14],[10,11,12],[12,14,10]],
+ 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])
+ rotate([0,0,90+gpsazimuth])
translate([nestledoveclipw/2,0,DoveClip_depth()-0.5])
rotate([0,-90,0])
DoveClipPairSane(count=3, h=nestledoveclipw);