Scan line filling method for interference-free layout of irregular sheet metal parts

By filling, adding, and extending the gaps in the scan lines, scan lines for interference-free layout of irregular sheet metal parts are generated, solving the problems of high dependence on scanning accuracy and contour interference in the existing technology, and realizing efficient information representation and layout feasibility.

CN116563323BActive Publication Date: 2026-04-21YANSHAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
YANSHAN UNIV
Filing Date
2023-05-11
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing technologies for generating scan lines for irregular sheet metal parts suffer from problems such as high dependence on scanning accuracy, long calculation time, large storage space, and inability to completely eliminate contour interference.

Method used

By performing operations such as filling scan line gaps, adding scan lines, and extending scan lines, scan lines are generated to create interference-free layout of irregular sheet metal parts. This includes inputting vertex information and scanning accuracy, generating basic scan lines, filling gaps, adding necessary scan lines, and extending some scan lines.

Benefits of technology

Given a scanning accuracy, it can completely and effectively represent the contour information of irregular sheet metal parts, improve the feasibility and information completeness of the layout scheme, and effectively eliminate contour interference.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116563323B_ABST
    Figure CN116563323B_ABST
Patent Text Reader

Abstract

The present application relates to a kind of for the irregular sheet metal part non-interference layout scanning line filling method, it includes the following steps: step 1: input the vertex information of irregular sheet metal part profile and scanning accuracy;Step 2: generate the basic scanning line of irregular sheet metal part profile: step 3: fill the scanning line gap in the basic scanning line of irregular sheet metal part profile;Step 4: add necessary scanning line to the basic scanning line of irregular sheet metal part profile;Step 5: extend part scanning line in the basic scanning line of irregular sheet metal part profile;Step 6: output the complete scanning line of irregular sheet metal part profile.The present application uses the operation of scanning line's gap filling, addition and extension, can effectively represent irregular sheet metal part profile information under the condition of given scanning accuracy, with excellent information integrity.Solve the profile interference problem in the process of irregular sheet metal part layout, improve the effectiveness of layout scheme.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of sheet metal processing, and specifically relates to a scanning line filling method for non-interference layout of irregular sheet metal parts. Background Technology

[0002] Due to the advantages of sheet metal parts, such as light weight, high strength, low cost, and good mass production performance, their market usage rate is constantly increasing. Enterprises are eager to improve their market competitiveness by reducing production costs and increasing production efficiency. Against this backdrop, traditional manual nesting methods are no longer sufficient to meet the production needs of enterprises, which increasingly require a more efficient nesting method. In response to this need, many scholars have conducted research on the optimization of blanking problems. The irregular sheet metal part nesting problem is a branch of the optimization of blanking problem, referring to the placement of a given number and type of irregular sheet metal parts on a given motherboard according to the optimal nesting scheme. The most significant characteristic of the irregular sheet metal part nesting problem is that the placed sheet metal parts have irregular contours. Because of this characteristic, solving the irregular sheet metal part nesting problem requires judging whether interference occurs between the contours of different irregular sheet metal parts. Different interference judgment methods are used for different contour representations of irregular sheet metal parts.

[0003] In existing research on the layout of irregular sheet metal parts, scan lines are a commonly used method for representing the contours of these parts. Compared to other methods, scan lines require less storage space and the corresponding interference detection methods are more robust. However, the scan line generation methods used in existing studies are highly dependent on the selection of scanning accuracy. Higher scanning accuracy results in a more accurate representation of the irregular sheet metal part contour and fewer contour interferences in the layout scheme. However, as scanning accuracy increases, the computation time required for interference detection increases, and the storage space occupied by the scan line information increases. Furthermore, since scan lines are an approximate representation of the irregular sheet metal part contour, using scan lines generated by existing technologies to represent the contour, improving scanning accuracy can only reduce a small amount of contour overlap in the layout scheme, but cannot eliminate contour interference. Summary of the Invention

[0004] To address the shortcomings of existing technologies, this invention provides a scan line filling method for non-interference layout of irregular sheet metal parts. The purpose is to generate scan lines for non-interference layout of irregular sheet metal parts by performing operations such as filling scan line gaps, adding scan lines, and extending scan lines on basic scan lines.

[0005] To achieve the above objectives, the present invention discloses the following technical solution:

[0006] Specifically, the present invention provides a scan line filling method for interference-free layout of irregular sheet metal parts, which includes the following steps:

[0007] Step 1: Input the vertex information and scanning precision y_step of the irregular sheet metal part contour; the irregular sheet metal part contour is composed of vertices connected in a counterclockwise order; the vertex information includes the x-coordinate, y-coordinate and concavity / convexity feature of the vertex. If the vertex is a convex point, its concavity / convexity feature is 1, otherwise it is 0; the scanning precision y_step refers to the interval between two adjacent scanning heights.

[0008] Step 2: Generate the basic scan lines of the irregular sheet metal part contour; Starting from the initial scan height, draw horizontal lines that extend infinitely to both ends at each scan height with the scan accuracy y_step as the step size. The horizontal lines enter the interior of the irregular sheet metal part contour and then exit. The horizontal lines at each scan height include an inner horizontal line segment located inside the irregular sheet metal part contour and an outer horizontal line segment located outside the irregular sheet metal part contour. All the inner horizontal line segments at each scan height together form the basic scan lines of the irregular sheet metal part contour.

[0009] Step 3: Fill the gaps in the basic scan lines of the irregular sheet metal part contour; specifically including the following sub-steps: S31, find all possible scan heights where scan line gaps may exist in the irregular sheet metal part contour; S32, determine whether there are scan line gaps among all possible scan heights by calculating the gap discriminant; S33, if scan line gaps exist, determine the filling direction and filling length of the scan line gaps, and complete the filling of the scan line gaps.

[0010] Step 4: Add necessary scan lines to the basic scan lines of the irregular sheet metal part outline; specifically, it includes the following sub-steps: S41, find all the positions in the irregular sheet metal part outline where necessary scan lines need to be added; S42, determine the addition information for each necessary scan line to be added.

[0011] Step 5: Extend some of the scan lines in the basic scan lines of the irregular sheet metal part contour; specifically, it includes the following sub-steps: S51, find the positions of all scan lines that need to be extended, S52, determine the extension direction and extension length of each scan line to be extended.

[0012] Step 6: Output the complete scan lines of the irregular sheet metal part outline.

[0013] Preferably, step 2, the process of obtaining all inner horizontal line segments located within the irregular sheet metal part contour at the i-th scanning height, specifically includes:

[0014] Step 21: For the scanning height of the i-th horizontal line Iterate through each edge of the irregular sheet metal part's outline; if edge j is a horizontal edge, skip that edge and proceed directly to the judgment of edge (j+1); otherwise, proceed to the judgment of edge (j+1). Is it within the range of the projection of edge j onto the y-axis? If Within the range of the projection of edge j onto the y-axis, then Substitute the equation of the line on side j to calculate corresponding This indicates that the y-coordinate of the line on side j is the height. If the x-coordinate of the point is not found, then the (j+1) edge is checked;

[0015] Step 22: Calculate Then, determine the point. Is it a vertex of an irregular sheet metal part's outline? When point When the vertices of a non-irregular sheet metal part are at their non-irregular contours, if Points already exist in the middle Then check edge (j+1); otherwise, proceed to... Store a Then, the (j+1) edge is evaluated;

[0016] Step 23: When the point When dealing with vertices of irregular sheet metal parts, determine the concavity or convexity of the vertex: if the vertex is concave, then determine... Does a point already exist in the middle? like Points already exist in the middle Then check edge (j+1); otherwise, proceed to... Store two Then, the (j+1) edge is checked; if the vertex is convex, it is checked whether the two edges constituting the vertex are opposite in the y-direction; if they are opposite, the (j+1) edge is checked directly, otherwise... Does a point already exist in the middle? If the point already exists, then check the (j+1) edge; otherwise, proceed to... Store a Then, the (j+1) edge is checked; after traversing each edge of the irregular sheet metal part outline, it is stored... All points are sorted in ascending order based on their x-coordinate values, and then sequentially and without repetition are... Each pair of points forms a combination element, and each combination element represents a scan line segment. The first point in the combination element represents the starting point of the scan line segment, and the second point represents the ending point of the scan line segment.

[0017] Preferably, step S31 specifically includes the following sub-steps:

[0018] Step 311: Traverse each vertex of the irregular sheet metal contour. For vertex i, determine the concavity or convexity of vertex i. If vertex i is concave, directly determine the concavity or convexity of vertex i+1. If vertex i is convex, further determine whether the two sides constituting the vertex are opposite in both the x and y directions. If the two sides constituting vertex i are opposite in both the x and y directions, mark vertex i as a vertex that may have scan line gaps. Otherwise, directly determine the concavity or convexity of vertex (i+1).

[0019] Step 312: After traversing each vertex of the irregular sheet metal part contour, obtain all vertices in the irregular sheet metal part contour that may have scan line gaps; traverse each vertex that may have scan line gaps. For vertex j that may have scan line gaps, if there is no scan height within the range of the two edges constituting vertex j projected onto the y-axis, then directly determine vertex (j+1). Otherwise, record vertex j and all scan heights within the range of the two edges constituting vertex j projected onto the y-axis, and then determine vertex (j+1); after traversing each vertex that may have scan line gaps, obtain all scan heights in the irregular sheet metal part contour that may have scan line gaps and their corresponding vertices.

[0020] Preferably, in step S32, the gap discrimination formula is as shown in formulas (1) to (4):

[0021]

[0022]

[0023]

[0024]

[0025] In formulas (1) to (4), h is the y-coordinate value of the scanning height to be determined; k0 and k1 are the slopes of the first and second edges that constitute the vertex corresponding to the scanning height to be determined, respectively; b is the y-coordinate value of the vertex corresponding to the scanning height to be determined; and y_step is the scanning precision.

[0026] Preferably, in step S32:

[0027] If the x-direction component of the first edge that constitutes the vertex corresponding to the scanning height to be judged points to the negative x-axis and the y-direction component points to the positive y-axis, then the gap is judged using formula (1).

[0028] If the x-direction component of the first edge that constitutes the vertex corresponding to the scanning height to be judged points to the positive x-axis and the y-direction component points to the positive y-axis, then the gap is judged using formula (2).

[0029] If the x-direction component of the first edge that constitutes the vertex corresponding to the scanning height to be judged points to the negative x-axis and the y-direction component points to the negative y-axis, then the gap is judged using formula (3).

[0030] If the x-direction component of the first edge that constitutes the vertex corresponding to the scan height to be judged points to the positive direction of the x-coordinate axis and the y-direction component points to the negative direction of the y-coordinate axis, then the gap is judged by formula (4); when h satisfies the corresponding inequality, it indicates that there is no scan line gap in the scan height to be judged, otherwise it indicates that there is a scan line gap in the scan height to be judged.

[0031] Preferably, step S33 specifically includes:

