NFP Nesting (Medium / Max)
At a glance
- No-Fit Polygon (NFP) orbiting — computes the exact feasible region where each part can be placed without overlapping
- Genetic Algorithm optimizer — evolves part ordering and rotation angles across generations
- Concave part support — handles non-convex outlines accurately
- Hole filling — smaller parts nest inside the holes of larger ones
- Medium: 4 rotation candidates — typically seconds on a working sheet
- Max: 12 rotation candidates on a finer grid — the deepest search for odd-angled profiles
- Gravity heuristic packs toward the origin, minimizing sheet usage
- Runs in a background thread — UI stays responsive during nesting
Medium and Max run the genetic nesting engine — the shape-aware solver for irregular parts. Instead of stacking bounding boxes, it evolves part orderings and rotations while walking the edges of the sheet and of every part already placed, generating candidate positions that hug real geometry. The solver runs in a background worker: the canvas stays responsive and parts drop onto the sheet one by one as they're committed.
Two passes
Pass one fits smaller parts into the holes of larger ones — a ring's center becomes free real estate, and parts grouped into a host hole move with that host for the rest of the nest. Pass two places everything else by walking the usable sheet boundary and the outlines of placed parts, scoring each candidate position and rotation to favor the nesting start corner (low and left by default, following the sheet origin), then committing the first candidate that passes collision. Obstacles grow as parts land, so later parts wrap around earlier ones.
Medium vs Max
Medium tries four rotations per part (0°, 90°, 180°, 270°) on a coarser candidate grid — the faster pick for parts whose good orientations are axis-aligned. Max tries twelve rotations (every 30°) on a finer grid with a longer time budget, and is where odd-angled profiles earn back real material. Both respect kerf-based spacing, locked parts as fixed obstacles, and sheet overflow exactly as described in Nesting Controls.
Concave parts
Collision uses a per-part placement proxy. Outlines under the Concavity threshold (default 32 vertices) keep their tessellated shape, so an L-bracket's notch is genuinely available for another part to nest into. Denser outlines simplify to a convex hull, and very dense convex shapes — gears, sprockets, finely tessellated circles — are capped by a 24-direction tangent polygon that hugs the silhouette with under 1% radial slack, below a typical kerf. Custom efforts can raise the threshold to preserve more concavity (tighter, slower) or drop it toward zero for speed.