X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=reprap-play.git;a=blobdiff_plain;f=cable-splice-clamp.scad;h=35d8be143ade70e29e1ca07c08de9a16c46c3124;hp=7533bcdf9ff4626741427e26bd6349948963a355;hb=d66c83a90d5552cad6773fff5b755f53aa4fd36d;hpb=a0ece72c445d38570668fc4f5319b44c96c4336f diff --git a/cable-splice-clamp.scad b/cable-splice-clamp.scad index 7533bcd..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,28 +66,43 @@ 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]); } } } module HalfPrint(){ ////toplevel - intersection(){ - rotate([-90,0,-90]) - CompleteClamp(); - translate([-100,-100,0]) cube([1000,200,200]); + rotate([0,180,0]){ + intersection(){ + rotate([-90,0,-90]) + CompleteClamp(); + translate([-100,-100,0]) cube([1000,200,200]); + } } }