[0032] Step 331: For a scan height h with scan line gaps and its corresponding vertex i, the first edge constituting vertex i is denoted as edge 0, and the second edge constituting vertex i is denoted as edge 1; if the x-direction component of edge 0 points to the negative x-direction and its y-direction component points to the positive y-direction, it is marked as case (a); if the x-direction component of edge 0 points to the positive x-direction and its y-direction component points to the positive y-direction, it is marked as case (b); if the x-direction component of edge 0 points to the negative x-direction and its y-direction component points to the negative y-direction, it is marked as case (c); if the x-direction component of edge 0 points to the positive x-direction and its y-direction component points to the negative y-direction, it is marked as case (d).

[0033] Step 332: For case (a), the filling direction of the scan line gap is the positive x direction, the starting point of the scan line after filling remains unchanged, and the x-coordinate of the ending point is shown in formula (5); For case (b), the filling direction of the scan line gap is the negative x direction, the ending point of the scan line after filling remains unchanged, and the x-coordinate of the starting point is shown in formula (6); For case (c), the filling direction of the scan line gap is the positive x direction, the starting point of the scan line after filling remains unchanged, and the x-coordinate of the ending point is shown in formula (7); For case (d), the filling direction of the scan line gap is the negative x direction, the ending point of the scan line after filling remains unchanged, and the x-coordinate of the starting point is shown in formula (8).

[0034]

[0035]

[0036]

[0037]

[0038] In formulas (5) to (8), h is the scanning height with scan line gaps, a is the x-coordinate of vertex i, b is the y-coordinate of vertex i, k0 and k1 are the slopes of edge 0 and edge 1, respectively, and x sThe x-coordinate of the starting point of the scan line before filling, x s ' is the x-coordinate of the starting point of the filled scan line, x e The x-coordinate of the endpoint of the scan line before filling, x e ' represents the x-coordinate of the end point of the filled scan line, y_step represents the scan precision, and ε is a small quantity that is greater than 0 and much less than 1.

[0039] Preferably, step 41 specifically involves: traversing each vertex of the irregular sheet metal part contour; for vertex i, the first edge constituting vertex i is denoted as edge 0, and the second edge constituting vertex i is denoted as edge 1; if vertex i is a concave point, directly determine vertex (i+1); otherwise, further determine whether vertex i is located on a certain scan line; if vertex i is located on a certain scan line, directly determine vertex (i+1); otherwise, further determine whether edge 0 and edge 1 are in opposite directions in the y direction; if edge 0 and edge 1 are in opposite directions in the y direction, mark the vertex as the vertex that needs to have a scan line added, and then determine vertex (i+1); otherwise, further determine whether edge 0 and edge 1 contain horizontal edges; if edge 0 and edge 1 contain horizontal edges, mark the vertex as the vertex that needs to have a scan line added, and then determine vertex (i+1); otherwise, directly determine vertex (i+1); after traversing each vertex of the irregular sheet metal part contour, all vertices in the irregular sheet metal part contour that need to have scan lines added are obtained.

[0040] Preferably, step 42 specifically includes the following sub-steps:

[0041] Step 421: Traverse each vertex that needs to have a scan line added. For vertex j, denote the first edge that constitutes vertex j as edge 2 and the second edge that constitutes vertex j as edge 3.

[0042] Step 422: Determine whether edge 2 and edge 3 contain horizontal edges; when edge 2 and edge 3 contain horizontal edges, if the y-coordinate of the midpoint of the non-horizontal edge in edge 2 and edge 3 is less than the y-coordinate of the midpoint of the horizontal edge, then the height of the scan line to be added is the smallest scan height among all scan heights greater than the y-coordinate of vertex j. The x-coordinate of the starting point and the x-coordinate of the ending point of the scan line to be added are shown in formula (9) and formula (10).

[0043] Step 423: If the y-coordinate of the midpoint of the non-horizontal edge in edge 2 and edge 3 is greater than the y-coordinate of the midpoint of the horizontal edge, the addition height of the scan line to be added is the largest scan height among all scan heights less than the y-coordinate of vertex j. The x-coordinate of the starting point and the x-coordinate of the ending point of the scan line to be added are shown in formula (9) and formula (10).

[0044] Step 424: When there are no horizontal edges in edge 2 and edge 3, if the y-direction component of edge 2 points to the positive direction of the y-coordinate axis, and the x-coordinate of the starting point of edge 2 and the x-coordinate of the ending point of edge 3 are both less than the x-coordinate of vertex j, then the height of the scan line to be added is the smallest scan height among all scan heights greater than the y-coordinate of vertex j. The x-coordinate of the starting point of the scan line to be added is shown in formula (11), and the x-coordinate of the ending point of the scan line to be added is equal to the x-coordinate of vertex j; if the y-direction component of edge 2 points to the negative direction of the y-coordinate axis, and the x-coordinate of the starting point of edge 2 and the x-coordinate of the ending point of edge 1 are both less than the x-coordinate of vertex j, then the height of the scan line to be added is the largest scan height among all scan heights less than the y-coordinate of vertex j. The x-coordinate of the starting point of the scan line to be added is shown in formula (12), and the x-coordinate of the ending point of the scan line to be added is equal to the x-coordinate of vertex j.

[0045] Step 425: If the y-direction component of edge 2 points to the positive direction of the y-coordinate axis, and the x-coordinate of the starting point of edge 2 and the x-coordinate of the ending point of edge 3 are both greater than the x-coordinate of vertex j, then the height of the scan line to be added is the smallest scan height among all scan heights greater than the y-coordinate of vertex j. The x-coordinate of the starting point of the scan line to be added is equal to the x-coordinate of vertex j, and the x-coordinate of the ending point of the scan line to be added is as shown in formula (13).

[0046] Step 426: If the y-direction component of edge 2 points to the negative direction of the y-coordinate axis, and the x-coordinate of the starting point of edge 2 and the x-coordinate of the ending point of edge 3 are both greater than the x-coordinate of vertex j, then the height of the scan line to be added is the largest scan height among all scan heights less than the y-coordinate of vertex j. The x-coordinate of the starting point of the scan line to be added is equal to the x-coordinate of vertex j, and the x-coordinate of the ending point of the scan line to be added is as shown in formula (14).

[0047] Step 427: If the y-direction component of edge 2 points to the positive direction of the y-coordinate axis, and the x-coordinate of the starting point of edge 2 minus the x-coordinate of vertex j is opposite in sign to the x-coordinate of the ending point of edge 3 minus the x-coordinate of vertex j, then the height of the scan line to be added is the smallest scan height among all scan heights greater than the y-coordinate of vertex j. The x-coordinate of the starting point of the scan line to be added is shown in formula (15), and the x-coordinate of the ending point of the scan line to be added is shown in formula (16); If the y-direction component of edge 2 points to the negative direction of the y-coordinate axis, and the x-coordinate of the starting point of edge 2 minus the x-coordinate of vertex j is opposite in sign to the x-coordinate of the ending point of edge 3 minus the x-coordinate of vertex j, then the height of the scan line to be added is the largest scan height among all scan heights less than the y-coordinate of vertex j. The x-coordinate of the starting point of the scan line to be added is shown in formula (15), and the x-coordinate of the ending point of the scan line to be added is shown in formula (16).

[0048] Step 428: When edge 2 is a vertical edge and its y-direction component points to the positive direction of the y-coordinate axis, the x-coordinate of the starting point of the scan line to be added is as shown in formula (17), and the x-coordinate of the ending point of the scan line to be added is equal to the x-coordinate of vertex j; when edge 2 is a vertical edge and its y-direction component points to the negative direction of the y-coordinate axis, the x-coordinate of the starting point of the scan line to be added is equal to the x-coordinate of vertex j, and the x-coordinate of the ending point of the scan line to be added is as shown in formula (18).

[0049] Step 429: When edge 3 is a vertical edge and its y-direction component points to the positive direction of the y-coordinate axis, the x-coordinate of the starting point of the scan line to be added is as shown in formula (19), and the x-coordinate of the ending point of the scan line to be added is equal to the x-coordinate of vertex j; when edge 3 is a vertical edge and its y-direction component points to the negative direction of the y-coordinate axis, the x-coordinate of the starting point of the scan line to be added is equal to the x-coordinate of vertex j, and the x-coordinate of the ending point of the scan line to be added is as shown in formula (20).

[0050]

[0051]

[0052]

[0053]

[0054]

[0055]

[0056] x s =a-ε (15)

[0057] x e =a+ε (16)

[0058]

[0059]

[0060]

[0061]

[0062] In formulas (9) to (20), x s Let x be the x-coordinate of the starting point of the scan line to be added. e The x-coordinate of the endpoint of the scan line to be added. Let x be the x-coordinate of the starting point of the horizontal edge in edge 2 and edge 3. Let be the x-coordinate of the endpoint of the horizontal edge in edge 2 and edge 3, a be the x-coordinate of vertex j, b be the y-coordinate of vertex j, k0 and k1 be the slopes of edge 0 and edge 1 respectively, h be the scan height where the scan line to be added is located, y_step be the scan precision, and ε be a small quantity that is greater than 0 and much less than 1.

[0063] Preferably, step 51 specifically includes the following sub-steps:

[0064] Step 511: Traverse each vertex of the irregular sheet metal outline. For vertex i, the first edge constituting vertex i is denoted as edge 0, and the second edge constituting vertex i is denoted as edge 1.

[0065] Step 512: Determine the concavity or convexity of vertex i. If vertex i is concave, then directly determine vertex (i+1); otherwise, further determine whether vertex i is on a certain scan line.

[0066] Step 513: If vertex i is on a certain scan line, then directly determine vertex (i+1); otherwise, determine whether edge 0 and edge 1 are one horizontal edge and the other vertical edge.

[0067] Step 514: If one of edge 0 and edge 1 is a horizontal edge and the other is a vertical edge, then directly determine the vertex (i+1); otherwise, determine whether edge 0 and edge 1 contain a horizontal edge.

[0068] Step 515: If edge 0 and edge 1 contain horizontal edges, further determine whether edge 0 and edge 1 are in the same x direction; if edge 0 and edge 1 are in the same x direction, directly determine vertex (i+1); otherwise, mark vertex i as a vertex that has a scan line that needs to be extended, and then determine vertex (i+1); if edge 0 and edge 1 do not contain horizontal edges, further determine whether edge 0 and edge 1 contain vertical edges; if edge 0 and edge 1 contain vertical edges, further determine whether edge 0 and edge 1 are in the same y direction.

[0069] Step 516: If edge 0 and edge 1 are in the same direction in the y direction, mark vertex i as a vertex that has a scan line that needs to be extended, and then determine vertex (i+1); if edge 0 and edge 1 are in opposite directions in the y direction, then directly determine vertex (i+1); if edge 0 and edge 1 do not contain a vertical edge, further determine whether edge 0 and edge 1 are in opposite directions in the x direction and in the same direction in the y direction.

