Skip to content

fix(cli): surgical port of assemble-list crash + CLI extruder expand (#560/#562) - #6

Merged
aceRage merged 4 commits into
mainfrom
cursor/fix-cli-assemble-list-and-extruders-c932
Sep 4, 2026
Merged

fix(cli): surgical port of assemble-list crash + CLI extruder expand (#560/#562)#6
aceRage merged 4 commits into
mainfrom
cursor/fix-cli-assemble-list-and-extruders-c932

Conversation

@aceRage

@aceRage aceRage commented Sep 4, 2026

Copy link
Copy Markdown
Owner

Description

Surgical HIGH-CONFLICT manual port of two open Snapmaker Orca PRs onto Ultra. Manual hunks only — Ultra PartPlate.cpp / Snapmaker_Orca.cpp are not wholesale overwritten.

Upstream

Why this is HIGH conflict

Ultra CLI + PartPlate + Assemble Separately have drifted from Snapmaker Orca. This port adapts exact Snapmaker#560/Snapmaker#562 hunks onto the drifted Ultra sources and keeps Ultra CLI debug logs.

No AMP / profile / Stream refactors.

Changes

Part A — Snapmaker#560 (3 commits)

  1. fix(cli): trim .stl name by 4 chars in assemble-list (#560)

    • STL-only: object_name.erase(..., -4) so names do not keep a trailing .
    • .obj remains -3
    • construct_assemble_list entry name unchanged
  2. fix(partplate): null-safe plate name texture + invalidate (#560)

    • generate_plate_name_texture() early-returns when canvas/plater is missing
    • New invalidate_plate_name_texture() (declared in PartPlate.hpp)
    • clear() / set_plate_name call invalidate instead of raw m_name_texture.reset() / generate
    • Ultra adaptation: invalidate still resets m_name_texture so GUI lazy-regenerate via render_plate_name_texture keeps working (literal Fix CLI assemble-list crash during plate loading Snapmaker/OrcaSlicer#560 invalidate would leave get_id() != 0 and stall the displayed name)
  3. fix(partplate): skip GUI set_shape work when m_plater == nullptr (#560)

    • Wrap logo / mesh / icon / grid / raycaster / name-texture work in if (m_plater != nullptr)
    • Keep non-GUI Ultra set_shape work outside the wrap (calc_bounding_boxes, height limit)

Part B — Snapmaker#562 (1 commit)

  1. fix(cli): skip expand_plate_extruders in get_extruders_under_cli (#562)
    • Remove/skip expand_plate_extruders() only after unique-sort in get_extruders_under_cli
    • Comment left: needs GUI preset_bundle
    • GUI get_extruders helpers / dual-nozzle expand paths unchanged
    • Ultra CLI debug logs around the function retained

Files

  • src/Snapmaker_Orca.cpp — one-line STL trim in construct_assemble_list
  • src/slic3r/GUI/PartPlate.cpp + .hpp

Screenshots/Recordings/Graphs

N/A — CLI crash / null-safety; no UI layout change intended. GUI plate-name invalidate still lazy-regenerates on next render.

Tests

Cloud CLI smoke limits: this environment cannot run Snapmaker Orca CLI assemble-list or plate-load smoke (no built slicer binary, no printer/assemble fixtures). Verification here is surgical-diff review + static consistency checks:

  • STL trim is .stl only; .obj still -3; function name unchanged
  • expand_plate_extruders still called from GUI helpers (get_extruders, get_extruders_without_support); skipped only in get_extruders_under_cli
  • set_shape still runs calc_bounding_boxes / calc_height_limit without a plater
  • Ultra CLI BOOST_LOG_TRIVIAL debug lines around get_extruders_under_cli retained
  • Code review: surgical port acceptable as-is; Ultra m_name_texture.reset() inside invalidate is required to avoid a GUI name-stale regression

Pre-existing (out of scope): estimate_wipe_tower_size() can still fall back to GUI get_extruders() in CLI if plate_extruder_size == 0. Not part of Snapmaker#560/Snapmaker#562.

Manual follow-up on a full desktop build (same as upstream Snapmaker#560/Snapmaker#562 validation):

  • --load-assemble-list single-object control: no crash, G-code export
  • Two-object same-plate assemble-list: no crash, G-code export
  • GUI plate rename / clear still refreshes the plate name texture
Open in Web Open in Cursor 

cursoragent and others added 4 commits September 4, 2026 04:16
STL object names were trimmed by 3 chars, leaving a trailing '.'
on the assemble-list CLI path. Trim 4 chars for .stl only; leave
.obj at 3 chars. construct_assemble_list entry name unchanged.

Co-authored-by: aceRage <aceRage@users.noreply.github.com>
)

CLI assemble-list plate loading has no GUI plater/canvas. Early-return
generate_plate_name_texture when canvas is unavailable, and invalidate
the name texture/raycaster from clear() and set_plate_name instead of
raw reset/generate. Encapsulates Ultra's m_name_texture.reset() so GUI
lazy-regenerate still works.

Co-authored-by: aceRage <aceRage@users.noreply.github.com>
…pmaker#560)

CLI plate loading has no plater. Keep non-GUI set_shape work
(calc_bounding_boxes, height limit) and skip logo/mesh/icon/grid/
raycaster/name-texture initialization when m_plater is null.

Co-authored-by: aceRage <aceRage@users.noreply.github.com>
…pmaker#562)

expand_plate_extruders needs GUI preset_bundle. Skip it only on the
CLI extruder path; leave GUI get_extruders helpers and dual-nozzle
paths unchanged. Ultra CLI debug logs around the function retained.

Co-authored-by: aceRage <aceRage@users.noreply.github.com>
@aceRage
aceRage marked this pull request as ready for review September 4, 2026 04:21
@aceRage
aceRage merged commit e43a51f into main Sep 4, 2026
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.

2 participants