3 key_interface_size = 18;
4 key_interface_corner_r = 5;
5 key_interface_thickness = 1.484;
7 // Chosen to let board fit inside
16 extra_flare = wiring_l;
28 module pico_hole(d, x, y) {
29 translate([x, y, -slop/2])
30 cylinder(h=slop, d = d);
33 module pico_board(gap = 0) {
35 translate([-gap, -gap, -gap])
36 cube([pico_board_l + 2*gap, pico_board_w + 2*gap, board_h + 2*gap]);
39 module pico_w(hole_d = 2.1) {
40 // Dimensions from measuring and/or
41 // https://datasheets.raspberrypi.com/picow/pico-w-datasheet.pdf
42 board_l = pico_board_l;
43 board_w = pico_board_w;
46 hole_x2 = board_l - 2.0;
47 hole_y_spacing = 11.4;
48 hole_y = (board_w - hole_y_spacing)/2;
54 pico_hole(hole_d, hole_x1, hole_y);
55 pico_hole(hole_d, hole_x2, hole_y);
56 pico_hole(hole_d, hole_x1, hole_y + hole_y_spacing);
57 pico_hole(hole_d, hole_x2, hole_y + hole_y_spacing);
62 total_h = pico_total_h;
67 translate([board_l - total_l, (board_w-usb_w)/2, total_h-usb_h])
68 cube([usb_l, usb_w, usb_h]);
76 translate([button_x, button_y, epsilon])
77 cube([button_l, button_w, button_h]);
84 translate([wifi_x, (board_w-wifi_w)/2, epsilon])
85 cube([wifi_l, wifi_w, wifi_h]);
89 translate([pico_board_l + wiring_l, 0, 0])
95 module key_interface_shape(thick = key_interface_thickness, outline = thickness) {
96 inner = key_interface_size - 2*key_interface_corner_r;
99 square([inner, inner], center=true);
100 circle(r=key_interface_corner_r + outline);
104 module key_interface() {
107 key_interface_shape();
109 translate([0, 0, 6 - epsilon])
110 cherry_switch_void(tolerance=0.05);
114 module housing_shape(outline = thickness) {
115 inner_squish = housing_inner_h / housing_inner_w;
116 housing_w = housing_inner_w + 2 * outline;
117 housing_h = housing_inner_h + 2 * outline;
118 squish = housing_h / housing_w;
121 circle(d = housing_w);
124 module housing(length = pico_board_l - extra_flare) {
127 linear_extrude(length)
134 module flare_shape(outline, extra_len) {
137 key_interface_shape(epsilon + extra_len, outline);
138 translate([pico_board_l-extra_flare, 0, 0])
140 translate([-extra_len, 0, 0])
143 linear_extrude(epsilon+extra_len)
144 housing_shape(outline);
150 flare_shape(thickness, 0);
151 flare_shape(0, epsilon);
156 translate([0, -pico_board_w/2, -1])
160 module tattlekey_case() {
169 pico_board(board_gap);
175 render() tattlekey_case();