// -*- C -*- tube_dia = 27.5 + 0.5; lock_w = 42.5 + 0.5; lock_d = 28.0 + 0.5; main_h = 45.0; backflange_d = 12; back_gap = 7; main_th = 2.5; midweb_d = 3; // calculated front_th = main_th; tube_or = tube_dia/2 + main_th; back_ohw = back_gap/2 + main_th; backflange_ymin = tube_or+backflange_d; lock_0y = tube_dia/2 + lock_d/2 + midweb_d; lock_or = [lock_w, lock_d]/2 + [front_th,front_th]; module oval(sz){ // sz[0] > sz[1] xr = sz[0]; yr = sz[1]; hull(){ for (sx=[-1,+1]) { translate([sx * (xr-yr), 0]) circle(r=yr); } } } module MainPlan(){ difference(){ union(){ circle(r = tube_or); translate([-back_ohw,0]) mirror([0,1]) square([back_ohw*2, backflange_ymin]); } circle(r = tube_dia/2); translate([-back_gap/2,1]) mirror([0,1]) square([back_gap, backflange_ymin+2]); } translate([0, lock_0y]){ difference(){ union(){ oval(lock_or); } oval([lock_w/2, lock_d/2]); } } } MainPlan();