Commit Graph

4 Commits

Author SHA1 Message Date
0e1e619f0a refactor(engine): move fill and strategy code to dedicated namespaces
Move fill algorithms to OpenNest.Engine.Fill namespace:
FillLinear, FillExtents, PairFiller, ShrinkFiller, Compactor,
RemnantFiller, RemnantFinder, FillScore, Pattern, PatternTiler,
PartBoundary, RotationAnalysis, AngleCandidateBuilder, and
AccumulatingProgress.

Move strategy layer to OpenNest.Engine.Strategies namespace:
IFillStrategy, FillContext, FillStrategyRegistry, FillHelpers,
and all built-in strategy implementations.

Add using directives to all consuming files across Engine, UI,
MCP, and Tests projects.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 16:46:11 -04:00
65bde123ed fix(engine): fix remnant finder missing L-shaped and split remnants
Two bugs caused the remnant finder to miss valid empty regions:

1. RemoveDominated used an 80% overlap-area threshold that incorrectly
   removed L-shaped remnants. A tall strip to one side would "dominate"
   wide strips above/below it even though they represent different usable
   space. Replaced with geometric containment check — only remove a box
   if it's fully inside a larger one.

2. FindTieredRemnants split remnants at the obstacle envelope boundary,
   and both pieces could fall below minDimension even though the original
   remnant passed the filter (e.g., 6.6" remnant split into 5.35" + 1.25"
   with minDim=5.38"). Added fallback to keep the original unsplit.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 20:03:23 -04:00
51b482aefb test: add RemnantFinder edge cases and FillScore comparison tests
RemnantFinder: obstacle clipping, overlapping obstacles, iterative
workflow, grid pattern, no-overlap invariant, constructor/AddObstacles.
FillScore: count-vs-density ordering, operators, Compute edge cases.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 13:02:15 -04:00
f5ab070453 test: add RemnantFinder tests (red) 2026-03-16 12:44:53 -04:00