A method for analyzing and transforming building structure steel bar data

By decomposing, classifying and sorting CAD steel bar drawings, fully automatic data analysis and transformation is realized, which solves the problems of time-consuming, laborious and low accuracy of manual drawing recognition in the existing technology, and achieves efficient steel bar data analysis and transformation. Improved the efficiency and accuracy of intelligent processing of steel bars.

CN114372312BActive Publication Date: 2024-08-27HEBEI UNIV OF TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202210019200.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-10
Publication Date
2024-08-27
Estimated Expiration
2042-01-10

AI Technical Summary

Technical Problem

The existing method of identifying CAD steel drawings relies on manual reading, which is time-consuming and labor-intensive, and the three-dimensional conversion is difficult and accurate. It lacks efficient two-dimensional CAD drawing data analysis and conversion methods, which affects the intelligent processing of steel bars.

Method used

Decompose the block object by opening the CAD steel drawing, enter the 'x' command, save the drawing as a DXF format file, extract and classify entity segment information, remove and sort duplicate geometric primitives, set a target search box for feature extraction, and calculate the length of the steel bar , diameter and bending angle to achieve fully automatic data analysis and transformation.

Benefits of technology

It has realized fully automatic drawing recognition of CAD steel bar drawings, with an accuracy rate of 100%, greatly reducing manual errors, shortening drawing reading time, reducing labor costs, improving drawing analysis and conversion efficiency, and opening up the integration of design and construction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114372312B
    Figure CN114372312B
Patent Text Reader

Abstract

The present invention is a method for analyzing and transforming steel bar data of building structures, which comprises the following steps: opening a CAD steel bar drawing, inputting the "x" command to decompose a block object, and saving the drawing containing the steel bar to be extracted as a DXF format file of any version, setting a target search frame to draw the steel bar to be extracted; extracting entity segment information of geometric primitives in the target search frame and classifying and extracting entity segment information of three basic primitives, namely, straight line, circle, and arc; when there are at least two repeated geometric primitives in the classified entity segment, only retaining any one of the geometric primitives; after removing the repeated geometric primitives, sorting and drawing the remaining geometric primitives, and outputting processing parameters. The method realizes the fully automatic processing of steel bar data analysis and transformation, and the accuracy rate of direct analysis and transformation results is as high as 100%, which can well reduce the error caused by manual image recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of drawing recognition, and specifically is a method for analyzing and converting building structure steel bar data based on CAD drawings. Background Art

[0002] Intelligent steel bar processing is crucial to the realization of intelligent construction and building industrialization. Intelligent steel bar processing refers to the use of a complete set of automated steel bar processing equipment and management software, through a reasonable process flow, to centrally process steel bars in a fixed processing site into shaped steel bar products required for the project, and finally assemble them on site according to the project construction plan.

[0003] Current CAD steel bar drawings still rely on manual drawing recognition: starting from the design drawings, the key information contained in the steel bar drawings (such as steel bar diameter and steel bar length, etc.) is manually read and drawn into drawings that meet the production requirements of steel bar processing equipment, so as to carry out production. However, this method is time-consuming and labor-intensive, and the quality of the finished steel bar products is determined by the manual drawing recognition effect. The drawing recognition mode needs to be transformed and upgraded. The existing three-dimensional conversion method requires three-dimensional modeling, which is difficult to model, has a long cycle, and the accuracy needs to be improved. Therefore, it is particularly important to invent an accurate and efficient data analysis and conversion method for building structure steel bars based on two-dimensional CAD drawings to realize intelligent steel bar processing. Summary of the invention

[0004] In view of the deficiencies in the prior art, the technical problem that the present invention intends to solve is to invent a method for analyzing and transforming building structure steel bar data.

[0005] The technical solution of the present invention to solve the technical problem is to provide a method for analyzing and converting building structure steel bar data, which comprises the following steps:

[0006] Step 1: Decompose and transfer drawings:

