Nesting Components

Components for packing flat parts onto stock sheets

Nest Parts (Nest)#

Nests flat parts onto stock sheets with minimal waste. Parts pack against their true outlines (concave shapes interlock), keep a gap between each other, and rotate in fixed steps. Parts of different material or thickness go onto separate sheets. When parts don't fit on one sheet, more sheets are opened. Parts that fit on no sheet are listed on Unplaced.

Nesting decides where each part sits on which sheet. You give it flat parts and the stock you have; it returns a transform per part that you can use to move the real geometry.

Gap and margin on a nested sheet
Gap and margin on a nested sheet

Parts pack against their true outlines, not their bounding boxes, so an L-shape nests into the notch of another L-shape. Two spacings control the packing: the Gap between neighbouring outlines, and the Margin inset from the sheet edge. Leave Gap unset and it is derived from the material thickness.

Parts of different material or thickness never share a sheet. They are split into groups and nested separately, so a 2 mm part can never land on a 3 mm sheet.

Inputs#

NameNickTypeAccessDefaultDescription
Unroll ResultURGenerictreeParts to nest: Unroll Results (from the Unroller component) or closed planar curves in the XY plane. Each curve is one part without holes, and has no thickness, so it only goes onto stock with Thickness 0. A tree is nested as one job, not one job per branch: every part shares the same stock, and the branch a part came in on is reported back on Part Path.
StockSGenerictreeThe sheets you can cut from. Use Sheet Stock to describe each one with its size, thickness, count and remnant flag; a plain rectangle also works and is treated as unlimited stock of any thickness and material.
QuantitiesQIntegertreeHow many copies of each part to place. One value per part, or a single value for all. Matched to Unroll Result in flattened order; a shorter list repeats its last value. Leave unset to use the Quantity set with Sheet Properties (1 if none is set).
GapGNumberitemGap between part outlines, in document units. Leave unset for an automatic gap of 1.2 x thickness, at least 2 mm. A Spacing set with Sheet Properties wins over this value.
MarginMNumberitemUnusable border along the sheet edge, in document units. Leave unset to use the Gap value. A Margin set on Sheet Stock wins over this value.
Rotation StepsRSIntegeritem8Number of rotation steps to try per part, spread evenly over 360°: 8 = 45° steps (default), 4 = 90° steps, 1 = no rotation.
Rotation OffsetRONumberitem0Angle in degrees added to every rotation step, so parts sit the way you want them rather than however the nester found them. Set Rotation Steps to 1 and this to 90 to pin every part at 90°. Angles are measured from the part's straightened pose (its tightest bounding box squared to the sheet), not from its incoming orientation (default 0).
Min Hole AreaMHANumberitemHoles smaller than this area, in square document units, are left out of the part area used for sorting and yield. They are still cut. Larger values can speed up parts with many small holes. Parts are never nested inside holes. Leave unset for 100 mm², converted to document units.
OptimizeOptBooleanitemfalseDeep optimize: keeps trying other part orders and rotations until the Time Budget runs out, and keeps the best layout. Better yield, slower. Off = one quick pass (default).
Time BudgetTBNumberitem10Time for deep optimization in seconds (default 10, minimum 0.5). Spent once per material and thickness group, or once per part when Separate Parts is on, so the total can be longer. Ignored when Optimize is off.
Separate PartsSepBooleanitemfalseKeep each part type on its own sheets: copies of a part may share a sheet, but two different parts never do. Easier sorting at the machine, lower yield (default false).
Respect GrainRGBooleanitemfalseLay each Unroll Result with its grain along the stock grain, which runs along X (the sheet width). The part may still turn 180°. Rotation Steps and Rotation Offset are ignored for these parts. Closed curves have no grain and rotate as usual (default false).
Allow FlipAFBooleanitemfalseAlso try each part mirrored, which can fit more on a sheet. A mirrored part is cut face down, so leave this off for brushed, film-coated or otherwise one-sided stock. Parts with a different finish on each side (set on Sheet Properties) are never mirrored (default false).

Outputs#

