Repository navigation
fix(release): do not claim placement or kept settings Studio has not established #109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
75c1ca5
c83ec81
5716ecc
355cfed
537cae9
abf20bf
4f82767
2bd1cb6
5d06499
e10c16b
b1e79d7
f560516
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -169,6 +169,43 @@ def _is_preserved_value_mapping(old, new) -> bool: | |
| return _strict_value_equal(new, expected) | ||
|
|
||
|
|
||
| def _is_on(value) -> bool: | ||
| """Whether a project-settings switch such as `enable_support` is on.""" | ||
| if isinstance(value, list): | ||
| value = value[0] if value else None | ||
| return str(value).strip().lower() in ("1", "true") | ||
|
|
||
|
|
||
| def _supports_note(tm: ThreeMF, before: dict, after: dict, prepare_mode: str) -> str | None: | ||
| """Say so when the creator's supports will not be in effect in Snapmaker Orca. | ||
|
|
||
| Orca resets every process value the project does not declare in | ||
| `different_settings_to_system` to the U1 preset, where supports are off. | ||
| Recommended blanks the source's declaration and re-declares only what Studio | ||
| itself changed, so a creator's `enable_support=1` stays in the file but is not | ||
| used. Computed from the source and the written config, never asserted; Preserve | ||
| keeps the declaration, so it has nothing to say. | ||
| """ | ||
| from .preset_deviation import declared_process_keys | ||
|
|
||
| if prepare_mode == "preserve" or not _is_on(before.get("enable_support")): | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win Check the written support declaration in Preserve mode. If the source has 🤖 Prompt for AI Agents |
||
| return None | ||
| if "enable_support" in declared_process_keys(after) and _is_on(after.get("enable_support")): | ||
| return None | ||
| note = ("Supports: the creator turned supports on. This mode does not keep them; " | ||
| "Snapmaker Orca will open with supports off. Turn them on in Orca's Support tab " | ||
| "or prepare with Preserve creator settings.") | ||
| try: | ||
| painted = sum(tm.read_part(p).count(b"paint_supports") | ||
| for p in tm.list_parts() if p.endswith(".model")) | ||
| except Exception: | ||
| painted = 0 | ||
| if painted: | ||
| note += (" The painted support areas stay in the file but do nothing while " | ||
| "supports are off.") | ||
| return note | ||
|
|
||
|
|
||
| def _settings_summary(before: dict, after: dict, raw_config: bytes, outcome, | ||
| prepare_mode: str, profile_name: str = "snapmaker_u1", | ||
| recommended_after: dict | None = None) -> dict: | ||
|
|
@@ -449,6 +486,9 @@ def convert_to_u1(path: str, out_dir: str | None = None, prepare_mode: str = "pr | |
| recommended_after = load_project_settings(recommended_tm.read_part(SETTINGS)) | ||
| summary = _settings_summary(before, after, raw_config, outcome, prepare_mode, | ||
| recommended_after=recommended_after) | ||
| supports_note = _supports_note(tm, before, after, prepare_mode) | ||
| if supports_note: | ||
| summary["supports_note"] = supports_note | ||
| if confirmed_presets or confirmed_colours or filament_catalog is not None: | ||
| # Only when Project Materials is in use, so a plain Prepare reports exactly what it did. | ||
| summary["project_materials"] = { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: DVOpenLabs/snapmaker-studio
Length of output: 9972
🏁 Script executed:
Repository: DVOpenLabs/snapmaker-studio
Length of output: 41142
🏁 Script executed:
Repository: DVOpenLabs/snapmaker-studio
Length of output: 26427
Carry partial multi-plate placement checks into the report.
For a clean multi-plate result,
bed_fit.assess()returnsoverall_level: "ok"even though positions across plates are not checked.C.doctor_contributions()dropsokfindings, so the Intelligence Report has no risk ornot_verifiedentry for this limitation. Its Project Doctor summary can also say that the placement check found nothing off the plate.Add an explicit partial-placement field and include it in
not_verified. Updateoverall_textso it does not claim that the placement check was complete.Suggested fix
🤖 Prompt for AI Agents