mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-12-01 14:31:36 -05:00
- NestItem.WithQuantity replaces eight hand-written copies that changed only the quantity, so a new field is copied everywhere. - The WinForms support overlay uses Desktop's SupportAnalysisCache and SupportClearance instead of its own copy. - CuttingParameters.LeadInFor/LeadOutFor replace the contour-type switches in ContourCuttingStrategy and ActionLeadIn. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
50 lines
1.4 KiB
C#
50 lines
1.4 KiB
C#
namespace OpenNest.Engine
|
|
{
|
|
public class NestItem
|
|
{
|
|
/// <summary>
|
|
/// The drawing to be nested.
|
|
/// </summary>
|
|
public Drawing Drawing { get; set; }
|
|
|
|
/// <summary>
|
|
/// Priority of the part determines nesting order. Higher numbers are nested first.
|
|
/// </summary>
|
|
public int Priority { get; set; }
|
|
|
|
/// <summary>
|
|
/// The number of parts to be nested.
|
|
/// </summary>
|
|
public int Quantity { get; set; }
|
|
|
|
/// <summary>
|
|
/// The rotation step in radians.
|
|
/// </summary>
|
|
public double StepAngle { get; set; }
|
|
|
|
/// <summary>
|
|
/// The rotation start angle in radians.
|
|
/// </summary>
|
|
public double RotationStart { get; set; }
|
|
|
|
/// <summary>
|
|
/// The rotation end angle in radians.
|
|
/// </summary>
|
|
public double RotationEnd { get; set; }
|
|
|
|
/// <summary>
|
|
/// A copy of this item with the given quantity and every other setting unchanged.
|
|
/// </summary>
|
|
public NestItem WithQuantity(int quantity) =>
|
|
new()
|
|
{
|
|
Drawing = Drawing,
|
|
Priority = Priority,
|
|
Quantity = quantity,
|
|
StepAngle = StepAngle,
|
|
RotationStart = RotationStart,
|
|
RotationEnd = RotationEnd,
|
|
};
|
|
}
|
|
}
|