[0070] Step 517: If edge 0 and edge 1 are opposite in the x-direction and in the y-direction, mark vertex i as a vertex that has a scan line that needs to be extended, and then check vertex (i+1). Otherwise, further check whether edge 0 and edge 1 are in the same x-direction and in the same y-direction.

[0071] Step 518: If edge 0 and edge 1 are opposite in the x direction and opposite in the y direction, mark vertex i as a vertex that has a scan line that needs to be extended, and then make a judgment on vertex (i+1). Otherwise, make a judgment on vertex (i+1) directly. After traversing each vertex of the irregular sheet metal contour, all vertices in the irregular sheet metal contour that have scan lines that need to be extended are obtained.

[0072] Preferably, in step 5, the specific process 52 of determining the extension direction and extension length of each scan line to be extended further includes:

[0073] Step 521: Traverse each vertex that has a scan line that needs to be extended. For vertex j, denote the first edge that constitutes vertex j as edge 2 and the second edge that constitutes vertex j as edge 3.

[0074] Step 522: Determine whether edge 2 and edge 3 contain horizontal edges; if edge 2 and edge 3 contain horizontal edges, further determine which of edge 2 and edge 3 is a horizontal edge; if edge 2 is a horizontal edge and its x-direction component points to the negative x-direction, then the extension direction of the scan line corresponding to this vertex is the negative x-direction, and the x-coordinate of the starting point of the extended scan line is equal to the x-coordinate of vertex j; if edge 2 is a horizontal edge and its x-direction component points to the positive x-direction, then the extension direction of the scan line corresponding to this vertex is the positive x-direction, and the x-coordinate of the ending point of the extended scan line is equal to the x-coordinate of vertex j; if edge 3 is a horizontal edge and its x-direction component points to the negative x-direction, then the extension direction of the scan line corresponding to this vertex is the positive x-direction, and the x-coordinate of the ending point of the extended scan line is equal to the x-coordinate of vertex j; if edge 3 is a horizontal edge and its x-direction component points to the positive x-direction, then the extension direction of the scan line corresponding to this vertex is the negative x-direction, and the x-coordinate of the starting point of the extended scan line is equal to the x-coordinate of vertex j.

[0075] Step 523: If edge 2 and edge 3 do not contain horizontal edges, determine whether edge 2 and edge 3 contain vertical edges; if edge 2 is a vertical edge and its y-direction component points to the positive y-direction, then the extension direction of the scan line corresponding to this vertex is the positive x-direction, and the x-coordinate of the endpoint of the extended scan line is equal to the x-coordinate of vertex j.

[0076] Step 524: If edge 2 is a vertical edge and its y-direction component points in the negative y direction, then the extension direction of the scan line corresponding to this vertex is in the negative x direction, and the x-coordinate of the starting point of the extended scan line is equal to the x-coordinate of vertex j; if edge 3 is a vertical edge and its y-direction component points in the positive y direction, then the extension direction of the scan line corresponding to this vertex is in the positive x direction, and the x-coordinate of the ending point of the extended scan line is equal to the x-coordinate of vertex j; if edge 3 is a vertical edge and its y-direction component points in the negative y direction, then the extension direction of the scan line corresponding to this vertex is in the negative x direction, and the x-coordinate of the starting point of the extended scan line is equal to the x-coordinate of vertex j.

[0077] Step 525: If neither edge 2 nor edge 3 contains a perpendicular edge, further determine whether edge 2 and edge 3 are opposite in the x and y directions; if edge 2 and edge 3 are opposite in the x direction but in the same direction in the y direction, and the x-direction component of edge 2 points to the negative x direction, then the extension direction of the scan line corresponding to this vertex is the negative x direction, and the x-coordinate of the starting point of the extended scan line is equal to the x-coordinate of vertex j; if edge 2 and edge 3 are opposite in the x direction but in the same direction in the y direction, and the x-direction component of edge 2 points to the positive x direction, then the extension direction of the scan line corresponding to this vertex is the positive x direction, and the x-coordinate of the ending point of the extended scan line is equal to the x-coordinate of vertex j.

[0078] Step 526: If edge 2 and edge 3 satisfy any of the following state conditions, execute the corresponding operation after the state condition:

[0079] State 1: Edges 2 and 3 are in the same direction in the x and y directions, and the x-direction component of edge 2 points to the negative x direction and the y-direction component of edge 2 points to the negative y direction. Then the extension direction of the scan line corresponding to this vertex is the negative x direction, and the x-coordinate of the starting point of the extended scan line is equal to the x-coordinate of vertex j.

[0080] State 2: Edge 2 and edge 3 are in the same direction in the x direction and in the same direction in the y direction. The x-direction component of edge 2 points to the positive x-direction and the y-direction component of edge 2 points to the negative y-direction. Then the extension direction of the scan line corresponding to this vertex is the negative x-direction, and the x-coordinate of the starting point of the extended scan line is equal to the x-coordinate of vertex j.

[0081] State 3: If edge 2 and edge 3 are in the same direction in the x direction and in the same direction in the y direction, and the x-direction component of edge 2 points to the positive x direction and the y-direction component of edge 2 points to the positive y direction, then the extension direction of the scan line corresponding to this vertex is the positive x direction, and the x-coordinate of the endpoint of the extended scan line is equal to the x-coordinate of vertex j.

[0082] State 4: If edge 2 and edge 3 are in the same direction in the x direction and in the same direction in the y direction, and the x-direction component of edge 2 points to the negative x direction and the y-direction component of edge 2 points to the positive y direction, then the extension direction of the scan line corresponding to this vertex is the positive x direction, and the x-coordinate of the endpoint of the extended scan line is equal to the x-coordinate of vertex j.

[0083] State 5: If edge 2 and edge 3 are opposite in the x direction and opposite in the y direction, and the x-direction component of edge 2 points to the negative x direction and the y-direction component of edge 2 points to the positive y direction, then the extension direction of the scan line corresponding to this vertex is the negative x direction, and the x-coordinate of the starting point of the extended scan line is equal to the x-coordinate of vertex j.

[0084] State 6: If edge 2 and edge 3 are opposite in the x direction and opposite in the y direction, and the x-direction component of edge 2 points to the negative x direction and the y-direction component of edge 2 points to the negative y direction, then the extension direction of the scan line corresponding to this vertex is the negative x direction, and the x-coordinate of the starting point of the extended scan line is equal to the x-coordinate of vertex j.

[0085] State 7: If edge 2 and edge 3 are opposite in the x direction and opposite in the y direction, and the x-direction component of edge 2 points to the positive x direction and the y-direction component of edge 2 points to the negative y direction, then the extension direction of the scan line corresponding to this vertex is the positive x direction, and the x-coordinate of the endpoint of the extended scan line is equal to the x-coordinate of vertex j.

[0086] State 8: If edge 2 and edge 3 are opposite in the x-direction and opposite in the y-direction, and the x-direction component of edge 2 points to the positive x-direction and the y-direction component of edge 3 points to the positive y-direction, then the extension direction of the scan line corresponding to this vertex is the positive x-direction, and the x-coordinate of the endpoint of the extended scan line is equal to the x-coordinate of vertex j.

[0087] Compared with the prior art, the present invention has the following beneficial effects:

[0088] 1. The present invention provides a scanning line filling method for non-interference layout of irregular sheet metal parts. It employs scanning line gap filling, scanning line addition, and scanning line extension operations. Under a given scanning accuracy, it can completely and effectively represent the contour information of irregular sheet metal parts and has excellent information integrity.

[0089] 2. The present invention provides a scanning line filling method for non-interference layout of irregular sheet metal parts. Based on the generation of basic scanning lines for irregular sheet metal parts, the method fills the gaps between the basic scanning lines, adds scanning lines and extends scanning lines, and finally obtains the scanning lines of the irregular sheet metal parts contour with non-interference layout characteristics, which effectively improves the feasibility of the layout scheme. Attached Figure Description

[0090] Figure 1Example diagram of the outline of an irregular sheet metal part;

[0091] Figure 2 This is a schematic diagram of the existing basic scan line generation process;

[0092] Figure 3 This is a schematic diagram illustrating the effect of scan line gap on determining whether interference occurs in the contour of an irregular sheet metal part.

[0093] Figure 4 Four cases for generating scan line gaps (a)-(d);

[0094] Figure 5 The conditions for generating the scan line gap in this invention;

[0095] Figure 6 The influence of missing convex point information on the interference of irregular sheet metal contours 1;

[0096] Figure 7 The impact of lost convex point information on the interference of irregular sheet metal contours 2;

[0097] Figure 8 An example drawing of the outline of an irregular sheet metal part input for an embodiment of the present invention;

[0098] Figure 9 The basic scan lines for the irregular sheet metal part contour of this invention;

[0099] Figure 10 The scan lines are the basic scan lines used to fill the gaps between scan lines for the irregular sheet metal parts of this invention.

[0100] Figure 11 The basic scan lines for filling the gaps between scan lines and the scan lines after adding scan lines are used to define the irregular sheet metal part contour of the present invention.

[0101] Figure 12 The scan line information for the final complete irregular sheet metal part outline of the present invention;

[0102] Figure 13 This is a layout diagram of an irregular sheet metal part obtained using existing scan line filling technology.

[0103] Figure 14 This is a schematic diagram of the irregular sheet metal part outline layout obtained using the present invention;

[0104] Figure 15 This is a flowchart of the scanning line filling method for non-interference nesting of irregular sheet metal parts according to the present invention. Detailed Implementation

[0105] Exemplary embodiments, features, and aspects of the present invention will now be described in detail with reference to the accompanying drawings. The same reference numerals in the drawings denote elements that have the same or similar functions. Although various aspects of the embodiments are shown in the drawings, they are not necessarily drawn to scale unless specifically indicated otherwise.

[0106] To fully describe the technical content, structural features, objectives, and effects of this invention, a detailed description will be provided below in conjunction with the accompanying drawings.

[0107] This invention provides a scan line filling method for interference-free layout of irregular sheet metal parts. By employing scan line gap filling, scan line addition, and scan line extension operations, the scan lines achieve a complete representation of the contour information of the irregular sheet metal parts, thereby effectively solving the contour interference problem in the layout process of irregular sheet metal parts. Given a certain scanning accuracy, it can completely and efficiently represent the contour information of irregular sheet metal parts, exhibiting excellent information completeness and effectively improving the feasibility of the layout scheme. Specific steps include: inputting the vertex information and scanning accuracy of the irregular sheet metal part contour; generating the basic scan lines of the irregular sheet metal part contour; filling the scan line gaps in the basic scan lines of the irregular sheet metal part contour; adding necessary scan lines to the basic scan lines of the irregular sheet metal part contour; extending some scan lines in the basic scan lines of the irregular sheet metal part contour; and outputting the complete scan lines of the irregular sheet metal part contour.

