Nesting

Rectangular Nesting

Nesting MaxRects Best Fit

  • Rectangular Nesting

  • True Shape Nesting

Nesting MaxRects Best Fit

NestingMaxRectsBestFit is a rectangle nesting algorithm used to place multiple rectangular shapes into a larger container while minimizing wasted space. It works by tracking the largest available free rectangles in the container and placing each new item in the position where it best fits according to a chosen heuristic (usually minimal leftover space).

Details

ID

nesting-rectangular-nesting-nesting-maxrects-best-fit

Name

Nesting MaxRects Best Fit

Group

Rectangular Nesting

Package

Nesting

Keywords

nest
nesting
maxrects
max
rects
best
fit
bssf

Input ports

NameTypeDescriptionDefault Value
Origin
Vector
Origin[0,0,0]
Geometries
Geometry
List of geometries to be nested
Sheet Width
Number
Width of the sheet used for nesting500
Sheet Height
Number
Height of the sheet used for nesting500
SheetsGap
Number
Spacing between sheets10
Edge Clearance
Number
Distance from the edges of the sheet to the curves/surfaces to be nested0
Spacing
Number
Distance between curves0

Output ports

NameTypeDescription
Sheets
Curve
Sheet boundary curves. Flat array of rectangular curves representing each sheet used in the nesting.
Geometries
Geometry
Nested geometries in their final positions. Flat array of all geometries in the order they appear across all sheets.
Move Vectors
Vector
Translation vectors for each input geometry. Array aligned with input geometries showing movement from original position. Unplaced geometries have zero vectors.
Rotation Angles
Number
Rotation angles in radians for each input geometry. Array aligned with input geometries showing rotation applied. Unplaced geometries have zero rotation.
Sheet IDs
Number
Sheet index for each input geometry. Array aligned with input geometries showing which sheet each geometry is placed on. Unplaced geometries have value -1.
Geo IDs
Number
Original input geometry indices. Flat array showing which input geometry corresponds to each nested geometry.