[0007] Open the CAD steel bar drawing, enter the "x" command to decompose the block object, and save the drawing containing the steel bars to be extracted as a DXF file of any version;

[0008] Step 2: Extract and classify entity segment information

[0009] By traversing the ASCII code information of DXF, the beginning is: group code is 2 and the information contained in the group code is ENTITIES, and the end is: group code is 0 and the information contained in the group code is ENDSEC. The search starts from the beginning of the entire ASCII code to the end, and the beginning and end that appear immediately in sequence are regarded as an entity segment. By traversing all the ASCII code information, all entity segments are extracted;

[0010] All the extracted entity segments are classified, and the entity segment information of three basic graphics primitives, namely, straight line, circle, and arc, is extracted. The specific process is: when a behavior group code is retrieved as AcDbLine, the information of the 12 lines after the line where AcDbLine is located is extracted to obtain the X, Y, and Z coordinates of the starting point and end point of a straight line;

[0011] When a row with group code AcDbCircle is retrieved, determine whether the 9th row after the row with group code AcDbCircle is group code AcDbArc. If it is not group code AcDbArc, the entity segment is extracted as a circle, and then directly extract the information of the 8 rows after the row with AcDbCircle to obtain the X, Y, Z coordinates and radius of the center of a circle.

[0012] If the 9th line after the line where the group code AcDbCircle is located is the group code AcDbArc, the entity segment is extracted as an arc. When a line with the group code AcDbArc is retrieved, the information of the 4 lines after the line where AcDbArc is located is extracted as the starting angle and ending angle of the arc, and the information of the first 8 lines of the line where AcDbArc is located is extracted as the X, Y, Z coordinates and radius of the center of the circle where the arc is located.

[0013] Step 3: Remove duplicate geometric primitives and sort them

[0014] When there are at least two repeated geometric primitives in the entity segment classified in step 2, only one of the geometric primitives is retained and the repeated geometric primitive is deleted;

[0015] After removing duplicate geometry, sort the remaining geometry:

[0016] For the straight lines in the geometric primitives, first, extract the straight lines with equal starting point X coordinates and ending point X coordinates and record them as vertical lines, then sort the vertical lines according to the starting point X coordinates, and finally sort the vertical lines with equal X coordinates according to the starting point Y coordinates; similarly, first, extract the straight lines with equal starting point Y coordinates and ending point Y coordinates and record them as horizontal lines, then sort the horizontal lines according to the starting point Y coordinates, and finally sort the horizontal lines with equal Y coordinates according to the starting point X coordinates;

[0017] For the circles in the geometric primitives, first, sort them by the X coordinate of the center, then sort them by the Y coordinate of the center, and finally sort them by the radius.

[0018] For the arcs in the geometric primitives, first, sort them according to the X coordinate of the center, the Y coordinate of the center, and the radius, then sort them according to the starting angle of the arc, and finally sort them according to the ending angle of the arc;

[0019] Step 4: Set the target search frame and draw the steel bars to be extracted

[0020] According to the actual steel bar frame size in the drawing of the steel bar to be extracted obtained after the drawing is decomposed in step 1, a rectangular target search frame is set. When the size of the rectangular target search frame is consistent with the actual steel bar frame, feature extraction and classification are performed on the geometric primitives in the target search frame according to step 2, and the steel bars in the frame are sorted according to the method of step 3, and the sorted geometric primitives are drawn;

[0021] Step 5: Output processing parameters

[0022] First, calculate the length of the straight line in the geometric primitive drawn in step 4, which is the length of the steel bar. For the vertical line, subtract the Y coordinate of the starting point from the Y coordinate of the end point to get the length of the steel bar. For the horizontal line, subtract the X coordinate of the starting point from the X coordinate of the end point to get the length of the steel bar.

