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 translate([0, lock_0y]){
65 circle(r = tube_dia/2);
66 translate([-back_gap/2,1]) mirror([0,1])
67 square([back_gap, backflange_ymin+2]);
69 translate([0, lock_0y]){
70 oval([lock_w/2, lock_d/2]);
75 lockshaft_or = lockshaft_r + [clip_th,clip_th];
76 cliprecess_ymax = cliprecess_h - lockshaft_r[1];
77 clip_ymin = cliprecess_ymax - total_h;
78 clip_ogap = clip_gap + clip_th*2;
80 module ClipElevationPositive(){
83 translate([0, -lockshaft_or[1] * sqrt(2)])
84 square(center=true, 0.5);
86 translate([-lockshaft_or[0], 0])
87 square([lockshaft_or[0]*2, cliprecess_ymax]);
88 translate([-clip_ogap/2, 0]) mirror([0,1]) square([clip_ogap, -clip_ymin]);
91 module ClipElevationNegative(){
93 for (y=[0, cliprecess_ymax+1])
97 translate([-clip_gap/2, 1]) mirror([0,1]) square([clip_gap, 2-clip_ymin]);
100 module ClipElevation(){
102 ClipElevationPositive(1);
103 ClipElevationNegative(0);
107 module ExtrudeClipElevation(extra=0){
109 lock_0y + lock_d/2 + clip_d + extra,
112 linear_extrude(height= clip_d + extra*2, convexity=100)
116 module ThroughHole(r, y, z) {
117 translate([-50, y, z])
119 cylinder(r=r, h=100, $fn=20);
122 module ThroughHoles(){
123 for (z=[ 1/4, 3/4 ]) {
124 ThroughHole( mountscrew_dia/2,
125 -tube_or -0.5*backflange_d,
129 ThroughHole( clipbolt_dia/2,
130 lock_0y + lock_d/2 + clip_d/2 + front_th/2,
131 total_h - cliprecess_h - clip_th - clip_d/2 );
134 module MainPositive(){
137 linear_extrude(height=total_h, convexity=100) MainPlan();
138 ExtrudeClipElevation() ClipElevationPositive();
140 ExtrudeClipElevation(1) ClipElevationNegative();
144 module Bracket(){ //// toplevel
151 module TestTopEdge(){ //// toplevel
153 translate([0,0, -total_h])
156 translate([-200,-200,0])
161 module TestClipBoltHole(){ //// toplevel
164 translate([0, 0, -5])
166 translate([-4, lock_0y + lock_d/2 + 1, 0])
169 translate([-200, lock_0y + lock_d/2 + 0.1])
170 cube([400, 400, total_h-20]);
175 //ClipElevationPositive();
180 //TestClipBoltHole();