Simplification, C++11 beautification.

This commit is contained in:
bubnikv 2017-04-05 09:51:03 +02:00
parent ef2cfdb0d1
commit 555560f63c

View file

@ -297,22 +297,15 @@ PerimeterGenerator::process()
// two or more loops // two or more loops
inset += pspacing/2; inset += pspacing/2;
} }
// only apply infill overlap if we actually have one perimeter // only apply infill overlap if we actually have one perimeter
if (inset > 0) if (inset > 0)
inset -= this->config->get_abs_value("infill_overlap", inset + ispacing/2); inset -= this->config->get_abs_value("infill_overlap", inset + ispacing/2);
{
ExPolygons expp = union_ex(last);
// simplify infill contours according to resolution // simplify infill contours according to resolution
Polygons pp; Polygons pp;
for (ExPolygons::const_iterator ex = expp.begin(); ex != expp.end(); ++ex) for (ExPolygon &ex : union_ex(last))
ex->simplify_p(SCALED_RESOLUTION, &pp); ex.simplify_p(SCALED_RESOLUTION, &pp);
// collapse too narrow infill areas // collapse too narrow infill areas
coord_t min_perimeter_infill_spacing = ispacing * (1 - INSET_OVERLAP_TOLERANCE); coord_t min_perimeter_infill_spacing = ispacing * (1 - INSET_OVERLAP_TOLERANCE);
// append infill areas to fill_surfaces // append infill areas to fill_surfaces
this->fill_surfaces->append( this->fill_surfaces->append(
offset2_ex( offset2_ex(
@ -320,7 +313,6 @@ PerimeterGenerator::process()
-inset -min_perimeter_infill_spacing/2, -inset -min_perimeter_infill_spacing/2,
+min_perimeter_infill_spacing/2), +min_perimeter_infill_spacing/2),
stInternal); stInternal);
}
} // for each island } // for each island
} }