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;
14 side_wall_th = 1.5; // XXXX rename wall_th
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 ceil_y_min = wall_y_min - 5;;
29 [ [0, 0], [-sw_to_edge, -1.0] ],
30 [ [sw_to_edge-4.5, -4.5], [sw_to_edge, -5.7] ],
31 // [ [3.0, -11.72], [sw_to_edge, -13.38] ],
32 [ [-sw_to_edge+3.85, -14.90], [sw_to_edge, -13.38] ],
34 chip_cutout = [[ -sw_to_edge + 4.20, -3.75 ],
35 [ -sw_to_edge + 11.95, -11.90 ]];
39 strain_pitch_across = 5;
40 strain_pitch_along = 10;
44 cover_strap_c_d_y = 5.5; // from front of board
45 cover_registration_sz_y = 2;
46 cover_registration_sz_z = 3;
50 bottom_floor_th = 1.5;
58 cover_strap_sz_x = side_wall_th * 3.5;
63 strap_cutout_z = side_wall_th;
65 top_top_z = usb_wall_h;
66 top_base_z = -board_th;
67 bottom_base_z = top_base_z - cable_space_z - bottom_floor_th;;
69 front_y_max = front_wall_th;
70 main_y_min = -board_l - side_wall_th;
72 strain_0_y_c = main_y_min - strain_w/2;
73 strain_1_y_c = strain_0_y_c - strain_pitch_along;
74 total_y_min = strain_1_y_c - strain_w/2 - side_wall_th;
76 bottom_wall_top_z = (top_top_z + top_base_z) * 0.5 - fit_gap_z/2;
77 cover_wall_bot_z = (top_top_z + top_base_z) * 0.5 + fit_gap_z/2;
78 cover_top_z = top_top_z + cover_ceil_th;
80 top_side_wall_x = +board_w/2 + side_wall_th;
81 total_side_wall_x = top_side_wall_x + side_wall_th + side_x_gap;
83 cover_registration_c_dy = -cover_strap_c_d_y - strap_w/2
84 - side_wall_th - cover_registration_sz_y/2;
93 module StrapCutouts(y_c, z_top, top_sz_x){
94 for (z = [ bottom_base_z, z_top ]) {
96 translate([ -total_side_wall_x, y_c, z_top ]) {
106 module CoverStrapCutouts(){
107 StrapCutouts( -cover_strap_c_d_y, cover_top_z, cover_strap_sz_x );
110 module FrontWallsPlan(slop) {
112 rectfromto([ -board_w/2 - side_wall_th, 0 ],
113 [ -usb_w/2 - slop, front_wall_th ]);
116 module TopSmallWallsPlan() {
119 rectfromto([ -usb_w/2, -0.01 ],
120 [ -usb_w/2 + usb_wall_w, usb_tongue_d ]);
124 for (w=small_walls) {
125 rectfromto(w[0], w[1]);
128 module TopCeilPlan() {
131 rectfromto([ -usb_w/2, -0.01 ],
132 [ 0.1, usb_tongue_d ]);
133 rectfromto([ -board_w/2 - side_wall_th, 0 ],
134 [ 0.1, ceil_y_min ]);
136 rectfromto(chip_cutout[0], chip_cutout[1]);
139 module TopMainWallsPlan() {
141 rectfromto([ -board_w/2 - side_wall_th, 0 ],
142 [ -board_w/2, wall_y_min ]);
144 FrontWallsPlan(usb_tongue_w_slop);
145 rectfromto([ -board_w/2 - side_wall_th + 0, - board_l ],
146 [ +board_w/2 + side_wall_th, total_y_min ]);
149 module CoverRegistrations(){
150 linextr_y_xz(cover_registration_c_dy - strap_w/2,
151 cover_registration_c_dy + strap_w/2) {
153 rectfromto([ -total_side_wall_x,
154 cover_wall_bot_z - cover_registration_sz_z ],
155 [ +total_side_wall_x, cover_top_z ]);
157 TopElevationForCutout();
158 translate([0, -20]) TopElevationForCutout();
164 module Top(){ ////toplevel
167 linextr(0, usb_wall_h)
169 linextr(usb_wall_h - usb_ceil_th, usb_wall_h)
171 linextr(-board_th, usb_wall_h)
174 linextr(cover_wall_bot_z, top_top_z)
175 rectfromto([ -(board_w/2 + 0.1), total_y_min ],
176 [ -total_side_wall_x, main_y_min - fit_gap_y ]);
179 for (y_c = [strain_0_y_c, strain_1_y_c]) {
180 for (x_c = [-1,+1] * strain_pitch_across/2) {
181 translate([x_c, y_c, 0])
183 square([ strain_t, strain_w ], center=true);
186 linextr_y_xz(total_y_min-1, main_y_min)
187 translate([0, top_base_z])
188 scale([1, strain_groove_d/strain_groove_w])
189 circle(strain_groove_w/2, $fn = 8);
193 module TopElevationForCutout(){
194 rectfromto([ -(top_side_wall_x + side_x_gap), top_base_z ],
195 [ +(top_side_wall_x + side_x_gap), top_top_z ]);
197 module BottomMainElevation(){
199 rectfromto([ -total_side_wall_x, bottom_base_z ],
200 [ +total_side_wall_x, bottom_wall_top_z ]);
202 TopElevationForCutout();
205 module Bottom(){ ////toplevel
208 linextr_y_xz(total_y_min, front_y_max)
209 BottomMainElevation();
212 linextr_y_xz(total_y_min + side_wall_th,
213 front_y_max - side_wall_th)
214 rectfromto([ -board_w/2, bottom_base_z + bottom_floor_th ],
217 linextr_y_xz(total_y_min - 1,
218 total_y_min + side_wall_th + 1){
219 translate([ 0, top_base_z ]){
221 translate([ 0, -cable_dia/2 ])
222 circle(r = cable_dia/2, $fa = 10, $fs = 1);
223 square([ cable_dia, 0.1 ], center=true);
228 CoverRegistrations();
229 cube([ 1, fit_gap_y*2, fit_gap_z*2 ], center=true);
234 module CoverMainElevation(){
236 rectfromto([ -total_side_wall_x, cover_wall_bot_z ],
237 [ +total_side_wall_x, cover_top_z ]);
239 TopElevationForCutout();
242 module Cover(){ ////toplevel
245 linextr_y_xz(main_y_min, front_y_max)
246 CoverMainElevation();
247 CoverRegistrations();
253 module BottomDemo(){ ////toplevel
254 translate([0, 0, -0.25]) Bottom();
256 translate([0, 0, +0.25]) Cover();