3 // use shell thickness 1.50
4 // use fill density 40%
8 tube_dia = 27.5 + 1.625;
13 lockshaft_dia = 14.35;
27 mountscrew_dia = 4 + 0.5;
28 clipbolt_dia = 5 + 0.6;
36 tube_rear_extra_th = 1;
46 lockshaft_r = [1, 1] * lockshaft_dia / 2;
49 tube_or = tube_dia/2 + tube_th;
50 back_ohw = back_gap/2 + backflange_th;
51 backflange_ymin = tube_or+backflange_d;
53 lock_0y = tube_dia/2 + lock_d/2 + midweb_d;
54 lock_0x = lock_w/2 - lock_d/2;
55 lock_0 = [lock_0x,lock_0y];
57 lock_or = [lock_w, lock_d]/2 + [front_th,front_th];
59 module oval(sz){ // sz[0] > sz[1]
64 translate([sx * (xr-yr), 0])
71 // http://mathworld.wolfram.com/Circle-CircleIntersection.html
72 R = tube_or + join_cr;
73 r = lock_or[1] + join_cr;
74 d = dist2d( [0,0], lock_0 );
75 x = (d*d - r*r + R*R) / (2*d);
76 y = sqrt( R*R - x*x );
78 echo(lock_0x, lock_0y, R,r, d, x,y);
82 rotate(atan2(lock_0y, lock_0x)) {
93 for (m=[0,1]) mirror([m,0]) {
94 translate([divide_shaft_w, 0]) {
97 translate([0, 0]) square([g, divide_shaft_l + g]);
98 translate([0, divide_shaft_l]) square([divide_head_dx + g, g]);
99 translate([dx, divide_shaft_l]) square([g, divide_head_th + g]);
101 translate([-0.1, divide_shaft_l + divide_head_th])
102 square([divide_shaft_w + divide_head_dx + g, g]);
110 for (t=[0, tube_rear_extra_th])
114 translate([-back_ohw,0]) mirror([0,1])
115 square([back_ohw*2, backflange_ymin]);
117 translate([0, lock_0y]){
123 polygon([[0,0], lock_0, [-lock_0[0], lock_0[1]]]);
127 circle(r = tube_dia/2);
128 translate([-back_gap/2,1]) mirror([0,1])
129 square([back_gap, backflange_ymin+2]);
131 translate([0, lock_0y]){
132 oval([lock_w/2, lock_d/2]);
139 lockshaft_or = lockshaft_r + [clip_th,clip_th];
140 cliprecess_ymax = cliprecess_h - lockshaft_r[1];
141 clip_ymin = cliprecess_ymax - total_h;
142 clip_ogap = clip_gap + clip_th*2;
144 module ClipElevationPositive(){
147 translate([0, -lockshaft_or[1] * sqrt(2)])
148 square(center=true, 0.5);
150 translate([-lockshaft_or[0], 0])
151 square([lockshaft_or[0]*2, cliprecess_ymax]);
152 translate([-clip_ogap/2, 0]) mirror([0,1]) square([clip_ogap, -clip_ymin]);
155 module ClipElevationNegative(){
157 for (y=[0, cliprecess_ymax+1])
161 translate([-clip_gap/2, 1]) mirror([0,1]) square([clip_gap, 2-clip_ymin]);
164 module ClipElevation(){
166 ClipElevationPositive(1);
167 ClipElevationNegative(0);
171 module ExtrudeClipElevation(extra=0){
173 lock_0y + lock_d/2 + clip_d + extra,
176 linear_extrude(height= clip_d + extra*2, convexity=100)
180 module ThroughHole(r, y, z) {
181 translate([-50, y, z])
183 cylinder(r=r, h=100, $fn=20);
186 module ThroughHoles(){
187 for (z=[ 1/4, 3/4 ]) {
188 ThroughHole( mountscrew_dia/2,
189 -tube_or -0.5*backflange_d,
193 ThroughHole( clipbolt_dia/2,
194 lock_0y + lock_d/2 + clip_d/2 + front_th/2,
195 total_h - cliprecess_h - clip_th - clip_d/2 );
198 module MainPositive(){
201 linear_extrude(height=total_h, convexity=100) MainPlan();
202 ExtrudeClipElevation() ClipElevationPositive();
204 ExtrudeClipElevation(1) ClipElevationNegative();
208 module Bracket(){ //// toplevel
215 module TestTopEdge(){ //// toplevel
217 translate([0,0, -total_h])
220 translate([-200,-200,0])
225 module TestClipBoltHole(){ //// toplevel
228 translate([0, 0, -5])
230 translate([-4, lock_0y + lock_d/2 + 1, 0])
233 translate([-200, lock_0y + lock_d/2 + 0.1])
234 cube([400, 400, total_h-20]);
239 //ClipElevationPositive();
244 //TestClipBoltHole();