NameNickTypeAccessDefaultDescription
OutlinesOCurvetreePlaced part curves in the preview layout. Each part comes back on the path it went in on, with one extra level for the copy: a part at {0;3} wanted three times comes back as {0;3;0}, {0;3;1} and {0;3;2}. The first curve in a branch is the silhouette, the rest are its holes. Transform and On Sheet share these paths.
Sheet FramesFRectangletreeThe outline of every sheet used, in the same preview layout. One branch per sheet, at path {sheet}. Use the On Sheet output to tell which parts are on which.
TransformXTransformtreeThe transform that takes each part from its incoming position to its placed position, on the same path as Outlines. Feed it and your own geometry into Transform to move anything the outlines leave behind: a solid, a marking line drawn on the flat, drill points, tags. For Orient, transform a World XY plane by it.
On SheetOSIntegertreeWhich sheet each placed copy landed on, on the same path as Outlines. The number is the branch index of Sheet Frames, so this is the map from your parts to the sheets they were nested onto.
InfoITextitemJob summary: sheets used, yield, and a line per sheet with its size, material, thickness, part count and yield, then any parts not placed.
UnplacedUTextlistParts that could not be placed, with the reason. Empty when everything fits.
ResultResGenericitemThe full nesting result (sheets, placements, part curves, sheet size and thickness), in each sheet's own coordinates with its lower-left corner at the origin. For downstream CNC or machine-file tools.

Tracking parts through the nest#

The nester rearranges your parts, but the outputs come back on the paths you sent in. A part at {0;3} comes back at {0;3;0}, with one extra level for the copy.

OutputPathWhat one branch holds
Outlines (O){your path; copy}The silhouette first, then that part's holes
Transform (X){your path; copy}One transform
On Sheet (OS){your path; copy}One integer: the sheet it landed on
Sheet Frames (F){sheet}One rectangle

So a tree of parts in gives the same tree out. No lookup, no index to match up: whatever you fed into branch {2;7} comes back under {2;7}.


Parts in          Outlines out
  {0;0}      ->     {0;0;0}
  {0;1}      ->     {0;1;0}
  ...               ...
  {2;8}      ->     {2;8;0}

The extra level is the copy number. Ask for one of each and every branch ends in ;0; ask for three of the part at {0;3} and you get {0;3;0}, {0;3;1}, {0;3;2}.

#### Which sheet did it land on

On Sheet (OS) is the map. It sits on the same paths as everything else and gives the index of the sheet each copy went onto, matching the branch order of Sheet Frames.

To pull out everything on sheet 2, cull by that value rather than by path. To count parts per sheet, group by it.

Sheet number is deliberately *not* a path level. Keying the output by sheet would produce paths like {2;7} that look exactly like your input tree but mean something completely different, and wiring the two together would silently pair up the wrong parts.

#### Moving more than the outlines

Outlines (O) only gives you curves. When you have something else that belongs on the part, a marking line you drew on the flat pattern, drill points, the 3D solid, use Transform (X):


[your line on the flat] ──┐
                          ├─→ (Transform) ─→ it lands on the nested part
[Nest] Transform (X) ─────┘

Because Transform comes back on your own paths, a line you made for the part at {0;3} matches the transform at {0;3;0} directly.

For Orient, transform a World XY plane by it: the plane and the transform describe the same move.

Mixed thicknesses on one job#

Parts of different thickness are never nested onto the same sheet. They are split into groups by material and thickness, and each group gets its own sheets.

For that to be counted correctly, the nester has to know what thickness each stock sheet carries. Set Thickness on each Sheet Stock:


[Sheet Stock]  2500x1250  t=2  Q=10   ─┐
                                      ├─→ Stock ─→ [Nest Parts]
[Sheet Stock]  2000x1000  t=3  Q=4    ─┘

Leave Thickness at 0 and that sheet serves any thickness. That is what you want for a single-thickness job, but on a mixed job all thicknesses draw from the same 10 sheets, so the thickness nested first can use them all up. The nester warns when it spots that combination.

Thickness comes from the parts automatically when they arrive as Unroll Results, so you normally only set it on the stock side. Closed curves carry no thickness, so they only go onto stock with Thickness 0.

Material works the same way. Set it on the part with Sheet Properties and on the stock with Material, spelled the same on both (capitals do not matter). Stock with no Material serves any part. A part with no Material only goes onto such stock.

To see which sheet is which, read the label under each sheet in the viewport, or take the per-sheet lines from Info (I).

Remnants: using up your offcuts#

Stock sheets versus remnants
Stock sheets versus remnants

