feat: regenerate cut-offs after part drag and fill operations
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -167,6 +167,9 @@ namespace OpenNest.Actions
|
|||||||
}
|
}
|
||||||
|
|
||||||
parts.ForEach(p => plateView.Plate.Parts.Add(p.BasePart.Clone() as Part));
|
parts.ForEach(p => plateView.Plate.Parts.Add(p.BasePart.Clone() as Part));
|
||||||
|
|
||||||
|
if (plateView.Plate.CutOffs.Count > 0)
|
||||||
|
plateView.Plate.RegenerateCutOffs(plateView.CutOffSettings);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Fill()
|
private void Fill()
|
||||||
|
|||||||
@@ -133,6 +133,12 @@ namespace OpenNest.Actions
|
|||||||
plateView.Invalidate();
|
plateView.Invalidate();
|
||||||
status = Status.SetFirstPoint;
|
status = Status.SetFirstPoint;
|
||||||
}
|
}
|
||||||
|
else if (plateView.SelectedParts.Count > 0)
|
||||||
|
{
|
||||||
|
// Part drag completed — regenerate cut-off programs
|
||||||
|
if (plateView.Plate.CutOffs.Count > 0)
|
||||||
|
plateView.Plate.RegenerateCutOffs(plateView.CutOffSettings);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void plateView_Paint(object sender, PaintEventArgs e)
|
private void plateView_Paint(object sender, PaintEventArgs e)
|
||||||
|
|||||||
@@ -1089,6 +1089,10 @@ namespace OpenNest.Controls
|
|||||||
if (parts.Count > 0 && (!cts.IsCancellationRequested || progressForm.Accepted))
|
if (parts.Count > 0 && (!cts.IsCancellationRequested || progressForm.Accepted))
|
||||||
{
|
{
|
||||||
AcceptPreviewParts(parts);
|
AcceptPreviewParts(parts);
|
||||||
|
|
||||||
|
if (Plate.CutOffs.Count > 0)
|
||||||
|
Plate.RegenerateCutOffs(cutOffSettings);
|
||||||
|
|
||||||
sw.Stop();
|
sw.Stop();
|
||||||
Status = $"Fill: {parts.Count} parts in {sw.ElapsedMilliseconds} ms";
|
Status = $"Fill: {parts.Count} parts in {sw.ElapsedMilliseconds} ms";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user