mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-11-20 16:57:41 -05:00
fix: check longest side against plate dimensions in best fit filter
The filter only checked ShortestSide against the plate's short dimension, allowing results where the long side far exceeded the plate length. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
3c4d00baa4
commit
804a7fd9c1
1 file changed
+2
-1
@@ -17,7 +17,8 @@ namespace OpenNest.Engine.BestFit
|
||||
if (!result.Keep)
|
||||
continue;
|
||||
|
||||
if (result.ShortestSide > System.Math.Min(MaxPlateWidth, MaxPlateHeight))
|
||||
if (result.ShortestSide > System.Math.Min(MaxPlateWidth, MaxPlateHeight) ||
|
||||
result.LongestSide > System.Math.Max(MaxPlateWidth, MaxPlateHeight))
|
||||
{
|
||||
result.Keep = false;
|
||||
result.Reason = "Exceeds plate dimensions";
|
||||
|
||||
Reference in new issue
Block a user