// SLOT, a first project: a desk sign in two pieces. A panel with a tab slips // into a slot in a base. Change the word, the outline, the motif and the // size; the tab, the slot and the base follow. The word and the motif are // scored, so nothing falls out of the letters. /* [Make it yours] */ // One short word or name, shown in capitals label = "HELLO"; // 10 // Outline of the panel shape = "arch"; // [arch:Arch, hex:Hexagon, round:Round] // Drawing above the word pattern = "sun"; // [sun:Sunburst, tiles:Honeycomb, stars:Moon and stars, leaves:Leaf sprig] // Panel width width = 120; // [100:5:160] // Panel height above the base height = 110; // [90:5:140] // The sign, or two scraps to test the slot fit first output = "sign"; // [sign:Desk sign, fit:Fit test] /* [Material] */ // Sheet thickness, measured $thickness = 3; // [2.8:0.1:3.2] // Added to the slot width, in total clearance = 0.1; // [0.1:0.05:0.2] // Beam width $kerf = 0.15; // [0:0.01:0.25] /* [Hidden] */ $material = "plywood"; $sheet = [360, 240]; $gap = 6; $fn = 96; t = $thickness; tab_width = width * 0.36; // A little shorter than the base is thick, so the sign never rocks on its tab tab_depth = t - 0.15; base_width = width * 0.9; base_depth = max(60, height * 0.6); word = upper(label); motif_scale = min(width, height) / 110; // The outline has a flat bottom: its shoulders sit on the base module face() { if (shape == "arch") polygon(concat([[-width / 2, 0], [width / 2, 0]], [for (a = [0:3:180]) [width / 2 * cos(a), height * (0.55 + 0.45 * sin(a))]])); if (shape == "hex") polygon([[-0.32 * width, 0], [0.32 * width, 0], [width / 2, height / 2], [0.32 * width, height], [-0.32 * width, height], [-width / 2, height / 2]]); if (shape == "round") intersection() { translate([0, height * 0.45]) ellipse([width / 2, height * 0.55]); translate([-width / 2, 0]) rect([width, height]); } } module motif() { if (pattern == "sun") { outline() circle(r = 10); for (a = [0:30:330]) rotate(a) line([14, 0], [22, 0]); } if (pattern == "tiles") { outline() regular_polygon(6, 7); for (a = [30:60:330]) translate([13.5 * cos(a), 13.5 * sin(a)]) outline() regular_polygon(6, 7); } if (pattern == "stars") { outline() difference() { circle(r = 14); translate([7, 4]) circle(r = 12); } for (p = [[-22, 12, 3], [-20, -12, 2.5], [19, 13, 3.5], [23, -10, 2.5]]) translate([p[0], p[1]]) outline() star(4, p[2], p[2] * 0.35); } if (pattern == "leaves") { line([0, -21], [0, 22]); for (y = [-12, 0, 12], side = [-1, 1]) { line([0, y - 3], [side * 11, y + 5]); translate([side * 8, y + 3]) rotate(side * 45) outline() ellipse([3.5, 8]); } } } module slot(w) rect([w + clearance, t + clearance], center = true); // Assembled: the panel's tab stands in the base's slot if (output == "sign") { part("Panel", at = [0, t / 2, t], rotate = [90, 0, 0]) { union() { face(); translate([-tab_width / 2, -tab_depth]) rect([tab_width, tab_depth + 0.5]); } score() { outline() offset(delta = -4) face(); translate([0, height * 0.67]) scale(motif_scale) motif(); translate([0, height * 0.31]) text(word, size = 18, fit = width * 0.7, halign = "center", valign = "center"); } } part("Base", at = [0, 0, 0]) difference() { rect([base_width, base_depth], center = true, r = 8); slot(tab_width); } } // The same slot with a 30 mm tab, on two small scraps if (output == "fit") { part("Fit test, base") difference() { rect([50, 28], center = true, r = 3); slot(30); } part("Fit test, tab") union() { translate([-20, 0]) rect([40, 20], r = 2); translate([-15, -tab_depth]) rect([30, tab_depth + 0.5]); } } // Assembly: score first, then cut the slot, then the outlines. Lower the // panel's tab straight into the slot until its shoulders sit on the base. // If the fit is loose, or for a sign that stays put, add a little wood glue.