mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 19:33:47 +00:00
WIP fix sacrificial layer.cpp (#13018)
* fix sacrificial layer.cpp Fix sacrificial layer edgecase , with 2 perimeters only * copilot suggsetions * one perimeter left Update PerimeterGenerator.cpp * Update offset calculation in PerimeterGenerator Adjust the offset calculation for unsupported filtered polygons.
This commit is contained in:
@@ -1729,8 +1729,12 @@ void PerimeterGenerator::process_no_bridge(Surfaces& all_surfaces, coord_t perim
|
|||||||
//compute our unsupported surface
|
//compute our unsupported surface
|
||||||
ExPolygons unsupported = diff_ex(last, *this->lower_slices, ApplySafetyOffset::Yes);
|
ExPolygons unsupported = diff_ex(last, *this->lower_slices, ApplySafetyOffset::Yes);
|
||||||
if (!unsupported.empty()) {
|
if (!unsupported.empty()) {
|
||||||
//remove small overhangs
|
// remove small overhangs (when using chbFilled we need to be less aggressive in removing small overhangs,
|
||||||
ExPolygons unsupported_filtered = offset2_ex(unsupported, double(-perimeter_spacing), double(perimeter_spacing));
|
// to avoid affecting bridging detection.)
|
||||||
|
const int outset_divisor = this->config->counterbore_hole_bridging.value == chbFilled ? 2 : 1;
|
||||||
|
ExPolygons unsupported_filtered = offset2_ex(unsupported, double(-perimeter_spacing),
|
||||||
|
double(perimeter_spacing) / outset_divisor);
|
||||||
|
|
||||||
if (!unsupported_filtered.empty()) {
|
if (!unsupported_filtered.empty()) {
|
||||||
//to_draw.insert(to_draw.end(), last.begin(), last.end());
|
//to_draw.insert(to_draw.end(), last.begin(), last.end());
|
||||||
//extract only the useful part of the lower layer. The safety offset is really needed here.
|
//extract only the useful part of the lower layer. The safety offset is really needed here.
|
||||||
@@ -1773,7 +1777,7 @@ void PerimeterGenerator::process_no_bridge(Surfaces& all_surfaces, coord_t perim
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
unsupported_filtered = intersection_ex(last,
|
unsupported_filtered = intersection_ex(last,
|
||||||
offset2_ex(unsupported_filtered, double(-perimeter_spacing / 2), double(bridged_infill_margin + perimeter_spacing / 2)));
|
offset_ex(unsupported_filtered, 0.5 * double(bridged_infill_margin)));
|
||||||
if (this->config->counterbore_hole_bridging.value == chbFilled) {
|
if (this->config->counterbore_hole_bridging.value == chbFilled) {
|
||||||
for (ExPolygon& expol : unsupported_filtered) {
|
for (ExPolygon& expol : unsupported_filtered) {
|
||||||
//check if the holes won't be covered by the upper layer
|
//check if the holes won't be covered by the upper layer
|
||||||
|
|||||||
Reference in New Issue
Block a user