Hide menu
Loading...
Searching...
No Matches
Nesting Process

Overview

In manufacturing, the nesting process arranges patterns on flat materials, such as sheet metal, glass, wood, or plastic, to maximize material usage and minimize waste. This approach is widely used to reduce scrap and costs by creating efficient layouts on large sheets. The process uses a genetic algorithm to explore and optimize various layout possibilities, selecting configurations of patterns on sheet that minimize material usage and maximize space efficiency. The output of this process is Nesting_Data, representing the optimized patterns arrangement.

Scope of Accepted Geometries

The Nesting process works with 2d drawings without bending lines.

API Overview

The main class to start the nesting process is Nesting_Computer, responsible for calculating layouts based on specified parameters and material properties. In general, each material is represented as a rectangle defined by width and heights. If there isn't enough space on one material, the algorithm will search for space on other available materials.

Each pattern to be nested is added to the computer as a Drawing::View .

Once the parameters, materials, and patterns are defined, call the Nesting_Computer.Perform() method to generate Nesting_Data, a optimal arrangement of patterns across the materials. This Nesting_Data can be converted into a Drawing::Drawing for further processing. See Nesting Example.

The example of starting the nesting process is provided below:

// Creating a Nesting_Computer instance
Nesting_Computer aComputer;
// Configuring nesting parameters
Nesting_ComputerParameters aParams;
aParams.SetIterationCount(10); // Number of iterations for optimization; higher values improve results.
aParams.SetGenerationSize(10); // Initial count of random patterns; larger values may improve optimization.
aComputer.SetParameters(aParams);
// Define material size and quantity (e.g., 5 sheets of 100x100 mm)
aComputer.AddMaterial(100.0, 100.0, 5);
// Loading 3 patterns into the computer
Drawing::View aPattern = ...
aComputer.AddPattern(aPattern, 3);
// Start the Nesting process
Nesting_Data aData = aComputer.Perform();
// Convert nesting data to drawings
Drawing::Drawing aDrawing = aData.ToDrawing();