mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-25 15:44:12 -06:00
ENH: add jerk parameter
thanks SoftFever Signed-off-by: qing.zhang <qing.zhang@bambulab.com> Change-Id: I6aadbffebc069167a460c991aa8fb711b754ff37
This commit is contained in:
parent
208f7c32da
commit
aa62c6e870
12 changed files with 189 additions and 14 deletions
|
@ -571,6 +571,17 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co
|
|||
//BBS
|
||||
for (auto el : { "initial_layer_acceleration", "outer_wall_acceleration", "top_surface_acceleration" })
|
||||
toggle_field(el, have_default_acceleration);
|
||||
if (is_BBL_Printer) {
|
||||
for (auto el : {"default_jerk", "outer_wall_jerk", "inner_wall_jerk", "infill_jerk", "top_surface_jerk", "initial_layer_jerk", "travel_jerk"})
|
||||
toggle_line(el, false);
|
||||
} else {
|
||||
for (auto el : {"default_jerk", "outer_wall_jerk", "inner_wall_jerk", "infill_jerk", "top_surface_jerk", "initial_layer_jerk", "travel_jerk"})
|
||||
toggle_line(el, true);
|
||||
|
||||
bool quality_default_jerk = config->opt_float("default_jerk") > 0;
|
||||
for (auto el : {"outer_wall_jerk", "inner_wall_jerk", "infill_jerk", "top_surface_jerk", "initial_layer_jerk", "travel_jerk"})
|
||||
toggle_field(el, quality_default_jerk);
|
||||
}
|
||||
|
||||
bool have_skirt = config->opt_int("skirt_loops") > 0;
|
||||
toggle_field("skirt_height", have_skirt && config->opt_enum<DraftShield>("draft_shield") != dsEnabled);
|
||||
|
|
|
@ -23,6 +23,7 @@ class ConfigManipulation
|
|||
bool is_msg_dlg_already_exist{ false };
|
||||
bool m_is_initialized_support_material_overhangs_queried{ false };
|
||||
bool m_support_material_overhangs_queried{ false };
|
||||
bool is_BBL_Printer{false};
|
||||
|
||||
// function to loading of changed configuration
|
||||
std::function<void()> load_config = nullptr;
|
||||
|
@ -77,7 +78,7 @@ public:
|
|||
void check_nozzle_temperature_initial_layer_range(DynamicPrintConfig* config);
|
||||
void check_bed_temperature_difference(int bed_type, DynamicPrintConfig* config);
|
||||
void check_filament_max_volumetric_speed(DynamicPrintConfig *config);
|
||||
|
||||
void set_is_BBL_Printer(bool is_bbl_printer) { is_BBL_Printer = is_bbl_printer; };
|
||||
// SLA print
|
||||
void update_print_sla_config(DynamicPrintConfig* config, const bool is_global_config = false);
|
||||
void toggle_print_sla_options(DynamicPrintConfig* config);
|
||||
|
|
|
@ -356,6 +356,10 @@ void ObjectSettings::update_config_values(ModelConfig* config)
|
|||
|
||||
//BBS: change local config to DynamicPrintConfig
|
||||
ConfigManipulation config_manipulation(load_config, toggle_field, nullptr, nullptr, &(config->get()));
|
||||
// BBS: whether the preset is Bambu Lab printer
|
||||
PresetBundle &preset_bundle = *wxGetApp().preset_bundle;
|
||||
bool is_BBL_printer = preset_bundle.printers.get_edited_preset().is_bbl_vendor_preset(&preset_bundle);
|
||||
config_manipulation.set_is_BBL_Printer(is_BBL_printer);
|
||||
|
||||
if (!is_object_settings)
|
||||
{
|
||||
|
|
|
@ -296,6 +296,10 @@ bool ObjectTableSettings::update_settings_list(bool is_object, bool is_multiple_
|
|||
if (line) line->toggle_visible = toggle;
|
||||
};
|
||||
ConfigManipulation config_manipulation(nullptr, toggle_field, toggle_line, nullptr, &m_current_config);
|
||||
// BBS: whether the preset is Bambu Lab printer
|
||||
PresetBundle &preset_bundle = *wxGetApp().preset_bundle;
|
||||
bool is_BBL_printer = preset_bundle.printers.get_edited_preset().is_bbl_vendor_preset(&preset_bundle);
|
||||
config_manipulation.set_is_BBL_Printer(is_BBL_printer);
|
||||
|
||||
printer_technology == ptFFF ? config_manipulation.toggle_print_fff_options(&m_current_config) :
|
||||
config_manipulation.toggle_print_sla_options(&m_current_config) ;
|
||||
|
@ -397,6 +401,10 @@ void ObjectTableSettings::update_config_values(bool is_object, ModelObject* obje
|
|||
};
|
||||
|
||||
ConfigManipulation config_manipulation(nullptr, toggle_field, toggle_line, nullptr, &m_current_config);
|
||||
// BBS: whether the preset is Bambu Lab printer
|
||||
PresetBundle &preset_bundle = *wxGetApp().preset_bundle;
|
||||
bool is_BBL_printer = preset_bundle.printers.get_edited_preset().is_bbl_vendor_preset(&preset_bundle);
|
||||
config_manipulation.set_is_BBL_Printer(is_BBL_printer);
|
||||
|
||||
printer_technology == ptFFF ? config_manipulation.update_print_fff_config(&main_config) :
|
||||
config_manipulation.update_print_sla_config(&main_config) ;
|
||||
|
|
|
@ -1948,6 +1948,15 @@ void TabPrint::build()
|
|||
optgroup->append_single_option_line("top_surface_acceleration");
|
||||
optgroup->append_single_option_line("default_acceleration");
|
||||
|
||||
optgroup = page->new_optgroup(L("Jerk(XY)"), L"param_acceleration", 15);
|
||||
optgroup->append_single_option_line("default_jerk");
|
||||
optgroup->append_single_option_line("outer_wall_jerk");
|
||||
optgroup->append_single_option_line("inner_wall_jerk");
|
||||
optgroup->append_single_option_line("infill_jerk");
|
||||
optgroup->append_single_option_line("top_surface_jerk");
|
||||
optgroup->append_single_option_line("initial_layer_jerk");
|
||||
optgroup->append_single_option_line("travel_jerk");
|
||||
|
||||
#ifdef HAS_PRESSURE_EQUALIZER
|
||||
optgroup->append_single_option_line("max_volumetric_extrusion_rate_slope_positive");
|
||||
optgroup->append_single_option_line("max_volumetric_extrusion_rate_slope_negative");
|
||||
|
@ -2091,6 +2100,11 @@ void TabPrint::update_description_lines()
|
|||
void TabPrint::toggle_options()
|
||||
{
|
||||
if (!m_active_page) return;
|
||||
// BBS: whether the preset is Bambu Lab printer
|
||||
if (m_preset_bundle) {
|
||||
bool is_BBL_printer = m_preset_bundle->printers.get_edited_preset().is_bbl_vendor_preset(m_preset_bundle);
|
||||
m_config_manipulation.set_is_BBL_Printer(is_BBL_printer);
|
||||
}
|
||||
|
||||
m_config_manipulation.toggle_print_fff_options(m_config, m_type < Preset::TYPE_COUNT);
|
||||
|
||||
|
@ -2836,9 +2850,10 @@ void TabFilament::toggle_options()
|
|||
toggle_line("enable_pressure_advance", !is_BBL_printer);
|
||||
if (is_BBL_printer)
|
||||
toggle_line("pressure_advance", false);
|
||||
else
|
||||
else {
|
||||
toggle_line("pressure_advance", true);
|
||||
toggle_option("pressure_advance", m_config->opt_bool("enable_pressure_advance", 0));
|
||||
|
||||
}
|
||||
toggle_line("chamber_temperature", !is_BBL_printer);
|
||||
for (auto el :
|
||||
{"cool_plate_temp", "cool_plate_temp_initial_layer", "eng_plate_temp", "eng_plate_temp_initial_layer", "textured_plate_temp", "textured_plate_temp_initial_layer"})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue