mirror of
https://github.com/kennetek/gridfinity-rebuilt-openscad.git
synced 2024-11-26 18:28:01 +00:00
add batch script
This commit is contained in:
parent
8fa09b0541
commit
fd301a8da6
1 changed files with 17 additions and 0 deletions
17
gererate-gridfinity-lite.py
Normal file
17
gererate-gridfinity-lite.py
Normal file
|
@ -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");
|
Loading…
Reference in a new issue