Scales down lead-ins that would place the pierce point too close to the opposite wall of small holes. Uses quadratic solve to find the maximum safe distance inside a clearance-reduced radius. Adds Scale() method to all LeadIn types and applies clamping in both the strategy and the interactive preview. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
16 lines
461 B
C#
16 lines
461 B
C#
using OpenNest.Geometry;
|
|
using System.Collections.Generic;
|
|
|
|
namespace OpenNest.CNC.CuttingStrategy
|
|
{
|
|
public abstract class LeadIn
|
|
{
|
|
public abstract List<ICode> Generate(Vector contourStartPoint, double contourNormalAngle,
|
|
RotationType winding = RotationType.CW);
|
|
|
|
public abstract Vector GetPiercePoint(Vector contourStartPoint, double contourNormalAngle);
|
|
|
|
public virtual LeadIn Scale(double factor) => this;
|
|
}
|
|
}
|