Compare commits

...

2 Commits

Author SHA1 Message Date
7ed36ef273 Small Worlds - Races 2026-05-20 11:22:54 +02:00
17f110f2bd Color
adapt design to have text in second color
2026-05-20 10:41:04 +02:00
35 changed files with 872 additions and 143 deletions

4
.gitignore vendored
View File

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

View File

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

47
.helperSmallWorld.sh Executable file
View File

@@ -0,0 +1,47 @@
COLORSCAD="../colorscad/colorscad.sh"
FOLDER=Generated/SmallWorld
echo "Rendering Small World"boardgame insert
mkdir -p Generated
mkdir -p $FOLDER
# ── Races ─────────────────────────────────────────────────────────────
mkdir -p $FOLDER/Race
echo "Rendering Race-Box-Amazonen..."
"$COLORSCAD" -o "$FOLDER/Race/Race-Box-Amazonen.3mf" -i "./SmallWorld/Race-Box-Amazonen.scad"
echo "Rendering Race-Box-Elben..."
"$COLORSCAD" -o "$FOLDER/Race/Race-Box-Elben.3mf" -i "./SmallWorld/Race-Box-Elben.scad"
echo "Rendering Race-Box-Ghule..."
"$COLORSCAD" -o "$FOLDER/Race/Race-Box-Ghule.3mf" -i "./SmallWorld/Race-Box-Ghule.scad"
echo "Rendering Race-Box-Halblinge..."
"$COLORSCAD" -o "$FOLDER/Race/Race-Box-Halblinge.3mf" -i "./SmallWorld/Race-Box-Halblinge.scad"
echo "Rendering Race-Box-Hexenmeister..."
"$COLORSCAD" -o "$FOLDER/Race/Race-Box-Hexenmeister.3mf" -i "./SmallWorld/Race-Box-Hexenmeister.scad"
echo "Rendering Race-Box-Mensch..."
"$COLORSCAD" -o "$FOLDER/Race/Race-Box-Mensch.3mf" -i "./SmallWorld/Race-Box-Mensch.scad"
echo "Rendering Race-Box-Orks..."
"$COLORSCAD" -o "$FOLDER/Race/Race-Box-Orks.3mf" -i "./SmallWorld/Race-Box-Orks.scad"
echo "Rendering Race-Box-Skelette..."
"$COLORSCAD" -o "$FOLDER/Race/Race-Box-Skelette.3mf" -i "./SmallWorld/Race-Box-Skelette.scad"
echo "Rendering Race-Box-Rattenmenschen..."
"$COLORSCAD" -o "$FOLDER/Race/Race-Box-Rattenmenschen.3mf" -i "./SmallWorld/Race-Box-Rattenmenschen.scad"
echo "Rendering Race-Box-Riesen..."
"$COLORSCAD" -o "$FOLDER/Race/Race-Box-Riesen.3mf" -i "./SmallWorld/Race-Box-Riesen.scad"
echo "Rendering Race-Box-Trolle..."
"$COLORSCAD" -o "$FOLDER/Race/Race-Box-Trolle.3mf" -i "./SmallWorld/Race-Box-Trolle.scad"
echo "Rendering Race-Box-Untergegangene-Staemme..."
"$COLORSCAD" -o "$FOLDER/Race/Race-Box-Untergegangene-Staemme.3mf" -i "./SmallWorld/Race-Box-Untergegangene-Staemme.scad"
echo "Rendering Race-Box-Wassermaenner..."
"$COLORSCAD" -o "$FOLDER/Race/Race-Box-Wassermaenner.3mf" -i "./SmallWorld/Race-Box-Wassermaenner.scad"
echo "Rendering Race-Box-Zauberer..."
"$COLORSCAD" -o "$FOLDER/Race/Race-Box-Zauberer.3mf" -i "./SmallWorld/Race-Box-Zauberer.scad"
echo "Rendering Race-Box-Zwerge..."
"$COLORSCAD" -o "$FOLDER/Race/Race-Box-Zwerge.3mf" -i "./SmallWorld/Race-Box-Zwerge.scad"
echo "Rendering Race-Lid-Lower..."
"$COLORSCAD" -o "$FOLDER/Race/Race-Lid-Lower.3mf" -i "./SmallWorld/Race-Lid-Lower.scad"
echo "Rendering Race-Lid-Upper..."
"$COLORSCAD" -o "$FOLDER/Race/Race-Lid-Upper.3mf" -i "./SmallWorld/Race-Lid-Upper.scad"

View File

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

View File

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

View File

