From e2d65994f93e8f1c1e6107336c54145e2526b51a Mon Sep 17 00:00:00 2001 From: "zhimin.zeng" Date: Tue, 27 Sep 2022 10:14:04 +0800 Subject: [PATCH] FIX: disable wipe tower still prompting too close to the tower Change-Id: Ie6a3be2fb6021bc6f5e18cd061667e02d7b36f0b (cherry picked from commit b83337f56b61d3b80679ec2714594012550e6f4b) --- src/libslic3r/Print.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/libslic3r/Print.cpp b/src/libslic3r/Print.cpp index ebbbe92a5..41ac19659 100644 --- a/src/libslic3r/Print.cpp +++ b/src/libslic3r/Print.cpp @@ -705,15 +705,16 @@ static StringObjectException layered_print_cleareance_valid(const Print &print, float depth = print.wipe_tower_data(filaments_count).depth; //float brim_width = print.wipe_tower_data(filaments_count).brim_width; - Polygon wipe_tower_convex_hull; - wipe_tower_convex_hull.points.emplace_back(scale_(x), scale_(y)); - wipe_tower_convex_hull.points.emplace_back(scale_(x + width), scale_(y)); - wipe_tower_convex_hull.points.emplace_back(scale_(x + width), scale_(y + depth)); - wipe_tower_convex_hull.points.emplace_back(scale_(x), scale_(y + depth)); - wipe_tower_convex_hull.rotate(a); - Polygons convex_hulls_temp; - convex_hulls_temp.push_back(wipe_tower_convex_hull); + if (print.has_wipe_tower()) { + Polygon wipe_tower_convex_hull; + wipe_tower_convex_hull.points.emplace_back(scale_(x), scale_(y)); + wipe_tower_convex_hull.points.emplace_back(scale_(x + width), scale_(y)); + wipe_tower_convex_hull.points.emplace_back(scale_(x + width), scale_(y + depth)); + wipe_tower_convex_hull.points.emplace_back(scale_(x), scale_(y + depth)); + wipe_tower_convex_hull.rotate(a); + convex_hulls_temp.push_back(wipe_tower_convex_hull); + } if (!intersection(convex_hulls_other, convex_hulls_temp).empty()) { if (warning) { warning->string += L("Prime Tower") + L(" is too close to others, and collisions may be caused.\n");