Enhancement: ERS - Option to limit ERS to external perimeters and overhangs only (#7399)

* Option to limit ERS to external perimeters and overhangs only

* Label name

* Label update

* Merge branch 'main' into Limit-ERS-to-external-perimeters-and-overhangs

* Merge branch 'main' into Limit-ERS-to-external-perimeters-and-overhangs

* Merge branch 'SoftFever:main' into Limit-ERS-to-external-perimeters-and-overhangs

* Merge branch 'SoftFever:main' into Limit-ERS-to-external-perimeters-and-overhangs

* Merge branch 'main' into Limit-ERS-to-external-perimeters-and-overhangs

* Merge branch 'SoftFever:main' into Limit-ERS-to-external-perimeters-and-overhangs

* Merge branch 'main' into Limit-ERS-to-external-perimeters-and-overhangs

* Merge branch 'SoftFever:main' into Limit-ERS-to-external-perimeters-and-overhangs

* Merge branch 'main' into Limit-ERS-to-external-perimeters-and-overhangs
This commit is contained in:
Ioannis Giannakas
2025-01-05 15:19:00 +00:00
committed by GitHub
parent 67cc143916
commit bb009eaa99
8 changed files with 23 additions and 3 deletions

View File

@@ -62,6 +62,7 @@ PressureEqualizer::PressureEqualizer(const Slic3r::GCodeConfig &config) : m_use_
m_max_volumetric_extrusion_rate_slope_positive = float(config.max_volumetric_extrusion_rate_slope.value) * 60.f * 60.f;
m_max_volumetric_extrusion_rate_slope_negative = float(config.max_volumetric_extrusion_rate_slope.value) * 60.f * 60.f;
m_max_segment_length = float(config.max_volumetric_extrusion_rate_slope_segment_length.value);
m_extrusion_rate_smoothing_external_perimeter_only = bool(config.extrusion_rate_smoothing_external_perimeter_only.value);
}
for (ExtrusionRateSlope &extrusion_rate_slope : m_max_volumetric_extrusion_rate_slopes) {
@@ -629,7 +630,9 @@ void PressureEqualizer::adjust_volumetric_rate(const size_t fist_line_idx, const
rate_end = rate_succ;
// don't alter the flow rate for these extrusion types
if (!line.adjustable_flow || line.extrusion_role == ExtrusionRole::erBridgeInfill || line.extrusion_role == ExtrusionRole::erIroning) {
// Orca: Limit ERS to external perimeters and overhangs if option selected by user
if (!line.adjustable_flow || line.extrusion_role == ExtrusionRole::erBridgeInfill || line.extrusion_role == ExtrusionRole::erIroning ||
(m_extrusion_rate_smoothing_external_perimeter_only && line.extrusion_role != ExtrusionRole::erOverhangPerimeter && line.extrusion_role != ExtrusionRole::erExternalPerimeter)) {
rate_end = line.volumetric_extrusion_rate_end;
} else if (line.volumetric_extrusion_rate_end > rate_end) {
line.volumetric_extrusion_rate_end = rate_end;
@@ -684,10 +687,13 @@ void PressureEqualizer::adjust_volumetric_rate(const size_t fist_line_idx, const
float rate_start = feedrate_per_extrusion_role[iRole];
// don't alter the flow rate for these extrusion types
if (!line.adjustable_flow || line.extrusion_role == ExtrusionRole::erBridgeInfill || line.extrusion_role == ExtrusionRole::erIroning) {
// Orca: Limit ERS to external perimeters and overhangs if option selected by user
if (!line.adjustable_flow || line.extrusion_role == ExtrusionRole::erBridgeInfill || line.extrusion_role == ExtrusionRole::erIroning ||
(m_extrusion_rate_smoothing_external_perimeter_only && line.extrusion_role != ExtrusionRole::erOverhangPerimeter && line.extrusion_role != ExtrusionRole::erExternalPerimeter)) {
rate_start = line.volumetric_extrusion_rate_start;
} else if (iRole == size_t(line.extrusion_role) && rate_prec < rate_start)
rate_start = rate_prec;
if (line.volumetric_extrusion_rate_start > rate_start) {
line.volumetric_extrusion_rate_start = rate_start;
line.max_volumetric_extrusion_rate_slope_positive = rate_slope;