mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-26 10:21:00 +00:00
Requested by SoftFever on PR #15238: ten of these had accumulated loose in scripts/ next to ~20 unrelated upstream ones, with names that only meant something to whoever wrote them. They now sit in scripts/CAD/, mirroring the src/libslic3r/CAD/ and src/slic3r/GUI/CAD/ split, and the verb in the name is the role: build- produces a binary, start- brings something up, run- runs a suite, check- asserts one thing against a live app. kernel-test.sh -> CAD/run-kernel-tests.sh ladder-all.sh -> CAD/run-all-checks.sh sketch-ladder.py -> CAD/check-sketch-engine.py ladder-corpus.py -> CAD/check-sketch-engine-corpus.py gui-ladder.py -> CAD/check-gui-sketching.py offer-ladder.py -> CAD/check-gui-context-menu.py mcp-sketch-smoke.py -> CAD/check-mcp-sketch.py rig-build.sh -> CAD/build-gui.sh docker-iter-build.sh -> CAD/build-gui-incremental.sh gui-session.sh -> CAD/start-headless-gui.sh "Ladder" was the worst of them: it named the shape of the test (rungs of increasing difficulty) rather than what the test proves, so nothing in the directory listing told you which one needed a GPU and which was pure kernel. Every reference rewritten -- the docs, the cross-calls between the scripts, Dockerfile.deps, and the container-side /OrcaSlicer/scripts paths. The three shell scripts resolve REPO relative to themselves and now sit one level deeper, so that walk went from /.. to /../.. . The copies these push into a container's /tmp were renamed to match, or the container would have kept the old names alive. Two runtime paths deliberately NOT renamed. /tmp/orca-rig-build.lock is a cross-fork contract -- both forks take the same lock so two concurrent builds serialise instead of OOMing the box, and renaming it on one side silently removes that guard. /tmp/gui-session.log is a runtime artefact, not a script. Added scripts/CAD/README.md: what each script proves, what it needs, and the two constraints that have each cost a session (never build inside the GUI container; a window manager is required or synthetic keys are ignored). On CI, which was the other half of the request: the kernel suite is already there and always has been. The cases are registered in tests/libslic3r/CMakeLists.txt under if (SLIC3R_CAD), which defaults ON and no workflow turns off, so they build into libslic3r_tests and run under ctest on every platform via unit_tests.yml -- like any other unit test, needing no new job. They have simply never been seen to run, because the workflows on this PR are still awaiting maintainer approval. run-kernel-tests.sh is the local loop over the same cases, and it is the only script here CI could run: the other six need an OpenGL canvas and synthetic input. Verified: scripts/CAD/run-kernel-tests.sh from its new location, all tests passed, 2562 assertions in 190 test cases.
74 lines
3.5 KiB
Markdown
74 lines
3.5 KiB
Markdown
# Design (CAD) tab — upstream pull request
|
|
|
|
## What this adds
|
|
|
|
A sketch-first parametric CAD tab inside the slicer. The workflow is direct:
|
|
sketch → constrain → solid features → commit to plate. The whole feature recipe is
|
|
persisted inside the 3MF, so reopening restores an editable model rather than a frozen mesh.
|
|
|
|
- Kernel: OCCT, which upstream already links for STEP import — see
|
|
[cad_dependency_weight.md](docs/cad_dependency_weight.md)
|
|
- Constraint solver: vendored SolveSpace `libslvs` subset
|
|
- Interaction model: object-driven — point at geometry, the geometry offers the verbs that
|
|
apply to it; see [cad_ux_guidelines.md](docs/cad_ux_guidelines.md)
|
|
- Full user-facing documentation: [design_tab.md](docs/design_tab.md)
|
|
|
|
## Why it belongs in the slicer
|
|
|
|
Every round trip through an external CAD tool costs a file export, a re-import, and the
|
|
design intent that both steps discard. A part modified after slicing should return to its
|
|
feature history, not to a mesh. Keeping the CAD model inside the slicer preserves that
|
|
loop — the nozzle diameter, the build volume and the material are known at design time.
|
|
|
|
For the integration case in full: [design_tab_upstream_portability.md](docs/design_tab_upstream_portability.md).
|
|
|
|
## How it is built
|
|
|
|
The `SLIC3R_CAD` CMake flag (default ON) gates the entire tab. With it OFF the tab is not
|
|
compiled and the deps prefix matches upstream exactly — the dependency diff is one line in
|
|
OCCT's CMake: `BUILD_MODULE_ModelingAlgorithms=OFF → ON`.
|
|
|
|
Measured cost table: [cad_dependency_weight.md](docs/cad_dependency_weight.md).
|
|
|
|
## Diff shape
|
|
|
|
<!-- fork-specific: measured against this fork's upstream base; re-run the commands above after mirroring -->
|
|
|
|
Against merge-base `d6cb667b894f`:
|
|
|
|
306 files changed, 83032 insertions(+), 777 deletions(-)
|
|
|
|
350 commits, of which 284 are new files and 37 modify upstream files. 99.3 % of the diff
|
|
is new code. The negotiable surface is the 37 modified files.
|
|
|
|
## Tests
|
|
|
|
205 `TEST_CASE` blocks across 6 new test source files. This counts assertions written, not
|
|
assertions passed — a run needs a build.
|
|
|
|
`scripts/CAD/run-kernel-tests.sh` is the headless verification contract: it builds only
|
|
`libslic3r_tests` (not the GUI app), needs no display, and exit 0 means the CAD suite
|
|
passed. It now runs with **no exclusions** — both cases that used to be quarantined (the
|
|
circle-line tangency solver abort and the internal-thread reference) are fixed.
|
|
|
|
## Licensing
|
|
|
|
The vendored solver in `src/libslic3r/slvs/` is **GPL-3.0** (see `src/libslic3r/slvs/LICENSE`),
|
|
not LGPL. The combined work is distributable under AGPL-3.0. See the Licensing section of
|
|
[design_tab_upstream_portability.md](docs/design_tab_upstream_portability.md) for the
|
|
AGPLv3/GPLv3 compatibility argument; this point should be confirmed with upstream explicitly.
|
|
|
|
## Not verified
|
|
|
|
- Card wiring for 9 of the 16 late-wired tools was never click-tested.
|
|
- There is no automated GUI test in CI. A green kernel run says nothing about the GUI —
|
|
synthetic clicks never drift, so the test suite and the viewport are two separate realities.
|
|
- The click-test defect rate has **not converged**: a second pass found no new defects, but
|
|
four further days of work found five more. The earlier pass is not evidence of stability.
|
|
|
|
## Reviewer's map
|
|
|
|
See the [Where the code lives](docs/design_tab.md#where-the-code-lives) table in the user
|
|
doc for the file-to-role mapping, and [docs/ux/tool_atlas.json](docs/ux/tool_atlas.json) as
|
|
the generated-from source of `src/slic3r/GUI/CAD/DesignOffer.hpp`.
|