mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
Calibration Cornering Jerk Test + Generic interpolator + Fix (#10962)
This commit is contained in:
@@ -56,6 +56,8 @@
|
||||
#include <commctrl.h>
|
||||
#endif // WIN32
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
t_config_option_keys deep_diff(const ConfigBase &config_this, const ConfigBase &config_other, bool strict = true);
|
||||
@@ -2504,6 +2506,7 @@ void TabPrint::build()
|
||||
optgroup->append_single_option_line("accel_to_decel_factor", "speed_settings_acceleration");
|
||||
|
||||
optgroup = page->new_optgroup(L("Jerk(XY)"), L"param_jerk", 15);
|
||||
optgroup->append_single_option_line("default_junction_deviation", "speed_settings_jerk_xy#junction-deviation");
|
||||
optgroup->append_single_option_line("default_jerk", "speed_settings_jerk_xy#default");
|
||||
optgroup->append_single_option_line("outer_wall_jerk", "speed_settings_jerk_xy#outer-wall");
|
||||
optgroup->append_single_option_line("inner_wall_jerk", "speed_settings_jerk_xy#inner-wall");
|
||||
@@ -2511,7 +2514,6 @@ void TabPrint::build()
|
||||
optgroup->append_single_option_line("top_surface_jerk", "speed_settings_jerk_xy#top-surface");
|
||||
optgroup->append_single_option_line("initial_layer_jerk", "speed_settings_jerk_xy#initial-layer");
|
||||
optgroup->append_single_option_line("travel_jerk", "speed_settings_jerk_xy#travel");
|
||||
optgroup->append_single_option_line("default_junction_deviation", "speed_settings_jerk_xy#junction-deviation");
|
||||
|
||||
optgroup = page->new_optgroup(L("Advanced"), L"param_advanced", 15);
|
||||
optgroup->append_single_option_line("max_volumetric_extrusion_rate_slope", "speed_settings_advanced");
|
||||
@@ -4603,12 +4605,12 @@ PageShp TabPrinter::build_kinematics_page()
|
||||
append_option_line(optgroup, "machine_max_acceleration_travel");
|
||||
|
||||
optgroup = page->new_optgroup(L("Jerk limitation"), "param_jerk");
|
||||
// machine max junction deviation
|
||||
append_option_line(optgroup, "machine_max_junction_deviation");
|
||||
for (const std::string &axis : axes) {
|
||||
append_option_line(optgroup, "machine_max_jerk_" + axis);
|
||||
}
|
||||
|
||||
// machine max junction deviation
|
||||
append_option_line(optgroup, "machine_max_junction_deviation");
|
||||
//optgroup = page->new_optgroup(L("Minimum feedrates"));
|
||||
// append_option_line(optgroup, "machine_min_extruding_rate");
|
||||
// append_option_line(optgroup, "machine_min_travel_rate");
|
||||
@@ -5186,6 +5188,24 @@ void TabPrinter::toggle_options()
|
||||
toggle_option("machine_max_junction_deviation", gcf == gcfMarlinFirmware, i);
|
||||
toggle_line("machine_max_junction_deviation", gcf == gcfMarlinFirmware);
|
||||
|
||||
// Check if junction deviation value is non-zero and firmware is Marlin
|
||||
bool enable_jerk = gcf != gcfMarlinFirmware;
|
||||
if (gcf == gcfMarlinFirmware) {
|
||||
const auto *junction_deviation = m_config->option<ConfigOptionFloats>("machine_max_junction_deviation");
|
||||
if (junction_deviation != nullptr) {
|
||||
const auto &values = junction_deviation->values;
|
||||
enable_jerk = std::all_of(values.begin(), values.end(), [](double val) { return val == 0.0; });
|
||||
} else {
|
||||
enable_jerk = true;
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < max_field; ++i) {
|
||||
toggle_option("machine_max_jerk_x", enable_jerk, i);
|
||||
toggle_option("machine_max_jerk_y", enable_jerk, i);
|
||||
toggle_option("machine_max_jerk_z", enable_jerk, i);
|
||||
toggle_option("machine_max_jerk_e", enable_jerk, i);
|
||||
}
|
||||
|
||||
bool resonance_avoidance = m_config->opt_bool("resonance_avoidance");
|
||||
toggle_option("min_resonance_avoidance_speed", resonance_avoidance);
|
||||
toggle_option("max_resonance_avoidance_speed", resonance_avoidance);
|
||||
|
||||
Reference in New Issue
Block a user