diff options
author | bubnikv <bubnikv@gmail.com> | 2016-11-18 01:22:59 +0300 |
---|---|---|
committer | bubnikv <bubnikv@gmail.com> | 2016-11-18 01:22:59 +0300 |
commit | 79f5a16536150bf045a1327f5ab5c3c9d58f4390 (patch) | |
tree | 0387728813a0180bd5eec1686b9a7362f2670a98 /xs/src/libslic3r/LayerRegion.cpp | |
parent | 2085a482c76d88bfbb7ed8b5c598ff9f7ed8788f (diff) |
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.
Diffstat (limited to 'xs/src/libslic3r/LayerRegion.cpp')
-rw-r--r-- | xs/src/libslic3r/LayerRegion.cpp | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/xs/src/libslic3r/LayerRegion.cpp b/xs/src/libslic3r/LayerRegion.cpp index 115cba61d..a236c0389 100644 --- a/xs/src/libslic3r/LayerRegion.cpp +++ b/xs/src/libslic3r/LayerRegion.cpp @@ -58,7 +58,8 @@ void LayerRegion::slices_to_fill_surfaces_clipped() // in place. However we're now only using its boundaries (which are invariant) // so we're safe. This guarantees idempotence of prepare_infill() also in case // that combine_infill() turns some fill_surface into VOID surfaces. - Polygons fill_boundaries = to_polygons(STDMOVE(this->fill_surfaces)); +// Polygons fill_boundaries = to_polygons(STDMOVE(this->fill_surfaces)); + Polygons fill_boundaries = to_polygons(this->fill_expolygons); this->fill_surfaces.surfaces.clear(); for (Surfaces::const_iterator surface = this->slices.surfaces.begin(); surface != this->slices.surfaces.end(); ++ surface) surfaces_append( @@ -68,7 +69,7 @@ void LayerRegion::slices_to_fill_surfaces_clipped() } void -LayerRegion::make_perimeters(const SurfaceCollection &slices, SurfaceCollection* perimeter_surfaces, SurfaceCollection* fill_surfaces) +LayerRegion::make_perimeters(const SurfaceCollection &slices, SurfaceCollection* fill_surfaces) { this->perimeters.clear(); this->thin_fills.clear(); @@ -85,7 +86,6 @@ LayerRegion::make_perimeters(const SurfaceCollection &slices, SurfaceCollection* // output: &this->perimeters, &this->thin_fills, - perimeter_surfaces, fill_surfaces ); @@ -367,15 +367,10 @@ LayerRegion::prepare_fill_surfaces() // if no solid layers are requested, turn top/bottom surfaces to internal if (this->region()->config.top_solid_layers == 0) { - for (Surfaces::iterator surface = this->fill_surfaces.surfaces.begin(); surface != this->fill_surfaces.surfaces.end(); ++surface) { - if (surface->surface_type == stTop) { - if (this->layer()->object()->config.infill_only_where_needed) { - surface->surface_type = stInternalVoid; - } else { - surface->surface_type = stInternal; - } - } - } + for (Surfaces::iterator surface = this->fill_surfaces.surfaces.begin(); surface != this->fill_surfaces.surfaces.end(); ++surface) + if (surface->surface_type == stTop) + surface->surface_type = (this->layer()->object()->config.infill_only_where_needed) ? + stInternalVoid : stInternal; } if (this->region()->config.bottom_solid_layers == 0) { for (Surfaces::iterator surface = this->fill_surfaces.surfaces.begin(); surface != this->fill_surfaces.surfaces.end(); ++surface) { |