5 nook_th = 12.41 + 0.50 - 1.50;
6 nook_w = 127.12 + 0.75 - .95;
7 nook_h = 123.44 + 21.88 + 21.05 + 0.75 - 1.90;
11 edge_ledge_inc_ang = 10; // degrees
36 tooth_inward = gap[0] * 1.0;
37 tooth_x = nook_w * 1/6;
43 $fs = $test ? 0.1 : 1;
47 tooth_height = nook_th;
53 spp1 = spp0 + case_th * [-1,0];
54 spp9 = spp0 + ledge_h * [0,-1];
55 spp8 = spp9 + nook_th * [0,-1];
56 spp7 = spp8 + case_th * [-1,-1];
58 spp11y = spp1[1] - tape_th;
59 spp4y = 0.5 * (spp0[1] + spp7[1]);
60 spp3y = spp4y + tape_inside/2; spp5y = spp4y - tape_inside/2;
61 spp2y = spp3y + tape_th; spp6y = spp5y - tape_th;
63 spp20 = spp8 + nook_cnr_rad * [1,0];
67 tppB = spp1 + [0, gap[1]];
68 tppC = tppB + lid_th * [0,1];
69 tppD = [ spp20x, tppC[1] ];
70 tppE = [ spp20x, tppB[1] ];
71 tppF = tppA + ledge_w * [1,0];
72 tppG = tppF + ledge_h * [0,-1];
73 tppH = [ tppA[0], tppG[1] ];
75 tppJx = tppA[0] + tape_th;
77 tppK = [ tppC[0], tppG[1] ];
78 spp31 = tppK - [0, gap[1]];
79 spp30 = [ spp8[0], spp31[1] ];
81 nom_cnr = 0.5 * [nook_w, nook_h, 0] - nook_cnr_rad * [1,1,0];
83 etxa = nom_cnr[0] - engage_l2;
84 etxb = etxa - engage_l1;
85 etxc = -(nom_cnr[0] - engage_l2);
87 tapa = nom_cnr[1] - engage_l2;
90 opra = nom_cnr[1] - engage_l2;
91 oprb = opra - open_recess_w;
93 tppS = tppB + [-gap[0], 0];
94 tppP = [ tppS[0] - tooth_th, tppC[1] ];
95 tppQ = tppP + tooth_height * [0,-1] + tooth_inward * [1,0];
96 tppR = [ tppS[0] + tooth_inward, tppQ[1] ];
97 tppM = (tppQ + tppR) * 0.5 + tooth_th * 0.5 * [0,1];
99 edge_ledge_rad = edge_ledge_h;
101 module RightSideMainProfile() {
102 rectfromto(spp7, spp0);
103 rectfromto(spp7, spp20);
106 module LeftSideMainProfile() {
107 rectfromto(spp7, spp30);
108 rectfromto(spp7, spp20);
111 module EdgeLedgeProfile() {
114 for (t=[[0,0], [-20,0], [0,-10]]) {
116 + [edge_ledge_w, edge_ledge_h]
117 + edge_ledge_rad * [ -sin(edge_ledge_inc_ang),
118 -cos(edge_ledge_inc_ang) ]
120 circle(edge_ledge_rad);
128 module TopTapeCutout() {
132 [ tppJx, tppH[1]-1 ],
133 [ tppJx, tppC[1]+1 ],
134 [ tppA[0], tppC[1]+1 ]]);
137 module RightTopMainProfile() {
138 l = [ tppA, tppB, tppC, tppD, tppE, tppF, tppG, tppH ];
142 module LeftTopMainProfile() {
143 l = [ tppC, tppD, tppE, tppF, tppG, tppK ];
147 module SideTapeCutout1(y0,y1) {
148 rectfromto([ spp7[0]-1, y0 ],
152 module SideTapeCutout() {
153 SideTapeCutout1(spp6y, spp5y);
154 SideTapeCutout1(spp3y, spp2y);
155 SideTapeCutout1(spp3y, spp2y);
156 SideTapeCutout1(spp11y, spp1[1] + 1); // obsolete I think
159 module ToothProfile(){
170 circle(r= tooth_th/2);
174 module Demo(){ ////toplevel
175 translate([-1,0,0]) {
176 translate([0,0,-2]) LeftSideMainProfile();
177 translate([0,0,-2]) color("yellow") LeftTopMainProfile();
178 color("red") difference(){
179 LeftSideMainProfile();
182 translate([0,0,-4]) color("brown") EdgeLedgeProfile();
183 translate(concat(spp8 + [edge_ledge_w, edge_ledge_h], [2]))
184 rotate(-edge_ledge_inc_ang) {
185 color("blue") square(3);
186 color("lightblue") mirror([1,0]) square(3);
189 translate([0,0,0]) color("purple") difference(){
190 LeftTopMainProfile();
193 translate([nook_cnr_rad*2 + 5, 0,0]) mirror([1,0,0]) {
194 color("red") RightSideMainProfile();
195 color("purple") RightTopMainProfile();
196 color("grey") translate([0,0,-2]) ToothProfile();
201 module FaceCore(z0,z1, extra_left, extra_right){
203 for (mx=[0,1]) mirror([mx,0,0]) {
204 for (my=[0,1]) mirror([0,my,0]) {
205 translate(-nom_cnr) {
206 rotate_extrude(angle=90, convexity=10)
207 translate(-[1,0,0] * nook_cnr_rad)
211 translate([nook_w/2, 0,0])
212 linextr_y_xz(-nom_cnr[1]-0.1, nom_cnr[1]+0.1)
215 for (my=[0,1]) mirror([0,my,0]) {
216 translate([-nook_w/2, 0,0])
218 linextr_y_xz(tapb, tapa)
222 for (my=[0,1]) mirror([0,my,0]) {
223 translate([0, -nook_h/2, 0]) {
224 linextr_x_yz(-nom_cnr[0]-0.1, etxc + extra_left) children(0);
225 linextr_x_yz(etxc - extra_right, etxb + extra_right) children(1);
226 linextr_x_yz(etxb - extra_left, etxa + extra_left) children(0);
227 linextr_x_yz(etxa - extra_right, nom_cnr[0]+0.1) children(1);
232 rectfromto(-nom_cnr, nom_cnr);
236 module Base(){ ////toplevel
238 FaceCore(spp7[1],spp8[1], 0.3, 0) {
239 LeftSideMainProfile();
240 RightSideMainProfile();
243 translate([0, -nook_h/2, 0])
245 linextr_x_yz(-usb_w/2, usb_w/2)
246 rectfromto(spp8 + [-40, usb_below], [40, 40]);
248 translate([nook_w/2, 0, 0])
249 linextr_y_xz(oprb, opra)
251 rectfromto([-40, -open_recess_h], [40, 1]);
256 module Top(){ ////toplevel
257 FaceCore(tppE[1],tppD[1], -gap[0], gap[0] + 0.3) {
258 LeftTopMainProfile();
259 RightTopMainProfile();
262 translate([tooth_x, nook_h/2, 0])
263 linextr_x_yz(-tooth_w/2, +tooth_w/2)
267 module TopPrint(){ ////toplevel
268 rotate([0,0,90]) rotate([180,0,0]) Top();
270 module BasePrint(){ ////toplevel
271 rotate([0,0,90]) Base();
274 module TestExtrude(){
276 linextr_y_xz(-test_pillar, tape_w+test_pillar) children(0);
277 linextr_y_xz( 0, tape_w ) children(1);
281 module BaseTestRest(){ ////toplevel
282 cube([30,15, spp8[1]-spp7[1]]);
285 module Demo3(){ ////toplevel
286 color("purple") Top();
290 module TestSide(){ ////toplevel
291 TestExtrude() { LeftSideMainProfile(); SideTapeCutout(); }
294 module TestTop(){ ////toplevel
295 TestExtrude() { LeftTopMainProfile(); TopTapeCutout(); }
297 module TestTopPrint(){ ////toplevel
298 rotate([180,0,0]) TestTop();