fix z hop bug (#279)

Signed-off-by: SoftFever <softfeverever@gmail.com>
This commit is contained in:
SoftFever 2023-02-03 21:48:43 +08:00 committed by GitHub
parent fe9a2715e6
commit a1476784c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4033,7 +4033,7 @@ std::string GCode::travel_to(const Point &point, ExtrusionRole role, std::string
for (size_t i = 1; i < travel.size(); ++ i) {
// BBS. Process lazy layer change, but don't do lazy layer change when enable spiral vase
Vec3d curr_pos = m_writer.get_position();
if (i == travel.size() - 1 && !m_spiral_vase) {
if (i == 1 && !m_spiral_vase) {
Vec2d dest2d = this->point_to_gcode(travel.points[i]);
Vec3d dest3d(dest2d(0), dest2d(1), m_nominal_z);
gcode += m_writer.travel_to_xyz(dest3d, comment+" travel_to_xyz");