CN112434502A - Method for automatically identifying CAD (computer-aided design) engineering drawing of bolt - Google Patents

Method for automatically identifying CAD (computer-aided design) engineering drawing of bolt Download PDF

Info

Publication number
CN112434502A
CN112434502A CN202011217063.4A CN202011217063A CN112434502A CN 112434502 A CN112434502 A CN 112434502A CN 202011217063 A CN202011217063 A CN 202011217063A CN 112434502 A CN112434502 A CN 112434502A
Authority
CN
China
Prior art keywords
bolt
text
angle
information
file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011217063.4A
Other languages
Chinese (zh)
Inventor
赵金伟
王启舟
邱万力
张富强
黑新宏
胡潇
闫艺鑫
答龙超
徐庆馨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xian University of Technology
Original Assignee
Xian University of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xian University of Technology filed Critical Xian University of Technology
Priority to CN202011217063.4A priority Critical patent/CN112434502A/en
Publication of CN112434502A publication Critical patent/CN112434502A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/186Templates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/04Manufacturing
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Abstract

The invention discloses a method for automatically identifying a bolt CAD engineering drawing, which comprises the steps of firstly reading a multi-bolt drawing file, and storing all data and basic information of the CAD file into a computer memory; then, dividing the whole multi-bolt graph file into a plurality of single-bolt graph files according to the radius of the bolt ball in the multi-bolt graph file and the coordinates of the ball centers of all the bolt balls; and carrying out data standardization; processing and combining the text and the straight line information of the single bolt ball to finally obtain the processing information of the single bolt ball; generating a template file according to a fixed format: firstly, outputting all identified information according to a template file format required by actual processing to obtain a template file; and secondly, outputting all the identified information according to a template file format required by the machine to obtain a template file. The invention solves the problems of time and labor waste and easy error of manual identification in the prior art.

Description

