X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=scaffold-clamp-common.scad;h=cc5bad153206ffca5fdb94c8685e9bcd2de9dff8;hb=6a319b7ceeca0d02fbeac92c0737e976919d87a1;hp=843e05c18d25ed398ec3d2e6c791f23b08b2a32a;hpb=df4e53c99a5573eee956a297534c170da2a81808;p=reprap-play.git diff --git a/scaffold-clamp-common.scad b/scaffold-clamp-common.scad index 843e05c..cc5bad1 100644 --- a/scaffold-clamp-common.scad +++ b/scaffold-clamp-common.scad @@ -249,12 +249,15 @@ module VHookPlanDemo(){ // ---------- cleat ---------- +function cleat_frame_theta(s) = s * cleat_horn_l / cleat_curve_r * 360/TAU; +function cleat_frame_z(s) = cleat_curve_r * (1 - cos(cleat_frame_theta(s))); +function cleat_frame_x(s) = cleat_curve_r * sin(cleat_frame_theta(s)); +function cleat_frame_r(s) = ( cleat_horn_d_min * s + + cleat_horn_d_max * (1-s) ) * 0.5; + module CleatFrame(s) { - r = ( cleat_horn_d_min * s + - cleat_horn_d_max * (1-s) ) * 0.5; - translate([0,0, cleat_curve_r]) - rotate( s * cleat_horn_l / cleat_curve_r * 360/TAU * [0,1,0] ) - translate([0,0, -cleat_curve_r]) + r = cleat_frame_r(s); + translate([cleat_frame_x(s), 0, cleat_frame_z(s)]) rotate([0, 90, 0]) scale([1, r[1]/r[0]]) sphere(r= r[0]);