feat: serialize plate optimizer settings in nest files
Add PlateOptions and SalvageRate properties to the Nest class and round-trip them through NestWriter/NestReader via a new PlateOptionDto. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -29,6 +29,8 @@ namespace OpenNest.IO
|
||||
public PlateDefaultsDto PlateDefaults { get; init; } = new();
|
||||
public List<DrawingDto> Drawings { get; init; } = new();
|
||||
public List<PlateDto> Plates { get; init; } = new();
|
||||
public List<PlateOptionDto> PlateOptions { get; init; } = new();
|
||||
public double SalvageRate { get; init; } = 0.5;
|
||||
}
|
||||
|
||||
public record PlateDefaultsDto
|
||||
@@ -153,6 +155,13 @@ namespace OpenNest.IO
|
||||
public string NoteText { get; init; } = "";
|
||||
}
|
||||
|
||||
public record PlateOptionDto
|
||||
{
|
||||
public double Width { get; init; }
|
||||
public double Length { get; init; }
|
||||
public double Cost { get; init; }
|
||||
}
|
||||
|
||||
public record BestFitSetDto
|
||||
{
|
||||
public double PlateWidth { get; init; }
|
||||
|
||||
Reference in New Issue
Block a user