mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 01:07:57 -06:00
Fix of "Don't use bridging perimeters on top of elephant-foot compensation #3011"
If the Elephant foot compensation is applied to the 1st object's layer, the uncompensated 1st object's slice is newly used for calculation of bridges, overhans, skirt, brim, raft and supports. Layer::slices were renamed to Layer::lslices to simplify reading of the code, to differentiate from LayerRegion::slices.
This commit is contained in:
parent
a4ad0a0925
commit
3d17543d40
8 changed files with 158 additions and 137 deletions
|
@ -47,8 +47,8 @@ void Layer::make_slices()
|
|||
slices = union_ex(slices_p);
|
||||
}
|
||||
|
||||
this->slices.clear();
|
||||
this->slices.reserve(slices.size());
|
||||
this->lslices.clear();
|
||||
this->lslices.reserve(slices.size());
|
||||
|
||||
// prepare ordering points
|
||||
Points ordering_points;
|
||||
|
@ -61,19 +61,21 @@ void Layer::make_slices()
|
|||
|
||||
// populate slices vector
|
||||
for (size_t i : order)
|
||||
this->slices.push_back(std::move(slices[i]));
|
||||
this->lslices.emplace_back(std::move(slices[i]));
|
||||
}
|
||||
|
||||
// Merge typed slices into untyped slices. This method is used to revert the effects of detect_surfaces_type() called for posPrepareInfill.
|
||||
void Layer::merge_slices()
|
||||
{
|
||||
if (m_regions.size() == 1) {
|
||||
if (m_regions.size() == 1 && (this->id() > 0 || this->object()->config().elefant_foot_compensation.value == 0)) {
|
||||
// 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.
|
||||
m_regions.front()->slices.set(this->slices, stInternal);
|
||||
// Don't use this optimization on 1st layer with Elephant foot compensation applied, as this->lslices are uncompensated,
|
||||
// while regions are compensated.
|
||||
m_regions.front()->slices.set(this->lslices, stInternal);
|
||||
} else {
|
||||
for (LayerRegion *layerm : m_regions)
|
||||
// without safety offset, artifacts are generated (GH #2494)
|
||||
// without safety offset, artifacts are generated (upstream Slic3r GH #2494)
|
||||
layerm->slices.set(union_ex(to_polygons(std::move(layerm->slices.surfaces)), true), stInternal);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue