mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-10-16 02:01:39 -04:00
feat(cutoffs): measure a cut-off line without building its program
This commit is contained in:
1 parent
c57e0ded83
commit
15055aef4d
2 files changed
+76
No files matched your search
@@ -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";
|
||||
|
||||
Reference in new issue
Block a user