mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-14 02:05:56 +08:00
call remove_collinear_points after removing empty layers
This commit is contained in:
parent
db426758ca
commit
9f2dfdd981
@ -842,19 +842,6 @@ void PrintObject::_slice()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// remove collinear points from slice polygons (artifacts from stl-triangulation)
|
|
||||||
std::queue<SurfaceCollection*> queue;
|
|
||||||
for (Layer* layer : this->layers) {
|
|
||||||
for (LayerRegion* layerm : layer->regions) {
|
|
||||||
queue.push(&layerm->slices);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
parallelize<SurfaceCollection*>(
|
|
||||||
queue,
|
|
||||||
boost::bind(&Slic3r::SurfaceCollection::remove_collinear_points, _1),
|
|
||||||
this->_print->config.threads.value
|
|
||||||
);
|
|
||||||
|
|
||||||
// remove last layer(s) if empty
|
// remove last layer(s) if empty
|
||||||
bool done = false;
|
bool done = false;
|
||||||
while (! this->layers.empty()) {
|
while (! this->layers.empty()) {
|
||||||
@ -870,6 +857,19 @@ void PrintObject::_slice()
|
|||||||
this->delete_layer(int(this->layers.size()) - 1);
|
this->delete_layer(int(this->layers.size()) - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// remove collinear points from slice polygons (artifacts from stl-triangulation)
|
||||||
|
std::queue<SurfaceCollection*> queue;
|
||||||
|
for (Layer* layer : this->layers) {
|
||||||
|
for (LayerRegion* layerm : layer->regions) {
|
||||||
|
queue.push(&layerm->slices);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
parallelize<SurfaceCollection*>(
|
||||||
|
queue,
|
||||||
|
boost::bind(&Slic3r::SurfaceCollection::remove_collinear_points, _1),
|
||||||
|
this->_print->config.threads.value
|
||||||
|
);
|
||||||
|
|
||||||
// Apply size compensation and perform clipping of multi-part objects.
|
// Apply size compensation and perform clipping of multi-part objects.
|
||||||
const coord_t xy_size_compensation = scale_(this->config.xy_size_compensation.value);
|
const coord_t xy_size_compensation = scale_(this->config.xy_size_compensation.value);
|
||||||
for (Layer* layer : this->layers) {
|
for (Layer* layer : this->layers) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user