From d5d1633e2b824995c22291215a759e70474a5bb8 Mon Sep 17 00:00:00 2001 From: Pavel Mikus Date: Tue, 12 Jul 2022 09:10:42 +0200 Subject: [PATCH] Bugfix: seam enforcers and blockers not respected on different nozzle widths - now flow width is used instead of fixed distance param --- src/libslic3r/GCode/SeamPlacer.cpp | 4 ++-- src/libslic3r/GCode/SeamPlacer.hpp | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/libslic3r/GCode/SeamPlacer.cpp b/src/libslic3r/GCode/SeamPlacer.cpp index 6213d44e5..ee6bde8d8 100644 --- a/src/libslic3r/GCode/SeamPlacer.cpp +++ b/src/libslic3r/GCode/SeamPlacer.cpp @@ -522,11 +522,11 @@ void process_perimeter_polygon(const Polygon &orig_polygon, float z_coord, const orig_point = true; } - if (global_model_info.is_enforced(position, SeamPlacer::enforcer_blocker_distance_tolerance)) { + if (global_model_info.is_enforced(position, perimeter.flow_width)) { type = EnforcedBlockedSeamPoint::Enforced; } - if (global_model_info.is_blocked(position, SeamPlacer::enforcer_blocker_distance_tolerance)) { + if (global_model_info.is_blocked(position, perimeter.flow_width)) { type = EnforcedBlockedSeamPoint::Blocked; } some_point_enforced = some_point_enforced || type == EnforcedBlockedSeamPoint::Enforced; diff --git a/src/libslic3r/GCode/SeamPlacer.hpp b/src/libslic3r/GCode/SeamPlacer.hpp index ae7a1a2ab..69c53767b 100644 --- a/src/libslic3r/GCode/SeamPlacer.hpp +++ b/src/libslic3r/GCode/SeamPlacer.hpp @@ -135,10 +135,8 @@ public: // determines angle importance compared to visibility ( neutral value is 1.0f. ) static constexpr float angle_importance_aligned = 0.6f; - static constexpr float angle_importance_nearest = 1.0f; // use much higher angle importance for nearest mode, to combat the visiblity info noise + static constexpr float angle_importance_nearest = 1.0f; // use much higher angle importance for nearest mode, to combat the visibility info noise - // If enforcer or blocker is closer to the seam candidate than this limit, the seam candidate is set to Blocker or Enforcer - static constexpr float enforcer_blocker_distance_tolerance = 0.35f; // For long polygon sides, if they are close to the custom seam drawings, they are oversampled with this step size static constexpr float enforcer_oversampling_distance = 0.2f;