A remnant is scrap you already have, rather than fresh stock you would buy. Mark a sheet size as a remnant and it gets used before any standard stock, so odd offcuts leave the rack instead of sitting there.

This matters most when an offcut is *larger* than a standard sheet. Without the remnant flag, the nester opens the smaller standard sheet first and your big offcut never gets touched.

Set Remnant on the Sheet Stock for that sheet. It travels with the sheet, so it cannot end up describing a different size.

A worked stock list#

Say you buy 2500 × 1250 sheets, and you have two offcuts left from an earlier job.

Sheet StockSizeQuantityRemnant
standard stock2500×12500false
offcut1200×7001true
offcut800×5601true

0 means unlimited, which is what you want for stock you can reorder. The offcuts are capped at 1 because you only own one of each. The nester fills both offcuts first, then opens as many 2500 × 1250 sheets as the job needs.

Quick mode and deep optimize#

Quick mode versus deep optimize
Quick mode versus deep optimize

By default the nester runs a single greedy pass and returns immediately. Switch Optimize on and it searches part order and rotations with a genetic algorithm until the Time Budget runs out, which usually buys a noticeably better yield.

The budget is spent *per material and thickness group*, not for the whole job. Four different materials at a 10 second budget is up to 40 seconds of solving. With Separate Parts on, it is spent once per part. Yield climbs steeply at first and then flattens, so raising the budget far past the default rarely pays for itself.

Reading the Unplaced output#

Unplaced (U) is empty when everything fits. Any entry means a part never made it onto a sheet, with the reason:

  • No stock with this material and thickness. No Sheet Stock matches the part. Check Material and Thickness on both sides.
  • Larger than every matching sheet. Check that Gap and Margin have not eaten the clearance a just-barely-fitting part needed.
  • Stock exhausted. The part fits, but every matching sheet hit its Quantity. Raise a Quantity, or set one to 0 for unlimited.
Always check this output before sending a job to the machine. The Info (I) output gives the job summary alongside it: sheets used, yield, and unplaced count.

Tips#

  • Rotation Steps: more steps can raise yield. 8 (45° steps) is the default, 4 gives 90° steps, and 1 disables rotation.
  • Respect Grain lines up each Unroll Result's grain with the stock's X axis, turning it only 0° or 180°. The grain runs across the bend lines, unless you set it with Grain on Sheet Properties.
  • Allow Flip lets the nester mirror parts. It is off by default, because a mirrored part is cut face down. Parts with a different finish on each side (set on Sheet Properties) are never mirrored.
  • Min Hole Area speeds up parts with many small holes. Holes below it are left out of the area used for sorting and yield, but they are still cut. Parts are never placed inside holes.
  • Separate Parts keeps each part type on its own sheets. Sorting at the machine gets much easier, at the cost of yield.
  • The Result (Res) output carries the full nesting result in true sheet-local coordinates, which is what you want for CNC and machine-file tooling. The Outlines and Sheet Frames outputs are laid out side by side for preview only.

Sheet Stock (Stock)#

Describes one sheet you can cut from: its size, how thick it is, how many you have, and whether it is an offcut. Feed several into Nest Parts to describe a whole rack.

Inputs#

NameNickTypeAccessDefaultDescription
ShapeSGenericitemThe sheet, as a rectangle or a closed curve. A curve lets you describe an offcut with its real outline. Note that parts are currently packed inside the shape's bounding box, so a concave offcut is treated as the rectangle around it.
ThicknessTNumberitem0How thick this stock is, in document units. Parts are only nested onto stock of their own thickness. 0 (default) means the stock serves any thickness.
MaterialMTextitemWhat this stock is made of, for example "S235". Parts are only nested onto stock of their own material, spelled the same (capitals do not matter). Leave empty for stock that serves any material.
QuantityQIntegeritem0How many sheets of this kind you have. 0 or less means as many as needed (default), which is what you want for stock you can reorder.
RemnantRBooleanitemfalseMarks this as a leftover offcut you already have, rather than fresh stock. When a new sheet is needed, remnants are tried before standard stock, so offcuts leave the rack instead of sitting there (default false).
MarginMgNumberitemUnusable border along this sheet's edge, in document units, if it differs from the Margin on Nest Parts. Leave unset to use that value.

Outputs#

NameNickTypeAccessDefaultDescription
StockSSheetStockitemOne stock sheet, ready for the Stock input of Nest Parts.
VektorNode
Legal
Address