Rename SawCut library to CutList.Core

Rename the core library project from SawCut to CutList.Core for consistent
branding across the solution. This includes:
- Rename project folder and .csproj file
- Update namespace from SawCut to CutList.Core
- Update all using statements and project references

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-28 12:31:30 -05:00
parent c612a40a46
commit f25e31698f
30 changed files with 36 additions and 36 deletions

51
CutList.Core/BinGroup.cs Normal file
View File

@@ -0,0 +1,51 @@
using System;
using System.Collections.Generic;
using System.Linq;
namespace CutList.Core
{
/// <summary>
/// Represents a group of identical bins (bins with the same items in the same order).
/// Used for displaying consolidated results.
/// </summary>
public class BinGroup
{
public BinGroup(Bin representativeBin, int count)
{
if (representativeBin == null)
throw new ArgumentNullException(nameof(representativeBin));
if (count <= 0)
throw new ArgumentException("Count must be greater than zero", nameof(count));
RepresentativeBin = representativeBin;
Count = count;
}
/// <summary>
/// A representative bin from this group (all bins in the group are identical).
/// </summary>
public Bin RepresentativeBin { get; }
/// <summary>
/// The number of identical bins in this group.
/// </summary>
public int Count { get; }
// Properties that delegate to the representative bin for data binding
public double Spacing => RepresentativeBin.Spacing;
public double Length => RepresentativeBin.Length;
public double UsedLength => RepresentativeBin.UsedLength;
public double RemainingLength => RepresentativeBin.RemainingLength;
public double Utilization => RepresentativeBin.Utilization;
public IReadOnlyList<BinItem> Items => RepresentativeBin.Items;
public override string ToString()
{
if (Count == 1)
return RepresentativeBin.ToString();
return $"{RepresentativeBin} (x{Count})";
}
}
}