X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=reprap-play.git;a=blobdiff_plain;f=splitpin.scad;h=9631c95e0e453823b87c1ac228116655fd07e646;hp=1e38256d16c8ed2e945fecd089d6241c74817cfc;hb=e9331be9b202aa194530385acd5801a5f6cd1f0e;hpb=ffa7a845301563d34757ed72559c84fa40acfe32 diff --git a/splitpin.scad b/splitpin.scad index 1e38256..9631c95 100644 --- a/splitpin.scad +++ b/splitpin.scad @@ -6,9 +6,9 @@ tau = 6.28318530718; function deg2rad(deg) = deg/360 * tau; function rad2deg(rad) = rad/tau * 360; -module SplitPin(w=1.5, holeminrad=3.5, thick=3, deviationrad=1.0, - mainlen=20, handlerad=10, handlelen=7) { - spare = holeminrad - deviationrad - w; +module SplitPin(w=1.5, holeminrad=2.50, thick=3, deviationrad=1.5, + mainlen=15, handlerad=20, handlelen=12) { + spare = holeminrad*2 - deviationrad - w*2; echo("splitpin spare",spare); %translate([0,mainlen+handlelen,0]) cylinder(r=spare, h=thick); %translate([0,mainlen,thick/2]) rotate([90,0,0]) @@ -31,43 +31,51 @@ module SplitPin(w=1.5, holeminrad=3.5, thick=3, deviationrad=1.0, // translate([unbent_dx, 5, 10]) %cube([10,10,10]); // } - for (xmir=[0,1]) mirror([xmir,0,0]) { - linear_extrude(height=thick) { + linear_extrude(height=thick) { + for (xmir=[0,1]) mirror([xmir,0,0]) FlatArc(0,0, w*0.5, w*1.5, 270-1,360); - translate([w*1.5, 0, 0]) { - FlatArc($fa=1, main_cx,0, unbent_rad, unbent_rad+w, - 180-unbent_subang, 180); - translate([corner_x, corner_y]) - rotate([0,0,-unbent_subang]) { + translate([w*1.5, 0, 0]) { + FlatArc($fa=1, main_cx,0, unbent_rad, unbent_rad+w, + 180-unbent_subang, 180); + translate([corner_x, corner_y]) rotate([0,0,-unbent_subang]) { + rotate([0,0,10]) + translate([w*0.2,0,0]) translate([-(w + deviationrad), -0.1]) - square(size=[w + deviationrad, w+0.1]); - FlatArc(-deviationrad + handlerad, w, - handlerad, handlerad+w, - 180-rad2deg(handlelen/handlerad), 180, - $fa=0.25, $fn=60); - } + square(size=[w + deviationrad, w+0.1]); + FlatArc(-deviationrad + handlerad, w, + handlerad, handlerad+w, + 180-rad2deg(handlelen/handlerad), 180+rad2deg(w/handlerad), + $fa=0.25, $fn=60); } } + mirror([1,0,0]) translate([w*1.5, 0, 0]) + FlatArc($fa=1, main_cx,0, unbent_rad, unbent_rad+w, + 180-(unbent_subang + rad2deg((handlelen+w)/unbent_rad)), 180); } } -module SplitPinCavity(w=1.5, holeminrad=3.5, thick=3, deviationrad=1.0, - mainlen=20, slop=0.5, insertby = 5) { +module SplitPinCavity(w=1.5, holeminrad=2.50, thick=3, deviationrad=1.5, + mainlen=15, slop=0.5, insertby = 5) { smallgap2 = holeminrad; biggap2 = smallgap2 + deviationrad + slop; toegap2 = w*1.5 + slop; toeend = -mainlen-insertby; -//translate([-biggap2, -thick/2, -mainlen-1]) - linear_extrude(height = thick + slop*2) { - polygon([[-biggap2, -insertby], [-biggap2, 1], - [biggap2, 1], [biggap2, -insertby], - [toegap2, toeend-1], [-toegap2, toeend-1]]); + translate([0,thick/2,0]) rotate([90,0,0]) { + linear_extrude(height = thick + slop*2) { + for (xmir=[0,1]) mirror([xmir,0]) { + polygon([[-0.1, 1], + [(smallgap2+biggap2)/2, 1], + [smallgap2, -insertby], + [biggap2, -insertby], + [toegap2, toeend-1], + [-0.1, toeend-1]]); + } + } } -// -// cube([biggap, thick, mainlen+2]); } -//SplitPin(); -//translate([30,0,0]) +SplitPin(); +translate([0,15+5,-10]) + rotate([-90,0,0]) SplitPinCavity();