module rail() { import("rail-bold.stl"); } rail_width = 20; base_thickness = 4; base_width = rail_width / 2; module profile() { difference() { x = sqrt(pow(rail_width, 2) * 2) / 2; difference() { translate([0, rail_width / 2, rail_width / -2]) rotate([45, 0, 0]) cube([base_width, x, x]); translate([0, 0, -rail_width - (rail_width / 3)]) cube([rail_width, rail_width, rail_width]); translate([0, 0, base_thickness]) cube([base_width, rail_width, rail_width]); } translate([0, 0, -1.5]) rotate([0, 90, 0]) rail(); translate([0, 0, -2]) cube([rail_width, 2, 2]); translate([0, rail_width - 2, -2]) cube([rail_width, 2, 2]); } } axel_diameter = 8; axel_tolerance = 1; axel_center_height = 42 / 2; module attachment(w = base_width) { difference() { hull() { cube([w, rail_width * 2, base_thickness]); translate([0, rail_width, axel_center_height]) rotate([0, 90, 0]) linear_extrude(base_width) circle(d = axel_diameter * 2, $fn = 200); } translate([0, rail_width, axel_center_height]) rotate([0, 90, 0]) linear_extrude(base_width) circle(d = axel_diameter + axel_tolerance, $fn = 200); } profile(); translate([0, rail_width, 0]) profile(); } attachment();