Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/libslic3r/GCode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3332,6 +3332,10 @@ double cap_speed(
if (filament_volumetric_cap > 0) {
speed = std::min(speed, filament_volumetric_cap / path_attr.mm3_per_mm);
}
const double filament_max_speed{config.filament_max_speed.get_at(extruder_id)};
if (filament_max_speed > 0) {
speed = std::min(speed, filament_max_speed);
}
if (path_attr.role == ExtrusionRole::InternalInfill) {
const double infill_cap{
path_attr.maybe_self_crossing ?
Expand Down
11 changes: 10 additions & 1 deletion src/libslic3r/GCode/WipeTower.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,7 @@ WipeTower::ToolChangeResult WipeTower::construct_tcr(WipeTowerWriter& writer,


WipeTower::WipeTower(const Vec2f& pos, double rotation_deg, const PrintConfig& config, const PrintRegionConfig& default_region_config, const std::vector<std::vector<float>>& wiping_matrix, size_t initial_tool) :
m_config(&config),
m_semm(config.single_extruder_multi_material.value),
m_wipe_tower_pos(pos),
m_wipe_tower_width(float(config.wipe_tower_width)),
Expand Down Expand Up @@ -647,6 +648,10 @@ void WipeTower::set_extruder(size_t idx, const PrintConfig& config)
float nozzle_diameter = float(config.nozzle_diameter.get_at(idx));
m_filpar[idx].nozzle_diameter = nozzle_diameter; // to be used in future with (non-single) multiextruder MM

float max_speed = float(config.filament_max_speed.get_at(idx));
if (max_speed > 0.f)
m_filpar[idx].max_speed = max_speed;

float max_vol_speed = float(config.filament_max_volumetric_speed.get_at(idx));
if (max_vol_speed!= 0.f)
m_filpar[idx].max_e_speed = (max_vol_speed / filament_area());
Expand Down Expand Up @@ -1173,7 +1178,11 @@ void WipeTower::toolchange_Wipe(
x_to_wipe = std::max(x_to_wipe, x_to_fill_cleaning_box);
}

const float target_speed = is_first_layer() ? m_first_layer_speed * 60.f : m_infill_speed * 60.f;
float max_speed = std::numeric_limits<float>::max();
if (m_config->filament_max_speed.get_at(m_current_tool) > 0) {
max_speed = float(m_config->filament_max_speed.get_at(m_current_tool));
}
const float target_speed = std::min(max_speed, (is_first_layer() ? m_first_layer_speed * 60.f : m_infill_speed * 60.f));
float wipe_speed = 0.33f * target_speed;

// if there is less than 2.5*line_width to the edge, advance straightaway (there is likely a blob anyway)
Expand Down
2 changes: 2 additions & 0 deletions src/libslic3r/GCode/WipeTower.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ class WipeTower
float cooling_final_speed = 0.f;
float ramming_line_width_multiplicator = 1.f;
float ramming_step_multiplicator = 1.f;
float max_speed = std::numeric_limits<float>::max();
float max_e_speed = std::numeric_limits<float>::max();
std::vector<float> ramming_speed;
float nozzle_diameter;
Expand All @@ -275,6 +276,7 @@ class WipeTower
}


const PrintConfig* m_config;
bool m_semm = true; // Are we using a single extruder multimaterial printer?
bool m_is_mk4mmu3 = false;
bool m_switch_filament_monitoring = false;
Expand Down
4 changes: 3 additions & 1 deletion src/libslic3r/Preset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,9 @@ static std::vector<std::string> s_Preset_filament_options {
// Shrinkage compensation
"filament_shrinkage_compensation_xy", "filament_shrinkage_compensation_z",
// Seams overrides
"filament_seam_gap_distance"
"filament_seam_gap_distance",
// BOSS
"filament_max_speed",
};

static std::vector<std::string> s_Preset_machine_limits_options {
Expand Down
1 change: 1 addition & 0 deletions src/libslic3r/Print.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n
|| opt_key == "filament_multitool_ramming"
|| opt_key == "filament_multitool_ramming_volume"
|| opt_key == "filament_multitool_ramming_flow"
|| opt_key == "filament_max_speed"
|| opt_key == "filament_max_volumetric_speed"
|| opt_key == "filament_infill_max_speed"
|| opt_key == "filament_infill_max_crossing_speed"
Expand Down
10 changes: 10 additions & 0 deletions src/libslic3r/PrintConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1253,6 +1253,16 @@ void PrintConfigDef::init_fff_params()
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionStrings { "" });

def = this->add("filament_max_speed", coFloats);
def->label = L("Max speed");
def->tooltip = L("Maximum speed allowed for this filament. Limits the maximum "
"speed of a print to the minimum of the print speed and the filament speed. "
"Set zero for no limit.");
def->sidetext = L("mm/s");
def->min = 0;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloats{ 0. });

def = this->add("filament_max_volumetric_speed", coFloats);
def->label = L("Max volumetric speed");
def->tooltip = L("Maximum volumetric speed allowed for this filament. Limits the maximum volumetric "
Expand Down
1 change: 1 addition & 0 deletions src/libslic3r/PrintConfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -907,6 +907,7 @@ PRINT_CONFIG_CLASS_DEFINE(
((ConfigOptionString, color_change_gcode))
((ConfigOptionString, pause_print_gcode))
((ConfigOptionString, template_custom_gcode))
((ConfigOptionFloats, filament_max_speed))
)

static inline std::string get_extrusion_axis(const GCodeConfig &cfg)
Expand Down
1 change: 1 addition & 0 deletions src/slic3r/GUI/Tab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2293,6 +2293,7 @@ void TabFilament::build()
optgroup->append_single_option_line("filament_abrasive");

optgroup = page->new_optgroup(L("Print speed override"));
optgroup->append_single_option_line("filament_max_speed", "max-speed_127176");
optgroup->append_single_option_line("filament_max_volumetric_speed", "max-volumetric-speed_127176");

line = { "", "" };
Expand Down