From d5a6a4457ae7a4b2600aa54becf686ee173ac237 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Hejl?= Date: Mon, 16 Dec 2024 12:00:10 +0100 Subject: [PATCH] SPE-2505: Fix collision detection between a single object and wipe tower. (#13444) --- src/libslic3r/GCode/ConflictChecker.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/libslic3r/GCode/ConflictChecker.cpp b/src/libslic3r/GCode/ConflictChecker.cpp index 8c5f639419..b35ef3f8ae 100644 --- a/src/libslic3r/GCode/ConflictChecker.cpp +++ b/src/libslic3r/GCode/ConflictChecker.cpp @@ -306,7 +306,12 @@ ConflictComputeOpt ConflictChecker::find_inter_of_lines(const LineWithIDs &lines ConflictResultOpt ConflictChecker::find_inter_of_lines_in_diff_objs(SpanOfConstPtrs objs, const WipeTowerData& wipe_tower_data) // find the first intersection point of lines in different objects { - if (objs.empty() || (objs.size() == 1 && objs.front()->instances().size() == 1)) { return {}; } + // There is no conflict when there are no objects, + // or when there is only one object with a single instance and the wipe tower is disabled. + if (objs.empty() + || (objs.size() == 1 && objs.front()->instances().size() == 1 && wipe_tower_data.z_and_depth_pairs.empty())) { + return {}; + } // The code ported from BS uses void* to identify objects... // Let's use the address of this variable to represent the wipe tower.