eps = 0.01; infty = 200; wall = 1.5; thin_wall = 0.8; tube_d = 8.0 + 0.2; base_w = 65; base_l = 30; tube_zoff = 3; base_w = 65; base_l = 30; tube_l = base_l; base_overhang = 0.9; // factor of base_w, base_l tube_zoff = 2; module polyhole(r1, h1, fn) { rotate([0,0,180]) cylinder(h = h1, r = r1 / cos (180 / fn), $fn = fn); } module body(tube_zoff) { // base // scale([1, base_l/base_w, 1]) // cylinder(r = base_w/2, h = thin_wall); translate([-base_w/2, -base_l/2, 0]) cube([base_w, base_l, thin_wall]); // diagonal supports for (x = [-1,1]) for (y = [-1,1]) scale([x, y, 1]) hull() { translate([base_overhang*base_w/2-thin_wall/2, base_overhang*base_l/2-thin_wall/2, 0]) cylinder(r = thin_wall/2, h = thin_wall, $fn = 16); translate([0, -tube_l/3+thin_wall/2, 0]) cylinder(r = thin_wall/2, h = tube_zoff + tube_d, $fn = 16); } // side supports for (x = [-1,1]) for (y = [-1,1]) scale([x, y, 1]) hull() { translate([base_overhang*base_w/2-thin_wall/2, base_overhang*base_l/2-thin_wall/2, 0]) cylinder(r = thin_wall/2, h = thin_wall, $fn = 16); translate([0, tube_l/2-thin_wall/2, 0]) cylinder(r = thin_wall/2, h = tube_zoff + tube_d, $fn = 16); } // under the tube supports for (y = [-1,1]) scale([1, y, 1]) hull() { translate([0, base_overhang*base_l/2, 0]) cylinder(r = thin_wall/2, h = thin_wall, $fn = 16); translate([-thin_wall/2, 0, 0]) cube([thin_wall, tube_l/2, tube_zoff]); } // side bottom tube supports for (x = [-1,1]) scale([x, 1, 1]) { translate([tube_d/2, -tube_l/2, 0]) cube([wall, tube_l, tube_zoff + tube_d/2]); translate([tube_d/2+wall, -wall, 0]) cube([wall, 2*wall, tube_zoff + tube_d/2]); } // upper cylinder clip translate([0, -tube_l/2, tube_d/2 + tube_zoff]) intersection() { rotate([-90, 0, 0]) union() { cylinder(r = tube_d/2 + wall, h = tube_l, $fn = 16); translate([0, 0, tube_l/2 - wall]) cylinder(r = tube_d/2 + 2*wall, h = 2*wall); } translate([-tube_d/2-2*wall, 0, 0]) cube([tube_d + 4*wall, tube_l, tube_d]); } } module wing_tube_support(tube_zoff) { difference() { body(tube_zoff); // main tube translate([0, -base_l/2-eps, tube_d/2+tube_zoff]) rotate([-90, 0, 0]) polyhole(tube_d/2, base_l + 2*eps, 6); // cylinder(r = tube_d/2, h = base_l + 2*eps, $fn = 6); // upper clip translate([-infty/2, -infty/2, tube_zoff + tube_d + wall]) cube(infty); } } wing_tube_support(tube_zoff);