Clifford Garwood and Claude Opus 4.7
c2492ccc47
refactor(imex): extract imex_pem_tool_for helper + unit tests
...
The physical_extruder_map translation used by IMEX per-tool PA emission was
inlined identically at two sites in GCode.cpp (tool-change and second-layer
transition). Extract to IMEXHelpers so the routing rule ("parallel mode AND
populated pem → physical index, else -1") is testable in isolation and the
call sites read as intent rather than re-deriving the conditional.
Production change is behavior-preserving:
- Same predicate (`!mode.empty() && mode != "primary"`)
- Same empty-pem short-circuit returning -1
- Same get_at() dispatch on hit
- Both call sites replaced with a single call
Four unit tests in [IMEX] cover the routing matrix:
- non-IMEX ("") and primary mode short-circuit
- parallel mode + empty pem short-circuits (defense-in-depth; get_at would
throw on empty values otherwise)
- identity pem (non-MMU IDEX) routes filament to itself
- MMU collapse routes multiple logical slots to one physical (7-slot profile
with 4-lane MMU on physical 0 and direct drives on 1/2/3)
All IMEX + Variant regression suites pass post-refactor (133 assertions / 48
cases under libslic3r, 25 assertions / 6 cases under fff_print [PressureAdvance]).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-04-24 23:07:23 -04:00
..
2026-03-05 14:22:47 -03:00
2025-07-18 16:01:25 +08:00
2024-10-05 21:53:16 +03:00
2026-04-06 15:29:23 -03:00
2026-04-19 18:40:37 -03:00
2026-04-21 14:56:22 -04:00
2026-04-07 22:20:33 +08:00
2025-09-24 22:49:14 -04:00
2024-08-12 00:00:20 +08:00
2025-10-19 19:27:55 +08:00
2026-04-17 12:27:42 +08:00
2024-05-10 23:47:08 +08:00
2024-05-10 23:47:08 +08:00
2024-05-10 23:47:08 +08:00
2023-09-16 22:24:18 +08:00
2023-08-08 19:08:13 +08:00
2026-04-15 22:58:12 +08:00
2026-02-21 00:15:48 +08:00
2024-01-26 20:18:10 +08:00
2025-09-10 10:05:07 +08:00
2025-01-22 10:03:21 +08:00
2023-12-01 10:42:45 +00:00
2024-08-12 00:00:20 +08:00
2025-06-22 23:10:35 +08:00
2025-06-22 23:10:35 +08:00
2024-01-28 10:12:55 +00:00
2024-06-15 14:56:44 +08:00
2026-04-07 22:24:46 +08:00
2024-08-22 10:13:45 +03:00
2025-09-21 13:47:51 +08:00
2026-04-20 19:18:03 -03:00
2025-11-15 11:11:20 -05:00
2025-10-26 20:44:19 +08:00
2026-02-06 17:37:24 +08:00
2025-12-23 22:53:09 +02:00
2025-12-23 22:53:09 +02:00
2025-11-22 15:39:12 +08:00
2025-06-18 17:50:44 +08:00
2025-06-18 17:50:44 +08:00
2024-09-23 19:26:18 +08:00
2026-04-21 14:56:22 -04:00
2025-06-14 21:05:25 +08:00
2025-05-08 16:00:48 +08:00
2025-10-28 15:30:00 +08:00
2026-04-15 22:58:12 +08:00
2026-04-06 10:01:58 +08:00
2023-09-22 16:21:26 +08:00
2025-02-26 23:07:23 +08:00
2024-06-15 14:56:44 +08:00
2024-06-15 14:56:44 +08:00
2024-06-15 14:56:44 +08:00
2025-10-28 15:29:47 +08:00
2026-04-07 22:22:43 +08:00
2025-02-26 23:07:23 +08:00
2026-04-19 20:28:13 -03:00
2024-02-13 23:56:48 +08:00
2023-09-27 21:44:45 +08:00
2023-08-08 19:08:13 +08:00
2025-06-22 23:10:35 +08:00
2025-06-22 23:10:35 +08:00
2023-12-09 22:46:18 +08:00
2023-12-09 22:46:18 +08:00
2023-12-09 22:46:18 +08:00
2025-10-19 22:54:48 +08:00
2025-10-19 22:54:48 +08:00
2025-06-20 23:01:09 +08:00
2025-06-20 23:01:09 +08:00
2024-08-12 00:00:20 +08:00
2024-08-04 00:54:03 +08:00
2024-01-26 20:18:10 +08:00
2025-09-17 09:46:04 +08:00
2025-09-17 09:46:04 +08:00
2025-09-18 23:01:09 +08:00
2025-09-17 09:46:04 +08:00
2025-04-26 19:59:49 +08:00
2025-06-22 23:10:35 +08:00
2026-01-05 22:41:04 +00:00
2025-09-29 20:38:38 +08:00
2025-09-29 20:38:38 +08:00
2025-09-29 20:38:38 +08:00
2026-04-24 23:07:23 -04:00
2026-04-21 14:56:22 -04:00
2025-09-24 22:49:14 -04:00
2025-11-15 11:11:20 -05:00
2026-04-14 09:17:39 -04:00
2026-04-14 09:17:39 -04:00
2025-04-04 23:07:00 +08:00
2025-12-08 22:42:11 +08:00
2023-07-07 17:25:51 +08:00
2026-04-24 23:07:23 -04:00
2026-04-24 23:07:23 -04:00
2024-06-15 14:56:44 +08:00
2024-06-15 14:56:44 +08:00
2025-06-18 17:50:44 +08:00
2023-12-01 10:42:45 +00:00
2025-08-24 23:18:03 +08:00
2025-08-24 23:18:02 +08:00
2025-03-01 22:21:59 +08:00
2025-10-25 22:05:09 +08:00
2024-05-12 23:35:41 +08:00
2025-07-30 21:22:40 +08:00
2025-10-28 15:29:55 +08:00
2025-10-28 15:29:55 +08:00
2025-09-18 17:08:18 +08:00
2025-09-18 17:08:18 +08:00
2025-10-19 19:27:55 +08:00
2026-01-14 19:51:13 +08:00
2025-10-19 21:57:34 +08:00
2025-02-26 23:07:23 +08:00
2024-11-06 20:19:52 +08:00
2024-11-06 20:19:52 +08:00
2026-03-04 12:25:54 -03:00
2024-01-26 20:18:10 +08:00
2024-05-10 23:47:08 +08:00
2026-04-15 22:36:25 +08:00
2026-04-15 22:36:25 +08:00
2024-08-12 00:00:20 +08:00
2025-12-08 22:42:11 +08:00
2025-07-18 16:01:25 +08:00
2025-07-18 16:01:25 +08:00
2025-06-22 23:10:35 +08:00
2025-06-22 23:10:35 +08:00
2023-12-01 10:42:45 +00:00
2024-05-10 23:47:08 +08:00
2024-05-10 23:47:08 +08:00
2024-06-15 14:56:44 +08:00
2024-06-15 14:56:44 +08:00
2025-09-18 16:10:27 +08:00
2025-09-18 16:10:27 +08:00
2024-01-26 20:18:10 +08:00
2024-05-10 23:47:08 +08:00
2026-02-12 08:41:35 +08:00
2025-10-02 17:07:17 +08:00
2025-10-02 17:07:17 +08:00
2025-04-05 17:47:59 +08:00
2026-04-07 23:46:39 +08:00
2025-07-25 15:36:18 +08:00
2025-12-23 23:44:43 +08:00
2025-07-18 15:43:46 +08:00
2024-01-31 11:23:29 +00:00
2024-01-31 11:23:29 +00:00
2025-02-26 23:07:23 +08:00
2025-09-17 21:49:55 +08:00
2025-12-08 22:42:11 +08:00
2025-06-18 17:50:44 +08:00
2025-06-18 17:50:44 +08:00
2024-08-12 00:00:20 +08:00
2024-06-15 14:56:44 +08:00
2026-04-21 14:56:22 -04:00
2026-04-06 14:27:49 +08:00
2026-04-21 14:56:22 -04:00
2026-03-15 22:19:53 +08:00
2026-04-15 22:58:12 +08:00
2026-03-15 22:19:53 +08:00
2026-04-21 22:51:31 -04:00
2025-07-18 15:43:46 +08:00
2025-09-21 13:47:58 +08:00
2026-04-22 01:20:29 -04:00
2026-04-21 14:56:22 -04:00
2025-12-08 22:42:11 +08:00
2026-01-27 19:12:18 -03:00
2026-03-13 23:33:19 +08:00
2023-07-27 23:37:47 +08:00
2024-01-31 11:23:29 +00:00
2025-10-28 15:29:47 +08:00
2024-05-10 23:47:08 +08:00
2023-11-04 11:41:03 +08:00
2024-08-12 00:00:20 +08:00
2025-02-08 11:34:41 +08:00
2025-06-18 17:50:44 +08:00
2023-10-10 14:19:23 +08:00
2023-12-09 22:46:18 +08:00
2024-05-10 23:47:08 +08:00
2024-08-12 00:00:20 +08:00
2026-01-26 20:04:21 -03:00
2024-11-21 21:40:51 +08:00
2025-10-19 19:27:55 +08:00
2025-02-12 22:10:57 +08:00
2023-09-29 23:39:12 +08:00
2023-09-29 23:39:12 +08:00
2024-06-15 14:56:44 +08:00
2024-01-31 11:23:29 +00:00
2025-11-18 19:50:48 -05:00
2024-06-15 14:56:44 +08:00
2023-08-08 19:08:13 +08:00
2023-08-08 19:08:13 +08:00
2026-01-29 19:19:37 +08:00
2026-01-23 17:05:56 +08:00
2024-06-15 14:56:44 +08:00
2024-06-15 14:56:44 +08:00
2025-12-08 22:42:11 +08:00
2025-12-08 22:42:11 +08:00
2026-02-12 08:42:01 +08:00
2026-02-12 08:42:01 +08:00
2025-12-18 12:37:13 +00:00
2025-02-08 11:34:40 +08:00
2026-01-26 15:21:18 +08:00
2025-08-24 23:18:17 +08:00
2024-08-12 00:00:20 +08:00
2024-08-12 00:00:20 +08:00
2024-05-10 23:47:08 +08:00
2024-08-12 00:00:20 +08:00
2024-06-15 14:56:44 +08:00
2026-01-13 09:40:55 +08:00
2026-01-13 09:40:55 +08:00
2023-10-10 14:19:23 +08:00
2023-07-07 17:29:08 +08:00