From 442cdacbe82d3cd1bc6b32e912eec344bfb95532 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elias=20Schr=C3=B6ter?= Date: Thu, 26 Mar 2026 16:14:58 +0100 Subject: [PATCH] Makefile initialize makefile for stl generation --- .gitignore | 1 + .helperHeroeasKeepOut.sh | 21 +++++++++++++ CardHolder.scad | 55 ++++++++++++++++++++++++++++++++++ HeroesKeepOut/.cardConfigs.txt | 1 + README.md | 13 ++++++-- makefile | 7 +++++ 6 files changed, 96 insertions(+), 2 deletions(-) create mode 100644 .gitignore create mode 100755 .helperHeroeasKeepOut.sh create mode 100644 CardHolder.scad create mode 100644 HeroesKeepOut/.cardConfigs.txt create mode 100644 makefile diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..89974f3 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/*.stl diff --git a/.helperHeroeasKeepOut.sh b/.helperHeroeasKeepOut.sh new file mode 100755 index 0000000..b1d7533 --- /dev/null +++ b/.helperHeroeasKeepOut.sh @@ -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 diff --git a/CardHolder.scad b/CardHolder.scad new file mode 100644 index 0000000..3922d77 --- /dev/null +++ b/CardHolder.scad @@ -0,0 +1,55 @@ +include + +// 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); diff --git a/HeroesKeepOut/.cardConfigs.txt b/HeroesKeepOut/.cardConfigs.txt new file mode 100644 index 0000000..e66635d --- /dev/null +++ b/HeroesKeepOut/.cardConfigs.txt @@ -0,0 +1 @@ +58,14,88,Test 123 diff --git a/README.md b/README.md index e06634d..7cc9b94 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,12 @@ -# BoardGameInlets +# Board game inlets + +The creation files for my boardgame inlets. The stl files can be generated using + +``` +make +``` + +# Available Games + +- Heros keep out -Creation Files for Boardgame Inlets \ No newline at end of file diff --git a/makefile b/makefile new file mode 100644 index 0000000..a89089e --- /dev/null +++ b/makefile @@ -0,0 +1,7 @@ +# all + +HerosKeepOut: ./CardHolder.scad + ./.helperHeroeasKeepOut.sh + +clear: + rm -r ./STL