Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vvd #14

Merged
merged 23 commits into from
Oct 21, 2024
Merged

Vvd #14

Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
No first layer acceleration/jerk for travel
  • Loading branch information
vovodroid committed Oct 11, 2024
commit 3e74a78c23fc1859a0fcb1cf0c8e52baa1ca28b1
20 changes: 6 additions & 14 deletions src/libslic3r/GCode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5931,21 +5931,13 @@ std::string GCode::travel_to(const Point& point, ExtrusionRole role, std::string
// Orca: we don't need to optimize the Klipper as only set once
double jerk_to_set = 0.0;
unsigned int acceleration_to_set = 0;
if (this->on_first_layer()) {
if (m_config.default_acceleration.value > 0 && m_config.initial_layer_acceleration.value > 0) {
acceleration_to_set = (unsigned int) floor(m_config.initial_layer_acceleration.value + 0.5);
}
if (m_config.default_jerk.value > 0 && m_config.initial_layer_jerk.value > 0) {
jerk_to_set = m_config.initial_layer_jerk.value;
}
} else {
if (m_config.default_acceleration.value > 0 && m_config.travel_acceleration.value > 0) {
acceleration_to_set = (unsigned int) floor(m_config.travel_acceleration.value + 0.5);
}
if (m_config.default_jerk.value > 0 && m_config.travel_jerk.value > 0) {
jerk_to_set = m_config.travel_jerk.value;
}
if (m_config.default_acceleration.value > 0 && m_config.travel_acceleration.value > 0) {
acceleration_to_set = (unsigned int) floor(m_config.travel_acceleration.value + 0.5);
}
if (m_config.default_jerk.value > 0 && m_config.travel_jerk.value > 0) {
jerk_to_set = m_config.travel_jerk.value;
}

if (m_writer.get_gcode_flavor() == gcfKlipper) {
gcode += m_writer.set_accel_and_jerk(acceleration_to_set, jerk_to_set);
} else {
Expand Down