SPE-2505: Fix collision detection between a single object and wipe tower. (#13444)

This commit is contained in:
Lukáš Hejl 2024-12-16 12:00:10 +01:00 committed by Lukas Matena
parent 725a8daf36
commit d5a6a4457a

View File

@ -306,7 +306,12 @@ ConflictComputeOpt ConflictChecker::find_inter_of_lines(const LineWithIDs &lines
ConflictResultOpt ConflictChecker::find_inter_of_lines_in_diff_objs(SpanOfConstPtrs<PrintObject> 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.