diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index e413ce991..e1e8a559e 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -3002,9 +3002,14 @@ std::string GCode::travel_to(const Point &point, ExtrusionRole role, std::string Polyline travel { this->last_pos(), point }; if (this->config().avoid_curled_filament_during_travels) { - Point scaled_origin = Point(scaled(this->origin())); - travel = m_avoid_curled_filaments.find_path(this->last_pos() + scaled_origin, point + scaled_origin); - travel.translate(-scaled_origin); + if (m_config.avoid_crossing_perimeters) { + BOOST_LOG_TRIVIAL(warning) + << "Option >avoid curled filament during travels< is not compatible with avoid crossing perimeters and it will be ignored!"; + } else { + Point scaled_origin = Point(scaled(this->origin())); + travel = m_avoid_curled_filaments.find_path(this->last_pos() + scaled_origin, point + scaled_origin); + travel.translate(-scaled_origin); + } } // check whether a straight travel move would need retraction diff --git a/src/slic3r/GUI/ConfigManipulation.cpp b/src/slic3r/GUI/ConfigManipulation.cpp index 50dd4e743..aed5b139c 100644 --- a/src/slic3r/GUI/ConfigManipulation.cpp +++ b/src/slic3r/GUI/ConfigManipulation.cpp @@ -315,6 +315,9 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig* config) "wipe_tower_bridging", "wipe_tower_no_sparse_layers", "single_extruder_multi_material_priming" }) toggle_field(el, have_wipe_tower); + toggle_field("avoid_curled_filament_during_travels", !config->opt_bool("avoid_crossing_perimeters")); + toggle_field("avoid_crossing_perimeters", !config->opt_bool("avoid_curled_filament_during_travels")); + bool have_avoid_crossing_perimeters = config->opt_bool("avoid_crossing_perimeters"); toggle_field("avoid_crossing_perimeters_max_detour", have_avoid_crossing_perimeters);