mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 15:07:31 -06:00
ENH: add acceleration para
thanks SoftFever Signed-off-by: qing.zhang <qing.zhang@bambulab.com> Change-Id: Ie82934e2fb5cdb4ec77246e2d5cd6be36fdc7d5a
This commit is contained in:
parent
9b5a86ba01
commit
ec756bc2df
7 changed files with 31 additions and 4 deletions
|
@ -3808,6 +3808,10 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
|
|||
acceleration = m_config.outer_wall_acceleration.value;
|
||||
} else if (m_config.top_surface_acceleration.value > 0 && is_top_surface(path.role())) {
|
||||
acceleration = m_config.top_surface_acceleration.value;
|
||||
} else if (m_config.inner_wall_acceleration.value > 0 && path.role() == erPerimeter) {
|
||||
acceleration = m_config.inner_wall_acceleration.value;
|
||||
} else if (m_config.get_abs_value("sparse_infill_acceleration") > 0 && (path.role() == erInternalInfill)) {
|
||||
acceleration = m_config.get_abs_value("sparse_infill_acceleration");
|
||||
} else {
|
||||
acceleration = m_config.default_acceleration.value;
|
||||
}
|
||||
|
|
|
@ -729,7 +729,7 @@ static std::vector<std::string> s_Preset_print_options {
|
|||
"inner_wall_speed", "outer_wall_speed", "sparse_infill_speed", "internal_solid_infill_speed",
|
||||
"top_surface_speed", "support_speed", "support_object_xy_distance", "support_interface_speed",
|
||||
"bridge_speed", "gap_infill_speed", "travel_speed", "travel_speed_z", "initial_layer_speed", "outer_wall_acceleration",
|
||||
"initial_layer_acceleration", "top_surface_acceleration", "default_acceleration",
|
||||
"initial_layer_acceleration", "top_surface_acceleration", "default_acceleration", "inner_wall_acceleration", "sparse_infill_acceleration",
|
||||
"accel_to_decel_enable", "accel_to_decel_factor", "skirt_loops", "skirt_distance",
|
||||
"skirt_height", "draft_shield",
|
||||
"brim_width", "brim_object_gap", "brim_type", "enable_support", "support_type", "support_threshold_angle", "enforce_support_layers",
|
||||
|
|
|
@ -158,7 +158,9 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n
|
|||
"infill_jerk",
|
||||
"top_surface_jerk",
|
||||
"initial_layer_jerk",
|
||||
"travel_jerk"
|
||||
"travel_jerk",
|
||||
"inner_wall_acceleration",
|
||||
"sparse_infill_acceleration"
|
||||
};
|
||||
|
||||
static std::unordered_set<std::string> steps_ignore;
|
||||
|
|
|
@ -1403,6 +1403,23 @@ void PrintConfigDef::init_fff_params()
|
|||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionFloat(500));
|
||||
|
||||
def = this->add("inner_wall_acceleration", coFloat);
|
||||
def->label = L("Inner wall");
|
||||
def->tooltip = L("Acceleration of inner walls. 0 means using normal printing acceleration");
|
||||
def->sidetext = L("mm/s²");
|
||||
def->min = 0;
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionFloat(0));
|
||||
|
||||
def = this->add("sparse_infill_acceleration", coFloatOrPercent);
|
||||
def->label = L("Sparse infill");
|
||||
def->tooltip = L("Acceleration of sparse infill. If the value is expressed as a percentage (e.g. 100%), it will be calculated based on the default acceleration.");
|
||||
def->sidetext = L("mm/s² or %");
|
||||
def->min = 0;
|
||||
def->mode = comAdvanced;
|
||||
def->ratio_over = "default_acceleration";
|
||||
def->set_default_value(new ConfigOptionFloatOrPercent(100, true));
|
||||
|
||||
def = this->add("initial_layer_acceleration", coFloat);
|
||||
def->label = L("Initial layer");
|
||||
def->tooltip = L("Acceleration of initial layer. Using a lower value can improve build plate adhensive");
|
||||
|
|
|
@ -892,6 +892,8 @@ PRINT_CONFIG_CLASS_DERIVED_DEFINE(
|
|||
((ConfigOptionEnum<PrintSequence>,print_sequence))
|
||||
((ConfigOptionBools, slow_down_for_layer_cooling))
|
||||
((ConfigOptionFloat, default_acceleration))
|
||||
((ConfigOptionFloat, inner_wall_acceleration))
|
||||
((ConfigOptionFloatOrPercent, sparse_infill_acceleration))
|
||||
((ConfigOptionInts, close_fan_the_first_x_layers))
|
||||
((ConfigOptionEnum<DraftShield>, draft_shield))
|
||||
((ConfigOptionFloat, extruder_clearance_height_to_rod))//BBs
|
||||
|
|
|
@ -569,7 +569,7 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co
|
|||
|
||||
bool have_default_acceleration = config->opt_float("default_acceleration") > 0;
|
||||
//BBS
|
||||
for (auto el : { "initial_layer_acceleration", "outer_wall_acceleration", "top_surface_acceleration" })
|
||||
for (auto el : { "initial_layer_acceleration", "outer_wall_acceleration", "top_surface_acceleration", "inner_wall_acceleration", "sparse_infill_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"})
|
||||
|
|
|
@ -1944,10 +1944,12 @@ void TabPrint::build()
|
|||
optgroup->append_single_option_line("travel_speed");
|
||||
|
||||
optgroup = page->new_optgroup(L("Acceleration"), L"param_acceleration", 15);
|
||||
optgroup->append_single_option_line("default_acceleration");
|
||||
optgroup->append_single_option_line("initial_layer_acceleration");
|
||||
optgroup->append_single_option_line("outer_wall_acceleration");
|
||||
optgroup->append_single_option_line("inner_wall_acceleration");
|
||||
optgroup->append_single_option_line("top_surface_acceleration");
|
||||
optgroup->append_single_option_line("default_acceleration");
|
||||
optgroup->append_single_option_line("sparse_infill_acceleration");
|
||||
optgroup->append_single_option_line("accel_to_decel_enable");
|
||||
optgroup->append_single_option_line("accel_to_decel_factor");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue