From 1f41261ad78b8368d8b8471ea65a1de0c813d431 Mon Sep 17 00:00:00 2001 From: supermerill Date: Thu, 4 Jul 2024 11:26:26 +0200 Subject: [PATCH 1/2] fix automatic computing of extrusion width supermerill/SuperSlicer#4349 --- src/libslic3r/Config.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libslic3r/Config.cpp b/src/libslic3r/Config.cpp index 7698894054a..59e0d3cfc31 100644 --- a/src/libslic3r/Config.cpp +++ b/src/libslic3r/Config.cpp @@ -1,6 +1,7 @@ #include "Config.hpp" -#include "Preset.hpp" +#include "Flow.hpp" #include "format.hpp" +#include "Preset.hpp" #include "Utils.hpp" #include "LocalesUtils.hpp" @@ -1053,7 +1054,7 @@ double ConfigBase::get_computed_value(const t_config_option_key &opt_key, int ex if (raw_opt->type() == coFloatOrPercent) { auto cofop = static_cast(raw_opt); if (cofop->value == 0 && boost::ends_with(opt_key, "_extrusion_width")) { - return this->get_computed_value("extrusion_width"); + return Flow::extrusion_width(opt_key, *this, extruder_id); } if (!cofop->percent) return cofop->value; From 0c10d206de67795a35fcc5656c066826c4323395 Mon Sep 17 00:00:00 2001 From: supermerill Date: Thu, 4 Jul 2024 16:59:06 +0200 Subject: [PATCH 2/2] Fix seam polyline looping like a polygon in infinite loop. supermerill/SuperSlicer#4348 --- src/libslic3r/GCode/SeamPlacer.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/libslic3r/GCode/SeamPlacer.cpp b/src/libslic3r/GCode/SeamPlacer.cpp index 786507a9e94..a94e7d66be5 100644 --- a/src/libslic3r/GCode/SeamPlacer.cpp +++ b/src/libslic3r/GCode/SeamPlacer.cpp @@ -747,8 +747,13 @@ void process_perimeter_polylines(const PolylineWithEnd &orig_polyline, float z_c } std::vector viable_points_indices; std::vector large_angle_points_indices; - for (size_t point_idx = longest_patch.first; point_idx != longest_patch.second; - point_idx = next_index(point_idx)) { + assert(longest_patch.first >= perimeter.start_index && longest_patch.first <= perimeter.end_index); + assert(longest_patch.second >= perimeter.start_index && longest_patch.second <= perimeter.end_index); + assert(is_polygon || longest_patch.first <= longest_patch.second); + for (size_t point_idx = longest_patch.first; + point_idx != longest_patch.second; + point_idx = is_polygon ? next_index(point_idx) : (1 + point_idx)) { + size_t viable_points_indices_count = viable_points_indices.size(); viable_points_indices.push_back(point_idx); if (std::abs(result.points[point_idx].local_ccw_angle) > SeamPlacer::sharp_angle_snapping_threshold) {