4 include <commitid.scad>
24 interlock_fine = 0.66;
26 interlock_fine_slope = 1.0;
27 interlock_fine_lenslop = 1.0;
33 machine_rear_to_front = 84 + 0.25 - 1.4;
35 cutout_l_end_y_front_slop = 0.5;
36 cutout_l_end_y_rear_slop = 0.5;
39 cutout_l_end_y = machine_rear_to_front;
40 cutout_l_end_new_x_slop = 1.4 - 1.95;
41 cutout_l_end_y_total = cutout_l_end_y
42 + cutout_l_end_y_front_slop + cutout_l_end_y_rear_slop;
44 tile02_tr = [-250, 0];
47 cutout_tile01_y = 170 - 147 + cutout_l_end_y_front_slop;
48 cutout_tile11_y = cutout_l_end_y_total - cutout_tile01_y;
50 // front and rear curves
52 rearedge_len = 170 + 0.70;
55 rearcurve_strt_len = 52;
57 rearcurve_z_slop = -0.50;
59 rearcurve_avoid_y = 35;
61 rearcurve_double_inrad = 26.10 + 8.04;
67 frontcurve_side_skew = 3.5 / 72;
68 frontcurve_avoid_y = 70;
69 frontcurve_z_slop = 0.75;
71 frontcurve_strt_len = 50;
72 frontcurve_dualcurve_angle = 30;
74 teststrapslots_at = [ [ 110, 70 ], [ 110, -35 ],
76 [ 190, -80 ], // do not change index of this one
77 [ 0, 70 ], [ 0, -35 ],
81 teststrap_peg = [7.5, 3.5];
88 ply_edge_hole_dist = ply_edge_min + ply_hole_dia/2;
90 echo(str("HOLES IN PLY ctr dist from PLY edge = ", ply_edge_hole_dist));
92 hole_slop = (ply_hole_dia - post_dia)/2;
93 tile_hard_edge_hole_dist = ply_edge_hole_dist + hole_slop;
95 echo(str("HOLES IN PLY ctr dist from TILE HARD edge = ",
96 tile_hard_edge_hole_dist));
98 echo(str("HOLES IN PLY ctr dist from TILE ROUND edge = ",
99 tile_hard_edge_hole_dist + round_edge_rad));
101 thehd = [ tile_hard_edge_hole_dist, tile_hard_edge_hole_dist ];
103 thehd_tl = [ -thehd_tr[0], thehd_tr[1] ];
104 thehd_bl = -thehd_tr;
105 thehd_br = -thehd_tl;
107 tablet_z_slop = 0.25;
109 interlock_rad = interlock_dia/2;
110 interlock_negative_rad = interlock_rad + 0.125;
112 interlock_sq_adj = 0.2; // arbitrary
114 m4_define(`POST_TCROSSSZ',
115 `2*( tile_hard_edge_hole_dist - test_edge + 1 )')
120 cylinder(r= post_dia/2, h= tile_th + ply_th - post_shorter);
121 translate([0,0, tile_th]) {
122 cylinder(r= screw_big_dia/2, h= screw_big_len);
123 cylinder(r= screw_dia/2, h= ply_th, $fn=20);
127 translate([0,0, tile_th/2]) {
128 cube([post_dia, POST_TCROSSSZ, tile_th], center=true);
129 cube([POST_TCROSSSZ, post_dia, tile_th], center=true);
138 module Posts(posts) {
140 translate(concat(p, [0]))
144 module PostHoles(posts) {
146 translate(concat(p, [0]))
151 module TileBase(botleft, topright){
152 size = topright - botleft;
153 botleft_post = botleft + thehd_tr;
154 topright_post = topright + thehd_bl;
157 translate(concat(botleft, [0]))
158 cube(concat(size, [tile_th]));
159 if (!(TEST || JIG)) {
160 cidsz = topright_post-botleft_post
161 + [-post_dia,-post_dia]
163 cidszr = [ min(cidsz[0],50), min(cidsz[1],50) ];
164 echo("CID",cidsz,cidszr);
165 translate( concat(botleft_post, [ -tile_th ])
166 + 0.5 * [ post_dia, post_dia, 0 ]
167 + 0.5 * concat( cidsz - cidszr, [ 0 ]) )
168 Commitid_BestCount_M(cidszr);
171 crossoff = tile_hard_edge_hole_dist + POST_TCROSSSZ/2;
172 cidsz = [ thehd[0], size[1] - 2*crossoff ];
173 cidszr = [ cidsz[0], min(cidsz[1], 50) ];
174 translate( concat(botleft + [0, crossoff] + (cidsz-cidszr)/2, [0]) )
175 Commitid_BestCount(cidszr);
178 translate(concat(botleft + [test_edge,test_edge], [test_tile_th]))
179 cube(concat(size - [test_edge,test_edge]*2, [tile_th]));
180 translate(concat(botleft_post, [-1]))
181 cube(concat(topright_post-botleft_post, [tile_th+2]));
183 shufflesz = max(test_edge, tile_hard_edge_hole_dist)*2;
186 cube(shufflesz, center=true);
194 m4_dnl c is from Rectangle_corners and
195 m4_dnl ix is a corner number
196 m4_dnl expands to two comma-separated corners:
197 m4_dnl that denoted by ix, and the next one anticlockwise
198 m4_define(`R_EDGE',`$1[$2], $1[(($2)+1)%4]')
201 m4_dnl c is from Rectangle_corners and
202 m4_dnl ix is a corner number
203 m4_dnl expands to an array of corners as for RoundCorner
204 m4_define(`R_CNR',`[ $1[$2], $1[(($2)+1)%4], $1[(($2)+3)%4] ]')
206 m4_dnl INREFFRAME(left_cnr, right_cnr, morevars) { body; }
207 m4_define(`INREFFRAME',`
208 length_vec = ($2) - ($1);
209 length = dist2d([0,0], length_vec);
210 length_uvec = length_vec / length;
211 ortho_uvec = [ -length_uvec[1], length_uvec[0] ];
212 m = [ [ length_uvec[0], ortho_uvec[0], 0, ($1)[0], ],
213 [ length_uvec[1], ortho_uvec[1], 0, ($1)[1], ],
220 m4_dnl INREFFRAME(left_cnr, right_cnr, morevars)
221 m4_dnl INREFFRAME_EDGE { body; }
222 m4_define(`INREFFRAME_EDGE',`
223 translate([0,0, -round_edge_rad])
226 module RoundEdge(left_cnr, right_cnr) {
227 INREFFRAME(left_cnr, right_cnr)
231 cylinder(r= round_edge_rad, h= length, $fn=50);
232 translate([-1, 0, -20])
233 cube([length+2, 20, 20]);
238 m4_define(`ROUNDCORNER_VARS',`
242 bigr= round_cnr_rad - round_edge_rad;
243 l_uvec = unitvector2d(left_cnr - this_cnr);
244 r_uvec = unitvector2d(right_cnr - this_cnr);
245 lp1 = left_cnr + clockwise2d(l_uvec) * bigr;
246 lp2 = this_cnr + clockwise2d(l_uvec) * bigr;
247 lp3 = this_cnr - clockwise2d(r_uvec) * bigr;
248 lp4 = right_cnr - clockwise2d(r_uvec) * bigr;
249 ctr = line_intersection_2d(lp1,lp2,lp3,lp4);
250 ctr3 = concat(ctr,[0])
253 module RoundCorner_selector(ci, adj) {
257 INREFFRAME(ctr3,concat(lp1,[4])){
258 translate([0,0,-bigr]) linear_extrude(height=bigr*2) {
259 translate([-bigr*2 + adj, -bigr])
260 square([bigr*2, bigr*3]);
265 INREFFRAME(ctr3,concat(lp4,[0])){
266 translate([0,0,-bigr]) linear_extrude(height=bigr*2) {
267 translate([-bigr*2, -bigr*2])
268 square([bigr*2 + adj, bigr*3]);
275 module RoundCornerCut(ci) {
276 // ci should be [this_cnr, right_cnr, left_cnr]
277 // where right_cnr is to the right (ie, anticlockwise)
280 RoundCorner_selector(ci, -0.1);
282 cylinder(center=true, h=20, r= bigr);
286 module RoundCornerAdd(ci) {
289 RoundCorner_selector(ci, +0.1);
292 rotate_extrude(convexity=10, $fn=50)
295 circle(r= round_edge_rad, $fn=50);
304 module InterlockLobePlan(negative) {
305 r = negative ? interlock_negative_rad : interlock_rad;
306 ymir = negative ? 0 : 1;
310 translate([thehd[0], 0]){
314 translate([-dx, -0.1])
315 square([ dx*2, r/2 + 0.1 ]);
317 translate([ xi*dx, r ])
325 module InterlockEdgePlan(negative, nlobes, length, dosquare=true) {
326 for (lobei = [ 0 : nlobes-1 ]) {
327 lobex = (length - thehd[0]*2) * (lobei ? lobei / (nlobes-1) : 0);
328 translate([lobex, 0, 0]) {
329 InterlockLobePlan(negative);
335 slotshorter = negative ? -0.1 : interlock_fine_lenslop;
336 mirror([0, negative])
337 translate([slotshorter, iadj])
338 square([length - slotshorter*2, interlock_fine + iadj*2]);
342 module InterlockEdge(left_cnr, right_cnr, negative=0, nlobes=2) {
343 plusth = negative * 1.0;
344 protr = interlock_fine + interlock_sq_adj;
347 z1 = -tile_th/2 - protr / interlock_fine_slope;
348 z3 = -tile_th/2 + protr / interlock_fine_slope;
350 negsign = negative ? -1 : +1;
351 yprotr = negsign * protr;
353 INREFFRAME(left_cnr, right_cnr) {
354 for (vsect = [ // zs0 zs1 ys0, ys1
355 [ -tile_th-plusth, plusth, 0, 0],
356 [ z1, z2, 0, yprotr],
357 [ z2, z3, yprotr, 0],
367 [ 0,1, -sl, -ys0 + negsign*interlock_sq_adj ],
371 linear_extrude(height=zsd, convexity=10)
372 InterlockEdgePlan(negative, nlobes, length, !!ysd);
377 function TestPiece_holes2corners(holes) =
378 [ holes[0] + thehd_bl,
381 holes[0] + thehd_tl ];
383 module TestPiece1(){ ////toplevel
387 corners = TestPiece_holes2corners(holes);
388 rcs = R_CNR(corners,0);
391 TileBase(corners[0], corners[2]);
393 RoundEdge(corners[0], corners[1]);
394 RoundEdge(corners[3], corners[0]);
396 InterlockEdge(corners[1], corners[2], 1, nlobes=1);
403 module TestPiece2(){ ////toplevel
407 corners = TestPiece_holes2corners(holes);
410 TileBase(corners[0], corners[2]);
412 RoundEdge(corners[0], corners[1]);
413 InterlockEdge(corners[3], corners[0], 0, nlobes=1);
419 module TestDemo(){ ////toplevel
420 translate([ -thehd[0], 0 ])
423 translate([ +thehd[0] + demo_slop, 0 ])
427 module Machine_NewRearProfile(){
428 // figures copied out of xfig edit boxes
429 // best not to edit the posbox size if poss - just move it
430 posbox = 10 * ([7.2333,-14.1267] - [-16.2289,40.0289]); // box, Green
431 sideline = -10 * ([-6.2400,13.5600] - [-2.4467,28.2556]); // line, Blue
432 scaleline = 10 * dist2d([-1.1911,-20.4800], [-11.2600,4.0578]); // Green2
433 scaleline_mm = 12+5+10+5+3;
434 sh = -[abs(posbox[0]), abs(posbox[1])];
435 rot = atan2(-sideline[0], sideline[1]);
436 sc = scaleline_mm / scaleline;
437 //echo("SH",sh,rot,sc);
438 scale(sc) rotate(rot) translate(sh){
439 import("sewing-table-rear-profile.dxf", convexity=10); // spline, Pink3
443 module Machine_NewFrontProfile(){
444 // figures copied out of xfig edit boxes
445 // best not to edit the posbox size if poss - just move it
446 posbox = 10 * ([11.8022,8.0600] - [4.2044,19.1867]); // box, Green
447 refline = 10 * ([7.6778,16.7222] - [27.8689,17.6578]); // line, Blue
448 refline_mm = (11-1)*10;
449 sh = -[abs(posbox[0]), abs(posbox[1])];
450 rot = atan2(-refline[0], refline[1]);
451 sc = refline_mm / vectorlen2d(refline);
452 //echo("SH",sh,rot,sc);
453 mirror([1,0]) scale(sc) rotate(rot+90) translate(sh){
454 import("sewing-table-front-profile.dxf", convexity=10); // spline, Pink3
458 module Machine_NewEndProfile(){
459 // figures copied out of xfig edit boxes
460 // NB that y coords are reversed - xfig origin is at bottom left
461 posboxs = 10 * [[4.0400,17.7956], [11.6622,32.5511]]; // box, Pink3
462 refline = 10 * ([8.4000,22.6000] - [50.3000,22.2000]); // line, Blue
463 refline_mm = 10 * (11 - 2.5);
464 sidelines = 10 * [[[9.0889,20.6178], [8.9644,14.6889]],
465 [[50.3800,21.9578], [50.1933,14.4933]]]; // lines, Blue3
466 baseline = 10 * [[8.4000,18.0822], [50.3000,17.6822]]; // line, Green2
470 posbox = [min(posboxs[0][0],posboxs[1][0]),
471 max(posboxs[0][1],posboxs[1][1])];
473 m4_define(`MNEP_ELP',
474 `line_intersection_2d(baseline[0],baseline[1],
475 sidelines[$1][0],sidelines[$1][1])')
476 endline = [MNEP_ELP(0),MNEP_ELP(1)];
478 rot = atan2(-refline[1], -refline[0]);
479 sc = refline_mm / vectorlen2d(refline);
480 sh = (0.5 * (endline[0] + endline[1])) - posbox;
482 ellen = sc * dist2d(endline[0],endline[1]);
483 scy = cutout_l_end_y_total / ellen;
485 scale([scy,1]) scale(sc) rotate(rot + rot_adj) translate(-[sh[0],-sh[1]]){
488 //%translate(1 * (posboxs[0] - posbox)) square(50);
489 //%translate(1 * (posboxs[1] - posbox)) square(50);
490 // %translate(1 * (baseline[0] - posbox)) square([50,10]);
492 // %translate(1 * (endline[0] - posbox)) square([50,10]);
493 // %translate(1 * (endline[1] - posbox)) square([50,10]);
495 // %translate(1 * (sidelines[0][0] - posbox)) square([10,50]);
496 // %translate(1 * (sidelines[0][1] - posbox)) square([10,50]);
497 // %translate(1 * (sidelines[1][0] - posbox)) square([10,50]);
498 // %translate(1 * (sidelines[1][1] - posbox)) square([10,50]);
501 import("sewing-table-end-profile.dxf", convexity=10); // spline, Pink3
505 module Machine_NewEndProfileDemo(){ ////toplevel
506 translate([0,5,0]) Machine_NewEndProfile();
507 translate([0,5,1]) color("blue") mirror([1,0]) Machine_NewEndProfile();
509 translate([0,5, 0]) Machine_NewEndProfile();
510 translate([0,5,-1]) color("blue") mirror([1,0]) Machine_NewEndProfile();
514 module Machine_NewArm(){
515 translate([0,0,-30]) linear_extrude(height=60) {
516 translate(tile01_tr + [ -cutout_l_end_x - cutout_l_end_new_x_slop,
517 (-cutout_tile01_y + cutout_tile11_y)/2 ]){
521 translate([0,d]) Machine_NewEndProfile();
528 module Machine_NewRearCurve(){
529 slant = atan2(4,210-10);
531 translate([0,0, rearcurve_double_inrad]) rotate([slant,0,0]){
532 translate([ rearcurve_double_inrad,
534 -rearcurve_double_inrad + 10 ]){
535 rotate([180,0,0]) rotate([0,0,90]) linear_extrude(height=30){
537 Machine_NewRearProfile();
538 translate([0,-100]) Machine_NewRearProfile();
542 rotate([0,90,0]) rotate([90,0,0]) {
544 rotate_extrude(convexity=10, $fn=64)
546 translate([ 0, -rearcurve_double_inrad ])
547 Machine_NewRearProfile();
548 translate([0,0,-500])
549 cube([500,500,1000]);
552 translate([1,0,-rearcurve_double_inrad])
553 rotate([0,-90,0]) rotate([0,0,-90])
554 linear_extrude(height= rearcurve_strt_len + 1)
555 Machine_NewRearProfile();
559 module Machine_Curves(){ ////toplevel
560 translate([ tile01_tr[0] - cutout_l_end_x + rearedge_len,
564 translate([ -reartablet_x,
566 -reartablet_z + tablet_z_slop])
568 cube([ reartablet_x+1,
572 translate([ tile01_tr[0] - cutout_l_end_x + frontedge_len,
574 frontcurve_z_slop ]){
575 translate([0, -machine_rear_to_front, 0])
576 multmatrix([[1, -frontcurve_side_skew, 0, 0],
580 mirror([1,0,0]) rotate([0,-90,0])rotate([0,0,-90])
581 linear_extrude(height= 200)
582 Machine_NewFrontProfile();
584 translate([ tile01_tr[0] - cutout_l_end_x + rearedge_len,
586 frontcurve_z_slop ]){
587 translate([ rearcurve_strt_len,
590 Machine_NewRearCurve();
595 module TestStrapSlots(){
596 pegwidth = teststrap_peg[0];
597 for (pos = teststrapslots_at) {
599 translate(concat(pos,[0]))
600 for (mx = [0,1]) mirror([mx,0,0]) {
601 translate([ pegwidth/2, -teststrap[1]/2, -20 ])
602 cube(concat(teststrap,[40]));
607 module TestStrapPeg_any(l){ cube(concat([l],teststrap_peg)); }
609 module TestStrapPeg_Short(){ ////toplevel
610 TestStrapPeg_any(35);
613 module TestStrapPeg_Long(){ ////toplevel
614 TestStrapPeg_any(60);
617 module Machine(){ ////toplevel
624 module MachineEnvelope(){
626 p_arm_bl = [-cutout_l_end_x, -cutout_tile01_y];
627 y_arm_t = cutout_tile11_y;
628 p_crv_fl = p_arm_bl + [frontedge_len, -frontcurve_avoid_y];
629 y_crv_b = y_arm_t + rearcurve_avoid_y;
631 translate([0,0,-50]) linear_extrude(height= 100){
632 translate(p_arm_bl) square([400, y_arm_t] - p_arm_bl);
633 translate(p_crv_fl) square([400, y_crv_b] - p_crv_fl);
637 function Rectangle_corners(c0, sz) =
638 // returns the corners of a rectangle from c0 to c0+sz
639 // if sz is positive, the corners are anticlockwise starting with c0
642 c0 + [ sz[0], sz[1] ],
645 function Rectangle_corners2posts(c) =
651 module Rectangle_TileBase(c) { TileBase(c[0], c[2]); }
653 function Posts_interpolate_one(c0,c1) = [c0, (c0+c1)/2, c1];
655 module Tile02(){ ////toplevel
657 c0 = tile02_tr + -sz;
658 c = Rectangle_corners(c0, sz);
659 posts = Rectangle_corners2posts(c);
663 Rectangle_TileBase(c);
665 RoundEdge(R_EDGE(c,0));
666 RoundEdge(R_EDGE(c,3));
667 InterlockEdge(R_EDGE(c,2), 0);
669 InterlockEdge(R_EDGE(c,1), 1);
676 module Tile12(){ ////toplevel
678 c0 = tile02_tr + [-sz[0], 0];
679 c = Rectangle_corners(c0, sz);
680 posts = Rectangle_corners2posts(c);
684 Rectangle_TileBase(c);
686 RoundEdge(R_EDGE(c,2));
687 RoundEdge(R_EDGE(c,3));
689 InterlockEdge(R_EDGE(c,0), 1);
690 InterlockEdge(R_EDGE(c,1), 1);
697 tile_01_11_cnr = tile01_tr + [-cutout_l_end_x, 0];
698 tile_11_10_cnr = tile01_tr + [0, cutout_tile11_y];
699 tile_01_00_cnr = tile01_tr - [0, cutout_tile01_y];
701 module Tile11(){ ////toplevel
703 c0 = tile01_tr + [-sz[0],0];
704 c = Rectangle_corners(c0, sz);
705 cnr_posts = Rectangle_corners2posts(c);
707 Posts_interpolate_one(cnr_posts[0],
708 cnr_posts[1] - [cutout_l_end_x, 0]),
709 [ cnr_posts[1] + [0, cutout_tile11_y],
715 Rectangle_TileBase(c);
717 RoundEdge(R_EDGE(c,2));
718 InterlockEdge(R_EDGE(c,3));
720 InterlockEdge(c[0], tile_01_11_cnr, 1);
721 InterlockEdge(tile_11_10_cnr, c[2], 1);
727 module Tile01(){ ////toplevel
729 c0 = tile01_tr + -sz;
730 c = Rectangle_corners(c0, sz);
731 cnr_posts = Rectangle_corners2posts(c);
733 Posts_interpolate_one(R_EDGE(cnr_posts,0)),
734 [ cnr_posts[2] + [0, -cutout_tile01_y] ],
735 Posts_interpolate_one(cnr_posts[2] - [cutout_l_end_x, 0],
740 Rectangle_TileBase(c);
742 RoundEdge(R_EDGE(c,0));
743 InterlockEdge(tile_01_11_cnr, c[3]);
744 InterlockEdge(R_EDGE(c,3));
747 InterlockEdge(c[1], tile_01_00_cnr, 1);
752 module Tile10(){ ////toplevel
754 c0 = tile01_tr + [0,0];
755 c = Rectangle_corners(c0, sz);
756 cnr_posts = Rectangle_corners2posts(c);
757 cty = cutout_tile11_y;
758 rcy = cty + rearcurve_avoid_y;
759 posts = [ cnr_posts[0] + [ 0, cty ],
760 cnr_posts[1] + [ -sz[0] + rearedge_len - cutout_l_end_x, cty ],
761 cnr_posts[1] + [ 0, rcy ],
767 Rectangle_TileBase(c);
769 RoundEdge(R_EDGE(c,1));
770 RoundEdge(R_EDGE(c,2));
771 InterlockEdge(c[3], tile_11_10_cnr);
780 module Tile00(){ ////toplevel
782 c0 = tile01_tr + [0,-sz[1]];
783 c = Rectangle_corners(c0, sz);
785 // the edge c[1]..c[2] needs a diagonal chunk, from c1bis to c2bis
786 c2bis = [ -cutout_l_end_x + frontedge_len + frontcurve_strt_len, c[2][1] ];
789 (c[2][0] - c2bis[0]) * tan(90 - frontcurve_dualcurve_angle) ];
791 cnr_posts = Rectangle_corners2posts(c);
792 cty = cutout_tile01_y;
793 rcy = cty + frontcurve_avoid_y;
794 posts = [ cnr_posts[0],
796 cnr_posts[2] + [ 0, -rcy ],
797 cnr_posts[2] + [ -sz[0] + frontedge_len - cutout_l_end_x, -cty ],
798 cnr_posts[3] + [ 0, -cty ]
801 rc2 = [c1bis,c2bis,c[1]];
806 Rectangle_TileBase(c);
808 RoundEdge(R_EDGE(c,0));
809 RoundEdge(c[1], c1bis);
810 InterlockEdge(tile_01_00_cnr, c[0]);
813 translate([0,0,-20]) linear_extrude(height=40) {
814 polygon([ c1bis, c1bis + [50,0], c2bis + [50,0], c2bis ]);
817 RoundEdge(c1bis, c2bis);
827 module FitTest_general(c0,sz, dobrace=false, bracexx=0){
828 c = Rectangle_corners(c0, sz);
830 bsz = sz + [bracexx,0,0];
833 Rectangle_TileBase(c);
835 translate(concat(c0, [-brace[2] + 0.1])){
837 cube(concat(bsz, [brace[2]]) - [5,0,0]);
838 translate(brace + [0,0, -25])
839 cube(concat(bsz, [50]) - brace*2 + [10,0,0]);
843 RoundEdge(R_EDGE(c,1));
849 module FitTest_PairLink(cut=false){ ////toplevel
850 cy0=-55; cy1=85; cx=132;
853 footrad_min = 1; footrad_max = 4; footrad_depth = 5;
859 straphole_x_max = legrad/sqrt(2) + footrad_max;
860 dz = cut ? adj_neg_slop : 0;
862 translate([cx - bar[0]/2, cy0, dz + bar_z_slop])
863 cube([bar[0], cy1-cy0, bar[1] - bar_z_slop]);
865 for (endy=[cy0,cy1]) {
867 translate([cx,endy,dz]){
869 for (rot=[45:90:315]) rotate(rot) {
870 translate([legrad,0,0]){
872 cylinder(r= footrad_max, h=1);
873 translate([0,0,-footrad_depth])
874 cylinder(r= footrad_min, h=1);
878 cylinder(r= footrad_min +
879 adj_neg_slop * (footrad_max-footrad_min)/footrad_depth,
884 for (rot=[45,135]) rotate(rot) {
887 translate([s*legrad,0,0])
888 cylinder(r= footrad_max, h=bar[1]);
894 for (rot=[0,180]) rotate(rot) {
895 translate([ straphole_x_max - strap[0]/2, 0,0 ])
896 cube(concat(strap,[20]), center=true);
903 module FitTest_RearCurve(){ ////toplevel
905 FitTest_general([100,0], [180,100]);
906 FitTest_PairLink(true);
911 module FitTest_FrontCurve(){ ////toplevel
917 translate([0,0,-8]) linear_extrude(height=18) {
918 translate(p0) square(sz);
919 translate(teststrapslots_at[3])
920 scale(2* [ teststrap_peg[0], teststrap[1] ])
924 FitTest_PairLink(true);
929 module FitTest_Entire(){ ////toplevel
932 szfront = [243,szrear[1]];
934 FitTest_general(p0, szrear, dobrace=true, bracexx=0);
935 FitTest_PairLink(true);
936 translate(concat(p0,[0]) + [szfront[0],-10,-40])
937 cube([100, -p0[1], 80]);
942 translate(concat(p0,[-20])) cube(concat(szrear,[40]));
944 FitTest_FrontCurve();
947 module FitTest_EntireDemo(){ ////toplevel
952 module FitTest_EndEnd(){ ////toplevel
957 FitTest_general(p0, sz);
958 translate([ p0[0] -1, p0[1]+sz2[1], -10])
959 cube([ sz2[0] +1, 50, 20 ]);
963 module FitTest_PairDemo(){ ////toplevel
967 %FitTest_FrontCurve();
968 %FitTest_RearCurve();
974 FitTest_FrontCurve();
977 #FitTest_PairLink(true);
983 module RoundCornerDemo_plat(cnr){
984 mirror([0,0,1]) linear_extrude(height=1) polygon(cnr);
987 module RoundCornerDemo(){ ////toplevel
988 cnr = [ [-2,-3], [13,-3], [-12,9] ];
989 translate([0,25,0]) RoundCornerDemo_plat(cnr);
990 translate([25,0,0]) RoundCornerAdd(cnr);
991 translate([-25,0,0]) RoundCornerCut(cnr);
992 translate([0,-25,0]) RoundCorner_selector(cnr, 0);
994 RoundCornerDemo_plat(cnr);
1000 module Demo(){ ////toplevel
1001 translate(demo_slop*[-2,1]) color("blue") Tile12();
1002 translate(demo_slop*[-2,0]) color("red") Tile02();
1003 translate(demo_slop*[-2,1]) color("orange") Tile11();
1004 translate(demo_slop*[-2,0]) color("purple") Tile01();
1005 translate(demo_slop*[-3,1]) color("blue") Tile10();
1006 translate(demo_slop*[-3,0]) color("red") Tile00();
1014 //Machine_NewRearProfile();
1015 //Machine_NewRearCurve();
1016 //Machine_NewFrontProfile();
1017 //Machine_NewEndProfile();
1018 //Machine_NewEndProfileDemo();
1022 //MachineEnvelope();