Nunchuck now hangs more to accommodate case

This commit is contained in:
William Toohey
2016-03-09 15:41:28 +10:00
parent e5dcec9df8
commit 36a44beb7f
3 changed files with 55 additions and 17 deletions

2
.gitignore vendored
View File

@@ -11,3 +11,5 @@ Hardware/TataconUSB.PcbDoc.htm
*.eep
*.bin
*.elf
Firmware/Bootloader/
*.hex

View File

@@ -1,8 +1,8 @@
use <BezierScad.scad>
fudge = 0.5;
fudge = 0.4;
board_length = 37.3 + fudge;
board_length = 35.73 + fudge;
board_width = 16.3 + fudge;
board_thickness = 1.6;
board_clearance_top = 3.3 + fudge; // height of crystal
@@ -25,17 +25,23 @@ switch_offsetx = 4.85;
switch_offsety = 21.1;
crystal_bottom = 18.3 + fudge;
crystal_length = 11.4;
wall_strength = 2;
wall_strength = 1.6;
lip_strength = 0.8;
clip_height = 1.6;
clip_strength = 1.6;
cliplock_strength = 0.4;
vertiLid = true;
shapeways = false;
shapeways_clearance = 1 + clip_height;
$fn = 8;
bezRes = 2;
module board_shape(width = board_width, extend = 0) {
translate([width,0,0])
@@ -54,7 +60,32 @@ module board_shape(width = board_width, extend = 0) {
translate([board_height + board_clearance_top - bezHeight/2, crystal_bottom, 0])
BezLine([
[0,-crystal_bottom/2], [0, bezWidth/2], [bezHeight, bezWidth/2], [bezHeight,bezWidth]
], width = [bezHeight], resolution = 2, centered = true);
], width = [bezHeight], resolution = bezRes, centered = true);
}
}
module clip(strength = clip_strength, height = clip_height, gap = fudge) {
// clip hang down
difference() {
// main body
// we want a tight fit so we only do half fudge
translate([gap/2, 0, 0])
board_shape(board_width - gap);
// form the lips
// Don't offset for the fudge above or we'll hit the Nunchuck
translate([strength,0,0])
board_shape(board_width - strength*2);
// cut them short
translate([0,0,-height])
board_shape(board_width, height);
// Shorten the front for clearance
cube([board_width, fudge, board_clearance_top*2]);
// Shorten the back for clearance
translate([0,board_length - fudge,0])
cube([board_width, fudge, board_clearance_top + nunchuck_height]);
// Cut out a hole for the crystal to go
translate([board_width-clip_strength, crystal_bottom - crystal_length, board_height])
cube([clip_strength, crystal_length, nunchuck_height + wall_strength]);
}
}
@@ -65,6 +96,7 @@ module lid() {
translate([-wall_strength,0,0])
board_shape(board_width + wall_strength*2, wall_strength);
};
// USB connector overhang
usb_overhang = board_clearance_bottom+usb_relative_z+usb_height;
translate([board_width/2 - usb_width/2,
@@ -73,16 +105,11 @@ module lid() {
cube([usb_width,
wall_strength,
board_height+board_clearance_top - usb_overhang]);
// clip hang down
difference() {
// main body
board_shape();
// form the lips
translate([wall_strength,0,0])
board_shape(board_width - wall_strength*2);
// cut them short
translate([0,0,-clip_height])
board_shape(board_width, clip_height);
clip();
// cutout for a locked fit
translate([0,0,-(clip_height/2 - cliplock_strength/2)])
clip(cliplock_strength, cliplock_strength);
}
}
}
@@ -144,15 +171,24 @@ module button_hole() {
module board() {
// board shape minus the lid
translate([wall_strength, wall_strength, wall_strength])
difference() {
hollowed();
port_holes();
lid();
union() {
difference() {
hollowed();
port_holes();
lid();
};
// clip points
translate([0,0,-(clip_height/2 - cliplock_strength/2)])
clip(cliplock_strength, cliplock_strength, 0);
}
// lid with reset button hole
if(shapeways) {
translate([wall_strength,wall_strength,wall_strength+shapeways_clearance])
lid_complete();
} else if(vertiLid) {
rotate([90,0,90])
translate([wall_strength, wall_strength, -(board_height + nunchuck_height)])
lid_complete();
} else {
rotate([0,180,0])
translate([wall_strength*3, wall_strength, -(board_height + nunchuck_height + wall_strength)])

Binary file not shown.