feat(cutoffs): measure a cut-off line without building its program

This commit is contained in:
aj committed 2026-10-13 19:29:32 -04:00
1 parent c57e0ded83
commit 15055aef4d
2 files changed
+76

No files matched your search

+11
View File
@@ -39,6 +39,17 @@ namespace OpenNest
Drawing.Program = program;
}
/// <summary>Measures the same trimmed, filtered segments as regeneration without building a program.</summary>
internal (double Length, int SegmentCount) MeasureSegments(
Plate plate,
CutOffSettings settings,
Dictionary<Part, Entity> cache = null
)
{
var segments = ComputeSegments(plate, settings, cache);
return (segments.Sum(s => s.End - s.Start), segments.Count);
}
private string GetName()
{
var axisChar = Axis == CutOffAxis.Vertical ? "V" : "H";