[0108] Specifically, such as Figure 15 As shown, the present invention provides a scan line filling method for interference-free layout of irregular sheet metal parts, which includes the following steps:

[0109] Step 1: Input the vertex information and scanning precision y_step of the irregular sheet metal part contour; the irregular sheet metal part contour is composed of vertices connected in a counterclockwise order; the vertex information includes the x-coordinate, y-coordinate and concavity / convexity feature of the vertex. If the vertex is a convex point, its concavity / convexity feature is 1, otherwise it is 0; the scanning precision y_step refers to the interval between two adjacent scanning heights. Figure 1 A schematic diagram of the irregular sheet metal part of the present invention is shown.

[0110] Step 2: Generate the basic scan lines of the irregular sheet metal part contour; Starting from the initial scan height, draw horizontal lines that extend infinitely to both ends at each scan height with the scan accuracy y_step as the step size. The horizontal lines enter the interior of the irregular sheet metal part contour and then exit. The horizontal lines at each scan height include an inner horizontal line segment located inside the irregular sheet metal part contour and an outer horizontal line segment located outside the irregular sheet metal part contour. All the inner horizontal line segments at each scan height together form the basic scan lines of the irregular sheet metal part contour. Figure 2 A schematic diagram of the basic scan line generation process of the present invention is shown.

[0111] Step 3: Fill the gaps in the basic scan lines of the irregular sheet metal part contour; specifically including the following sub-steps: S31, find all possible scan heights where scan line gaps may exist in the irregular sheet metal part contour; S32, determine whether there are scan line gaps among all possible scan heights by calculating the gap discriminant; S33, if scan line gaps exist, determine the filling direction and filling length of the scan line gaps, and complete the filling of the scan line gaps.

[0112] Step 4: Add necessary scan lines to the basic scan lines of the irregular sheet metal part outline; specifically, it includes the following sub-steps: S41, find all the positions in the irregular sheet metal part outline where necessary scan lines need to be added; S42, determine the addition information for each necessary scan line to be added.

[0113] Step 5: Extend some of the scan lines in the basic scan lines of the irregular sheet metal part contour; specifically, it includes the following sub-steps: S51, find the positions of all scan lines that need to be extended, S52, determine the extension direction and extension length of each scan line to be extended.

[0114] Step 6: Output the complete scan lines of the irregular sheet metal part outline.

[0115] in, Figure 3 This diagram illustrates the effect of the scan line gap of the present invention on whether interference occurs in the contour of an irregular sheet metal part. Figure 4 Four cases of generating scan line gaps (a)-(d) according to the present invention are shown; Figure 5 A schematic diagram illustrating the conditions for generating the scan line gap according to the present invention is shown; Figure 6 This illustrates the effect of missing bump information on the interference of irregular sheet metal contours according to the present invention 1; Figure 7 The effect of missing bump information on the contour interference of irregular sheet metal parts is illustrated in the present invention.

[0116] The method of the present invention will be described in detail below with reference to specific embodiments. This embodiment takes an irregular sheet metal part in the aerospace field as an example, and adopts the scan line filling method for interference-free nesting of irregular sheet metal parts proposed in this invention, which specifically includes the following steps:

[0117] Step 1: Input the vertex information and scanning precision y_step of the irregular sheet metal part contour; the irregular sheet metal part contour is composed of vertices connected counterclockwise; vertex information includes the x-coordinate, y-coordinate, and concavity / convexity feature of the vertex. If the vertex is a convex point, its concavity / convexity feature is 1, otherwise it is 0; the vertex information of the irregular sheet metal part contour in this embodiment is shown in Table 1; the irregular sheet metal part contour contains concave and convex points, and contains positions that can form the gaps between scanning lines; the drawn irregular sheet metal part contour is as follows. Figure 8As shown, the scanning precision is set to y_step = 0.7, where y_step refers to the interval between two adjacent scanning heights.

[0118] Table 1 Vertex information of irregular sheet metal parts contours

[0119]

[0120] Step 2: Generate the basic scan lines of the irregular sheet metal part contour; Starting from the initial scan height, draw horizontal lines that extend infinitely to both ends at each scan height with the scan accuracy y_step as the step size. The horizontal lines are drawn to enter the interior of the irregular sheet metal part contour and then exit. The horizontal lines at each scan height include an inner horizontal line segment located inside the irregular sheet metal part contour and an outer horizontal line segment located outside the irregular sheet metal part contour. All the inner horizontal line segments at each scan height together form the basic scan lines of the irregular sheet metal part contour.

[0121] The process of obtaining all inner horizontal line segments located within the irregular sheet metal contour at the scan height of the i-th horizontal line specifically includes:

[0122] Step 21: For the scanning height of the i-th horizontal line Iterate through each edge of the irregular sheet metal part's outline; if edge j is a horizontal edge, skip that edge and proceed directly to the judgment of edge (j+1); otherwise, proceed to the judgment of edge (j+1). Is it within the range of the projection of edge j onto the y-axis? If Within the range of the projection of edge j onto the y-axis, then Substitute the equation of the line on side j to calculate corresponding This indicates that the y-coordinate of the line on side j is the height. If the x-coordinate of the point is not specified, then the (j+1) edge is checked; i is the index of the horizontal line, and j is the index of the irregular sheet metal outline edge, where i and j are both positive integers.

[0123] Step 22: Calculate Then, determine the point. Is it a vertex of an irregular sheet metal part's outline? When point When the vertex is not a polygon, if Points already exist in the middle Then check edge (j+1); otherwise, proceed to... Store a Then, the (j+1) edge is evaluated;

[0124] Step 23: When the point When the vertex is an irregular sheet metal part, determine the concavity or convexity of the vertex: if the vertex is concave, then determine... Does a point already exist in the middle? like Points already exist in the middle Then check edge (j+1); otherwise, proceed to... Store two Then, the (j+1) edge is checked; if the vertex is convex, it is checked whether the two edges constituting the vertex are opposite in the y-direction; if they are opposite, the (j+1) edge is checked directly, otherwise... Does a point already exist in the middle? If the point already exists, then check the (j+1) edge; otherwise, proceed to... Store a Then, the (j+1) edge is checked; after traversing each edge of the irregular sheet metal part outline, it is stored... All points are sorted in ascending order based on their x-coordinate values, and then sequentially and without repetition are... In this model, every two points form a combined element, and each combined element represents a scan line segment. The first point in the combined element represents the starting point of the scan line segment, and the second point represents the ending point. In this embodiment, the basic scan line information of the irregular sheet metal part contour obtained by traversing each scan height is as follows: Figure 9 As shown.

[0125] Step 3: Fill the gaps in the basic scan lines of the irregular sheet metal part contour; specifically including sub-steps S31, S32, and S33, as follows:

[0126] S31. Find the scanning height of all possible gaps between scanning lines in the contour of the irregular sheet metal part. Step S31 specifically includes the following sub-steps:

[0127] Step 311: Traverse each vertex of the irregular sheet metal contour. For vertex i, determine the concavity or convexity of vertex i. If vertex i is concave, directly determine the concavity or convexity of vertex i+1. If vertex i is convex, further determine whether the two sides constituting the vertex are opposite in both the x and y directions. If the two sides constituting vertex i are opposite in both the x and y directions, mark vertex i as a vertex that may have scan line gaps. Otherwise, directly determine the concavity or convexity of vertex (i+1).

[0128] Step 312: After traversing each vertex of the irregular sheet metal part contour, obtain all vertices in the polygon that may have scan line gaps; traverse each vertex that may have scan line gaps. For vertex j that may have scan line gaps, if there is no scan height within the range of the two sides constituting vertex j projected onto the y-axis, directly determine vertex (j+1). Otherwise, record vertex j and all scan heights within the range of the two sides constituting vertex j projected onto the y-axis, and then determine vertex (j+1); after traversing each vertex that may have scan line gaps, obtain all scan heights in the irregular sheet metal part contour that may have scan line gaps and their corresponding vertices.

[0129] S32. By calculating the gap discriminant, determine whether there is a scan line gap in all scan heights where there is a scan line gap.

[0130] In step S32, the gap discriminant is shown in formulas (1) to (4):

[0131]

[0132]

[0133]

[0134]

[0135] In formulas (1) to (4), h is the y-coordinate value of the scanning height to be determined; k0 and k1 are the slopes of the first and second edges that constitute the vertex corresponding to the scanning height to be determined, respectively; b is the y-coordinate value of the vertex corresponding to the scanning height to be determined; and y_step is the scanning precision.

[0136] The specific method for determining whether a scan line gap exists among all scan heights with scan line gaps in step S32 is as follows:

[0137] If the x-direction component of the first edge that constitutes the vertex corresponding to the scanning height to be judged points to the negative x-axis and the y-direction component points to the positive y-axis, then the gap is judged using formula (1).

[0138] If the x-direction component of the first edge that constitutes the vertex corresponding to the scanning height to be judged points to the positive x-axis and the y-direction component points to the positive y-axis, then the gap is judged using formula (2).

[0139] If the x-direction component of the first edge that constitutes the vertex corresponding to the scanning height to be judged points to the negative x-axis and the y-direction component points to the negative y-axis, then the gap is judged using formula (3).

[0140] If the x-direction component of the first edge that constitutes the vertex corresponding to the scan height to be judged points to the positive direction of the x-coordinate axis and the y-direction component points to the negative direction of the y-coordinate axis, then the gap is judged by formula (4); when h satisfies the corresponding inequality, it indicates that there is no scan line gap in the scan height to be judged, otherwise it indicates that there is a scan line gap in the scan height to be judged.

[0141] S33. If scan line gaps exist, determine the filling direction and length of the scan line gaps, and complete the filling of the scan line gaps; Step S33 specifically includes:

[0142] Step 331: For a scan height h with scan line gaps and its corresponding vertex i, the first edge constituting vertex i is denoted as edge 0, and the second edge constituting vertex i is denoted as edge 1; if the x-direction component of edge 0 points to the negative x-direction and its y-direction component points to the positive y-direction, it is marked as case (a); if the x-direction component of edge 0 points to the positive x-direction and its y-direction component points to the positive y-direction, it is marked as case (b); if the x-direction component of edge 0 points to the negative x-direction and its y-direction component points to the negative y-direction, it is marked as case (c); if the x-direction component of edge 0 points to the positive x-direction and its y-direction component points to the negative y-direction, it is marked as case (d).

[0143] Step 332: For case (a), the filling direction of the scan line gap is the positive x direction, the starting point of the scan line after filling remains unchanged, and the x-coordinate of the ending point is shown in formula (5); For case (b), the filling direction of the scan line gap is the negative x direction, the ending point of the scan line after filling remains unchanged, and the x-coordinate of the starting point is shown in formula (6); For case (c), the filling direction of the scan line gap is the positive x direction, the starting point of the scan line after filling remains unchanged, and the x-coordinate of the ending point is shown in formula (7); For case (d), the filling direction of the scan line gap is the negative x direction, the ending point of the scan line after filling remains unchanged, and the x-coordinate of the starting point is shown in formula (8).

