Skip to content

feat(wipe-tower): BBS no-sparse clearance and safe descend (Orca #15485) - #51

Merged
aceRage merged 4 commits into
mainfrom
cursor/wipe-tower-bbs-no-sparse-c5db
Sep 20, 2026
Merged

aceRage merged 4 commits into
mainfrom
cursor/wipe-tower-bbs-no-sparse-c5db

Conversation

@aceRage

@aceRage aceRage commented Sep 17, 2026

Copy link
Copy Markdown
Owner

Description

Port of OrcaSlicer #15485 (MERGED, 7c742e09c7) onto Edge main, plus a labeled second commit of the remaining Orca #15441 Z-restore.

Makes No sparse layers usable on Bambu-style prime towers:

  • Toolhead descends to the compacted tower only when already over it (append_tcr defer-descend + in-tower NC travel).
  • Pre-slice + post-tower clearance validation (compacted_wipe_tower_clearance_*) with plate highlight polygons.
  • Auto-disable / message when smooth timelapse needs an every-layer tower.
  • New extruder_clearance_dist_to_rod (default-off / unused until a profile sets it).
  • Catch2 wipe-tower compaction/clearance tests; GLCanvas live by-layer preview (counterpart of sequential by-object clearance).
  • fix: fix no sparse layers during a toolchange OrcaSlicer/OrcaSlicer#15441: change_filament_gcode runs at real layer Z, then Z returns to the tower.

Fixes Orca OrcaSlicer#15381 / Orca OrcaSlicer#11703 class of collisions. Option stays default-off; default profiles should match baseline G-code.

Commits

  1. feat(wipe-tower): BBS no-sparse clearance and safe descend (Orca #15485) — Print clearance, GCode descend/travel, WipeTower+WipeTower2 helpers, GLCanvas/PartPlate preview, config/UI/timelapse, Catch2.
  2. fix(wipe-tower): restore layer Z around change_filament_gcode (Orca #15441) — placeholders + restore/deretraction around toolchange. Verified against Orca fix: fix no sparse layers during a toolchange OrcaSlicer/OrcaSlicer#15441 head d1b31fee (OPEN, mergeable_state: dirty; the final-purge commits were already reverted upstream, so this is the remaining Z-restore only).

OrcaSlicer#15441 coordination

Orca OrcaSlicer#15441 is still OPEN and not green (CI is effectively snyk-only). Policy was: re-diff every GCode/WipeTower hunk both PRs touch; include Z-restore as a second commit if it composes safely; otherwise land OrcaSlicer#15485 alone and document residual multi-toolhead risk.

Included. The remaining OrcaSlicer#15441 patch is small (+58/−1 upstream, 3 files) and composes with OrcaSlicer#15485:

Hotspot OrcaSlicer#15485 OrcaSlicer#15441 This PR
GCode.cpp append_tcr initial Z defer_compacted_descend — do not drop onto the model will_go_down gates restore/deretraction around change_filament_gcode Combined: will_go_down && !defer_compacted_descend for the immediate drop; restore is a no-op when still at layer Z; deretraction is the in-tower descend after custom G-code
GCode.cpp append_tcr after toolchange compacted_below_object descend injected into [filament_start_gcode] [deretraction_from_wipe_tower_generator] after [change_filament_gcode] Complementary: OrcaSlicer#15441 is the toolchange-path descend; OrcaSlicer#15485 start-filament descend is a backup if the writer is still above the tower
GCode.cpp append_tcr2 Unchanged Type2 descend (Orca OrcaSlicer#15485 also left this path alone) Restore layer Z before set_extruder when will_go_down && enable_prime_tower Ported; Type2 already had will_go_down + [deretraction_from_wipe_tower_generator]
WipeTower.cpp toolchange_Change No placeholder change [restore_layer_z_before_toolchange] / [deretraction_from_wipe_tower_generator] around [change_filament_gcode] Ported
WipeTower2.cpp toolchange_Change No placeholder change [restore_layer_z_before_toolchange] before [change_filament_gcode] Ported; existing deretraction placeholder kept

If Orca OrcaSlicer#15441 later grows past d1b31fee (e.g. the reverted final-purge work returns), re-diff before merging this.

Edge adaptations (not a blind cherry-pick)

Screenshots/Recordings/Graphs

N/A in this environment (no GUI session). Expected plater behaviour: by-layer compacted-tower keep-out rings beside the existing sequential by-object gizmo; unsafe layouts get the shared clearance message and slicing is blocked.

Tests

  • Catch2 additions in tests/libslic3r/test_wipe_tower.cpp ([WipeTower][NoSparseLayers]): sparse-skip rule, compacted Z, keep-out zone, per-object rise limits, ring/outline agreement, brim padding.
  • Catch2 status: not executed here — this environment has no CMake/deps build tree (CMakeCache.txt absent). Please run cd build && ctest --output-on-failure -R libslic3r_tests (or ./tests/libslic3r/libslic3r_tests "[NoSparseLayers]") after a normal slicer build.
  • Upstream fix: fix no sparse layers during a toolchange OrcaSlicer/OrcaSlicer#15441 has no extra Catch2; Z-restore is G-code ordering and needs a multi-filament no-sparse slice to confirm change_filament_gcode at layer Z.

Accept criteria

  • Default profiles (no-sparse off): G-code / behaviour match baseline.
  • No-sparse on + safe layout: tower skips sparse layers; descend only after travel over tower.
  • Unsafe layout: pre-slice error + plate highlight; slicing blocked with shared message.
  • Smooth timelapse: setting forced off / explained.
  • Sequential by-object clearance gizmo still works.
  • Catch2 wipe-tower tests green (see status above).
  • fix: fix no sparse layers during a toolchange OrcaSlicer/OrcaSlicer#15441 included: toolchange custom G-code is restored to real layer Z then returned to tower Z (WipeTower + WipeTower2). Still needs a real multi-toolhead no-sparse slice to confirm; do not treat this as printer-validated.

Residual if this second commit were dropped: Type2 / !is_finish_first can still run custom G-code at tower Z and sweep through taller parts. With the second commit landed, that is the remaining risk only if a later OrcaSlicer#15441 revision diverges from d1b31fee.

Open in Web Open in Cursor 

cursoragent and others added 2 commits September 17, 2026 18:32
…Slicer#15485)

Port compacted prime-tower clearance validation, safe descend-after-travel,
shared sparse-layer helpers, GLCanvas by-layer preview, and timelapse
auto-disable so "No sparse layers" is usable on Bambu-style towers.

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

With no-sparse compaction the tower sits below the object, so custom
toolchange G-code must run at real layer Z and only then return to the
tower. Combined with OrcaSlicer#15485 defer-descend: lift/restore is a no-op when
the nozzle never left layer Z, and deretraction is the in-tower descend.

Verified against Orca OrcaSlicer#15441 head d1b31fe (OPEN, mergeable dirty; final-purge
reverts already applied upstream).

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

Copy link
Copy Markdown

Documentation validation failed

🔗 Link Validation Errors

📄 doc/developer-reference\Built-in-placeholders-variables.md:

  • Line 93: home#process-settings - Fragment does not exist
  • Line 93: home#material-settings - Fragment does not exist

📄 doc/developer-reference\How-to-wiki.md:

  • Line 44: home#material-settings - Fragment does not exist
  • Line 45: home#process-settings - Fragment does not exist
  • Line 46: home#prepare - Fragment does not exist
  • Line 47: home#calibrations - Fragment does not exist
  • Line 50: home#process-settings - Fragment does not exist
  • Line 50: home#support-settings - Fragment does not exist
  • Line 50: home#others-settings - Fragment does not exist

📄 doc/Home.md:

  • Line 14: Precise-wall.md - File does not exist
  • Line 17: extrusion-rate-smoothing.md - File does not exist
  • Line 33: adaptive-pressure-advance.md - File does not exist

📄 doc/Tab.cpp:

  • Line 2376: quality_settings_z_contouring - File does not exist
  • Line 2377: quality_settings_z_contouring - File does not exist
  • Line 2378: quality_settings_z_contouring - File does not exist
  • Line 2379: quality_settings_z_contouring - File does not exist
  • Line 2380: quality_settings_z_contouring - File does not exist
  • Line 2443: fill-patterns - File does not exist
  • Line 2444: fill-patterns - File does not exist
  • Line 2447: fill-patterns - File does not exist
  • Line 2677: multimaterial_settings_prime_tower#brim-chamfer - Fragment does not exist
  • Line 2678: multimaterial_settings_prime_tower#brim-chamfer-max-width - Fragment does not exist
  • Line 2690: multimaterial_settings_prime_tower#wall-gap - Fragment does not exist
  • Line 2707: multimaterial_settings_ooze_prevention#delta-temperature - Fragment does not exist
  • Line 2719: multimaterial_settings_advanced#paint-depth-mode - Fragment does not exist
  • Line 2720: multimaterial_settings_advanced#paint-depth-walls - Fragment does not exist
  • Line 2721: multimaterial_settings_advanced#paint-depth-distance - Fragment does not exist
  • Line 2725: multimaterial_settings_advanced#paint-sparse-infill - Fragment does not exist
  • Line 2729: multimaterial_settings_advanced#paint-depth-solid-interfaces - Fragment does not exist
  • Line 2784: others_settings_fuzzy_skin#skip-fuzzy-skin-on-overhangs - Fragment does not exist

🖼️ Image Validation Errors

📄 doc/developer-reference\How-to-create-profiles.md:

  • Line 142: [Markdown] Alt text "Help menu" ≠ filename "go-to-configuration-folder"
  • Line 144: [Markdown] Alt text "Delete system folder" ≠ filename "profile-delete-system-folder"

aceRage added a commit that referenced this pull request Sep 20, 2026
Documents the toolchain layout, detached build recipe, Validate Documentation CI behavior, upstream-porting fork differences, install binary-copy gotcha, and the s_IsBBLPrinter G-code flavor quirk. Captured during the PR #51/#41 integration.
@aceRage
aceRage marked this pull request as ready for review September 20, 2026 18:41
@aceRage

aceRage commented Sep 20, 2026

Copy link
Copy Markdown
Owner Author

Status update (Sep 20): marked ready for review. Branch is up to date with main, mergeable (clean), and "Check Documentation" CI is green.

Catch2 results on this branch (Windows, Release):

  • [NoSparseLayers]: 44 assertions / 8 cases ✓
  • [WipeTower]: 67 assertions / 14 cases ✓

Remaining gate before merge: real multi-filament no-sparse slice to confirm descend-over-tower behavior and change_filament_gcode at layer Z (see accept criteria in the PR body). A combined test build (this PR + #41 + main) is installed in the maintainer's live-testing folder.

@aceRage
aceRage merged commit 82b7ed8 into main Sep 20, 2026
1 check passed
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