Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ported filament shrinkage compensation for XY and independent Z from Prusa Slicer (fixing MMU painting, seam painting, support painting issues) #6507

Conversation

igiannakas
Copy link
Contributor

@igiannakas igiannakas commented Aug 19, 2024

Ported filament shrinkage compensation from Prusa Slicer. Updated Prusa's calculation logic to be 100 = no shrinkage to be consistent with orca definitions and any saved profiles from the users (vs. Prusa that uses a 0 as no scaling).

Can adjust shrinkage compensation on X, Y as well as Z (separately) and is compatible with multi colour/material prints.

Existing user filament compensation settings will migrate to XY shrinkage (as the parameter name is unchanged). Z will be the default of 100%.

Fixes #5756
Fixes #5152
Fixes #4551
Fixes #5664
Fixes #4091

Supersedes PR: #5774

Screenshots/Recordings/Graphs

image
image
image

Tests

The below tests were performed:

  1. Single color XY/Z compensation
  2. Multi color XYZ compensation
  3. Different XYZ compensations per filament - ignores setting and slices at 100%
  4. If object is taller in Z than printer space, throw error in the UI
  5. If object is wider than the plate or ends up out of bounds, throw error at the end of slicing
  6. Seam & support painting work as expected

All of the 6 above did not work in the current implementation (as known).

…ic to be 100 = no shrinkage to be consistent with orca definitions
@igiannakas igiannakas changed the title Ported filament shrinkage compensation from Prusa Slicer. Updated log… Ported filament shrinkage compensation for XY and independent Z from Prusa Slicer Aug 19, 2024
@Noisyfox
Copy link
Collaborator

Noisyfox commented Aug 20, 2024

Nice, and does this also solve the issue that mmu/seam/support painting not working properly when shrinkage != 100%?

@igiannakas
Copy link
Contributor Author

igiannakas commented Aug 20, 2024

Have not tested seam & support painting but probably yes, as it simply applies an XYZ scale transform to the whole object instead of just the perimeters, that the old version used to do, from what I understand.

EDIT: Tested below, it works.

@igiannakas
Copy link
Contributor Author

igiannakas commented Aug 20, 2024

If anyone fancies a code review as it’s quite a long-ish merge, hence is very well possible I missed something in the merge, the prusa commit for this feature is here: prusa3d/PrusaSlicer@4b8fe98

@igiannakas
Copy link
Contributor Author

igiannakas commented Aug 20, 2024

Nice, and does this also solve the issue that mmu/seam/support painting not working properly when shrinkage != 100%?

@Noisyfox

Support painting works

(left - this PR, Right 2.1.1)
image

Seam placement works
(left - this PR, Right 2.1.1)
image

MMU painting works (already tested but double checking)
(left - this PR, Right 2.1.1)
image

Used 50% XY scaling for effect :D

So yeap, the prusa approach & code seems pretty comprehensive and well thought out (as expected :) )

@igiannakas igiannakas changed the title Ported filament shrinkage compensation for XY and independent Z from Prusa Slicer Ported filament shrinkage compensation for XY and independent Z from Prusa Slicer (fixing MMU painting, seam painting, support painting issues) Aug 20, 2024
@Noisyfox
Copy link
Collaborator

Awesome!

Copy link
Owner

@SoftFever SoftFever left a comment

Choose a reason for hiding this comment

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

Awesome.
Thank you!!!

@SoftFever SoftFever merged commit 0ba4181 into SoftFever:main Aug 28, 2024
15 checks passed
@igiannakas
Copy link
Contributor Author

No worries :) 🎉

@igiannakas igiannakas deleted the Filament-Shrinkage-compension---port-from-Prusa-slicer branch August 28, 2024 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants