adapt design to have text in second color
This commit is contained in:
2026-05-20 10:41:04 +02:00
parent 7ee5c48e98
commit 17f110f2bd
14 changed files with 261 additions and 140 deletions

3
.gitignore vendored
View File

@@ -1 +1,2 @@
*.stl
*.3mf
/Generated

View File

@@ -1,56 +1,47 @@
OPENSCAD="openscad"
FOLDER=STL/HeroesKeepOut
COLORSCAD="../colorscad/colorscad.sh"
FOLDER=Generated/HeroesKeepOut
mkdir -p STL
echo "Rendering Heros keep out ..."
mkdir -p Generated
mkdir -p $FOLDER
# ── Boxes ─────────────────────────────────────────────────────────────
mkdir -p $FOLDER/Box
echo "Rendering Box-Items..."
"$OPENSCAD" -o "$FOLDER/Box/Box-Items.stl" "./HeroesKeepOut/Box-Items.scad"
"$OPENSCAD" -o "$FOLDER/Box/Box-Items-Lid.stl" "./HeroesKeepOut/Box-Items-Lid.scad"
"$COLORSCAD" -o "$FOLDER/Box/Box-Items.3mf" -i "./HeroesKeepOut/Box-Items.scad"
"$COLORSCAD" -o "$FOLDER/Box/Box-Items_and_Tokens-Lid-x2.3mf" -i "./HeroesKeepOut/Box-Items-Lid.scad"
echo "Rendering Box-Tokens..."
"$OPENSCAD" -o "$FOLDER/Box/Box-Tokens.stl" "./HeroesKeepOut/Box-Tokens.scad"
"$OPENSCAD" -o "$FOLDER/Box/Box-Tokens-Lid.stl" "./HeroesKeepOut/Box-Items-Lid.scad"
"$COLORSCAD" -o "$FOLDER/Box/Box-Tokens.3mf" -i "./HeroesKeepOut/Box-Tokens.scad"
echo "Rendering Box-Figures-Heroes..."
"$OPENSCAD" -o "$FOLDER/Box/Box-Figure-Heroes.stl" "./HeroesKeepOut/Box-Figure-Heroes.scad"
"$COLORSCAD" -o "$FOLDER/Box/Box-Figure-Heroes.3mf" -i "./HeroesKeepOut/Box-Figure-Heroes.scad"
echo "Rendering Box-Figures-Big..."
"$OPENSCAD" -o "$FOLDER/Box/Box-Figure-Big.stl" "./HeroesKeepOut/Box-Figure-Big.scad"
"$COLORSCAD" -o "$FOLDER/Box/Box-Figure-Big.3mf" -i "./HeroesKeepOut/Box-Figure-Big.scad"
echo "Rendering Box-Figures-Monsters..."
"$OPENSCAD" -o "$FOLDER/Box/Box-Figure-Monsters.stl" "./HeroesKeepOut/Box-Figure-Monsters.scad"
"$COLORSCAD" -o "$FOLDER/Box/Box-Figure-Monsters.3mf" -i "./HeroesKeepOut/Box-Figure-Monsters.scad"
SCAD_FILE="./HeroesKeepOut/Box-Figure.scad"
while IFS=',' read -r x y z name; do
# Remove quotes around name, replace spaces with -
label=$(printf '%s' "$name" | sed 's/"//g; s/ /-/g')
output="$FOLDER/Box/Box-Figure-$label.stl"
output="$FOLDER/Box/Box-Figure-$label.3mf"
echo "Rendering $output..."
"$OPENSCAD" \
-D "x=$x" \
-D "y=$y" \
-D "z=$z" \
-D "name=\"$name\"" \
-o "$output" "$SCAD_FILE"
"$COLORSCAD" -o "$output" -i "$SCAD_FILE" -- -D "x=$x" -D "y=$y" -D "z=$z" -D "name=\"$name\""
done <./HeroesKeepOut/Box-Figure-Configs.txt
# ── Cards ─────────────────────────────────────────────────────────────
SCAD_FILE="./CardHolder.scad"
SCAD_FILE="./Card-Holder.scad"
mkdir -p $FOLDER/Cards
while IFS=',' read -r b t h name; do
# Remove quotes around name, replace spaces with -
while IFS=',' read -r x y z name; do
label=$(printf '%s' "$name" | sed 's/"//g; s/ /-/g')
output="$FOLDER/Cards/Cards-$label.stl"
output="$FOLDER/Cards/Cards-$label.3mf"
echo "Rendering $output..."
"$OPENSCAD" \
-D "x=$b" \
-D "y=$t" \
-D "z=$h" \
-D "name=\"$name\"" \
-o "$output" "$SCAD_FILE"
"$COLORSCAD" -o "$output" -i "$SCAD_FILE" -- -D "x=$x" -D "y=$y" -D "z=$z" -D "name=\"$name\""
done <./HeroesKeepOut/Card-Configs.txt

