< Automatic Nesting Library - ArtLogic
ArtLogic - Automatic Nesting

Automatic Nesting Library

This library nests one or more parts defined in DXF files.
The resulting layouts can be exported as command files (HPGL, GPGL, DXF, ALN, etc.) for laser, knife, and waterjet cutting machines.
All APIs are available as Web APIs or Python class methods.
The complete source code, including the library, Web APIs, and Python classes, is available.

Features

(1) Automatic Single-Part Nesting

Arranges copies of a single part efficiently on a rectangular material sheet, using pairing and rotation to maximize material utilization.
Note: Multi-part nesting also supports irregularly shaped material sheets.
Ten built-in nesting strategies are available. Up to five user-defined nesting strategies can be created and selected.
Automatically selects the strategy with the highest material utilization from up to 15 strategies: ten built-in and five user-defined.
Selects the rotation angle yielding the highest material utilization under rotation limits of ±0°, ±1°, ±5°, or unrestricted rotation.

Original state
Original state
Minimum bounding rectangle with ±180° rotation
Result of calculating the minimum-area bounding rectangle. Rotation in increments of 1°, 15°, or 90°, and horizontal or vertical flipping.
Manual rotation-angle specification is also supported.
Automatic rotation to the minimum bounding rectangle; this may involve a 90°, 180°, or 270° rotation.
Full ±180° rotation, all strategies, maximum part count
Automatically selects the angle that fits the largest number of parts over the full ±180° rotation range.
Selects the nesting strategy with the highest material utilization from all available strategies.
Layout maximizing the number of parts
Maximum-count layout: 154 parts placed.
Full ±180° rotation, all strategies, minimum pair area
Automatically selects the rotation angle that minimizes the paired-part area over the full ±180° range.
Minimizes the area occupied by a pair of left- and right-hand parts, such as shoe or glove patterns.
Layout with minimum pair area
Minimum-pair-area layout: 147 parts placed, with the smallest pair area.
±5° rotation, all strategies
When material patterns or grain direction matter, rotation can be restricted to ±0°, ±1°, or ±5°.
Selects the nesting strategy with the highest material utilization from all available strategies.
Layout using all strategies with ±5° rotation
Layout using all strategies with ±5° rotation: 144 parts placed.
Layout with a specified strategy and ±180° rotation
Layout using a specified strategy with ±180° rotation: 140 parts placed.

(2) Automatic Multi-Part Nesting

Specify the required quantity of each part; the system rotates and places the parts to maximize material utilization.
Supports nesting on irregularly shaped material sheets.
Placement priority can be set to bottom-first or uniform distribution.

Material-utilization evaluation and placement order (search algorithm)

Material-utilization evaluation

The radio-button options are explained below.
For all options, a smaller strip width used in area calculations improves accuracy.
With the bottom-edge weight set to 1.0, the top-edge weight can be set from 1.0 to 10.0. Higher values tend to pack parts more tightly toward the bottom.
  1. Maximize free area
  2. A larger free area is rated as better material utilization.
  3. Maximize total part area / occupied area
  4. A higher ratio of total part area to occupied area is rated as better utilization; denser packing scores higher.
  5. Maximize free area (greater weight for free space near the top)
  6. A larger free area is rated as better utilization. Free space near the top is weighted more heavily, encouraging parts to pack toward the bottom.
  7. Maximize total part area / occupied area (greater weight for free space near the top)
  8. A higher ratio of total part area to occupied area is rated as better utilization. Denser packing scores higher; weighting free space near the top encourages parts to pack toward the bottom.

Placement Order 1 and Placement Order 2

Placement Order 2 is explained first. “Small → Large” places smaller parts first; “Large → Small” places larger parts first.
Placement Order 2 alone may not achieve high utilization. Setting Placement Order 1 to “Variable Order” allows limited reordering of nearby parts in the sequence.
With “Variable Order,” a larger part may be placed before a smaller one even when “Small → Large” is selected.
The library lets you adjust the permitted reordering range, but this GUI fixes it to one or two positions before or after the original position.

Placement Order 1 and Placement Order 2

Example GUI for automatic nesting parameters
Example GUI for automatic nesting parameters
Automatic nesting of 26 parts
Automatic nesting of 26 parts
Calculation completed in 3.3 seconds on a typical business laptop.

(3) Common Specifications

Common specifications

  1. Maximum placement resolution is 1/40,000 of the material sheet size.
  2. For a 1 m sheet: 25 micrometers (25 µm).
    For a 10 m sheet: 250 micrometers (250 µm).
  3. Single-part automatic nesting takes 0.01 to 0.5 seconds.
  4. For multi-part nesting, typical computation time scales approximately with the square of the number of parts (in seconds); in the worst case, about 0.1 × (number of parts)³ seconds.
  5. These are approximate estimates and depend on part complexity and other factors.
    For 10 parts: approximately 10–100 seconds; 20 parts: 40–800 seconds; 30 parts: 90–2,700 seconds.
  6. The resulting layout is an approximate optimum, not an analytically exact optimum.
  7. This is due to pruning and sparse search (at 1/40,000 of the sheet size resolution).
The following features are shared by single-part and multi-part automatic nesting.
  1. Specify the gap (minimum distance between parts).
  2. Supports output from raster-to-vector conversion (including the Web application).
  3.    Camera-captured images can also be used.
  4. Manual placement assistance
    • Slide fit: slide a part into an available gap.
    • After sliding, the part can also be moved along the boundary.
    • Retrieve part outlines and gap-offset outlines.
    • Check for overlapping parts.
  5. Export command files for CAD/NC machines in DXF, GPGL, HPGL, Gabar, ALN, and other formats.
  6. If a part contains holes, cut the holes first. If another part is nested inside a hole, cut the inner part first.

Gap 2mm
Gap 2mm
Gap 20mm
Gap 20mm
Gap -10mm
Gap -10mm
Negative gap values can also be specified.
Camera image correction: before projective transformation
Camera image correction: before projective transformation
Camera image correction: after projective transformation
Camera image correction: after projective transformation
Camera image correction: before multipoint correction; specifying the fifth control point
Camera image correction: before multipoint correction; specifying the fifth control point
Camera image correction: after five-point correction
Camera image correction: after five-point correction
Slide fit
Slide fit

(4) Planned Future Enhancements

The following enhancements are planned. Details may change in response to user requests.

  1. Incremental placement in single-part automatic nesting
  2. Place additional parts on a sheet where some parts have already been placed manually or automatically.
  3. Additional placement priorities for multi-part nesting (top, left, right, and perimeter-first, in addition to bottom-first and uniform placement)
  4. On very large sheets (e.g., 10 m × 10 m), parts cut near the center may be difficult to reach.
    Cutting from the perimeter inward makes the cut parts easier to handle.