// Three-bore pencil block and fit coupon. Dimensions in millimetres. // Viewed from above, the notched end of the coupon has the loosest hole. coupon = false; pencil = 8; clearance = 0.30; // per side, full block only trial_gaps = [0.15, 0.30, 0.45]; length_mm = 54; width_mm = 22; height_mm = 30; floor_mm = 3; pitch = 16; $fn = 72; part_height = coupon ? 7 : height_mm; largest_d = pencil + 2 * (coupon ? max(trial_gaps) : clearance); assert(pencil > 0 && clearance >= 0); assert(part_height > floor_mm && floor_mm > 0); assert(pitch > largest_d && width_mm > largest_d); assert(length_mm > 2*pitch + largest_d); difference() { translate([-length_mm/2, -width_mm/2, 0]) cube([length_mm, width_mm, part_height]); for (i = [0:2]) { gap = coupon ? trial_gaps[i] : clearance; translate([(i-1)*pitch, 0, floor_mm]) cylinder(h = part_height-floor_mm+0.1, d = pencil+2*gap); } if (coupon) translate([length_mm/2, -width_mm/2, -0.1]) cylinder(h = part_height+0.2, r = 2.5); }