A Two-dimensional Irregular Polygon Nesting Method Considering Part Lead-in and Lead-out Lines

By considering the two-dimensional irregular polygonal arrangement method of parts introduction lead-out lines, the damage and efficiency problems caused by the intersection of parts in the sheet metal industry are solved, and an efficient and safe processing process is achieved.

CN118735045BActive Publication Date: 2025-07-01GUANGDONG UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410762988.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-13
Publication Date
2025-07-01
Estimated Expiration
2044-06-13

AI Technical Summary

Technical Problem

In the sheet metal industry, if improperly planned during the arrangement process of two-dimensional irregular polygonal parts, it may cause the introduction and lead-out lines to intersect with other parts, resulting in the damage to the parts and affecting machining efficiency and safety.

Method used

A two-dimensional irregular polygon arrangement method considering the lead-out line of the part is proposed. By obtaining the point set and sequence of the polygon parts to be arranged, pre-processing and critical polygon calculations are performed, ensuring overlap detection between parts and the raw material plate area, and obtaining a feasible solution with an overlap value of 0 through exchange and overlap removal.

Benefits of technology

Effectively prevent parts from being damaged during the cutting process, improve processing efficiency and safety, ensure that the parts are introduced, led and out lines do not intersect, and thus optimize the layout planning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118735045B_ABST
    Figure CN118735045B_ABST
Patent Text Reader

Abstract

The present invention discloses a two-dimensional irregular polygon nesting method considering the introduction and extraction lines of parts. When obtaining the initial solution of polygon part nesting, in addition to detecting whether there is overlap between polygon parts and whether there is overlap between the polygon parts and the external area of the nesting area of the raw material plate, it is also necessary to detect whether the introduction and extraction lines of the currently placed polygon part overlap with the already placed polygon parts. In addition, during the process of continuously iterating the initial solution to find a feasible solution, it is necessary to exchange the positions of two polygon parts, and after exchanging the positions of the parts, it is also necessary to detect again whether the introduction and extraction lines of the currently placed polygon part overlap with the already placed polygon parts. The present invention solves the problem that in the process of nesting existing two-dimensional irregular polygon parts, if the planning is improper, the introduction and extraction lines of the current part may intersect with other parts, which may cause damage to the parts during the cutting process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of two-dimensional irregular polygon nesting, and specifically to a two-dimensional irregular polygon nesting method considering the lead-in and lead-out lines of parts. Background Art

[0002] In the sheet metal industry, parts are usually cut by flame cutting or plasma cutting. When using these cutting methods, the tool generates high temperature, which easily causes the material at the cutting area to melt and deform. If cutting directly from the edge of the part, the smoothness and integrity of the part edge will be damaged. Therefore, in the sheet metal industry, a tool path needs to be reserved during nesting to facilitate the entry and exit of the tool, and the part edge cannot be damaged. These tool paths are called lead-in and lead-out lines. Among them, the lead-in line is the tool entry path of the part, and the lead-out line is the tool exit path of the part. However, during the nesting process of two-dimensional irregular polygon parts, if the planning is improper, the lead-in and lead-out lines of the current part may intersect with other parts, which will not only cause accidental damage to the part during the cutting process, but also may affect the efficiency and safety of the entire processing process. Summary of the Invention

[0003] Aiming at the above defects, the present invention proposes a two-dimensional irregular polygon nesting method considering the lead-in and lead-out lines of parts, aiming to solve the problem that in the nesting process of existing two-dimensional irregular polygon parts, if the planning is improper, the lead-in and lead-out lines of the current part may intersect with other parts, which will not only cause damage to the part during the cutting process, but also may affect the efficiency and safety of the entire processing process.

[0004] To achieve this purpose, the present invention adopts the following technical solutions:

[0005] A two-dimensional irregular polygon nesting method considering the lead-in and lead-out lines of parts, comprising the following steps:

[0006] Step S1: Obtain the point set of the polygon part to be nested and the sequence of polygon parts to be nested;

[0007] Step S2: Preprocess the point set of the polygon part to be nested to obtain the point set of the polygon part to be nested after preprocessing;

[0008] Step S3: Based on the point set of the polygon part to be nested after preprocessing, calculate the critical polygons between polygon parts and the inner critical polygon of the nesting area of the polygon part and the raw material plate;

[0009] Step S4: Each time, select the first n polygon parts from the sequence of polygon parts to be nested, score the feasible positions of each polygon part, and place the polygon part with the highest score in the nesting area of the raw material plate until no feasible position can be found for the remaining polygon parts to be nested in the sequence of polygon parts to be nested or the sequence of polygon parts to be nested is empty, so as to obtain an initial solution for polygon part nesting, where n is a positive integer and n≥1;

[0010] Before placing the polygon part in the nesting area of the raw material plate, perform an overlap detection, where the overlap detection includes detecting whether there is an overlap between polygon parts through critical polygons, detecting whether there is an overlap between the polygon part and the external area of the nesting area of the raw material plate through inner critical polygons, and detecting whether there is an overlap between the incoming and outgoing lines of the currently placed polygon part and the already placed polygon parts;

