3 tube_dia = 27.5 + 1.625;
22 mountscrew_dia = 4 + 0.5;
23 clipbolt_dia = 5 + 0.1;
31 lockshaft_r = [1, 1] * lockshaft_dia / 2;
34 tube_or = tube_dia/2 + tube_th;
35 back_ohw = back_gap/2 + backflange_th;
36 backflange_ymin = tube_or+backflange_d;
38 lock_0y = tube_dia/2 + lock_d/2 + midweb_d;
40 lock_or = [lock_w, lock_d]/2 + [front_th,front_th];
42 module oval(sz){ // sz[0] > sz[1]
47 translate([sx * (xr-yr), 0])
57 translate([-back_ohw,0]) mirror([0,1])
58 square([back_ohw*2, backflange_ymin]);
60 circle(r = tube_dia/2);
61 translate([-back_gap/2,1]) mirror([0,1])
62 square([back_gap, backflange_ymin+2]);
64 translate([0, lock_0y]){
69 oval([lock_w/2, lock_d/2]);
74 lockshaft_or = lockshaft_r + [clip_th,clip_th];
75 cliprecess_ymax = cliprecess_h - lockshaft_r[1];
76 clip_ymin = cliprecess_ymax - total_h;
77 clip_ogap = clip_gap + clip_th*2;
79 module ClipElevationPositive(){
82 translate([0, -lockshaft_or[1] * sqrt(2)])
83 square(center=true, 0.5);
85 translate([-lockshaft_or[0], 0])
86 square([lockshaft_or[0]*2, cliprecess_ymax]);
87 translate([-clip_ogap/2, 0]) mirror([0,1]) square([clip_ogap, -clip_ymin]);
90 module ClipElevationNegative(){
92 for (y=[0, cliprecess_ymax+1])
96 translate([-clip_gap/2, 1]) mirror([0,1]) square([clip_gap, 2-clip_ymin]);
99 module ClipElevation(){
101 ClipElevationPositive(1);
102 ClipElevationNegative(0);
106 module ExtrudeClipElevation(extra=0){
108 lock_0y + lock_d/2 + clip_d + extra,
111 linear_extrude(height= clip_d + extra*2, convexity=100)
115 module ThroughHole(r, y, z) {
116 translate([-50, y, z])
118 cylinder(r=r, h=100, $fn=20);
121 module ThroughHoles(){
122 for (z=[ 1/4, 3/4 ]) {
123 ThroughHole( mountscrew_dia/2,
124 -tube_or -0.5*backflange_d,
128 ThroughHole( clipbolt_dia/2,
129 lock_0y + lock_d/2 + clip_d/2 + front_th/2,
130 total_h - cliprecess_h - clip_th - clip_d/2 );
133 module MainPositive(){
136 linear_extrude(height=total_h, convexity=100) MainPlan();
137 ExtrudeClipElevation() ClipElevationPositive();
139 ExtrudeClipElevation(1) ClipElevationNegative();
143 module Bracket(){ //// toplevel
150 module TestTopEdge(){ //// toplevel
152 translate([0,0, -total_h])
155 translate([-200,-200,0])
160 module TestClipBoltHole(){ //// toplevel
163 translate([0, 0, -5])
165 translate([-4, lock_0y + lock_d/2 + 1, 0])
168 translate([-200, lock_0y + lock_d/2 + 0.1])
169 cube([400, 400, total_h-20]);
174 //ClipElevationPositive();
179 //TestClipBoltHole();