From eeadea0dfdd1b5e7571f98e3150b7f1c4b5af9c0 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Thu, 31 Oct 2024 13:09:32 +0100 Subject: [PATCH 1/4] Fix extrusion commands with Z0 CURA-12244 --- src/LayerPlan.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/LayerPlan.cpp b/src/LayerPlan.cpp index 7d7dc3a2d1..9e613fadae 100644 --- a/src/LayerPlan.cpp +++ b/src/LayerPlan.cpp @@ -2381,7 +2381,7 @@ void LayerPlan::writeGCode(GCodeExport& gcode) for (const auto& reversed_chunk : paths | ranges::views::enumerate | ranges::views::reverse | ranges::views::chunk_by( - [](const auto&path_a, const auto&path_b) + [](const auto& path_a, const auto& path_b) { return (! std::get<1>(path_a).isTravelPath()) || std::get<1>(path_b).isTravelPath(); })) @@ -2880,7 +2880,7 @@ bool LayerPlan::writePathWithCoasting( prev_pt = path.points[point_idx]; } - gcode.writeExtrusion(start, extrude_speed, path.getExtrusionMM3perMM(), path.config.type); + writeExtrusionRelativeZ(gcode, start, extrude_speed, path.z_offset, path.getExtrusionMM3perMM(), path.config.type); sendLineTo(path, start, extrude_speed); } From 3a8682b217e896c1a92185eb400a23a4be543dcf Mon Sep 17 00:00:00 2001 From: wawanbreton Date: Thu, 31 Oct 2024 12:10:24 +0000 Subject: [PATCH 2/4] Applied clang-format. --- src/LayerPlan.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/LayerPlan.cpp b/src/LayerPlan.cpp index 9e613fadae..c1198d7f20 100644 --- a/src/LayerPlan.cpp +++ b/src/LayerPlan.cpp @@ -2381,7 +2381,7 @@ void LayerPlan::writeGCode(GCodeExport& gcode) for (const auto& reversed_chunk : paths | ranges::views::enumerate | ranges::views::reverse | ranges::views::chunk_by( - [](const auto& path_a, const auto& path_b) + [](const auto&path_a, const auto&path_b) { return (! std::get<1>(path_a).isTravelPath()) || std::get<1>(path_b).isTravelPath(); })) From d68cc1160ba3482e4f96068cf007185d9433a81c Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Fri, 1 Nov 2024 12:53:44 +0100 Subject: [PATCH 3/4] Fix build, broken with conflict resolving durimng merge CURA-12244 --- src/LayerPlan.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/LayerPlan.cpp b/src/LayerPlan.cpp index 7856d9f393..df174b4fc4 100644 --- a/src/LayerPlan.cpp +++ b/src/LayerPlan.cpp @@ -1288,7 +1288,7 @@ std::vector for (const auto& reversed_chunk : paths | ranges::views::enumerate | ranges::views::reverse | ranges::views::chunk_by( - [](const auto&path_a, const auto&path_b) + [](const auto& path_a, const auto& path_b) { return (! std::get<1>(path_a).isTravelPath()) || std::get<1>(path_b).isTravelPath(); })) @@ -2961,7 +2961,7 @@ bool LayerPlan::writePathWithCoasting( previous_position = path.points[point_idx]; } - writeExtrusionRelativeZ(gcode, start, extrude_speed, path.z_offset, path.getExtrusionMM3perMM(), path.config.type); + writeExtrusionRelativeZ(gcode, path_coasting.coasting_start_pos, extrude_speed, path.z_offset, path.getExtrusionMM3perMM(), path.config.type); sendLineTo(path, path_coasting.coasting_start_pos, extrude_speed); } From 71e058c1834450f89be28f5e4c4b93bd05fdb315 Mon Sep 17 00:00:00 2001 From: wawanbreton Date: Fri, 1 Nov 2024 11:54:12 +0000 Subject: [PATCH 4/4] Applied clang-format. --- src/LayerPlan.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/LayerPlan.cpp b/src/LayerPlan.cpp index df174b4fc4..e38d98edd7 100644 --- a/src/LayerPlan.cpp +++ b/src/LayerPlan.cpp @@ -1288,7 +1288,7 @@ std::vector for (const auto& reversed_chunk : paths | ranges::views::enumerate | ranges::views::reverse | ranges::views::chunk_by( - [](const auto& path_a, const auto& path_b) + [](const auto&path_a, const auto&path_b) { return (! std::get<1>(path_a).isTravelPath()) || std::get<1>(path_b).isTravelPath(); }))