3 include <commitid.scad>
7 // alpha is slope angle, which is half of inner concave angle that
11 // mu is minimum number of cable radii that cable tangent point (line)
12 // with splint ought to be away from edge of split
15 // wall thickness, and base width as fraction of cable size
19 // for cross-section calculations:
21 // origin O is at intersection of straight line segments forming walls
22 // C is centre of circle (wire x-section) (of radius r or radius 1)
23 // which is tangent to lines
24 // T is said tangent points
25 // B is inner base point, which is extension of line from B by mu*r
31 // blah_r is blah where r=1
32 // d_AB is distance AB
33 // dy_AB is " " " vertical component
40 dy_OB_r = d_OB_r * sina;
42 // *0 and *1 relate to smallest and largest wire
44 // r10 is radius ratio
46 r10 = d_OC_r / dy_OB_r;
48 r0 = rnom / sqrt(r10);
49 r1 = rnom * sqrt(r10);
51 x_B_r = d_OB_r * cosa;
57 wall_x_r = wall_r / tan(90-alpha);
59 top = wall_r * r1 - (d_OC_r - 1) * r0;
60 basew = base_r * rnom;
62 echo("dias", r0*2, r1*2, "ratio",r1/r0);
64 module CrossSectionHalf(plus=0) {
66 polygon([[-0.1, y_T_r * r0],
67 [x_T_r * r0, y_T_r * r0],
68 [x_B_r * r1, y_B_r * r1],
69 [x_B_r * r1 + wall_x_r * rnom + plus, y_B_r * r1],
72 translate([0, -d_OC_r * r0])
77 module CrossSection(plus=0) {
80 CrossSectionHalf(plus);
84 module CrossSectionDemo(){ ////toplevel
85 color("black") CrossSection(2);
89 color(rc[0]) translate([0, -d_OC_r * rc[1]]) circle(r = rc[1]);
93 strap_width = 4 + 0.5;
101 writing_dx = total_len / 3;
102 writing_dy = basew*2;
104 module HalfClamp(){ ////toplevel
106 rotate([90,0,0])rotate([0,90,0]){
107 linear_extrude(height=total_len)
110 for (i=[0 : strap_count]){
111 if (i*2 != strap_count) {
113 total_len * (i + 0.5) / (strap_count + 1)])
116 translate([0,0, strap_width/2])
117 linear_extrude(height=strap_wall_l)
118 CrossSection(strap_wall_h);
124 translate([0, -basew, top])
125 Commitid_BestCount([writing_dx, writing_dy]);
129 module HalfClampPrint(){ ////toplevel
135 //CrossSectionDemo();