mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-09 07:56:24 -06:00
Allow users to set acceleration for outer/inner walls
This commit is contained in:
parent
6ec5e920e2
commit
fc96fa3bc0
8 changed files with 38 additions and 2 deletions
|
@ -55,6 +55,16 @@ inline bool is_perimeter(ExtrusionRole role)
|
|||
|| role == erOverhangPerimeter;
|
||||
}
|
||||
|
||||
inline bool is_internal_perimeter(ExtrusionRole role)
|
||||
{
|
||||
return role == erPerimeter;
|
||||
}
|
||||
|
||||
inline bool is_external_perimeter(ExtrusionRole role)
|
||||
{
|
||||
return role == erExternalPerimeter;
|
||||
}
|
||||
|
||||
inline bool is_infill(ExtrusionRole role)
|
||||
{
|
||||
return role == erBridgeInfill
|
||||
|
|
|
@ -3539,6 +3539,10 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
|
|||
} else if (m_config.perimeter_acceleration.value > 0 && is_perimeter(path.role())) {
|
||||
acceleration = m_config.perimeter_acceleration.value;
|
||||
#endif
|
||||
} else if (m_config.outer_wall_acceleration.value > 0 && is_external_perimeter(path.role())) {
|
||||
acceleration = m_config.outer_wall_acceleration.value;
|
||||
} else if (m_config.inner_wall_acceleration.value > 0 && is_internal_perimeter(path.role())) {
|
||||
acceleration = m_config.inner_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 {
|
||||
|
|
|
@ -658,7 +658,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",
|
||||
"initial_layer_acceleration", "top_surface_acceleration", "default_acceleration", "skirt_loops", "skirt_distance", "skirt_height", "draft_shield",
|
||||
"outer_wall_acceleration", "inner_wall_acceleration", "initial_layer_acceleration", "top_surface_acceleration", "default_acceleration", "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",
|
||||
"raft_layers", "raft_first_layer_density", "raft_first_layer_expansion", "raft_contact_distance", "raft_expansion",
|
||||
"support_base_pattern", "support_base_pattern_spacing", "support_style",
|
||||
|
|
|
@ -90,6 +90,8 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n
|
|||
"filament_diameter",
|
||||
"filament_density",
|
||||
"filament_cost",
|
||||
"outer_wall_acceleration",
|
||||
"inner_wall_acceleration",
|
||||
"initial_layer_acceleration",
|
||||
"top_surface_acceleration",
|
||||
// BBS
|
||||
|
|
|
@ -1250,6 +1250,22 @@ void PrintConfigDef::init_fff_params()
|
|||
#endif // HAS_LIGHTNING_INFILL
|
||||
def->set_default_value(new ConfigOptionEnum<InfillPattern>(ipCubic));
|
||||
|
||||
def = this->add("outer_wall_acceleration", coFloat);
|
||||
def->label = L("Outer wall");
|
||||
def->tooltip = L("Acceleration of outer walls.");
|
||||
def->sidetext = L("mm/s²");
|
||||
def->min = 0;
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionFloat(3000));
|
||||
|
||||
def = this->add("inner_wall_acceleration", coFloat);
|
||||
def->label = L("Inner wall");
|
||||
def->tooltip = L("Acceleration of inner walls.");
|
||||
def->sidetext = L("mm/s²");
|
||||
def->min = 0;
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionFloat(7000));
|
||||
|
||||
def = this->add("top_surface_acceleration", coFloat);
|
||||
def->label = L("Top surface");
|
||||
def->tooltip = L("Acceleration of top surface infill. Using a lower value may improve top surface quality");
|
||||
|
|
|
@ -826,6 +826,8 @@ PRINT_CONFIG_CLASS_DERIVED_DEFINE(
|
|||
((ConfigOptionBools, reduce_fan_stop_start_freq))
|
||||
((ConfigOptionInts, fan_cooling_layer_time))
|
||||
((ConfigOptionStrings, filament_colour))
|
||||
((ConfigOptionFloat, outer_wall_acceleration))
|
||||
((ConfigOptionFloat, inner_wall_acceleration))
|
||||
((ConfigOptionFloat, top_surface_acceleration))
|
||||
((ConfigOptionFloat, initial_layer_acceleration))
|
||||
((ConfigOptionFloat, initial_layer_line_width))
|
||||
|
|
|
@ -483,7 +483,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", "top_surface_acceleration" })
|
||||
for (auto el : { "outer_wall_acceleration", "inner_wall_acceleration", "initial_layer_acceleration", "top_surface_acceleration" })
|
||||
toggle_field(el, have_default_acceleration);
|
||||
|
||||
bool have_skirt = config->opt_int("skirt_loops") > 0;
|
||||
|
|
|
@ -1841,6 +1841,8 @@ void TabPrint::build()
|
|||
optgroup->append_single_option_line("travel_speed");
|
||||
|
||||
optgroup = page->new_optgroup(L("Acceleration"), 15);
|
||||
optgroup->append_single_option_line("outer_wall_acceleration");
|
||||
optgroup->append_single_option_line("inner_wall_acceleration");
|
||||
optgroup->append_single_option_line("initial_layer_acceleration");
|
||||
optgroup->append_single_option_line("top_surface_acceleration");
|
||||
optgroup->append_single_option_line("default_acceleration");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue