fix(core): keep cut-offs in their cut sequence through regenerate and save
A cut-off's place in Plate.Parts is its cut sequence number, but RegenerateCutOffs removed every cut-off part and appended it again, so any part drag, fill or cut-off move sent the cut-offs to the end. The nest file didn't store the position either, so reopening did the same. RegenerateCutOffs now puts each cut-off back at its previous index (new cut-offs go at the end), and CutOffDto.Sequence saves the index. Older files without it load the cut-offs at the end, as before.
This commit is contained in:
@@ -87,6 +87,12 @@ namespace OpenNest.IO
|
||||
public string Axis { get; init; } = "vertical";
|
||||
public double? StartLimit { get; init; }
|
||||
public double? EndLimit { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Zero-based place in the plate's cut sequence (<c>Plate.Parts</c> order,
|
||||
/// cut-offs included). Null in older files, which load it at the end.
|
||||
/// </summary>
|
||||
public int? Sequence { get; init; }
|
||||
}
|
||||
|
||||
public record SizeDto
|
||||
|
||||
Reference in New Issue
Block a user