[0023] Secondly, calculate the distance between adjacent straight lines in the geometric primitives drawn in step 4 to get the steel bar diameter. For horizontal lines, subtract the Y coordinates of two horizontal lines with equal starting and ending X coordinates to get the steel bar diameter. For vertical lines, subtract the X coordinates of two vertical lines with equal starting and ending Y coordinates to get the steel bar diameter.

[0024] Finally, calculate the arc angle in the geometric primitive drawn in step 4, subtract the arc starting angle from the arc ending angle, and the arc angle is the steel bar bending angle;

[0025] The analysis and transformation of building structure steel bar data is now completed.

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

[0027] 1. The method of the present invention reads the coordinate information of the CAD steel bar drawing, directly uses the ASCII code information to extract and classify the entity segments, and then removes duplicates and sorts them, so as to realize the fully automatic drawing of the steel bars to be extracted, and further realizes the fully automatic processing of steel bar data analysis and conversion. The accuracy of direct analysis and conversion results is as high as 100%, which can well reduce the errors caused by manual image recognition.

[0028] 2. The method of the present invention does not require a technician with rich engineering experience or proficiency in CAD software. A novice can operate the software, which can greatly reduce labor costs. The method is simple, effective, and economically valuable.

[0029] 3. Compared with the traditional manual drawing recognition method, the method of the present invention shortens the time by about 4 / 5. On average, the recognition time of one drawing is only 30 seconds, which greatly improves the efficiency of drawing analysis and conversion.

[0030] 4. The method of the present invention starts from the design drawings, and after fully automatic analysis and transformation, it can output the equipment processing parameters and directly import them into the equipment for production, thus opening up the integration of design and construction and enabling the rapid circulation of key data. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 is an overall flow chart of the method of the present invention;

[0032] Figure 2 A flowchart of geometric primitive sorting of the method of the present invention;

[0033] Figure 3 A schematic diagram of the structure of the target search frame of the method of the present invention;

[0034] Figure 4 A CAD steel bar drawing of an embodiment of the present invention;

[0035] Figure 5 A schematic diagram of selecting a target search frame in a CAD steel bar drawing according to the present invention;

[0036] Figure 6 This is a diagram showing the transformation results of the rectangular stirrups of the present invention;

[0037] Figure 7 The equipment processing parameters of the rectangular stirrups after the conversion treatment of the present invention;

[0038] Figure 8 This is a diagram showing the transformation results of the reinforcement extraction of the present invention;

[0039] Fig. 9 These are the equipment processing parameters for the steel bars after the conversion treatment of the present invention.

[0040] Fig.10 This is a schematic diagram of the beginning of ASCII code information. DETAILED DESCRIPTION

[0041] The present invention is further explained below in conjunction with the embodiments and drawings, but this is not intended to limit the scope of protection of the present application.

[0042] The present invention provides a method for analyzing and transforming steel bar data of a building structure, which directly realizes steel bar data analysis and transformation based on a CAD two-dimensional steel bar drawing. The method comprises the following steps:

[0043] Step 1: Decompose and transfer drawings:

[0044] AutoCAD is an automatic computer-aided design software developed by Autodesk in 1982. It is used for 2D drawing, detailed drawing, design documentation and basic 3D design. Due to its powerful drawing function, CAD has become one of the most common 2D drawing software. Open the CAD steel bar drawing in DWG format, enter the "x" command to decompose the block object, and save the drawing containing the steel bars to be extracted as any version of DXF format file;

[0045] Step 2: Extract and classify entity segment information

[0046] DXF format file is an open output format of CAD file, and is a transit file for data exchange between CAD file and other software. DXF file has two formats: binary format and ASCII code format. By traversing the ASCII code information of DXF, the beginning is: group code is 2 and the information contained in the group code is ENTITIES (that is, 2, ENTITIES, appearing at the beginning of the entity segment, the two appear in pairs), and the end is: group code is 0 and the information contained in the group code is ENDSEC (that is, 0, ENDSEC, appearing at the end of the entity segment, the two appear in pairs), and the search starts from the beginning of the entire ASCII code to the end, and the beginning and end that appear immediately in sequence are regarded as an entity segment. By traversing all ASCII code information, all entity segments are extracted. At this time, the extracted entity segments include straight lines, polylines, texts, circles, arcs, etc.

