5 //tongue_w = 11.92 + 0.4;
9 usb_tongue_d = 8.97 - 0.2;
10 usb_tongue_w_slop = +0.5;
11 usb_wall_h = 4.54 - 2.04;
16 board_l = 17.56 + 0.2;
17 board_w = 19.14 + 0.2;
18 board_th = 1.92 + 0.1;
20 sw_to_edge = board_w/2 + 0.1;
25 wall_y_min = -board_l - side_wall_th; // XXXX remove
26 main_y_min = -board_l - side_wall_th;
27 ceil_y_min = wall_y_min - 5;;
30 [ [0, 0], [-sw_to_edge, -1.0] ],
31 [ [sw_to_edge-4.5, -4.5], [sw_to_edge, -5.7] ],
32 // [ [3.0, -11.72], [sw_to_edge, -13.38] ],
33 [ [-sw_to_edge+3.85, -14.90], [sw_to_edge, -13.38] ],
35 chip_cutout = [[ -sw_to_edge + 4.20, -3.75 ],
36 [ -sw_to_edge + 11.95, -11.90 ]];
40 strain_pitch_across = 5;
41 strain_pitch_along = 10;
46 bottom_floor_th = 1.5;
51 cover_ceil_th = 0.425;
55 top_top_z = usb_wall_h;
56 top_base_z = -board_th;
57 bottom_base_z = top_base_z - cable_space_z - bottom_floor_th;;
59 front_y_max = front_wall_th;
61 strain_0_y_c = main_y_min - strain_w/2;
62 strain_1_y_c = strain_0_y_c - strain_pitch_along;
63 total_y_min = strain_1_y_c - strain_w/2 - side_wall_th;
65 bottom_wall_top_z = (top_top_z + top_base_z) * 0.5 - fit_gap_z/2;
66 cover_wall_bot_z = (top_top_z + top_base_z) * 0.5 + fit_gap_z/2;
67 cover_top_z = top_top_z + cover_ceil_th;
69 top_side_wall_x = +board_w/2 + side_wall_th;
70 total_side_wall_x = top_side_wall_x + side_wall_th + side_x_gap;
79 module FrontWallsPlan(slop) {
81 rectfromto([ -board_w/2 - side_wall_th, 0 ],
82 [ -usb_w/2 - slop, front_wall_th ]);
85 module TopSmallWallsPlan() {
88 rectfromto([ -usb_w/2, -0.01 ],
89 [ -usb_w/2 + usb_wall_w, usb_tongue_d ]);
94 rectfromto(w[0], w[1]);
97 module TopCeilPlan() {
100 rectfromto([ -usb_w/2, -0.01 ],
101 [ 0.1, usb_tongue_d ]);
102 rectfromto([ -board_w/2 - side_wall_th, 0 ],
103 [ 0.1, ceil_y_min ]);
105 rectfromto(chip_cutout[0], chip_cutout[1]);
108 module TopMainWallsPlan() {
110 rectfromto([ -board_w/2 - side_wall_th, 0 ],
111 [ -board_w/2, wall_y_min ]);
113 FrontWallsPlan(usb_tongue_w_slop);
114 rectfromto([ -board_w/2 - side_wall_th + 0, - board_l ],
115 [ +board_w/2 + side_wall_th, total_y_min ]);
118 module Top(){ ////toplevel
121 linextr(0, usb_wall_h)
123 linextr(usb_wall_h - usb_ceil_th, usb_wall_h)
125 linextr(-board_th, usb_wall_h)
129 for (y_c = [strain_0_y_c, strain_1_y_c]) {
130 for (x_c = [-1,+1] * strain_pitch_across/2) {
131 translate([x_c, y_c, 0])
133 square([ strain_t, strain_w ], center=true);
136 linextr_y_xz(total_y_min-1, main_y_min)
137 translate([0, top_base_z])
138 scale([1, strain_groove_d/strain_groove_w])
139 circle(strain_groove_w/2, $fn = 8);
143 module TopElevationForCutout(){
144 rectfromto([ -(top_side_wall_x + side_x_gap), top_base_z ],
145 [ +(top_side_wall_x + side_x_gap), top_top_z ]);
147 module BottomMainElevation(){
149 rectfromto([ -total_side_wall_x, bottom_base_z ],
150 [ +total_side_wall_x, bottom_wall_top_z ]);
152 TopElevationForCutout();
153 rectfromto([ -board_w/2, bottom_base_z + bottom_floor_th ],
157 module Bottom(){ ////toplevel
158 linextr_y_xz(total_y_min, front_y_max)
159 BottomMainElevation();
162 module CoverMainElevation(){
164 rectfromto([ -total_side_wall_x, cover_wall_bot_z ],
165 [ +total_side_wall_x, cover_top_z ]);
167 TopElevationForCutout();
170 module Cover(){ ////toplevel
171 linextr_y_xz(main_y_min, front_y_max)
172 CoverMainElevation();
175 module BottomDemo(){ ////toplevel
176 translate([0, 0, -0.25]) Bottom();
178 translate([0, 0, +0.25]) Cover();