fix(print): sequential clearance Kahn sort + above-rod Y extent (#630, #793) - #4
Merged
Merged
Conversation
Replace object-list-order sort in sequential_print_clearance_valid with a topological sort over height-to-lid / height-to-rod clearance constraints. If no valid order exists, keep the original object list so genuine collisions still report the existing error. Co-authored-by: aceRage <aceRage@users.noreply.github.com>
Port Snapmaker#793 logical commit ebdb36d: sequential clearance Y-overlap now uses only geometry above height-to-rod, not the full footprint. Lid-height last-slot and horizontal toolhead radius checks are unchanged. Co-authored-by: aceRage <aceRage@users.noreply.github.com>
aceRage
marked this pull request as ready for review
September 4, 2026 04:02
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Two-commit port of sequential print-by-object clearance fixes from Snapmaker/OrcaSlicer into Ultra. Only
src/libslic3r/Print.cppis changed.This stops false "Assembly is too tall, and collisions will be caused" errors on MakerWorld/Bambu 3MFs whose object-list order is not a valid print order, and then tightens the Y-overlap test to the geometry that can actually hit the X rod.
Commit order (A then B)
Part A —
fix(print): sequential clearance order via Kahn sort (#630)#if 0score-propagation heuristic /#elseobject_indexsort inPrint::sequential_print_clearance_validwith a Kahn topological sort over clearance constraints.height > height_to_lid). Y-overlap plusheight > height_to_rod⇒ must print before. Ties broken byobject_index.Part B —
fix(print): sequential clearance uses above-rod Y extent (#793)ebdb36dea99831778eb3cc04ffc61ad134683ab2(~+63/−14 inPrint.cpp).has_above_rod/above_rod_min_y/above_rod_max_y; compute above-rod Y from transformed mesh triangles (any vertex above rod contributes all three Ys; skip non-model_partvolumes); use that extent in the Fix sequential print collision check depending on object list order Snapmaker/OrcaSlicer#630 constraint graph and in the vertical clearance loop. Tall-for-rod useshas_above_rod, notheight > hc2.Screenshots/Recordings/Graphs
No UI change. Validation on Ultra hardware / MakerWorld 3MFs still needed locally (see Tests). Upstream Snapmaker#630/Snapmaker#793 include before/after slice screenshots and a printed above-rod test plate.
Tests
69f4a83/ Fix sequential print collision check depending on object list order Snapmaker/OrcaSlicer#630); Part B +63/−14 (same asebdb36d).sequential_print_clearance_validundertests/.ctest(wxWidgets deps, full slicer toolchain, and printer-profile validation are not available). Please compile locally and re-slice the MakerWorld/Bambu 3MFs from Fix sequential print collision check depending on object list order Snapmaker/OrcaSlicer#630 plusaboverod_test.3mffrom Sequential print: only material above height-to-rod can collide with the beam (stacked on #630) Snapmaker/OrcaSlicer#793.