Three standalone INestingEngine plugin projects (Solve() unimplemented, throws NotImplementedException), each outside OpenNest.sln and discovered at runtime via NestingEngineRegistry.LoadPlugins, same pattern as OpenNest.Engine.Aurora. Each README spells out that Solve() must be an independently designed placement algorithm and must never call/wrap/select over the built-in engines (StockLadderNestingEngine, FixedStrategyNestingEngine, PlateNesterFactory, NestingEngineRegistry). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
42 lines
1.7 KiB
C#
42 lines
1.7 KiB
C#
using System;
|
|
using System.Threading;
|
|
using OpenNest.Engine.Jobs;
|
|
|
|
namespace OpenNest.Engine.Terra;
|
|
|
|
/// <summary>
|
|
/// TODO: name and describe the actual placement strategy here (e.g. "skyline packer with
|
|
/// greedy shelf assignment", "NFP-based sliding placement with simulated-annealing order
|
|
/// search", etc). This must be an independently designed algorithm — see README.md.
|
|
/// </summary>
|
|
public sealed class TerraNestingEngine : INestingEngine
|
|
{
|
|
public NestJobResult Solve(
|
|
NestJob job,
|
|
IProgress<NestJobProgress>? progress = null,
|
|
CancellationToken token = default
|
|
)
|
|
{
|
|
ArgumentNullException.ThrowIfNull(job);
|
|
|
|
// TODO: implement independent placement logic here.
|
|
//
|
|
// Do NOT call NestingEngineRegistry.Create(...), PlateNesterFactory, or any
|
|
// FixedStrategyNestingEngine / StockLadderNestingEngine instance from inside this
|
|
// method. Decide placements yourself using OpenNest.Core / OpenNest.Geometry
|
|
// primitives (Polygon, NoFitPolygon, Collision, ConvexHull, RotatingCalipers, etc).
|
|
//
|
|
// job.Parts -> requested parts (PartGeometrySnapshot geometry, quantity, priority, rotation policy)
|
|
// job.Plates -> candidate stock sheets (size, spacing, quadrant, quantity)
|
|
// job.Options -> job-wide options
|
|
//
|
|
// Return a NestJobResult built from NestJobPlateResult (one per used sheet, holding
|
|
// ordered NestJobPlacement values), PartFulfillment (requested vs placed per part id),
|
|
// and StockUsage (sheets used per stock id).
|
|
|
|
throw new NotImplementedException(
|
|
"Terra nesting engine placement logic not yet implemented."
|
|
);
|
|
}
|
|
}
|