mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-16 04:35:57 +08:00
#248 add min width for 'only one perimeter'.
This commit is contained in:
parent
7f132c835d
commit
0a8be978d9
@ -16,7 +16,10 @@ group:Horizontal shells
|
||||
top_bottom_shell_thickness_explanation
|
||||
setting:enforce_full_fill_volume
|
||||
group:Quality
|
||||
setting:only_one_perimeter_top
|
||||
line:Only one perimeter on Top surfaces
|
||||
setting:label$ :only_one_perimeter_top
|
||||
setting:label$Minimum width:min_width_top_surface
|
||||
end_line
|
||||
line:Extra perimeters
|
||||
setting:extra_perimeters_overhangs
|
||||
setting:extra_perimeters_odd_layers
|
||||
|
@ -483,6 +483,9 @@ void PerimeterGenerator::process()
|
||||
// it's a bit like re-add thin area in to perimeter area.
|
||||
// it can over-extrude a bit, but it's for a better good.
|
||||
{
|
||||
|
||||
|
||||
|
||||
if(config->thin_perimeters)
|
||||
next_onion = union_ex(next_onion, offset_ex(diff_ex(last, thins, true),
|
||||
-(float)(ext_perimeter_width / 2)));
|
||||
@ -578,15 +581,18 @@ void PerimeterGenerator::process()
|
||||
if (offset_top_surface > 0.9 * (config->perimeters <= 1 ? 0. : (perimeter_spacing * (config->perimeters - 1))))
|
||||
offset_top_surface -= 0.9 * (config->perimeters <= 1 ? 0. : (perimeter_spacing * (config->perimeters - 1)));
|
||||
else offset_top_surface = 0;
|
||||
//don't takes into account too thin areas
|
||||
ExPolygons grown_upper_slices = this->config->min_width_top_surface.value == 0 ? *this->upper_slices :
|
||||
offset_ex(*this->upper_slices, this->config->min_width_top_surface.get_abs_value(perimeter_width));
|
||||
// get the real top surface
|
||||
ExPolygons top_polygons = (!have_to_grow_for_miller) ? diff_ex(last, *this->upper_slices, true)
|
||||
ExPolygons top_polygons = (!have_to_grow_for_miller) ? diff_ex(last, grown_upper_slices, true)
|
||||
:(unmillable.empty())?
|
||||
diff_ex(last, offset_ex(*this->upper_slices, mill_extra_size), true)
|
||||
diff_ex(last, offset_ex(grown_upper_slices, mill_extra_size), true)
|
||||
:
|
||||
diff_ex(last, diff_ex(offset_ex(*this->upper_slices, mill_extra_size), unmillable, true));
|
||||
diff_ex(last, diff_ex(offset_ex(grown_upper_slices, mill_extra_size), unmillable, true));
|
||||
|
||||
//get the not-top surface, from the "real top" but enlarged by external_infill_margin
|
||||
ExPolygons inner_polygons = diff_ex(last, offset_ex(top_polygons, offset_top_surface), true);
|
||||
//get the not-top surface, from the "real top" but enlarged by external_infill_margin (and the min_width_top_surface we removed a bit before)
|
||||
ExPolygons inner_polygons = diff_ex(last, offset_ex(top_polygons, offset_top_surface + this->config->min_width_top_surface.get_abs_value(perimeter_width)), true);
|
||||
// get the enlarged top surface, by using inner_polygons instead of upper_slices
|
||||
top_polygons = diff_ex(last, inner_polygons, true);
|
||||
// increase by half peri the inner space to fill the frontier between last and stored.
|
||||
|
@ -2008,6 +2008,18 @@ void PrintConfigDef::init_fff_params()
|
||||
def->mode = comSimple;
|
||||
def->set_default_value(new ConfigOptionFloats { 0.07 });
|
||||
|
||||
def = this->add("min_width_top_surface", coFloatOrPercent);
|
||||
def->label = L("minimum top width for infill");
|
||||
def->category = OptionCategory::speed;
|
||||
def->tooltip = L("If a top surface has to be printed and it's partially covered by an other layer, it won't be considered at a top layer where his width is below this value."
|
||||
" This can be useful to not let the 'one perimeter on top' trigger on surface that should be covered only by periemters."
|
||||
" This value can be a mm or a % of the perimeter extrusion width.");
|
||||
def->sidetext = L("mm or %");
|
||||
def->ratio_over = "perimeter_extrusion_width";
|
||||
def->min = 0;
|
||||
def->mode = comExpert;
|
||||
def->set_default_value(new ConfigOptionFloatOrPercent(100, true));
|
||||
|
||||
def = this->add("min_print_speed", coFloats);
|
||||
def->label = L("Min print speed");
|
||||
def->category = OptionCategory::speed;
|
||||
@ -2015,7 +2027,7 @@ void PrintConfigDef::init_fff_params()
|
||||
def->sidetext = L("mm/s");
|
||||
def->min = 0;
|
||||
def->mode = comExpert;
|
||||
def->set_default_value(new ConfigOptionFloats { 10. });
|
||||
def->set_default_value(new ConfigOptionFloats{ 10. });
|
||||
|
||||
def = this->add("min_skirt_length", coFloat);
|
||||
def->label = L("Minimal filament extrusion length");
|
||||
|
@ -654,6 +654,7 @@ public:
|
||||
ConfigOptionFloatOrPercent milling_extra_size;
|
||||
ConfigOptionBool milling_post_process;
|
||||
ConfigOptionFloat milling_speed;
|
||||
ConfigOptionFloatOrPercent min_width_top_surface;
|
||||
// Detect bridging perimeters
|
||||
ConfigOptionBool overhangs;
|
||||
ConfigOptionFloatOrPercent overhangs_width;
|
||||
@ -741,6 +742,7 @@ protected:
|
||||
OPT_PTR(milling_extra_size);
|
||||
OPT_PTR(milling_post_process);
|
||||
OPT_PTR(milling_speed);
|
||||
OPT_PTR(min_width_top_surface);
|
||||
OPT_PTR(overhangs);
|
||||
OPT_PTR(overhangs_width);
|
||||
OPT_PTR(overhangs_reverse);
|
||||
|
@ -303,6 +303,7 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig* config)
|
||||
|
||||
toggle_field("overhangs_width", config->opt_bool("overhangs"));
|
||||
toggle_field("overhangs_reverse_threshold", config->opt_bool("overhangs_reverse"));
|
||||
toggle_field("min_width_top_surface", config->opt_bool("only_one_perimeter_top"));
|
||||
|
||||
for (auto el : { "external_perimeters_vase", "external_perimeters_nothole", "external_perimeters_hole"})
|
||||
toggle_field(el, config->opt_bool("external_perimeters_first"));
|
||||
|
@ -462,6 +462,7 @@ const std::vector<std::string>& Preset::print_options()
|
||||
#ifdef HAS_PRESSURE_EQUALIZER
|
||||
"max_volumetric_extrusion_rate_slope_positive", "max_volumetric_extrusion_rate_slope_negative",
|
||||
#endif /* HAS_PRESSURE_EQUALIZER */
|
||||
"min_width_top_surface",
|
||||
"perimeter_speed", "small_perimeter_speed", "external_perimeter_speed", "infill_speed", "solid_infill_speed",
|
||||
"top_solid_infill_speed", "support_material_speed", "support_material_xy_spacing", "support_material_interface_speed",
|
||||
"bridge_speed",
|
||||
|
Loading…
x
Reference in New Issue
Block a user