refactor: extract SpatialQuery from Helper
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -186,8 +186,8 @@ namespace OpenNest.Actions
|
||||
boxes.Add(part.BoundingBox.Offset(plate.PartSpacing));
|
||||
|
||||
var pt = plateView.CurrentPoint;
|
||||
var vertical = Helper.GetLargestBoxVertically(pt, bounds, boxes);
|
||||
var horizontal = Helper.GetLargestBoxHorizontally(pt, bounds, boxes);
|
||||
var vertical = SpatialQuery.GetLargestBoxVertically(pt, bounds, boxes);
|
||||
var horizontal = SpatialQuery.GetLargestBoxHorizontally(pt, bounds, boxes);
|
||||
|
||||
var bestArea = vertical;
|
||||
if (horizontal.Area() > vertical.Area())
|
||||
|
||||
@@ -150,8 +150,8 @@ namespace OpenNest.Actions
|
||||
private void UpdateSelectedArea()
|
||||
{
|
||||
SelectedArea = altSelect
|
||||
? Helper.GetLargestBoxHorizontally(plateView.CurrentPoint, Bounds, boxes)
|
||||
: Helper.GetLargestBoxVertically(plateView.CurrentPoint, Bounds, boxes);
|
||||
? SpatialQuery.GetLargestBoxHorizontally(plateView.CurrentPoint, Bounds, boxes)
|
||||
: SpatialQuery.GetLargestBoxVertically(plateView.CurrentPoint, Bounds, boxes);
|
||||
|
||||
plateView.Invalidate();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user