mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 11:45:56 +08:00
Fixed infill polygons filtering for Arachne to mimic filtering in the classic perimeter generator.
This commit is contained in:
parent
e631ac171a
commit
d107c47b0a
@ -286,9 +286,10 @@ void PerimeterGenerator::process_arachne()
|
|||||||
coord_t perimeter_spacing = this->perimeter_flow.scaled_spacing();
|
coord_t perimeter_spacing = this->perimeter_flow.scaled_spacing();
|
||||||
|
|
||||||
// external perimeters
|
// external perimeters
|
||||||
m_ext_mm3_per_mm = this->ext_perimeter_flow.mm3_per_mm();
|
m_ext_mm3_per_mm = this->ext_perimeter_flow.mm3_per_mm();
|
||||||
coord_t ext_perimeter_width = this->ext_perimeter_flow.scaled_width();
|
coord_t ext_perimeter_width = this->ext_perimeter_flow.scaled_width();
|
||||||
coord_t ext_perimeter_spacing = this->ext_perimeter_flow.scaled_spacing();
|
coord_t ext_perimeter_spacing = this->ext_perimeter_flow.scaled_spacing();
|
||||||
|
coord_t ext_perimeter_spacing2 = scaled<coord_t>(0.5f * (this->ext_perimeter_flow.spacing() + this->perimeter_flow.spacing()));
|
||||||
|
|
||||||
// overhang perimeters
|
// overhang perimeters
|
||||||
m_mm3_per_mm_overhang = this->overhang_flow.mm3_per_mm();
|
m_mm3_per_mm_overhang = this->overhang_flow.mm3_per_mm();
|
||||||
@ -445,13 +446,14 @@ void PerimeterGenerator::process_arachne()
|
|||||||
for (ExPolygon &ex : infill_contour)
|
for (ExPolygon &ex : infill_contour)
|
||||||
ex.simplify_p(m_scaled_resolution, &pp);
|
ex.simplify_p(m_scaled_resolution, &pp);
|
||||||
// collapse too narrow infill areas
|
// collapse too narrow infill areas
|
||||||
auto min_perimeter_infill_spacing = coord_t(solid_infill_spacing * (1. - INSET_OVERLAP_TOLERANCE));
|
const auto min_perimeter_infill_spacing = coord_t(solid_infill_spacing * (1. - INSET_OVERLAP_TOLERANCE));
|
||||||
|
const coord_t spacing = (perimeters.size() == 1) ? ext_perimeter_spacing2 : perimeter_spacing;
|
||||||
// append infill areas to fill_surfaces
|
// append infill areas to fill_surfaces
|
||||||
this->fill_surfaces->append(
|
this->fill_surfaces->append(
|
||||||
offset_ex(offset2_ex(
|
offset2_ex(
|
||||||
union_ex(pp),
|
union_ex(pp),
|
||||||
float(-min_perimeter_infill_spacing / 2.),
|
float(- min_perimeter_infill_spacing / 2. - spacing / 2.),
|
||||||
float(min_perimeter_infill_spacing / 2.)), float(inset)),
|
float(inset + min_perimeter_infill_spacing / 2. + spacing / 2.)),
|
||||||
stInternal);
|
stInternal);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user