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

Fixed a bug that caused curled edge detection not to work as expected for left facing edges when using Arachne. Enabled fan speed control for curled overhangs #3034

Merged

Conversation

igiannakas
Copy link
Contributor

@igiannakas igiannakas commented Dec 7, 2023

Found bug where the curled logic would not apply on the left most side of the prints and its amount of slow down would change based on model orientation. Also fixed a bug/introduced feature where the filament variable fan speed logic for overhangs would not be run on curled edges, even though they would benefit from it.

Facing left
image

Facing right
image

Fixed:

(ignore the changes in speed in the upper part of the model - I am testing it with 0 minimum layer time)
Facing left:
image

Facing right:
image

Also the factors I used needed updating post the above fix to match Prusa's.

Filament fan speed logic for overhangs enabled for curled edges:

image

Finally introduced const variable in the SupportSpotsGenerator.hpp to adjust the area & magnitude over which the slowdown is performed for potential future use. Left to default 1.0 in the code.

@igiannakas igiannakas changed the title Update malformation distance factors (curled edge detection) Update malformation distance factors (curled edge detection) & calculation bug that caused it not to work as expected for left facing edges. Dec 7, 2023
@igiannakas igiannakas changed the title Update malformation distance factors (curled edge detection) & calculation bug that caused it not to work as expected for left facing edges. Update malformation distance factors (curled edge detection) & bug that caused it not to work as expected for left facing edges. Dec 7, 2023
@igiannakas igiannakas changed the title Update malformation distance factors (curled edge detection) & bug that caused it not to work as expected for left facing edges. Update malformation distance factors (curled edge detection) & bug that caused it not to work as expected for left facing edges when using Arachne. Dec 7, 2023
…ng updated estimate_points_properties algorithm

Updated curled detection logic from latest prusa 2.7 release, including updated estimate_points_properties algorithm
@igiannakas igiannakas marked this pull request as ready for review December 8, 2023 11:36
@igiannakas
Copy link
Contributor Author

Ready for review, test and merge.

Please test with a benchy facing left and then right on the plate. Slowdown should be visible on both directions.

@igiannakas igiannakas changed the title Update malformation distance factors (curled edge detection) & bug that caused it not to work as expected for left facing edges when using Arachne. Fixed a bug that caused curled edge detection not to work as expected for left facing edges when using Arachne. Dec 8, 2023
@igiannakas
Copy link
Contributor Author

I've pushed an additional change / bug fix where the variable fan speed logic for overhangs would not be run on curled edges, even though they would benefit from it.

@igiannakas igiannakas changed the title Fixed a bug that caused curled edge detection not to work as expected for left facing edges when using Arachne. Fixed a bug that caused curled edge detection not to work as expected for left facing edges when using Arachne. Enabled fan speed control for curled overhangs Dec 8, 2023
@SoftFever
Copy link
Owner

@igiannakas
Curious, what is causing the orientation of the model affect the curled logic?

@igiannakas
Copy link
Contributor Author

igiannakas commented Dec 9, 2023

@igiannakas Curious, what is causing the orientation of the model affect the curled logic?

I’ll tell you, this was a pain to debug. What I noticed is that the individual layer curls where calculating correctly at the points however they were not accumulating properly across layers - the accumulation was varying by the degree of rotation of the benchy. This led me to triage it down to the estimate points properties function as this one does the addition of curvature against the previous layer neighbouring curves.

So I discovered that when I ported the feature I had used the estimate_points_properties of the current Bambu legacy/ orca source which was missing the curvature accumulation logic in the above function (in the end of the function block). I thought it was ok at the time (as it appeared working) but was wrong :) So I upgraded that function from the latest prusa code porting over the missing code and fixes etc they had done since.

@igiannakas
Copy link
Contributor Author

I’ve also noticed that the aabb tree class has been upgraded for improved performance compared to the one orca currently uses - I’ll submit a new PR for this at some point as it affects more features than just this one.

@igiannakas
Copy link
Contributor Author

igiannakas commented Dec 9, 2023

Take a look here:https://github.com/prusa3d/PrusaSlicer/commits/c54c4d0a1f893dc97160fb2a33fe6213a24e86a7/src/libslic3r/GCode/ExtrusionProcessor.hpp

8th of aug 23 commit,
21st April 23 commits
14 December 22 commits

@SoftFever
Copy link
Owner

@igiannakas Curious, what is causing the orientation of the model affect the curled logic?

I’ll tell you, this was a pain to debug. What I noticed is that the individual layer curls where calculating correctly at the points however they were not accumulating properly across layers - the accumulation was varying by the degree of rotation of the benchy. This led me to triage it down to the estimate points properties function as this one does the addition of curvature against the previous layer neighbouring curves.

So I discovered that when I ported the feature I had used the estimate_points_properties of the current Bambu legacy/ orca source which was missing the curvature accumulation logic in the above function (in the end of the function block). I thought it was ok at the time (as it appeared working) but was wrong :) So I upgraded that function from the latest prusa code porting over the missing code and fixes etc they had done since.

Haha, I can feel your pain.
Thank you so much!

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.

Looks good

@SoftFever SoftFever merged commit 7a8e192 into SoftFever:main Dec 9, 2023
12 checks passed
@igiannakas
Copy link
Contributor Author

@igiannakas Curious, what is causing the orientation of the model affect the curled logic?

I’ll tell you, this was a pain to debug. What I noticed is that the individual layer curls where calculating correctly at the points however they were not accumulating properly across layers - the accumulation was varying by the degree of rotation of the benchy. This led me to triage it down to the estimate points properties function as this one does the addition of curvature against the previous layer neighbouring curves.
So I discovered that when I ported the feature I had used the estimate_points_properties of the current Bambu legacy/ orca source which was missing the curvature accumulation logic in the above function (in the end of the function block). I thought it was ok at the time (as it appeared working) but was wrong :) So I upgraded that function from the latest prusa code porting over the missing code and fixes etc they had done since.

Haha, I can feel your pain. Thank you so much!

Welcome :D

@igiannakas igiannakas deleted the Curled-perimeter-slowdown-parameter-tweak branch December 9, 2023 09:21
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