X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=reprap-play.git;a=blobdiff_plain;f=lock-inframe-bracket.scad;h=bf3c9130374c9d8305a8d55ef14158aa763e0f0d;hp=1d8c1ddae2549d3221a93cb66f80e17a146eb051;hb=55000fa41db8d2fb6c8aba14cc5e47148c8fc189;hpb=bf61c2ba0f0c8219633da3178c95883168f8ac0a;ds=sidebyside diff --git a/lock-inframe-bracket.scad b/lock-inframe-bracket.scad index 1d8c1dd..bf3c913 100644 --- a/lock-inframe-bracket.scad +++ b/lock-inframe-bracket.scad @@ -1,18 +1,23 @@ // -*- C -*- -tube_dia = 27.5 + 1.25; +// use shell thickness 1.50 +// use fill density 40% + +include + +tube_dia = 27.5 + 1.625; lock_w = 42.5 + 0.5; lock_d = 28.0 + 0.5; main_h = 45.0; backflange_d = 12; -lockshaft_dia = 15.5; +lockshaft_dia = 14.35; cliprecess_h = 16; total_h = 45; -back_gap = 10; -main_th = 2.5; -tube_th = 2.25; +back_gap = 12.5; +main_th = 2.75; +tube_th = 2.125; midweb_d = 3; clip_th = 3.5; @@ -22,10 +27,14 @@ clip_d = 22.0; mountscrew_dia = 4 + 0.5; clipbolt_dia = 5 + 0.1; -backflange_th = 3.5; +backflange_th = 4.5; $fn=50; +join_cr = 9; + +tube_rear_extra_th = 1; + // calculated lockshaft_r = [1, 1] * lockshaft_dia / 2; @@ -36,6 +45,8 @@ back_ohw = back_gap/2 + backflange_th; backflange_ymin = tube_or+backflange_d; lock_0y = tube_dia/2 + lock_d/2 + midweb_d; +lock_0x = lock_w/2 - lock_d/2; +lock_0 = [lock_0x,lock_0y]; lock_or = [lock_w, lock_d]/2 + [front_th,front_th]; @@ -50,24 +61,56 @@ module oval(sz){ // sz[0] > sz[1] } } +module JoinCircs(jr){ + // http://mathworld.wolfram.com/Circle-CircleIntersection.html + R = tube_or + join_cr; + r = lock_or[1] + join_cr; + d = dist2d( [0,0], lock_0 ); + x = (d*d - r*r + R*R) / (2*d); + y = sqrt( R*R - x*x ); + + echo(lock_0x, lock_0y, R,r, d, x,y); + + for (m=[0,1]) { + mirror([m,0]) { + rotate(atan2(lock_0y, lock_0x)) { + translate([x,-y]) + circle(r= jr); + } + } + } +} + module MainPlan(){ difference(){ union(){ - circle(r = tube_or); + hull(){ + for (t=[0, tube_rear_extra_th]) + translate([0, -t]) + circle(r = tube_or); + } translate([-back_ohw,0]) mirror([0,1]) square([back_ohw*2, backflange_ymin]); + + translate([0, lock_0y]){ + oval(lock_or); + } + + hull(){ + JoinCircs(0.01); + polygon([[0,0], lock_0, [-lock_0[0], lock_0[1]]]); + } } + circle(r = tube_dia/2); translate([-back_gap/2,1]) mirror([0,1]) square([back_gap, backflange_ymin+2]); - } - translate([0, lock_0y]){ - difference(){ - union(){ - oval(lock_or); - } + + translate([0, lock_0y]){ oval([lock_w/2, lock_d/2]); } + + JoinCircs(join_cr); } } @@ -178,4 +221,4 @@ module TestClipBoltHole(){ //// toplevel //TestTopEdge(); //TestClipBoltHole(); -//Bracket(); +Bracket();