X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=reprap-play.git;a=blobdiff_plain;f=sewing-table.scad.m4;h=012a46a54476bad82d670814fefb87ac9f16fb51;hp=a4c9fca9cab81c70ee4cc7581a828c91a106b08d;hb=032c9fe163865fd509a7e374f5f0857f65e3dc2d;hpb=c44340a4f053688cc69138a06f693309f8c4fda2 diff --git a/sewing-table.scad.m4 b/sewing-table.scad.m4 index a4c9fca..012a46a 100644 --- a/sewing-table.scad.m4 +++ b/sewing-table.scad.m4 @@ -7,6 +7,8 @@ ply_th = 18; ply_hole_dia = 15; ply_edge_min = 10; +ply_hole_dia_real = 12; + tile_th = 3; post_dia = 8; @@ -80,6 +82,8 @@ teststrapslots_at = [ [ 110, 70 ], [ 110, -35 ], teststrap = [ 3, 5 ]; teststrap_peg = [7.5, 3.5]; +ply_edge_hole_dist_real = 14; + // calculated TEST = false; @@ -104,7 +108,7 @@ thehd_tl = [ -thehd_tr[0], thehd_tr[1] ]; thehd_bl = -thehd_tr; thehd_br = -thehd_tl; -tablet_z_slop = 0.25; +tablet_z_slop = 1.00; interlock_rad = interlock_dia/2; interlock_negative_rad = interlock_rad + 0.125; @@ -116,19 +120,39 @@ m4_define(`POST_TCROSSSZ', module Post(){ mirror([0,0,1]) { - difference(){ - cylinder(r= post_dia/2, h= tile_th + ply_th - post_shorter); - translate([0,0, tile_th]) { - cylinder(r= screw_big_dia/2, h= screw_big_len); - cylinder(r= screw_dia/2, h= ply_th, $fn=20); + if (!JIG) { + difference(){ + cylinder(r= post_dia/2, h= tile_th + ply_th - post_shorter); + translate([0,0, tile_th]) { + cylinder(r= screw_big_dia/2, h= screw_big_len); + cylinder(r= screw_dia/2, h= ply_th, $fn=20); + } } } - if (TEST || JIG) { + if (TEST) { translate([0,0, tile_th/2]) { cube([post_dia, POST_TCROSSSZ, tile_th], center=true); cube([POST_TCROSSSZ, post_dia, tile_th], center=true); } } + if (JIG) { + translate([0,0, tile_th/2]) { + cube([POST_TCROSSSZ, POST_TCROSSSZ, tile_th], center=true); + } + } + } +} + +module PostHole(){ + if (JIG) { + translate([0,0,-5]) + cylinder(r= post_dia/2 + jig_post_hole_slop, h=10); + translate([0,0, -jig_min_th]) + cylinder(r= ply_hole_dia_real/2, h = 5); + for (rot=[0:90:270]) rotate(rot) { + translate([ ply_edge_hole_dist_real, 0, 0 ]) + cube([ jig_pencil_rad*2, jig_pencil_slotlen, 20 ], center=true); + } } } @@ -138,6 +162,12 @@ module Posts(posts) { Post(); } } +module PostHoles(posts) { + for (p= posts) { + translate(concat(p, [0])) + PostHole(); + } +} module TileBase(botleft, topright){ size = topright - botleft; @@ -162,12 +192,13 @@ module TileBase(botleft, topright){ crossoff = tile_hard_edge_hole_dist + POST_TCROSSSZ/2; cidsz = [ thehd[0], size[1] - 2*crossoff ]; cidszr = [ cidsz[0], min(cidsz[1], 50) ]; - translate( concat(botleft + [0, crossoff] + (cidsz-cidszr)/2, [0]) ) - Commitid_BestCount(cidszr); + if (TEST) + translate( concat(botleft + [0, crossoff] + (cidsz-cidszr)/2, [0]) ) + Commitid_BestCount(cidszr); difference(){ mirror([0,0,1]) { translate(concat(botleft + [test_edge,test_edge], [test_tile_th])) - cube(concat(size - [test_edge,test_edge]*2, [tile_th])); + cube(concat(size - [test_edge,test_edge]*2, [tile_th*2])); translate(concat(botleft_post, [-1])) cube(concat(topright_post-botleft_post, [tile_th+2])); } @@ -386,6 +417,7 @@ module TestPiece1(){ ////toplevel } InterlockEdge(corners[1], corners[2], 1, nlobes=1); RoundCornerCut(rcs); + PostHoles(holes); } RoundCornerAdd(rcs); } @@ -395,10 +427,15 @@ module TestPiece2(){ ////toplevel [ 50, 0] ]; corners = TestPiece_holes2corners(holes); - TileBase(corners[0], corners[2]); - Posts(holes); - RoundEdge(corners[0], corners[1]); - InterlockEdge(corners[3], corners[0], 0, nlobes=1); + difference(){ + union(){ + TileBase(corners[0], corners[2]); + Posts(holes); + RoundEdge(corners[0], corners[1]); + InterlockEdge(corners[3], corners[0], 0, nlobes=1); + } + PostHoles(holes); + } } module TestDemo(){ ////toplevel @@ -602,7 +639,7 @@ module TestStrapPeg_Long(){ ////toplevel module Machine(){ ////toplevel Machine_NewArm(); Machine_Curves(); - if (TEST || JIG) + if (TEST) TestStrapSlots(); } @@ -653,6 +690,7 @@ module Tile02(){ ////toplevel } InterlockEdge(R_EDGE(c,1), 1); RoundCornerCut(rcs); + PostHoles(posts); } RoundCornerAdd(rcs); } @@ -673,6 +711,7 @@ module Tile12(){ ////toplevel InterlockEdge(R_EDGE(c,0), 1); InterlockEdge(R_EDGE(c,1), 1); RoundCornerCut(rcs); + PostHoles(posts); } RoundCornerAdd(rcs); } @@ -702,6 +741,7 @@ module Tile11(){ ////toplevel } InterlockEdge(c[0], tile_01_11_cnr, 1); InterlockEdge(tile_11_10_cnr, c[2], 1); + PostHoles(posts); Machine(); } } @@ -725,6 +765,7 @@ module Tile01(){ ////toplevel InterlockEdge(tile_01_11_cnr, c[3]); InterlockEdge(R_EDGE(c,3)); } + PostHoles(posts); InterlockEdge(c[1], tile_01_00_cnr, 1); Machine(); } @@ -751,6 +792,7 @@ module Tile10(){ ////toplevel RoundEdge(R_EDGE(c,2)); InterlockEdge(c[3], tile_11_10_cnr); } + PostHoles(posts); RoundCornerCut(rcs); Machine(); } @@ -773,6 +815,7 @@ module Tile00(){ ////toplevel rcy = cty + frontcurve_avoid_y; posts = [ cnr_posts[0], cnr_posts[1], + 0.5 * (cnr_posts[0] + cnr_posts[1]), cnr_posts[2] + [ 0, -rcy ], cnr_posts[2] + [ -sz[0] + frontedge_len - cutout_l_end_x, -cty ], cnr_posts[3] + [ 0, -cty ] @@ -797,6 +840,7 @@ module Tile00(){ ////toplevel RoundEdge(c1bis, c2bis); } Machine(); + PostHoles(posts); RoundCornerCut(rc2); } RoundCornerAdd(rcs);