autorender presets

This commit is contained in:
numzero 2026-04-07 02:49:00 +03:00
parent 158b27848b
commit 7b46783ccc
2 changed files with 53 additions and 0 deletions

42
mini-tube.json Normal file
View File

@ -0,0 +1,42 @@
{
"parameterSets":
{
"1ml-50mm2": {
"volume_ml": "1",
"cross_section_mm2": "50",
"marks_small_ml": "0.1",
"marks_medium_ml": "0.5",
"text_size_mm": "3"
},
"2ml-50mm2": {
"volume_ml": "2",
"cross_section_mm2": "50",
"marks_small_ml": "0.1",
"marks_medium_ml": "0.5",
"text_size_mm": "3"
},
"2ml-100mm2": {
"volume_ml": "2",
"cross_section_mm2": "100",
"text_size_mm": "5"
},
"5ml-100mm2": {
"volume_ml": "5",
"cross_section_mm2": "100",
"text_size_mm": "5"
},
"5ml-333mm2": {
"volume_ml": "5",
"cross_section_mm2": "333",
"marks_small_ml": "0.5",
"text_size_mm": "8"
},
"10ml-333mm2": {
"volume_ml": "10",
"cross_section_mm2": "333",
"marks_small_ml": "0.5",
"text_size_mm": "8"
}
},
"fileFormatVersion": "1"
}

11
mini-tube.sh Executable file
View File

@ -0,0 +1,11 @@
#!/bin/zsh
cd ${0%/*}
if command -v openscad >/dev/null 2>&1; then
openscad=openscad
else
openscad=(flatpak run --filesystem=$PWD org.openscad.OpenSCAD)
fi
<mini-tube.json jq --raw-output '.parameterSets | keys.[]' | xargs -P$(nproc) -I@ -- $openscad -o mini-tube-@.3mf -p mini-tube.json -P @ mini-tube.scad