$fn = 64; // --- PARAMETERS --- track_length = 120; // Total length of the runner track_width = 30; // Outer width of the base track track_height = 20; // Outer height of the base track wall_thickness = 2; // Thickness of the walls clearance = 0.2; // Tolerance for snap fit overlap = 6; // How far the cover overlaps the base walls num_holes = 3; // Number of mounting screw holes // --- RENDER --- // Base track base(); // Cover (placed next to base, oriented flat on the bed for printing) cw = track_width + 2 * clearance + 2 * wall_thickness; ch = overlap + wall_thickness; translate([cw + track_width + 10, track_length, ch]) rotate([0, 180, 0]) rotate([-90, 0, 0]) linear_extrude(height = track_length) cover_profile(); // --- MODULES --- module base() { difference() { rotate([-90, 0, 0]) linear_extrude(height = track_length) base_profile(); // Screw mounting holes for (i = [1 : num_holes]) { translate([track_width / 2, i * track_length / (num_holes + 1), 0]) screw_hole(); } } } module base_profile() { difference() { square([track_width, track_height]); // Inner channel cutout translate([wall_thickness, wall_thickness]) square([track_width - 2 * wall_thickness, track_height]); } // Snap lips (outer) translate([0, track_height - 4]) polygon([[0,0], [-0.8, 1.5], [0, 3]]); translate([track_width, track_height - 4]) polygon([[0,0], [0.8, 1.5], [0, 3]]); } module cover_profile() { cw = track_width + 2 * clearance + 2 * wall_thickness; ch = overlap + wall_thickness; difference() { square([cw, ch]); // Inner channel cutout translate([wall_thickness, -0.1]) square([cw - 2 * wall_thickness, overlap + 0.1]); } // Snap lips (inner) translate([wall_thickness, overlap - 4]) polygon([[0,0], [0.8, 1.5], [0, 3]]); translate([cw - wall_thickness, overlap - 4]) polygon([[0,0], [-0.8, 1.5], [0, 3]]); } module screw_hole() { // Hole for screw shaft translate([0, 0, -1]) cylinder(h = wall_thickness + 2, d = 4.5); // Clearance space for screw head translate([0, 0, wall_thickness]) cylinder(h = track_height, d = 9); }