20 mountscrew_dia = 4 + 0.5;
21 clipbolt_dia = 5 + 0.5;
32 tube_or = tube_dia/2 + tube_th;
33 back_ohw = back_gap/2 + backflange_th;
34 backflange_ymin = tube_or+backflange_d;
36 lock_0y = tube_dia/2 + lock_d/2 + midweb_d;
38 lock_or = [lock_w, lock_d]/2 + [front_th,front_th];
40 module oval(sz){ // sz[0] > sz[1]
45 translate([sx * (xr-yr), 0])
55 translate([-back_ohw,0]) mirror([0,1])
56 square([back_ohw*2, backflange_ymin]);
58 circle(r = tube_dia/2);
59 translate([-back_gap/2,1]) mirror([0,1])
60 square([back_gap, backflange_ymin+2]);
62 translate([0, lock_0y]){
67 oval([lock_w/2, lock_d/2]);
72 lockshaft_or = lockshaft_r + [clip_th,clip_th];
73 cliprecess_ymax = cliprecess_h - lockshaft_r[1];
74 clip_ymin = cliprecess_ymax - total_h;
75 clip_ogap = clip_gap + clip_th*2;
77 module ClipElevationPositive(){
79 translate([-lockshaft_or[0], 0])
80 square([lockshaft_or[0]*2, cliprecess_ymax]);
81 translate([-clip_ogap/2, 0]) mirror([0,1]) square([clip_ogap, -clip_ymin]);
84 module ClipElevationNegative(){
86 for (y=[0, cliprecess_ymax+1])
90 translate([-clip_gap/2, 1]) mirror([0,1]) square([clip_gap, 2-clip_ymin]);
93 module ClipElevation(){
95 ClipElevationPositive(1);
96 ClipElevationNegative(0);
100 module ExtrudeClipElevation(extra=0){
102 lock_0y + lock_d/2 + clip_d + extra,
105 linear_extrude(height= clip_d + extra*2, convexity=100)
109 module ThroughHole(r, y, z) {
110 translate([-50, y, z])
112 cylinder(r=r, h=100, $fn=20);
115 module ThroughHoles(){
116 for (z=[ 1/4, 3/4 ]) {
117 ThroughHole( mountscrew_dia/2,
118 -tube_or -0.5*backflange_d,
122 ThroughHole( clipbolt_dia/2,
123 lock_0y + lock_d/2 + clip_d/2,
124 total_h - cliprecess_h - clip_th - clip_d/2 );
127 module MainPositive(){
130 linear_extrude(height=total_h, convexity=100) MainPlan();
131 ExtrudeClipElevation() ClipElevationPositive();
133 ExtrudeClipElevation(1) ClipElevationNegative();