From e03f4ff67e34641fcb0174341cf29d10d4f1098a Mon Sep 17 00:00:00 2001 From: "zhimin.zeng" Date: Mon, 20 Feb 2023 09:42:48 +0800 Subject: [PATCH] FIX: enhance the path when change filament If the three points are in a straight line, let the middle point coincide with the first point. Change-Id: I32e5a1e1f5f217f9db9766d698590e758f334ca1 (cherry picked from commit d8771943bddf80e23dab5e9fa841acb7e24e873d) --- src/libslic3r/GCode.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index f34cfadc1..483240f40 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -90,7 +90,7 @@ static std::vector get_path_of_change_filament(const Print& print) // give safe value in case there is no start_end_points in config std::vector out_points; out_points.emplace_back(Vec2d(54, 0)); - out_points.emplace_back(Vec2d(54, 120)); + out_points.emplace_back(Vec2d(54, 0)); out_points.emplace_back(Vec2d(54, 245)); // get the start_end_points from config (20, -3) (54, 245) @@ -195,7 +195,7 @@ static std::vector get_path_of_change_filament(const Print& print) out_point_3 = Vec2d(new_path, end_y_position); } else { out_point_1 = Vec2d(new_path, 0); - out_point_2 = Vec2d(new_path, end_y_position / 2); + out_point_2 = Vec2d(new_path, 0); out_point_3 = Vec2d(new_path, end_y_position); }