From: Ian Jackson Date: Tue, 9 Feb 2016 20:00:14 +0000 (+0000) Subject: Merge branch 'master' of chiark:/u/ianmdlvl/reprap/play X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=reprap-play.git;a=commitdiff_plain;h=0a9e11d31952661779be29b745073da1c7cbbcc8;hp=-c Merge branch 'master' of chiark:/u/ianmdlvl/reprap/play --- 0a9e11d31952661779be29b745073da1c7cbbcc8 diff --combined cable-splice-clamp.scad index c619c3a,a64415d..35d8be1 --- a/cable-splice-clamp.scad +++ b/cable-splice-clamp.scad @@@ -1,5 -1,7 +1,7 @@@ // -*- C -*- + include + cable_maxdia = 12; cable_mindia = 6; strap_width = 4 + 0.5; @@@ -25,6 -27,9 +27,9 @@@ outerdia = 2*(roundoff_rad / cos(30) + 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,30 -66,41 +66,43 @@@ module CrossSectionDemo(){ ////topleve } 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]); + } } }