+
+ JoinCircs(join_cr);
+ }
+}
+
+lockshaft_or = lockshaft_r + [clip_th,clip_th];
+cliprecess_ymax = cliprecess_h - lockshaft_r[1];
+clip_ymin = cliprecess_ymax - total_h;
+clip_ogap = clip_gap + clip_th*2;
+
+module ClipElevationPositive(){
+ hull(){
+ oval(lockshaft_or);
+ translate([0, -lockshaft_or[1] * sqrt(2)])
+ square(center=true, 0.5);
+ }
+ translate([-lockshaft_or[0], 0])
+ square([lockshaft_or[0]*2, cliprecess_ymax]);
+ translate([-clip_ogap/2, 0]) mirror([0,1]) square([clip_ogap, -clip_ymin]);
+}
+
+module ClipElevationNegative(){
+ hull(){
+ for (y=[0, cliprecess_ymax+1])
+ translate([0, y])
+ oval(lockshaft_r);
+ }
+ translate([-clip_gap/2, 1]) mirror([0,1]) square([clip_gap, 2-clip_ymin]);
+}
+
+module ClipElevation(){
+ difference(){
+ ClipElevationPositive(1);
+ ClipElevationNegative(0);
+ }
+}
+
+module ExtrudeClipElevation(extra=0){
+ translate([0,
+ lock_0y + lock_d/2 + clip_d + extra,
+ -clip_ymin])
+ rotate([90,0,0])
+ linear_extrude(height= clip_d + extra*2, convexity=100)
+ children(0);
+}
+
+module ThroughHole(r, y, z) {
+ translate([-50, y, z])
+ rotate([0, 90, 0])
+ cylinder(r=r, h=100, $fn=20);
+}
+
+module ThroughHoles(){
+ for (z=[ 1/4, 3/4 ]) {
+ ThroughHole( mountscrew_dia/2,
+ -tube_or -0.5*backflange_d,
+ total_h * z );
+ }
+
+ ThroughHole( clipbolt_dia/2,
+ lock_0y + lock_d/2 + clip_d/2 + front_th/2,
+ total_h - cliprecess_h - clip_th - clip_d/2 );
+}
+
+module MainPositive(){
+ difference(){
+ union(){
+ linear_extrude(height=total_h, convexity=100) MainPlan();
+ ExtrudeClipElevation() ClipElevationPositive();
+ }
+ ExtrudeClipElevation(1) ClipElevationNegative();