A slice-based three-dimensional nesting method

By using a slice-based 3D nesting method, the optimal placement and orientation of parts are determined by utilizing slice contour data and Minkowski sum operations. This solves the problem of low efficiency in existing 3D nesting methods and achieves efficient part nesting and space utilization.

CN117494873BActive Publication Date: 2025-11-04ZHEJIANG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311343307.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-17
Publication Date
2025-11-04
Estimated Expiration
2043-10-17

AI Technical Summary

Technical Problem

Existing 3D irregular layout algorithms are time-consuming when dealing with dense and overlapping layouts in the z-direction of parts, and complex 3D layout methods are inefficient in scenarios such as laser sintering, lacking efficient layout methods.

Method used

A slice-based 3D nesting method is adopted. By setting the size and rotation angle of the mother plate, the parts are placed using the slice contour data. Minkowski calculations and Boolean subtraction operations are performed to determine the optimal placement position and orientation, and the part nesting is completed step by step.

Benefits of technology

It improves nesting efficiency, reduces labor costs, and can handle automatic and rapid nesting of complex parts. It has clear logic and good robustness, and is suitable for scenarios where parts do not stack in the z-direction, such as laser sintering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure QLYQS_2
    Figure QLYQS_2
  • Figure QLYQS_14
    Figure QLYQS_14
  • Figure HDA0004497948720000011
    Figure HDA0004497948720000011
Patent Text Reader

Abstract

The application provides a kind of three-dimensional layout method based on slice, comprising: first, the STL model of the part to be arranged is sliced;Set related parameters, calculate model envelope box, move the model to the origin;With new input unlayout part as the current part, determine the current part multiple postures;Respectively, the Minkowski sum of the current part and the mother plate and the laid-out part under each posture is calculated, and the feasible region is obtained by Boolean subtraction operation;Traverse the contour points of the feasible region under all postures of the current part, find the placement position and posture that make the evaluation value minimum, arrange the current part and add it to the laid-out part;Repeat the above steps until all parts have been laid out.The three-dimensional layout method of the application is simple and easy to use, and can flexibly control the layout accuracy and algorithm running efficiency by controlling the slice height according to the complexity of the parts to be arranged, with high stability and can be used for secondary development of slicing software.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer-aided manufacturing (CAM) technology, specifically relating to a three-dimensional nesting method based on slices. Background Technology

[0002] Layout design refers to arranging parts within a given space so that they do not overlap and achieve high space utilization. Computer-aided layout methods can improve efficiency, increase material utilization, avoid human error, and reduce production and labor costs. Therefore, they have broad application prospects in fields such as apparel, sheet metal processing, laser cutting, shipbuilding, and laser sintering.

[0003] 3D nesting is a type of nesting problem used for nesting in three-dimensional space. While regular 3D nesting algorithms are relatively mature in academia, irregular 3D nesting algorithms still have significant room for development. Existing irregular 3D nesting algorithms, such as pixel-based methods and heuristic algorithms, are proposed for problems like box packing and ship / spacecraft cabin layout design. However, these methods often result in denser placement of parts in the z-direction, leading to high overhead and time-consuming overlap detection algorithms. In some 3D nesting scenarios, such as laser sintering, the number of points on the model surface is extremely large, and the parts to be nested do not stack in the z-direction. Using existing, complex 3D nesting methods consumes excessive performance and reduces nesting efficiency. Currently, there is a lack of efficient nesting methods suitable for such scenarios. Summary of the Invention

[0004] To address the problems existing in the prior art, this invention provides a 3D nesting method based on slices. This method is suitable for nesting 3D parts on a plane, improving nesting efficiency. Nesting can be completed using slice contour data, and the utilization rate of nesting space is maximized. Furthermore, this nesting method has clear steps, logical consistency, and good robustness.

[0005] A 3D nesting method based on slices includes the following steps:

[0006] (1) Set the motherboard size, layout interval, offset ratio, position parameters, rotation angle and slice layer height, and make the geometric center of the motherboard located at the origin. Calculate the envelope of each part to be arranged and move the part to be arranged to the origin.

[0007] (2) Slice all the parts to be arranged to obtain the slice contour data;

[0008] (3) Take the newly input unpatched part as the current part and determine the various postures of the part according to the rotation angle;

[0009] (4) Calculate the Minkowski sums of the current part, the motherboard, and the arranged parts under any untraversed posture, and perform a Boolean subtraction operation on the two obtained Minkowski sums to obtain the feasible region under the untraversed posture.

[0010] Repeat this step to obtain the feasible region for each pose;

