mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-14 00:52:04 +00:00
Small area flow compensator improvements (#11716)
* Replace spline with PchipInterpolatorHelper in flow compensator 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. * Enforce 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. * Add context to Small Area Flow Compensation errors 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. * Remove spline library from dependencies 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.
This commit is contained in:
@@ -24,18 +24,7 @@ target_link_libraries(your_target PRIVATE semver::semver)
|
||||
target_link_libraries(your_target PRIVATE hints)
|
||||
```
|
||||
|
||||
### 3. **spline** (Interface Library)
|
||||
- **Type**: Interface library (header-only)
|
||||
- **Target**: `spline` or `spline::spline`
|
||||
- **Headers**: `spline.h`
|
||||
- **Usage**:
|
||||
```cmake
|
||||
target_link_libraries(your_target PRIVATE spline)
|
||||
# or
|
||||
target_link_libraries(your_target PRIVATE spline::spline)
|
||||
```
|
||||
|
||||
### 4. **stb_dxt** (Interface Library)
|
||||
### 3. **stb_dxt** (Interface Library)
|
||||
- **Type**: Interface library (header-only)
|
||||
- **Target**: `stb_dxt` or `stb_dxt::stb_dxt`
|
||||
- **Headers**: `stb_dxt.h`
|
||||
@@ -53,10 +42,9 @@ target_link_libraries(your_target PRIVATE stb_dxt::stb_dxt)
|
||||
1. **In your CMakeLists.txt**, simply link the library:
|
||||
```cmake
|
||||
add_executable(my_app main.cpp)
|
||||
target_link_libraries(my_app
|
||||
PRIVATE
|
||||
target_link_libraries(my_app
|
||||
PRIVATE
|
||||
semver::semver # For version parsing
|
||||
spline::spline # For spline interpolation
|
||||
stb_dxt::stb_dxt # For DXT texture compression
|
||||
hints # For hints functionality
|
||||
)
|
||||
@@ -67,9 +55,6 @@ target_link_libraries(my_app
|
||||
// For semver
|
||||
#include <semver.h>
|
||||
|
||||
// For spline
|
||||
#include <spline.h>
|
||||
|
||||
// For stb_dxt
|
||||
#include <stb_dxt.h>
|
||||
|
||||
@@ -100,7 +85,6 @@ target_link_libraries(mycomponent
|
||||
PUBLIC
|
||||
semver::semver # Version handling is part of public API
|
||||
PRIVATE
|
||||
spline::spline # Used internally for interpolation
|
||||
stb_dxt::stb_dxt # Used internally for texture compression
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user