fix: Prevent multi-color 3MF color loss via per-layer XY area cross-region carving#519
Open
zackaree-shen wants to merge 3 commits into
Open
fix: Prevent multi-color 3MF color loss via per-layer XY area cross-region carving#519zackaree-shen wants to merge 3 commits into
zackaree-shen wants to merge 3 commits into
Conversation
…egion carving Replace the arbitrary print_region_id-based and per-volume bbox_volume-based cross-region overlap carving with a per-layer XY area comparison: - Accumulate ExPolygon area per print_object_region_id at each Z layer - Smaller area region (detail) carves larger area region (base) - Hysteresis guard: use print_region_id tiebreaker when area ratio < 1.5x - Preserve negative_volume and same-region trim_overlap behavior unchanged
… only - Narrow the per-layer XY area carving to cross-region (different print_object_region_id) paths - Default path falls back to simple diff_ex, preserving Bambu's #if 1 performance-safe behavior - Avoids re-introducing trim_overlap performance regression on same-region overlaps
72a0def to
f24e1e8
Compare
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.
fix: Prevent multi-color 3MF color loss via per-layer XY area cross-region carving
Problem
Multi-color 3MF files suffered color loss during slicing. The root cause was that cross-region carving used a global bounding box instead of per-layer XY extrusion area, causing incorrect carving decisions on layers where the extrusion region differed from the global bounds.
Solution
Add per-layer XY area comparison for cross-region carving, but only when volumes belong to different print regions (different \print_object_region_id). This narrow scope:
Decision tree (per overlapping volume pair):
Changes
PR Size: Small (1 file, ~55 lines net)
Testing