From fd301a8da6f5e7b6429dcb5125eb5a6e9c6d145c Mon Sep 17 00:00:00 2001 From: Rui Carmo Date: Sat, 15 Oct 2022 19:47:51 +0100 Subject: [PATCH] add batch script --- gererate-gridfinity-lite.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 gererate-gridfinity-lite.py diff --git a/gererate-gridfinity-lite.py b/gererate-gridfinity-lite.py new file mode 100644 index 0000000..2e069bc --- /dev/null +++ b/gererate-gridfinity-lite.py @@ -0,0 +1,17 @@ +#!/bin/env python3 + +# Generate Gridfinity Lite bin sets + +from os import makedirs, system +from os.path import exists, join + +for h in range(3, 12, 3): + for w in range(1,6): + for d in range(w, 6): + out_path = join("stl", f"{h}h") + if not exists(out_path): + makedirs(out_path) + out_file = join(out_path, f"gridfinity-lite-{w}x{d}x{h}.stl"); + if not exists(out_file): + print(f"-> {out_file}") + system(f"openscad gridfinity-rebuilt-bins.scad --export-format binstl -o {out_file} -Dgridx={w} -Dgridy={d} -Dgridz={h} -Dstyle_tab=5 -Denable_scoop=false -Dstyle_hole=0 -Dlite_mode=true"); \ No newline at end of file