[0011] Step S5: Arbitrarily swap the positions of two polygon parts in the initial solution of polygon part nesting, and perform an overlap detection. If the detection result obtained through the overlap detection is an overlap, that is, when the overlap value is not 0, then use the overlap removal method to remove all overlaps to obtain a feasible solution for polygon part nesting with an overlap value of 0.

[0012] Preferably, in step S1, all the polygon parts to be nested in the sequence of polygon parts to be nested are sorted in descending order according to the area of the bounding rectangle.

[0013] Preferably, in step S2, preprocess the point set of the polygon part to be nested, which specifically includes the following sub-steps: delete the duplicate points and invalid points in the point set of the polygon part to be nested.

[0014] Preferably, in step S4, each time select the first n polygon parts from the sequence of polygon parts to be nested, score the feasible positions of each polygon part, and place the polygon part with the highest score in the nesting area of the raw material plate, which specifically includes a sub-step:

[0015] Step S41: Each time select the first n polygon parts from the sequence of polygon parts to be nested, and traverse all the feasible rotation states of each polygon part;

[0016] Step S42: Calculate the scores for all the feasible rotation states of each polygon part, and select the feasible rotation state with the highest score as the state in which the corresponding polygon part needs to be placed in the nesting area of the raw material plate. The specific score calculation formula is as follows:

[0017] RScore ir =10(α ir / α imax )-4(e ir / e imax);

[0018] Among them, RScore ir represents the score of the i-th polygonal part in the r-th feasible rotation state, where r ∈ R i , R i represents the set of feasible rotation states of the i-th polygonal part; α ir represents the part fitting degree of the i-th polygonal part in the r-th feasible rotation state; α imax represents the maximum part fitting degree among all feasible rotation states of the i-th polygonal part; e ir represents the length exceeding the pre-layout area of the i-th polygonal part in the r-th feasible rotation state; e imax represents the maximum length exceeding the pre-layout area among all feasible rotation states of the i-th polygonal part;

[0019] Step S43: Calculate the scores for all polygonal parts, and select the polygonal part with the highest score as the polygonal part to be placed in the layout area of the raw material plate. The specific score calculation formula is as follows:

