Skip to content

Feature top cover yjx#451

Open
iesteem wants to merge 35 commits into
Snapmaker:feature_top_coverfrom
iesteem:feature_top_cover_yjx
Open

Feature top cover yjx#451
iesteem wants to merge 35 commits into
Snapmaker:feature_top_coverfrom
iesteem:feature_top_cover_yjx

Conversation

@iesteem
Copy link
Copy Markdown

@iesteem iesteem commented Jun 5, 2026

Description

top cover

iesteem and others added 30 commits May 20, 2026 17:28
# Conflicts:
#	src/libslic3r/Preset.cpp
#	src/libslic3r/PrintConfig.cpp
…consumable filament, and simultaneously modify the printer's initial gcode.
Replace the outdated filament_info.json-based classification with per-preset
filament_is_high_temperature config. Detect mixing whenever filament
assignments change on the current plate (wall, infill, solid infill,
support, support interface, wipe tower, and multi-material painting).

Detection hooks:
- Plater::on_config_change() — config load, extruder count change, import
- Sidebar::update_presets() — sidebar filament combo selection

Enforcement layers (three-stage guard against notification flicker):
1. check_filament_temp_mixing() shows error notification + marks plate
   invalid immediately on config change (CallAfter-deferred with serial
   cancellation to prevent races between the two hooks).
2. Print::validate() runs check_multi_filament_valid() using
   filament_is_high_temperature (was: filament_info.json + nozzles<2
   restriction removed).
3. Plater::priv::update() re-checks after background validate passes,
   preventing the validate cycle from silently closing the notification.

The old Print::validate() check (nozzles<2 && extruders>1) is replaced
with a simpler extruders>1 guard that works for multi-nozzle printers too.
Make check_filament_temp_mixing() a pure detection function with no side
effects. Notification push/close is now owned exclusively by
Plater::priv::update()'s three-layer guard, eliminating races where
CallAfter serial cancellation would accidentally drop the error
notification.

Also scan all plates' configs (not just the active plate) so that
filament changes on any plate are detected immediately.
Previously the hooks only marked the plate invalid (greyed out slice
button) but relied on priv::update() to push the error notification.
Since priv::update() only runs after schedule_background_process(),
sidebar filament preset changes that don't trigger a background
process cycle would never show the red error bar.

Now all three sites push/close notification synchronously:
- Sidebar::update_presets()
- Plater::on_config_change()
- Plater::priv::update() (three-layer guard)
full_config() builds a merged snapshot that may lag when called from
Sidebar hooks because the edited preset config hasn't been committed
yet. Read filament_is_high_temperature directly from each filament
preset's individual config via find_preset(name, true) instead.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Consolidate duplicated notification logic into sync_filament_temp_mixing_notification()
and hook it into model add/remove (object_list_changed), filament assignment changes
(set_extruder_for_selected_items, update_filament_in_config), and MMU painting
(update_model_object) so the mixing warning updates immediately when plate composition changes.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Hook sync_filament_temp_mixing_notification() into Selection::notify_instance_update
(3D view drag) and ObjectList::reload_all_plates (arrange, file load, plate operations)
so the mixing warning updates immediately when objects are moved on/off plates.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Move the sync call from Selection::notify_instance_update to the end of
GLCanvas3D::do_move, so it runs only once after all plate membership
updates are complete, avoiding flip-flopping between valid/invalid states.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Limit plate config collection and ModelVolume scanning to objects on the
current plate, so removing an object from the plate correctly clears the
high/low temperature mixing error notification.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The global config's wall_filament etc. always reference the default
filament slot, causing false mixing detection when only high-temp
models remain on the plate. Only collect config from current plate.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…ing warning

Use MessageDialog with SetButtonLabel for proper OrcaSlicer button styling
instead of manual wxButton with hardcoded green background. Buttons now read
"确认"/"取消" with auto-applied Confirm/Regular ButtonStyle.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Replace hardcoded Chinese text with _L()/_u8L() wrapped English strings:
- Preferences dialog title, body, and button labels
- Error notification (allow=false): includes guidance to enable in Preferences
- Warning notification (allow=true): concise message without guidance
- Calibration wizard validation error

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
iesteem and others added 5 commits June 5, 2026 17:25
Multi-line string literals in _u8L() may not match multi-line msgid entries
in .po files during gettext lookup. Consolidate to single-line strings
in both C++ source and .po msgid for the filament temp mixing messages.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Detect global Process filament assignments (wall_filament, solid_infill_filament,
  support_filament, support_interface_filament, wipe_tower_filament) in addition
  to plate-level overrides. Uses p->config which is updated in real-time by
  on_config_change().
- Remove sparse_infill_filament from checked keys: it is not user-configurable
  in the UI but has a hardcoded default of 1 in some process presets, causing
  false positives.
- Trigger sync after object-mode config changes in TabPrintModel::on_value_change.
- Trigger sync after moving instances between plates (PartPlateList::add_to_plate).
- Trigger sync after clearing all objects from the current plate (remove_curr_plate_all).
- Update Preferences::create_item_checkbox declaration to match the cherry-picked
  implementation which adds an optional confirm_cb parameter.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…Slicer into feature_top_cover_yjx

#	resources/profiles/Snapmaker/filament/Snapmaker PETG HF @U1 0.2 nozzle.json
#	resources/profiles/Snapmaker/machine/Snapmaker U1 (0.2 nozzle).json
#	resources/profiles/Snapmaker/machine/Snapmaker U1 (0.4 nozzle).json
#	resources/profiles/Snapmaker/machine/Snapmaker U1 (0.6 nozzle).json
#	resources/profiles/Snapmaker/machine/Snapmaker U1 (0.8 nozzle).json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant