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; 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) {