Small area flow compensator improvements#11716
Conversation
93b9769 to
5f17d44
Compare
|
That’s interesting! The zero delta E of the PCHIP interpolation vs given values is a good use case to ensure model adherence. Will need to test with some users at the discord as it may require a slight model change (as the curve will be different). |
Yes, but I am 99.99% sure that this will change practically nothing, except that it will correct those cases with erroneous estimates. |
|
Agreed. Btw if we remove the spline use, I think the spline header file can be removed completely - I don't think its used elsewhere as it was introduced with the original PR. https://github.com/OrcaSlicer/OrcaSlicer/pull/3334/files |
4ac08c5 to
ecc5f0f
Compare
Removed |
Swapped out the tk::spline implementation for PchipInterpolatorHelper in SmallAreaInfillFlowCompensator. Updated member types and method calls to use the new interpolator for improved flow compensation modeling.
Added a check to ensure that flow compensation factors in SmallAreaInfillFlowCompensator strictly increase with extrusion length, throwing an exception if this condition is not met. This improves input validation and prevents invalid compensation models.
Prefixed error messages in SmallAreaInfillFlowCompensator with 'Small Area Flow Compensation' for improved clarity and debugging. Also rethrows exceptions after logging to ensure proper error propagation.
Eliminated the spline header-only library from the project by deleting its CMake configuration and header file, and updating documentation and build scripts to remove references to spline. This streamlines the dependencies and build process.
ecc5f0f to
53d1fb2
Compare
|
Reviewed. Indeed this is a very good use of the PCHIP interpolator already in the code base by adaptive PA, as it guarantees zero delta-E between set points and does not overshoot like spline/cubic can do. Merging for wider nightly testing. |
Closes #11590
Description
PchipInterpolator
Swapped out the tk::spline implementation for PchipInterpolatorHelper in SmallAreaInfillFlowCompensator. Updated member types and method calls to use the new interpolator for improved flow compensation modeling.
Two near values can create a spike in the estimation:

With Pchip it will create a better interpolation

Throw error
Currently, when there is an error in a value, it fails silently and does not slice normally, which can give a false impression that it is working when it is not. Now the message is displayed and the slice is stopped.
Strictly increasing flow compensation factors
Added a check to ensure that flow compensation factors in SmallAreaInfillFlowCompensator strictly increase with extrusion length, throwing an exception if this condition is not met. This improves input validation and prevents invalid compensation models.