View File

@@ -1,4 +1,5 @@
include <BOSL2/std.scad>
use <Color.scad>
// Parameter for console overwrite
x = 30.0;
@@ -7,6 +8,7 @@ y = 30.0;
boxLid(x, y);
module boxLid(x, y) {
makeColor("yellow") {
xInner = x - 10;
yInner = y - 10;
@@ -24,9 +26,9 @@ module boxLid(x, y) {
} else cube([ x, y, 2 ], false);
sideCut(y);
translate([ x, 0, 0 ]) mirror([ 1, 0, 0 ]) sideCut(y);
}
}
module sideCut(y) {
difference() {

View File

@@ -1,4 +1,5 @@
include <BOSL2/std.scad>
use <Color.scad>
// Parameter for console overwrite
x = 30.0;
@@ -8,7 +9,7 @@ z = 20.0;
box(x, y, z);
module box(x, y, z) {
difference() {
makeColor("yellow") difference() {
// base
cuboid(
[ x, y, z - 2],

View File

@@ -1,4 +1,5 @@
include <BOSL2/std.scad>
use <Color.scad>
// Parameter for console overwrite
x = 58;
@@ -6,7 +7,10 @@ y = 5;
z = 88;
name = "Cards";
cardHolder(x + 5, y + 3, z + 4, name);
makeColor("yellow") cardHolder(x + 5, y + 3, z + 4, name);
makeColor("white") {
translate([ 8.5, 1, 3.5 ]) rotate([ 0, -90, 90 ]) linear_extrude(height = 0.2) text(name, size = 5, font = "Arial:style=Bold");
}
module cardHolder(x, y, z, name) {
@@ -80,7 +84,7 @@ module cardHolder(x, y, z, name) {
edges = RIGHT + TOP
);
translate([ 7.5, 0.4, 2.5 ]) rotate([ 0, -90, 90 ]) linear_extrude(height = 0.6) text(name, size = 5, font = "Arial:style=Bold");
translate([ 7.5, 1, 2.5 ]) rotate([ 0, -90, 90 ]) linear_extrude(height = 1.2) text(name, size = 5, font = "Arial:style=Bold");
}
translate([ x - 12, 0, 0 ]) cuboid(

3
Color.scad Normal file
View File

@@ -0,0 +1,3 @@
module makeColor(name) {
color(name) children();
}

View File

@@ -1,10 +1,11 @@
include <BOSL2/std.scad>
use <../Color.scad>
boxHelper(45, 39, 53, "Sensenmann", "Steintroll", "König Schleim");
translate([ 88.5, 39, 0 ]) zrot(180, cp=[0, 0, 0]) boxHelper(45, 39, 53, "Drache", "Gorgone", "Träumer");
boxHelper(45, 39, 53, "Drache", "Gorgone", "Träumer");
translate([ 91.5, 39, 0 ]) zrot(180, cp=[0, 0, 0]) boxHelper(48, 39, 53, "Sensenmann", "Steintroll", "König Schleim");
module boxHelper(x, y, z, frontName, middleName, backName) {
difference() {
makeColor("yellow") difference() {
cube([ x, y, z ], false);
translate([ 1.5, 1.5, 1.5 ]) cube([ x - 3, y - 3, z - 1 ], false);
@@ -24,13 +25,38 @@ module boxHelper(x, y, z, frontName, middleName, backName) {
for (i = [0:xAmount - 1], j = [0:yAmount - 1]) translate([ xSpace + i * 8, ySpace + j * 8, -1 ]) cube([ 6, 6, 3.5 ], false);
}
translate([ 0.6, 19.5, z / 2 ]) rotate([ 0, -90, 0 ]) linear_extrude(height = 1.6) text(
translate([ 1, y / 2, z / 2 ]) rotate([ 0, -90, 0 ]) linear_extrude(height = 1.2) text(
middleName,
size = 4,
font = "Arial:style=Bold",
halign="center"
);
}
makeColor("white") {
translate([ x / 2, 1, 4 ]) rotate([ 90, 0, 0 ]) linear_extrude(height = 0.2) text(
frontName,
size = 4,
font = "Arial:style=Bold",
halign="center",
valign="center"
);
translate([ 1, y / 2, z / 2 ]) rotate([ 0, -90, 0 ]) linear_extrude(height = 0.2) text(
middleName,
size = 4,
font = "Arial:style=Bold",
halign="center"
);
zrot(180, cp=[ x / 2, y / 2, 0 ]) translate([ x / 2, 1, 4 ]) rotate([ 90, 0, 0 ]) linear_extrude(height = 0.2) text(
backName,
size = 4,
font = "Arial:style=Bold",
halign="center",
valign="center"
);
}
}
module window(x, y, z, frontName, backName) {
@@ -66,7 +92,7 @@ module windowHelper(x, y, z, name) {
);
}
translate([ x, y + 0.6, 4 ]) rotate([ 90, 0, 0 ]) linear_extrude(height = 1.6) text(
translate([ x, y + 1, 4 ]) rotate([ 90, 0, 0 ]) linear_extrude(height = 1.2) text(
name,
size = 4,
font = "Arial:style=Bold",

View File

@@ -1,5 +1,5 @@
33,31,29,Geister
26,82,25,Pilzknilche
36,51,27,Spinnen
33,45,34,Werwolf
37,45,33,Werwolf
21,53,35,Vampir

View File

@@ -1,5 +1,7 @@
include <BOSL2/std.scad>
use <../Color.scad>
makeColor("yellow") {
difference() {
cube([ 175, 55, 37 ], false);
translate([ 1.5, 1.5, 1.5 ]) cube([ 172, 52, 36 ], false);
@@ -23,6 +25,15 @@ translate([ 99.25, 1.5, 1.5]) cube([1, 52, 5.5], false);
translate([ 129.75, 1.5, 1.5]) cube([1, 52, 5.5], false);
translate([ 137.5, 1.5, 1.5]) cube([1, 52, 5.5], false);
translate([ 163, 1.5, 1.5]) cube([1, 52, 5.5], false);
}
makeColor("white") {
nameHelper(16.875, "Neuling");
nameHelper(49.5, "Krieger");
nameHelper(83.25, "Schurkin");
nameHelper(113.5, "Magier");
nameHelper(149.25, "Bogenschützin");
}
module window(x, y, z, name) {
windowHelper(x, 0, z, name);
@@ -57,7 +68,17 @@ module windowHelper(x, y, z, name) {
);
}
translate([ x + 1.5, y + 0.6, 6 ]) rotate([ 90, 0, 0 ]) linear_extrude(height = 1.6) text(
translate([ x + 1.5, y + 1, 6 ]) rotate([ 90, 0, 0 ]) linear_extrude(height = 1.2) text(
name,
size = 4,
font = "Arial:style=Bold",
halign="center",
valign="center"
);
}
module nameHelper(x, name) {
translate([ x + 1.5, 1, 6 ]) rotate([ 90, 0, 0 ]) linear_extrude(height = 0.2) text(
name,
size = 4,
font = "Arial:style=Bold",

View File

@@ -1,11 +1,70 @@
include <BOSL2/std.scad>
use <../Color.scad>
// Parameter for console overwrite
x = 172;
y = 84;
z = 35.5;
figureHolder(x, y, z);
makeColor("yellow") figureHolder(x, y, z);
makeColor("white") {
translate([ 94 / 2 + 32, 1, 4 ]) rotate([ 90, 0, 0 ]) linear_extrude(height = 0.2) text(
"Rattenvolk",
size = 4,
font = "Arial:style=Bold",
halign="center",
valign="center"
);
translate([ 43 / 2 + 127.5, 1, 4 ]) rotate([ 90, 0, 0 ]) linear_extrude(height = 0.2) text(
"Unholde",
size = 4,
font = "Arial:style=Bold",
halign="center",
valign="center"
);
translate([ 74 / 2 + 32, 1, 12 ]) rotate([ 90, 0, 0 ]) linear_extrude(height = 0.2) text(
"Gnoll",
size = 4,
font = "Arial:style=Bold",
halign="center",
valign="center"
);
translate([ 63 / 2 + 104.5, 1, 12 ]) rotate([ 90, 0, 0 ]) linear_extrude(height = 0.2) text(
"Skelette",
size = 4,
font = "Arial:style=Bold",
halign="center",
valign="center"
);
translate([ 54 / 2 + 32, 1, 20 ]) rotate([ 90, 0, 0 ]) linear_extrude(height = 0.2) text(
"Echsenvolk",
size = 4,
font = "Arial:style=Bold",
halign="center",
valign="center"
);
translate([ 36 / 2 + 84.5, 1, 20 ]) rotate([ 90, 0, 0 ]) linear_extrude(height = 0.2) text(
"Hexen",
size = 4,
font = "Arial:style=Bold",
halign="center",
valign="center"
);
translate([ 42 / 2 + 122, 1, 20 ]) rotate([ 90, 0, 0 ]) linear_extrude(height = 0.2) text(
"Feen",
size = 4,
font = "Arial:style=Bold",
halign="center",
valign="center"
);
translate([ 32 / 2, 1, 4 ]) rotate([ 90, 0, 0 ]) linear_extrude(height = 0.2) text(
"Schleim",
size = 4,
font = "Arial:style=Bold",
halign="center",
valign="center"
);
}
module figureHolder(x, y, z) {
difference() {
@@ -28,49 +87,49 @@ module figureHolder(x, y, z) {
for (i = [0:xAmount - 1], j = [0:yAmount - 1]) translate([ xSpace + i * 8, ySpace + j * 8, -1 ]) cube([ 6, 6, 3.5 ], false);
}
translate([ 94 / 2 + 32, 0.6, 4 ]) rotate([ 90, 0, 0 ]) linear_extrude(height = 1.6) text(
translate([ 94 / 2 + 32, 1, 4 ]) rotate([ 90, 0, 0 ]) linear_extrude(height = 1.2) text(
"Rattenvolk",
size = 4,
font = "Arial:style=Bold",
halign="center",
valign="center"
);
translate([ 43 / 2 + 127.5, 0.6, 4 ]) rotate([ 90, 0, 0 ]) linear_extrude(height = 1.6) text(
translate([ 43 / 2 + 127.5, 1, 4 ]) rotate([ 90, 0, 0 ]) linear_extrude(height = 1.2) text(
"Unholde",
size = 4,
font = "Arial:style=Bold",
halign="center",
valign="center"
);
translate([ 74 / 2 + 32, 0.6, 12 ]) rotate([ 90, 0, 0 ]) linear_extrude(height = 1.6) text(
translate([ 74 / 2 + 32, 1, 12 ]) rotate([ 90, 0, 0 ]) linear_extrude(height = 1.2) text(
"Gnoll",
size = 4,
font = "Arial:style=Bold",
halign="center",
valign="center"
);
translate([ 63 / 2 + 104.5, 0.6, 12 ]) rotate([ 90, 0, 0 ]) linear_extrude(height = 1.6) text(
translate([ 63 / 2 + 104.5, 1, 12 ]) rotate([ 90, 0, 0 ]) linear_extrude(height = 1.2) text(
"Skelette",
size = 4,
font = "Arial:style=Bold",
halign="center",
valign="center"
);
translate([ 54 / 2 + 32, 0.6, 20 ]) rotate([ 90, 0, 0 ]) linear_extrude(height = 1.6) text(
translate([ 54 / 2 + 32, 1, 20 ]) rotate([ 90, 0, 0 ]) linear_extrude(height = 1.2) text(
"Echsenvolk",
size = 4,
font = "Arial:style=Bold",
halign="center",
valign="center"
);
translate([ 36 / 2 + 84.5, 0.6, 20 ]) rotate([ 90, 0, 0 ]) linear_extrude(height = 1.6) text(
translate([ 36 / 2 + 84.5, 1, 20 ]) rotate([ 90, 0, 0 ]) linear_extrude(height = 1.2) text(
"Hexen",
size = 4,
font = "Arial:style=Bold",
halign="center",
valign="center"
);
translate([ 42 / 2 + 122, 0.6, 20 ]) rotate([ 90, 0, 0 ]) linear_extrude(height = 1.6) text(
translate([ 42 / 2 + 122, 1, 20 ]) rotate([ 90, 0, 0 ]) linear_extrude(height = 1.2) text(
"Feen",
size = 4,
font = "Arial:style=Bold",
@@ -99,8 +158,6 @@ module figureHolder(x, y, z) {
translate([ 127, 57, 0 ]) cube([ 1.5, 27, 6.5], false); // Feen
translate([ 128.5, 81.5, 0 ]) cube([ 42, 1.5, 6.5], false); // Feen
/*
*/
}
module window(x, y, z, name) {
@@ -136,7 +193,7 @@ module windowHelper(x, y, z, name) {
);
}
translate([ x, y + 0.6, 4 ]) rotate([ 90, 0, 0 ]) linear_extrude(height = 1.6) text(
translate([ x, y + 1, 4 ]) rotate([ 90, 0, 0 ]) linear_extrude(height = 1.2) text(
name,
size = 4,
font = "Arial:style=Bold",

View File

@@ -1,4 +1,5 @@
include <BOSL2/std.scad>
use <../Color.scad>
x = 28;
y = 29;
@@ -6,9 +7,18 @@ z = 28;
name = "Figure";
figureBox(x + 3, y + 3, z + 1.5, name);
makeColor("white") {
translate([ (x + 3) / 2, 1, 4 ]) rotate([ 90, 0, 0 ]) linear_extrude(height = 0.2) text(
name,
size = 4,
font = "Arial:style=Bold",
halign="center",
valign="center"
);
}
module figureBox(x, y, z, name) {
difference() {
makeColor("yellow") difference() {
cube([ x, y, z ], false);
translate([ 1.5, 1.5, 1.5 ]) cube([ x - 3, y - 3, z - 1 ], false);
@@ -63,7 +73,7 @@ module windowHelper(x, y, z, name) {
);
}
translate([ x, y + 0.6, 4 ]) rotate([ 90, 0, 0 ]) linear_extrude(height = 1.6) text(
translate([ x, y + 1, 4 ]) rotate([ 90, 0, 0 ]) linear_extrude(height = 1.2) text(
name,
size = 4,
font = "Arial:style=Bold",

View File

@@ -1,7 +1,8 @@
include <BOSL2/std.scad>
use <../Box-Lid.scad>
use <../Color.scad>
difference() {
makeColor("yellow") difference() {
union() {
boxLid(178, 38);
translate([ 92.95, 21.2, 0 ]) cube([ 85.1, 16.8, 2 ], false); // frame area around card pocket

View File

@@ -1,6 +1,8 @@
include <BOSL2/std.scad>
use <../Box.scad>
use <../Color.scad>
makeColor("yellow") {
difference() {
box(178, 38, 20);
translate([96.75, -1, -1]) cube([79.4, 13, 41], false); // clean area for card pocket
@@ -52,3 +54,4 @@ difference() {
translate([178, 0, 0]) mirror([1, 0, 0]) sideCut(43);
}
}

View File

@@ -1,7 +1,8 @@
include <BOSL2/std.scad>
use <../Box.scad>
use <../Color.scad>
difference() {
makeColor("yellow") difference() {
difference() {
// base
cuboid(
@@ -24,8 +25,8 @@ difference() {
translate([ 178, 0, 29.5 ]) mirror([ 1, 0, 0 ]) mirror([ 0, 0, 1 ]) sideCut(43); // right upper
// inner
translate([ 6 , 19, 16.5 ]) rotate(90, [ 0, 1, 0 ]) cylinder(h = 51, r = 13, center = false); // Helden
translate([ 6 , 6, 16.5 ]) cube([ 51, 26, 15 ]); // Helden
translate([ 6 , 19, 16.5 ]) rotate(90, [ 0, 1, 0 ]) cylinder(h = 52, r = 13, center = false); // Helden
translate([ 6 , 6, 16.5 ]) cube([ 52, 26, 15 ]); // Helden
translate([ 59.5 , 19, 14 ]) rotate(90, [ 0, 1, 0 ]) cylinder(h = 21, r = 13, center = false); // Portale
translate([ 59.5 , 6, 16.5 ]) cube([ 21, 26, 15 ]); // Portale
translate([ 83 , 18.5, 14 ]) rotate(90, [ 0, 1, 0 ]) cylinder(h = 12, r = 13.5, center = false); // Rest rund