[0011] (5) Traverse all the contour points of the feasible region corresponding to the poses, and take the contour point with the smallest evaluation value as the optimal placement position of the current part, and the pose corresponding to the contour point as the best placement pose of the current part.

[0012] (6) Move the current part to the optimal placement position and rotate it to the optimal placement posture to complete the layout of the current part and add it to the already arranged parts;

[0013] (7) Repeat steps (3) to (6) until all parts to be arranged are laid out.

[0014] In step (1) above, the motherboard is generally a regular shape such as a rectangle or a circle. The layout interval is expressed as d. gap The offset ratio is represented by ampliifyRatio; the position parameter is represented by bottomRate; and the rotation angle is represented by θ0.

[0015] Calculating the envelope box of each part to be arranged means calculating the AABB3D envelope box of the STL model of each part to be arranged. The model envelope box is a rectangular envelope box parallel to the aabb axes. The minimum point (X) of the envelope box can be obtained by traversing the point set of the STL facets of the model. min Y min Z min ) and the maximum point (X) max Y max Z max The model is composed of a parallel envelope box AABB3D. The parts to be arranged are moved to the origin, i.e., the model is translated (-(X...)). max +X min ) / 2, -(Y max +Y min ) / 2,-z).

[0016] In step (2) above, the parts to be arranged are sliced, that is, their STL models are input into the slicing software to slice them, and then the slice contour data is obtained.

[0017] Preferably, in step (3), multiple postures are determined by rotating the part around the z-axis, and the rotation angle of the i-th posture is (i-1)*θ0; where i∈[1,360 / θ0], and i is an integer; θ0 is the rotation angle. The rotation of the part is achieved by multiplying each point of the surface of the part's STL model by the rotation matrix, which is a basic operation and will not be described in detail.

[0018] As a preferred option, the specific steps for calculating Minkowski and Mks1 for the current part and the motherboard in step (4) are as follows:

[0019] 1) Perform Boolean merging on the slice contours of each layer of the current part to obtain the merged contour;

[0020] 2) Find the Minkowski and Mks1 of the merged profile to the mother profile.

[0021] As a further preferred option, in step 1), the clipper library is used for Boolean operations. The clipper library is an open-source graphics processing library that provides offset operations and Boolean operations for complex polygons, offering good stability and high efficiency. All contour processing objects in the clipper library are of type Path, which is a two-dimensional polyline. In this invention, contour segments must be converted to Path type before using clipper. During the Boolean union process, the input contour can be divided into Clip and Subject types. In the union process, the two are equivalent, and the result is the sum of the regions of the two.

[0022] Since the parts to be arranged must be located inside the master template, the presence of inner holes in the part slice outline can be ignored. As a further preferred option, in step 1), a non-zero wrapping number rule is used to perform Boolean merging on the slice outlines of each layer of the current part, thereby filtering out inner holes.

[0023] As a preferred option, the specific steps for calculating the Minkowski coefficient and Mks2 for the current part and the already arranged parts in step (4) are as follows:

[0024] 1) Calculate the minimum number of common slice layers N min The calculation method is as follows:

[0025] N min =min{N1,N2}

[0026] Where N1 is the number of slice layers for the current part, and N2 is the maximum number of slice layers for the already arranged parts;

[0027] 2) Create a new N min CombLayers, a layer slice contour data, iterates through all arranged parts from layer 1 to layer N. min The slice outline of the layer is saved to the slice outline data of the corresponding layer in CombLayers for non-empty slice outlines.

[0028] 3) Traverse all slice contours in each layer of CombLayers, offset each slice contour outward, perform Boolean merging on the offset contours of each layer to obtain the merged contour; offset the merged contour inward to obtain the contour CombContours.

[0029] 4) Traverse the current part and layers 1 to N in the CombLayers. min For any untraversed slice layer, the x and y coordinates of the slice contour points of the current part are negative, and the Minkowski sum of the negative slice contour with the CombContours in CombLayers is obtained to obtain the feasible region of the untraversed slice layer.

[0030] Repeat this step to obtain parts 1 through N of the current part. min Feasible region of layer slices;

[0031] 5) Using the non-zero wrapping number rule, for the current part, the 1st to Nth wrapping numbers are... min The feasible regions of the layer slices are Boolean merged to obtain the Minkowski and Mks2 of the current part and the already arranged parts.

[0032] As a further preferred embodiment, in step 3), the outward offset distance for each slice contour is ampliifyRatio*d. gap The inward offset distance for the merged contour is (amplifyRatio-1)*d. gap ;

[0033] Where amplifyRatio represents the bias ratio; d gap This indicates the nesting interval. During the contour offset process, the clipper offsets the contour according to the given offset distance. When the given offset distance is positive, it offsets outward, and when the offset distance is negative, it offsets inward.

