Repository navigation
feat(convert): 3d convert — multicolour scad→3MF Orca project, format conversion, retarget alias (Refs #741) - #746
Merged
Conversation
alex-mextner
force-pushed
the
roadmap/convert-command
branch
from
November 6, 2026 07:52
18a77d0 to
cb86ea0
Compare
… conversion, retarget alias (Refs #741) One command for every conversion the libs support: IN... OUT, format from the output extension (.stl .3mf .usdz .png; extensionless names filled from the conversion). scad→3mf is multicolour-aware: OpenSCAD's per-triangle color() 3MF export is read colour-grouped (dimension_model) and re-emitted through orca_project_3mf as one object per colour with per-object extruder metadata. 3mf→3mf takes the retarget options and delegates to 3d retarget (convert file.3mf file-u1.3mf --to u1). Collision contract in convert_plan: input-overwrite auto-suffixes, any other existing target refuses (exit 2) with the ready-to-run free-name command unless --force, re-checked at write time via staging+commit. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
alex-mextner
force-pushed
the
roadmap/convert-command
branch
from
November 6, 2026 09:04
cb86ea0 to
cff049c
Compare
5 tasks done
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.
One command for every conversion the libs support:
3d convert IN... OUT, format from the output extension (.stl .3mf .usdz .png; extensionless names filled from the detected format), structured errors listing accepted formats for unsupported routes. Refs #741What changed (single commit, passed the pre-commit hook before push)
lib/commands/convert.py+lib/convert_plan.py+lib/convert_mesh.py: self-registering3d convertcommand with the collision contract — input-overwrite auto-suffixes, any other existing target refuses (exit 2) with the ready-to-run free-name command unless--force, re-checked at write time via staging+commit.color()3MF export is read colour-grouped (dimension_model) and re-emitted throughorca_project_3mfas one object per colour with per-object extruder metadata — a true Orca/Bambu project 3MF (3d arrange/export: no multi-part 3MF with per-part extruder; arrange explodes multi-colour objects and drops extruder metadata #89's long-standing ask).convert file.3mf file-u1.3mf --to u1takes the retarget options and delegates to3d retarget(--to/--set/--preset/...).docs/commands/convert.mdin sync with--help, plus README and lib-map entries.Tests (in this commit)
tests/test_commands_convert.py— CLI surface: usage/help/exit codes, unknown option, unknown output extension listing accepted formats, one-positional usage error, missing input.tests/test_convert_plan.py— collision contract: existing target refuses with the free-name command,--forceoverwrites, out==input auto-suffixes, write-time re-check.tests/test_convert_mesh.py— per-route dispatch: scad→stl through OpenSCAD, lossless stl→stl copy, project-3mf→stl world coordinates, project 3mf→3mf repack, colour-aware scad→3mf worker, usd-core tier, png of scad/3mf, two-input png usage error.tests/e2e/test_convert_workflows.py— end-to-end workflows incl. the unzippable multicolour Orca project 3MF.Rebased onto current main (printer-vision batch #727/#730/#734/#721); only
docs/architecture/lib-map.mdtouched both sides, no conflicts.