[0047] DXF has a lot of segment information. The group code is 2. The information contained in the group code is these two lines of ENTITIES, which marks the beginning of the entity segment. Starting from this beginning, the first appearance has a group code of 0, and the information contained in the group code is ENDSEC, which marks the end of the current entity segment. Fig.10 shown. Fig.10 The arrow in the middle points to the group code containing the information ENTITIES. Immediately before this group code is the line with group code 2, so this is determined to be the beginning of an entity segment.

[0048] All the extracted entity segments are classified, and the entity segment information of three basic graphics primitives, namely, straight line, circle, and arc, is extracted. The specific process is: when a behavior group code is retrieved as AcDbLine, the information of the 12 lines after the line where AcDbLine is located is extracted to obtain the X, Y, and Z coordinates of the starting point and end point of a straight line;

[0049] When a row with group code AcDbCircle is retrieved, determine whether the 9th row after the row with group code AcDbCircle is group code AcDbArc. If it is not group code AcDbArc, the entity segment is extracted as a circle, and then directly extract the information of the 8 rows after the row with AcDbCircle to obtain the X, Y, Z coordinates and radius of the center of a circle.

[0050] If the 9th line after the line where the group code AcDbCircle is located is the group code AcDbArc, the entity segment is extracted as an arc. When a line with the group code AcDbArc is retrieved, the information of the 4 lines after the line where AcDbArc is located is extracted as the starting angle and ending angle of the arc, and the information of the first 8 lines of the line where AcDbArc is located is extracted as the X, Y, Z coordinates and radius of the center of the circle where the arc is located.

[0051] Table 1. AcDbLine group codes and descriptions

[0052]

[0053] Table 2. AcDbCircle group code and description

[0054]

[0055] Table 3. Arc AcDbArc group code and description

[0056]

[0057] In the above three tables, the group code corresponding to each serial number in the group code column in the ASCII code information is a row, and the description of the corresponding group code is its adjacent row. Therefore, 12 rows of information need to be extracted when extracting a straight line, 8 rows of information need to be extracted when extracting a circle, and 12 rows of information need to be extracted when extracting an arc.

[0058] Step 3: Remove duplicate geometric primitives and sort them

[0059] When there are at least two repeated geometric primitives in the entity segment classified in step 2, that is, when the elements of the repeated geometric primitives (center XYZ, radius, start and end angles, start and end XYZ coordinates of the straight line) are exactly the same, only one of the geometric primitives is retained and the repeated geometric primitive is deleted;

[0060] After removing duplicate geometry, sort the remaining geometry:

[0061] For the straight lines in the geometric primitives, first, extract the straight lines with equal starting point X coordinates and ending point X coordinates and record them as vertical lines, then sort the vertical lines according to the starting point X coordinates, and finally sort the vertical lines with equal X coordinates according to the starting point Y coordinates; similarly, first, extract the straight lines with equal starting point Y coordinates and ending point Y coordinates and record them as horizontal lines, then sort the horizontal lines according to the starting point Y coordinates, and finally sort the horizontal lines with equal Y coordinates according to the starting point X coordinates;

[0062] For the circles in the geometric primitives, first, sort them by the X coordinate of the center, then sort them by the Y coordinate of the center, and finally sort them by the radius.

[0063] For the arcs in the geometric primitives, first, similar to circles, they are sorted by the X coordinate of the center, the Y coordinate of the center, and the radius. Then, they are sorted by the starting angle of the arc. Finally, they are sorted by the ending angle of the arc.

[0064] Step 4: Set the target search frame and draw the steel bars to be extracted

