Disallow enabling options avoid_crossing_perimeters and
avoid_curled_filament_during_travels at the same time, throw warning if both options enabled together - in this case ignore curled filament avoidance
This commit is contained in:
parent
fc929d9faf
commit
30e81fad3b
@ -3002,9 +3002,14 @@ std::string GCode::travel_to(const Point &point, ExtrusionRole role, std::string
|
|||||||
Polyline travel { this->last_pos(), point };
|
Polyline travel { this->last_pos(), point };
|
||||||
|
|
||||||
if (this->config().avoid_curled_filament_during_travels) {
|
if (this->config().avoid_curled_filament_during_travels) {
|
||||||
Point scaled_origin = Point(scaled(this->origin()));
|
if (m_config.avoid_crossing_perimeters) {
|
||||||
travel = m_avoid_curled_filaments.find_path(this->last_pos() + scaled_origin, point + scaled_origin);
|
BOOST_LOG_TRIVIAL(warning)
|
||||||
travel.translate(-scaled_origin);
|
<< "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
|
// check whether a straight travel move would need retraction
|
||||||
|
@ -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" })
|
"wipe_tower_bridging", "wipe_tower_no_sparse_layers", "single_extruder_multi_material_priming" })
|
||||||
toggle_field(el, have_wipe_tower);
|
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");
|
bool have_avoid_crossing_perimeters = config->opt_bool("avoid_crossing_perimeters");
|
||||||
toggle_field("avoid_crossing_perimeters_max_detour", have_avoid_crossing_perimeters);
|
toggle_field("avoid_crossing_perimeters_max_detour", have_avoid_crossing_perimeters);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user