[0034] As a further preferred option, in step 3), the clipper library is used to perform an offset operation on the contour.

[0035] As a further preferred option, in step 4), since the clipper library only provides a method for solving the Minkowski sum of a single contour to multiple contours, the following method can be used to calculate the Minkowski sum of multiple contours to multiple contours:

[0036] For any slice layer, the x and y coordinate values ​​of the contour points of multiple slice contours of the current part are negative, and the Minkowski sum of each slice contour with respect to CombContours after negation is solved in turn to obtain the temporary feasible region of each slice contour.

[0037] Perform a Boolean merge on the temporary feasible regions of all slice contours within the slice layer to obtain the feasible region of the current part for the arranged parts in the slice layer.

[0038] As a preferred option, in step (4), the Clipper library is used to calculate Minkowski sums.

[0039] Preferably, in step (5), the formula for calculating the evaluation value Val is:

[0040] Val=point.X*(1-bottomRate)+point.Y*bottomRate

[0041] Where X and Y represent the two coordinates of the contour point, and bottomRate is the position parameter.

[0042] The 3D nesting method based on slicing of the present invention includes the following steps: inputting the STL models of all parts to be nested into slicing software to obtain the model slice contour data; setting the mother plate size and the nesting interval d. gap The method involves setting the offset ratio (amplifyRatio), position parameter (bottomRate), and rotation angle (θ0), determining the slice layer height, calculating the model envelope box (AABB3D), moving the model to the origin, and ensuring the geometric center of the mother plate is at the origin. A newly input, un-scrambled part is selected as the current part. Multiple poses of the current part are determined based on θ0. For each pose, the Minkowski coefficients (Mks1) with the mother plate and the Minkowski coefficients (Mks2) with the already-scrambled parts are calculated. Boolean subtraction is performed on Mks1 and Mks2 to obtain the feasible region Ars. The contour points of Ars under all poses of the parts to be sorted are traversed to find the placement position and optimal placement pose that minimizes the evaluation value Val. These steps are repeated until all parts are sorted. This method is logically simple and easy to use. Depending on the complexity of the parts to be sorted, the sorting accuracy and algorithm efficiency can be flexibly controlled by adjusting the slice height. It exhibits high stability and can be used for secondary development of slicing software.

[0043] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0044] (1) The three-dimensional nesting method based on slices of the present invention can complete the nesting with the help of slice contour data. The data is easy to obtain and the output results are simple. It can be used for secondary development of slicing software.

[0045] (2) The three-dimensional nesting method based on slices of the present invention can be used in three-dimensional nesting scenarios where parts are not stacked in the z direction, such as automatic and rapid nesting of laser sintered parts, reducing the cost of manual nesting.

[0046] (3) The three-dimensional nesting method based on slices of the present invention can flexibly control the nesting accuracy and algorithm running efficiency by controlling the slice height, depending on the complexity of the parts to be nested.

[0047] (4) The 3D nesting method based on slices in this invention has high computational efficiency and can handle nesting problems of parts with complex surfaces. The algorithm steps are clear, the logic is clear, and the robustness is good. Attached Figure Description

[0048] Figure 1 This is a flowchart of a slice-based three-dimensional nesting method according to an embodiment of the present invention;

[0049] Figure 2 Here are the structural diagrams of various parts to be arranged in the application example;

[0050] Figure 3 This is a top view of the layout results in the application example;

[0051] Figure 4 This is a 3D view of the layout results in an application example. Detailed Implementation

[0052] The present invention is described below with reference to the accompanying drawings and preferred embodiments. It should be understood that the specific embodiments described herein are only for explaining the present invention, and the present invention is not limited to the specific embodiments.

[0053] like Figure 1 As shown, a three-dimensional nesting method based on slices is implemented in the following steps:

[0054] Step 1: Set the motherboard dimensions and the layout interval d gap Set the offset ratio (amplifyRatio), position parameter (bottomRate), rotation angle (θ0), and slice layer height. Calculate the STL model envelope box (AABB3D) of all parts to be arranged, and move the model to the origin, so that the geometric center of the mother plate is located at the origin.

[0055] The model's envelope is a rectangular envelope parallel to the aabb axes. The minimum point (X) of the envelope can be obtained by traversing the STL patch point set of the model. min Y min Z min ) and the maximum point (X) max Y max Z max The model is constructed by creating a parallel envelope box (AABB3D) along its axes. Then, the model is translated by (-(X...)). max +X min ) / 2,

[0056] -(Y max +Y min ) / 2,-z), move to the origin.

