Extract distance computation from RotationSlideStrategy into a pluggable IDistanceComputer interface. CpuDistanceComputer adds leading-face vertex culling (~50% fewer rays per direction) with early exit on overlap. GpuDistanceComputer wraps ISlideComputer with Line-to-flat-array conversion. SlideOffset struct uses direction vectors (DirX/DirY) instead of PushDirection. SpatialQuery.RayEdgeDistance(dirX,dirY) made public for CPU path. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
14 lines
304 B
C#
14 lines
304 B
C#
using OpenNest.Geometry;
|
|
using System.Collections.Generic;
|
|
|
|
namespace OpenNest.Engine.BestFit
|
|
{
|
|
public interface IDistanceComputer
|
|
{
|
|
double[] ComputeDistances(
|
|
List<Line> stationaryLines,
|
|
List<Line> movingTemplateLines,
|
|
SlideOffset[] offsets);
|
|
}
|
|
}
|