From 22e2e51859b7fc5a424f193946c2209ac0fba3ff Mon Sep 17 00:00:00 2001 From: Saumya Jain Date: Tue, 27 Feb 2024 12:48:06 +0100 Subject: [PATCH 1/2] condition to start position while in case of prime-blob enabled CURA-11553 --- src/FffGcodeWriter.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index 0db1fc54f1..6b0b9eb498 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -140,11 +140,15 @@ void FffGcodeWriter::writeGCode(SliceDataStorage& storage, TimeKeeper& time_keep mesh_order_per_extruder.push_back(calculateMeshOrder(storage, extruder_nr)); } } - - // Setting first travel move of the first extruder to the machine start position const auto extruder_settings = Application::getInstance().current_slice_->scene.extruders[gcode.getExtruderNr()].settings_; - Point3LL p(extruder_settings.get("machine_extruder_start_pos_x"), extruder_settings.get("machine_extruder_start_pos_y"), gcode.getPositionZ()); - gcode.writeTravel(p, extruder_settings.get("speed_travel")); + //in case the prime blob is enabled the brim already starts from the closest start position which is blob location + if (!extruder_settings.get("prime_blob_enable")) + { + // Setting first travel move of the first extruder to the machine start position + Point3LL p(extruder_settings.get("machine_extruder_start_pos_x"), extruder_settings.get("machine_extruder_start_pos_y"), gcode.getPositionZ()); + gcode.writeTravel(p, extruder_settings.get("speed_travel")); + } + calculateExtruderOrderPerLayer(storage); calculatePrimeLayerPerExtruder(storage); From 4788e09de9bdecf458707f61e54a7d3ba3ee1f06 Mon Sep 17 00:00:00 2001 From: saumyaj3 Date: Tue, 27 Feb 2024 11:48:38 +0000 Subject: [PATCH 2/2] Applied clang-format. --- src/FffGcodeWriter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index 6b0b9eb498..ea94617139 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -141,8 +141,8 @@ void FffGcodeWriter::writeGCode(SliceDataStorage& storage, TimeKeeper& time_keep } } const auto extruder_settings = Application::getInstance().current_slice_->scene.extruders[gcode.getExtruderNr()].settings_; - //in case the prime blob is enabled the brim already starts from the closest start position which is blob location - if (!extruder_settings.get("prime_blob_enable")) + // in case the prime blob is enabled the brim already starts from the closest start position which is blob location + if (! extruder_settings.get("prime_blob_enable")) { // Setting first travel move of the first extruder to the machine start position Point3LL p(extruder_settings.get("machine_extruder_start_pos_x"), extruder_settings.get("machine_extruder_start_pos_y"), gcode.getPositionZ());