Files
esh-pfi-infrastructure/services/draupnir-slicer/orca-slice
T
vh 2e08edcaab fix(draupnir-slicer): warn that every invocation writes result.json to CWD
brokkr-smithy-dev exercised the slicer on real geometry and found OrcaSlicer
writes result.json into the working directory on --info. I verified it here and
it is worse: --help does it too, which is as read-only as an invocation gets.
An empty directory gained a result.json from --help alone.

Encoded in the wrapper and the Dockerfile rather than left to be rediscovered,
and the wrapper is now committed beside the image that backs it instead of
living only in a home directory on one host.

⚠ The reason they found it and I did not is worth keeping in the header: I
verified --help and called the slicer done. Usage text proves the binary
starts, not that it ingests our geometry or that it behaves while doing so.
They ran both controls through to STL and got manifold=yes, 520 facets,
return_code 0 on each -- which is the verification I should have run before
reporting the provisioning complete.
2026-09-21 11:33:27 -07:00

22 lines
1.1 KiB
Bash
Executable File

#!/bin/sh
# Draupnir sliceability check — OrcaSlicer 2.4.2, containerised.
#
# Containerised because irv-ml1 (Debian 12, glibc 2.36) CANNOT run the only
# AppImage OrcaSlicer ships (Ubuntu 24.04, needs GLIBC_2.38 / GLIBCXX_3.4.32).
# Verified by ldd, not assumed. See services/draupnir-slicer/Dockerfile.
#
# ⚠ ORCASLICER WRITES result.json INTO THE WORKING DIRECTORY on EVERY
# invocation — including --help, which is as read-only as a call gets. Verified
# here, not inferred: an empty dir gained result.json from --help alone. Call
# this from inside the run's own artifact dir or it litters wherever you were.
# Found by brokkr-smithy-dev on --info; I had verified only --help and called
# it done. Usage text proves the binary starts, not that it behaves.
#
# $PWD is mounted at the same path inside the container, so relative paths and
# the result.json land where you expect. /mnt/smithy/draupnir is mounted too so
# artifact paths work unchanged.
exec docker run --rm \
-v /mnt/smithy/draupnir:/mnt/smithy/draupnir \
-v "$PWD:$PWD" -w "$PWD" \
draupnir/orca-slicer:2.4.2 "$@"