Feature render optimize - #463
Merged
Merged
Conversation
…lizeGL Feature render optimize initialize gl
PILIPALA030
reviewed
Jun 10, 2026
PILIPALA030
reviewed
Jun 10, 2026
PILIPALA030
reviewed
Jun 10, 2026
PILIPALA030
reviewed
Jun 10, 2026
LiuLikeQian
approved these changes
Jul 21, 2026
iesteem
pushed a commit
that referenced
this pull request
Jul 22, 2026
* [Feat]- Render_Optimize: CPU Frustum culling GLVolume * [Feat]: render optimize, glToolBar refactor * add some Comments in function extract Frustum from vp-matrix * delete unnecessary tex_coord assignment --------- Co-authored-by: xiejiajun <413189257@qq.com>
LiuLikeQian
added a commit
that referenced
this pull request
Aug 3, 2026
…ompatibility gating (#627) * fix: unify filament temp mixing blocking with plate error gating - Remove has_sliceable_plate_for_slice_all() hijack in Preview tab switch that triggered unintended "slice all" instead of switching to preview - Add m_filament_temp_blocked flag to PartPlate so can_slice() reflects filament temp mixing state, consistent with m_apply_invalid for object-outside errors - Let sync_filament_temp_mixing_notification() manage its own flag, independent of the background validation system - Simplify EVT_GLVIEWTOOLBAR_PREVIEW to use can_slice() as unified gate for both error types Downstream effects: red exclamation icon on plate thumbnails, disabled slice/export buttons, and blocked auto-slice on preview switch now work uniformly for both object-outside and filament-temp-mixing errors. * fix: use on-demand checks instead of cached flag for filament temp mixing Replace the per-plate cached m_filament_temp_blocked flag with on-demand is_plate_blocked_by_filament_temp_mixing() checks in the rendering and preview-switch paths. This eliminates staleness risks identified during code review where non-current plates could retain stale blocked state after filament changes, undo/redo, or plate switching during slicing. Changes: - GLCanvas3D: add on-demand check for red exclamation on plate thumbnails - Plater: add on-demand check in EVT_GLVIEWTOOLBAR_PREVIEW alongside can_slice(), keep sync_filament_temp_mixing_notification() for notification freshness - PartPlate: revert cached flag; can_slice() unchanged Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * refactor: simplify filament slot collection in check_filament_temp_mixing Merge duplicate key lists, rename used_slots for clarity, and group logic into scoped blocks. No semantic change. * refactor: rename STRING_EXCEPT_FILAMENTS_DIFFERENT_TEMP to STRING_EXCEPT_FILAMENTS_MIXING_TEMP Better reflects that the check is about high/low temperature material mixing, not just "different" temperatures. * feat: add Cold Pressed Steel Plate bed type for Snapmaker U1 Introduce a new bed plate type for the upcoming low-temperature cold-pressed steel plate (SKU 24047). Changes: - Add BedType::btCPSP enum and "Cold Pressed Steel Plate" enum mapping - Add cold_pressed_steel_plate_temp / _initial_layer filament options - Route bed temp keys for the new plate type - Register new options in filament preset whitelist and invalidate_state_by_config_options - Expose the new plate in U1 bed type dropdown (4-plate default, 8-plate extended) and Filament tab temperature grid - Add zh_CN translations Note: default bed temperatures are 0 (unsupported) until the process team provides values per filament. * Feature render optimize (#463) * [Feat]- Render_Optimize: CPU Frustum culling GLVolume * [Feat]: render optimize, glToolBar refactor * add some Comments in function extract Frustum from vp-matrix * delete unnecessary tex_coord assignment --------- Co-authored-by: xiejiajun <413189257@qq.com> * feat: add Cold Pressed Steel Plate bed type for Snapmaker U1 Introduce a new bed plate type for the upcoming low-temperature cold-pressed steel plate (SKU 24047). Changes: - Add BedType::btCPSP enum and "Cold Pressed Steel Plate" enum mapping - Add cold_pressed_steel_plate_temp / _initial_layer filament options - Route bed temp keys for the new plate type - Register new options in filament preset whitelist and invalidate_state_by_config_options - Expose the new plate in U1 bed type dropdown (4-plate default, 8-plate extended) and Filament tab temperature grid - Add zh_CN translations Note: default bed temperatures are 0 (unsupported) until the process team provides values per filament. * feat: rename Cold Pressed Steel Plate to Cool Steel Plate and add per-plate compatibility checks Rename the bed type from "Cold Pressed Steel Plate" (btCPSP) to "Cool Steel Plate" (btCSP) across config keys, enum values, labels, and translations. Introduce per-plate cold-plate compatibility gating: block slicing when any used filament has zero cold-plate bed temperature, and surface a non-blocking serious warning when TPU is in use. Sync notifications across plate select, file load, slice start, and background-process update paths. * refactor: compute cold-plate compat state in a single pass Collapse get_cold_plate_unsupported_filaments / plate_uses_tpu / get_cold_plate_compat_state into one function returning ColdPlateCompatResult { state, unsupported, uses_tpu }. sync_cold_plate_notification now reuses compat.unsupported instead of re-querying, dropping per-sync slot collection from 3 passes to 1. is_plate_blocked_by_cold_plate's external signature is unchanged, so all call sites (MainFrame, find_next_sliceable_plate_for_slice_all, validate_current_plate) need no changes. * Revert "feat: add Cold Pressed Steel Plate bed type for Snapmaker U1" This reverts commit e60517f. * feat: rework Cool Steel Plate - reuse Supertack enum and unify notification format After the revert of the standalone btCSP bed type, Cool Steel Plate now reuses the existing btSuperTack enumerator and supertack_plate_temp* fields, surfacing only as a UI label change on Snapmaker U1. Key changes: - PrintConfig.cpp: enum_values_u1 / enum_labels_u1 extended from 3 to 4 entries (adds Supertack Plate / Cool Steel Plate); enum_labels and enum_labels_ex relabeled from "Cool Plate (SuperTack)" to "Cool Steel Plate". - Tab.cpp: U1 default (support_multi_bed_types off) now shows the supertack_plate_temp* rows; Cool Plate (SuperTack) label/tooltip renamed to Cool Steel Plate. - Plater.cpp detection chain repaired to match the enum reuse: * early-exit compares curr_bed == btSuperTack (string-key match against "Cool Steel Plate" no longer works since the enum key is "Supertack Plate") * s_cold_plate_bed_type_key = "Supertack Plate" for combobox lookup * bed temp reads switch from cool_steel_plate_temp* to supertack_plate_temp* * U1 default bed-type allowlist adds btSuperTack so the user's selection is not silently overwritten - Notification format unified with fix_top_cover / fix_flow_ratio: shared filament_display_label() + format_filament_slot_list() helpers render each filament as "[n] PresetName" using the full preset name (not the filament_type short string). ColdPlateCompatResult now carries std::vector<int> unsupported_slots_1based / tpu_slots_1based, mirroring FlowRatioZeroDetail. - All 20 .po files + .pot: msgid/msgstr migrated from "Cool Plate (SuperTack)" to "Cool Steel Plate" (zh_CN: 低温冷打钢板); zh_CN.po cold-plate error/serious-warning text split into 4 sub-clauses to match the new helper-driven layout. - docs/Cool_Steel_Plate_Design.md: full rewrite reflecting the v2 design (enum reuse, single-pass scan, shared display helpers, migration pitfalls from v1). * Feat:add * feat: keep Cool Steel Plate label U1-only, restore Cool Plate (SuperTack) for other models The btSuperTack enumerator was relabeled to "Cool Steel Plate" everywhere, which leaked the U1-specific name into non-U1 printers' bed-type combos and filament temperature rows. Restore the original split: - enum_labels (non-U1 default) shows "Cool Plate (SuperTack)"; _u1 / _ex keep "Cool Steel Plate" for Snapmaker U1. - Filament temperature panel builds with the right label per current printer and re-applies it in toggle_options() on printer switch, so the row tracks the bed-type combo instead of going stale. - Re-add the "Cool Plate (SuperTack)" i18n entries across all languages; for the 9 locales that had translated "Cool Steel Plate" with SuperTack semantics, switch that msgid to a steel-plate translation and move the SuperTack wording into the new entry. * fix: drop hard-coded plate name from supertack bed-temp tooltips The tooltips on supertack_plate_temp / supertack_plate_temp_initial_layer hard-coded "Cool Plate SuperTack", which doesn't match either of the two labels that enum uses today ("Cool Steel Plate" on U1, "Cool Plate (SuperTack)" elsewhere) and never updates when the user switches printers. Rephrase them to refer to "this plate" — the row label already tells the user which plate it is — and add the new tooltip msgstr entries for zh_CN and en. * revert: drop non-zh/en po changes for Cool Plate (SuperTack) The previous commit added Cool Plate (SuperTack) entries to 18 non-zh/en .pos and rewrote the Cool Steel Plate msgstr in 9 of them to a steel-plate semantic. Per the product rule that only Simplified Chinese and English translations are guaranteed, roll those 18 files back to their pre-e76eb8c0c6 state. Non-zh/en locales now fall back to English for Cool Plate (SuperTack) on non-U1 printers, while U1 keeps whatever local translation of Cool Steel Plate the upstream translators had. * i18n: revert non-zh/en .po Cool Steel Plate migration Reverts the all-language .po migration introduced in a458eb1 ("feat: rework Cool Steel Plate - reuse Supertack enum and unify notification format") for the 18 non-zh_CN/non-en locales. Per product rule, only zh_CN and en translations are guaranteed for the model-specific Cool Steel Plate / Cool Plate (SuperTack) split. Other locales revert to the upstream "Cool Plate (SuperTack)" msgid and their original msgstr, leaving them in sync with main. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * i18n(zh_CN): drop orphaned Cool Steel Plate tooltip entries Removes two stale msgids that no longer match any L() call in code: - "Bed temperature for layers except the initial one. ... Cool Steel Plate." - "Bed temperature of the initial layer. ... Cool Steel Plate." These were left behind when supertack_plate_temp[_initial_layer] tooltips in PrintConfig.cpp were rewritten to use the generic "this plate" wording. The .pot and en.po never had these entries; only zh_CN.po carried the orphans. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * feat(cold-plate): simplify incompatible-filament notification text Drop the "Heatbed %1%:" prefix and merge the two-segment message into a single line, as requested by product: Before: Heatbed N: The following filaments are not compatible with the Cool Steel Plate: [1] X. Set the corresponding bed temperature to a non-zero value to enable printing. After: Cool Steel Plate is not recommended for printing [1] X filaments. To continue, set the corresponding bed temperature to a non-zero value. Same treatment applied to the TPU serious-warning variant. The filament placeholder still uses the shared format_filament_slot_list helper, so multi-slot output stays "[1] X, [2] Y". Code changes (Plater.cpp): - cold_plate_error_text / cold_plate_serious_warning_text: drop the bed_index_1_based parameter; build the message via a single Slic3r::GUI::format(_u8L(...), slot_list) call. - sync_cold_plate_notification: remove the now-unused bed_idx locals in both the SeriousWarning and BlockedError branches. i18n (zh_CN.po only, per product rule guaranteeing zh/en): - remove 4 obsolete Heatbed-prefix msgids. - add 2 new msgids with zh_CN translations. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * feat(cold-plate): tweak notification wording per product review Refine the Cool Steel Plate notification text to match the agreed product wording: Before: "Cool Steel Plate is not recommended for printing %1% filaments. To continue, set the corresponding bed temperature to a non-zero value." After: "The Cool Steel Plate is not recommended for %1%. To continue printing, set the bed temperature above 0°C for this filament." Same shape applied to the TPU serious-warning variant. zh_CN translations follow the new wording. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * feat(cold-plate): use singular "It" in TPU serious-warning The TPU warning most commonly fires for a single filament, where "They may be hard to remove" is grammatically off. Switch to the singular "It" — slightly imprecise when multiple slots trigger at once, but the common single-filament case reads correctly. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * feat(filament-panel): unify bed-temperature tooltip to "this plate" All bed-temperature rows in the filament settings panel used to spell out the plate name in their tooltip ("Bed temperature when the Cool Plate is installed...", "...the Engineering Plate is installed...", etc.), which (a) duplicates the row label right next to it and (b) forces the supertack row to keep a model-specific tooltip branch. Replace every per-plate tooltip with a single generic wording: "Bed temperature when this plate is installed. A value of 0 means the filament does not support printing on this plate." Tab.cpp changes: - TabFilament::build(): all 7 plate rows (supertack / cool / textured cool / engineering / hot / textured PEI / graphic effect) use the generic tooltip; the supertack row keeps its model-specific label but drops the model-specific tooltip. - TabFilament::toggle_options(): the supertack label_tooltip update collapses from a U1/non-U1 ternary to the same generic string. i18n (zh_CN.po only): drop 8 now-orphaned per-plate msgids; add 1 new generic msgid. en.po/.pot unchanged (no entry existed before, English UI falls back to the msgid). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * feat(print-config): drop bed name from per-plate bed-temp tooltips Follow-up to 93c8e52 (which unified Tab.cpp tooltips). The underlying PrintConfig.cpp options for each bed-temperature slot (cool_plate_temp, textured_cool_plate_temp, eng_plate_temp, hot_plate_temp, textured_plate_temp, graphic_effect_plate_temp, and their _initial_layer counterparts) still named the plate in their tooltip, so the sidebar/advanced view kept showing plate-specific text while the filament panel read "this plate". Replace all 12 per-plate tooltips in PrintConfig.cpp with the same generic wording already used by supertack: "Bed temperature for layers except the initial one. A value of 0 means the filament does not support printing on this plate." "Bed temperature of the initial layer. A value of 0 means the filament does not support printing on this plate." i18n (zh_CN.po): drop 10 now-orphaned per-plate msgids; the two generic msgids (already present for Other layers / Initial layer) are reused. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * feat(print-config): drop bed name from per-plate bed-temp tooltips Follow-up to 93c8e52 (which unified Tab.cpp tooltips). The underlying PrintConfig.cpp options for each bed-temperature slot (cool_plate_temp, textured_cool_plate_temp, eng_plate_temp, hot_plate_temp, textured_plate_temp, graphic_effect_plate_temp, and their _initial_layer counterparts) still named the plate in their tooltip, so the sidebar/advanced view kept showing plate-specific text while the filament panel read "this plate". Replace all 12 per-plate tooltips in PrintConfig.cpp with the same generic wording already used by supertack: "Bed temperature for layers except the initial one. A value of 0 means the filament does not support printing on this plate." "Bed temperature of the initial layer. A value of 0 means the filament does not support printing on this plate." i18n (zh_CN.po): drop 10 now-orphaned per-plate msgids; the two generic msgids (already present for Other layers / Initial layer) are reused. * fix(cold-plate): close plate-toolbar gating gap and harden query API The plate-toolbar SLICE_FAILED condition in GLCanvas3D only checked filament_temp_mixing and forgot cold-plate incompatibility, so a cold- plate-blocked plate rendered as UNSLICED instead of SLICE_FAILED. Fix by introducing Plater::is_plate_sliceable(int) that combines PartPlate::can_slice() with both GUI-layer blockers, and delegate both the toolbar rendering and find_next_sliceable_plate_for_slice_all to it so the three call sites cannot drift again. Also addresses harness-review findings on the cold-plate query API: - const-correctness: mark get_cold_plate_compat_state / is_plate_blocked_by_cold_plate as const; add a const get_plate(int) overload to PartPlateList so the const query can resolve plates. - dead code: remove unused s_cold_plate_bed_type_key constant and get_cold_plate_bed_index_1_based helper (no callers). * docs(cold-plate): mark is_plate_sliceable as the unified blocker gate Annotate is_plate_sliceable() as the single point where GUI-layer blockers converge, so follow-on PRs (#626 flow_ratio_zero, #589 mixing_cached) know to plug their predicate in here instead of branching again at GLCanvas3D / MainFrame call sites. No behavior change; just a comment/contract update so the three concurrent PRs that all rewrite the same toolbar line can converge without conflict. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * refactor(cold-plate): normalize 1-based slot field naming Rename *_slots_1based to *_slots_1_based to match snake_case style. --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com> Co-authored-by: alves <liulikeqian@gmail.com> Co-authored-by: Kenshin627 <Kenshin627@users.noreply.github.com> Co-authored-by: xiejiajun <413189257@qq.com>
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.
Summary
this PR add cpuSide glVolume Frustum culling, toolbar render refactor, with constant buffer and transfromMatrix
Changes