Files
OpenNest/Engines/OpenNest.Engine.Terra/TerraNestingEngine.cs
T
ajandClaude Opus 5.5 b122298f57 refactor(engines): move plugin engines into an Engines/ subfolder
Plugin engines (Opus55, Qwen, Terra) each add two projects at the repo
root, and more are coming; at a dozen they would outnumber the core
projects. They are also a different kind of thing: out-of-solution,
runtime-loaded plugins. Grouping them under Engines/ keeps the root
readable.

Engines/Directory.Build.props now holds the shared TFM, nullable and
implicit-usings settings and the OpenNest.Engine reference, so a new
engine's csproj is nearly empty. The tests/ compile exclusion lives in
Directory.Build.targets because a removal in .props runs before the SDK
adds its default Compile glob and has no effect.

Build-Engines.ps1 replaces the per-README manual build-and-copy steps
for deploying engines into the benchmark's runtime Engines/ folder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-23 11:34:18 -04:00

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."
);
}
}