[0057] Step 2: Input the STL models of all parts to be arranged into the slicing software to obtain the model slicing contour data.

[0058] Step 3: Using the newly input unpatched part as the current part, determine the various orientations of the part based on the rotation angle θ0;

[0059] The part is rotated around the z-axis to determine multiple postures. The rotation angle of the i-th posture is (i-1)*θ0, where i∈[1,360 / θ0] and i is an integer.

[0060] Part rotation is achieved by multiplying each point of the STL model facet of the part by a rotation matrix. This is a basic operation and will not be described in detail.

[0061] Step 4: Calculate the Minkowski coefficients and Mks1 and Mks2 of the current part, the motherboard, and the arranged parts under any untraversed orientation, and perform Boolean subtraction on Mks1 and Mks2 to obtain the feasible region Ars of the current part under the untraversed orientation.

[0062] In step four above, the specific steps for solving Mks1 are as follows:

[0063] (1) Using the clipper library, the non-zero wrapping number rule is used to perform Boolean merging on the slice contours of each layer of the current part to obtain the merged contour;

[0064] (2) Using the clipper library, calculate the Minkowski and Mks1 of the merged profile to the mother profile;

[0065] In step four above, the specific steps for solving Mks2 are as follows:

[0066] (1) Calculate the minimum common slice number N min The calculation method is as follows:

[0067] N min =min{N1,N2}

[0068] Where N1 is the number of slice layers of the parts to be arranged, and N2 is the maximum number of slice layers of the already arranged parts;

[0069] (2) Create N min CombLayers, a layer slice contour data, iterates through all arranged parts from the 1st to the Nth layer. min The slice outline of a layer is saved to the slice outline data of the corresponding layer in CombLayers if the slice outline of a certain layer is not empty.

[0070] (3) Traverse all slice contours within each slice layer of CombLayers, and use the clipper library to offset each slice contour by amplifyRatio*d. gap After setting the distance, perform a Boolean merge on the offset contours of each layer to obtain the merged contour; then offset the merged contour by -(amplifyRatio-1)*d. gap Distance yields the contours (CombContours);

[0071] The offset distance is set to positive to offset outwards, and negative to offset inwards.

[0072] (4) Traverse the current part and the first to Nth elements in the CombLayers. min For any untraversed slice layer, the x and y coordinates of the slice contour points of the current part are negative, and the Minkowski sum of the negative slice contour with the CombContours in CombLayers is obtained to obtain the feasible region of the untraversed slice layer of the current part.

[0073] Repeat this step to obtain parts 1 through N of the current part. min Feasible region of layer slices;

[0074] Since the clipper library only provides methods for solving the Minkowski sum of a single contour over multiple contours, the following method can be used to calculate the Minkowski sum of multiple contours over multiple contours:

[0075] For any slice layer, the x and y coordinate values ​​of the contour points of multiple slice contours of the current part are negative, and the Minkowski sum of each slice contour with respect to CombContours after negation is solved in turn to obtain the temporary feasible region of each slice contour.

[0076] Perform Boolean merging on the temporary feasible regions of all slice contours within the slice layer to obtain the feasible region ars of the current part for the arranged parts in the slice layer;

[0077] (5) Using the non-zero wrapping number rule, for the current part, the first to Nth wrapping numbers are... min The feasible regions ars of the layer slices are Boolean merged to obtain Mks2.

[0078] Step 5: Repeat Step 4 to obtain the Ars values ​​for all poses of the current part; iterate through the contour points of the Ars values ​​for all poses and find the contour point that minimizes the evaluation value Val. min and point min Corresponding to Ars min The current orientation θ of the part min , will point min As the optimal placement position, θ min As the optimal placement posture.

[0079] The calculation method for Val is as follows:

[0080] Val=point.X*(1-bottomRate)+point.Y*bottomRate

[0081] Where X and Y represent the two coordinates of the contour point.

[0082] Step 6: Translate the face and slice contours of the current part's STL model to the optimal placement position and rotate them to the optimal placement posture to complete the layout of the current part, and add the placed part's STL model to the already arranged parts.

[0083] Step 7: Repeat steps 3 through 6 until all parts have been laid out.

[0084] Application example:

[0085] 1. Enter in sequence Figure 2 The five types of parts to be arranged have 20 STL models each, for a total of 100 parts.

[0086] 2. Set the rectangular master plate size to 400mm × 400mm, and the layout interval d. gap The offset ratio is 1mm, the amplifyRatio is 3, the bottomRate is 0.5, the rotation angle θ0 is 90 degrees, and the slice height is set to 1mm.

