mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-14 09:02:06 +00:00
ENH: fix error acceleration in Gcode processor
When travel in x-y-z move, the acceleration should be limited by trivector rather than one axis. Signed-off-by: salt.wei <salt.wei@bambulab.com> Change-Id: If8e5d394cf5d8772d324b9c851c047d9235d9b6b
This commit is contained in:
@@ -2710,10 +2710,11 @@ void GCodeProcessor::process_G1(const GCodeReader::GCodeLine& line)
|
||||
get_retract_acceleration(static_cast<PrintEstimatedStatistics::ETimeMode>(i)) :
|
||||
get_acceleration(static_cast<PrintEstimatedStatistics::ETimeMode>(i)));
|
||||
|
||||
//BBS
|
||||
for (unsigned char a = X; a <= E; ++a) {
|
||||
float axis_max_acceleration = get_axis_max_acceleration(static_cast<PrintEstimatedStatistics::ETimeMode>(i), static_cast<Axis>(a));
|
||||
if (acceleration * std::abs(delta_pos[a]) * inv_distance > axis_max_acceleration)
|
||||
acceleration = axis_max_acceleration;
|
||||
acceleration = axis_max_acceleration / (std::abs(delta_pos[a]) * inv_distance);
|
||||
}
|
||||
|
||||
block.acceleration = acceleration;
|
||||
|
||||
Reference in New Issue
Block a user