zudo-stl-fix
GitHub repository

Type to search...

to open search from anywhere

Output and exit codes

Console lines, the JSON report, and the process exit status of stl_doctor.py.

Console output

One line is printed per input file.

ModeLineMeaning
checkPASS, PASS_WITH_WARNINGS or FAIL, then <name>: N invalid triangle pairsAudit status and the count of invalid triangle-pair interactions (on stdout).
repairUNCHANGED <name>No supported work was needed; no -fixed copy is written.
repairREPAIRED / <status> <name> -> <path>A repaired binary STL was written and its bytes verified against the validated bytes.
repairREFUSED <name>: <reason> (stderr)The geometry is outside the conservative repair scope.
eitherERROR <name>: <reason> (stderr)Operational error such as a parse failure or a resource limit.

After all files, Report: <path> is printed. Treat this text as human output only; do not parse it.

In repair mode a file needs work when it has audit failures, invalid or inconsistent stored normals (more than 1 degree off), or, with a positive --weld-tolerance, sliver triangles.

JSON report

The batch report contains the tool name and version, mode, Python and dependency versions, the scope and limitations statements, and a files array. Each entry has the resolved input path, output (or null), the before audit, and an action:

actionMeaning
checkedcheck mode audit only.
unchangedrepair mode found nothing to do; after equals before.
repairedOutput written; includes after and repair_details.
refusedUnsafe or unsupported repair; includes error.
errorUnexpected failure or resource limit; includes error.

The report holds absolute input and output paths, so share it with care.

Exit codes

CodeMeaning
0All files succeeded. Warnings do not change the code.
1At least one file failed the check (FAIL in check mode) or a repair was refused, and no operational error occurred.
2An operational error: bad arguments or paths, a file that could not be processed (including a resource limit), or a report that could not be written. This takes precedence over 1.

Not the worker's convention

The worker protocol has its own exit convention and does not reuse these codes.

Examples

Show a file that needs repair, then repair it into a chosen directory, allowing a re-run to replace earlier results:

python engine/stl_doctor.py check fixtures/originals/nuts-v2-60hp-double.stl --report out/check.json
python engine/stl_doctor.py repair fixtures/originals/nuts-v2-60hp-double.stl \
  --out-dir out/repaired --report out/repair.json --overwrite

Opt in to existing-edge cleanup with a small tolerance:

python engine/stl_doctor.py repair fixtures/originals/nuts-v2-60hp-double.stl \
  --weld-tolerance 1e-5 --out-dir out/welded --report out/welded.json

Raise the scan limits for a large mesh (the exact scan has quadratic worst-case behavior, so larger limits can be slow):

python engine/stl_doctor.py check fixtures/originals/bar-60hp.stl --max-faces 50000 --max-pairs 10000000 --report out/limits.json

Revision History

Takeshi TakatsudoCreated: 2026-10-16T13:23:15+09:00Updated: 2026-10-16T13:23:15+09:00