[0087] 3. The above-mentioned parts are laid out using the three-dimensional nesting method described in the above embodiments. The nesting result is as follows: Figure 3 As shown. The algorithm for this nesting process takes 106 seconds. After nesting, the parts will not interfere with each other, and all parts are preferentially placed in the lower left corner. Figure 4 As shown, smaller parts can be embedded in the gaps between larger parts, making full use of the layout space.

[0088] It will be understood by those skilled in the art that the above descriptions are merely preferred examples of the invention and are not intended to limit the invention. Although the invention has been described in detail with reference to the foregoing examples, those skilled in the art can still modify the technical solutions described in the foregoing examples or make equivalent substitutions for some of the technical features. All modifications and equivalent substitutions made within the spirit and principles of the invention should be included within the scope of protection of the invention.

Claims

1. A three-dimensional nesting method based on slices, characterized in that, Includes the following steps: (1) Set the mother plate size, layout interval, offset ratio, position parameters, rotation angle and slice layer height, calculate the envelope box of each part to be arranged, move the part to be arranged to the origin, and make the geometric center of the mother plate located at the origin; (2) Slice all the parts to be arranged to obtain the slice contour data; (3) Using the newly input unpatched part as the current part, determine the various postures of the part based on the rotation angle; (4) Calculate the Minkowski sums of the current part, the motherboard, and the arranged parts under any untraversed posture, and perform a Boolean subtraction operation on the two obtained Minkowski sums to obtain the feasible region under the untraversed posture. Repeat this step to obtain the feasible region for each pose; (5) Traverse all the contour points of the feasible region corresponding to the poses, and take the contour point with the smallest evaluation value as the optimal placement position of the current part, and the pose corresponding to the contour point as the best placement pose of the current part. (6) Move the current part to the optimal placement position and rotate it to the optimal placement posture to complete the layout of the current part and add it to the already arranged parts; (7) Repeat steps (3) to (6) until all parts to be arranged are laid out; In step (4), the specific steps for calculating the Minkowski sum between the current part and the motherboard are as follows: 1) Perform Boolean merging on the slice contours of each layer of the current part to obtain the merged contour; 2) Find the Minkowski sum of the merged profile and the parent profile; The specific steps for calculating the Minkowski sum of the current part and the already scheduled parts are as follows: 1) Calculate the minimum number of common slice layers The calculation method is as follows: ; in, This represents the slice layer number for the current part. This represents the maximum number of slice layers for the already arranged parts. 2) New CombLayers, a layer slice contour data, iterates through all arranged parts from layer 1 to layer 2. The slice outline of the layer is saved to the slice outline data of the corresponding layer in CombLayers for non-empty slice outlines. 3) Traverse all slice contours in each layer of CombLayers, offset each slice contour outward, perform Boolean merging on the offset contours of each layer to obtain the merged contour; offset the merged contour inward to obtain the contour CombContours. 4) Traverse the current part and the first to last parts in the CombLayers. For any untraversed slice layer, the x and y coordinates of the slice contour points of the current part are negative, and the Minkowski sum of the negative slice contour with the CombContours in CombLayers is obtained to obtain the feasible region of the untraversed slice layer. Repeat this step to obtain part number 1~ Feasible region of layer slices; 5) Using the non-zero wrapping number rule, for the current part, the 1st to... The feasible regions of the layer slices are Boolean merged to obtain the Minkowski sum of the current part and the already arranged parts.

2. The three-dimensional nesting method based on slices according to claim 1, characterized in that, In step (3), multiple postures are determined by rotating the part around the z-axis, and the rotation angle of the i-th posture is... Where i∈[1, ], and i is an integer; It is the rotation angle.

3. The three-dimensional nesting method based on slices according to claim 1, characterized in that, In step 1), the non-zero wrapping number rule is used to perform Boolean merging on the slice contours of each layer of the current part.

4. The three-dimensional nesting method based on slices according to claim 3, characterized in that, In step 3), the outward offset distance for each slice contour is amplifyRatio*. d gap The inward offset distance for the merged contour is (amplifyRatio-1)*. d gap ; Where amplifyRatio represents the bias ratio; d gap Indicates the sorting interval.

5. The three-dimensional nesting method based on slices according to claim 1, characterized in that, In step (4), the Clipper library is used to calculate Minkowski sums.

6. The three-dimensional nesting method based on slices according to claim 1, characterized in that, In step (5), the evaluation value The calculation formula is: ; in, , These represent the two coordinates of the contour point; For position parameters.

Citation Information

Patent Citations

  • Bias-based layout optimization method

    CN113704841A

  • Two-dimensional irregular layout method based on improved hybrid BL strategy

    CN113780651A