Optimized Layer::merge_slices()
Don't merge classified pieces of layerm->slices, but use the non-split islands of a layer. For a single region print, these shall be equal. Added Slic3r-console.ico windows icon for the console Slic3r. This is a copy of the big icon, with the big images stripped off.
This commit is contained in:
parent
79f5a16536
commit
ef69474636
4 changed files with 14 additions and 13 deletions
BIN
var/Slic3r-console.ico
Normal file
BIN
var/Slic3r-console.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
|
@ -129,8 +129,19 @@ Layer::make_slices()
|
||||||
void
|
void
|
||||||
Layer::merge_slices()
|
Layer::merge_slices()
|
||||||
{
|
{
|
||||||
FOREACH_LAYERREGION(this, layerm) {
|
if (this->regions.size() == 1) {
|
||||||
(*layerm)->merge_slices();
|
// Optimization, also more robust. Don't merge classified pieces of layerm->slices,
|
||||||
|
// but use the non-split islands of a layer. For a single region print, these shall be equal.
|
||||||
|
this->regions.front()->slices.surfaces.clear();
|
||||||
|
surfaces_append(this->regions.front()->slices.surfaces, this->slices.expolygons, stInternal);
|
||||||
|
} else {
|
||||||
|
FOREACH_LAYERREGION(this, layerm) {
|
||||||
|
ExPolygons expp;
|
||||||
|
// without safety offset, artifacts are generated (GH #2494)
|
||||||
|
union_(to_polygons(STDMOVE((*layerm)->slices.surfaces)), &expp, true);
|
||||||
|
(*layerm)->slices.surfaces.clear();
|
||||||
|
surfaces_append((*layerm)->slices.surfaces, expp, stInternal);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,6 @@ class LayerRegion
|
||||||
ExtrusionEntityCollection fills;
|
ExtrusionEntityCollection fills;
|
||||||
|
|
||||||
Flow flow(FlowRole role, bool bridge = false, double width = -1) const;
|
Flow flow(FlowRole role, bool bridge = false, double width = -1) const;
|
||||||
void merge_slices();
|
|
||||||
void slices_to_fill_surfaces_clipped();
|
void slices_to_fill_surfaces_clipped();
|
||||||
void prepare_fill_surfaces();
|
void prepare_fill_surfaces();
|
||||||
void make_perimeters(const SurfaceCollection &slices, SurfaceCollection* fill_surfaces);
|
void make_perimeters(const SurfaceCollection &slices, SurfaceCollection* fill_surfaces);
|
||||||
|
|
|
@ -41,16 +41,6 @@ LayerRegion::flow(FlowRole role, bool bridge, double width) const
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
LayerRegion::merge_slices()
|
|
||||||
{
|
|
||||||
ExPolygons expp;
|
|
||||||
// without safety offset, artifacts are generated (GH #2494)
|
|
||||||
union_(to_polygons(STDMOVE(this->slices.surfaces)), &expp, true);
|
|
||||||
this->slices.surfaces.clear();
|
|
||||||
surfaces_append(this->slices.surfaces, expp, stInternal);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Fill in layerm->fill_surfaces by trimming the layerm->slices by the cummulative layerm->fill_surfaces.
|
// Fill in layerm->fill_surfaces by trimming the layerm->slices by the cummulative layerm->fill_surfaces.
|
||||||
void LayerRegion::slices_to_fill_surfaces_clipped()
|
void LayerRegion::slices_to_fill_surfaces_clipped()
|
||||||
{
|
{
|
||||||
|
@ -126,6 +116,7 @@ LayerRegion::process_external_surfaces(const Layer* lower_layer)
|
||||||
// Internal surfaces, not grown.
|
// Internal surfaces, not grown.
|
||||||
Surfaces internal;
|
Surfaces internal;
|
||||||
// Areas, where an infill of various types (top, bottom, bottom bride, sparse, void) could be placed.
|
// Areas, where an infill of various types (top, bottom, bottom bride, sparse, void) could be placed.
|
||||||
|
//FIXME if non zero infill, then fill_boundaries could be cheaply initialized from layerm->fill_expolygons.
|
||||||
Polygons fill_boundaries;
|
Polygons fill_boundaries;
|
||||||
|
|
||||||
// Collect top surfaces and internal surfaces.
|
// Collect top surfaces and internal surfaces.
|
||||||
|
|
Loading…
Reference in a new issue