Skip to content

Commit

Permalink
adding an extra travel move at the beginning to machine_start_pos
Browse files Browse the repository at this point in the history
  • Loading branch information
saumyaj3 committed Feb 22, 2024
1 parent 30ebfa4 commit a3f5fbf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/FffGcodeWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,12 @@ 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[start_extruder_nr].settings_;
Point3LL p(extruder_settings.get<coord_t>("machine_extruder_start_pos_x"), extruder_settings.get<coord_t>("machine_extruder_start_pos_y"), gcode.getPositionZ());
gcode.writeTravel(p, Application::getInstance().current_slice_->scene.extruders[gcode.getExtruderNr()].settings_.get<Velocity>("speed_travel"));;

calculateExtruderOrderPerLayer(storage);
calculatePrimeLayerPerExtruder(storage);

Expand Down

0 comments on commit a3f5fbf

Please sign in to comment.