mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 07:27:41 -06:00
[FEATURE] Experimental small area flow compensation (#3334)
* [FEATURE] Experimental small area flow compensation This is a native implementation of the [Small Area Flow Compensation](https://github.com/Alexander-T-Moss/Small-Area-Flow-Comp) post-processor by Alexander Þór for OrcaSlicer. Quite often small areas of solid infill appear to be over-extruded, despite the rest of a print looking like it has a well-dialled-in EM/Flow. Currently, there isn't a good understanding of why this happens, so this is an attempt at a brute-force approach to treat the symptom. This feature modifies the flow of extrusion lines inversely proportional to the length of the extrusion line (the shorter the extrusion, the less flow it should have). Alexander Þór: Author of the original script implementation Weaslus: Proof Reader, Hypeman & pestered folks into making this * [TASK] Whitespace cleanup * [TASK] Add credits, format code, improve input labels * [TASK] Use multi-line textbox as input for flow model * [TASK] Toggle flow compensation per object * [TASK] Enable flow compensation for first layer --------- Co-authored-by: SoftFever <softfeverever@gmail.com>
This commit is contained in:
parent
b30efa727f
commit
82ead12cde
12 changed files with 1168 additions and 7 deletions
35
src/libslic3r/GCode/SmallAreaInfillFlowCompensator.hpp
Normal file
35
src/libslic3r/GCode/SmallAreaInfillFlowCompensator.hpp
Normal file
|
@ -0,0 +1,35 @@
|
|||
#ifndef slic3r_GCode_SmallAreaInfillFlowCompensator_hpp_
|
||||
#define slic3r_GCode_SmallAreaInfillFlowCompensator_hpp_
|
||||
|
||||
#include "../libslic3r.h"
|
||||
#include "../PrintConfig.hpp"
|
||||
#include "../ExtrusionEntity.hpp"
|
||||
#include "spline/spline.h"
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
class SmallAreaInfillFlowCompensator
|
||||
{
|
||||
public:
|
||||
SmallAreaInfillFlowCompensator() = delete;
|
||||
explicit SmallAreaInfillFlowCompensator(const Slic3r::GCodeConfig& config);
|
||||
~SmallAreaInfillFlowCompensator() = default;
|
||||
|
||||
double modify_flow(const double line_length, const double dE, const ExtrusionRole role);
|
||||
|
||||
private:
|
||||
// Model points
|
||||
std::vector<double> eLengths;
|
||||
std::vector<double> flowComps;
|
||||
|
||||
// TODO: Cubic Spline
|
||||
tk::spline flowModel;
|
||||
|
||||
double flow_comp_model(const double line_length);
|
||||
|
||||
double max_modified_length() { return eLengths.back(); }
|
||||
};
|
||||
|
||||
} // namespace Slic3r
|
||||
|
||||
#endif /* slic3r_GCode_SmallAreaInfillFlowCompensator_hpp_ */
|
Loading…
Add table
Add a link
Reference in a new issue