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.
The Nesting process works with 2d drawings without bending lines.
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: