3 include <cliphook.scad>
6 function deg2rad(deg) = deg/360 * tau;
7 function rad2deg(rad) = rad/tau * 360;
9 module SplitPin(w=1.5, holeminrad=2.50, thick=3, deviationrad=1.5,
10 mainlen=15, handlerad=20, handlelen=12) {
11 spare = holeminrad*2 - deviationrad - w*2;
12 echo("splitpin spare",spare);
13 %translate([0,mainlen+handlelen,0]) cylinder(r=spare, h=thick);
14 %translate([0,mainlen,thick/2]) rotate([90,0,0])
15 cylinder(r=holeminrad, h=thick);
18 unbent_dx = bent_dx + deviationrad;
20 unbent_subang = atan(unbent_dx / mainlen);
21 unbent_rad = mainlen / deg2rad(unbent_subang);
23 corner_x = unbent_rad * (1 - cos(unbent_subang));
24 corner_y = unbent_rad * sin(unbent_subang);
28 // translate([w*1.5, 0, 0]) {
29 // translate([corner_x, corner_y, 10]) %cube([10,10,10]);
30 // translate([bent_dx, 0, 10]) %cube([10,10,10]);
31 // translate([unbent_dx, 5, 10]) %cube([10,10,10]);
34 linear_extrude(height=thick) {
35 for (xmir=[0,1]) mirror([xmir,0,0])
36 FlatArc(0,0, w*0.5, w*1.5, 270-1,360);
37 translate([w*1.5, 0, 0]) {
38 FlatArc($fa=1, main_cx,0, unbent_rad, unbent_rad+w,
39 180-unbent_subang, 180);
40 translate([corner_x, corner_y]) rotate([0,0,-unbent_subang]) {
42 translate([w*0.2,0,0])
43 translate([-(w + deviationrad), -0.1])
44 square(size=[w + deviationrad, w+0.1]);
45 FlatArc(-deviationrad + handlerad, w,
46 handlerad, handlerad+w,
47 180-rad2deg(handlelen/handlerad), 180+rad2deg(w/handlerad),
51 mirror([1,0,0]) translate([w*1.5, 0, 0])
52 FlatArc($fa=1, main_cx,0, unbent_rad, unbent_rad+w,
53 180-(unbent_subang + rad2deg((handlelen+w)/unbent_rad)), 180);
57 module SplitPinCavity(w=1.5, holeminrad=2.50, thick=3, deviationrad=1.5,
58 mainlen=15, slop=0.5, insertby = 5) {
59 smallgap2 = holeminrad;
60 biggap2 = smallgap2 + deviationrad + slop;
61 toegap2 = w*1.5 + slop;
62 toeend = -mainlen-insertby;
64 translate([0,thick/2,0]) rotate([90,0,0]) {
65 linear_extrude(height = thick + slop*2) {
66 for (xmir=[0,1]) mirror([xmir,0]) {
68 [(smallgap2+biggap2)/2, 1],
69 [smallgap2, -insertby],
79 translate([0,15+5,-10])