feat: OrcaSlicer slicing + named printer presets - #1
Merged
Conversation
- /slice picks Cura or OrcaSlicer (orca preferred when the local PrintMCP exposes it), with a --slicer cura|orca override. Presets resolve from the active printer preset -> /config orca_* keys -> defaults. - New printers table + /printer command (list/show/use/add/remove) to bundle cura_printer + orca machine/process/filament per machine. Applying via /printer use writes the active slicer settings; removing the active printer clears its settings so slicing falls back cleanly. A default ender-3-pro preset ships seeded. - Unified --adhesion maps to OrcaSlicer's real settings (brim_width / raft_layers / skirt_loops) instead of a nonexistent adhesion_type, and --infill/--temp/--bed/--supports map to Orca overrides. - app.py: parse command args with shlex (multi-word printer names work), dispatch /printer, banner shows slicer + local-vs-pypi PrintMCP source. - scanner.py ingests agent-invoked orca_slice_model results into the DB. - tests: 23 passing incl. preset CRUD/resolution/adhesion, scanner ingestion for both slicers, and a real cross-repo OrcaSlicer integration test.
…yout - What-is stack: slicing via CuraEngine or OrcaSlicer. - File table: printer.py command module, shlex command-arg parsing, _printmcp_server_params() and the PRINTPAL_PRINTMCP_COMMAND local-checkout override, ORCA_DEFAULTS/ORCA_FLAG_OVERRIDES. - Scanner detects orca_slice_model too. - Testing section now matches reality (uv run python -m pytest, temp-DB isolation, integration marker) instead of 'no tests currently'.
- pyproject: add [tool.ruff] select = [E, F, I, N, UP, B] (matching PrintMCP) with E501 handled by the formatter. Recent ruff's broader defaults flagged the REPL's deliberate never-crash guards and the DB's naive-localtime convention; pinning keeps CI stable as ruff evolves. - commands/__init__.py: keep COMMANDS before the submodule imports (help.py imports it at module load) and silence the resulting E402 with per-line noqas — fixes a circular-import regression from the autofix pass. - helpers.py: rename unused 'default' loop var (B007), add 'from e' (B904). - ruff format applied across src + tests to satisfy the 'ruff format --check' gate (the repo never ran it before). All 23 tests pass; both ruff gates clean.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
/slice picks Cura or OrcaSlicer (orca preferred when PrintMCP exposes it) with a --slicer override; /printer manages named printer presets (Cura printer id + OrcaSlicer machine/process/filament). Depends on PrintMCP ≥ 0.3.0 (now on PyPI). 23 tests pass incl. a real cross-repo OrcaSlicer integration test.