[0065] According to the actual steel bar frame size in the drawing of the steel bar to be extracted obtained after the drawing is decomposed in step 1, a rectangular target retrieval frame is set, L represents the length of the target retrieval frame, and B represents the width of the target retrieval frame. When the rectangular target retrieval frame is the same size as the actual steel bar frame, that is, when the geometric primitive coordinate information is fully contained in the target retrieval frame, the values ​​of L and B can be set according to the size of the actual steel bar frame, and the geometric primitives in the target retrieval frame are feature extracted, and the steel bars in the frame are drawn according to the geometric primitives sorted in step 3;

[0066] Step 5: Output processing parameters

[0067] First, calculate the length of the straight line in the geometric primitive drawn in step 4, which is the length of the steel bar. For the vertical line, subtract the Y coordinate of the starting point from the Y coordinate of the end point to get the length of the steel bar. For the horizontal line, subtract the X coordinate of the starting point from the X coordinate of the end point to get the length of the steel bar.

[0068] Secondly, calculate the distance between adjacent straight lines in the geometric primitives drawn in step 4 to get the steel bar diameter. For horizontal lines, subtract the Y coordinates of two horizontal lines with equal starting and ending X coordinates to get the steel bar diameter. For vertical lines, subtract the X coordinates of two vertical lines with equal starting and ending Y coordinates to get the steel bar diameter.

[0069] Finally, calculate the arc angle in the geometric primitive drawn in step 4, subtract the arc starting angle from the arc ending angle, and the arc angle is the steel bar bending angle;

[0070] The automatic conversion of CAD drawings is now completed.

[0071] In CAD drawings, circles, straight lines and arcs are three types of basic geometric primitives, which can be randomly arranged and combined to generate many types of steel bars, such as longitudinal bars, transverse bars, hook stirrups, welded closed stirrups, open stirrups, tension bars, etc. The following takes two common stirrups as an example to explain the conversion method of the present invention in detail.

[0072] The single CAD drawing obtained in this embodiment is as follows Figure 1 As shown, the drawing contains multiple information such as text, straight lines, polylines, annotations, dimensions, circles, arcs, etc., and has multiple actual steel bar frames. Drawing processing according to the above steps 1 to 3 is equivalent to extracting and classifying the geometric elements of the entire drawing, distinguishing them from text information, and performing steel bar data analysis. In this embodiment, the steel bar to be extracted is locked as a rectangular stirrup, such as Figure 5 After the steel bars to be extracted are selected in the box shown, the target search box is set according to the size of the actual steel bar drawing box, and the geometric entities with coordinates in the box are drawn. Step 5 is to output the processing parameters for the drawn result, thus completing the transformation.

[0073] Figure 6 is the transformation result diagram of rectangular stirrups. Figure 7 The corresponding equipment processing parameters for the rectangular stirrups include the type of steel bar, number of sides, length, width, diameter, and bending angle.

[0074] Figure 8 This is the transformation result diagram of stretching. Fig. 9 The corresponding equipment processing parameters for the reinforcement include the type of reinforcement, number of sides, length, diameter, bending angle, and the width is a blank value.

[0075] Any matters not described in the present invention are applicable to the prior art.

Claims

