Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsupermerill <merill@fr.fr>2021-12-01 21:52:36 +0300
committersupermerill <merill@fr.fr>2021-12-02 16:50:46 +0300
commit0c49de940e41de42fafec23a77a65e50ab63cc00 (patch)
treed0d60119f3b7bb84243d80e125c30598987b74e6
parentd49193dcca8f14701ea1c2d9a9214a638b58f641 (diff)
Call needs_retraction at the right time
supermerill/SuperSlicer#1967
-rw-r--r--src/libslic3r/GCode.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp
index e397c198f..7198c1d85 100644
--- a/src/libslic3r/GCode.cpp
+++ b/src/libslic3r/GCode.cpp
@@ -4149,9 +4149,8 @@ Polyline GCode::travel_to(std::string &gcode, const Point &point, ExtrusionRole
this->origin in order to get G-code coordinates. */
Polyline travel { this->last_pos(), point };
- // check whether a straight travel move would need retraction
+ // check / compute avoid_crossing_perimeters
bool will_cross_perimeter = this->can_cross_perimeter(travel);
- bool needs_retraction = will_cross_perimeter && this->needs_retraction(travel, role);
// check whether wipe could be disabled without causing visible stringing
bool could_be_wipe_disabled = false;
@@ -4163,11 +4162,11 @@ Polyline GCode::travel_to(std::string &gcode, const Point &point, ExtrusionRole
&& m_avoid_crossing_perimeters.is_init()
&& !(m_config.avoid_crossing_not_first_layer && this->on_first_layer())) {
travel = m_avoid_crossing_perimeters.travel_to(*this, point, &could_be_wipe_disabled);
- // check again whether the new travel path still needs a retraction
- needs_retraction = this->needs_retraction(travel, role);
- //if (needs_retraction && m_layer_index > 1) exit(0);
}
+ // check whether a straight travel move would need retraction
+ bool needs_retraction = this->needs_retraction(travel, role);
+
// Re-allow avoid_crossing_perimeters for the next travel moves
m_avoid_crossing_perimeters.reset_once_modifiers();