@@ -1,4 +1,5 @@
include <BOSL2/std.scad> include <BOSL2/std.scad>
use <Color.scad>
// Parameter for console overwrite // Parameter for console overwrite
x = 58; x = 58;
@@ -6,7 +7,10 @@ y = 5;
z = 88; z = 88;
name = "Cards"; 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) { module cardHolder(x, y, z, name) {
@@ -80,7 +84,7 @@ module cardHolder(x, y, z, name) {
edges = RIGHT + TOP 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( 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> include <BOSL2/std.scad>
use <../Color.scad>
boxHelper(45, 39, 53, "Sensenmann", "Steintroll", "König Schleim"); boxHelper(45, 39, 53, "Drache", "Gorgone", "Träumer");
translate([ 88.5, 39, 0 ]) zrot(180, cp=[0, 0, 0]) 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) { module boxHelper(x, y, z, frontName, middleName, backName) {
difference() { makeColor("yellow") difference() {
cube([ x, y, z ], false); cube([ x, y, z ], false);
translate([ 1.5, 1.5, 1.5 ]) cube([ x - 3, y - 3, z - 1 ], 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); 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, middleName,
size = 4, size = 4,
font = "Arial:style=Bold", font = "Arial:style=Bold",
halign="center" 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) { 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, name,
size = 4, size = 4,
font = "Arial:style=Bold", font = "Arial:style=Bold",

View File

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

View File

@@ -1,5 +1,7 @@
include <BOSL2/std.scad> include <BOSL2/std.scad>
use <../Color.scad>
makeColor("yellow") {
difference() { difference() {
cube([ 175, 55, 37 ], false); cube([ 175, 55, 37 ], false);
translate([ 1.5, 1.5, 1.5 ]) cube([ 172, 52, 36 ], 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([ 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([ 137.5, 1.5, 1.5]) cube([1, 52, 5.5], false);
translate([ 163, 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) { module window(x, y, z, name) {
windowHelper(x, 0, 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, name,
size = 4, size = 4,
font = "Arial:style=Bold", font = "Arial:style=Bold",

View File

@@ -1,11 +1,70 @@
include <BOSL2/std.scad> include <BOSL2/std.scad>
use <../Color.scad>
// Parameter for console overwrite // Parameter for console overwrite
x = 172; x = 172;
y = 84; y = 84;
z = 35.5; 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) { module figureHolder(x, y, z) {
difference() { 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); 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", "Rattenvolk",
size = 4, size = 4,
font = "Arial:style=Bold", font = "Arial:style=Bold",
halign="center", halign="center",
valign="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", "Unholde",
size = 4, size = 4,
font = "Arial:style=Bold", font = "Arial:style=Bold",
halign="center", halign="center",
valign="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", "Gnoll",
size = 4, size = 4,
font = "Arial:style=Bold", font = "Arial:style=Bold",
halign="center", halign="center",
valign="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", "Skelette",
size = 4, size = 4,
font = "Arial:style=Bold", font = "Arial:style=Bold",
halign="center", halign="center",
valign="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", "Echsenvolk",
size = 4, size = 4,
font = "Arial:style=Bold", font = "Arial:style=Bold",
halign="center", halign="center",
valign="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", "Hexen",
size = 4, size = 4,
font = "Arial:style=Bold", font = "Arial:style=Bold",
halign="center", halign="center",
valign="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", "Feen",
size = 4, size = 4,
font = "Arial:style=Bold", 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([ 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 translate([ 128.5, 81.5, 0 ]) cube([ 42, 1.5, 6.5], false); // Feen
/*
*/
} }
module window(x, y, z, name) { 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, name,
size = 4, size = 4,
font = "Arial:style=Bold", font = "Arial:style=Bold",

View File

@@ -1,4 +1,5 @@
include <BOSL2/std.scad> include <BOSL2/std.scad>
use <../Color.scad>
x = 28; x = 28;
y = 29; y = 29;
@@ -6,9 +7,18 @@ z = 28;
name = "Figure"; name = "Figure";
figureBox(x + 3, y + 3, z + 1.5, name); 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) { module figureBox(x, y, z, name) {
difference() { makeColor("yellow") difference() {
cube([ x, y, z ], false); cube([ x, y, z ], false);
translate([ 1.5, 1.5, 1.5 ]) cube([ x - 3, y - 3, z - 1 ], 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, name,
size = 4, size = 4,
font = "Arial:style=Bold", font = "Arial:style=Bold",

View File

@@ -1,7 +1,8 @@
include <BOSL2/std.scad> include <BOSL2/std.scad>
use <../Box-Lid.scad> use <../Box-Lid.scad>
use <../Color.scad>
difference() { makeColor("yellow") difference() {
union() { union() {
boxLid(178, 38); boxLid(178, 38);
translate([ 92.95, 21.2, 0 ]) cube([ 85.1, 16.8, 2 ], false); // frame area around card pocket 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> include <BOSL2/std.scad>
use <../Box.scad> use <../Box.scad>
use <../Color.scad>
makeColor("yellow") {
difference() { difference() {
box(178, 38, 20); box(178, 38, 20);
translate([96.75, -1, -1]) cube([79.4, 13, 41], false); // clean area for card pocket 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); translate([178, 0, 0]) mirror([1, 0, 0]) sideCut(43);
} }
}

View File

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

43
Polygon.scad Normal file
View File

@@ -0,0 +1,43 @@
function vsub(a, b) = [a[0]-b[0], a[1]-b[1]];
function vadd(a, b) = [a[0]+b[0], a[1]+b[1]];
function vlen(v) = sqrt(v[0]*v[0] + v[1]*v[1]);
function vang(v) = atan2(v[1], v[0]);
function norm_angle(a) = a < 0 ? a + 360 : a;
function arc_points(c, p1, p2, steps=24, ccw=true) =
let(
a1 = norm_angle(vang(vsub(p1, c))),
a2 = norm_angle(vang(vsub(p2, c))),
r = vlen(vsub(p1, c)),
delta =
ccw
? (a2 >= a1 ? a2 - a1 : a2 + 360 - a1)
: (a1 >= a2 ? a1 - a2 : a1 + 360 - a2),
dir = ccw ? 1 : -1
)
[ for (i = [0:steps])
let(a = a1 + dir * delta * i / steps)
[ c[0] + r * cos(a), c[1] + r * sin(a) ]
];
module loft_between(polya, polyb, z0=0, z1=20) {
n = len(polya);
assert(n == len(polyb), "Polygons must have same number of vertices");
pts = concat(
[ for (p = polya) [p[0], p[1], z0] ],
[ for (p = polyb) [p[0], p[1], z1] ]
);
side_faces = [ for (i = [0:n-1]) [i, (i+1)%n, n+(i+1)%n, n+i] ];
bottom_cap = [for (i = [n-1:-1:0]) i];
top_cap = [for (i = [0:n-1]) n + i];
polyhedron(
points = pts,
faces = concat(side_faces, [bottom_cap], [top_cap]),
convexity = 10
);
}

View File

@@ -0,0 +1,17 @@
include <BOSL2/std.scad>
use <../Color.scad>
use <Race-Box.scad>
difference () {
raceBox(10, "Amazonen", 6);
translate([ 5.5, 12.25, 2 ]) cuboid([ 28, 28, 9 ], anchor = [ -1, -1, -1 ]);
translate([ 38.5, 12.25, 2 ]) cuboid([ 28, 28, 11 ], anchor = [ -1, -1, -1 ]);
translate([ 71.5, 12.25, 2 ]) cuboid([ 28, 28, 11 ], anchor = [ -1, -1, -1 ]);
translate([ 104.5, 12.25, 4 ]) cuboid([ 28, 28, 9 ], anchor = [ -1, -1, -1 ]);
translate([ 19.5, 26.25, -1 ]) cylinder(h = 14, r = 10, center = false);
translate([ 52.5, 26.25, -1 ]) cylinder(h = 14, r = 10, center = false);
translate([ 85.5, 26.25, -1 ]) cylinder(h = 14, r = 10, center = false);
translate([ 118.5, 26.25, -1 ]) cylinder(h = 14, r = 10, center = false);
}

View File

@@ -0,0 +1,17 @@
include <BOSL2/std.scad>
use <../Color.scad>
use <Race-Box.scad>
difference () {
raceBox(8, "Elben", 5);
translate([ 5.5, 12.25, 2 ]) cuboid([ 28, 28, 9 ], anchor = [ -1, -1, -1 ]);
translate([ 38.5, 12.25, 2 ]) cuboid([ 28, 28, 11 ], anchor = [ -1, -1, -1 ]);
translate([ 71.5, 12.25, 2 ]) cuboid([ 28, 28, 11 ], anchor = [ -1, -1, -1 ]);
translate([ 104.5, 12.25, 4 ]) cuboid([ 28, 28, 9 ], anchor = [ -1, -1, -1 ]);
translate([ 19.5, 26.25, -1 ]) cylinder(h = 14, r = 10, center = false);
translate([ 52.5, 26.25, -1 ]) cylinder(h = 14, r = 10, center = false);
translate([ 85.5, 26.25, -1 ]) cylinder(h = 14, r = 10, center = false);
translate([ 118.5, 26.25, -1 ]) cylinder(h = 14, r = 10, center = false);
}

View File

@@ -0,0 +1,17 @@
include <BOSL2/std.scad>
use <../Color.scad>
use <Race-Box.scad>
difference () {
raceBox(8, "Ghule", 5);
translate([ 5.5, 12.25, 4 ]) cuboid([ 28, 28, 9 ], anchor = [ -1, -1, -1 ]);
translate([ 38.5, 12.25, 2 ]) cuboid([ 28, 28, 11 ], anchor = [ -1, -1, -1 ]);
translate([ 71.5, 12.25, 2 ]) cuboid([ 28, 28, 11 ], anchor = [ -1, -1, -1 ]);
translate([ 104.5, 12.25, 4 ]) cuboid([ 28, 28, 9 ], anchor = [ -1, -1, -1 ]);
translate([ 19.5, 26.25, -1 ]) cylinder(h = 14, r = 10, center = false);
translate([ 52.5, 26.25, -1 ]) cylinder(h = 14, r = 10, center = false);
translate([ 85.5, 26.25, -1 ]) cylinder(h = 14, r = 10, center = false);
translate([ 118.5, 26.25, -1 ]) cylinder(h = 14, r = 10, center = false);
}

View File

@@ -0,0 +1,17 @@
include <BOSL2/std.scad>
use <../Color.scad>
use <Race-Box.scad>
difference () {
raceBox(10, "Halblinge", 6);
translate([ 5.5, 15, 2 ]) cuboid([ 28, 28, 11 ], anchor = [ -1, -1, -1 ]);
translate([ 38.5, 15, 4 ]) cuboid([ 28, 28, 11 ], anchor = [ -1, -1, -1 ]);
translate([ 71.5, 15, 4 ]) cuboid([ 28, 28, 11 ], anchor = [ -1, -1, -1 ]);
translate([ 104.5, 15, 4 ]) cuboid([ 28, 28, 11 ], anchor = [ -1, -1, -1 ]);
translate([ 19.5, 29, -1 ]) cylinder(h = 14, r = 10, center = false);
translate([ 52.5, 29, -1 ]) cylinder(h = 14, r = 10, center = false);
translate([ 85.5, 29, -1 ]) cylinder(h = 14, r = 10, center = false);
translate([ 118.5, 29, -1 ]) cylinder(h = 14, r = 10, center = false);
}

View File

@@ -0,0 +1,17 @@
include <BOSL2/std.scad>
use <../Color.scad>
use <Race-Box.scad>
difference () {
raceBox(12, "Hexenmeister", 8);
translate([ 5.5, 12.25, 4 ]) cuboid([ 28, 28, 9 ], anchor = [ -1, -1, -1 ]);
translate([ 38.5, 12.25, 2 ]) cuboid([ 28, 28, 11 ], anchor = [ -1, -1, -1 ]);
translate([ 71.5, 12.25, 2 ]) cuboid([ 28, 28, 11 ], anchor = [ -1, -1, -1 ]);
translate([ 104.5, 12.25, 4 ]) cuboid([ 28, 28, 9 ], anchor = [ -1, -1, -1 ]);
translate([ 19.5, 26.25, -1 ]) cylinder(h = 14, r = 10, center = false);
translate([ 52.5, 26.25, -1 ]) cylinder(h = 14, r = 10, center = false);
translate([ 85.5, 26.25, -1 ]) cylinder(h = 14, r = 10, center = false);
translate([ 118.5, 26.25, -1 ]) cylinder(h = 14, r = 10, center = false);
}

View File

@@ -0,0 +1,17 @@
include <BOSL2/std.scad>
use <../Color.scad>
use <Race-Box.scad>
difference () {
raceBox(8, "Mensch", 5);
translate([ 5.5, 12.25, 4 ]) cuboid([ 28, 28, 9 ], anchor = [ -1, -1, -1 ]);
translate([ 38.5, 12.25, 2 ]) cuboid([ 28, 28, 11 ], anchor = [ -1, -1, -1 ]);
translate([ 71.5, 12.25, 2 ]) cuboid([ 28, 28, 11 ], anchor = [ -1, -1, -1 ]);
translate([ 104.5, 12.25, 4 ]) cuboid([ 28, 28, 9 ], anchor = [ -1, -1, -1 ]);
translate([ 19.5, 26.25, -1 ]) cylinder(h = 14, r = 10, center = false);
translate([ 52.5, 26.25, -1 ]) cylinder(h = 14, r = 10, center = false);
translate([ 85.5, 26.25, -1 ]) cylinder(h = 14, r = 10, center = false);
translate([ 118.5, 26.25, -1 ]) cylinder(h = 14, r = 10, center = false);
}

View File

@@ -0,0 +1,17 @@
include <BOSL2/std.scad>
use <../Color.scad>
use <Race-Box.scad>
difference () {
raceBox(8, "Orks", 5);
translate([ 5.5, 12.25, 4 ]) cuboid([ 28, 28, 9 ], anchor = [ -1, -1, -1 ]);
translate([ 38.5, 12.25, 2 ]) cuboid([ 28, 28, 11 ], anchor = [ -1, -1, -1 ]);
translate([ 71.5, 12.25, 2 ]) cuboid([ 28, 28, 11 ], anchor = [ -1, -1, -1 ]);
translate([ 104.5, 12.25, 4 ]) cuboid([ 28, 28, 9 ], anchor = [ -1, -1, -1 ]);
translate([ 19.5, 26.25, -1 ]) cylinder(h = 14, r = 10, center = false);
translate([ 52.5, 26.25, -1 ]) cylinder(h = 14, r = 10, center = false);
translate([ 85.5, 26.25, -1 ]) cylinder(h = 14, r = 10, center = false);
translate([ 118.5, 26.25, -1 ]) cylinder(h = 14, r = 10, center = false);
}

View File

@@ -0,0 +1,17 @@
include <BOSL2/std.scad>
use <../Color.scad>
use <Race-Box.scad>
difference () {
raceBox(12, "Rattenmenschen", 8);
translate([ 5.5, 12.25, 4 ]) cuboid([ 28, 28, 9 ], anchor = [ -1, -1, -1 ]);
translate([ 38.5, 12.25, 2 ]) cuboid([ 28, 28, 11 ], anchor = [ -1, -1, -1 ]);
translate([ 71.5, 12.25, 2 ]) cuboid([ 28, 28, 11 ], anchor = [ -1, -1, -1 ]);
translate([ 104.5, 12.25, 4 ]) cuboid([ 28, 28, 9 ], anchor = [ -1, -1, -1 ]);
translate([ 19.5, 26.25, -1 ]) cylinder(h = 14, r = 10, center = false);
translate([ 52.5, 26.25, -1 ]) cylinder(h = 14, r = 10, center = false);
translate([ 85.5, 26.25, -1 ]) cylinder(h = 14, r = 10, center = false);
translate([ 118.5, 26.25, -1 ]) cylinder(h = 14, r = 10, center = false);
}

View File

@@ -0,0 +1,17 @@
include <BOSL2/std.scad>
use <../Color.scad>
use <Race-Box.scad>
difference () {
raceBox(8, "Riesen", 5);
translate([ 5.5, 12.25, 2 ]) cuboid([ 28, 28, 9 ], anchor = [ -1, -1, -1 ]);
translate([ 38.5, 12.25, 2 ]) cuboid([ 28, 28, 11 ], anchor = [ -1, -1, -1 ]);
translate([ 71.5, 12.25, 2 ]) cuboid([ 28, 28, 11 ], anchor = [ -1, -1, -1 ]);
translate([ 104.5, 12.25, 4 ]) cuboid([ 28, 28, 9 ], anchor = [ -1, -1, -1 ]);
translate([ 19.5, 26.25, -1 ]) cylinder(h = 14, r = 10, center = false);
translate([ 52.5, 26.25, -1 ]) cylinder(h = 14, r = 10, center = false);
translate([ 85.5, 26.25, -1 ]) cylinder(h = 14, r = 10, center = false);
translate([ 118.5, 26.25, -1 ]) cylinder(h = 14, r = 10, center = false);
}

View File

@@ -0,0 +1,17 @@
include <BOSL2/std.scad>
use <../Color.scad>
use <Race-Box.scad>
difference () {
raceBox(12, "Skelette", 8);
translate([ 5.5, 12.25, 2 ]) cuboid([ 28, 28, 11 ], anchor = [ -1, -1, -1 ]);
translate([ 38.5, 12.25, 2 ]) cuboid([ 28, 28, 11 ], anchor = [ -1, -1, -1 ]);
translate([ 71.5, 12.25, 2 ]) cuboid([ 28, 28, 11 ], anchor = [ -1, -1, -1 ]);
translate([ 104.5, 12.25, 2 ]) cuboid([ 28, 28, 11 ], anchor = [ -1, -1, -1 ]);
translate([ 19.5, 26.25, -1 ]) cylinder(h = 14, r = 10, center = false);
translate([ 52.5, 26.25, -1 ]) cylinder(h = 14, r = 10, center = false);
translate([ 85.5, 26.25, -1 ]) cylinder(h = 14, r = 10, center = false);
translate([ 118.5, 26.25, -1 ]) cylinder(h = 14, r = 10, center = false);
}

View File

@@ -0,0 +1,21 @@
include <BOSL2/std.scad>
use <../Color.scad>
use <Race-Box.scad>
difference () {
raceBox(16, "Trolle", 10);
translate([ 5.5, 12.25, 4 ]) cuboid([ 28, 28, 15 ], anchor = [ -1, -1, -1 ]);
translate([ 38.5, 12.25, 2 ]) cuboid([ 28, 28, 15 ], anchor = [ -1, -1, -1 ]);
translate([ 71.5, 12.25, 2 ]) cuboid([ 28, 28, 15 ], anchor = [ -1, -1, -1 ]);
translate([ 104.5, 12.25, 4 ]) cuboid([ 28, 28, 15 ], anchor = [ -1, -1, -1 ]);
translate([ 5.5, 7.25, 8 ]) cuboid([ 38, 38, 9 ], anchor = [ -1, -1, -1 ]);
translate([ 50, 7.25, 8 ]) cuboid([ 38, 38, 11 ], anchor = [ -1, -1, -1 ]);
translate([ 94.5, 7.25, 10 ]) cuboid([ 38, 38, 9 ], anchor = [ -1, -1, -1 ]);
translate([ 19.5, 26.25, -1 ]) cylinder(h = 16, r = 10, center = false);
translate([ 52.5, 26.25, -1 ]) cylinder(h = 16, r = 10, center = false);
translate([ 85.5, 26.25, -1 ]) cylinder(h = 16, r = 10, center = false);
translate([ 118.5, 26.25, -1 ]) cylinder(h = 16, r = 10, center = false);
}

View File

@@ -0,0 +1,17 @@
include <BOSL2/std.scad>
use <../Color.scad>
use <Race-Box.scad>
difference () {
raceBox(12, "Untergegangene Stämme", 6);
translate([ 5.5, 12.25, 4 ]) cuboid([ 28, 28, 11 ], anchor = [ -1, -1, -1 ]);
translate([ 38.5, 12.25, 2 ]) cuboid([ 28, 28, 11 ], anchor = [ -1, -1, -1 ]);
translate([ 71.5, 12.25, 2 ]) cuboid([ 28, 28, 11 ], anchor = [ -1, -1, -1 ]);
translate([ 104.5, 12.25, 4 ]) cuboid([ 28, 28, 11 ], anchor = [ -1, -1, -1 ]);
translate([ 19.5, 26.25, -1 ]) cylinder(h = 14, r = 10, center = false);
translate([ 52.5, 26.25, -1 ]) cylinder(h = 14, r = 10, center = false);
translate([ 85.5, 26.25, -1 ]) cylinder(h = 14, r = 10, center = false);
translate([ 118.5, 26.25, -1 ]) cylinder(h = 14, r = 10, center = false);
}

View File

@@ -0,0 +1,17 @@
include <BOSL2/std.scad>
use <../Color.scad>
use <Race-Box.scad>
difference () {
raceBox(8, "Wassermänner", 5);
translate([ 5.5, 12.25, 2 ]) cuboid([ 28, 28, 9 ], anchor = [ -1, -1, -1 ]);
translate([ 38.5, 12.25, 2 ]) cuboid([ 28, 28, 11 ], anchor = [ -1, -1, -1 ]);
translate([ 71.5, 12.25, 2 ]) cuboid([ 28, 28, 11 ], anchor = [ -1, -1, -1 ]);
translate([ 104.5, 12.25, 4 ]) cuboid([ 28, 28, 9 ], anchor = [ -1, -1, -1 ]);
translate([ 19.5, 26.25, -1 ]) cylinder(h = 14, r = 10, center = false);
translate([ 52.5, 26.25, -1 ]) cylinder(h = 14, r = 10, center = false);
translate([ 85.5, 26.25, -1 ]) cylinder(h = 14, r = 10, center = false);
translate([ 118.5, 26.25, -1 ]) cylinder(h = 14, r = 10, center = false);
}

View File

@@ -0,0 +1,17 @@
include <BOSL2/std.scad>
use <../Color.scad>
use <Race-Box.scad>
difference () {
raceBox(8, "Zauberer", 5);
translate([ 5.5, 12.25, 4 ]) cuboid([ 28, 28, 9 ], anchor = [ -1, -1, -1 ]);
translate([ 38.5, 12.25, 2 ]) cuboid([ 28, 28, 11 ], anchor = [ -1, -1, -1 ]);
translate([ 71.5, 12.25, 2 ]) cuboid([ 28, 28, 11 ], anchor = [ -1, -1, -1 ]);
translate([ 104.5, 12.25, 4 ]) cuboid([ 28, 28, 9 ], anchor = [ -1, -1, -1 ]);
translate([ 19.5, 26.25, -1 ]) cylinder(h = 14, r = 10, center = false);
translate([ 52.5, 26.25, -1 ]) cylinder(h = 14, r = 10, center = false);
translate([ 85.5, 26.25, -1 ]) cylinder(h = 14, r = 10, center = false);
translate([ 118.5, 26.25, -1 ]) cylinder(h = 14, r = 10, center = false);
}

View File

@@ -0,0 +1,17 @@
include <BOSL2/std.scad>
use <../Color.scad>
use <Race-Box.scad>
difference () {
raceBox(6, "Zwerge", 3);
translate([ 5.5, 12.25, 2 ]) cuboid([ 28, 28, 11 ], anchor = [ -1, -1, -1 ]);
translate([ 38.5, 12.25, 2 ]) cuboid([ 28, 28, 11 ], anchor = [ -1, -1, -1 ]);
translate([ 71.5, 12.25, 2 ]) cuboid([ 28, 28, 11 ], anchor = [ -1, -1, -1 ]);
translate([ 104.5, 12.25, 2 ]) cuboid([ 28, 28, 11 ], anchor = [ -1, -1, -1 ]);
translate([ 19.5, 26.25, -1 ]) cylinder(h = 14, r = 10, center = false);
translate([ 52.5, 26.25, -1 ]) cylinder(h = 14, r = 10, center = false);
translate([ 85.5, 26.25, -1 ]) cylinder(h = 14, r = 10, center = false);
translate([ 118.5, 26.25, -1 ]) cylinder(h = 14, r = 10, center = false);
}

48
SmallWorld/Race-Box.scad Normal file
View File

@@ -0,0 +1,48 @@
include <BOSL2/std.scad>
use <../Color.scad>
use <../Box.scad>
raceBox(12, "Test", 8);
module raceBox(z, name, fontSize) {
raceBoxHelper(138, 53.5, z, name, fontSize);
nameHelper(138, z, name, fontSize);
}
module raceBoxHelper(x, y, z, name, fontSize) {
makeColor("yellow") difference() {
cuboid(
[ x, y, z],
anchor = [ -1, -1, -1 ],
rounding = 1,
edges = [
BOTTOM,
FRONT+LEFT,
FRONT+RIGHT,
BACK+LEFT,
BACK+RIGHT
]
);
translate([0, 0, z]) mirror([0, 0, 1]) sideCut(y); // left upper
translate([x, 0, z]) mirror([1, 0, 0]) mirror([0, 0, 1]) sideCut(y); // right upper
translate([ x / 2, 1, z / 2 ]) rotate([ 90, 0, 0 ]) linear_extrude(height = 1.1) text(
name,
size = fontSize,
font = "Arial:style=Bold",
halign="center",
valign="center"
);
}
}
module nameHelper(x, z, name, fontSize) {
makeColor("white") translate([ x / 2, 1, z / 2 ]) rotate([ 90, 0, 0 ]) linear_extrude(height = 0.2) text(
name,
size = fontSize,
font = "Arial:style=Bold",
halign="center",
valign="center"
);
}

View File

@@ -0,0 +1,99 @@
include <BOSL2/std.scad>
use <../Color.scad>
use <../Polygon.scad>
raceLidLower(131, 53.5, 3);
module raceLidLower(x, y, z) {
makeColor("yellow") difference() {
cube([ x, y, z ], false);
translate([ 24, 26.75, -1 ]) cylinder(h = 4, r = 10, center = false);
translate([ 0, 0, 1 ]) linear_extrude(height=3) polygon(points=leftLower);
//translate([ 0, 0, 2 ]) hull() {
// linear_extrude(height=0.1) polygon(points=leftLower);
// translate([0,0,1.0]) linear_extrude(height=0.1) polygon(points=leftUpper);
//}
translate([ 0, 0, 2 ]) loft_between(leftLower, leftUpper, 0, 1.01);
translate([ 0, 0, -1 ]) linear_extrude(height=5) polygon(points=rightLower);
translate([ 0, 0, 1 ]) linear_extrude(height=3) polygon(points=rightUpper);
translate([3.9, 0.9, -1]) rotate([ 0, 0, 45 ]) cuboid(
[ 3.2, 4.7, 5 ],
anchor = [ -1, -1, -1 ],
rounding = 1,
edges = [
FRONT+LEFT,
FRONT+RIGHT,
BACK+LEFT,
BACK+RIGHT
]
);
translate([0.4, 50.1, -1]) rotate([ 0, 0, -45 ]) cuboid(
[ 3.2, 4.7, 5 ],
anchor = [ -1, -1, -1 ],
rounding = 1,
edges = [
FRONT+LEFT,
FRONT+RIGHT,
BACK+LEFT,
BACK+RIGHT
]
);
translate([124.9, 2.9, -1]) rotate([ 0, 0, -45 ]) cuboid(
[ 3.2, 4.7, 5 ],
anchor = [ -1, -1, -1 ],
rounding = 1,
edges = [
FRONT+LEFT,
FRONT+RIGHT,
BACK+LEFT,
BACK+RIGHT
]
);
translate([127.9, 46.9, -1]) rotate([ 0, 0, 45 ]) cuboid(
[ 3.2, 4.7, 5 ],
anchor = [ -1, -1, -1 ],
rounding = 1,
edges = [
FRONT+LEFT,
FRONT+RIGHT,
BACK+LEFT,
BACK+RIGHT
]
);
}
}
leftLower = concat(
arc_points([ 11.82, 11.82 ], [ 11.75, 3.8 ], [ 3.6, 11.75 ], steps=30, ccw=false),
arc_points([ 9.24, 44.26 ], [ 3.6, 44.25 ], [ 9.25, 49.5 ], steps=30, ccw=false),
[[ 39.46, 49.5 ]],
arc_points([ 25.7, 26.6 ], [ 40.15, 45.45 ], [ 43.75, 11.15 ], steps=30, ccw=false),
[[ 44.5, 3.8 ]]
);
leftUpper = concat(
[[ 45.65, 2.8 ]],
arc_points([ 11.82, 11.82 ], [ 11.75, 2.8 ], [ 2.6, 11.75 ], steps=30, ccw=false),
arc_points([ 9.24, 44.26 ], [ 2.6, 44.25 ], [ 9.25, 50.5 ], steps=30, ccw=false),
[[ 40.3, 50.5 ]],
arc_points([ 25.7, 26.6 ], [ 41.09, 46 ], [ 44.78, 10.81 ], steps=30, ccw=false)
);
rightLower = concat(
[[ 43.88, 47.5 ]],
arc_points([ 104.21, 26.67 ], [ 104.5, 47.5 ], [ 125.44, 26.75 ], steps=30, ccw=false),
arc_points([ 119.25, 11.75 ], [ 125.44, 11.75 ], [ 119.3, 5.8 ], steps=30, ccw=false),
[[ 48.36, 5.8 ]],
arc_points([ 28.22, 26.60 ], [ 47.84, 10.66 ], [ 44.09, 46.27 ], steps=30, ccw=true)
);
rightUpper = concat(
[[ 41.7, 49.6 ]],
arc_points([ 104.21, 26.67 ], [ 104.5, 49.6 ], [ 127.44, 26.75 ], steps=30, ccw=false),
arc_points([ 119.25, 11.75 ], [ 127.44, 11.75 ], [ 119.3, 3.9 ], steps=30, ccw=false),
[[ 46.36, 3.9 ]],
arc_points([ 28.22, 26.60 ], [ 45.84, 10.66 ], [ 42.60, 45.30 ], steps=30, ccw=true)
);

View File

@@ -0,0 +1,108 @@
include <BOSL2/std.scad>
use <../Color.scad>
use <../Polygon.scad>
use <../Box-Lid.scad>
raceLidUpper(138, 53.5, 3);
module raceLidUpper(x, y, z) {
makeColor("yellow") {
translate([ 0, y, z ]) rotate([ 180, 0, 0 ]) {
difference() {
cube([ x, y, z], false);
translate([ 3.5, 0, -1 ]) linear_extrude(height=5) polygon(points=leftLower);
translate([ 3.5, 0, 2 ]) loft_between(leftLower, leftUpper, 0, 1.01);
translate([ 3.5, 0, -1 ]) linear_extrude(height=5) polygon(points=rightLower);
translate([ 3.5, 0, 2 ]) loft_between(rightLower, rightUpper, 0, 1.01);
}
translate([ 7.5, 1, -3 ]) rotate([ 0, 0, 45 ]) cuboid(
[ 3, 4.5, 3 ],
anchor = [ -1, -1, -1 ],
rounding = 1,
edges = [
BOTTOM,
FRONT+LEFT,
FRONT+RIGHT,
BACK+LEFT,
BACK+RIGHT
]
);
translate([4, 50, -3]) rotate([ 0, 0, -45 ]) cuboid(
[ 3, 4.5, 3 ],
anchor = [ -1, -1, -1 ],
rounding = 1,
edges = [
BOTTOM,
FRONT+LEFT,
FRONT+RIGHT,
BACK+LEFT,
BACK+RIGHT
]
);
translate([128.5, 3, -3]) rotate([ 0, 0, -45 ]) cuboid(
[ 3, 4.5, 3 ],
anchor = [ -1, -1, -1 ],
rounding = 1,
edges = [
BOTTOM,
FRONT+LEFT,
FRONT+RIGHT,
BACK+LEFT,
BACK+RIGHT
]
);
translate([131.5, 47, -3]) rotate([ 0, 0, 45 ]) cuboid(
[ 3, 4.5, 3 ],
anchor = [ -1, -1, -1 ],
rounding = 1,
edges = [
BOTTOM,
FRONT+LEFT,
FRONT+RIGHT,
BACK+LEFT,
BACK+RIGHT
]
);
}
translate([ 0, 0 ,3 ]) cube([3, y, 3], false);
translate([ x - 3, 0 ,3 ]) cube([3, y, 3], false);
translate([ 0, 0 ,3 ]) sideCut(y);
translate([ x, 0, 3 ]) mirror([ 1, 0, 0 ]) sideCut(y);
}
}
leftLower = concat(
[[ 45.65, 2.8 ]],
arc_points([ 11.82, 11.82 ], [ 11.75, 2.8 ], [ 2.6, 11.75 ], steps=30, ccw=false),
arc_points([ 9.24, 44.26 ], [ 2.6, 44.25 ], [ 9.25, 50.5 ], steps=30, ccw=false),
[[ 40.3, 50.5 ]],
arc_points([ 25.7, 26.6 ], [ 41.09, 46 ], [ 44.78, 10.81 ], steps=30, ccw=false)
);
leftUpper = concat(
[[ 45.65, 1.8 ]],
arc_points([ 11.82, 11.82 ], [ 11.75, 1.8 ], [ 1.6, 11.75 ], steps=30, ccw=false),
arc_points([ 9.24, 44.26 ], [ 1.6, 44.25 ], [ 9.25, 51.5 ], steps=30, ccw=false),
[[ 40.3, 51.5 ]],
arc_points([ 25.7, 26.6 ], [ 41.09, 46 ], [ 44.78, 10.81 ], steps=30, ccw=false)
);
rightLower = concat(
[[ 43.88, 47.5 ]],
arc_points([ 104.21, 26.67 ], [ 104.5, 47.5 ], [ 125.44, 26.75 ], steps=30, ccw=false),
arc_points([ 119.25, 11.75 ], [ 125.44, 11.75 ], [ 119.3, 5.8 ], steps=30, ccw=false),
[[ 48.36, 5.8 ]],
arc_points([ 28.22, 26.60 ], [ 47.84, 10.66 ], [ 44.09, 46.27 ], steps=30, ccw=true)
);
rightUpper = concat(
[[ 41.7, 49.6 ]],
arc_points([ 104.21, 26.67 ], [ 104.5, 49.6 ], [ 127.44, 26.75 ], steps=30, ccw=false),
arc_points([ 119.25, 11.75 ], [ 127.44, 11.75 ], [ 119.3, 3.9 ], steps=30, ccw=false),
[[ 46.36, 3.9 ]],
arc_points([ 28.22, 26.60 ], [ 45.84, 10.66 ], [ 42.60, 45.30 ], steps=30, ccw=true)
);

View File

@@ -1,7 +1,10 @@
# all all: Small_World Heros_Keep_Out
HerosKeepOut: ./CardHolder.scad Heros_Keep_Out: ./Box-Lid.scad ./Box.scad ./CardHolder.scad
./.helperHerosKeepOut.sh ./.helperHerosKeepOut.sh
Small_World:
./.helperSmallWorld.sh
clean: clean:
rm -r ./STL rm -r ./Generated