[0020] RScore i = 4(s i / s max + 10(α i ’ / α’ max ) - 4(e i ’ / e’ max );

[0021] Among them, RScore i represents the score of the i-th polygonal part; s i represents the area of the bounding rectangle of the i-th polygonal part; s max represents the largest area of the bounding rectangle among all polygonal parts; α i ’ represents the part fitting degree of the i-th polygonal part; α’ max represents the largest part fitting degree among all polygonal parts; e i ’ represents the length exceeding the pre-layout area of the i-th polygonal part; e’ max represents the largest length exceeding the pre-layout area among all polygonal parts.

[0022] Preferably, in step S4, it is detected whether polygon parts overlap through critical polygons, which specifically includes the following sub-steps: Generate a critical polygon between polygon part A and polygon part B, take any point in the point set of polygon part A as a reference point, and determine whether the reference point is within the critical polygon generated between polygon part A and polygon part B. If it is, it proves that polygon part A and polygon part B overlap; if not, it proves that polygon part A and polygon part B are separated;

[0023] It is detected whether the external area of the polygon part and the stock plate nesting area overlaps through the inner critical polygon, which specifically includes the following sub-steps: Take any point in the point set of the polygon part as a reference point, and determine whether the reference point is within the inner critical polygon generated by detecting the polygon part and the stock plate nesting area. If it is, the external area of the polygon part and the stock plate nesting area does not overlap; if not, the external area of the polygon part and the stock plate nesting area overlaps.

[0024] Preferably, in step S5, all overlaps are removed by means of overlap removal to obtain a feasible solution for the nesting of polygon parts with an overlap value of 0, which specifically includes the following sub-steps: By moving the positions of the polygon parts within the stock plate nesting area, the overlap value of the initial solution of the current polygon part nesting is reduced. When the overlap value of the initial solution of the current polygon part nesting is reduced to 0, it indicates that the initial solution of the current polygon part nesting is a feasible solution for the polygon part nesting.

[0025] Preferably, in step S5, during the process of obtaining a feasible solution for the nesting of polygon parts, an unconstrained nonlinear programming model is established for solution, and the mathematical expression of the unconstrained nonlinear programming model is as follows:

[0026] Minimize f(V)=∑ 1≤k<q≤n f kq (V)+∑ 1≤k≤n g k (V)+∑ 1≤k<q≤n h kq (V);

[0027] Among them, f(V) represents the total overlap value; f kq (V) represents the overlap value between two polygon parts p k and p q ; g k (V) represents the overlap value between polygon part p k and the stock plate; h kq (V) represents the overlap value between the incoming and outgoing lines of p q and p k ; k represents the kth polygon part; q represents the qth polygon part; n represents the total number of polygon parts.

[0028] Preferably, in the process of solving the unconstrained nonlinear programming model, specifically, by calculating the partial derivatives of f kq (V), g k (V) and h kq (V), the displacement of each polygon part in the next step is calculated;

[0029] Among them, the calculation formula for the partial derivative of f kq (V) is as follows:

[0030]

[0031] Among them, V represents the displacement vector; represents the mathematical symbol for taking the partial derivatives with respect to the x m and y m of v m respectively. v m = (x m , y m ) represents the coordinates of the m-th polygon part; x m represents the x-coordinate of the m-th polygon part, and y m represents the y-coordinate of the m-th polygon part; m represents the m-th polygon part;

[0032] When a polygon part does not overlap with another polygon part , the following formula is satisfied:

[0033]

[0034] Among them, r k represents the rotation state of the k-th polygon part; v k represents the coordinates of the k-th polygon part; r q represents the rotation state of the q-th polygon part; v q represents the coordinates of the q-th polygon part;

[0035] When a polygon part overlaps with another polygon part , the following two formulas are satisfied:

[0036]

[0037] Among them, represents the mathematical symbol for taking the partial derivative with respect to v k ; represents the mathematical symbol for taking the partial derivative with respect to v q ; represents the overlapping depth of part k and part q;

[0038] g k The calculation formula for the partial derivative of (V) is as follows:

[0039]

[0040] Among them, k represents the k-th polygon part;

[0041] When a polygon part is completely inside the nesting area of the raw material plate, the following two equations are satisfied:

[0042]

[0043] Among them, represents the overlapping depth of the polygon part with the outside of the nesting area of the raw material plate; M(W,L) represents the nesting area of the raw material plate;

[0044] When a polygon part overlaps with the outside of the nesting area of the raw material plate, the following two equations are satisfied:

[0045]

[0046] h kq The calculation formula for the partial derivative of (V) is as follows:

[0047]

[0048] When a polygon part and the lead-in / lead-out lines of another polygon part do not intersect with each other, the following equation is satisfied:

[0049]

[0050] When the lead-in / lead-out lines of a polygon part intersect with those of another polygon part , or the lead-in / lead-out lines of a polygon part intersect with those of another polygon part , the following two equations are satisfied:

[0051]

[0052] Among them, represents the overlapping depth of the lead-in / lead-out lines of the k-th polygon part with those of the q-th polygon part; represents the overlapping depth of the lead-in / lead-out lines of the q-th polygon part with those of the k-th polygon part.

[0053] Preferably, in step S5, during the process of obtaining a feasible solution for the nesting of polygonal parts with an overlap value of 0, two adjacent polygonal parts are each expanded outward by 0.5 times the cutting spacing to meet the constraint of the cutting spacing.

[0054] The technical solution provided by the embodiment of the present application may include the following beneficial effects:

[0055] In this solution, when obtaining the initial solution for the nesting of polygonal parts, in addition to detecting whether there is an overlap between polygonal parts and whether there is an overlap between the polygonal parts and the external area of the nesting area of the raw material plate, it is also necessary to detect whether the leading-in and leading-out lines of the currently placed polygonal part overlap with the already placed polygonal parts. Additionally, during the process of continuously iterating the initial solution to find a feasible solution, it is necessary to exchange the positions of two polygonal parts, and after exchanging the positions of the parts, it is also necessary to detect again whether the leading-in and leading-out lines of the currently placed polygonal part overlap with the already placed polygonal parts. In the nesting planning of polygonal parts, this solution fully considers the problem of the leading-in and leading-out lines of the current part intersecting with other parts, which can prevent parts from being damaged during the cutting process, thereby improving the efficiency and safety of part processing. Description of the Drawings

[0056] Figure 1 is a flowchart of the steps of a two-dimensional irregular polygon nesting method considering the leading-in and leading-out lines of parts.

[0057] Figure 2 is a flowchart for generating the critical polygon of part A and part B in one embodiment of the present invention;

[0058] Figure 3 is a flowchart for generating the inner critical polygon of part A and the nesting area of the raw material plate in one embodiment of the present invention. Detailed Embodiments

[0059] The following details the embodiments of the present invention. The examples of the embodiments are shown in the drawings, wherein the same or similar reference numerals denote the same or similar elements or elements with the same or similar functions throughout. The embodiments described below by referring to the drawings are exemplary only for explaining the present invention and should not be construed as limiting the present invention.

[0060] A two-dimensional irregular polygon nesting method considering the leading-in and leading-out lines of parts includes the following steps:

[0061] Step S1: Obtain the point set of the polygonal parts to be nested and the sequence of the polygonal parts to be nested;

[0062] Step S2: Preprocess the point set of the polygonal parts to be nested to obtain the preprocessed point set of the polygonal parts to be nested;

[0063] Step S3: Based on the set of points of the polygon parts to be nested after preprocessing, calculate the critical polygons between the polygon parts and the inner critical polygons of the polygon parts and the nesting area of the raw material plate;

[0064] Step S4: Each time, select the first n polygon parts from the sequence of polygon parts to be nested, score the feasible positions of each polygon part, and place the polygon part with the highest score in the nesting area of the raw material plate until no feasible position can be found for the remaining polygon parts to be nested in the sequence of polygon parts to be nested or the sequence of polygon parts to be nested is empty, so as to obtain an initial solution for the nesting of polygon parts, where n is a positive integer and n≥1;

[0065] Before placing the polygon part in the nesting area of the raw material plate, perform an overlap detection, where the overlap detection includes detecting whether there is an overlap between polygon parts through the critical polygon, detecting whether there is an overlap between the polygon part and the external area of the nesting area of the raw material plate through the inner critical polygon, and detecting whether the incoming and outgoing lines of the currently placed polygon part overlap with the already placed polygon parts;

[0066] Step S5: Arbitrarily swap the positions of two polygon parts in the initial solution of the polygon part nesting, and perform an overlap detection. If the detection result obtained through the overlap detection is an overlap, that is, when the overlap value is not 0, then use the overlap removal method to remove all overlaps to obtain a feasible solution for the polygon part nesting with an overlap value of 0.

[0067] A two-dimensional irregular polygon nesting method considering the incoming and outgoing lines of parts in this solution, as Figure 1 shown, the first step is to obtain the set of points of the polygon parts to be nested and the sequence of polygon parts to be nested. In this embodiment, the polygon parts to be nested are composed of a contour, an incoming line, and an outgoing line, and the set of points of the polygon parts to be nested includes the points on the contour, the incoming line, and the outgoing line. The sequence of polygon parts to be nested contains multiple polygon parts to be nested. The second step is to preprocess the set of points of the polygon parts to be nested to obtain the set of points of the polygon parts to be nested after preprocessing. In this embodiment, preprocessing the set of points of the polygon parts to be nested is beneficial to reducing the data scale and improving the solving efficiency. The third step is to calculate the critical polygons between the polygon parts and the inner critical polygons of the polygon parts and the nesting area of the raw material plate based on the set of points of the polygon parts to be nested after preprocessing. In one embodiment, as Figure 2 shown, taking the generation of the critical polygon between part A and part B as an example, first, arbitrarily select a point from the set of points of part A as a reference point, then move part A tightly along the boundary of part B for one circle, and record the movement path of the reference point. The area surrounded by this movement path is the critical polygon between part A and part B. AsFigure 3 As shown, the generation of the inner critical polygon of the polygon part and the nesting area of the raw material plate is as follows: First, take a point of part A as the reference point, and then move part A along the edge of the nesting area of the raw material plate inside the nesting area of the raw material plate for one circle. The area enclosed by the moving path of the reference point of part A is the inner critical polygon. The fourth step is to select n polygon parts from the sequence of polygon parts to be nested each time, score the feasible positions of each polygon part, and place the polygon part with the highest score in the nesting area of the raw material plate until no feasible position can be found for the remaining polygon parts to be nested in the sequence of polygon parts to be nested or the sequence of polygon parts to be nested is empty, so as to obtain the initial solution of the polygon part nesting, where n is a positive integer and n≥1; before placing the polygon part in the nesting area of the raw material plate, overlap detection is performed, where the overlap detection includes detecting whether there is an overlap between polygon parts through the critical polygon, detecting whether there is an overlap between the polygon part and the external area of the nesting area of the raw material plate through the inner critical polygon, and detecting whether the incoming and outgoing lines of the currently placed polygon part overlap with the already placed polygon parts. In this embodiment, n is 10. By taking out the first 10 parts of the polygon part sequence each time for trial nesting and scoring, and then selecting the part with the highest score and placing it in the nesting area of the raw material plate, selecting the part with the highest score for nesting means that this part can optimally utilize the space of the raw material plate under the current layout, reducing the waste of space, thereby improving the utilization rate of the raw material plate and the overall efficiency of nesting. When obtaining the initial solution of the polygon part nesting, before placing each polygon part in the nesting area of the raw material plate, in addition to detecting whether there is an overlap between polygon parts and whether there is an overlap between the polygon part and the external area of the nesting area of the raw material plate, it is also necessary to detect whether the incoming and outgoing lines of the currently placed polygon part overlap with the already placed polygon parts, so that the finally obtained initial solution can fully consider the two-dimensional irregular nesting problem with incoming and outgoing lines. The fifth step is to arbitrarily exchange the positions of two polygon parts in the initial solution of the polygon part nesting and perform overlap detection. If the detection result obtained through the overlap detection is an overlap, that is, when the overlap value is not 0, then the overlap removal method is used to remove all overlaps to obtain a feasible solution of the polygon part nesting with an overlap value of 0. In this embodiment, after obtaining the initial solution, it is necessary to continuously iterate to find a feasible solution. When finding a feasible solution, it is necessary to exchange the positions of two polygon parts. The nesting scheme after exchanging the positions of the parts will probably have overlaps. To solve this problem, this solution needs to detect the overlap situation again, and if there is an overlap, use the overlap removal method to remove all overlaps, so as to obtain a feasible scheme for the polygon part nesting.

[0068] When obtaining the initial solution for the nesting of polygonal parts, in addition to detecting whether there are overlaps between polygonal parts and whether there are overlaps between the polygonal parts and the external area of the nesting area of the raw material plate, it is also necessary to detect whether the leading-in and leading-out lines of the currently placed polygonal part overlap with the already placed polygonal parts. In addition, during the process of continuously iterating the initial solution to find a feasible solution, it is necessary to swap the positions of two polygonal parts. After swapping the positions of the parts, it is also necessary to detect again whether the leading-in and leading-out lines of the currently placed polygonal part overlap with the already placed polygonal parts. In the nesting planning of polygonal parts, this solution fully considers the problem that the leading-in and leading-out lines of parts intersect with other parts, which can prevent parts from being damaged during the cutting process, thereby improving the efficiency and safety of part processing.

[0069] Preferably, in step S1, all the polygonal parts to be nested in the sequence of polygonal parts to be nested are sorted in descending order according to the area of the bounding rectangle. In this embodiment, the reason for sorting according to the area of the bounding rectangle is that although some polygonal parts have a small area, their overall size is large. Further explanation, during the nesting process of polygonal parts, placing the polygonal parts with a larger bounding rectangle area first is because the polygonal parts with a smaller area can better fill the gaps between the already placed polygonal parts in the later stage of nesting.

[0070] Preferably, in step S2, preprocessing is performed on the point set of the polygonal parts to be nested, which specifically includes the following sub-steps: deleting the duplicate points and invalid points in the point set of the polygonal parts to be nested. In this embodiment, the duplicate points are defined as: if the coordinates of two points are the same, then the two points are duplicates; the invalid points are defined as: when point A is on the line segment formed by points B and C, point A is determined to be an invalid point. By deleting duplicate points and invalid points, it is beneficial to reduce the data scale and improve the efficiency of solving.

[0071] Preferably, in step S4, each time the first n polygonal parts are selected from the sequence of polygonal parts to be nested, and the feasible positions of each polygonal part are scored, and the polygonal part with the highest score is placed in the nesting area of the raw material plate, which specifically includes a sub-step:

[0072] Step S41: Each time the first n polygonal parts are selected from the sequence of polygonal parts to be nested, and all the feasible rotation states of each polygonal part are traversed;

[0073] Step S42: Score calculations are performed on all the feasible rotation states of each polygonal part, and the feasible rotation state with the highest score is selected as the state in which the corresponding polygonal part needs to be placed in the nesting area of the raw material plate. The specific scoring calculation formula is as follows:

[0074] RScore ir =10(αir / α imax ) - 4(e ir / e imax );

[0075] Among them, RScore ir represents the score of the i-th polygonal part in the r-th feasible rotation state, where r ∈ R i , R i represents the set of feasible rotation states of the i-th polygonal part; α ir represents the part fitting degree of the i-th polygonal part in the r-th feasible rotation state; α imax represents the maximum part fitting degree among all feasible rotation states of the i-th polygonal part; e ir represents the length exceeding the already nested area of the i-th polygonal part in the r-th feasible rotation state; e imax represents the maximum length exceeding the already nested area among all feasible rotation states of the i-th polygonal part;

[0076] Step S43: Calculate the scores for all polygonal parts, and select the polygonal part with the highest score as the polygonal part to be placed in the nesting area of the raw material plate. The specific scoring calculation formula is as follows:

[0077] RScore i = 4(s i / s max ) + 10(α i ’ / α’ max ) - 4(e i ’ / e’ max );

[0078] Among them, RScore i represents the score of the i-th polygonal part; s i represents the area of the bounding rectangle of the i-th polygonal part; s max represents the maximum area of the bounding rectangles among all polygonal parts; a i ’ represents the part fitting degree of the i-th polygonal part; α’ max represents the maximum part fitting degree among all polygonal parts; e i ’ represents the length exceeding the already nested area of the i-th polygonal part; e’ max represents the maximum length exceeding the already nested area among all polygonal parts.

[0079] In this embodiment, after selecting the first n polygon parts from the sequence of polygon parts to be nested, all the selected polygon parts are scored, and the polygon part with the highest score is selected and placed in the nesting area of the raw material plate. The placement state of this polygon part is the feasible rotation state with the highest score among all the feasible rotation states of this polygon part, so that the space of the raw material plate can be utilized optimally.

[0080] Preferably, in step S4, it is detected whether there is an overlap between polygon parts by using critical polygons, which specifically includes the following sub-steps: Generate a critical polygon between polygon part A and polygon part B. Take any point in the point set of polygon part A as a reference point, and determine whether this reference point is inside the critical polygon generated between polygon part A and polygon part B. If it is, it proves that there is an overlap between polygon part A and polygon part B; if not, it proves that polygon part A and polygon part B are separated.

[0081] It is detected whether there is an overlap between a polygon part and the external area of the nesting area of the raw material plate by using an inner critical polygon, which specifically includes the following sub-steps: Take any point in the point set of the polygon part as a reference point, and determine whether this reference point is inside the inner critical polygon generated by detecting the polygon part and the nesting area of the raw material plate. If it is, there is no overlap between the polygon part and the external area of the nesting area of the raw material plate; if not, there is an overlap between the polygon part and the external area of the nesting area of the raw material plate.

[0082] In this embodiment, when determining whether a point is inside a polygon, only need to emit a ray from this point to the right, and then calculate the number of intersection points between the ray and the sides of the polygon. If the number is even, the point is outside the polygon; if the number is odd, the point is inside the polygon. Detecting whether there is an overlap between polygon parts is beneficial to improving the utilization rate of the raw material plate. Detecting whether there is an overlap between a polygon part and the external area of the nesting area of the raw material plate is beneficial to improving the utilization rate of the raw material plate on the one hand, and on the other hand, it avoids parts being removed from the raw material plate in the subsequent overlap removal process.

[0083] Preferably, in step S5, all overlaps are removed by using overlap removal to obtain a feasible solution for nesting polygon parts with an overlap value of 0, which specifically includes the following sub-steps: By moving the positions of the polygon parts in the nesting area of the raw material plate, the overlap value of the initial solution of the current polygon part nesting is reduced. When the overlap value of the initial solution of the current polygon part nesting is reduced to 0, it means that the initial solution of the current polygon part nesting is a feasible solution for polygon part nesting.

[0084] In this embodiment, since the overlapping removal process cannot modify the rotation state of the parts, the overlapping value of the current nesting scheme can only be reduced by displacing each part. If the overlapping value can be optimized to 0, it means that a feasible nesting scheme is obtained. If the overlapping value cannot be optimized to 0, it means that the current nesting scheme cannot be made feasible by displacing the parts, and it is necessary to reduce the parts arranged on the raw material plate or modify the rotation state of the parts.

[0085] Preferably, in step S5, in the process of obtaining a feasible solution for polygon part nesting, an unconstrained nonlinear programming model is established for solution. The mathematical expression of the unconstrained nonlinear programming model is as follows:

[0086] Minimize f(V)=∑ 1≤k<q≤n f kq (V)+∑ 1≤k≤n g k (V)+∑ 1≤k<q≤n h kq (V);

[0087] Among them, f(V) represents the total overlapping value; f kq (V) represents the overlapping value of two polygon parts p k and p q ; g k (V) represents the overlapping value of the polygon part p k and the raw material plate; h kq (V) represents the overlapping value of the introduction and lead-out lines of p q and p k ; k represents the kth polygon part; q represents the qth polygon part; n represents the total number of polygon parts.

[0088] In this embodiment, since the overlapping removal process cannot modify the rotation state of the parts, the overlapping value of the current nesting scheme can only be reduced by displacing each part. Therefore, the only variable in the above formula is V, and the above formula can be understood as an unconstrained nonlinear programming model for solution.

[0089] Preferably, in the process of solving the unconstrained nonlinear programming model, the partial derivatives of f kq (V), g k (V) and h kq (V) are specifically calculated to calculate the displacement of each polygon part in the next step;

[0090] Among them, the calculation formula for the partial derivative of f kq (V) is as follows:

[0091]

[0092] Among them, V represents the displacement vector; Denote the partial derivatives with respect to x of v m and y m respectively. Here, v m =(x m , y m ) represents the coordinates of the m-th polygonal part; x m m represents the x-coordinate of the m-th polygonal part, and y m q represents the y-coordinate of the m-th polygonal part; m represents the m-th polygonal part;

[0093] When a polygonal part does not overlap with another polygonal part , the following formula is satisfied:

[0094]

[0095] where r k represents the rotation state of the k-th polygonal part; v k represents the coordinates of the k-th polygonal part; r q represents the rotation state of the q-th polygonal part; v q represents the coordinates of the q-th polygonal part;

[0096] When a polygonal part overlaps with another polygonal part , the following two formulas are satisfied:

[0097]

[0098] where denotes the mathematical symbol for taking the partial derivative of v k ; denotes the mathematical symbol for taking the partial derivative of v q ; represents the overlapping depth between part k and part q;

[0099] The formula for the partial derivative of g k (V) is as follows:

[0100]

[0101] where k represents the k-th polygonal part;

[0102] When a polygonal part is completely inside the nesting area of the raw material plate, the following two formulas are satisfied:

[0103]

[0104] where represents the polygonal part The overlapping depth with the outside of the blank layout area of the raw material plate; M(W, L) represents the blank layout area of the raw material plate;

[0105] When a polygon part overlaps with the outside of the blank layout area of the raw material plate, the following two equations are satisfied:

[0106]

[0107] h kq (V) The calculation formula of the partial derivative is as follows:

[0108]

[0109] When a polygon part and another polygon part do not intersect each other's lead-in and lead-out lines, the following equation is satisfied:

[0110]

[0111] When a polygon part 's lead-in and lead-out lines intersect with another polygon part , or a polygon part intersects with another polygon part 's lead-in and lead-out lines, the following two equations are satisfied:

[0112]

[0113] Among them, represents the overlapping depth of the lead-in and lead-out lines of the k-th polygon part with the q-th polygon part; represents the overlapping depth of the lead-in and lead-out lines of the q-th polygon part with the k-th polygon part.

[0114] In this embodiment, the process of solving the unconstrained nonlinear programming model can be understood as a process of simulating the movement of polygon parts. According to the change rate and change direction of the f kq (V), g k (V) and h kq (V) functions at a certain point, calculate the displacement of each polygon part in the next step. After each polygon part completes the displacement, recalculate the change rate and change direction of the f kq (V), g k (V) and h kq (V) functions at a certain point, then displace each polygon part again, and repeat this step until the whole reaches a stable state, and return the overlapping value of the current nesting scheme.

[0115] Preferably, in step S5, in the process of obtaining a feasible solution for the layout of polygonal parts with an overlap value of 0, two adjacent polygonal parts are each expanded outward by 0.5 times the cutting spacing to meet the constraint of the cutting spacing. In this embodiment, by expanding two adjacent polygonal parts outward by 0.5 times the cutting spacing, when the outer contours of the two polygonal parts are in contact and placed, exactly one cutting spacing is reserved between the two polygonal parts.

[0116] In addition, in each embodiment of the present invention, each functional unit can be integrated in a processing module, or each unit can exist physically alone, or two or more units can be integrated in one module. The above integrated module can be implemented in the form of hardware or in the form of a software functional module. When the above integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.

[0117] Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those of ordinary skill in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present invention.

Claims

1. A two-dimensional irregular polygon layout method considering lead-in and lead-out lines of parts, characterized by: The following steps are involved: Step S1: Obtain a point set of polygonal parts to be arranged and a sequence of polygonal parts to be arranged; Step S2: preprocessing the point set of the polygonal part to be arranged, and obtaining the point set of the polygonal part to be arranged after preprocessing; Step S3: Based on the point set of the polygonal parts to be arranged after preprocessing, critical polygons between polygonal parts and inner critical polygons of the arrangement area of ​​the polygonal parts and the raw material plate are calculated; Step S4: each time, the first n polygonal parts are selected from the sequence of polygonal parts to be arranged, and the feasible position of each polygonal part is scored, and the polygonal part with the highest score is placed in the arrangement area of ​​the raw material plate, until the remaining polygonal parts to be arranged in the sequence of polygonal parts to be arranged cannot find a feasible position or the sequence of polygonal parts to be arranged is empty, so as to obtain an initial solution for the arrangement of polygonal parts, wherein n is a positive integer and n≥1; Before placing the polygonal parts in the raw material plate layout area, an overlap detection is performed, wherein the overlap detection includes detecting whether the polygonal parts overlap with each other through critical polygons, detecting whether the polygonal parts overlap with the outer area of ​​the raw material plate layout area through inner critical polygons, and detecting whether the lead-in and lead-out lines of the currently placed polygonal parts overlap with the already placed polygonal parts; Step S5: in the initial solution of the polygonal parts packing, the positions of two polygonal parts are randomly exchanged, and overlap detection is performed. If the detection result obtained by the overlap detection is overlap, that is, the overlap value is not 0, then all overlaps are removed by using the overlap removal method to obtain a feasible solution of the polygonal parts packing with an overlap value of 0; In step S4, the following sub-steps are specifically included: Step S41: each time, the first n polygonal parts are selected from the sequence of polygonal parts to be arranged, and all feasible rotation states of each polygonal part are traversed; Step S42: Score all possible rotation states of each polygonal part, and select the possible rotation state with the highest score as the state in which the corresponding polygonal part needs to be placed in the raw material plate layout area. The specific scoring calculation formula is as follows: RScore ir =10(a ir / a imax )-4(e ir / e imax ); Among them, RScore ir represents the fraction of the rth feasible rotation state of the i-th polygonal part, r∈R i , R i represents the set of feasible rotation states of the i-th polygonal part; α ir Indicates the degree of fit of the i-th polygonal part and the r-th feasible rotation state; α imax represents the maximum part fit among all feasible rotation states of the i-th polygonal part; e ir represents the length of the i-th polygonal part and the r-th feasible rotation state beyond the arranged area; e imax Indicates the maximum length of all feasible rotation states of the i-th polygonal part that exceeds the arranged area; Step S43: Score all polygonal parts and select the polygonal part with the highest score as the polygonal part to be placed in the raw material plate layout area. The specific scoring calculation formula is as follows: RScore i =4(s i / s max )+10(a i ' / a' max )-4(e i ' / e' max ); Among them, RScore i represents the score of the i-th polygonal part; s i represents the enveloping rectangular area of ​​the ith polygonal part; s max Represents the largest enveloping rectangular area among all polygonal parts; α i ' represents the degree of fit of the i-th polygonal part; α' max Indicates the maximum part fit among all polygonal parts; e i 'Indicates the length of the i-th polygonal part that exceeds the arranged area; e' max Indicates the maximum length of all polygonal parts that exceeds the nested area.

2. A two-dimensional irregular polygon layout method considering lead-in and lead-out lines of parts according to claim 1, characterized in that: In step S1, all the polygonal parts to be arranged in the sequence of polygonal parts to be arranged are sorted in descending order according to the area of ​​the envelope rectangle.

3. A two-dimensional irregular polygon layout method considering lead-in and lead-out lines of parts according to claim 1, characterized in that: In step S2, the point set of the polygonal part to be arranged is preprocessed, which specifically includes the following sub-steps: deleting duplicate points and invalid points in the point set of the polygonal part to be arranged.

4. A two-dimensional irregular polygon layout method considering lead-in and lead-out lines of parts according to claim 1, characterized in that: In step S4, whether polygonal parts overlap is detected by critical polygons, which specifically includes the following sub-steps: generating a critical polygon between polygonal part A and polygonal part B, taking any point in the point set of polygonal part A as a reference point, and determining whether the reference point is within the critical polygon generated between polygonal part A and polygonal part B. If so, it proves that polygonal part A and polygonal part B overlap; If not, it proves that polygonal part A is separated from polygonal part B; Whether the polygonal part and the outer area of ​​the raw material plate arrangement area overlap is detected by the inner critical polygon, specifically including the following sub-steps: taking any point in the point set of the polygonal part as a reference point, judging whether the reference point is within the inner critical polygon generated by the polygon detection polygonal part and the raw material plate arrangement area, if so, the polygonal part and the outer area of ​​the raw material plate arrangement area do not overlap; If not, the polygonal part overlaps with the outer area of ​​the raw material plate layout area.

5. The two-dimensional irregular polygon layout method considering lead-in and lead-out lines of parts according to claim 1, characterized in that: In step S5, all overlaps are removed by overlapping removal to obtain a feasible solution for polygonal part nesting with an overlap value of 0, which specifically includes the following sub-steps: by moving the positions of polygonal parts in the nesting area of ​​the raw material plate, the overlap value of the initial solution of the current polygonal part nesting is reduced; when the overlap value of the initial solution of the current polygonal part nesting is reduced to 0, it means that the initial solution of the current polygonal part nesting is a feasible solution for the polygonal part nesting.

6. A two-dimensional irregular polygon layout method considering lead-in and lead-out lines of parts according to claim 1, characterized in that: In step S5, in the process of obtaining a feasible solution for polygonal part layout, an unconstrained nonlinear programming model is established for solution. The mathematical expression of the unconstrained nonlinear programming model is as follows: Minimize f(V)=∑ 1≤k<q≤n f kq (V)+∑ 1≤k≤n g k (V)+∑ 1≤k<q≤n h kq (V); Where f(V) represents the total overlap value; f kq (V) represents two polygonal parts p k and p q Overlap value; g k (V) represents the polygonal part p k Overlap value with the raw material board; h k1 (V) indicates the lead-in and lead-out lines of p1 and p k The overlap value of ; k represents the kth polygonal part; q represents the qth polygonal part; n represents the total number of polygonal parts.

7. The two-dimensional irregular polygon layout method considering lead-in and lead-out lines of parts according to claim 1, characterized in that: In the process of solving the unconstrained nonlinear programming model, by calculating f kq (V), g k (V) and h kq Partial derivative of (V) to calculate the displacement of each polygonal part in the next step; Among them, f kq The partial derivative of (V) is calculated as follows: Where V represents the displacement vector; Represents v m x m and m Mathematical symbols for partial derivatives, v m =(x m ,y m ) represents the coordinates of the mth polygonal part; x m Indicates the x-coordinate, y-coordinate of the m-th polygon part m represents the y coordinate of the mth polygonal part; m represents the mth polygonal part; When a polygonal part With another polygon part When there is no overlap, the following equation is satisfied: Among them, r k Indicates the rotation state of the kth polygonal part; v k represents the coordinates of the kth polygonal part; r q Indicates the rotation state of the qth polygonal part; v q Represents the coordinates of the qth polygonal part; When a polygonal part With another polygon part When overlapping, the following two equations are satisfied: in, Indicates v k Mathematical symbols for partial derivatives; Indicates v q Mathematical symbols for partial derivatives; Indicates the overlapping depth of parts k and q; g k The partial derivative of (V) is calculated as follows: Wherein, k represents the kth polygonal part; When a polygonal part When it is completely inside the raw material plate arrangement area, the following two formulas are satisfied: in, Represents polygonal parts The overlapping depth with the outside of the raw material plate arrangement area; M(W,L) represents the raw material plate arrangement area; When a polygonal part When it overlaps with the outside of the raw material plate arrangement area, the following two formulas are satisfied: h kq The partial derivative of (V) is calculated as follows: When a polygonal part With another polygon part When the lead-in and lead-out lines do not intersect each other, the following equation is satisfied: When a polygonal part The lead-in and lead-out lines of another polygonal part Intersection, or a polygon part With another polygon part When the lead-in and lead-out lines intersect, the following two equations are satisfied: in, Indicates the overlapping depth of the lead-in and lead-out lines of the k-th polygonal part and the q-th polygonal part; Indicates the overlapping depth of the lead-in and lead-out lines of the qth polygonal part and the kth polygonal part.

8. The two-dimensional irregular polygon layout method considering lead-in and lead-out lines of parts according to claim 1, characterized in that: In step S5, in the process of obtaining a feasible solution for the polygonal part arrangement with an overlap value of 0, two adjacent polygonal parts are expanded outward by 0.5 times the cutting spacing to meet the constraint of the cutting spacing.

Citation Information

Patent Citations

  • Two-dimensional irregular layout method for single-specification plate

    CN111275243A

  • Plate stock layout method and system based on overlapping separation

    CN117236509A