Remove too thin bridges (infill < 1 line)

This commit is contained in:
supermerill 2019-02-14 17:49:36 +01:00
parent d7141abcb4
commit 568aa1d113
3 changed files with 8 additions and 4 deletions

View File

@ -204,7 +204,11 @@ void LayerRegion::process_external_surfaces(const Layer* lower_layer)
break;
}
// Grown by bridged_infill_margin.
Polygons polys = offset(to_polygons(bridges[i].expolygon), float(margin_bridged), EXTERNAL_SURFACES_OFFSET_PARAMETERS);
// also, remove all bridge area that are thinner than a single line.
Polygons polys = offset2(to_polygons(bridges[i].expolygon),
(-this->flow(frInfill).scaled_width() / 2),
(this->flow(frInfill).scaled_width() / 2) + float(margin_bridged),
EXTERNAL_SURFACES_OFFSET_PARAMETERS);
if (idx_island == -1) {
printf("Bridge did not fall into the source region!\r\n");
} else {

View File

@ -501,7 +501,7 @@ void PrintConfigDef::init_fff_params()
def->category = L("Infill");
def->tooltip = L("This parameter grows the bridged solid infill layers by the specified MM to anchor them into the part. Put 0 to deactivate it.");
def->sidetext = L("mm");
def->cli = "top-layer-anchor=f";
def->cli = "bridged-layer-anchor=f";
def->min = 0;
def->mode = comExpert;
def->default_value = new ConfigOptionFloat(2);

View File

@ -486,8 +486,6 @@ bool PrintObject::invalidate_state_by_config_options(const std::vector<t_config_
|| opt_key == "support_material_contact_distance_top"
|| opt_key == "support_material_contact_distance_bottom"
|| opt_key == "xy_size_compensation"
|| opt_key == "external_infill_margin"
|| opt_key == "bridged_infill_margin"
|| opt_key == "hole_size_compensation") {
steps.emplace_back(posSlice);
} else if (
@ -527,6 +525,8 @@ bool PrintObject::invalidate_state_by_config_options(const std::vector<t_config_
|| opt_key == "solid_infill_extruder"
|| opt_key == "infill_extrusion_width"
|| opt_key == "ensure_vertical_shell_thickness"
|| opt_key == "external_infill_margin"
|| opt_key == "bridged_infill_margin"
|| opt_key == "bridge_angle") {
steps.emplace_back(posPrepareInfill);
} else if (