24 tube_or = tube_dia/2 + main_th;
25 back_ohw = back_gap/2 + main_th;
26 backflange_ymin = tube_or+backflange_d;
28 lock_0y = tube_dia/2 + lock_d/2 + midweb_d;
30 lock_or = [lock_w, lock_d]/2 + [front_th,front_th];
32 module oval(sz){ // sz[0] > sz[1]
37 translate([sx * (xr-yr), 0])
47 translate([-back_ohw,0]) mirror([0,1])
48 square([back_ohw*2, backflange_ymin]);
50 circle(r = tube_dia/2);
51 translate([-back_gap/2,1]) mirror([0,1])
52 square([back_gap, backflange_ymin+2]);
54 translate([0, lock_0y]){
59 oval([lock_w/2, lock_d/2]);
64 lockshaft_or = lockshaft_r + [clip_th,clip_th];
65 cliprecess_ymax = cliprecess_h - lockshaft_r[1];
66 clip_ymin = cliprecess_ymax - total_h;
67 clip_ogap = clip_gap + clip_th*2;
69 module ClipElevationPositive(){
71 translate([-lockshaft_or[0], 0])
72 square([lockshaft_or[0]*2, cliprecess_ymax]);
73 translate([-clip_ogap/2, 0]) mirror([0,1]) square([clip_ogap, -clip_ymin]);
76 module ClipElevationNegative(){
78 for (y=[0, cliprecess_ymax+1])
82 translate([-clip_gap/2, 1]) mirror([0,1]) square([clip_gap, 2-clip_ymin]);
85 module ClipElevation(){
87 ClipElevationPositive(1);
88 ClipElevationNegative(0);
92 module ExtrudeClipElevation(extra=0){
94 lock_0y + lock_d/2 + clip_d + extra,
97 linear_extrude(height= clip_d + extra*2, convexity=100)
101 module MainPositive(){
104 linear_extrude(height=total_h, convexity=100) MainPlan();
105 ExtrudeClipElevation() ClipElevationPositive();
107 ExtrudeClipElevation(1) ClipElevationNegative();