Skip to content

FuzzySkin hole + Fix: Painted artifacts and with Sacrificial layer issues#12479

Merged
SoftFever merged 10 commits into
OrcaSlicer:mainfrom
ianalexis:sacrificial-layer-fuzzy-sking-paint
May 8, 2026
Merged

FuzzySkin hole + Fix: Painted artifacts and with Sacrificial layer issues#12479
SoftFever merged 10 commits into
OrcaSlicer:mainfrom
ianalexis:sacrificial-layer-fuzzy-sking-paint

Conversation

@ianalexis

@ianalexis ianalexis commented Feb 25, 2026

Copy link
Copy Markdown
Collaborator
imagen

Everything project: FUZZY.TEST.HEAVY.CLASSIC AND ARACHNE.3mf.TXT

260305_155427_orca-slicer Current: imagen

This PR:
260305_155823_%pn
260305_155836_%pn
260305_155809_%pn
260305_155709_%pn
260305_155735_%pn
260305_155754_%pn

Also tested: #12920

@ianalexis ianalexis force-pushed the sacrificial-layer-fuzzy-sking-paint branch from a849fec to 7d062b9 Compare February 25, 2026 22:38
@ianalexis ianalexis changed the title Fix: Sacrificial layer with fuzzy paint FuzzySkin hole + Fix: Double with painted and problem with Sacrificial layer Feb 25, 2026
@ianalexis ianalexis force-pushed the sacrificial-layer-fuzzy-sking-paint branch from 4f2c141 to 595219f Compare February 26, 2026 13:14
ianalexis added a commit to ianalexis/OrcaSlicer_WIKI that referenced this pull request Feb 26, 2026
@ianalexis ianalexis force-pushed the sacrificial-layer-fuzzy-sking-paint branch from 3af76a5 to 94edb48 Compare February 26, 2026 15:06
@ianalexis ianalexis marked this pull request as ready for review February 26, 2026 15:19
@ianalexis ianalexis changed the title FuzzySkin hole + Fix: Double with painted and problem with Sacrificial layer FuzzySkin hole + Fix: Painted+normal artifacts and issues with Sacrificial layer Feb 26, 2026
@discip

discip commented Feb 27, 2026

Copy link
Copy Markdown
Contributor

@ianalexis
Thank you for this!

And since you are on it please have a look into the following issue:

After a5a5cad Orca crashes when using (e.g.) a text modifier with fuzzy skin while fuzzy skin is also enabled globally when running flatpak (Manjaro GNOME). It works with AppImage and on Windows, though.

@RF47

RF47 commented Feb 27, 2026

Copy link
Copy Markdown
Collaborator

After a5a5cad Orca crashes when using (e.g.) a text modifier with fuzzy skin while fuzzy skin is also enabled globally when running flatpak (Manjaro GNOME). It works with AppImage and on Windows, though.

@discip, could you upload a project with this bug?

@discip

discip commented Feb 27, 2026

Copy link
Copy Markdown
Contributor

@RF47
Here you go:
cephalopod.3mf.txt

@ianalexis

Copy link
Copy Markdown
Collaborator Author

@RF47 Here you go: Uploading cephalopod_2.3mf.txt…

i think you commented before it finish upload XD

@discip

discip commented Feb 27, 2026

Copy link
Copy Markdown
Contributor

Oops... 🤦🏻

@ianalexis ianalexis force-pushed the sacrificial-layer-fuzzy-sking-paint branch from 7003ab9 to 7335d58 Compare February 28, 2026 00:37
@RF47 RF47 added the bug-fix label Feb 28, 2026
@discip

discip commented Mar 1, 2026

Copy link
Copy Markdown
Contributor

@RF47 @ianalexis
Just in case you didn't notice the updated post:

cephalopod.3mf.txt

@RF47

RF47 commented Mar 1, 2026

Copy link
Copy Markdown
Collaborator

@RF47 @ianalexis Just in case you didn't notice the updated post:

I've already downloaded it, but I can't reproduce the crash in Windows. Ian has set up a virtual machine, and when we have time, we'll take a look at it.

@ianalexis ianalexis force-pushed the sacrificial-layer-fuzzy-sking-paint branch from 7335d58 to 63f7af8 Compare March 2, 2026 18:52
@ianalexis

ianalexis commented Mar 2, 2026

Copy link
Copy Markdown
Collaborator Author

@ianalexis ianalexis marked this pull request as draft March 2, 2026 19:21
@ianalexis ianalexis force-pushed the sacrificial-layer-fuzzy-sking-paint branch 2 times, most recently from 3685986 to b61dbd8 Compare March 2, 2026 20:05
@RF47

RF47 commented Mar 2, 2026

Copy link
Copy Markdown
Collaborator

@RF47 @ianalexis Just in case you didn't notice the updated post:

We added a non-empty vector safeguard. When you can, please try it to see if this fixes the crash.

@ianalexis ianalexis marked this pull request as ready for review March 2, 2026 20:10
@ianalexis

Copy link
Copy Markdown
Collaborator Author

@RF47 @ianalexis Just in case you didn't notice the updated post:

cephalopod.3mf.txt

It's compilling a possible fix. Lets w8 for the artifact and lets test it

Comment thread src/libslic3r/Feature/FuzzySkin/FuzzySkin.cpp Outdated
@ianalexis ianalexis force-pushed the sacrificial-layer-fuzzy-sking-paint branch from b3b802d to 98a4535 Compare March 3, 2026 14:03
@discip

discip commented Mar 3, 2026

Copy link
Copy Markdown
Contributor

This is very strange.

Here are some inconsistencies I observed:

  • Initial launch worked as expected.
  • Application crashed after modifying fuzzy-skin-related values.
  • Post-crash, the issue persists even when repeating the initial successful steps.
  • In one instance, the app remained stable but failed to slice. No clear indication of the cause.

No clue what's happening here. 🤷‍♂️

debug_Tue_Mar_03_18_35_26_2.log.0.txt

@RF47

RF47 commented Mar 3, 2026

Copy link
Copy Markdown
Collaborator

This is very strange.

Here are some inconsistencies I observed:

  • Initial launch worked as expected.
  • Application crashed after modifying fuzzy-skin-related values.
  • Post-crash, the issue persists even when repeating the initial successful steps.
  • In one instance, the app remained stable but failed to slice. No clear indication of the cause.

No clue what's happening here. 🤷‍♂️

debug_Tue_Mar_03_18_35_26_2.log.0.txt

Reopening this issue #11573

we need to check this
#11573 (comment)

@ianalexis ianalexis force-pushed the sacrificial-layer-fuzzy-sking-paint branch from 98a4535 to b1e3cc2 Compare March 3, 2026 21:03
@ianalexis ianalexis force-pushed the sacrificial-layer-fuzzy-sking-paint branch from 434a872 to 051cf6a Compare March 25, 2026 22:42
@julian-weinert

Copy link
Copy Markdown

I'm still getting an artifact with this. My issue #13013 is related to #11850, which this attempts to fix. I'm still having an issue here, it generates an artifact where the sacrificial layer is interrupted / includes a separate set of line above the hole.
Screenshot 2026-03-29 at 22 43 20

@ianalexis ianalexis force-pushed the sacrificial-layer-fuzzy-sking-paint branch from 051cf6a to 894e4c9 Compare April 10, 2026 02:45
@ianalexis

Copy link
Copy Markdown
Collaborator Author

I'm still getting an artifact with this. My issue #13013 is related to #11850, which this attempts to fix. I'm still having an issue here, it generates an artifact where the sacrificial layer is interrupted / includes a separate set of line above the hole.

Here i did some testing with this pr and it should be fixed.
imagen

Can you test it? How to Download Pull Requests Artifacts for Testing

Also your project didint worked for me. Can you reupload a project that fails?

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 26 out of 26 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (1)

