// Spacer Block based on engineering drawing // All dimensions in millimeters (mm) /* [Main Dimensions] */ block_length = 50; // [20:1:100] block_width = 30; // [15:1:80] block_height = 15; // [5:1:50] /* [Slot Dimensions] */ slot_width = 10; // [2:1:40] slot_depth = 5; // [1:1:30] /* [Hole Dimensions] */ hole_diameter = 4.5; // [1:0.1:20] hole_edge_offset_x = 10; // [2:1:30] hole_spacing_x = 30; // [5:1:80] /* [Appearance] */ block_color = "SteelBlue"; $fn = 64; module spacer_block() { difference() { // Base block cube([block_length, block_width, block_height]); // Longitudinal central slot translate([-1, (block_width - slot_width) / 2, block_height - slot_depth]) cube([block_length + 2, slot_width, slot_depth + 1]); // Through-holes // First hole (x = hole_edge_offset_x) translate([hole_edge_offset_x, block_width / 2, -1]) cylinder(h = block_height + 2, d = hole_diameter); // Second hole (x = hole_edge_offset_x + hole_spacing_x) translate([hole_edge_offset_x + hole_spacing_x, block_width / 2, -1]) cylinder(h = block_height + 2, d = hole_diameter); } } color(block_color) spacer_block();