From 936ca60974d302a9ca35b352dd0021d3b950993b Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Thu, 5 May 2022 22:15:57 +0200 Subject: Also add paths when combing fails CURA-9163 --- src/pathPlanning/Comb.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/pathPlanning/Comb.cpp b/src/pathPlanning/Comb.cpp index ea8de3d8c..fce66cc82 100644 --- a/src/pathPlanning/Comb.cpp +++ b/src/pathPlanning/Comb.cpp @@ -241,10 +241,6 @@ bool Comb::calc(const ExtruderTrain& train, Point start_point, Point end_point, // add combing travel moves if the combing was successful comb_paths.push_back(tmp_comb_path); } - else if (fail_on_unavoidable_obstacles) - { - return false; - } else { // if combing is not possible then move directly to the target destination @@ -255,6 +251,11 @@ bool Comb::calc(const ExtruderTrain& train, Point start_point, Point end_point, comb_paths.back().cross_boundary = true; comb_paths.back().push_back(start_crossing.in_or_mid); comb_paths.back().push_back(end_crossing.in_or_mid); + + if (fail_on_unavoidable_obstacles) + { + return false; + } } } } -- cgit v1.2.3 From 40dac838770e1d3f26455e52258f83ab93a71c97 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Thu, 5 May 2022 23:03:09 +0200 Subject: Disable logic to add support to `model_boundary` We _do_ want to enable this however there is a bug in the current implementation. It is checking _all_ the extruders and if `travel_avoid_supports` is enabled on one of the extruders then this feature is enabled for all combing. This introduces problems for PVA support. If `travel_avoid_supports` is disabled for the PLA extruder but disabled for the PVA extruder the `model_boundary` will contain the boundary for support. As there are many travel moves within/through this model boundary with support area's included there will be many retractions. This is the main cause for https://ultimaker.atlassian.net/browse/CURA-9163. Note that `model_boundary` is only used in a very specific case where combing fails to travel via the outside of the travel-avoid distance (see https://github.com/Ultimaker/CuraEngine/pull/1626) CURA-9163 --- src/pathPlanning/Comb.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/pathPlanning/Comb.cpp b/src/pathPlanning/Comb.cpp index fce66cc82..620b69324 100644 --- a/src/pathPlanning/Comb.cpp +++ b/src/pathPlanning/Comb.cpp @@ -65,12 +65,12 @@ Comb::Comb(const SliceDataStorage& storage, const LayerIndex layer_nr, const Pol , model_boundary( [&storage, layer_nr]() { - const std::vector extruder_is_used = storage.getExtrudersUsed(); +// const std::vector extruder_is_used = storage.getExtrudersUsed(); bool travel_avoid_supports = false; - for (const ExtruderTrain& extruder : Application::getInstance().current_slice->scene.extruders) - { - travel_avoid_supports |= extruder_is_used[extruder.extruder_nr] && extruder.settings.get("travel_avoid_other_parts") && extruder.settings.get("travel_avoid_supports"); - } +// for (const ExtruderTrain& extruder : Application::getInstance().current_slice->scene.extruders) +// { +// travel_avoid_supports |= extruder_is_used[extruder.extruder_nr] && extruder.settings.get("travel_avoid_other_parts") && extruder.settings.get("travel_avoid_supports"); +// } return storage.getLayerOutlines(layer_nr, travel_avoid_supports, travel_avoid_supports); } ) -- cgit v1.2.3 From a5e6e86ea2b4ab1f2bd77b22a1e8bd26358a72be Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Fri, 6 May 2022 13:57:11 +0200 Subject: Comment pointing to explanation of commented-out lines. ... and why we might decide to keep them instead of deleting them outright. part of CURA-9163 --- src/pathPlanning/Comb.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pathPlanning/Comb.cpp b/src/pathPlanning/Comb.cpp index 620b69324..efa78dda6 100644 --- a/src/pathPlanning/Comb.cpp +++ b/src/pathPlanning/Comb.cpp @@ -65,6 +65,10 @@ Comb::Comb(const SliceDataStorage& storage, const LayerIndex layer_nr, const Pol , model_boundary( [&storage, layer_nr]() { + /* NOTE/TODO: The commented-out lines in this scope are something that we want to reintroduce, but had to disable for proper PVA supports for now. + * See the latest commit message (at time of writing) of those lines or internal ticket CURA-9163 for details. + */ + // const std::vector extruder_is_used = storage.getExtrudersUsed(); bool travel_avoid_supports = false; // for (const ExtruderTrain& extruder : Application::getInstance().current_slice->scene.extruders) -- cgit v1.2.3