SLC_Game/01_3D-Druck/openscad/aktiv-feld.scad

98 lines
3.6 KiB
OpenSCAD

// Aktiv-Feld — RACI-Fläche (Figuren werden GESTELLT, nicht gesteckt)
// SLC-Workshop Tabletop · Einheiten: mm
// Eine flache Platte mit 4 abgetrennten Bereichen R · A · C · I (gleich gross).
// R/C/I haben je 4 Standflaechen (2x2). A hat GENAU EIN zentrales Standfeld
// (goldene RACI-Regel: genau eine Rolle ist Accountable).
// Standflaechen sind nur flache Gravur-Markierungen (keine Loecher).
/* [Platte] */
plate_thick = 6; // Dicke der Flaeche
corner_r = 5;
plate_margin = 6; // Rand aussen
/* [Standflaechen] (flache Markierung, kein Loch) — passend zum Sockel Ø20 */
spot_d = 18; // Durchmesser der Markierung (etwas < Sockel Ø20)
spot_depth = 0.6; // Gravurtiefe
spot_pitch = 24; // Mitte-zu-Mitte (Sockel Ø20 + ~4 mm Luft)
grid_cols = 2; // Raster fuer R/C/I: 2 x 2 = 4 Standflaechen
grid_rows = 2;
a_spot_d = 22; // A: EIN groesseres zentrales Standfeld (genau 1 Figur)
/* [Bereiche / Zonen] — [Label, cols, rows]; A = 1x1 (goldene RACI-Regel) */
zones = [["R", 2, 2], ["A", 1, 1], ["C", 2, 2], ["I", 2, 2]];
cell_pad = 13; // Rand um die Standflaechen im Feld (haelt Ø20-Sockel)
label_h = 12; // Platz fuer den Buchstaben unten im Feld
zone_gap = 8; // Abstand zwischen den Feldern
/* [Gravur] */
frame_w = 1.5; // Strichstaerke der Feld-Umrandung
frame_depth = 0.6;
label_size = 10;
label_depth = 0.8;
$fn = 48;
// --- abgeleitete Maße -------------------------------------------------------
spots_span_x = (grid_cols - 1) * spot_pitch;
spots_span_y = (grid_rows - 1) * spot_pitch;
cell_w = spots_span_x + 2 * cell_pad; // 21
cell_h = spots_span_y + 2 * cell_pad + label_h; // 30
plate_w = len(zones) * cell_w + (len(zones) - 1) * zone_gap + 2 * plate_margin;
plate_h = cell_h + 2 * plate_margin;
function zone_cx(i) =
-plate_w/2 + plate_margin + cell_w/2 + i * (cell_w + zone_gap);
// --- Geometrie --------------------------------------------------------------
module rrect(l, w, h, r) {
linear_extrude(h) offset(r) offset(-r) square([l, w], center = true);
}
module field_frame(cx) {
// eingravierte Umrandung -> grenzt den Bereich ab
translate([cx, 0, plate_thick - frame_depth])
linear_extrude(frame_depth + 0.1)
difference() {
square([cell_w, cell_h], center = true);
square([cell_w - 2*frame_w, cell_h - 2*frame_w], center = true);
}
}
module zone_marks(i) {
cx = zone_cx(i);
lab = zones[i][0];
nc = zones[i][1];
nr = zones[i][2];
if (lab == "A") {
// genau EIN zentrales Standfeld (goldene RACI-Regel)
translate([cx, label_h/2, plate_thick - spot_depth])
cylinder(d = a_spot_d, h = spot_depth + 0.1);
} else {
for (c = [0 : nc - 1])
for (r = [0 : nr - 1]) {
sx = cx + (c - (nc - 1)/2) * spot_pitch;
sy = label_h/2 + ((nr - 1)/2 - r) * spot_pitch;
translate([sx, sy, plate_thick - spot_depth])
cylinder(d = spot_d, h = spot_depth + 0.1);
}
}
// Buchstabe unten im Feld
translate([cx, -cell_h/2 + label_h/2, plate_thick - label_depth])
linear_extrude(label_depth + 0.1)
text(lab, size = label_size, halign = "center", valign = "center");
}
module aktiv_feld() {
difference() {
rrect(plate_w, plate_h, plate_thick, corner_r);
for (i = [0 : len(zones) - 1]) {
field_frame(zone_cx(i));
zone_marks(i);
}
}
}
aktiv_feld();
// Maße zur Info (Konsole): echo(plate_w, plate_h, plate_thick);
echo(plate_w = plate_w, plate_h = plate_h, plate_thick = plate_thick);