eps = 0.01; infty = 300; /* sirka trupu u nabezne hrany 80mm max sirka trupu 90 mm sirka trupu 50mm pred nabeznou hranou 84mm rozchod klidne 150mm vyska osy se spodni hranou trupu az cca 30mm pod trupem kolma cast asi vpredu */ base_h = 95; base_w = 83; base_top = 5; // above the xz plane base_wall = 0.6; base_l = 45; axle_cube = 7; axle_hole = 3.5; strut_wall = 1.2; base_top_l = axle_cube; bottom_strut_l = base_l-5; wheel_h = 60; wheel_base = 110; module base() { difference() { $fn = 128; scale([base_w/base_h, 1, 1]) cylinder(r = base_h/2, h = base_l); // cut the top half translate([-infty/2, base_top, -infty/2]) cube(infty); // cut the rear angle translate([0, base_top, base_top_l]) rotate([-atan((base_l - base_top_l)/(base_h/2 + base_top)), 0, 0]) translate([-infty/2, -infty/2, 0]) cube(infty); } } module wheel_cube() { translate([wheel_base/2-axle_cube, -wheel_h-axle_cube/2, 0]) cube(axle_cube); } module top_strut() { hull() { // top translate([base_w/2 - strut_wall/2, 0, 0]) cylinder(r = strut_wall/2, h = base_top_l, $fn = 16); // bottom translate([wheel_base/2-strut_wall/2, -wheel_h+axle_cube/2, 0]) cylinder(r = strut_wall/2, h = axle_cube, $fn = 16); } } module bottom_strut() { hull() { // center rotate([0, 0, 30]) translate([0, -base_w/2 + base_wall/2, 0]) cylinder(r = strut_wall/2, h = bottom_strut_l, $fn = 16); // side // translate([wheel_base/2-axle_cube+strut_wall/2, // -wheel_h+axle_cube/2-strut_wall/2 , 0]) translate([wheel_base/2-strut_wall/2, -wheel_h-axle_cube/2+strut_wall/2 , 0]) cylinder(r = strut_wall/2, h = axle_cube, $fn = 16); } } module horiz_strut() { translate([-wheel_base/2, -wheel_h-axle_cube/2, 0]) cube([wheel_base, strut_wall, axle_cube]); } module body() { base(); for (x = [-1, 1]) scale([x, 1, 1]) { wheel_cube(); top_strut(); bottom_strut(); } horiz_strut(); } difference() { body(); // hole in the base, no matter what gets in translate([0, 0, -eps]) scale([(base_w - base_wall)/(base_h - base_wall), 1, 1]) cylinder(r = base_h/2 - base_wall, h = base_l + 2*eps, $fn=128); // hole for the wheel axle translate([-infty/2, -wheel_h, axle_cube/2]) rotate([0, 90, 0]) rotate([0, 0, 90]) cylinder(r = axle_hole/2, h = infty); }