Method for automatically identifying CAD (computer-aided design) engineering drawing of bolt
Technical Field
The invention belongs to the technical field of mechanical automation engineering drawing identification, and particularly relates to a method for automatically identifying a bolt CAD engineering drawing.
Background
The increasing push toward automation of modern instrument production has led to the production of bolt balls also beginning to change from manual to machine. The bolt sphere plane drawing directly and automatically generated by engineering design software aims to draw an image to be watched by workers, and the document only contains information which cannot be automatically identified by machines such as the positions and inclination angles of points and lines forming the image.
Therefore, in the daily processing process, the information in the design drawing is manually identified, and the processing information is filled in the template file read by the machine, but the process is time-consuming and labor-consuming, and has errors caused by manually reading the drawing or writing the file fifteen. Therefore, it is important to update the recognition method.
Disclosure of Invention
The invention aims to provide a method for automatically identifying a bolt CAD engineering drawing, which solves the problems of time and labor waste and high possibility of error in manual identification in the prior art.
The technical scheme adopted by the invention is that the method for automatically identifying the CAD engineering drawing of the bolt is implemented according to the following steps:
step 1, reading a multi-bolt graph file by using a dxfllb-3.17.0 library, and storing all data and basic information of a CAD file into a memory of a computer;
step 2, dividing the whole multi-bolt graph file into a plurality of single-bolt graph files according to the radius of the bolt ball in the multi-bolt graph file and the coordinates of the ball centers of all the bolt balls;
step 3, carrying out data standardization on all the single bolt graph files obtained in the step 2;
step 4, reading all texts and linear information in the standardized single-bolt graph file obtained in the step 3 by using a dxflib-3.17.0 library, and performing the step 5 and the step 6 on each single-bolt graph file to obtain a processing template file of a single bolt ball;
step 5, processing and combining the text and the straight line information of the single bolt ball obtained in the step 4 to finally obtain the processing information of the single bolt ball;
step 6, generating a template file according to a fixed format: firstly, outputting all identified information according to a template file format required by actual processing to obtain a template file; and secondly, outputting all the identified information according to a template file format required by the machine to obtain a template file.
The present invention is also characterized in that,
in the step 1, the method comprises the following steps of,
the data comprises a straight line object, a text object, a circular arc object and a ball object;
the basic information of the CAD file includes:
multi-bolt graph file: initially inputting a bolt map file, wherein information of a plurality of bolts is included;
bolt drawing file: dividing a multi-bolt graph file into files containing single bolt information;
bolt ball radius: obtaining the radiuses of all bolt balls according to the radiuses of the arc objects in the file;
coordinates of the center of the bolt ball: obtaining the sphere center coordinate of each bolt ball according to the circle center coordinate of the arc object in the file;
common circular arc: most of arc objects in the file comprise start angle, end angle and circle center coordinate information;
marking a circular arc: the method comprises the following steps that (1) arcs with special marks are arranged in some files, and the arcs need to be converted into common arc objects in the using process of a system;
angle text: text information in the file for representing the angle;
horizontal angle text: the text information is used for representing the horizontal angle between the two holes in the angle text;
vertical angle text: the text information is used for representing the vertical angle between the two holes in the angle text;
arc of bolt: the circular arc used for representing the ball body of the bolt;
arc among holes: a circular arc used to represent the angle between two holes;
horizontal hole straight line: a linear object indicating the position of a hole having a vertical angle of 0 °;
hole specification text: text information indicating the specifications of the holes.
The step 2 is as follows:
step 2.1, obtaining the radius of the bolt: firstly, sequencing the radiuses R of all circles, arcs and labeled arcs from small to large and traversing once, and calculating the ratio b of two adjacent radiuses each timer,brThe calculation formula of (2):
Figure BDA0002760761460000031
wherein R2]Representing the sequence after the radius sequencing of all circles, arcs and labeled arcs, wherein i represents the current position in the sequence in the traversal process;
step 2.2, determining all circle center coordinates: traversing all data examples with centers, including circles and arcs, and storing coordinates of all centers;
step 2.3, dividing single bolt data: the method comprises the steps of representing bolts by circle center coordinates, dividing data objects with circle center information into bolts with the same circle center to construct a data set of each single bolt, taking the center point coordinates of a straight line object as coordinates (x, y) representing the position of the straight line and the insertion point coordinates of a text object as coordinates (x, y) representing the position of the text object, distributing all the straight line objects and the text object to data sets of different bolts, and finally obtaining a plurality of data sets of single bolt graph information, wherein all the data objects in the same set are used for describing the same single bolt graph.
Step 2.1 when br< 2 and brIf the radius is more than 1.15, the radius of all the bolt balls in the multi-bolt file is considered to be R [ i +1 ]]When the difference between the x axis and the y axis of the coordinates of the two circle centers in the step 2.2 is less than 0.2R, the two circle centers are considered to be the same circle center; if the coordinates of the linear object or the text object in the step 2.3 are the coordinates of the center of a circle of a certain bolt (r)x,ry) Any one of the following relationships is satisfied:
(1)|rx-x|<1.7333R
(2) if ryR is required when > yy-y<2.333R
(3) If ryIf < y, then y-r is requiredy<1.85R,
The straight-line object or text object is divided into the bolts, where R denotes the radius obtained in step 2.1, x denotes the abscissa of the straight-line object or text object, and y denotes the ordinate of the straight-line object or text object.
The step 3 is as follows:
unifying all circle center coordinates of the same bolt containing object: converting the marked arc into common arc data, namely, an arc represented by a circle center coordinate, an initial radian, a termination radian and a radius;
changing a data object describing that an included angle between horizontal angles is a circle into arc data according to the text information of the angle outside the circle;
dividing the arc into a bolt arc and an arc between holes by a threshold value method according to the radius of the arc;
setting the color of a circle representing the bolt and a bolt arc object as a color A; setting the color of the arc object between the holes as a color B; and converting the multi-segment line object into a straight line object, namely, setting the color of the straight line of the horizontal hole as the color A, and then saving the single-bolt data and the basic information of the CAD file as the CAD file.
The step 5 is as follows:
step 5.1, dividing the angle text object into a horizontal angle text object and a vertical angle text object according to the radius of the arc between the holes as a boundary; taking the radius of an arc line describing an included angle between horizontal angles as a dividing line, calculating the distance between an insertion point and a circle center of text objects at all angles, marking the text objects at the angles with the distance greater than the radius as text objects describing vertical angles, and marking the text objects at the angles with the distance less than the radius as information describing the degree of the horizontal angle between two holes;
step 5.2, correspondingly combining the inter-hole arcs and the horizontal angles in the graph, finding out a horizontal angle text by describing the starting angle and the ending angle of an arc line of an included angle between the horizontal angles, and binding the information of the angle text and the arc line together when an insertion point of the text is clamped between the starting angle and the ending angle of the arc line, wherein the angle of the text is regarded as the angle represented by the arc line;
step 5.3, obtaining a set T of all horizontal angular positions where holes may exist according to preset reference degrees and arc information, wherein the reference degrees are 0 degrees, 45 degrees, 90 degrees, 135 degrees, 180 degrees, 225 degrees, 270 degrees and 315 degrees;
and 5.4, obtaining angle information of the hole with the vertical angle of 0 degree according to the horizontal hole linear object, and calculating the midpoint coordinate of the horizontal hole linear object by using the insertion point coordinate (x, y), the inclination angle t and the length l of the horizontal hole linear object
Figure BDA0002760761460000051
Creating a vertical angle text object with the vertical degree of 0, and taking the calculated midpoint coordinate as the insertion point position of the newly created text object;
step 5.5, combining the vertical angle degree and the horizontal angle degree into complete position information of one hole according to the insertion point position of the vertical angle text object, and calculating the horizontal angle degree of each vertical angle text according to the insertion point coordinates (x, y) and the circle center coordinates (a, b) of all the vertical angles
Figure BDA0002760761460000061
For each vertical angle, traversing all horizontal angles in the horizontal angle set T obtained in the step 5.3, wherein the horizontal angle number of the text object with the vertical angle is the nearestObtaining horizontal angle and vertical angle information of all holes as accurate horizontal angle information of the vertical angle, and obtaining a set N of hole information;
step 5.6, corresponding all hole specification text objects to holes one by one, setting specification as M for holes without hole specification information20", set the specification of all holes in the set N obtained in step 5.5 to M20(ii) a Calculating the horizontal angle degree of each hole specification text according to the coordinates (x, y) of the insertion point and the coordinates (a, b) of the circle center of all the hole specification texts
Figure BDA0002760761460000062
For each hole specification, traversing all horizontal angles of the holes in the set N, searching the hole closest to the horizontal angle of the hole specification text, and setting the specification information of the hole as the hole specification represented by the specification text;
step 5.7, reading the bolt number, the production quantity and the production specification information in the single bolt drawing file, and judging whether a top hole appears:
reading a text below a single bolt image file to obtain a bolt number, a production specification and a hole number of the bolt, adding a hole with a horizontal angle of 0 degree and a vertical angle of 90 degrees into a hole set N when the difference between the hole number in the text and the number of identified holes is 2, detecting whether a hole specification text describing the hole specification exists or not by a threshold method, if so, recording the information, and if not, setting the specification of the hole specification text to be M20And finally obtaining all information describing a single bolt for subsequent template file generation.
And 5.3, breadth-first search is adopted, and information for recording the included angle degree between two holes is combined into horizontal angle information of the position of the recording hole according to the connection relation between arcs, so that the problem of arc missing is avoided.
The method for automatically identifying the CAD engineering drawing of the bolt has the advantages that manual operation before automatic production can be assisted, important effects on improving production rate are played, errors are reduced, and cost is effectively reduced.
Drawings
FIG. 1 is a schematic diagram of a system framework for automatically recognizing CAD engineering drawings.
Detailed Description
The present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
The invention discloses a method for automatically identifying a bolt CAD engineering drawing, a flow chart is shown in figure 1, and the method is implemented according to the following steps:
step 1, reading a multi-bolt graph file by using a dxfllb-3.17.0 library, and storing all data and basic information of a CAD file into a memory of a computer;
in the step 1, the method comprises the following steps of,
the data comprises a straight line object, a text object, a circular arc object and a ball object;
the basic information of the CAD file includes:
multi-bolt graph file: initially inputting a bolt map file, wherein information of a plurality of bolts is included;
bolt drawing file: dividing a multi-bolt graph file into files containing single bolt information;
bolt ball radius: obtaining the radiuses of all bolt balls according to the radiuses of the arc objects in the file;
coordinates of the center of the bolt ball: obtaining the sphere center coordinate of each bolt ball according to the circle center coordinate of the arc object in the file;
common circular arc: most of arc objects in the file comprise start angle, end angle and circle center coordinate information;
marking a circular arc: the method comprises the following steps that (1) arcs with special marks are arranged in some files, and the arcs need to be converted into common arc objects in the using process of a system;
angle text: text information in the file for representing the angle;
horizontal angle text: the text information is used for representing the horizontal angle between the two holes in the angle text;
vertical angle text: the text information is used for representing the vertical angle between the two holes in the angle text;
arc of bolt: the circular arc used for representing the ball body of the bolt;
arc among holes: a circular arc used to represent the angle between two holes;
horizontal hole straight line: a linear object indicating the position of a hole having a vertical angle of 0 °;
hole specification text: text information indicating the specifications of the holes.
Step 2, dividing the whole multi-bolt graph file into a plurality of single-bolt graph files according to the radius of the bolt ball in the multi-bolt graph file and the coordinates of the ball centers of all the bolt balls;
the step 2 is as follows:
step 2.1, obtaining the radius of the bolt: firstly, sequencing the radiuses R of all circles, arcs and labeled arcs from small to large and traversing once, and calculating the ratio b of two adjacent radiuses each timer,brThe calculation formula of (2):
Figure BDA0002760761460000081
wherein R2]Representing the sequence after the radius sequencing of all circles, arcs and labeled arcs, wherein i represents the current position in the sequence in the traversal process;
step 2.2, determining all circle center coordinates: traversing all data examples with centers, including circles and arcs, and storing coordinates of all centers;
step 2.3, dividing single bolt data: the method comprises the steps of representing bolts by circle center coordinates, dividing data objects with circle center information into bolts with the same circle center to construct a data set of each single bolt, taking the center point coordinates of a straight line object as coordinates (x, y) representing the position of the straight line and the insertion point coordinates of a text object as coordinates (x, y) representing the position of the text object, distributing all the straight line objects and the text object to data sets of different bolts, and finally obtaining a plurality of data sets of single bolt graph information, wherein all the data objects in the same set are used for describing the same single bolt graph.
Step 2.1 when br< 2 and brIf the radius is more than 1.15, the radius of all the bolt balls in the multi-bolt file is considered to be R [ i +1 ]]Said step (c)2.2, when the difference between the x axis and the y axis of the coordinates of the two circle centers is less than 0.2R, the two circle centers are considered as the same circle center; if the coordinates of the linear object or the text object in the step 2.3 are the coordinates of the center of a circle of a certain bolt (r)x,ry) Any one of the following relationships is satisfied:
(1)|rx-x|<1.7333R
(2) if ryR is required when > yy-y<2.333R
(3) If ryIf < y, then y-r is requiredy<1.85R,
The straight-line object or text object is divided into the bolts, where R denotes the radius obtained in step 2.1, x denotes the abscissa of the straight-line object or text object, and y denotes the ordinate of the straight-line object or text object.
Step 3, carrying out data standardization on all the single bolt graph files obtained in the step 2;
the step 3 is as follows:
unifying all circle center coordinates of the same bolt containing object: converting the marked arc into common arc data, namely, an arc represented by a circle center coordinate, an initial radian, a termination radian and a radius;
changing a data object describing that an included angle between horizontal angles is a circle into arc data according to the text information of the angle outside the circle;
dividing the arc into a bolt arc and an arc between holes by a threshold value method according to the radius of the arc;
setting the color of a circle representing the bolt and a bolt arc object as a color A; setting the color of the arc object between the holes as a color B; and converting the multi-segment line object into a straight line object, namely, setting the color of the straight line of the horizontal hole as the color A, and then saving the single-bolt data and the basic information of the CAD file as the CAD file.
Step 4, reading all texts and linear information in the standardized single-bolt graph file obtained in the step 3 by using a dxflib-3.17.0 library, and performing the step 5 and the step 6 on each single-bolt graph file to obtain a processing template file of a single bolt ball;
step 5, processing and combining the text and the straight line information of the single bolt ball obtained in the step 4 to finally obtain the processing information of the single bolt ball;
the step 5 is as follows:
step 5.1, dividing the angle text object into a horizontal angle text object and a vertical angle text object according to the radius of the arc between the holes as a boundary; taking the radius of an arc line describing an included angle between horizontal angles as a dividing line, calculating the distance between an insertion point and a circle center of text objects at all angles, marking the text objects at the angles with the distance greater than the radius as text objects describing vertical angles, and marking the text objects at the angles with the distance less than the radius as information describing the degree of the horizontal angle between two holes;
step 5.2, correspondingly combining the inter-hole arcs and the horizontal angles in the graph, finding out a horizontal angle text by describing the starting angle and the ending angle of an arc line of an included angle between the horizontal angles, and binding the information of the angle text and the arc line together when an insertion point of the text is clamped between the starting angle and the ending angle of the arc line, wherein the angle of the text is regarded as the angle represented by the arc line;
step 5.3, obtaining a set T of all horizontal angular positions where holes may exist according to preset reference degrees and arc information, wherein the reference degrees are 0 degrees, 45 degrees, 90 degrees, 135 degrees, 180 degrees, 225 degrees, 270 degrees and 315 degrees;
and 5.4, obtaining angle information of the hole with the vertical angle of 0 degree according to the horizontal hole linear object, and calculating the midpoint coordinate of the horizontal hole linear object by using the insertion point coordinate (x, y), the inclination angle t and the length l of the horizontal hole linear object
Figure BDA0002760761460000111
Creating a vertical angle text object with the vertical degree of 0, and taking the calculated midpoint coordinate as the insertion point position of the newly created text object;
step 5.5, combining the vertical angle degree and the horizontal angle degree into complete position information of one hole according to the insertion point position of the vertical angle text object, and calculating each hole according to the insertion point coordinates (x, y) and the circle center coordinates (a, b) of all the vertical anglesHorizontal angle number of a vertical angle text
Figure BDA0002760761460000112
For each vertical angle, traversing all the horizontal angles in the horizontal angle set T obtained in the step 5.3, wherein the horizontal angle which is closest to the horizontal angle number of the vertical angle text object is used as the accurate horizontal angle information of the vertical angle, thereby obtaining the horizontal angle and vertical angle information of all holes and obtaining a hole information set N;
step 5.6, corresponding all hole specification text objects to holes one by one, setting specification as M for holes without hole specification information20", set the specification of all holes in the set N obtained in step 5.5 to M20(ii) a Calculating the horizontal angle degree of each hole specification text according to the coordinates (x, y) of the insertion point and the coordinates (a, b) of the circle center of all the hole specification texts
Figure BDA0002760761460000113
For each hole specification, traversing all horizontal angles of the holes in the set N, searching the hole closest to the horizontal angle of the hole specification text, and setting the specification information of the hole as the hole specification represented by the specification text;
step 5.7, reading the bolt number, the production quantity and the production specification information in the single bolt drawing file, and judging whether a top hole appears:
reading a text below a single bolt image file to obtain a bolt number, a production specification and a hole number of the bolt, adding a hole with a horizontal angle of 0 degree and a vertical angle of 90 degrees into a hole set N when the difference between the hole number in the text and the number of identified holes is 2, detecting whether a hole specification text describing the hole specification exists or not by a threshold method, if so, recording the information, and if not, setting the specification of the hole specification text to be M20And finally obtaining all information describing a single bolt for subsequent template file generation.
And 5.3, breadth-first search is adopted, and information for recording the included angle degree between two holes is combined into horizontal angle information of the position of the recording hole according to the connection relation between arcs, so that the problem of arc missing is avoided.
Step 6, generating a template file according to a fixed format: firstly, outputting all identified information according to a template file format required by actual processing to obtain a template file; and secondly, outputting all the identified information according to a template file format required by the machine to obtain a template file.
The invention provides an automatic identification method of a bolt CAD engineering drawing, which provides help for a manual operation process before automatic production, can obviously improve the production speed, and avoids the situations of misreading and misreading caused by manual error.

