mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-11-21 07:47:40 -05:00
fix(core): report overlapping pairs through PartOverlapChecker
The console overlap check and the MCP check_overlaps tool counted crossing points, so a part contained in or stacked on another reported no overlap. Both now list pairs from PartOverlapChecker.FindOverlappingPairs, which uses the Intersects verdict and skips cut-off parts. Plate.HasOverlappingParts stays for now: two test files outside this change still call it. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
1 parent
a451cf5ef3
commit
e5d4337681
11 files changed
+179
-38
No files matched your search
@@ -789,14 +789,14 @@ static class NestConsole
|
||||
var total = 0;
|
||||
foreach (var plate in plates.Where(p => p.Parts.Count > 0))
|
||||
{
|
||||
var hasOverlaps = plate.HasOverlappingParts(out var overlapPts);
|
||||
var overlapping = PartOverlapChecker.FindOverlappingPairs(plate.Parts);
|
||||
var label = plates.Count > 1 ? $"Plate {nest.Plates.IndexOf(plate)}: " : "";
|
||||
Console.WriteLine(
|
||||
hasOverlaps
|
||||
? $"{label}OVERLAPS DETECTED: {overlapPts.Count} intersection points"
|
||||
overlapping.Count > 0
|
||||
? $"{label}OVERLAPS DETECTED: {overlapping.Count} overlapping pair(s)"
|
||||
: $"{label}Overlap check: PASS"
|
||||
);
|
||||
total += overlapPts.Count;
|
||||
total += overlapping.Count;
|
||||
}
|
||||
|
||||
return total;
|
||||
|
||||
Reference in new issue
Block a user