Reverted the perimeter generator to not save the perimeter areas.

These could be calculated from the fill areas if needed.
On the other side, the non-classified (non-split) fill areas are stored
now for use in the "ensure vertical wall thickness" feature,
also the non-split fill areas are re-used when recalculating the infills.
This is safer than trying to stitch the fill region together from the
classified fragments.

Modified the "ensure vertical wall thickness" feature to use the non-split
fill areas instead of perimeter areas for the calculation
of non-supported regions. This is cheaper as the fill areas contain
roughly half the edges.
This commit is contained in:
bubnikv 2016-11-17 23:22:59 +01:00
parent 2085a482c7
commit 79f5a16536
12 changed files with 94 additions and 116 deletions

View file

@ -246,15 +246,6 @@ PerimeterGenerator::process()
if (!entities.empty())
this->loops->append(entities);
} // for each loop of an island
{
//FIXME how about the gaps?
// Calculate the region of surface->expolygon covered by the perimeters and their gap fills.
// The perimeters will later be used to calculate the object skin.
ExPolygons expp = diff_ex((Polygons)surface->expolygon, last, true);
for (ExPolygons::const_iterator ex = expp.begin(); ex != expp.end(); ++ex)
this->perimeter_surfaces->surfaces.push_back(Surface(stPerimeter, *ex));
}
// fill gaps
if (!gaps.empty()) {
@ -322,15 +313,15 @@ PerimeterGenerator::process()
// collapse too narrow infill areas
coord_t min_perimeter_infill_spacing = ispacing * (1 - INSET_OVERLAP_TOLERANCE);
expp = offset2_ex(
pp,
-inset -min_perimeter_infill_spacing/2,
+min_perimeter_infill_spacing/2
);
// append infill areas to fill_surfaces
for (ExPolygons::const_iterator ex = expp.begin(); ex != expp.end(); ++ex)
this->fill_surfaces->surfaces.push_back(Surface(stInternal, *ex)); // use a bogus surface type
surfaces_append(
this->fill_surfaces->surfaces,
offset2_ex(
pp,
-inset -min_perimeter_infill_spacing/2,
+min_perimeter_infill_spacing/2),
stInternal);
}
} // for each island
}