[0144]

[0145]

[0146]

[0147]

[0148] In formulas (5) to (8), h is the scanning height with scan line gaps, a is the x-coordinate of vertex i, b is the y-coordinate of vertex i, k0 and k1 are the slopes of edge 0 and edge 1, respectively, and x s The x-coordinate of the starting point of the scan line before filling, x s ' is the x-coordinate of the starting point of the filled scan line, x eThe x-coordinate of the endpoint of the scan line before filling, x e ' represents the x-coordinate of the endpoint of the filled scan line, y_step represents the scan precision, and ε is a small value greater than 0 and much less than 1. The result of filling the scan line gaps in this embodiment is as follows: Figure 10 As shown.

[0149] Step 4: Add necessary scan lines to the basic scan lines of the irregular sheet metal part contour; this specifically includes the following sub-steps S41 and S42:

[0150] S41. Locate all positions in the irregular sheet metal part outline where necessary scan lines need to be added. The specific step b is as follows:

[0151] Iterate through each vertex of the irregular sheet metal part contour. For vertex i, denote the first edge constituting vertex i as edge 0 and the second edge constituting vertex i as edge 1. If vertex i is concave, directly determine vertex (i+1); otherwise, further determine whether vertex i is located on a certain scan line. If vertex i is located on a certain scan line, directly determine vertex (i+1); otherwise, further determine whether edge 0 and edge 1 are reversed in the y-direction. If edge 0 and edge 1 are reversed in the y-direction, mark the vertex as the vertex that needs to have a scan line added, and then determine vertex (i+1); otherwise, further determine whether edge 0 and edge 1 contain horizontal edges. If edge 0 and edge 1 contain horizontal edges, mark the vertex as the vertex that needs to have a scan line added, and then determine vertex (i+1); otherwise, directly determine vertex (i+1). After traversing each vertex of the irregular sheet metal part contour, obtain all vertices in the irregular sheet metal part contour that need to have scan lines added.

[0152] S42. Determine the addition information for each scan line to be added; specifically including the following sub-steps:

[0153] Step 421: Traverse each vertex that needs to have a scan line added. For vertex j, denote the first edge that constitutes vertex j as edge 2 and the second edge that constitutes vertex j as edge 3.

[0154] Step 422: Determine whether edge 2 and edge 3 contain horizontal edges; when edge 2 and edge 3 contain horizontal edges, if the y-coordinate of the midpoint of the non-horizontal edge in edge 2 and edge 3 is less than the y-coordinate of the midpoint of the horizontal edge, then the height of the scan line to be added is the smallest scan height among all scan heights greater than the y-coordinate of vertex j. The x-coordinate of the starting point and the x-coordinate of the ending point of the scan line to be added are shown in formula (9) and formula (10).

[0155] Step 423: If the y-coordinate of the midpoint of the non-horizontal edge in edge 2 and edge 3 is greater than the y-coordinate of the midpoint of the horizontal edge, the addition height of the scan line to be added is the largest scan height among all scan heights less than the y-coordinate of vertex j. The x-coordinate of the starting point and the x-coordinate of the ending point of the scan line to be added are shown in formula (9) and formula (10).

[0156] Step 424: When there are no horizontal edges in edge 2 and edge 3, if the y-direction component of edge 2 points to the positive direction of the y-coordinate axis, and the x-coordinate of the starting point of edge 2 and the x-coordinate of the ending point of edge 3 are both less than the x-coordinate of vertex j, then the height of the scan line to be added is the smallest scan height among all scan heights greater than the y-coordinate of vertex j. The x-coordinate of the starting point of the scan line to be added is shown in formula (11), and the x-coordinate of the ending point of the scan line to be added is equal to the x-coordinate of vertex j; if the y-direction component of edge 2 points to the negative direction of the y-coordinate axis, and the x-coordinate of the starting point of edge 2 and the x-coordinate of the ending point of edge 1 are both less than the x-coordinate of vertex j, then the height of the scan line to be added is the largest scan height among all scan heights less than the y-coordinate of vertex j. The x-coordinate of the starting point of the scan line to be added is shown in formula (12), and the x-coordinate of the ending point of the scan line to be added is equal to the x-coordinate of vertex j.

[0157] Step 425: If the y-direction component of edge 2 points to the positive direction of the y-coordinate axis, and the x-coordinate of the starting point of edge 2 and the x-coordinate of the ending point of edge 3 are both greater than the x-coordinate of vertex j, then the height of the scan line to be added is the smallest scan height among all scan heights greater than the y-coordinate of vertex j. The x-coordinate of the starting point of the scan line to be added is equal to the x-coordinate of vertex j, and the x-coordinate of the ending point of the scan line to be added is as shown in formula (13).

[0158] Step 426: If the y-direction component of edge 2 points to the negative direction of the y-coordinate axis, and the x-coordinate of the starting point of edge 2 and the x-coordinate of the ending point of edge 3 are both greater than the x-coordinate of vertex j, then the height of the scan line to be added is the largest scan height among all scan heights less than the y-coordinate of vertex j. The x-coordinate of the starting point of the scan line to be added is equal to the x-coordinate of vertex j, and the x-coordinate of the ending point of the scan line to be added is as shown in formula (14).

[0159] Step 427: If the y-direction component of edge 2 points to the positive direction of the y-coordinate axis, and the x-coordinate of the starting point of edge 2 minus the x-coordinate of vertex j is opposite in sign to the x-coordinate of the ending point of edge 3 minus the x-coordinate of vertex j, then the height of the scan line to be added is the smallest scan height among all scan heights greater than the y-coordinate of vertex j. The x-coordinate of the starting point of the scan line to be added is shown in formula (15), and the x-coordinate of the ending point of the scan line to be added is shown in formula (16); If the y-direction component of edge 2 points to the negative direction of the y-coordinate axis, and the x-coordinate of the starting point of edge 2 minus the x-coordinate of vertex j is opposite in sign to the x-coordinate of the ending point of edge 3 minus the x-coordinate of vertex j, then the height of the scan line to be added is the largest scan height among all scan heights less than the y-coordinate of vertex j. The x-coordinate of the starting point of the scan line to be added is shown in formula (15), and the x-coordinate of the ending point of the scan line to be added is shown in formula (16).

[0160] Step 428: When edge 2 is a vertical edge and its y-direction component points to the positive direction of the y-coordinate axis, the x-coordinate of the starting point of the scan line to be added is as shown in formula (17), and the x-coordinate of the ending point of the scan line to be added is equal to the x-coordinate of vertex j; when edge 2 is a vertical edge and its y-direction component points to the negative direction of the y-coordinate axis, the x-coordinate of the starting point of the scan line to be added is equal to the x-coordinate of vertex j, and the x-coordinate of the ending point of the scan line to be added is as shown in formula (18).

[0161] Step 429: When edge 3 is a vertical edge and its y-direction component points to the positive direction of the y-coordinate axis, the x-coordinate of the starting point of the scan line to be added is as shown in formula (19), and the x-coordinate of the ending point of the scan line to be added is equal to the x-coordinate of vertex j; when edge 3 is a vertical edge and its y-direction component points to the negative direction of the y-coordinate axis, the x-coordinate of the starting point of the scan line to be added is equal to the x-coordinate of vertex j, and the x-coordinate of the ending point of the scan line to be added is as shown in formula (20).

[0162]

[0163]

[0164]

[0165]

[0166]

[0167]

[0168] x s =a-ε (15)

[0169] x e =a+ε (16)

[0170]

[0171]

[0172]

[0173]

[0174] In formulas (9) to (20), x s Let x be the x-coordinate of the starting point of the scan line to be added. e The x-coordinate of the endpoint of the scan line to be added. Let x be the x-coordinate of the starting point of the horizontal edge in edge 2 and edge 3. Let be the x-coordinate of the endpoint of the horizontal edge in edge 2 and edge 3, 'a' be the x-coordinate of vertex j, 'b' be the y-coordinate of vertex j, 'k0' and 'k1' be the slopes of edge 0 and edge 1 respectively, 'h' be the scan height where the scan line to be added is located, 'y_step' be the scan precision, and 'ε' be a small value greater than 0 and much less than 1. The scan line information after adding the scan line in this embodiment is as follows: Figure 11 As shown.

[0175] Step 5: Extend some of the scan lines in the basic scan lines of the irregular sheet metal part contour; this specifically includes sub-steps S51 and S52:

[0176] S51. Locate all scan lines that need to be extended, including the following sub-steps:

[0177] Step 511: Traverse each vertex of the irregular sheet metal outline. For vertex i, the first edge constituting vertex i is denoted as edge 0, and the second edge constituting vertex i is denoted as edge 1.

[0178] Step 512: Determine the concavity or convexity of vertex i. If vertex i is concave, then directly determine vertex (i+1); otherwise, further determine whether vertex i is on a certain scan line.

[0179] Step 513: If vertex i is on a certain scan line, then directly determine vertex (i+1); otherwise, determine whether edge 0 and edge 1 are one horizontal edge and the other vertical edge.

[0180] Step 514: If one of edge 0 and edge 1 is a horizontal edge and the other is a vertical edge, then directly determine the vertex (i+1); otherwise, determine whether edge 0 and edge 1 contain a horizontal edge.

[0181] Step 515: If edge 0 and edge 1 contain horizontal edges, further determine whether edge 0 and edge 1 are in the same x direction; if edge 0 and edge 1 are in the same x direction, directly determine vertex (i+1); otherwise, mark vertex i as a vertex that has a scan line that needs to be extended, and then determine vertex (i+1); if edge 0 and edge 1 do not contain horizontal edges, further determine whether edge 0 and edge 1 contain vertical edges; if edge 0 and edge 1 contain vertical edges, further determine whether edge 0 and edge 1 are in the same y direction.

[0182] Step 516: If edge 0 and edge 1 are in the same direction in the y direction, mark vertex i as a vertex that has a scan line that needs to be extended, and then determine vertex (i+1); if edge 0 and edge 1 are in opposite directions in the y direction, then directly determine vertex (i+1); if edge 0 and edge 1 do not contain a vertical edge, further determine whether edge 0 and edge 1 are in opposite directions in the x direction and in the same direction in the y direction.

[0183] Step 517: If edge 0 and edge 1 are opposite in the x-direction and in the y-direction, mark vertex i as a vertex that has a scan line that needs to be extended, and then check vertex (i+1). Otherwise, further check whether edge 0 and edge 1 are in the same x-direction and in the same y-direction.

[0184] Step 518: If edge 0 and edge 1 are opposite in the x direction and opposite in the y direction, mark vertex i as a vertex that has a scan line that needs to be extended, and then make a judgment on vertex (i+1). Otherwise, make a judgment on vertex (i+1) directly. After traversing each vertex of the irregular sheet metal contour, all vertices in the irregular sheet metal contour that have scan lines that need to be extended are obtained.

