mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 15:07:31 -06: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:
parent
aa0dbac351
commit
f49f1385b5
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue