mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-13 01:37:53 -06:00
Added the possibility to set the maximum length of the detour
This commit is contained in:
parent
c16aad7e0b
commit
c828a5d6e9
6 changed files with 22 additions and 2 deletions
|
@ -597,6 +597,12 @@ namespace Slic3r {
|
|||
|
||||
result.points.front() = start;
|
||||
result.points.back() = end;
|
||||
|
||||
Line travel(start, end);
|
||||
double max_detour_length scale_(gcodegen.config().avoid_crossing_perimeters_max_detour);
|
||||
if ((max_detour_length > 0) && ((result.length() - travel.length()) > max_detour_length)) {
|
||||
result = Polyline({start, end});
|
||||
}
|
||||
if (use_external)
|
||||
result.translate(-scaled_origin);
|
||||
return result;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue