In iMEX (IDEX/IQEX) parallel printing modes (copy/mirror), only the
primary extruder generates toolpaths. The firmware duplicates the
primary's movements for secondary carriages, so they don't appear in
tool_ordering.all_extruders().
This caused is_extruder_used[N] to return false for secondary tools
even though they're physically active and moving.
The fix adds logic to parse the active mode's tool assignments from
imex_mode_active_tools config and marks all assigned tools as used.
Changes:
- Added null checks and bounds validation for config options
- Skip empty tool strings to avoid unnecessary parsing
- Reordered bounds checks for defensive programming
- Added clarifying comments for exception handling
This ensures is_extruder_used[N] is true for all tools in a parallel
mode, allowing printer profiles to correctly enable heaters and
emit cleanup G-code for all active carriages.
Fixes: is_extruder_used[1] returns false in copy/mirror modes (#13086)
Related: Comment [28]/[30], Comment [18] (is_extruder_used in G-code header)
- Add warning badge (obj_warning.svg overlay) to the iMEX plate icon when
a parallel mode is active alongside multi-material objects on the same plate
- Add has_imex_multimaterial_conflict() using get_extruders(true) so only
filaments actually used on the plate are checked
- Move multi-material caution dialog from reslice() into on_action_slice_plate /
on_action_slice_all so it fires exactly once per user action and does not
disrupt GL thumbnail generation during Slice All
- Fix is_imex missing from p->config init key list so on_config_change()
diff detection correctly triggers refresh_imex_icons()
- Defer imex_changed handling until after set_bed_shape() so m_shape is current
- Replace plain remove button with ScalableButton (imex_remove.svg) in mode rows
- Add EditGCodeDialog launch button per mode row for placeholder browsing
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Register imex_mode (string), imex_mode_index (int), and imex_mode_gcode
(string) in OtherSlicingStatesConfigDef so they appear in the placeholder
search UI under Slicing State.
Set all three via placeholder_parser().set() before any script processing
in _do_export(). Process imex_mode_gcode first so {global} declarations
defined there flow forward into machine_start_gcode.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
IMEXModesCtrl:
- Primary mode is now a non-deletable first row stored as sentinel
"primary" in imex_mode_names; older configs load cleanly
- New rows default T0 → Primary when no tool assignment is stored
- Filter "primary" from plater popup/cycle list to prevent double entry
- imex_tools_per_gantry cap raised 2 → 4
Zone sizing:
- Zone width/height now based on active tool count only; inactive tools
donate their bed share to active neighbors (fixes 4-tool layout)
- Active col/row maps (col_to_zone/row_to_zone) applied consistently
across zone fills, collision strips, and primary zone box
GCodeViewer animation:
- Mirror position formula fixed: left-of-copy reflects across copy
zone's left edge; right-of-copy reflects across right edge
(T3 was rendering on top of T1)
- strip_width/row_strip_height use active counts, matching PartPlate
Stability:
- Early return in calc_imex_zones() when tool_states is empty; prevents
OOB crash on new printer with stale process-preset mode name
- is_imex toggle in on_config_change calls refresh_imex_icons() so the
plate mode icon appears without requiring a new project
GCode:
- Remove "primary" guard so Primary mode gcode field is emitted at
start of print
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add all_tool_states map to IXexModesCtrl Row, storing all tool
assignments including those not currently visible due to grid size
- active_tools_string() now serializes from all_tool_states so
off-screen assignments survive the round trip through a smaller grid
- Button clicks keep all_tool_states in sync with visible btn_states
- Display anchors to the gantry row containing the Primary assignment
so reducing gantry count keeps the meaningful row visible rather
than always defaulting to row 0
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Updated profile to match latest officlal BBL tweaks
Updated the profile for the P2S with several changes to match the latest machine gcode changes made by BBL:
- Added Ventobox support
- Added air purification at the end of the print. When exhaust fan controls are setup in the filament profile, this is skipped
- Disabled auxiliary_fan by default to fix the issue that it overrides auto cooling and heating managed by the printer. Enabling this in printer settings makes it behave as before if so desired
- Updated with other tweaks made by BBL
* Reverted one line in layer change code
Reverted one line in layer change gcode as it was causing issues and was bambu studio specific anyway. Filament change works exactly as expected now.
* Re-enabled soaking time
This was a personal change that sneaked in, but may be unwanted for other users who have been using Orca for this printer for a while.
* Fixed redundant homing command and moved enable input shaping up
Fixed some issues BBL made in their original startup code that executes one redundant homing command for people who disable ABL. Also moved up the enable input shaping command to make the startup sequence quieter.
---------
Co-authored-by: SoftFever <softfeverever@gmail.com>
## Summary
Adds proper system profiles for the **Anycubic Kobra Neo** with 0.4mm nozzle (stock Marlin firmware).
This replaces the profiles from #12341 which had several issues:
- All files had `"from": "User"` instead of `"from": "system"` — causing profile loading failures
- No `inherits` or `type` fields — broke the inheritance chain
- Klipper-only gcode (not stock firmware)
- No `Anycubic.json` index entries — printer never appeared in the UI
- Cover image was 382x600 instead of 240x240 (displayed squashed)
- Profiles were subsequently removed in #12889
### Files added/modified
| File | Description |
|------|-------------|
| `machine/Anycubic Kobra Neo.json` | Base machine model (220x220x250mm) |
| `machine/Anycubic Kobra Neo 0.4 nozzle.json` | 0.4mm nozzle variant, stock Marlin gcode |
| `process/0.12mm Detail @Anycubic Kobra Neo 0.4 nozzle.json` | Detail process profile |
| `process/0.16mm Standard @Anycubic Kobra Neo 0.4 nozzle.json` | Standard process profile |
| `process/0.20mm Standard @Anycubic Kobra Neo 0.4 nozzle.json` | Standard process profile |
| `process/0.28mm Standard @Anycubic Kobra Neo 0.4 nozzle.json` | Standard process profile |
| `filament/Anycubic PLA @Anycubic Kobra Neo 0.4 nozzle.json` | PLA filament profile |
| `Anycubic Kobra Neo_cover.png` | Resized to 240x240 |
| `Anycubic.json` | Added index entries for all new profiles |
### Approach
- Based on the working **Anycubic Kobra 2 Neo** profiles (similar hardware — direct drive, 220x220 bed)
- Start gcode uses `G29` for auto bed leveling (stock Kobra Neo probes fresh each print)
- Profiles use proper `"from": "system"` and `"inherits": "fdm_machine_common"` / `"fdm_process_common"` chains
- Buildplate model and texture from #12341 are already in the repo
### Testing
- Verified profiles load correctly in OrcaSlicer 2.3.2 (no errors in log)
- Printer appears in Printer Selection dialog with correct 240x240 cover image
- Process/filament presets appear when printer is selected
- **Note:** Start/end gcode adapted from Kobra 2 Neo for stock Marlin — testing on stock firmware by Kobra Neo owners would be appreciated
Closes the gap left by #12341 and #12889.
- Add per-plate iXex mode icon to the plate toolbar (normal, hover, dark, dark-hover SVG variants)
- Left-click cycles through available modes; right-click shows a popup menu with all modes as radio items
- Mode changes are recorded in the undo/redo snapshot system
- Fix double context menu: suppress EVT_GLCANVAS_PLATE_RIGHT_CLICK and EVT_GLCANVAS_RIGHT_CLICK when the iXex icon popup was already shown
- Remove ixex_parallel_mode combo from Print Settings > Other > Special mode (superseded by per-plate icon)
- Remove dead code: refresh_ixex_mode_combo(), m_ixex_mode_combo member, related Tab reload hook
- iXex mode persisted in 3MF project files via existing plate metadata serialization
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add per-plate iXex mode icon to the plate toolbar (normal, hover, dark, dark-hover SVG variants)
- Left-click cycles through available modes; right-click shows a popup menu with all modes as radio items
- Mode changes are recorded in the undo/redo snapshot system
- Fix double context menu: suppress EVT_GLCANVAS_PLATE_RIGHT_CLICK and EVT_GLCANVAS_RIGHT_CLICK when the iXex icon popup was already shown
- Remove ixex_parallel_mode combo from Print Settings > Other > Special mode (superseded by per-plate icon)
- Remove dead code: refresh_ixex_mode_combo(), m_ixex_mode_combo member, related Tab reload hook
- iXex mode persisted in 3MF project files via existing plate metadata serialization
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Fix crash-inconsistent draft shield
* Skip empty skirt G-code and fix skirt_done handling
Track whether a skirt was actually generated for the current print Z and avoid appending empty skirt G-code. Only pop m_skirt_done when a skirt was emitted to prevent corrupting skirt state across multiple instances per layer. Also use a temporary string (moved into the main gcode) to detect emptiness before updating state. Preserves existing first-layer clearing behavior.
* Union ex brims
Revert "Union ex brims"
This reverts commit bbc9a39faf318dc2df093eb2bdcebf19a4162fe9.
Update Brim.cpp
* dont repeat paths
* Update Brim.cpp
* multimaterial brim independiente
* Normal brim if is by object
* fix print order
* cleaning 1
* cleaning 2
* Normal brim if multimaterial on first layer
* fix artifact
* combine_brim optional
refactoring
* refactoring gcode.cpp
* refactoring brim.cpp
Update Brim.cpp
* Remove multimaterial first-layer check for brims
Stop detecting extruders used on the first layer and remove the is_multimaterial_first_layer guard. Simplify can_combine_brims to only consider combine_brims and whether printing is ByObject, allowing brims to be combined across extruders unless printing by object or combine_brims is disabled. Cleans up unused code and simplifies brim-generation conditions.
* Remove material specification from unified brim comment
* Update PrintConfig.cpp
Includes two feature sets on top of the base iXex implementation:
Auto-arrange iXex zone constraint:
Constrains placement to the primary zone when a parallel mode is active.
Collision strips registered as hard obstacles via m_unselected so the
NFP placer correctly excludes them.
Nozzle clearance rename + carriage box visualization overhaul:
ixex_carriage_width_x/y → ixex_nozzle_clearance_x/y (breaking rename).
Collision strip width now uses the literal clearance value, not half.
Carriage footprint boxes place the nozzle at the correct physical edge
for all printer types (IDEX, IQEX 2x2) and modes (copy, mirror).
Fixed GLModel::reset() bug causing stale mesh on config change.
Config key rename (breaking for saved profiles — call out in PR):
ixex_carriage_width_x/y → ixex_nozzle_clearance_x/y
Labels updated to "Nozzle Clearance X/Y" with consistent tooltips
describing the measurement as nozzle-to-collision-side-edge distance.
Strip math fix:
Previously halved the clearance value (× 0.5) under the assumption
the nozzle was centered in the carriage. The measurement is now the
literal nozzle-to-edge distance, so the × 0.5 factor is removed.
The collision strip width now equals the configured value directly.
Carriage box visualization (GCodeViewer):
- Add per-carriage box_offset_x/y so the nozzle marker sits at the
physically correct edge of the footprint box rather than centered.
- X: zone-based by default (nozzle at inner edge facing bed center).
Copy secondaries inherit the primary's X orientation (same movement
direction). Mirror secondaries use the collision-side edge.
- Y: always row-based regardless of copy/mirror mode. Gantry is always
behind the nozzle (high-Y); front-row primaries with a back-row
secondary override to place nozzle at the low-Y edge.
- Fix stale mesh bug: GLModel::init_from() is a no-op when already
initialized. Call reset() before init_from() so mesh rebuilds
correctly when nozzle clearance values change in config.
- Remove m_ixex_toolhead_box_dims (was the now-unnecessary cache key).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
params.excluded_regions flows into libnest2d PlacementConfig.m_excluded_regions
which is declared but never consumed by the NFP placer — the field is dead code.
m_unselected is the working path: it becomes fixeditems that are preloaded as
physical fixed obstacles in the NFP computation, same as the wipe tower.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Auto-arrange now injects the carriage collision zones as hard excluded
regions (is_virt_object) when an iXex parallel mode is active, using the
same BoundingBoxf3 data already stored for rendering and violation checks.
Objects will no longer be placed in the mirror-edge danger strips.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds std::optional<BoundingBoxf> m_ixex_primary_zone_box to PartPlate,
populated by calc_ixex_zones() alongside the existing secondary/collision
zone geometry. The new ixex_primary_zone() getter calls ensure_ixex_zones()
so callers always get fresh data. ArrangeJob::process() replaces the
full-bed bedpts with the primary zone corners when the getter returns a
value, so auto-arrange no longer drops objects into the bed center.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The thin rectangular outlines around copy/mirror zones caused visible
aliasing and appeared to flash during interaction. Removed the border
GLModel, its build code in calc_ixex_zones(), the render block, and
the unused border field from IXexTheme.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Same class of bug as the TabPrinter fix: clear_pages() destroys all
page widgets but didn't null m_ixex_mode_combo, causing a SIGSEGV in
refresh_ixex_mode_combo() when load_current_preset() ran after a
page rebuild (e.g. triggered by Plater::reset()).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Arrays cannot be captured by value in C++ lambdas; replaced with a
static local declared inside the event handler.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Introduces first-class parallel printing (copy/mirror modes) for printers
with multiple independent X-axis carriages. Branded iXex (independent X
extruder), targeting Klipper firmware with a firmware-agnostic design.
- PrintConfig: new printer options declaring iXex capability and geometry
(is_ixex, ixex_gantry_count, ixex_tools_per_gantry, carriage dims,
tool layout, and per-mode name/role/gcode arrays)
- Preset: iXex keys registered in printer and process preset option lists
- Tab: IXexModesCtrl visual grid editor in Printer preset tab; mode
dropdown in Process → Others tab; clear_pages() nulls iXex pointers to
prevent dangling-pointer crash on preset save
- PartPlate: 2D zone visualization (active/dimmed/dividers) and
placement-violation detection (has_ixex_placement_violations) that
blocks slicing when objects fall outside the primary zone
- Plater: violation detection wired into update_background_process so
the Slice button is disabled with an error notification on violation
- GCode: mode-activation G-code injected before machine_start_gcode
- GCodeViewer: multi-carriage toolhead markers in sequential preview,
filament legend annotated with active carriage count and mode name
* Fix return from assembly linux
* Tie deferred callback to canvas lifetime and add shutdown guards
Use m_canvas->CallAfter instead of wxGetApp().CallAfter to ensure the callback is only executed if the canvas is still alive.
Add early returns if wxGetApp().is_closing() is true before accessing plater or the 3D canvas, reducing the risk of use-after-free during application shutdown.
Addresses feedback regarding potential UI teardown race conditions.
* copilot suggestion
* Use local reference to wxGetApp() in Return button callback
Replace multiple calls to wxGetApp() with a single local reference
to improve readability and avoid redundant function calls.