mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 23:17:35 -06:00
fix an issue that pressure eq may cause 0 feedrate in vase mode (#4398)
fix an issue that pressure eq may cause 0 feedrate
This commit is contained in:
parent
89f51031eb
commit
849fe44bf9
3 changed files with 27 additions and 18 deletions
|
@ -132,7 +132,8 @@ private:
|
|||
float time() const { return dist_xyz() / feedrate(); }
|
||||
float time_inv() const { return feedrate() / dist_xyz(); }
|
||||
float volumetric_correction_avg() const {
|
||||
float avg_correction = 0.5f * (volumetric_extrusion_rate_start + volumetric_extrusion_rate_end) / volumetric_extrusion_rate;
|
||||
// Orca: cap the correction to 0.05 - 1.00000001 to avoid zero feedrate
|
||||
float avg_correction = std::max(0.05f,0.5f * (volumetric_extrusion_rate_start + volumetric_extrusion_rate_end) / volumetric_extrusion_rate);
|
||||
assert(avg_correction > 0.f);
|
||||
assert(avg_correction <= 1.00000001f);
|
||||
return avg_correction;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue