X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=cable-splice-clamp.scad;h=bed9edb9070c71324d0d0640bbbcf0b1f43e49fe;hb=c2f9e017b2854093dee8c949617badb1b99a88bf;hp=c23c9367563383aa174adc6f4f827aa609449160;hpb=80554664accdac13cc2f4c6ee6c6dd0da04138ce;p=reprap-play.git diff --git a/cable-splice-clamp.scad b/cable-splice-clamp.scad index c23c936..bed9edb 100644 --- a/cable-splice-clamp.scad +++ b/cable-splice-clamp.scad @@ -2,7 +2,7 @@ include -rnom = 9; +rnom = 7.5 / 2; // alpha is slope angle, which is half of inner concave angle that // wire sits in @@ -56,22 +56,35 @@ y_T_r = -tana * sina; top_r = wall_r - (d_OC_r - 1); -echo(r0,r1, "ratio",r1/r0); +wall_x_r = wall_r / tan(90-alpha); -module CrossSection(plus=0) { +top = top_r * r1; +basew = base_r * rnom; + +echo("dias", r0*2, r1*2, "ratio",r1/r0); + +module CrossSectionHalf(plus=0) { difference(){ - polygon([[-0.1, y_T_r * r0], - [x_T_r * r0, y_T_r * r0], - [x_B_r * r1, y_B_r * r1], - [x_B_r * r1 + wall_r * rnom, y_B_r * r1], - [base_r * rnom, top_r * rnom], - [-0.1, top_r * rnom]]); + polygon([[-0.1, y_T_r * r0], + [x_T_r * r0, y_T_r * r0], + [x_B_r * r1, y_B_r * r1], + [x_B_r * r1 + wall_x_r * rnom + plus, y_B_r * r1], + [basew + plus, top], + [-0.1, top]]); translate([0, -d_OC_r * r0]) circle(r = r0); } } +module CrossSection(plus=0) { + for (m=[0,1]) { + mirror([m,0]) + CrossSectionHalf(plus); + } +} + module CrossSectionDemo(){ ////toplevel + color("black") CrossSection(2); CrossSection(); for (rc=[["red", r1], ["blue",r0]]) { @@ -79,5 +92,48 @@ module CrossSectionDemo(){ ////toplevel } } +strap_width = 4 + 0.5; +total_len = 70; + +strap_count = 2; + +strap_wall_h = 1.5; +strap_wall_l = 2.0; + +writing_dx = total_len / 3; +writing_dy = basew*2; + +module HalfClamp(){ ////toplevel + difference(){ + rotate([90,0,0])rotate([0,90,0]){ + linear_extrude(height=total_len) + CrossSection(); + + for (i=[0 : strap_count]){ + if (i*2 != strap_count) { + translate([0, 0, + total_len * (i + 0.5) / (strap_count + 1)]) + for (m=[0,1]){ + mirror([0,0,m]) + translate([0,0, strap_width/2]) + linear_extrude(height=strap_wall_l) + CrossSection(strap_wall_h); + } + } + } + } + + translate([0, -basew, top]) + Commitid_BestCount([writing_dx, writing_dy]); + } +} + +module HalfClampPrint(){ ////toplevel + rotate([180,0,0]) + HalfClamp(); +} + //CrossSection(); -CrossSectionDemo(); +//CrossSectionDemo(); +//HalfClamp(); +HalfClampPrint();