initialize makefile for stl generation
This commit is contained in:
2026-03-26 16:14:58 +01:00
parent c3b2309749
commit 442cdacbe8
6 changed files with 96 additions and 2 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/*.stl

21
.helperHeroeasKeepOut.sh Executable file
View File

@@ -0,0 +1,21 @@
OPENSCAD="openscad"
SCAD_FILE="./CardHolder.scad"
FOLDER=STL/HeroesKeepOut/
mkdir -p STL
mkdir -p $FOLDER
# ── Cards ─────────────────────────────────────────────────────────────
while IFS=',' read -r b t h name; do
# Remove quotes around name, replace spaces with -
label=$(printf '%s' "$name" | sed 's/"//g; s/ /-/g')
output="$FOLDER$label.stl"
echo "Rendering $output..."
"$OPENSCAD" \
-D "b=$b" \
-D "t=$t" \
-D "h=$h" \
-D "text_label=\"$name\"" \
-o "$output" "$SCAD_FILE"
done <./HeroesKeepOut/.cardConfigs.txt

55
CardHolder.scad Normal file
View File

@@ -0,0 +1,55 @@
include <BOSL2/std.scad>
// Parameter for console overwrite
b = 58;
t = 14;
h = 88;
name = "Cards";
module cardHolder(b,t,h,name){
// floor
cube([b+4,t+4,1],false);
// left
translate([0,0,1]){
cuboid([1,t+4,h+3], anchor=[-1,-1,-1], rounding=min(10,t+4), edges=FRONT+TOP);
}
// right
translate([b+3,0,1]){
cuboid([1,t+4,h+3], anchor=[-1,-1,-1], rounding=min(10,t+4), edges=FRONT+TOP);
}
// back
translate([1,t+3,1]){
cuboid([10,1,h+3], anchor=[-1,-1,-1], rounding=5, edges=RIGHT+TOP);
translate([b-8,0,0]) {
cuboid([10,1,h+3], anchor=[-1,-1,-1], rounding=5, edges=LEFT+TOP);
}
translate([10,0,0]) {
difference(){
cube([b-18,1,h+3],false);
translate([0,-1,15]) {
cuboid([b-18,3,h-12], anchor=[-1,-1,-1], rounding=10, edges=[LEFT+BOTTOM,RIGHT+BOTTOM]);
}
}
}
}
// front
translate([1,0,1]){
difference(){
cuboid([10,1,h-17], anchor=[-1,-1,-1], rounding=5, 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([b-8,0,0]) {
cuboid([10,1,h-17], anchor=[-1,-1,-1], rounding=5, edges=LEFT+TOP);
}
}
}
cardHolder(b,t,h,name);

View File

@@ -0,0 +1 @@
58,14,88,Test 123

View File

@@ -1,3 +1,12 @@
# BoardGameInlets
# Board game inlets
The creation files for my boardgame inlets. The stl files can be generated using
```
make <GameName>
```
# Available Games
- Heros keep out
Creation Files for Boardgame Inlets

7
makefile Normal file
View File

@@ -0,0 +1,7 @@
# all
HerosKeepOut: ./CardHolder.scad
./.helperHeroeasKeepOut.sh
clear:
rm -r ./STL