[0185] S52. Determine the extension direction and extension length of each scan line to be extended; specifically including the following sub-steps:

[0186] Step 521: Traverse each vertex that has a scan line that needs to be extended. For vertex j, denote the first edge that constitutes vertex j as edge 2 and the second edge that constitutes vertex j as edge 3.

[0187] Step 522: Determine whether edge 2 and edge 3 contain horizontal edges; if edge 2 and edge 3 contain horizontal edges, further determine which of edge 2 and edge 3 is a horizontal edge; if edge 2 is a horizontal edge and its x-direction component points to the negative x-direction, then the extension direction of the scan line corresponding to this vertex is the negative x-direction, and the x-coordinate of the starting point of the extended scan line is equal to the x-coordinate of vertex j; if edge 2 is a horizontal edge and its x-direction component points to the positive x-direction, then the extension direction of the scan line corresponding to this vertex is the positive x-direction, and the x-coordinate of the ending point of the extended scan line is equal to the x-coordinate of vertex j; if edge 3 is a horizontal edge and its x-direction component points to the negative x-direction, then the extension direction of the scan line corresponding to this vertex is the positive x-direction, and the x-coordinate of the ending point of the extended scan line is equal to the x-coordinate of vertex j; if edge 3 is a horizontal edge and its x-direction component points to the positive x-direction, then the extension direction of the scan line corresponding to this vertex is the negative x-direction, and the x-coordinate of the starting point of the extended scan line is equal to the x-coordinate of vertex j.

[0188] Step 523: If edge 2 and edge 3 do not contain horizontal edges, determine whether edge 2 and edge 3 contain vertical edges; if edge 2 is a vertical edge and its y-direction component points to the positive y-direction, then the extension direction of the scan line corresponding to this vertex is the positive x-direction, and the x-coordinate of the endpoint of the extended scan line is equal to the x-coordinate of vertex j.

[0189] Step 524: If edge 2 is a vertical edge and its y-direction component points in the negative y direction, then the extension direction of the scan line corresponding to this vertex is in the negative x direction, and the x-coordinate of the starting point of the extended scan line is equal to the x-coordinate of vertex j; if edge 3 is a vertical edge and its y-direction component points in the positive y direction, then the extension direction of the scan line corresponding to this vertex is in the positive x direction, and the x-coordinate of the ending point of the extended scan line is equal to the x-coordinate of vertex j; if edge 3 is a vertical edge and its y-direction component points in the negative y direction, then the extension direction of the scan line corresponding to this vertex is in the negative x direction, and the x-coordinate of the starting point of the extended scan line is equal to the x-coordinate of vertex j.

[0190] Step 525: If neither edge 2 nor edge 3 contains a perpendicular edge, further determine whether edge 2 and edge 3 are opposite in the x and y directions; if edge 2 and edge 3 are opposite in the x direction but in the same direction in the y direction, and the x-direction component of edge 2 points to the negative x direction, then the extension direction of the scan line corresponding to this vertex is the negative x direction, and the x-coordinate of the starting point of the extended scan line is equal to the x-coordinate of vertex j; if edge 2 and edge 3 are opposite in the x direction but in the same direction in the y direction, and the x-direction component of edge 2 points to the positive x direction, then the extension direction of the scan line corresponding to this vertex is the positive x direction, and the x-coordinate of the ending point of the extended scan line is equal to the x-coordinate of vertex j.

[0191] Step 526: If edge 2 and edge 3 satisfy any of the following state conditions, execute the corresponding operation after the state condition:

[0192] State 1: Edges 2 and 3 are in the same direction in the x and y directions, and the x-direction component of edge 2 points to the negative x direction and the y-direction component of edge 2 points to the negative y direction. Then the extension direction of the scan line corresponding to this vertex is the negative x direction, and the x-coordinate of the starting point of the extended scan line is equal to the x-coordinate of vertex j.

[0193] State 2: Edge 2 and edge 3 are in the same direction in the x direction and in the same direction in the y direction. The x-direction component of edge 2 points to the positive x-direction and the y-direction component of edge 2 points to the negative y-direction. Then the extension direction of the scan line corresponding to this vertex is the negative x-direction, and the x-coordinate of the starting point of the extended scan line is equal to the x-coordinate of vertex j.

[0194] State 3: If edge 2 and edge 3 are in the same direction in the x direction and in the same direction in the y direction, and the x-direction component of edge 2 points to the positive x direction and the y-direction component of edge 2 points to the positive y direction, then the extension direction of the scan line corresponding to this vertex is the positive x direction, and the x-coordinate of the endpoint of the extended scan line is equal to the x-coordinate of vertex j.

[0195] State 4: If edge 2 and edge 3 are in the same direction in the x direction and in the same direction in the y direction, and the x-direction component of edge 2 points to the negative x direction and the y-direction component of edge 2 points to the positive y direction, then the extension direction of the scan line corresponding to this vertex is the positive x direction, and the x-coordinate of the endpoint of the extended scan line is equal to the x-coordinate of vertex j.

[0196] State 5: If edge 2 and edge 3 are opposite in the x direction and opposite in the y direction, and the x-direction component of edge 2 points to the negative x direction and the y-direction component of edge 2 points to the positive y direction, then the extension direction of the scan line corresponding to this vertex is the negative x direction, and the x-coordinate of the starting point of the extended scan line is equal to the x-coordinate of vertex j.

[0197] State 6: If edge 2 and edge 3 are opposite in the x direction and opposite in the y direction, and the x-direction component of edge 2 points to the negative x direction and the y-direction component of edge 2 points to the negative y direction, then the extension direction of the scan line corresponding to this vertex is the negative x direction, and the x-coordinate of the starting point of the extended scan line is equal to the x-coordinate of vertex j.

[0198] State 7: If edge 2 and edge 3 are opposite in the x direction and opposite in the y direction, and the x-direction component of edge 2 points to the positive x direction and the y-direction component of edge 2 points to the negative y direction, then the extension direction of the scan line corresponding to this vertex is the positive x direction, and the x-coordinate of the endpoint of the extended scan line is equal to the x-coordinate of vertex j.

[0199] State 8: If edges 2 and 3 are opposite in the x-direction and opposite in the y-direction, and the x-direction component of edge 2 points to the positive x-direction, and the y-direction component of edge 3 points to the positive y-direction, then the extension direction of the scan line corresponding to this vertex is the positive x-direction, and the x-coordinate of the endpoint of the extended scan line is equal to the x-coordinate of vertex j. The complete scan line information obtained after extending the scan line in this embodiment is as follows: Figure 12 As shown.

[0200] Step 6: Output the complete scan lines of the irregular sheet metal part outline.

[0201] After obtaining the complete scan lines of the irregular sheet metal part outline, the system judges whether interference occurs between the sheet metal parts during the layout process, so as to achieve interference-free sheet metal part layout.

[0202] This invention provides a scan-line filling method for interference-free layout of irregular sheet metal parts, applicable to irregular sheet metal part contours involved in irregular sheet metal part layout. Compared to existing technologies, the scan lines generated by this method can completely express the contour information of irregular sheet metal parts, thus ensuring no interference between irregular sheet metal part contours in the layout scheme. To further demonstrate the effectiveness of this invention, irregular sheet metal part contours obtained using existing scan-line filling technology and those obtained using this invention were used for irregular sheet metal part contour layout, respectively. Figure 13 This is a layout diagram of an irregular sheet metal part obtained using existing scan line filling technology. Figure 14 This is a diagram showing the layout scheme for irregular sheet metal parts obtained using the present invention; it can be clearly seen that... Figure 13 Interference occurred between the irregular outlines of the sheet metal parts in the middle section; and Figure 14 No interference occurred between the irregular sheet metal contours, proving the effectiveness of the invention.

[0203] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Various modifications and improvements made by those skilled in the art to the technical solutions of the present invention without departing from the spirit of the present invention should fall within the protection scope defined by the claims of the present invention.

Claims

1. A scanning line filling method for interference-free layout of irregular sheet metal parts, characterized in that, It includes the following steps: Step 1: Input the vertex information and scanning precision y_step of the irregular sheet metal part contour; the irregular sheet metal part contour is composed of vertices connected in a counterclockwise order; the vertex information includes the x-coordinate, y-coordinate and concavity / convexity feature of the vertex. If the vertex is a convex point, its concavity / convexity feature is 1, otherwise it is 0; the scanning precision y_step refers to the interval between two adjacent scanning heights. Step 2: Generate the basic scan lines of the irregular sheet metal part contour; Starting from the initial scan height, draw horizontal lines that extend infinitely to both ends at each scan height with the scan accuracy y_step as the step size. The horizontal lines enter the interior of the irregular sheet metal part contour and then exit. The horizontal lines at each scan height include an inner horizontal line segment located inside the irregular sheet metal part contour and an outer horizontal line segment located outside the irregular sheet metal part contour. All the inner horizontal line segments at each scan height together form the basic scan lines of the irregular sheet metal part contour. Step 3: Fill the gaps in the basic scan lines of the irregular sheet metal part contour; specifically including the following sub-steps: S31, find all possible scan heights where scan line gaps may exist in the irregular sheet metal part contour; S32, determine whether there are scan line gaps among all possible scan heights by calculating the gap discriminant; S33, if scan line gaps exist, determine the filling direction and filling length of the scan line gaps, and complete the filling of the scan line gaps. Step 4: Add necessary scan lines to the basic scan lines of the irregular sheet metal part outline; specifically, it includes the following sub-steps: S41, find all the positions in the irregular sheet metal part outline where necessary scan lines need to be added; S42, determine the addition information for each necessary scan line to be added. Step 5: Extend some of the scan lines in the basic scan lines of the irregular sheet metal part outline; Specifically, it includes the following sub-steps: S51, find the positions of all scan lines that need to be extended; S52, determine the extension direction and extension length of each scan line to be extended. Step 6: Output the complete scan lines of the irregular sheet metal part outline.

