Correct gap fill width bounds in outer-only and mixed-wall cases (#12057)

This commit is contained in:
Kiss Lorand
2026-04-22 00:08:55 +03:00
committed by GitHub
parent f70d30bf79
commit 2e61d9eab2

View File

@@ -1562,9 +1562,9 @@ void PerimeterGenerator::process_classic()
} // for each loop of an island
// fill gaps
if (! gaps.empty()) {
// collapse
double min = 0.2 * perimeter_width * (1 - INSET_OVERLAP_TOLERANCE);
if (! gaps.empty()) { // collapse
// ORCA: Use the smaller width as the lower bound to avoid overestimating safe overlap
double min = 0.2 * std::min(perimeter_width, ext_perimeter_width) * (1 - INSET_OVERLAP_TOLERANCE);
double max = 2. * perimeter_spacing;
ExPolygons gaps_ex = diff_ex(
//FIXME offset2 would be enough and cheaper.