All 132 OpenNest.Engine source files now declare namespaces matching their nested directories: Jobs/, Jobs/Placement/, Jobs/Adapters/, Fill/, RectanglePacking/, CirclePacking/, and engine-root types moved from 'OpenNest' to 'OpenNest.Engine'. RootNamespace updated accordingly. Consumers (Api, Console, Mcp, Benchmark, Training, desktop app, tests) gained the explicit usings the move requires; CLAUDE.md updated.
32 lines
633 B
C#
32 lines
633 B
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using OpenNest.Geometry;
|
|
|
|
namespace OpenNest.Engine.RectanglePacking
|
|
{
|
|
internal class Bin : Box
|
|
{
|
|
public Bin()
|
|
{
|
|
Items = new List<Item>();
|
|
}
|
|
|
|
public List<Item> Items { get; set; }
|
|
|
|
public double Density()
|
|
{
|
|
return Items.Sum(i => i.Area()) / Area();
|
|
}
|
|
|
|
public object Clone()
|
|
{
|
|
return new Bin
|
|
{
|
|
Location = this.Location,
|
|
Size = this.Size,
|
|
Items = new List<Item>(Items),
|
|
};
|
|
}
|
|
}
|
|
}
|