From 0e137e2583dd2c453a4851d40bff7e5b5372929f Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Tue, 29 Aug 2023 10:46:48 +0200 Subject: [PATCH 1/2] const correctness CURA-10446 --- include/plugins/converters.h | 4 ++-- src/plugins/converters.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/plugins/converters.h b/include/plugins/converters.h index 9f76c71b5f..01870b2056 100644 --- a/include/plugins/converters.h +++ b/include/plugins/converters.h @@ -87,7 +87,7 @@ struct simplify_request : public details::converter { - native_value_type operator()([[maybe_unused]] native_value_type& original_value, const value_type& message) const; + native_value_type operator()([[maybe_unused]] const native_value_type& original_value, const value_type& message) const; }; struct postprocess_request : public details::converter @@ -97,7 +97,7 @@ struct postprocess_request : public details::converter { - native_value_type operator()([[maybe_unused]] native_value_type& original_value, const value_type& message) const; + native_value_type operator()([[maybe_unused]] const native_value_type& original_value, const value_type& message) const; }; struct infill_generate_request : public details::converter diff --git a/src/plugins/converters.cpp b/src/plugins/converters.cpp index d13c07d92e..e0e9c27a3b 100644 --- a/src/plugins/converters.cpp +++ b/src/plugins/converters.cpp @@ -125,7 +125,7 @@ simplify_request::value_type } simplify_response::native_value_type - simplify_response::operator()([[maybe_unused]] simplify_response::native_value_type& original_value, const simplify_response::value_type& message) const + simplify_response::operator()([[maybe_unused]] const simplify_response::native_value_type& original_value, const simplify_response::value_type& message) const { native_value_type poly{}; for (const auto& paths : message.polygons().polygons()) @@ -158,7 +158,7 @@ postprocess_request::value_type postprocess_request::operator()(const postproces } postprocess_response::native_value_type - postprocess_response::operator()([[maybe_unused]] postprocess_response::native_value_type& original_value, const postprocess_response::value_type& message) const + postprocess_response::operator()([[maybe_unused]] const postprocess_response::native_value_type& original_value, const postprocess_response::value_type& message) const { return message.gcode_word(); } From 49dd39dc7d980884e5e2ac80833c5c4df1609429 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Tue, 29 Aug 2023 17:09:26 +0200 Subject: [PATCH 2/2] Fix negative flows We were trying to retract the whole model back in the nozzle --- src/settings/PathConfigStorage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/settings/PathConfigStorage.cpp b/src/settings/PathConfigStorage.cpp index e32e9afb15..2f9dd2acea 100644 --- a/src/settings/PathConfigStorage.cpp +++ b/src/settings/PathConfigStorage.cpp @@ -138,7 +138,7 @@ PathConfigStorage::PathConfigStorage(const SliceDataStorage& storage, const Laye GCodePathConfig{ .type = PrintFeatureType::Support, .line_width = static_cast(support_infill_train.settings.get("support_line_width") * support_infill_line_width_factor), .layer_thickness = layer_thickness, - .flow = -support_infill_train.settings.get("support_material_flow") + .flow = support_infill_train.settings.get("support_material_flow") * ((layer_nr == 0) ? support_infill_train.settings.get("material_flow_layer_0") : Ratio(1.0)) * (combine_idx + 1), .speed_derivatives = SpeedDerivatives{ .speed = support_infill_train.settings.get("speed_support_infill"), .acceleration = support_infill_train.settings.get("acceleration_support_infill"),