Automatic processing method for irregular metal mesh CAD (Computer Aided Design) pattern

By automatically processing CAD patterns of irregular metal mesh, we can obtain line segment coordinates, count connection conditions, determine edge line equations and intersection coordinates, and connect intersection points and vertices, solving the problem that the non-regular metal mesh CAD patterns in the prior art cannot be automatically processed, and efficient and accurate pattern processing is achieved.

CN120145472APending Publication Date: 2025-06-13MICRON OPTOELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510205597.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-25
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

The prior art is difficult to automatically process the irregular metal grid CAD pattern represented by line segments, and cannot be effectively converted into a CAD pattern with a specified line width, resulting in low processing efficiency.

Method used

By obtaining the starting point coordinates and end point coordinates of each line segment in the CAD pattern of the irregular metal grid, counting the connection between all line segments, determining the straight line equations of the two sides of each line segment, calculating the intersection coordinates of the straight lines on both sides of the adjacent line segment, and connecting the intersection points and vertices on the same side of each line segment, realizing automated processing.

Benefits of technology

The irregular metal grid CAD pattern represented by line segments is automatically converted into a CAD pattern with a specified line width, which improves processing efficiency and realizes accurate and fast pattern processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120145472A_ABST
    Figure CN120145472A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of metal meshes, in particular to an irregular metal mesh CAD pattern automatic processing method which comprises the following steps: S1, acquiring a starting point coordinate and an end point coordinate of each line segment in an irregular metal mesh CAD pattern; s2, carrying out statistics on connection conditions among all line segments; s3, determining a linear equation of two side edges of each line segment according to the specified line segment width; s4, determining coordinates of intersection points of edge straight lines on two sides of adjacent line segments; and S5, connecting the intersection points and the vertexes on the same side of each line segment, and connecting two vertexes at the end points of the line segments which are not connected with other line segments. According to the automatic processing method for the irregular metal mesh CAD pattern, the irregular metal mesh CAD pattern represented by the line segment can be automatically converted into the CAD pattern with the specified line width, the method is accurate and rapid, and the efficiency of CAD pattern processing work is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of metal meshes, and particularly to an automatic processing method for an irregular metal mesh CAD pattern. Background Art

[0002] In order to simulate the properties of an irregular metal mesh structure such as resistance, shielding efficiency, heating efficiency, etc., it is necessary to convert an irregular metal mesh CAD pattern represented by line segments into a CAD pattern with a specified line width. Since the irregular metal mesh pattern contains thousands of line segments and cannot be processed manually, an automatic processing method for an irregular metal mesh CAD pattern is required. Summary of the Invention

[0003] The purpose of the present invention is to provide an automatic processing method for an irregular metal mesh CAD pattern to solve the problems raised in the above background art.

[0004] To achieve the above purpose, the present invention provides the following technical solution: an automatic processing method for an irregular metal mesh CAD pattern, including the following steps:

[0005] S1: Obtain the starting coordinates and ending coordinates of each line segment in the irregular metal mesh CAD pattern;

[0006] S2: Count the connection situations between all line segments;

[0007] S3: Determine the straight-line equations of the two edges of each line segment according to the specified line width;

[0008] S4: Determine the intersection coordinates of the straight lines on the two edges of adjacent line segments;

[0009] S5: Connect the intersection points and vertices on the same side of each line segment, and connect the two vertices at the endpoints of the line segments not connected to other line segments.

[0010] Preferably, in S1, to obtain the coordinates of the starting point P i and the ending point P i,1 of each line segment L i,2 in the irregular metal mesh CAD pattern, the following formula is used:

[0011] P i,1 = [x i,1 , y i,1

[0012] P i,2 = [x i,2 , y i,2

[0013] Preferably, the specific steps for counting the connection situations between all line segments in S2 are:​​

[0014] S2-1: Aggregate the starting and ending coordinates of all line segments, then remove duplicates. Set the coordinate set after deduplication as P, which contains n points, as follows:

[0015] P = [P 1 , P 2 ,..., P n ;

[0016] S2-2: Set the critical matrix M adj to represent the connection situation between all points in the set. If there is a connection between P i and P j , then M adj [i][j] is equal to 1, otherwise it is equal to 0;

[0017] S2-3: Traverse all line segments to determine the points in set P corresponding to the starting point P i,1 and the ending point P i,2 of each line segment. Assume they are P i1 and P j1 respectively, then set it to 1, and so on;

[0018] S2-4: Calculate the sum of the values in each row of the critical matrix M adj to represent the number of connections of each point as a starting point with other points, and calculate the sum of the values in each column of the critical matrix M adj to represent the number of connections of each point as an ending point with other points. Use the vector m r to represent the set of the sums of the values in each row of the critical matrix M adj , and use the vector m c to represent the set of the sums of the values in each column of the critical matrix M adj .

[0019] Preferably, the specific steps in S3 are as follows:

[0020] S3-1: Set the specified metal grid line width as l, and determine the linear equations of the two side boundaries of each line segment;

[0021] S3-2: Calculate the slope ki of each line segment;

[0022] S3-3: According to the starting point coordinates and the perpendicular slope -1 / ki of the line segment, determine two points on both sides of the starting point coordinates, at a distance of l / 2 from the starting point coordinates, denoted as A1 and A2. According to the ending point coordinates and the perpendicular slope -1 / ki of the line segment, determine two points on both sides of the starting point coordinates, at a distance of l / 2 from the starting point coordinates, denoted as B1 and B2;

[0023] S3-4: According to the slope ki and the coordinates of points A1 and A2, use the equation y = kx + b to find the linear equations of the two side boundaries of each line segment. Mark the line passing through A1 as S1 and the line passing through A2 as S2.

[0024] Preferably, the specific steps in S4 are as follows:

[0025] S4-1: In each line segment, according to the vector m r Determine the number of times the starting point is connected to other line segments, and determine the intersection points of the edge line of this line segment and the edge lines of other connected line segments at the starting point according to the number of connections. Similarly, the intersection points of the edge line of this line segment and the edge lines of other connected line segments at the end point can be determined;

[0026] S4-2: At the starting point, if the number of connections is 0, then there is no intersection point. In subsequent drawing, the two vertices A1 and A2 should be connected, and then A1 and A2 are respectively connected to the intersection points at the end point; if the number of connections is greater than or equal to 1, mark the intersection points at the starting point as J1 and J2 respectively. Similarly, the intersection points at the end point can be determined as J3 and J4 respectively.

[0027] Preferably, in S5, set the intersection points and vertices on the same side of each line segment in the CAD automated processing program code, and connect the two vertices at the end points of the line segments that are not connected to other line segments.

[0028] Compared with the prior art, the beneficial effects of the present invention are:

[0029] An automated processing method for irregular metal grid CAD patterns proposed by the present invention can automatically convert an irregular metal grid CAD pattern represented by line segments into a CAD pattern with a specified line width. This method is accurate and fast, greatly improving the efficiency of CAD pattern processing work. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 It is a logical schematic diagram of the automated processing method for irregular metal grid CAD patterns of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0031] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0032] Please refer to Figure 1 , the present invention provides a technical solution: an automated processing method for irregular metal grid CAD patterns, including the following steps:

[0033] S1: Obtain the starting coordinates and ending coordinates of each line segment in the CAD pattern of the irregular metal grid;

[0034] S2: Count the connection situations between all line segments;

[0035] S3: Determine the straight-line equations of the two side edges of each line segment according to the specified line segment width;

[0036] S4: Determine the intersection coordinates of the straight-line edges on both sides of adjacent line segments;

[0037] S5: Connect the intersection points and vertices on the same side of each line segment, and connect the two vertices at the endpoints of the line segments that are not connected to other line segments.

[0038] In S1, for each line segment L i in the CAD pattern of the irregular metal grid, the coordinates of the starting point P i,1 and the ending point P i,2 are represented by the following formula:

[0039] P i,1 = [x i,1 , y i,1 ;

[0040] P i,2 = [x i,2 , y i,2 .

[0041] The specific steps for counting the connection situations between all line segments in S2 are as follows:

[0042] S2-1: Combine the starting coordinates and ending coordinates of all line segments, and then remove duplicates. Set the coordinate set after removing duplicates as P, which contains n points, as shown below:

[0043] P = [P 1 , P 2 ,..., P n ;

[0044] S2-2: Set the critical matrix M adj to represent the connection situations between all points in the set. If there is a connection between P i and P j , then M adj [i][j] is equal to 1, otherwise it is equal to 0;

[0045] S2-3: Traverse all line segments to determine the points in the set P corresponding to the starting point P i,1 and the ending point P i,2 of each line segment. Assume they are P i1 and P j1, then it is set to 1, and so on;

[0046] S2-4: Calculate the critical matrix M adj The sum of the values in each row is used to represent the number of connections of each point as a starting point to other points, and the critical matrix M is calculated adj The sum of the values in each column is used to represent the number of connections of each point as an end point to other points. Use the vector m r to represent the critical matrix M adj The set of the sums of the values in each row, use the vector m c to represent the critical matrix M adj The set of the sums of the values in each column.

[0047] The specific steps in S3 are as follows:

[0048] S3-1: Set the specified metal grid line width as l, and determine the straight line equations of the two sides of each line segment;

[0049] S3-2: Calculate the slope ki of each line segment;

[0050] S3-3: According to the starting point coordinates and the perpendicular slope -1 / ki of this line segment, determine two points on both sides of the starting point coordinates and at a distance of l / 2 from the starting point coordinates, denoted as A1 and A2. According to the end point coordinates and the perpendicular slope -1 / ki of this line segment, determine two points on both sides of the starting point coordinates and at a distance of l / 2 from the starting point coordinates, denoted as B1 and B2;

[0051] S3-4: According to the slope ki and the coordinates of points A1 and A2, use the equation y = kx + b to find the straight line equations of the two sides of each line segment, and mark the straight line passing through A1 as S1 and the straight line passing through A2 as S2.

[0052] The specific steps in S4 are as follows:

[0053] S4-1: In each line segment, according to the vector m r determine the number of connections of the starting point to other line segments, and determine the intersection points of the edge straight line of this line segment and the edge straight lines of other connected line segments at the starting point according to the number of connections. Similarly, the intersection points of the edge straight line of this line segment and the edge straight lines of other connected line segments at the end point can be determined;

[0054] S4-2: At the starting point, if the number of connections is 0, then there is no intersection point. In the subsequent drawing, the two vertices A1 and A2 should be connected, and then A1 and A2 are respectively connected to the intersection points at the end point; if the number of connections is greater than or equal to 1, mark the intersection points at the starting point as J1 and J2 respectively. Similarly, the intersection points at the end point can be determined as J3 and J4 respectively.

[0055] In S5, set the intersection points and vertices on the same side of each line segment in the CAD automation processing program code, and connect two vertices at the endpoints of the line segment that is not connected to other line segments.

[0056] The specific embodiments are as follows:

[0057] S1: Use the.net API of AutoCAD software to connect to the CAD file and read the starting point coordinates and ending point coordinates of each line segment in the irregular grid in the CAD file, which are represented by the following formula:

[0058] P i,1 =[x i,1 , y i,1

[0059] P i,2 =[x i,2 , y i,2

[0060] S2: Combine the starting point coordinates and ending point coordinates of all line segments, and then remove duplicates. Set the coordinate set after removing duplicates as P, which contains n points, as shown below:

[0061] P = [P 1 , P 2 ,..., P n

[0062] Calculate the critical matrix M adj .

[0063] S3: Set the specified metal grid line width as l, determine the straight line equations of the two sides of each line segment, and calculate the slope ki of each line segment using the following formula.

[0064]

[0065] Determine two points, denoted as A1 and A2, that are at a distance of l / 2 from the starting point coordinates on both sides of the starting point coordinates according to the starting point coordinates and the perpendicular slope -1 / ki of this line segment. Determine two points, denoted as B1 and B2, that are at a distance of l / 2 from the starting point coordinates on both sides of the starting point coordinates according to the ending point coordinates and the perpendicular slope -1 / ki of this line segment. The coordinates of A1, A2, B1, and B2 are as follows:

[0066] A 1 =[x A1 , y A1

[0067] A 2 =[x A2 , y A2

[0068] B 1 =[x B1 ​​​​​,y B1

[0069] B 2 =[x B2 ,y B2

[0070] According to the slope ki and the coordinates of points A1 and A2, the linear equations of the two side boundaries of each line segment are obtained by using the equation y = kx + b. Mark the line passing through A1 as S1 and the line passing through A2 as S2, as shown below.

[0071] S 1 : y = k i x + y A1 -k i x A1

[0072] S 2 : y = k i x + y A2 -k i x A2

[0073] Where:

[0074]

[0075] S4: In each line segment, according to the vector m r Determine the number of times the starting point is connected to other line segments, and determine the intersection points of the edge line of this line segment and the edge lines of other connected line segments at the starting point according to the number of connections. Similarly, the intersection points of the edge line of this line segment and the edge lines of other connected line segments at the end point can be determined.

[0076] At the starting point, if the number of connections is 0, then there is no intersection point. In subsequent drawing, the two vertices A1 and A2 should be connected, and then A1 and A2 should be connected to the intersection points at the end point respectively; if the number of connections is greater than or equal to 1, mark the intersection points at the starting point as J1 and J2 respectively. Similarly, the intersection points at the end point can be determined as J3 and J4 respectively.

[0077] S5: Set the intersection points and vertices on the same side of each line segment in the CAD automated processing program code, and connect the two vertices at the endpoints of the line segments that are not connected to other line segments.

[0078] An automated processing method for irregular metal grid CAD patterns proposed by the present invention can automatically convert an irregular metal grid CAD pattern represented by line segments into a CAD pattern with a specified line width. This method is accurate and fast, greatly improving the efficiency of CAD pattern processing work.

[0079] ​​Although embodiments of the present invention have been shown and described, those of ordinary skill in the art will appreciate that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and spirit of the present invention. The scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A method for automated processing of irregular metal grid CAD patterns, characterized in that: The following steps are included: S1: Obtain the starting point coordinates and the ending point coordinates of each line segment in the irregular metal grid CAD pattern; S2: Count the connections between all line segments; S3: Determine the straight line equations of the two side edges of each line segment according to the specified line segment width; S4: Determine the coordinates of the intersection of the edge lines on both sides of the adjacent line segments; S5: Connect the intersection points and vertices on the same side of each line segment, and connect the two vertices at the endpoints of the line segment that are not connected to other line segments.

2. The method for automatically processing irregular metal mesh CAD patterns according to claim 1, characterized in that: In S1, each line segment L in the irregular metal grid CAD pattern is obtained. i Starting point P i,1 and the end point P i,2 The coordinates are expressed by the following formula: P i,1 =[x i,1 ,y i,1 ] P i,2 =[x i,2 ,y i,2 ] 3. The method for automatically processing irregular metal mesh CAD patterns according to claim 1, characterized in that: The specific steps of counting the connections between all line segments in S2 are: S2-1: Collect the starting point coordinates and the ending point coordinates of all line segments, and then remove duplicates. Set the coordinate set after removing duplicates as P, which contains n points, as shown below: P=[P1,P2,...,P n ]; S2-2: Setting the critical matrix M adj It is used to represent the connection between all points in a set. i and P are connected, then M adj [i][j] is equal to 1, otherwise it is equal to 0; S2-3: Traverse all line segments and determine the starting point P in each line segment i,1 and the end point P i,2 The corresponding points in the set P are assumed to be P i1 and P j1 , then set it to 1, and so on; S2-4: Calculate the critical matrix M adj The sum of each row value is used to represent the number of connections between each point as a starting point and other points, and the critical matrix M is calculated. adj The sum of each column value is used to represent the number of times each point is connected to other points as an endpoint.

4. The method for automatically processing irregular metal mesh CAD patterns according to claim 1, characterized in that: The specific steps in S3 are: S3-1: Set the specified metal grid line width to l, and determine the straight line equations of the boundaries on both sides of each line segment; S3-2: Calculate the slope ki of each line segment; S3-3: According to the coordinates of the starting point and the slope of the perpendicular line to the line segment -1 / ki, two points are determined on both sides of the starting point coordinates, which are 1 / 2 away from the starting point coordinates and are recorded as A1 and A2. According to the coordinates of the end point and the slope of the perpendicular line to the line segment -1 / ki, two points are determined on both sides of the coordinates of the starting point, which are l / 2 away from the coordinates of the starting point, and are recorded as B1 and B2; S3-4: Based on the slope ki and the coordinates of points A1 and A2, use the equation y=kx+b to find the equations of the boundaries of each line segment on both sides. Mark the line passing through A1 as S1 and the line passing through A2 as S2.

5. The method for automatically processing irregular metal grid CAD patterns according to claim 1, characterized in that: The specific steps in S4 are: S4-1: In each line segment, according to the vector m r Determine the number of times the starting point is connected to other line segments, and determine the intersection point of the edge straight line of the line segment at the starting point and the edge straight lines of other connected line segments according to the number of connections. Similarly, the intersection point of the edge straight line of the line segment at the end point and the edge straight lines of other connected line segments can be determined; S4-2: At the starting point, if the number of connections is 0, there is no intersection. In the subsequent drawing, the two vertices A1 and A2 should be connected, and then A1 and A2 should be connected to the intersection point at the end point respectively; If the number of connections is greater than or equal to 1, the intersection points marked at the starting point are J1 and J2 respectively. Similarly, the intersection points at the end point can be determined to be J3 and J4 respectively.

6. The method for automatically processing irregular metal mesh CAD patterns according to claim 1, characterized in that: In S5, the intersection points and vertices on the same side of each line segment are connected in the CAD automation processing program code, and two vertices are connected at the end points of the line segment that are not connected to other line segments.