2. The scanning line filling method for interference-free layout of irregular sheet metal parts according to claim 1, characterized in that, Step 2, the process of obtaining all the inner horizontal line segments located inside the irregular sheet metal part contour at the i-th scanning height, specifically includes: Step 21: For the scanning height of the i-th horizontal line Iterate through each edge of the irregular sheet metal part's outline; if edge j is a horizontal edge, skip that edge and proceed directly to the judgment of edge (j+1); otherwise, proceed to the judgment of edge (j+1). Is it within the range of the projection of edge j onto the y-axis? If Within the range of the projection of edge j onto the y-axis, then Substitute the equation of the line on side j to calculate corresponding This indicates that the y-coordinate of the line on side j is the height. If the x-coordinate of the point is not found, then the (j+1) edge is checked; Step 22: Calculate Then, determine the point. Is it a vertex of an irregular sheet metal part's outline? When point When the vertices of a non-irregular sheet metal part are at their non-irregular contours, if Points already exist in the middle Then check edge (j+1); otherwise, proceed to... Store a Then, the (j+1) edge is evaluated; Step 23: When the point When dealing with vertices of irregular sheet metal parts, determine the concavity or convexity of the vertex: if the vertex is concave, then determine... Does a point already exist in the middle? like Points already exist in the middle Then check edge (j+1); otherwise, proceed to... Store two Then, the (j+1) edge is checked; if the vertex is convex, it is checked whether the two edges constituting the vertex are opposite in the y-direction; if they are opposite, the (j+1) edge is checked directly, otherwise... Does a point already exist in the middle? If the point already exists, then check the (j+1) edge; otherwise, proceed to... Store a Then, the (j+1) edge is checked; after traversing each edge of the irregular sheet metal part outline, it is stored... All points are sorted in ascending order based on their x-coordinate values, and then sequentially and without repetition are... Each pair of points forms a combination element, and each combination element represents a scan line segment. The first point in the combination element represents the starting point of the scan line segment, and the second point represents the ending point of the scan line segment.

3. The scanning line filling method for interference-free layout of irregular sheet metal parts according to claim 1, characterized in that, Step S31 specifically includes the following sub-steps: Step 311: Traverse each vertex of the irregular sheet metal contour. For vertex i, determine the concavity or convexity of vertex i. If vertex i is concave, directly determine the concavity or convexity of vertex i+1. If vertex i is convex, further determine whether the two sides constituting the vertex are opposite in both the x and y directions. If the two sides constituting vertex i are opposite in both the x and y directions, mark vertex i as a vertex that may have scan line gaps. Otherwise, directly determine the concavity or convexity of vertex (i+1). Step 312: After traversing each vertex of the irregular sheet metal part contour, obtain all vertices in the irregular sheet metal part contour that may have scan line gaps; traverse each vertex that may have scan line gaps. For vertex j that may have scan line gaps, if there is no scan height within the range of the two edges constituting vertex j projected onto the y-axis, then directly determine vertex (j+1). Otherwise, record vertex j and all scan heights within the range of the two edges constituting vertex j projected onto the y-axis, and then determine vertex (j+1); after traversing each vertex that may have scan line gaps, obtain all scan heights in the irregular sheet metal part contour that may have scan line gaps and their corresponding vertices.

4. The scanning line filling method for interference-free layout of irregular sheet metal parts according to claim 1, characterized in that, In step S32, the gap discriminant is shown in formulas (1) to (4): In formulas (1) to (4), h is the y-coordinate value of the scanning height to be determined; k0 and k1 are the slopes of the first and second edges that constitute the vertex corresponding to the scanning height to be determined, respectively; b is the y-coordinate value of the vertex corresponding to the scanning height to be determined; and y_step is the scanning precision.

5. The scanning line filling method for interference-free layout of irregular sheet metal parts according to claim 4, characterized in that, In step S32: If the x-direction component of the first edge that constitutes the vertex corresponding to the scanning height to be judged points to the negative x-axis and the y-direction component points to the positive y-axis, then the gap is judged using formula (1). If the x-direction component of the first edge that constitutes the vertex corresponding to the scanning height to be judged points to the positive x-axis and the y-direction component points to the positive y-axis, then the gap is judged using formula (2). If the x-direction component of the first edge that constitutes the vertex corresponding to the scanning height to be judged points to the negative x-axis and the y-direction component points to the negative y-axis, then the gap is judged using formula (3). If the x-direction component of the first edge that constitutes the vertex corresponding to the scan height to be judged points to the positive direction of the x-coordinate axis and the y-direction component points to the negative direction of the y-coordinate axis, then the gap is judged by formula (4); when h satisfies the corresponding inequality, it indicates that there is no scan line gap in the scan height to be judged, otherwise it indicates that there is a scan line gap in the scan height to be judged.

6. The scanning line filling method for interference-free layout of irregular sheet metal parts according to claim 1, characterized in that, Step S33 specifically includes: Step 331: For a scan height h with scan line gaps and its corresponding vertex i, the first edge constituting vertex i is denoted as edge 0, and the second edge constituting vertex i is denoted as edge 1; if the x-direction component of edge 0 points to the negative x-direction and its y-direction component points to the positive y-direction, it is marked as case (a); if the x-direction component of edge 0 points to the positive x-direction and its y-direction component points to the positive y-direction, it is marked as case (b); if the x-direction component of edge 0 points to the negative x-direction and its y-direction component points to the negative y-direction, it is marked as case (c); if the x-direction component of edge 0 points to the positive x-direction and its y-direction component points to the negative y-direction, it is marked as case (d). Step 332: For case (a), the filling direction of the scan line gap is the positive x direction, the starting point of the scan line after filling remains unchanged, and the x-coordinate of the ending point is shown in formula (5); For case (b), the filling direction of the scan line gap is the negative x direction, the ending point of the scan line after filling remains unchanged, and the x-coordinate of the starting point is shown in formula (6); For case (c), the filling direction of the scan line gap is the positive x direction, the starting point of the scan line after filling remains unchanged, and the x-coordinate of the ending point is shown in formula (7); For case (d), the filling direction of the scan line gap is the negative x direction, the ending point of the scan line after filling remains unchanged, and the x-coordinate of the starting point is shown in formula (8). In formulas (5) to (8), h is the scanning height with scan line gaps, a is the x-coordinate of vertex i, b is the y-coordinate of vertex i, k0 and k1 are the slopes of edge 0 and edge 1, respectively, and x s The x-coordinate of the starting point of the scan line before filling, x s ' is the x-coordinate of the starting point of the filled scan line, x e The x-coordinate of the endpoint of the scan line before filling, x e ' represents the x-coordinate of the end point of the filled scan line, y_step represents the scan precision, and ε is a small quantity that is greater than 0 and much less than 1.

7. The scanning line filling method for interference-free layout of irregular sheet metal parts according to claim 1, characterized in that, Step 41 specifically involves: Iterate through each vertex of the irregular sheet metal part contour. For vertex i, denote the first edge constituting vertex i as edge 0 and the second edge constituting vertex i as edge 1. If vertex i is concave, directly determine vertex (i+1); otherwise, further determine whether vertex i is located on a certain scan line. If vertex i is located on a certain scan line, directly determine vertex (i+1); otherwise, further determine whether edge 0 and edge 1 are opposite in the y direction. If edge 0 and edge 1 are opposite in the y direction, mark the vertex as the vertex that needs to have a scan line added, and then determine vertex (i+1); otherwise, further determine whether edge 0 and edge 1 contain horizontal edges. If edge 0 and edge 1 contain horizontal edges, mark the vertex as the vertex that needs to have a scan line added, and then determine vertex (i+1); otherwise, directly determine vertex (i+1). After iterating through each vertex of the irregular sheet metal part contour, obtain all vertices in the irregular sheet metal part contour that need to have scan lines added.

8. The scanning line filling method for interference-free layout of irregular sheet metal parts according to claim 1, characterized in that, Step 42 specifically involves: Step 421: Traverse each vertex that needs to have a scan line added. For vertex j, denote the first edge that constitutes vertex j as edge 2 and the second edge that constitutes vertex j as edge 3. Step 422: Determine whether edge 2 and edge 3 contain horizontal edges; when edge 2 and edge 3 contain horizontal edges, if the y-coordinate of the midpoint of the non-horizontal edge in edge 2 and edge 3 is less than the y-coordinate of the midpoint of the horizontal edge, then the height of the scan line to be added is the smallest scan height among all scan heights greater than the y-coordinate of vertex j. The x-coordinate of the starting point and the x-coordinate of the ending point of the scan line to be added are shown in formula (9) and formula (10). Step 423: If the y-coordinate of the midpoint of the non-horizontal edge in edge 2 and edge 3 is greater than the y-coordinate of the midpoint of the horizontal edge, the addition height of the scan line to be added is the largest scan height among all scan heights less than the y-coordinate of vertex j. The x-coordinate of the starting point and the x-coordinate of the ending point of the scan line to be added are shown in formula (9) and formula (10). Step 424: When there are no horizontal edges in edge 2 and edge 3, if the y-direction component of edge 2 points to the positive direction of the y-coordinate axis, and the x-coordinate of the starting point of edge 2 and the x-coordinate of the ending point of edge 3 are both less than the x-coordinate of vertex j, then the height of the scan line to be added is the smallest scan height among all scan heights greater than the y-coordinate of vertex j. The x-coordinate of the starting point of the scan line to be added is shown in formula (11), and the x-coordinate of the ending point of the scan line to be added is equal to the x-coordinate of vertex j; if the y-direction component of edge 2 points to the negative direction of the y-coordinate axis, and the x-coordinate of the starting point of edge 2 and the x-coordinate of the ending point of edge 1 are both less than the x-coordinate of vertex j, then the height of the scan line to be added is the largest scan height among all scan heights less than the y-coordinate of vertex j. The x-coordinate of the starting point of the scan line to be added is shown in formula (12), and the x-coordinate of the ending point of the scan line to be added is equal to the x-coordinate of vertex j. Step 425: If the y-direction component of edge 2 points to the positive direction of the y-coordinate axis, and the x-coordinate of the starting point of edge 2 and the x-coordinate of the ending point of edge 3 are both greater than the x-coordinate of vertex j, then the height of the scan line to be added is the smallest scan height among all scan heights greater than the y-coordinate of vertex j. The x-coordinate of the starting point of the scan line to be added is equal to the x-coordinate of vertex j, and the x-coordinate of the ending point of the scan line to be added is as shown in formula (13). Step 426: If the y-direction component of edge 2 points to the negative direction of the y-coordinate axis, and the x-coordinate of the starting point of edge 2 and the x-coordinate of the ending point of edge 3 are both greater than the x-coordinate of vertex j, then the height of the scan line to be added is the largest scan height among all scan heights less than the y-coordinate of vertex j. The x-coordinate of the starting point of the scan line to be added is equal to the x-coordinate of vertex j, and the x-coordinate of the ending point of the scan line to be added is as shown in formula (14). Step 427: If the y-direction component of edge 2 points to the positive direction of the y-coordinate axis, and the x-coordinate of the starting point of edge 2 minus the x-coordinate of vertex j is opposite in sign to the x-coordinate of the ending point of edge 3 minus the x-coordinate of vertex j, then the height of the scan line to be added is the smallest scan height among all scan heights greater than the y-coordinate of vertex j. The x-coordinate of the starting point of the scan line to be added is shown in formula (15), and the x-coordinate of the ending point of the scan line to be added is shown in formula (16); If the y-direction component of edge 2 points to the negative direction of the y-coordinate axis, and the x-coordinate of the starting point of edge 2 minus the x-coordinate of vertex j is opposite in sign to the x-coordinate of the ending point of edge 3 minus the x-coordinate of vertex j, then the height of the scan line to be added is the largest scan height among all scan heights less than the y-coordinate of vertex j. The x-coordinate of the starting point of the scan line to be added is shown in formula (15), and the x-coordinate of the ending point of the scan line to be added is shown in formula (16). Step 428: When edge 2 is a vertical edge and its y-direction component points to the positive direction of the y-coordinate axis, the x-coordinate of the starting point of the scan line to be added is as shown in formula (17), and the x-coordinate of the ending point of the scan line to be added is equal to the x-coordinate of vertex j; when edge 2 is a vertical edge and its y-direction component points to the negative direction of the y-coordinate axis, the x-coordinate of the starting point of the scan line to be added is equal to the x-coordinate of vertex j, and the x-coordinate of the ending point of the scan line to be added is as shown in formula (18). Step 429: When edge 3 is a vertical edge and its y-direction component points to the positive direction of the y-coordinate axis, the x-coordinate of the starting point of the scan line to be added is as shown in formula (19), and the x-coordinate of the ending point of the scan line to be added is equal to the x-coordinate of vertex j; when edge 3 is a vertical edge and its y-direction component points to the negative direction of the y-coordinate axis, the x-coordinate of the starting point of the scan line to be added is equal to the x-coordinate of vertex j, and the x-coordinate of the ending point of the scan line to be added is as shown in formula (20). x s =a-e(15) x e =a+ε(16) In formulas (9) to (20), x s Let x be the x-coordinate of the starting point of the scan line to be added. e The x-coordinate of the endpoint of the scan line to be added. Let x be the x-coordinate of the starting point of the horizontal edge in edge 2 and edge 3. Let be the x-coordinate of the endpoint of the horizontal edge in edge 2 and edge 3, a be the x-coordinate of vertex j, b be the y-coordinate of vertex j, k0 and k1 be the slopes of edge 0 and edge 1 respectively, h be the scan height where the scan line to be added is located, y_step be the scan precision, and ε be a small quantity that is greater than 0 and much less than 1.

