mirror of
https://github.com/riegera2412/UVtools.git
synced 2026-07-09 01:52:32 +02:00
Fixed issue of contour duplication
When looking for candidate groups to check intersection of contours, we used to restrict this to only groups whose last item's layer was 1 above tthe current layer. However, in the event that 2 contours on the same layer intersect with the same group end up in a situation where the "last item" has a layer index of the current layer. To fix this we loosen the restriction and now scan groups that have a lowest layer index of either current layer index or current layer index + 1
This commit is contained in:
@@ -850,7 +850,7 @@ namespace UVtools.Core.Managers
|
||||
var overlappingGroupIndexes = new List<int>();
|
||||
for (var groupIndex = 0; groupIndex < resinTrapGroups.Count; groupIndex++)
|
||||
{
|
||||
if (resinTrapGroups[groupIndex].Last().layerIndex != layerIndex + 1) continue;
|
||||
if (resinTrapGroups[groupIndex][^1].layerIndex != layerIndex + 1 && resinTrapGroups[groupIndex][^1].layerIndex != layerIndex) continue;
|
||||
|
||||
if (EmguContours.ContoursIntersect(resinTrapGroups[groupIndex].Last().contour,
|
||||
resinTraps[layerIndex][x]))
|
||||
|
||||
Reference in New Issue
Block a user