From: Scott Worley Date: Sat, 7 Oct 2023 15:33:13 +0000 (-0700) Subject: housing: Adjust board fit X-Git-Tag: v0.1.0~67 X-Git-Url: http://git.scottworley.com/tattlekey/commitdiff_plain/38453ccc892d675b75bb7d9c9d48151c2affea0b?ds=sidebyside;hp=859fd2d98f0e858d7f769d1edf2441349526e34c housing: Adjust board fit --- diff --git a/housing/tattlekey.scad b/housing/tattlekey.scad index c6b0e73..4567a3d 100644 --- a/housing/tattlekey.scad +++ b/housing/tattlekey.scad @@ -4,11 +4,14 @@ key_interface_size = 18; key_interface_corner_r = 5; key_interface_thickness = 1.484; -housing_inner_h = 8; // Chosen to let board fit inside +// Chosen to let board fit inside +housing_inner_h = 8; housing_inner_w = 21; thickness = 1.7; +board_gap = 0.125; + wiring_l = 12; extra_flare = wiring_l; @@ -27,12 +30,17 @@ module pico_hole(d, x, y) { cylinder(h=slop, d = d); } +module pico_board(gap = 0) { + board_h = 1.0; + translate([-gap, -gap, -gap]) + cube([pico_board_l + 2*gap, pico_board_w + 2*gap, board_h + 2*gap]); +} + module pico_w(hole_d = 2.1) { // Dimensions from measuring and/or // https://datasheets.raspberrypi.com/picow/pico-w-datasheet.pdf board_l = pico_board_l; board_w = pico_board_w; - board_h = 1.0; hole_x1 = 2.0; hole_x2 = board_l - 2.0; @@ -41,7 +49,7 @@ module pico_w(hole_d = 2.1) { difference() { color("green") - cube([board_l, board_w, board_h]); + pico_board(); pico_hole(hole_d, hole_x1, hole_y); pico_hole(hole_d, hole_x2, hole_y); @@ -144,6 +152,11 @@ module flare() { } } +module at_board() { + translate([0, -pico_board_w/2, -1]) + children(); +} + module tattlekey_case() { key_interface(); @@ -152,9 +165,16 @@ module tattlekey_case() { housing(); flare(); } - translate([0, -pico_board_w/2, -1]) - pico_w(); + at_board() + pico_board(board_gap); } } +module preview() { + at_board() pico_w(); + render() tattlekey_case(); +} + +//preview(); + tattlekey_case();