Enhance GCode handling for Z-axis movements (#10803)

* Enhance GCode handling for Z-axis movements

- Updated `travel_to_z` method to include a `force` parameter, allowing forced Z movements.
- Modified GCode generation logic to ensure Z position is restored after unknown last positions.
- Enforce z restoreation after tool changer

* Improve filament_multitool_ramming logic

* fix indent
This commit is contained in:
SoftFever
2025-09-21 22:03:54 +08:00
committed by GitHub
parent 23ee1daac0
commit b483dff617
5 changed files with 21 additions and 9 deletions

View File

@@ -72,7 +72,7 @@ public:
double get_current_speed() const { return m_current_speed;}
std::string travel_to_xy(const Vec2d &point, const std::string &comment = std::string());
std::string travel_to_xyz(const Vec3d &point, const std::string &comment = std::string(), bool force_z = false);
std::string travel_to_z(double z, const std::string &comment = std::string());
std::string travel_to_z(double z, const std::string &comment = std::string(), bool force = false);
bool will_move_z(double z) const;
std::string extrude_to_xy(const Vec2d &point, double dE, const std::string &comment = std::string(), bool force_no_extrusion = false);
//BBS: generate G2 or G3 extrude which moves by arc