Claims (7)

1. A CAD engineering drawing method for automatically identifying bolts is characterized by comprising the following steps:
step 1, reading a multi-bolt graph file by using a dxfllb-3.17.0 library, and storing all data and basic information of a CAD file into a memory of a computer;
step 2, dividing the whole multi-bolt graph file into a plurality of single-bolt graph files according to the radius of the bolt ball in the multi-bolt graph file and the coordinates of the ball centers of all the bolt balls;
step 3, carrying out data standardization on all the single bolt graph files obtained in the step 2;
step 4, reading all texts and linear information in the standardized single-bolt graph file obtained in the step 3 by using a dxflib-3.17.0 library, and performing the step 5 and the step 6 on each single-bolt graph file to obtain a processing template file of a single bolt ball;
step 5, processing and combining the text and the straight line information of the single bolt ball obtained in the step 4 to finally obtain the processing information of the single bolt ball;
step 6, generating a template file according to a fixed format: firstly, outputting all identified information according to a template file format required by actual processing to obtain a template file; and secondly, outputting all the identified information according to a template file format required by the machine to obtain a template file.
2. The method for CAD engineering drawing of automatic identification bolt according to claim 1, characterized in that, in step 1,
the data comprises a straight line object, a text object, a circular arc object and a ball object;
the basic information of the CAD file includes:
multi-bolt graph file: initially inputting a bolt map file, wherein information of a plurality of bolts is included;
bolt drawing file: dividing a multi-bolt graph file into files containing single bolt information;
bolt ball radius: obtaining the radiuses of all bolt balls according to the radiuses of the arc objects in the file;
coordinates of the center of the bolt ball: obtaining the sphere center coordinate of each bolt ball according to the circle center coordinate of the arc object in the file;
common circular arc: most of arc objects in the file comprise start angle, end angle and circle center coordinate information;
marking a circular arc: the method comprises the following steps that (1) arcs with special marks are arranged in some files, and the arcs need to be converted into common arc objects in the using process of a system;
angle text: text information in the file for representing the angle;
horizontal angle text: the text information is used for representing the horizontal angle between the two holes in the angle text;
vertical angle text: the text information is used for representing the vertical angle between the two holes in the angle text;
arc of bolt: the circular arc used for representing the ball body of the bolt;
arc among holes: a circular arc used to represent the angle between two holes;
horizontal hole straight line: a linear object indicating the position of a hole having a vertical angle of 0 °;
hole specification text: text information indicating the specifications of the holes.
3. The method for automatically identifying the CAD engineering drawing of the bolt according to claim 2, wherein the step 2 is as follows:
step 2.1, obtaining the radius of the bolt: firstly, sequencing the radiuses R of all circles, arcs and labeled arcs from small to large and traversing once, and calculating the ratio b of two adjacent radiuses each timer,brThe calculation formula of (2):
Figure FDA0002760761450000021
wherein R2]Representing the sequence after the radius sequencing of all circles, arcs and labeled arcs, wherein i represents the current position in the sequence in the traversal process;
step 2.2, determining all circle center coordinates: traversing all data examples with centers, including circles and arcs, and storing coordinates of all centers;
step 2.3, dividing single bolt data: the method comprises the steps of representing bolts by circle center coordinates, dividing data objects with circle center information into bolts with the same circle center to construct a data set of each single bolt, taking the center point coordinates of a straight line object as coordinates (x, y) representing the position of the straight line and the insertion point coordinates of a text object as coordinates (x, y) representing the position of the text object, distributing all the straight line objects and the text object to data sets of different bolts, and finally obtaining a plurality of data sets of single bolt graph information, wherein all the data objects in the same set are used for describing the same single bolt graph.
4. The method for CAD engineering drawing of automatic identification bolt of claim 3, wherein b is the same as B in step 2.1r< 2 and brIf the radius is more than 1.15, the radius of all the bolt balls in the multi-bolt file is considered to be R [ i +1 ]]When the difference between the x axis and the y axis of the coordinates of the two circle centers in the step 2.2 is less than 0.2R, the two circle centers are considered to be the same circle center; if the coordinates of the linear object or the text object in the step 2.3 are the coordinates of the center of a circle of a certain bolt (r)x,ry) Any one of the following relationships is satisfied:
(1)|rx-x|<1.7333R
(2) if ryR is required when > yy-y<2.333R
(3) If ryIf < y, then y-r is requiredy<1.85R,
The straight-line object or text object is divided into the bolts, where R denotes the radius obtained in step 2.1, x denotes the abscissa of the straight-line object or text object, and y denotes the ordinate of the straight-line object or text object.
5. The method for automatically identifying the CAD engineering drawing of the bolt according to claim 4, wherein the step 3 is as follows:
unifying all circle center coordinates of the same bolt containing object: converting the marked arc into common arc data, namely, an arc represented by a circle center coordinate, an initial radian, a termination radian and a radius;
changing a data object describing that an included angle between horizontal angles is a circle into arc data according to the text information of the angle outside the circle;
dividing the arc into a bolt arc and an arc between holes by a threshold value method according to the radius of the arc;
setting the color of a circle representing the bolt and a bolt arc object as a color A; setting the color of the arc object between the holes as a color B; and converting the multi-segment line object into a straight line object, namely, setting the color of the straight line of the horizontal hole as the color A, and then saving the single-bolt data and the basic information of the CAD file as the CAD file.
6. The method for automatically identifying the CAD engineering drawing of the bolt according to claim 5, wherein the step 5 is as follows:
step 5.1, dividing the angle text object into a horizontal angle text object and a vertical angle text object according to the radius of the arc between the holes as a boundary; taking the radius of an arc line describing an included angle between horizontal angles as a dividing line, calculating the distance between an insertion point and a circle center of text objects at all angles, marking the text objects at the angles with the distance greater than the radius as text objects describing vertical angles, and marking the text objects at the angles with the distance less than the radius as information describing the degree of the horizontal angle between two holes;
step 5.2, correspondingly combining the inter-hole arcs and the horizontal angles in the graph, finding out a horizontal angle text by describing the starting angle and the ending angle of an arc line of an included angle between the horizontal angles, and binding the information of the angle text and the arc line together when an insertion point of the text is clamped between the starting angle and the ending angle of the arc line, wherein the angle of the text is regarded as the angle represented by the arc line;
step 5.3, obtaining a set T of all horizontal angular positions where holes may exist according to preset reference degrees and arc information, wherein the reference degrees are 0 degrees, 45 degrees, 90 degrees, 135 degrees, 180 degrees, 225 degrees, 270 degrees and 315 degrees;
and 5.4, obtaining angle information of the hole with the vertical angle of 0 degree according to the horizontal hole linear object, and calculating the midpoint coordinate of the horizontal hole linear object by using the insertion point coordinate (x, y), the inclination angle t and the length l of the horizontal hole linear object
Figure FDA0002760761450000051
Creating a vertical angle text object with the vertical degree of 0, and taking the calculated midpoint coordinate as the insertion point position of the newly created text object;
step 5.5, combining the vertical angle degree and the horizontal angle degree into complete position information of one hole according to the insertion point position of the vertical angle text object, and calculating the horizontal angle degree of each vertical angle text according to the insertion point coordinates (x, y) and the circle center coordinates (a, b) of all the vertical angles
Figure FDA0002760761450000052
For each vertical angle, traversing all the horizontal angles in the horizontal angle set T obtained in the step 5.3, wherein the horizontal angle which is closest to the horizontal angle number of the vertical angle text object is used as the accurate horizontal angle information of the vertical angle, thereby obtaining the horizontal angle and vertical angle information of all holes and obtaining a hole information set N;
step 5.6, corresponding all hole specification text objects to holes one by one, setting specification as M for holes without hole specification information20", willThe specification of all holes in the set N obtained in step 5.5 is set to M20(ii) a Calculating the horizontal angle degree of each hole specification text according to the coordinates (x, y) of the insertion point and the coordinates (a, b) of the circle center of all the hole specification texts
Figure FDA0002760761450000053
For each hole specification, traversing all horizontal angles of the holes in the set N, searching the hole closest to the horizontal angle of the hole specification text, and setting the specification information of the hole as the hole specification represented by the specification text;
step 5.7, reading the bolt number, the production quantity and the production specification information in the single bolt drawing file, and judging whether a top hole appears:
reading a text below a single bolt image file to obtain a bolt number, a production specification and a hole number of the bolt, adding a hole with a horizontal angle of 0 degree and a vertical angle of 90 degrees into a hole set N when the difference between the hole number in the text and the number of identified holes is 2, detecting whether a hole specification text describing the hole specification exists or not by a threshold method, if so, recording the information, and if not, setting the specification of the hole specification text to be M20And finally obtaining all information describing a single bolt for subsequent template file generation.
7. The method for automatically identifying the CAD engineering drawing of the bolt as recited in claim 6, wherein in the step 5.3, the breadth-first search is adopted, and the information for recording the included angle degree between two holes is combined into the horizontal angle information for recording the hole position according to the connection relation between arcs, so that the problem of arc missing is avoided.
CN202011217063.4A 2020-11-04 2020-11-04 Method for automatically identifying CAD (computer-aided design) engineering drawing of bolt Pending CN112434502A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011217063.4A CN112434502A (en) 2020-11-04 2020-11-04 Method for automatically identifying CAD (computer-aided design) engineering drawing of bolt

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011217063.4A CN112434502A (en) 2020-11-04 2020-11-04 Method for automatically identifying CAD (computer-aided design) engineering drawing of bolt

