Files
OrcaSlicer/src/slic3r/GUI
Clifford GarwoodandClaude Opus 5 1e608fe24c Have the preview consume the shared zone layout instead of rebuilding it
Closes review comment 17.

GCodeViewer had its own copy of the flip_x/flip_y corner mapping, the active
column/row sets, the physical-to-zone index mapping and the zone pitch -- the same
derivation as the plate's, with nothing keeping the two in step. It now calls
compute_imex_zone_layout() and consumes head_zone_centers. The mirror is expressed
as a reflection about the midpoint of the two zone centres rather than about a
zone-relative strip width, which is algebraically identical for equal-sized zones
and needs no pitch, and the toolhead-box face is chosen by comparing zone centres
instead of physical columns.

The July report of a math error in the visualizer for non-primary heads was this
drift: the sec_box_offset_y else-branch hardcoded -imex_box_wy, which happened to
equal the primary's offset on the rear-* layouts and pointed the wrong way on the
front-* ones. Structurally unreachable now.

Verifying the two sides matched turned up two config defaults that disagreed, both
fixed in their own commits: imex_nozzle_clearance_x/y (the viewer's 30.0f matched
PrintConfig, the zone code's 0.0 did not, and the strip loops are gated on it) and
imex_tools_per_gantry (the library's 2 matched, both GUI paths used 1).

Consuming the shared function meant resolving it per frame, and the sequential-view
marker flag is sticky, so one drag of the slider made every subsequent frame parse
five strings and allocate a dozen containers from inputs that never change. The
resolve now sits behind a cache key mirroring PartPlate::build_imex_cache_key(),
plus the two inputs only the preview reads -- the bed extents and the tool layout.
An idle frame compares scalars and allocates nothing. The toolhead-box mesh, which
was being re-uploaded to the GPU every frame for the same reason, is rebuilt only
when the clearances change.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-03 00:56:55 -04:00
..
2026-08-25 22:10:49 +08:00
2025-10-28 15:29:50 +08:00
2026-08-23 22:11:48 +08:00
2026-07-29 19:37:17 +08:00
2025-10-05 16:02:17 +08:00
2026-04-20 19:27:38 -03:00
2026-01-03 23:06:57 +08:00
2026-07-29 19:37:17 +08:00
2025-07-06 11:34:47 +08:00
2026-08-23 22:43:41 +08:00
2026-06-07 13:12:51 +08:00
2026-06-18 09:13:51 -03:00
2026-07-18 03:15:11 +08:00
…
2026-08-23 22:43:41 +08:00
2026-08-23 22:43:41 +08:00
2026-08-23 22:11:49 +08:00
2026-06-18 09:13:51 -03:00
2025-08-22 20:02:26 +08:00
2026-08-23 22:43:41 +08:00
2025-10-02 09:30:48 +08:00
…
2026-07-24 09:41:24 -03:00
2026-08-19 14:08:19 +08:00
2025-10-02 09:30:48 +08:00
2025-10-28 15:29:56 +08:00
2026-08-19 01:37:23 +08:00
2026-07-17 08:30:22 +08:00
2025-10-28 15:29:56 +08:00
…
2025-09-21 23:01:08 +08:00
2026-07-29 19:37:17 +08:00
2026-08-19 14:08:19 +08:00
2026-08-19 14:08:19 +08:00
2026-04-25 18:14:51 +08:00
2026-08-23 22:11:48 +08:00
2026-07-02 17:49:36 +08:00
2026-07-28 19:17:26 +08:00
2026-07-29 16:27:15 -03:00
2026-07-02 17:49:36 +08:00
2026-07-02 17:49:36 +08:00
2026-08-06 06:08:02 +08:00
2026-08-06 06:08:02 +08:00
2026-06-18 09:13:51 -03:00
2026-01-03 23:06:57 +08:00
2026-01-23 17:05:56 +08:00
2026-08-23 22:43:41 +08:00
2026-02-04 11:40:02 +00:00
2026-01-23 17:05:56 +08:00
2026-01-23 17:05:56 +08:00
2026-07-02 17:49:36 +08:00
2026-07-02 17:49:36 +08:00
2025-10-28 15:30:06 +08:00
2025-10-28 15:29:56 +08:00
2026-08-23 22:43:41 +08:00
2026-08-23 22:11:48 +08:00