src/libslic3r/Feature/FuzzySkin/FuzzySkin.cpp:204

  • has_fuzzy_skin / has_fuzzy_hole are set to true even when cfg.type == FuzzySkinType::None ("Painted only"). Since should_fuzzify() explicitly returns false for None, this makes downstream logic treat the layer as fuzzy (e.g., overhang reversal, reduced simplification for arc fitting) even when no fuzzy skin will actually be applied. Consider excluding None here (or computing these flags based on whether any config can fuzzify contours/holes) so "Painted only" without any painted regions doesn’t change perimeter behavior.
        if (cfg.type != FuzzySkinType::Disabled_fuzzy) { //None = painted only.
            g.has_fuzzy_skin = true;
            if (cfg.type != FuzzySkinType::External) {
                g.has_fuzzy_hole = true;
            }
        }

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +357 to +363
// Make each region's ExPolygons exclusive so overlapping regions don't double-fuzz
// the same perimeter section. Later regions in the list take priority over earlier ones
// in overlapping areas (matching modifier precedence order).
for (size_t i = 0; i < merged_regions.size(); ++i)
for (size_t j = i + 1; j < merged_regions.size(); ++j)
if (!merged_regions[i].expolygons.empty() && !merged_regions[j].expolygons.empty())
merged_regions[i].expolygons = diff_ex(merged_regions[i].expolygons, merged_regions[j].expolygons);

Copilot AI Apr 19, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code assumes a priority order between regions (“later regions … take priority”), but merged_regions is built from an std::unordered_map, so iteration order is unspecified and may vary across runs/platforms. That can make fuzzy precedence in overlaps non-deterministic and produce different toolpaths/G-code for the same project. Consider building merged_regions in a deterministic, precedence-aware order (e.g., preserve modifier/region ordering when constructing regions_by_fuzzify, or explicitly sort by an attached priority) before applying diff_ex to enforce exclusivity.

Copilot uses AI. Check for mistakes.
Comment thread src/libslic3r/Layer.cpp
@ianalexis ianalexis force-pushed the sacrificial-layer-fuzzy-sking-paint branch 2 times, most recently from 3cdc7cb to ae2fce0 Compare April 20, 2026 13:01
@ianalexis ianalexis moved this to To be reviewed in OrcaSlicer Community Board Apr 21, 2026
@ianalexis ianalexis force-pushed the sacrificial-layer-fuzzy-sking-paint branch from 410db1b to e133808 Compare April 27, 2026 18:29
ianalexis and others added 9 commits May 4, 2026 18:33
Replace unordered_map-based grouping of FuzzySkinConfig -> Surfaces with an ordered vector (or pair list) to preserve construction order and make overlap precedence deterministic. Introduce a local ConfigSurfaces struct and use std::find_if + push_back (with reserve) to collect regions; populate PerimeterGenerator::regions_by_fuzzify as a vector of (FuzzySkinConfig, ExPolygons) and apply offset_ex when pushing entries. Use should_fuzzify() for setting has_fuzzy_skin/has_fuzzy_hole. Update collect_merged_fuzzy_regions signature to accept the ordered vector of pairs. Add a comment explaining the ordering intent.
@ianalexis ianalexis force-pushed the sacrificial-layer-fuzzy-sking-paint branch from e133808 to c0690da Compare May 4, 2026 21:34
@SoftFever

Copy link
Copy Markdown
Collaborator

@copilot resolve the merge conflicts in this pull request

@SoftFever SoftFever left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Thank you all!

@SoftFever SoftFever merged commit c9413bb into OrcaSlicer:main May 8, 2026
18 checks passed
@github-project-automation github-project-automation Bot moved this from To be reviewed to Done in OrcaSlicer Community Board May 8, 2026
ianalexis added a commit to ianalexis/OrcaSlicer_WIKI that referenced this pull request May 8, 2026
ianalexis added a commit to OrcaSlicer/OrcaSlicer_WIKI that referenced this pull request May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug-fix enhancement New feature or request

Projects

Status: Done

6 participants