9. The scanning line filling method for interference-free layout of irregular sheet metal parts according to claim 1, characterized in that, Step 51 specifically includes the following sub-steps: Step 511: Traverse each vertex of the irregular sheet metal outline. For vertex i, the first edge constituting vertex i is denoted as edge 0, and the second edge constituting vertex i is denoted as edge 1. Step 512: Determine the concavity or convexity of vertex i. If vertex i is concave, then directly determine vertex (i+1); otherwise, further determine whether vertex i is on a certain scan line. Step 513: If vertex i is on a certain scan line, then directly determine vertex (i+1); otherwise, determine whether edge 0 and edge 1 are one horizontal edge and the other vertical edge. Step 514: If one of edge 0 and edge 1 is a horizontal edge and the other is a vertical edge, then directly determine the vertex (i+1); otherwise, determine whether edge 0 and edge 1 contain a horizontal edge. Step 515: If edge 0 and edge 1 contain horizontal edges, further determine whether edge 0 and edge 1 are in the same x direction; if edge 0 and edge 1 are in the same x direction, directly determine vertex (i+1); otherwise, mark vertex i as a vertex that has a scan line that needs to be extended, and then determine vertex (i+1); if edge 0 and edge 1 do not contain horizontal edges, further determine whether edge 0 and edge 1 contain vertical edges; if edge 0 and edge 1 contain vertical edges, further determine whether edge 0 and edge 1 are in the same y direction. Step 516: If edge 0 and edge 1 are in the same direction in the y direction, mark vertex i as a vertex that has a scan line that needs to be extended, and then determine vertex (i+1); if edge 0 and edge 1 are in opposite directions in the y direction, then directly determine vertex (i+1); if edge 0 and edge 1 do not contain a vertical edge, further determine whether edge 0 and edge 1 are in opposite directions in the x direction and in the same direction in the y direction. Step 517: If edge 0 and edge 1 are opposite in the x-direction and in the y-direction, mark vertex i as a vertex that has a scan line that needs to be extended, and then check vertex (i+1). Otherwise, further check whether edge 0 and edge 1 are in the same x-direction and in the same y-direction. Step 518: If edge 0 and edge 1 are opposite in the x direction and opposite in the y direction, mark vertex i as a vertex that has a scan line that needs to be extended, and then perform the judgment of vertex (i+1); otherwise, directly perform the judgment of vertex (i+1). After traversing each vertex of the irregular sheet metal part contour, all vertices in the irregular sheet metal part contour that have scan lines that need to be extended are obtained.

10. The scanning line filling method for interference-free layout of irregular sheet metal parts according to claim 1, characterized in that, In step 5, the specific process 52 of determining the extension direction and extension length of each scan line to be extended further includes: Step 521: Traverse each vertex that has a scan line that needs to be extended. For vertex j, denote the first edge that constitutes vertex j as edge 2 and the second edge that constitutes vertex j as edge 3. Step 522: Determine whether edge 2 and edge 3 contain horizontal edges; if edge 2 and edge 3 contain horizontal edges, further determine which of edge 2 and edge 3 is a horizontal edge; if edge 2 is a horizontal edge and its x-direction component points to the negative x-direction, then the extension direction of the scan line corresponding to this vertex is the negative x-direction, and the x-coordinate of the starting point of the extended scan line is equal to the x-coordinate of vertex j; if edge 2 is a horizontal edge and its x-direction component points to the positive x-direction, then the extension direction of the scan line corresponding to this vertex is the positive x-direction, and the x-coordinate of the ending point of the extended scan line is equal to the x-coordinate of vertex j; if edge 3 is a horizontal edge and its x-direction component points to the negative x-direction, then the extension direction of the scan line corresponding to this vertex is the positive x-direction, and the x-coordinate of the ending point of the extended scan line is equal to the x-coordinate of vertex j; if edge 3 is a horizontal edge and its x-direction component points to the positive x-direction, then the extension direction of the scan line corresponding to this vertex is the negative x-direction, and the x-coordinate of the starting point of the extended scan line is equal to the x-coordinate of vertex j. Step 523: If edge 2 and edge 3 do not contain horizontal edges, determine whether edge 2 and edge 3 contain vertical edges; if edge 2 is a vertical edge and its y-direction component points to the positive y-direction, then the extension direction of the scan line corresponding to this vertex is the positive x-direction, and the x-coordinate of the endpoint of the extended scan line is equal to the x-coordinate of vertex j. Step 524: If edge 2 is a vertical edge and its y-direction component points in the negative y direction, then the extension direction of the scan line corresponding to this vertex is in the negative x direction, and the x-coordinate of the starting point of the extended scan line is equal to the x-coordinate of vertex j; if edge 3 is a vertical edge and its y-direction component points in the positive y direction, then the extension direction of the scan line corresponding to this vertex is in the positive x direction, and the x-coordinate of the ending point of the extended scan line is equal to the x-coordinate of vertex j; if edge 3 is a vertical edge and its y-direction component points in the negative y direction, then the extension direction of the scan line corresponding to this vertex is in the negative x direction, and the x-coordinate of the starting point of the extended scan line is equal to the x-coordinate of vertex j. Step 525: If neither edge 2 nor edge 3 contains a perpendicular edge, further determine whether edge 2 and edge 3 are opposite in the x and y directions; if edge 2 and edge 3 are opposite in the x direction but in the same direction in the y direction, and the x-direction component of edge 2 points to the negative x direction, then the extension direction of the scan line corresponding to this vertex is the negative x direction, and the x-coordinate of the starting point of the extended scan line is equal to the x-coordinate of vertex j; if edge 2 and edge 3 are opposite in the x direction but in the same direction in the y direction, and the x-direction component of edge 2 points to the positive x direction, then the extension direction of the scan line corresponding to this vertex is the positive x direction, and the x-coordinate of the ending point of the extended scan line is equal to the x-coordinate of vertex j. Step 526: If edge 2 and edge 3 satisfy any of the following state conditions, execute the corresponding operation after the state condition: State 1: Edges 2 and 3 are in the same direction in the x and y directions, and the x-direction component of edge 2 points to the negative x direction and the y-direction component of edge 2 points to the negative y direction. Then the extension direction of the scan line corresponding to this vertex is the negative x direction, and the x-coordinate of the starting point of the extended scan line is equal to the x-coordinate of vertex j. State 2: Edge 2 and edge 3 are in the same direction in the x direction and in the same direction in the y direction. The x-direction component of edge 2 points to the positive x-direction and the y-direction component of edge 2 points to the negative y-direction. Then the extension direction of the scan line corresponding to this vertex is the negative x-direction, and the x-coordinate of the starting point of the extended scan line is equal to the x-coordinate of vertex j. State 3: If edge 2 and edge 3 are in the same direction in the x direction and in the same direction in the y direction, and the x-direction component of edge 2 points to the positive x direction and the y-direction component of edge 2 points to the positive y direction, then the extension direction of the scan line corresponding to this vertex is the positive x direction, and the x-coordinate of the endpoint of the extended scan line is equal to the x-coordinate of vertex j. State 4: If edge 2 and edge 3 are in the same direction in the x direction and in the same direction in the y direction, and the x-direction component of edge 2 points to the negative x direction and the y-direction component of edge 2 points to the positive y direction, then the extension direction of the scan line corresponding to this vertex is the positive x direction, and the x-coordinate of the endpoint of the extended scan line is equal to the x-coordinate of vertex j. State 5: If edge 2 and edge 3 are opposite in the x direction and opposite in the y direction, and the x-direction component of edge 2 points to the negative x direction and the y-direction component of edge 2 points to the positive y direction, then the extension direction of the scan line corresponding to this vertex is the negative x direction, and the x-coordinate of the starting point of the extended scan line is equal to the x-coordinate of vertex j. State 6: If edge 2 and edge 3 are opposite in the x direction and opposite in the y direction, and the x-direction component of edge 2 points to the negative x direction and the y-direction component of edge 2 points to the negative y direction, then the extension direction of the scan line corresponding to this vertex is the negative x direction, and the x-coordinate of the starting point of the extended scan line is equal to the x-coordinate of vertex j. State 7: If edge 2 and edge 3 are opposite in the x direction and opposite in the y direction, and the x-direction component of edge 2 points to the positive x direction and the y-direction component of edge 2 points to the negative y direction, then the extension direction of the scan line corresponding to this vertex is the positive x direction, and the x-coordinate of the endpoint of the extended scan line is equal to the x-coordinate of vertex j. State 8: If edge 2 and edge 3 are opposite in the x-direction and opposite in the y-direction, and the x-direction component of edge 2 points to the positive x-direction and the y-direction component of edge 3 points to the positive y-direction, then the extension direction of the scan line corresponding to this vertex is the positive x-direction, and the x-coordinate of the endpoint of the extended scan line is equal to the x-coordinate of vertex j.

Citation Information

Patent Citations

  • Irregular part stock layout method based on multi-factor particle swarm algorithm

    CN105488562A

  • Two-dimensional irregular layout blanking method based on scanning line method

    CN112488429A