X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=cable-splice-clamp.scad;h=35d8be143ade70e29e1ca07c08de9a16c46c3124;hb=de40ffb095f2b14fa34b1437da92a4adf87e375f;hp=c619c3a5e78f8f94d30afec287d2addb4c282703;hpb=25c18dc0e721a3b36bff0dedaed7838343229026;p=reprap-play.git diff --git a/cable-splice-clamp.scad b/cable-splice-clamp.scad index c619c3a..35d8be1 100644 --- a/cable-splice-clamp.scad +++ b/cable-splice-clamp.scad @@ -1,5 +1,7 @@ // -*- C -*- +include + cable_maxdia = 12; cable_mindia = 6; strap_width = 4 + 0.5; @@ -25,6 +27,9 @@ outerdia = 2*(roundoff_rad / cos(30) + wallmin); delta_shift_gap = (cable_maxdia-cable_mindia) * delta_shift; +writing_dx = outerdia * sin(30); +writing_dz = total_len / 3; + module CrossSection(plus=0) { difference(){ for (dx = [-plus, 0, plus]) @@ -61,19 +66,32 @@ module CrossSectionDemo(){ ////toplevel } module CompleteClamp(){ ////toplevel - 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); + difference(){ + union(){ + 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); + } } + } + } + + for (my = [0,1]) { + mirror([0,my,0]) + translate([-writing_dx/2, + cos(30) * outerdia/2, + (total_len - writing_dz)/2]) + rotate([90,0,0]) + Commitid_BestCount([writing_dx, writing_dz]); } } }