ENH: add filament change length for color change
Jira: none Signed-off-by: qing.zhang <qing.zhang@bambulab.com> Change-Id: I84ab638d6af056ede9b9524d1395eb42fa731150
This commit is contained in:
parent
4f3cab72a7
commit
9b46d437ba
|
@ -62,5 +62,8 @@
|
|||
"nozzle_temperature_initial_layer": [
|
||||
"",
|
||||
""
|
||||
],
|
||||
"filament_change_length": [
|
||||
"10"
|
||||
]
|
||||
}
|
|
@ -676,6 +676,7 @@ WipeTower::WipeTower(const PrintConfig& config, int plate_idx, Vec3d plate_origi
|
|||
m_wipe_volume(prime_volume),
|
||||
m_enable_timelapse_print(config.timelapse_type.value == TimelapseType::tlSmooth),
|
||||
m_nozzle_change_length(config.extruder_change_length.get_at(0)),
|
||||
m_filaments_change_length(config.filament_change_length.values),
|
||||
m_is_multi_extruder(config.nozzle_diameter.size() > 1),
|
||||
m_is_print_outer_first(config.prime_tower_outer_first.value),
|
||||
m_use_gap_wall(config.prime_tower_skip_points.value)
|
||||
|
@ -1680,7 +1681,7 @@ void WipeTower::plan_toolchange(float z_par, float layer_height_par, unsigned in
|
|||
float nozzle_change_depth = 0;
|
||||
if (!m_filament_map.empty() && m_filament_map[old_tool] != m_filament_map[new_tool]) {
|
||||
double e_flow = extrusion_flow(0.2);
|
||||
double length = m_nozzle_change_length / e_flow;
|
||||
double length = (m_nozzle_change_length + m_filaments_change_length[old_tool]) / e_flow;
|
||||
int nozzle_change_line_count = length / (m_wipe_tower_width - 2*m_perimeter_width) + 1;
|
||||
if (has_tpu_filament())
|
||||
nozzle_change_depth = m_tpu_fixed_spacing * nozzle_change_line_count * m_perimeter_width;
|
||||
|
|
|
@ -388,7 +388,8 @@ private:
|
|||
float m_first_layer_speed = 0.f;
|
||||
size_t m_first_layer_idx = size_t(-1);
|
||||
|
||||
double m_nozzle_change_length = 10;
|
||||
double m_nozzle_change_length = 0;
|
||||
std::vector<double> m_filaments_change_length;
|
||||
size_t m_cur_layer_id;
|
||||
NozzleChangeResult m_nozzle_change_result;
|
||||
std::vector<int> m_filament_map;
|
||||
|
|
|
@ -932,7 +932,9 @@ static std::vector<std::string> s_Preset_filament_options {
|
|||
"filament_extruder_variant",
|
||||
//OrcaSlicer
|
||||
"enable_pressure_advance", "pressure_advance", "chamber_temperatures","filament_notes",
|
||||
"filament_long_retractions_when_cut","filament_retraction_distances_when_cut","filament_shrink"
|
||||
"filament_long_retractions_when_cut","filament_retraction_distances_when_cut","filament_shrink",
|
||||
//BBS filament change length while the extruder color
|
||||
"filament_change_length"
|
||||
};
|
||||
|
||||
static std::vector<std::string> s_Preset_machine_limits_options {
|
||||
|
|
|
@ -284,6 +284,7 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n
|
|||
|| opt_key == "filament_scarf_height"
|
||||
|| opt_key == "filament_scarf_gap"
|
||||
|| opt_key == "filament_scarf_length"
|
||||
|| opt_key == "filament_change_length"
|
||||
|| opt_key == "independent_support_layer_height") {
|
||||
steps.emplace_back(psWipeTower);
|
||||
// Soluble support interface / non-soluble base interface produces non-soluble interface layers below soluble interface layers.
|
||||
|
|
|
@ -1853,6 +1853,14 @@ void PrintConfigDef::init_fff_params()
|
|||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionFloats{10});
|
||||
|
||||
def = this->add("filament_change_length", coFloats);
|
||||
def->label = L("Filament change length");
|
||||
def->tooltip = L("Filament change length");
|
||||
def->sidetext = L("mm");
|
||||
def->min = 0;
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionFloats{10});
|
||||
|
||||
def = this->add("filament_is_support", coBools);
|
||||
def->label = L("Support material");
|
||||
def->tooltip = L("Support material is commonly used to print support and support interface");
|
||||
|
@ -3258,7 +3266,7 @@ void PrintConfigDef::init_fff_params()
|
|||
def->sidetext = L("mm");
|
||||
def->min = 0;
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionFloats{10});
|
||||
def->set_default_value(new ConfigOptionFloats{0});
|
||||
|
||||
def = this->add("extruder_ams_count", coStrings);
|
||||
def->label = "Extruder ams count";
|
||||
|
|
|
@ -1010,6 +1010,7 @@ PRINT_CONFIG_CLASS_DEFINE(
|
|||
((ConfigOptionFloatsOrPercents, filament_scarf_height))
|
||||
((ConfigOptionFloatsOrPercents, filament_scarf_gap))
|
||||
((ConfigOptionFloats, filament_scarf_length))
|
||||
((ConfigOptionFloats, filament_change_length))
|
||||
((ConfigOptionFloats, filament_cost))
|
||||
((ConfigOptionFloats, impact_strength_z))
|
||||
((ConfigOptionString, filament_notes))
|
||||
|
|
|
@ -3183,6 +3183,7 @@ void TabFilament::build()
|
|||
// BBS
|
||||
optgroup->append_single_option_line("filament_is_support");
|
||||
optgroup->append_single_option_line("impact_strength_z");
|
||||
optgroup->append_single_option_line("filament_change_length");
|
||||
|
||||
//optgroup->append_single_option_line("filament_colour");
|
||||
optgroup->append_single_option_line("required_nozzle_HRC");
|
||||
|
|
Loading…
Reference in New Issue