X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;ds=sidebyside;f=lock-inframe-bracket.scad;h=618be8900af34dbdc7bab720253c2c6a27563421;hb=a83f55ec09411c2805b717b9c92559546bb28109;hp=376662eb0d55bcab7b0f8c5e8b70e6cf9ae53dc1;hpb=156db7e3f7e1588b02761647901279164869bbf8;p=reprap-play.git diff --git a/lock-inframe-bracket.scad b/lock-inframe-bracket.scad index 376662e..618be89 100644 --- a/lock-inframe-bracket.scad +++ b/lock-inframe-bracket.scad @@ -10,6 +10,7 @@ lock_w = 42.5 + 0.5; lock_d = 28.0 + 0.5; main_h = 45.0; backflange_d = 12; +backflange_hole_dy = -1; lockshaft_dia = 14.35; cliprecess_h = 16; @@ -27,6 +28,8 @@ clip_d = 22.0; mountscrew_dia = 4 + 0.5; clipbolt_dia = 5 + 0.6; +mountscrew_washer = 10; + backflange_th = 4.5; $fn=50; @@ -55,7 +58,7 @@ front_th = main_th; tube_or = tube_dia/2 + tube_th; back_ohw = back_gap/2 + backflange_th; -backflange_ymin = tube_or+backflange_d; +backflange_ymin = tube_dia/2 + backflange_d; lock_0y = tube_dia/2 + lock_d/2 + midweb_d; lock_0x = lock_w/2 - lock_d/2; @@ -122,7 +125,51 @@ module DividePlanInPlace(xl=10){ DividePlan(xl); } -module MainPlan(){ +module DivideHook(){ ////toplevel + w = tube_th/2; + d = divide_gap; + + translate([-1,0] * (w + d + w)){ + for (sx=[-1,+1]) + translate([-(w + w+d) * sx, 0]) circle(r= w); + difference(){ + circle(r = 3*w + d); + circle(r = w + d); + translate([-10*w, -10*w]) square([20*w, 10*w]); + } + } +} + +module DivideCut(){ + w = tube_th/2; + d = divide_gap; + + difference(){ + offset(r=divide_gap) DivideHook(); + DivideHook(); + translate([-2*w,0]) mirror([0,1]) square([4*w, 4*w]); + } +} + +module DivideInPlace(){ + rotate([0,0, -divide_angle]) + translate([ -tube_dia/2 -tube_th/2, 0]) + children(); +} + +module DivideSurround(){ + w = tube_th/2; + d = divide_gap; + + offset(r= w*2) { + hull() { + DivideCut(); + translate([-(4*w + 2*d), 8*w]) circle(r=w); + } + } +} + +module MainPlan(){ ////toplevel difference(){ union(){ difference(){ @@ -153,12 +200,7 @@ module MainPlan(){ JoinCircs(join_cr); } - hull(){ - minkowski(){ - DividePlanInPlace(0.1); - circle(divide_around); - } - } + DivideInPlace() DivideSurround(); } translate([0, lock_0y]){ oval([lock_w/2, lock_d/2]); @@ -166,7 +208,7 @@ module MainPlan(){ circle(r = tube_dia/2); - DividePlanInPlace(); + DivideInPlace() DivideCut(); } } @@ -211,18 +253,24 @@ module ExtrudeClipElevation(extra=0){ children(0); } -module ThroughHole(r, y, z) { - translate([-50, y, z]) +module ThroughHole(r, y, z, x=-50) { + translate([x, y, z]) rotate([0, 90, 0]) cylinder(r=r, h=100, $fn=20); } -module ThroughHoles(){ +module MountingHoleCylinders(r, x=-50){ for (z=[ 1/4, 3/4 ]) { - ThroughHole( mountscrew_dia/2, - -tube_or -0.5*backflange_d, - total_h * z ); + rotate([0,0, backflange_angle]) + ThroughHole( r, + -tube_dia/2 -0.5*backflange_d + backflange_hole_dy, + total_h * z, + x); } +} + +module ThroughHoles(){ + MountingHoleCylinders(mountscrew_dia/2); ThroughHole( clipbolt_dia/2, lock_0y + lock_d/2 + clip_d/2 + front_th/2, @@ -269,6 +317,23 @@ module TestClipBoltHole(){ ////toplevel } } +module Demo(){ ////toplevel + Bracket(); + color("blue") MountingHoleCylinders(mountscrew_dia/2 - 0.1); + color("black") MountingHoleCylinders(mountscrew_washer/2, + back_ohw + 0.25); +} + +module DividePlanDemo(){ ////toplevel + DividePlan(); +} + +module DivideDemo(){ ////toplevel + color("black") translate([0,0,-2]) MainPlan(); + color("grey") DivideInPlace() DivideHook(); + color("blue") translate([0,0,-4]) DivideInPlace() DivideCut(); +} + //MainPlan(); //ClipElevationPositive(); //ClipElevation(); @@ -276,7 +341,6 @@ module TestClipBoltHole(){ ////toplevel //%ThroughHoles(); //TestTopEdge(); //TestClipBoltHole(); -//DividePlan(); //Bracket();