$fn = 64; // --- Parameters --- tile_size = 100; // Width and height of the square tile thickness = 8; // Total thickness of the tile dovetail_width = 20; // Base width of the interlocking dovetail dovetail_length = 8; // How far the dovetail extends tolerance = 0.2; // Clearance for the dovetail joints hole_spacing = 5; // Spacing of the pinboard grid hole_diameter = 1.5; // Diameter of the pin holes grid_limit = 38; // Extent of the pin hole grid from center mount_offset = 43; // Offset for corner mounting holes // --- Modules --- // Male dovetail (protrudes outward) module male_dovetail() { linear_extrude(thickness) polygon(points=[ [-dovetail_width/2 + 2, 0], [-dovetail_width/2 - 3, dovetail_length], [dovetail_width/2 + 3, dovetail_length], [dovetail_width/2 - 2, 0] ]); } // Female dovetail (cuts inward, slightly larger for tolerance) module female_dovetail() { translate([0, 0, -1]) linear_extrude(thickness + 2) polygon(points=[ [-dovetail_width/2 + 2 - tolerance, -0.1], [-dovetail_width/2 - 3 - tolerance, dovetail_length + tolerance], [dovetail_width/2 + 3 + tolerance, dovetail_length + tolerance], [dovetail_width/2 - 2 + tolerance, -0.1] ]); } // Main pinboard tile assembly module modular_pinboard_tile() { difference() { union() { // Base square tile translate([-tile_size/2, -tile_size/2, 0]) cube([tile_size, tile_size, thickness]); // Top male dovetail (North) translate([0, tile_size/2, 0]) male_dovetail(); // Right male dovetail (East) translate([tile_size/2, 0, 0]) rotate([0, 0, -90]) male_dovetail(); } // Bottom female dovetail cutout (South) translate([0, -tile_size/2, 0]) female_dovetail(); // Left female dovetail cutout (West) translate([-tile_size/2, 0, 0]) rotate([0, 0, -90]) female_dovetail(); // Pinboard hole grid for(x = [-grid_limit : hole_spacing : grid_limit]) { for(y = [-grid_limit : hole_spacing : grid_limit]) { translate([x, y, -1]) cylinder(d=hole_diameter, h=thickness + 2); } } // Corner mounting holes with countersink for screws for(x = [-mount_offset, mount_offset]) { for(y = [-mount_offset, mount_offset]) { // Main screw hole translate([x, y, -1]) cylinder(d=3.5, h=thickness + 2); // Countersink translate([x, y, thickness - 2]) cylinder(d1=3.5, d2=7.5, h=2.1); } } } } // --- Render --- modular_pinboard_tile();