A two-dimensional efficient arrangement method of rectangular parts based on nested segmentation
Through the two-dimensional efficient arrangement method of rectangular-like parts based on nested segmentation, the problems of complexity and low computational efficiency of rectangular-like parts arrangement algorithms in the prior art are solved, and efficient and compact parts layout is achieved, and material waste and production costs are reduced.
Patent Information
- Application Number
- CN202311580032.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-24
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2043-11-24
AI Technical Summary
The prior art has high algorithm complexity, cumbersome operation and low computational efficiency in the two-dimensional arrangement of rectangular parts, resulting in waste of materials and low production efficiency.
The two-dimensional efficient arrangement method of rectangular parts based on nested segmentation is adopted. Through simplified arrangement algorithms and careful algorithm optimization, the calculation efficiency is improved, and the pattern arrangement effect is further optimized through nested segmentation.
A simplified arrangement process is realized, computing efficiency and arrangement effect are improved, material waste is reduced, production costs are reduced, and production efficiency is improved.
Smart Images

Figure CN117556954B_ABST
Abstract
Description
Technical field:
[0001] The invention relates to a two-dimensional efficient arrangement method of quasi-rectangular parts based on nested segmentation, which belongs to the field of computer science and engineering. Background technology:
[0002] In the fields of manufacturing and engineering, efficient two-dimensional layout methods are essential to minimize material waste, improve production efficiency, and reduce production costs. The layout of rectangular parts is a common problem in many application scenarios, including sheet cutting, circuit board layout, textile cutting, etc. Traditional layout methods are usually complex and computationally intensive, making it difficult to obtain a satisfactory layout solution within a reasonable time.
[0003] In the prior art, although there are some layout methods and software tools, they generally have problems such as high algorithm complexity, cumbersome operation and low computational efficiency. Complex layout algorithms require advanced programming skills and a large amount of computing resources, and less skilled users may find it difficult to apply these methods. In addition, some existing methods may cause material waste and reduce production efficiency, which is unacceptable in today's highly competitive market environment.
[0004] To solve these problems, we proposed a new technology called "Efficient 2D Arrangement Method of Quasi-Rectangular Parts Based on Nested Segmentation". This method aims to simplify the arrangement process, improve computational efficiency and ensure high-quality arrangement results. Our method has attracted wide attention in the technical community due to its unique advantages. Summary of the invention:
[0005] The present invention relates to a two-dimensional efficient arrangement method of rectangular-like parts based on nested segmentation, which optimizes the two-dimensional arrangement of rectangular-like parts, improves the utilization rate of plates and further improves the corresponding calculation efficiency.
[0006] The present invention adopts the following technical solution: a two-dimensional efficient arrangement method of rectangular parts based on nested segmentation, the process of which includes the following steps:
[0007] S1. According to the CAD model of the part, obtain the part pattern image and perform binarization on it, where the black is the background and the white is the part area;
[0008] S2. Analyze the acquired part image to see whether there are holes inside the part. If so, fill them.
[0009] S3, obtaining the horizontal and vertical dimensions of the part, and obtaining the corresponding standard rectangular image based on the corresponding dimensions;
[0010] S4, judging whether the corresponding figure belongs to a quasi-rectangle according to the padded image and the acquired standard image, if so, performing the following arrangement process, otherwise, determining that the pattern is not suitable for arrangement using the method proposed by the present invention;
[0011] S5, dividing the reference plate image into two parts by using two methods, using horizontal lines and vertical lines respectively;
[0012] S5, dividing the divided regions again in two ways (referred to as nested division in the present invention), and arranging the parts rotated at different angles in different divided regions;
[0013] S6, summarizing all the segmentation methods and the corresponding total number of pattern arrangements to form a sequence and sorting them;
[0014] S7, select the segmentation and arrangement scheme that can arrange the maximum number of patterns, which is the result obtained based on the method of the present invention. This technology will have a profound impact in the fields of manufacturing and engineering, providing companies with a reliable tool to improve production efficiency, reduce costs and achieve sustainable resource utilization.
[0015] In step S4, the padded pattern image is compared with the number of white pixels of the target object portion in the corresponding standard rectangular image obtained based on the corresponding size to determine whether the corresponding pattern is a quasi-rectangular image.
[0016] In step S5, integers 'i' and 'j' are selected as iteration values according to the horizontal and vertical dimensions of the part pattern, and all possible area division situations and the number of arranged patterns are summarized and sorted, and finally the best result is selected.
[0017] First, this method uses a simplified arrangement algorithm based on the characteristics of rectangular parts. Unlike complex mathematical calculations, our algorithm is easy to understand and operate, and ordinary users can also use it easily. The simplicity of the algorithm not only improves the user's work efficiency, but also reduces the difficulty of operation, making the arrangement process more intuitive and flexible.
[0018] Secondly, we have significantly improved computing efficiency through careful algorithm optimization. The use of modern computing technology enables us to handle large-scale layout tasks in a very short time, greatly shortening the layout time. This is especially important for manufacturing companies because it can help them respond to market demand faster, reduce production cycles and reduce production costs.
[0019] Most importantly, our approach focuses on minimizing material waste. By optimizing the layout, we ensure that the parts are compact and efficient, and that materials are fully utilized. This not only helps reduce material costs, but also helps protect the environment and reduce resource waste.
[0020] In summary, the arrangement method of the present invention has outstanding advantages in algorithm simplicity, computational efficiency and arrangement effect. This technology will have a profound impact in the fields of manufacturing and engineering, providing companies with a reliable tool to improve production efficiency, reduce costs and achieve sustainable resource utilization. Description of the drawings:
[0021] Figure 1 It is a schematic diagram for judging a quasi-rectangular pattern;
[0022] Figure 2 is the base plate size and pattern size;
[0023] Figure 3 Schematic diagram of two segmentation methods of the reference plate image and their pattern arrangement;
[0024] Figure 4 Optimize the process of arranging the number of patterns for the benchmark plate;
[0025] Figure 5 This is a schematic diagram of nested segmentation of the reference plate;
[0026] Figure 6 Flowchart for calculating the maximum number of patterns N_max that can be accommodated by the reference plate. Specific implementation method:
[0027] The technical solution of the present invention will be described in detail below with reference to the accompanying drawings. Figure 1 The figure is the overall flow chart of the corresponding arrangement process.
[0028] (1) Rectangular Parts Recognition
[0029] Based on the CAD model of the part, the part pattern image is obtained and binarized, where black is the background and white is the part area. First, any hole areas in the pattern must be addressed, such as Figure 1 (a) In the example shown in this figure, the original pattern shows two hole areas that need to be filled. These hole areas are identified by an algorithm. Figure 1 (b) shows the pattern of these hole areas after they are successfully filled, and their horizontal and vertical sizes, denoted by 'lx' and 'ly' respectively. These hole areas are filled by the algorithm. Finally, Figure 1 (c) shows the rectangle defined by the horizontal and vertical dimensions of the pattern.
[0030] In order to determine whether the corresponding graphic is a quasi-rectangle, the present invention performs a quantitative comparative analysis of the white pixel count between the pattern filled with the hole area and the standard rectangle defined by its geometric dimensions, and the expression is:
[0031] 0.95·N patt-filled ≤N rec ≤1.05·N patt-filled (1)
[0032] Among them, N patt-filled is the number of white pixels in the entire pattern after the holes in the pattern are filled, N rec Represents the number of white pixels in a rectangular image determined by the horizontal and vertical dimensions of the pattern. If the above expression is satisfied, the pattern can be considered as a quasi-rectangular image, and then it needs to be arranged according to the following detailed steps.
[0033] (2) Single segmentation arrangement
[0034] Figure 2 A graphical representation of the horizontal and vertical dimensions of the reference plate pattern and the template pattern is provided. These dimensions are represented by Lx, Ly, lx, and ly, respectively.
[0035] There are two ways to divide the plate area into two different parts. The first method uses a vertical line to divide the base plate into two parts, the left and right parts. The second method uses a horizontal line to divide the base plate into two parts, the upper part and the lower part, such as Figure 3 shown.
[0036] In different areas of the reference plate, the images are arranged with different rotation angles. Specifically, in the left part of the reference plate, the pattern will not be rotated, while in the right part of the reference plate, the pattern will be arranged with a rotation angle of 90°, such as Figure 3 (a). In addition, in the reference plate divided by the horizontal line, the patterns will be arranged at different angles in the upper and lower parts, respectively, as shown in Figure 3 (b) as shown.
[0037] The arrangement of the pattern in the left portion of the reference plate, where the number of columns is represented by 'N1x1' and the number of rows is represented by 'N1y1', can be described as follows:
[0038]
[0039] in represents the floor function, and the number of patterns arranged on the left side of the reference plate can be expressed as:
[0040]
[0041] The width of the right section is as follows:
[0042] Lr=Lx-N1x1·lx (4)
[0043] On the right side of the reference plate, the number of rows and columns of the arranged pattern are as follows:
[0044]
[0045]
[0046] The number of patterns arranged on the right side of the reference plate is:
[0047]
[0048] The total number of patterns arranged systematically across the entire reference board can be expressed as follows:
[0049]
[0050] In the given equation, which involves only variable N1x1, the value of Nlr depends entirely on the value of N1x1. The allowable range of N1x1 is defined as The goal is to determine the optimal N1x1 value to maximize the maximum number of patterns accommodated on the reference plate. To achieve this goal, a set of ). After this systematic exploration, a range of N1x1 values and their corresponding Nlr values are determined.
[0051] Similarly, considering a reference plate separated by horizontal lines, such as Figure 3 As shown in (b), when the pattern is arranged in the lower half of the reference plate, the number of rows is expressed as N2y1 and the number of columns is expressed as N2x1, which can be expressed as follows:
[0052]
[0053] The number of patterns located on the lower side of the reference plate can be described as follows:
[0054]
[0055] The height of the upper part can be determined as:
[0056] Lt=Ly-N2y1·ly (11)
[0057] In the upper part of the reference plate, the number of rows and columns can be expressed as:
[0058]
[0059]
[0060] The number of patterns located in the upper half of the reference plate can be described as follows:
[0061]
[0062] Finally, the total number of patterns arranged on the entire reference board can be expressed as:
[0063]
[0064] In the above expression, it involves only one variable N2y1, and the value of Nbt depends entirely on the value of N2y1. The acceptable range or value range of N2y1 can be described as follows:
[0065]
[0066] In order to determine the N2y1 value that accommodates the most patterns on the reference plate, the N2y1 value in the range A search of all possible values within . Subsequently, a sequence of values can be derived.
[0067] In order to obtain the maximum number of patterns that can be accommodated on the reference board, a search covering all possible N1x1 (indicating the number of columns in the left half) and N2y1 (indicating the number of rows at the bottom) values must be performed, and the maximum number of patterns that can be arranged can be obtained, which are represented as Nlr_largest and Nbt_largest respectively. The maximum number of patterns that can be accommodated on the reference board can be expressed as:
[0068] N_largest=max(Nlr_largest, Nbt_largest) (17)
[0069] Based on the provided expression, the corresponding benchmark partitioning method is selected, with the goal of maximizing the number of patterns on the benchmark board. The corresponding process is as follows Figure 4 shown.
[0070] (3) Nested segmentation arrangement
[0071] The results obtained by the single segmentation method mentioned above may not be good enough, mainly because the method adopts a unified arrangement method for the patterns in a single divided area. In order to further optimize the corresponding pattern arrangement effect, it is necessary to segment and optimize again in the specified divided area. In the present invention, it is called nested segmentation, that is, further subdividing the reference plate to maximize the number of its arrangement patterns, such as Figure 5 shown.
[0072] exist Figure 5In (a) and (b), the reference board is first divided into two different regions, indicated by the thick dashed lines. Inside each of these divided regions, the segmentation optimization is performed again, as indicated by the thin dashed lines.
[0073] In order to determine the size of the width of the left area and the height of the bottom area obtained by the initial division along the thick dashed line, the present invention uses the following mathematical expression to calculate the value stored in the array L_ser(k):
[0074] L_ser(k)=i·lx+j·ly (18)
[0075] In this particular context, it is important to emphasize that the variables 'i' and 'j' act as iteration parameters. Their respective lower bounds are 0, representing the starting value of the iteration process, while the corresponding upper bounds are determined by the following expressions:
[0076] i_max=j_max=[max(Lx,Ly)] / [min(lx,ly)] (19)
[0077] Through the corresponding calculation, a series of values are generated and then stored in the L_ser array. It is worth noting that the values in the L_ser array will be sorted and arranged in ascending order.
[0078] To determine the width of the left area, an iterative process is used where the values in the L_ser array are evaluated one by one from the first to the last value. Any value that exceeds the base board width is ignored. Similarly, the same evaluation method is used to determine the height of the bottom area.
[0079] By iteratively evaluating a series of values in the L_ser array, two consecutive values will be obtained, representing the number of patterns accommodated, respectively marked as Nlr_ser and Nbt_ser. Subsequently, the maximum number of patterns that the reference board can accommodate is obtained by the following equation, denoted as N_max:
[0080] N_max=max[Nlr_max,Nbt_max] (20)
[0081] In the present invention, 'Nlr_max' represents the maximum value in the Nlr_ser sequence, and 'Nbt_max' corresponds to the maximum value in the Nbt_ser sequence. The flowchart for determining the N_max value is as follows: Figure 6 shown.
Claims
1. A two-dimensional efficient arrangement method of rectangular parts based on nested segmentation, characterized by: The arrangement process mainly includes the following steps: S1. According to the CAD model of the part, obtain the part pattern image and perform binarization on it, where the black is the background and the white is the part area; S2. Analyze the acquired part image to see whether there are holes inside the part. If so, fill them. S3, obtaining the horizontal and vertical dimensions of the part, and obtaining the corresponding standard rectangular image based on the corresponding dimensions; S4, judging whether the corresponding figure belongs to a quasi-rectangle according to the padded image and the acquired standard image, if so, performing the following arrangement process, otherwise, determining that the pattern is not suitable for arrangement using the proposed method; S5, dividing the reference plate image into two parts by using two methods, using horizontal lines and vertical lines respectively; S5. The divided regions are divided again in two ways, which is called nested segmentation. Parts rotated at different angles are uniformly arranged in different segmented regions. The base plate is further subdivided to maximize the number of permutation patterns: The reference board is first divided into two different regions, indicated by the thick dashed lines; within each of these divided regions, the segmentation optimization is once again performed. To determine the size of the width of the left region and the height of the bottom region resulting from the initial division along the thick dashed line, use the following mathematical expression to calculate the values stored in the array L_ser ( k ) in: (18) variable' i 'and' j ' act as iteration parameters; their respective lower bounds are 0, representing the starting value of the iteration process, while the corresponding upper bounds are determined by the following expressions: (19) Through the corresponding calculation, a series of values are generated and then stored in L_ser In array; L_ser The values in the array will be sorted and placed in ascending order; To determine the width of the left region, an iterative process is used in which the L_ser The first value in the array is evaluated one by one to the last value; any value that exceeds the base plate width is ignored; similarly, the same evaluation method is used to determine the height of the bottom area; Through L_ser Iterative evaluation of a series of values in the array will produce two consecutive values, representing the number of patterns accommodated, marked as Nlr_ser and Nbt_ser ; Then, the maximum number of patterns that the reference plate can accommodate is obtained by the following equation, expressed as N _max: (20) ' Nlr _max' represents Nlr _ser the maximum value in the sequence, while ' Nbt _max' corresponds to Nbt_ser The maximum value in the sequence; S6, summarizing all the segmentation methods and the corresponding total number of pattern arrangements to form a sequence and sorting them; S7. Select a segmentation and arrangement scheme that can arrange the maximum number of patterns. This is the result obtained based on the method.
2. According to claim 1, a method for efficiently arranging rectangular parts in two dimensions based on nested segmentation is characterized in that In step S4, the padded pattern image is compared with the number of white pixels of the target object portion in the corresponding standard rectangular image obtained based on the corresponding size to determine whether the corresponding pattern is a quasi-rectangular image.
3. The method for efficiently arranging rectangular parts in two dimensions based on nested segmentation according to claim 1 is characterized in that In step S5, an integer ' is selected according to the horizontal and vertical dimensions of the part pattern. i 'and' j 'As the iteration value, all possible area divisions and the number of arranged patterns are summarized and sorted, and finally the best result is selected.
Citation Information
Patent Citations
Plate processing control method and device, computer equipment and storage medium
CN115170580A
Rectangular piece layout method based on cutting optimization of electronic cutting saw
CN116561996A