kolma cast asi vpredu
*/
-base_d = 80;
-base_w = base_d;
-base_wall = 2;
-base_l = 50;
+base_h = 95;
+base_w = 83;
+base_top = 5; // above the xz plane
+base_wall = 0.6;
+base_l = 45;
-wheel_h = 40 + base_d/2; // under the base_d/2
-wheel_base = 160;
-axle_cube = 10;
-axle_hole = 3;
+axle_cube = 7;
+axle_hole = 3.5;
-leg_wall = 2;
-top_l = axle_cube;
+strut_wall = 1.2;
+base_top_l = axle_cube;
- // bottom arc
+bottom_strut_l = base_l-5;
+
+wheel_h = 60;
+wheel_base = 110;
+
+module base() {
difference() {
$fn = 128;
- cylinder(r = base_d/2, h = base_l);
- translate([0, 0, -eps])
- cylinder(r = base_d/2 - base_wall, h = base_l + 2*eps);
+ scale([base_w/base_h, 1, 1])
+ cylinder(r = base_h/2, h = base_l);
// cut the top half
- translate([-infty/2, 0, -infty/2]) cube(infty);
- // angled cut to top_l
- translate([0, 0, top_l])
- rotate([atan((base_d/2-base_wall)/(base_l - top_l)), 0, 0])
- translate([-infty/2, 0, -infty/2]) cube(infty);
+ 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);
}
+}
- // wheel cubes
- difference() {
- for (x = [-1, 1]) scale([x, 1, 1])
- translate([wheel_base/2-axle_cube,
- -wheel_h-axle_cube/2, 0])
- cube(axle_cube);
- translate([-infty/2, -wheel_h, axle_cube/2])
- rotate([0, 90, 0])
- cylinder(r = axle_hole/2, h = 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);
}
+}
- // bottom struts
- for (x = [-1, 1]) scale([x, 1, 1]) hull() {
+module bottom_strut() {
+ hull() {
// center
- translate([0, -base_d/2 + base_wall/2, 0])
- cylinder(r = leg_wall/2, h = base_l, $fn = 16);
+ 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+leg_wall/2,
- -wheel_h+axle_cube/2-leg_wall/2 , 0])
- cylinder(r = leg_wall/2, h = axle_cube, $fn = 16);
- }
-
- // top struts
- for (x = [-1, 1]) scale([x, 1, 1]) hull() {
- // top
- translate([base_d/2 - base_wall/2, -leg_wall/2, 0])
- cylinder(r = leg_wall/2, h = top_l+1, $fn = 16);
- // bottom
- translate([wheel_base/2-leg_wall/2,
- -wheel_h+axle_cube/2-leg_wall/2 , 0])
- cylinder(r = leg_wall/2, h = axle_cube, $fn = 16);
+ // 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() {
- // bottom arc
- difference() {
- cylinder(r = base_d/2, h = base_l);
- translate([0, 0, -eps])
- cylinder(r = base_d/2 - base_wall, h = base_l + 2*eps);
- translate([-infty/2, 0, -infty/2]) cube(infty);
- }
+ base();
- // side top arcs
- for (x = [-1, 1]) scale([x, 1, 1])
- translate([base_d/2+side_d/2-base_wall, 0, 0])
- difference() {
- cylinder(r = side_d/2, h = base_l);
- translate([0, 0, -eps])
- cylinder(r = side_d/2 - base_wall, h = base_l + 2*eps);
- translate([-infty/2, -infty, -infty/2]) cube(infty);
+ for (x = [-1, 1]) scale([x, 1, 1]) {
+ wheel_cube();
+ top_strut();
+ bottom_strut();
}
- // side beams
- for (x = [-1, 1]) scale([x, 1, 1])
- translate([base_d/2 + side_d-2*base_wall, -base_d/2-wheel_h, 0])
- cube([base_wall, base_d/2+wheel_h, base_l]);
-
- // bottom springs
- for (x = [-1, 1]) scale([x, 1, 1])
- hull() {
- translate([0, -base_d/2, 0]) cube([base_wall, base_wall, base_l]);
- translate([base_d/2+side_d-2*base_wall, -base_d/2-wheel_h, 0]) cube([base_wall, base_wall, base_l]);
- }
- // wheel cubes
- for (x = [-1, 1]) scale([x, 1, 1])
- translate([base_d/2+side_d-2*base_wall, -base_d/2-wheel_h-axle_cube/2, 0])
- cube(axle_cube);
+ horiz_strut();
}
difference() {
body();
- for (x = [-1, 1]) scale([x, 1, 1])
- translate([base_d/2+wheel_h, -base_d/2-wheel_h, axle_cube])
- translate([-infty/2, -base_d/2-wheel_h, axle_cube/2])
- % rotate([0, 90, 0])
- cylinder(r = axle_hole/2, h = infty);
+ // 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);
}
-*/