mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-02 04:30:39 +08:00
Fix of merging bridging regions:
Fixed building a DAG of overlapping regions in expand_bridges_detect_orientations()
This commit is contained in:
parent
ccc193959b
commit
00ea0847b8
@ -230,10 +230,13 @@ Surfaces expand_bridges_detect_orientations(
|
|||||||
bboxes[it - it_begin].overlap(bboxes[it2 - it_begin]) &&
|
bboxes[it - it_begin].overlap(bboxes[it2 - it_begin]) &&
|
||||||
// One may ignore holes, they are irrelevant for intersection test.
|
// One may ignore holes, they are irrelevant for intersection test.
|
||||||
! intersection(it->expolygon.contour, it2->expolygon.contour).empty()) {
|
! intersection(it->expolygon.contour, it2->expolygon.contour).empty()) {
|
||||||
// The two bridge regions intersect. Give them the same group id.
|
// The two bridge regions intersect. Give them the same (lower) group id.
|
||||||
uint32_t id = group_id(it->src_id);
|
uint32_t id = group_id(it->src_id);
|
||||||
uint32_t id2 = group_id(it2->src_id);
|
uint32_t id2 = group_id(it2->src_id);
|
||||||
bridges[it->src_id].group_id = bridges[it2->src_id].group_id = std::min(id, id2);
|
if (id < id2)
|
||||||
|
bridges[id2].group_id = id;
|
||||||
|
else
|
||||||
|
bridges[id].group_id = id2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user