Restructure project layout to flatten directory structure
Move all projects from Source/ to repository root for simpler navigation. - Remove External/ dependency DLLs (will use NuGet packages) - Remove Installer/ NSIS script - Replace PartCollection/PlateCollection with ObservableList - Add packages.config for NuGet dependencies 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
30
OpenNest.Engine/CirclePacking/Bin.cs
Normal file
30
OpenNest.Engine/CirclePacking/Bin.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace OpenNest.CirclePacking
|
||||
{
|
||||
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)
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user