X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=scaffold-clamp-common.scad;h=4e9f36759e267902306214f23f3b5aca9536a674;hb=HEAD;hp=251bbb4a591df048fd09ad3ea60eac8aadc9ba2c;hpb=c21cbd2d563dce68b2f1e71f68ecbc993cf2333b;p=reprap-play.git diff --git a/scaffold-clamp-common.scad b/scaffold-clamp-common.scad index 251bbb4..79ed1da 100644 --- a/scaffold-clamp-common.scad +++ b/scaffold-clamp-common.scad @@ -46,6 +46,14 @@ hhook_inside = 40; hhook_th = 4; hhook_l = 40; +// ---------- linear bracket ---------- + +linear_bracket_h = 50; +linear_bracket_l = 100; +linear_bracket_t = 15; +linear_bracket_hole_offset = 20; +linear_bracket_hole_dia = 5 + 1.00; + // ========== defaults ========== pin_head_th = th/2; @@ -53,8 +61,6 @@ pin_dia = th; pin_hole_dia = pin_dia/2; pin_tail = pin_hole_dia + pin_head_th + hinge_z_gap*3; -$print_horiz = false; - // ========== calculated ========== TAU = PI*2; @@ -99,13 +105,12 @@ vhook_outer_dia = vhook_inside + vhook_th*2; cleat_horn_tl = cleat_horn_l + cleat_stem_l/2; -vcleat_dz = - $print_horiz ? 0 : max(0, - cleat_horn_tl - + cleat_horn_d_min[0]/2 - - cleat_horn_d_min[0]/2 * cleat_overlap - - total_z/2 - ); +vcleat_dz = max(0, + cleat_horn_tl + + cleat_horn_d_min[0]/2 + - cleat_horn_d_min[0]/2 * cleat_overlap + - total_z/2 + ); // calculated - hhook @@ -182,28 +187,36 @@ module MainPlanB(flatten){ } } -module HalfClampX(flatten=false){ - difference(){ - translate([0,0, min_z]) { - linextr(0, total_z) mirror([0,1]) MainPlanB(); - for (i=[0 : hinge_units-1]) { - translate([0,0, stride_z*i]) - linextr(0, hinge_unit) MainPlanA(flatten); - } +module HalfClampXPositive(flatten=false){ + translate([0,0, min_z]) { + linextr(0, total_z) mirror([0,1]) MainPlanB(); + for (i=[0 : hinge_units-1]) { + translate([0,0, stride_z*i]) + linextr(0, hinge_unit) MainPlanA(flatten); } - for (j=[0:nbolts-1]) { - translate([ bolt_x, 0, min_z + (j + 0.5) * bolt_stride ]) { - translate([0, -tube_dia/2, 0]) - rotate([-90,0,0]) - cylinder(r= bolt_hole_r, h= tube_dia); - translate([0, -flats_y, 0]) - rotate([90,0,0]) - cylinder(r= bolt_flat/2, h= tube_dia/2); - } + } +} + +module HalfClampXNegative(){ + for (j=[0:nbolts-1]) { + translate([ bolt_x, 0, min_z + (j + 0.5) * bolt_stride ]) { + translate([0, -tube_dia/2, 0]) + rotate([-90,0,0]) + cylinder(r= bolt_hole_r, h= tube_dia); + translate([0, -flats_y, 0]) + rotate([90,0,0]) + cylinder(r= bolt_flat/2, h= tube_dia/2); } } } +module HalfClampX(flatten=false){ + difference(){ + HalfClampXPositive(flatten); + HalfClampXNegative(); + } +} + // ---------- vhook ---------- module VHookProfile() { @@ -332,7 +345,6 @@ module VCleat(){ circle(r = tube_dia/2 + 0.1); } } - if (!$print_horiz) translate([0,0, total_z * 0.5]) cube(center=true, (main_r + cleat_stem_l)*4 * [1,1,0] + @@ -340,17 +352,11 @@ module VCleat(){ } } -module VCleatA(){ +module VCleatA(){ ////toplevel DummyA(); VCleat(); } -module VCleatAPrint(){ ////toplevel - rotate($print_horiz ? [90,0,0] : [0,0,0]) { - VCleatA(); - } -} - // ---------- hhook ---------- module HHookHookPlan(){ @@ -383,6 +389,34 @@ module HHookPlanDemo(){ HHookHookPlan(); } +// ---------- linear bracket ---------- + +module LinearBracketA(){ ////toplevel + difference(){ + union(){ + HalfClampXPositive(); + mirror([1,0,0]) + linextr_y_xz(-open_gap/2 - linear_bracket_t, -open_gap/2) + rectfromto([0, min_z], + [max_x + linear_bracket_l, min_z + linear_bracket_h]); + } + HalfClampXNegative(); + linextr(-1000,1000) + TubePlan(); + mirror([1,0,0]) + linextr_y_xz(-100,100) { + for (t = [ + [1,1] * linear_bracket_hole_offset, + -[1,1] * linear_bracket_hole_offset + + [linear_bracket_l, linear_bracket_h] + ]) { + translate([ max_x, min_z ] + t) + circle(r= linear_bracket_hole_dia/2); + } + } + } +} + // ---------- misc ---------- module PinSitu(){ ////toplevel