1. A method for analyzing and transforming building structure steel bar data. The following steps are involved: Step 1: Decompose and transfer drawings: Open the CAD steel bar drawing, enter the "x" command to decompose the block object, and save the drawing containing the steel bars to be extracted as a DXF file of any version; Step 2: Extract and classify entity segment information By traversing the ASCII code information of DXF, the beginning is: group code is 2 and the information contained in the group code is ENTITIES, and the end is: group code is 0 and the information contained in the group code is ENDSEC. The search starts from the beginning of the entire ASCII code to the end, and the beginning and end that appear immediately in sequence are regarded as an entity segment. By traversing all the ASCII code information, all entity segments are extracted; All the extracted entity segments are classified, and the entity segment information of three basic graphics primitives, namely, straight line, circle, and arc, is extracted. The specific process is: when a behavior group code is retrieved as AcDbLine, the information of the 12 lines after the line where AcDbLine is located is extracted to obtain the X, Y, and Z coordinates of the starting point and end point of a straight line; When a row with group code AcDbCircle is retrieved, determine whether the 9th row after the row with group code AcDbCircle is group code AcDbArc. If it is not group code AcDbArc, the entity segment is extracted as a circle, and then directly extract the information of the 8 rows after the row with AcDbCircle to obtain the X, Y, Z coordinates and radius of the center of a circle. If the 9th line after the line where the group code AcDbCircle is located is the group code AcDbArc, the entity segment is extracted as an arc. When a line with the group code AcDbArc is retrieved, the information of the 4 lines after the line where AcDbArc is located is extracted as the starting angle and ending angle of the arc, and the information of the first 8 lines of the line where AcDbArc is located is extracted as the X, Y, Z coordinates and radius of the center of the circle where the arc is located. Step 3: Remove duplicate geometric primitives and sort them When there are at least two repeated geometric primitives in the entity segment classified in step 2, only one of the geometric primitives is retained and the repeated geometric primitive is deleted; After removing duplicate geometry, sort the remaining geometry: For the straight lines in the geometric primitives, first, extract the straight lines with equal starting point X coordinates and ending point X coordinates and record them as vertical lines, then sort the vertical lines according to the starting point X coordinates, and finally sort the vertical lines with equal X coordinates according to the starting point Y coordinates; similarly, first, extract the straight lines with equal starting point Y coordinates and ending point Y coordinates and record them as horizontal lines, then sort the horizontal lines according to the starting point Y coordinates, and finally sort the horizontal lines with equal Y coordinates according to the starting point X coordinates; For the circles in the geometric primitives, first, sort them by the X coordinate of the center, then sort them by the Y coordinate of the center, and finally sort them by the radius. For the arcs in the geometric primitives, first, sort them according to the X coordinate of the center, the Y coordinate of the center, and the radius, then sort them according to the starting angle of the arc, and finally sort them according to the ending angle of the arc; Step 4: Set the target search frame and draw the steel bars to be extracted According to the actual steel bar frame size in the drawing of the steel bar to be extracted obtained after the drawing is decomposed in step 1, a rectangular target search frame is set. When the size of the rectangular target search frame is consistent with the actual steel bar frame, feature extraction and classification are performed on the geometric primitives in the target search frame according to step 2, and the steel bars in the frame are sorted according to the method of step 3, and the sorted geometric primitives are drawn; Step 5: Output processing parameters First, calculate the length of the straight line in the geometric primitive drawn in step 4, which is the length of the steel bar. For the vertical line, subtract the Y coordinate of the starting point from the Y coordinate of the end point to get the length of the steel bar. For the horizontal line, subtract the X coordinate of the starting point from the X coordinate of the end point to get the length of the steel bar. Secondly, calculate the distance between adjacent straight lines in the geometric primitives drawn in step 4 to get the steel bar diameter. For horizontal lines, subtract the Y coordinates of two horizontal lines with equal starting and ending X coordinates to get the steel bar diameter. For vertical lines, subtract the X coordinates of two vertical lines with equal starting and ending Y coordinates to get the steel bar diameter. Finally, calculate the arc angle in the geometric primitive drawn in step 4, subtract the arc starting angle from the arc ending angle, and the arc angle is the steel bar bending angle; The analysis and transformation of building structure steel bar data is now completed.

2. The method for analyzing and transforming building structure steel bar data according to claim 1, It is characterized in that The AcDbLine group code and description are as follows: The circle AcDbCircle group code and description are: The arc AcDbArc group code and description are:

3. The building structure steel bar data analysis and conversion method according to claim 1, It is characterized in that The steel bars to be extracted are at least one of longitudinal bars, transverse bars, hook stirrups, welded closed stirrups, open stirrups, and tension bars.

Citation Information

Cited By

  • Automatic calculation system and method for using amount of steel bars of column component based on DXF drawing

    CN122049938A