Publications (1)

Publication Number Publication Date
CN112434502A true CN112434502A (en) 2021-03-02

Family

ID=74695351

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011217063.4A Pending CN112434502A (en) 2020-11-04 2020-11-04 Method for automatically identifying CAD (computer-aided design) engineering drawing of bolt

Country Status (1)

Country Link
CN (1) CN112434502A (en)

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10105590A (en) * 1996-09-30 1998-04-24 Mitsubishi Materials Corp Cad drawing collation system
JPH10162041A (en) * 1996-11-29 1998-06-19 Fujitsu Ten Ltd System for data conversion from two-dimensional cad to three-dimensional cad, and interference checking method for mounted component
JPH1166235A (en) * 1997-08-20 1999-03-09 Mitsubishi Electric Corp Method and device for character recognition
KR20000037239A (en) * 2000-04-14 2000-07-05 이영 The method of making out a drawing which standardize a plan of metal mold linking with a CAD system
KR20010079305A (en) * 2001-07-06 2001-08-22 최웅학 Semiconductor read frame-designable CAD system
JP2008033875A (en) * 2006-07-03 2008-02-14 Bigvan Inc Layering program of cad drawing data, recording medium and device therefor, and layering system therefor, and cad drawing reference data checking device
CN101944080A (en) * 2010-09-02 2011-01-12 北京科技大学 Method for reading and XML conversion based on DXF file format
CN102331746A (en) * 2011-10-13 2012-01-25 西北工业大学 Drawing interchange format (DXF) file-based pen type plotter plotting path optimization method
KR101451517B1 (en) * 2013-07-19 2014-10-16 울산대학교 산학협력단 Method for recogniting fastener and apparatus thereof
CN105930323A (en) * 2015-09-06 2016-09-07 中国银联股份有限公司 File generating method and apparatus
CN107479504A (en) * 2017-08-21 2017-12-15 南京中车浦镇城轨车辆有限责任公司 A kind of method of digital control processing Automatic feature recognition and path planning
US20190163970A1 (en) * 2017-11-29 2019-05-30 Abc Fintech Co., Ltd Method and device for extracting chart information in file
CN111159800A (en) * 2019-12-13 2020-05-15 佛山欧神诺云商科技有限公司 Method and device for automatically generating 3D model based on CAD file
CN111753717A (en) * 2020-06-23 2020-10-09 北京百度网讯科技有限公司 Method, apparatus, device and medium for extracting structured information of text

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10105590A (en) * 1996-09-30 1998-04-24 Mitsubishi Materials Corp Cad drawing collation system
JPH10162041A (en) * 1996-11-29 1998-06-19 Fujitsu Ten Ltd System for data conversion from two-dimensional cad to three-dimensional cad, and interference checking method for mounted component
JPH1166235A (en) * 1997-08-20 1999-03-09 Mitsubishi Electric Corp Method and device for character recognition
KR20000037239A (en) * 2000-04-14 2000-07-05 이영 The method of making out a drawing which standardize a plan of metal mold linking with a CAD system
KR20010079305A (en) * 2001-07-06 2001-08-22 최웅학 Semiconductor read frame-designable CAD system
JP2008033875A (en) * 2006-07-03 2008-02-14 Bigvan Inc Layering program of cad drawing data, recording medium and device therefor, and layering system therefor, and cad drawing reference data checking device
CN101944080A (en) * 2010-09-02 2011-01-12 北京科技大学 Method for reading and XML conversion based on DXF file format
CN102331746A (en) * 2011-10-13 2012-01-25 西北工业大学 Drawing interchange format (DXF) file-based pen type plotter plotting path optimization method
KR101451517B1 (en) * 2013-07-19 2014-10-16 울산대학교 산학협력단 Method for recogniting fastener and apparatus thereof
CN105930323A (en) * 2015-09-06 2016-09-07 中国银联股份有限公司 File generating method and apparatus
CN107479504A (en) * 2017-08-21 2017-12-15 南京中车浦镇城轨车辆有限责任公司 A kind of method of digital control processing Automatic feature recognition and path planning
US20190163970A1 (en) * 2017-11-29 2019-05-30 Abc Fintech Co., Ltd Method and device for extracting chart information in file
CN111159800A (en) * 2019-12-13 2020-05-15 佛山欧神诺云商科技有限公司 Method and device for automatically generating 3D model based on CAD file
CN111753717A (en) * 2020-06-23 2020-10-09 北京百度网讯科技有限公司 Method, apparatus, device and medium for extracting structured information of text

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
蔡善乐, 蒋钧钧, 张永贵: "网架螺栓节点球的CAD/CAM集成初探", 甘肃工业大学学报, no. 01, 25 March 2001 (2001-03-25) *
魏嵬;赵金伟;赵鑫;杨晶雯;苏琪;高敏;: "传感网中基于时间帧的信息场变速率模型", 电子科技大学学报, no. 05, 30 September 2015 (2015-09-30) *

