mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-12 02:09:03 +08:00
first layer infill speed
This commit is contained in:
parent
cb65da2b3a
commit
ffb8cdca36
@ -2403,6 +2403,9 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
|
||||
}
|
||||
}
|
||||
if (this->on_first_layer())
|
||||
if (path.role() == erInternalInfill || path.role() == erSolidInfill)
|
||||
speed = std::min(m_config.get_abs_value("first_layer_infill_speed", speed), speed);
|
||||
else
|
||||
speed = std::min(m_config.get_abs_value("first_layer_speed", speed), speed);
|
||||
if (m_volumetric_speed != 0. && speed == 0)
|
||||
speed = m_volumetric_speed / path.mm3_per_mm;
|
||||
|
@ -126,6 +126,7 @@ bool Print::invalidate_state_by_config_options(const std::vector<t_config_option
|
||||
"first_layer_acceleration",
|
||||
"first_layer_bed_temperature",
|
||||
"first_layer_speed",
|
||||
"first_layer_infill_speed",
|
||||
"gcode_comments",
|
||||
"gcode_flavor",
|
||||
"infill_acceleration",
|
||||
|
@ -854,15 +854,29 @@ PrintConfigDef::PrintConfigDef()
|
||||
def->default_value = new ConfigOptionFloatOrPercent(0.35, false);
|
||||
|
||||
def = this->add("first_layer_speed", coFloatOrPercent);
|
||||
def->label = L("First layer speed");
|
||||
def->label = L("default");
|
||||
def->tooltip = L("If expressed as absolute value in mm/s, this speed will be applied to all the print moves "
|
||||
"of the first layer, regardless of their type. If expressed as a percentage "
|
||||
"(for example: 40%) it will scale the default speeds.");
|
||||
"but infill of the first layer, it can be overwrite by the 'default' (default depends of the type of the path) "
|
||||
"speed if it's lower than that. If expressed as a percentage "
|
||||
"(for example: 40%) it will scale the 'default' speeds . "
|
||||
"If expressed as absolute value, it can be overwrite by the 'default' speed if it's lower than that.");
|
||||
def->sidetext = L("mm/s or %");
|
||||
def->cli = "first-layer-speed=s";
|
||||
def->min = 0;
|
||||
def->default_value = new ConfigOptionFloatOrPercent(30, false);
|
||||
|
||||
def = this->add("first_layer_infill_speed", coFloatOrPercent);
|
||||
def->label = L("infill");
|
||||
def->tooltip = L("If expressed as absolute value in mm/s, this speed will be applied to infill moves "
|
||||
"of the first layer, it can be overwrite by the 'default' (solid infill or infill if not bottom) "
|
||||
"speed if it's lower than that. If expressed as a percentage "
|
||||
"(for example: 40%) it will scale the 'default' speed. "
|
||||
"If expressed as absolute value, it can be overwrite by the 'default' speed if it's lower than that.");
|
||||
def->sidetext = L("mm/s or %");
|
||||
def->cli = "first-layer-infill-speed=s";
|
||||
def->min = 0;
|
||||
def->default_value = new ConfigOptionFloatOrPercent(30, false);
|
||||
|
||||
def = this->add("first_layer_temperature", coInts);
|
||||
def->label = L("First layer");
|
||||
def->tooltip = L("Extruder temperature for first layer. If you want to control temperature manually "
|
||||
|
@ -760,6 +760,7 @@ public:
|
||||
ConfigOptionInts first_layer_bed_temperature;
|
||||
ConfigOptionFloatOrPercent first_layer_extrusion_width;
|
||||
ConfigOptionFloatOrPercent first_layer_speed;
|
||||
ConfigOptionFloatOrPercent first_layer_infill_speed;
|
||||
ConfigOptionInts first_layer_temperature;
|
||||
ConfigOptionFloat infill_acceleration;
|
||||
ConfigOptionInts max_fan_speed;
|
||||
@ -831,6 +832,7 @@ protected:
|
||||
OPT_PTR(first_layer_bed_temperature);
|
||||
OPT_PTR(first_layer_extrusion_width);
|
||||
OPT_PTR(first_layer_speed);
|
||||
OPT_PTR(first_layer_infill_speed);
|
||||
OPT_PTR(first_layer_temperature);
|
||||
OPT_PTR(infill_acceleration);
|
||||
OPT_PTR(max_fan_speed);
|
||||
|
@ -310,6 +310,7 @@ const std::vector<std::string>& Preset::print_options()
|
||||
"support_material_solid_first_layer", "perimeter_loop", "perimeter_loop_seam", "seam_travel"
|
||||
, "remove_small_gaps"
|
||||
, "infill_not_connected"
|
||||
,"first_layer_infill_speed"
|
||||
};
|
||||
return s_opts;
|
||||
}
|
||||
|
@ -106,6 +106,7 @@ std::string PresetHints::maximum_volumetric_flow_description(const PresetBundle
|
||||
const auto &support_material_extrusion_width = *print_config.option<ConfigOptionFloatOrPercent>("support_material_extrusion_width");
|
||||
const auto &top_infill_extrusion_width = *print_config.option<ConfigOptionFloatOrPercent>("top_infill_extrusion_width");
|
||||
const auto &first_layer_speed = *print_config.option<ConfigOptionFloatOrPercent>("first_layer_speed");
|
||||
const auto &first_layer_infill_speed = *print_config.option<ConfigOptionFloatOrPercent>("first_layer_infill_speed");
|
||||
|
||||
// Index of an extruder assigned to a feature. If set to 0, an active extruder will be used for a multi-material print.
|
||||
// If different from idx_extruder, it will not be taken into account for this hint.
|
||||
@ -142,6 +143,12 @@ std::string PresetHints::maximum_volumetric_flow_description(const PresetBundle
|
||||
speed_normal = first_layer_speed.get_abs_value(speed_normal);
|
||||
return (speed_normal > 0.) ? speed_normal : speed_max;
|
||||
};
|
||||
auto limit_infill_by_first_layer_speed = [&first_layer_infill_speed, first_layer](double speed_normal, double speed_max) {
|
||||
if (first_layer && first_layer_infill_speed.value > 0)
|
||||
// Apply the first layer limit.
|
||||
speed_normal = first_layer_infill_speed.get_abs_value(speed_normal);
|
||||
return (speed_normal > 0.) ? speed_normal : speed_max;
|
||||
};
|
||||
if (perimeter_extruder_active) {
|
||||
double external_perimeter_rate = Flow::new_from_config_width(frExternalPerimeter,
|
||||
first_positive(first_layer_extrusion_width_ptr, external_perimeter_extrusion_width, extrusion_width),
|
||||
@ -165,7 +172,7 @@ std::string PresetHints::maximum_volumetric_flow_description(const PresetBundle
|
||||
if (! bridging && infill_extruder_active) {
|
||||
double infill_rate = Flow::new_from_config_width(frInfill,
|
||||
first_positive(first_layer_extrusion_width_ptr, infill_extrusion_width, extrusion_width),
|
||||
nozzle_diameter, lh, bfr).mm3_per_mm() * limit_by_first_layer_speed(infill_speed, max_print_speed);
|
||||
nozzle_diameter, lh, bfr).mm3_per_mm() * limit_infill_by_first_layer_speed(infill_speed, max_print_speed);
|
||||
if (max_flow < infill_rate) {
|
||||
max_flow = infill_rate;
|
||||
max_flow_extrusion_type = _CHB(L("infill"));
|
||||
@ -175,7 +182,7 @@ std::string PresetHints::maximum_volumetric_flow_description(const PresetBundle
|
||||
double solid_infill_rate = Flow::new_from_config_width(frInfill,
|
||||
first_positive(first_layer_extrusion_width_ptr, solid_infill_extrusion_width, extrusion_width),
|
||||
nozzle_diameter, lh, 0).mm3_per_mm() *
|
||||
(bridging ? bridge_speed : limit_by_first_layer_speed(solid_infill_speed, max_print_speed));
|
||||
(bridging ? bridge_speed : limit_infill_by_first_layer_speed(solid_infill_speed, max_print_speed));
|
||||
if (max_flow < solid_infill_rate) {
|
||||
max_flow = solid_infill_rate;
|
||||
max_flow_extrusion_type = _CHB(L("solid infill"));
|
||||
@ -183,7 +190,7 @@ std::string PresetHints::maximum_volumetric_flow_description(const PresetBundle
|
||||
if (! bridging) {
|
||||
double top_solid_infill_rate = Flow::new_from_config_width(frInfill,
|
||||
first_positive(first_layer_extrusion_width_ptr, top_infill_extrusion_width, extrusion_width),
|
||||
nozzle_diameter, lh, bfr).mm3_per_mm() * limit_by_first_layer_speed(top_solid_infill_speed, max_print_speed);
|
||||
nozzle_diameter, lh, bfr).mm3_per_mm() * limit_infill_by_first_layer_speed(top_solid_infill_speed, max_print_speed);
|
||||
if (max_flow < top_solid_infill_rate) {
|
||||
max_flow = top_solid_infill_rate;
|
||||
max_flow_extrusion_type = _CHB(L("top solid infill"));
|
||||
|
@ -914,7 +914,10 @@ void TabPrint::build()
|
||||
optgroup->append_single_option_line("travel_speed");
|
||||
|
||||
optgroup = page->new_optgroup(_(L("Modifiers")));
|
||||
optgroup->append_single_option_line("first_layer_speed");
|
||||
line = { _(L("First layer speed")), "" };
|
||||
line.append_option(optgroup->get_option("first_layer_speed"));
|
||||
line.append_option(optgroup->get_option("first_layer_infill_speed"));
|
||||
optgroup->append_line(line);
|
||||
|
||||
optgroup = page->new_optgroup(_(L("Acceleration control (advanced)")));
|
||||
optgroup->append_single_option_line("perimeter_acceleration");
|
||||
|
Loading…
x
Reference in New Issue
Block a user