mirror of
https://git.mirrors.martin98.com/https://github.com/bambulab/BambuStudio.git
synced 2025-09-28 17:03:12 +08:00
FIX: Extra lift after time-lapse when traveling to prime tower
jira: STUDIO-11990 Change-Id: I96e61b9cdde2c983698e9297ec10c3ce4bf7478a
This commit is contained in:
parent
8c8b8d63b9
commit
8c63d002e8
@ -438,20 +438,24 @@ std::string GCodeWriter::eager_lift(const LiftType type, bool tool_change)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
double to_lift = target_lift - m_lifted;
|
||||||
|
if (to_lift < EPSILON)
|
||||||
|
return lift_move;
|
||||||
|
|
||||||
// BBS: spiral lift only safe with known position
|
// BBS: spiral lift only safe with known position
|
||||||
// TODO: check the arc will move within bed area
|
// TODO: check the arc will move within bed area
|
||||||
if (type == LiftType::SpiralLift && this->is_current_position_clear()) {
|
if (type == LiftType::SpiralLift && this->is_current_position_clear()) {
|
||||||
double radius = target_lift / (2 * PI * atan(GCodeWriter::slope_threshold));
|
if (to_lift > 0) {
|
||||||
// static spiral alignment when no move in x,y plane.
|
double radius = to_lift / (2 * PI * atan(GCodeWriter::slope_threshold));
|
||||||
// spiral centra is a radius distance to the right (y=0)
|
// static spiral alignment when no move in x,y plane.
|
||||||
Vec2d ij_offset = { radius, 0 };
|
// spiral centra is a radius distance to the right (y=0)
|
||||||
if (target_lift > 0) {
|
Vec2d ij_offset = { radius, 0 };
|
||||||
lift_move = this->_spiral_travel_to_z(m_pos(2) + target_lift, ij_offset, "spiral lift Z",tool_change);
|
lift_move = this->_spiral_travel_to_z(m_pos(2) + to_lift, ij_offset, "spiral lift Z",tool_change);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//BBS: if position is unknown use normal lift
|
//BBS: if position is unknown use normal lift
|
||||||
else if (target_lift > 0) {
|
else if (to_lift > 0) {
|
||||||
lift_move = _travel_to_z(m_pos(2) + target_lift, "normal lift Z",tool_change);
|
lift_move = _travel_to_z(m_pos(2) + to_lift, "normal lift Z", tool_change);
|
||||||
}
|
}
|
||||||
m_lifted = target_lift;
|
m_lifted = target_lift;
|
||||||
m_to_lift = 0;
|
m_to_lift = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user