From: Ian Jackson Date: Tue, 9 Feb 2016 19:09:34 +0000 (+0000) Subject: cable-splice-clamp: Add commitid X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=reprap-play.git;a=commitdiff_plain;h=f1487bd6bec645a991164b4cd15d4fd82535548f;ds=sidebyside cable-splice-clamp: Add commitid --- diff --git a/cable-splice-clamp.scad b/cable-splice-clamp.scad index 7533bcd..a64415d 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]); } } }