diff --git a/src/libslic3r/GCode/SeamPlacer.cpp b/src/libslic3r/GCode/SeamPlacer.cpp index 37e0c4b96..43c9f2e5e 100644 --- a/src/libslic3r/GCode/SeamPlacer.cpp +++ b/src/libslic3r/GCode/SeamPlacer.cpp @@ -411,8 +411,17 @@ Polygons extract_perimeter_polygons(const Layer *layer, const SeamPosition confi for (const ExtrusionEntity *ex_entity : layer_region->perimeters.entities) { if (ex_entity->is_collection()) { //collection of inner, outer, and overhang perimeters for (const ExtrusionEntity *perimeter : static_cast(ex_entity)->entities) { - if (perimeter->role() == ExtrusionRole::erExternalPerimeter - || (perimeter->role() == ExtrusionRole::erPerimeter + ExtrusionRole role = perimeter->role(); + if (perimeter->is_loop()){ + for (const ExtrusionPath& path : static_cast(perimeter)->paths){ + if (path.role() == ExtrusionRole::erExternalPerimeter){ + role = ExtrusionRole::erExternalPerimeter; + } + } + } + + if (role == ExtrusionRole::erExternalPerimeter + || (is_perimeter(role) && configured_seam_preference == spRandom)) { //for random seam alignment, extract all perimeters Points p; perimeter->collect_points(p); diff --git a/src/libslic3r/GCode/SeamPlacer.hpp b/src/libslic3r/GCode/SeamPlacer.hpp index 6b211b176..181dd5bb8 100644 --- a/src/libslic3r/GCode/SeamPlacer.hpp +++ b/src/libslic3r/GCode/SeamPlacer.hpp @@ -133,7 +133,7 @@ public: static constexpr float overhang_distance_tolerance_factor = 0.5f; // determines angle importance compared to visibility ( neutral value is 1.0f. ) - static constexpr float angle_importance_aligned = 0.5f; + 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 // If enforcer or blocker is closer to the seam candidate than this limit, the seam candidate is set to Blocker or Enforcer @@ -145,7 +145,7 @@ public: // following value describes, how much worse score can point have and still be picked into seam cluster instead of original seam point on the same layer static constexpr float seam_align_score_tolerance = 0.27f; // seam_align_tolerable_dist - if next layer closest point is too far away, skip layer - static constexpr float seam_align_tolerable_dist = 1.0f; + static constexpr float seam_align_tolerable_dist = 0.4f; // if the seam of the current layer is too far away, and the closest seam candidate is not very good, layer is skipped. // this param limits the number of allowed skips static constexpr size_t seam_align_tolerable_skips = 4;