Similar Documents

Publication Publication Date Title
US4561105A (en) Complex pattern recognition method and system
CN110070053B (en) Font feature extraction method and device
CN112232341B (en) Text detection method, electronic device and computer readable medium
CN112084973B (en) Tunnel pipe ring identification and labeling method based on orthographic projection image
CN109241555B (en) Multi-primitive Gerber file analyzing and drawing method for improving drawing precision
CN113095267B (en) Data extraction method of statistical chart, electronic device and storage medium
CN111428749A (en) Image annotation task pre-verification method, device, equipment and storage medium
CN104794485A (en) Written character recognizing method and written character recognizing device
CN109814783B (en) Microstation-based stippling and drawing method and device for wire annotation
CN101388112B (en) Character style changing method and system
CN112434502A (en) Method for automatically identifying CAD (computer-aided design) engineering drawing of bolt
CN101452368B (en) Hand-written character input method
CN109784236B (en) Method for identifying table contents in railway drawing
CN110717207B (en) Labeling method, system and storage medium for pipeline design
CN116029012B (en) Integrated keel distribution diagram drawing, informationized labeling and statistics method and system
CN116541912A (en) Method and device for generating wiring diagram based on CAD image recognition
CN115147858A (en) Method, device, equipment and medium for generating image data of handwritten form
CN113901541A (en) Identification method for elevation marking of building and structure diagram
CN109800478B (en) Method for identifying signal machine in railway drawing
JP4648084B2 (en) Symbol recognition method and apparatus
CN111310525A (en) Mathematical formula symbol recognition method
CN110413964B (en) Method for converting die lettering into editable text and computer-readable storage medium
JPH01126774A (en) Graphic input device
CN111736564B (en) Halcon-based chemical OTS simulation DCS flow chart manufacturing method
CN116704531A (en) Financial statement detection method based on lightweight YOLO model

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination