// Spacer Block with longitudinal slot and two through-holes // Dimensions directly from technical drawing (all in mm) /* [Overall Dimensions] */ // Total length of the block (X axis) block_length = 50.0; // [20:1:100] // Total width of the block (Y axis) block_width = 30.0; // [15:1:80] // Total height of the block (Z axis) block_height = 15.0; // [5:1:50] /* [Slot Dimensions] */ // Width of the longitudinal slot slot_width = 10.0; // [2:1:30] // Depth of the slot from the top face slot_depth = 5.0; // [1:1:20] /* [Holes] */ // Diameter of the two through-holes hole_diameter = 4.5; // [1:0.1:10] // Center-to-center distance between the two holes hole_spacing = 30.0; // [5:1:80] // Distance from side edge to first hole center hole_edge_offset = 10.0;// [2:1:25] /* [Rendering & Material] */ part_color = "SteelBlue"; $fn = 64; module spacer_block() { difference() { // Base block sitting on the XY plane cube([block_length, block_width, block_height]); // Full-length longitudinal slot cut from the top face // Positioned along the center line in Y (Y = 10 to 20) translate([-1, (block_width - slot_width) / 2, block_height - slot_depth]) cube([block_length + 2, slot_width, slot_depth + 1]); // Two through-holes (Ø4.5 THRU) // Hole 1 translate([hole_edge_offset, block_width / 2, -1]) cylinder(d = hole_diameter, h = block_height + 2); // Hole 2 translate([hole_edge_offset + hole_spacing, block_width / 2, -1]) cylinder(d = hole_diameter, h = block_height + 2); } } color(part_color) spacer_block();