CN111353284B - Part diagram title bar filling method, system and storage medium - Google Patents
Part diagram title bar filling method, system and storage medium Download PDFInfo
- Publication number
- CN111353284B CN111353284B CN202010121739.3A CN202010121739A CN111353284B CN 111353284 B CN111353284 B CN 111353284B CN 202010121739 A CN202010121739 A CN 202010121739A CN 111353284 B CN111353284 B CN 111353284B
- Authority
- CN
- China
- Prior art keywords
- text
- ordinate
- text object
- column
- header
- 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.)
- Active
Links
Classifications
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/30—Computing systems specially adapted for manufacturing
Landscapes
- Processing Or Creating Images (AREA)
Abstract
The invention discloses a part diagram title bar filling method, a part diagram title bar filling system and a storage medium, wherein the method is characterized in that characters are positioned to be a corresponding cell position in a table through character coordinates, character heights, character lengths and text contents, and the table is generated sequentially; after the table is generated, the table contents and the corresponding parts drawing title bar are correspondingly filled in the parts drawing title bar according to the table contents selected by the user. According to the invention, the information of the assembly drawing detail column is extracted through the attribute of the text object of the assembly drawing detail column, and the extracted content is filled into the corresponding part drawing title column, so that the automatic filling of the part drawing title column is realized, the repeated filling steps are reduced, and the drawing efficiency is improved. The invention can be widely applied to the CAD field.
Description
Technical Field
The invention relates to the technical field of CAD (computer aided design), in particular to a part drawing title bar filling method, a part drawing title bar filling system and a storage medium.
Background
At present, in most design and manufacturing fields, drawings are still indispensable engineering languages, and in particular, in the non-standard design field. The amount of drawings produced each year is enormous, for example, a set of tooling equipment that is not complex, requires equipment assembly drawings, about 6 unit assembly drawings, about 40 part drawings, etc. In the industry standard, a detail column is attached to the assembly drawing, and the detail column contains basic information of each part, such as part number, part name, number, material/model, remarks, and the like. The information in the detail column is also required to be filled in the title of the part drawing, for example, the information to be filled in the part title column includes part number, part name, number, material and the like. Currently, the commonly adopted method for manually filling in the title bar results in lower drawing efficiency.
Disclosure of Invention
In view of the above, it is an object of the present invention to provide a part drawing title bar filling method, system and storage medium for improving drawing efficiency.
The first technical scheme adopted by the invention is as follows:
a part map title bar filling method comprising the steps of:
traversing the text object of the detail column of the assembly drawing, and reading the text content, length, height, abscissa and ordinate of the text object from the attribute value of the text object;
determining an header text object of an assembly drawing detail column according to the text content and the ordinate of the text object;
according to the abscissa and the length of the header character object, obtaining the abscissa of the centers of the character objects in each column of the detail column of the assembly drawing;
determining the column number of the text object according to the abscissa of the text object center of each column of the assembly drawing detail column and the abscissa of the text object;
determining the number of rows of the text object according to the ordinate of the header text object, the height of the text object and the ordinate of the text object;
generating an assembly drawing detail column table according to the text content of the text object, the column number of the text object and the line number of the text object;
acquiring filling information and a part drawing title bar to be filled in an assembly drawing detail bar table according to input;
and filling the filling information into the corresponding position of the title bar of the part drawing.
Further, the determining the header text object of the assembly chart detail column according to the text content and the ordinate of the text object specifically includes:
comparing the text content of the text object with a preset header text set, and marking the text object when the text object exists in the preset header text set to obtain a marked text object;
classifying the marked text objects according to the ordinate;
acquiring an ordinate average value of the class with the largest number of marked text objects as a header ordinate average value;
and determining the header character object of the detail column of the assembly drawing according to the header ordinate average value and the ordinate of the character object.
Further, the classifying the labeled text object according to the ordinate specifically includes:
randomly selecting a marked text object as a category;
comparing the vertical coordinate of the unclassified marked text object with the average value of the vertical coordinate of the marked text object in the existing category;
when the difference between the ordinate of the unclassified marked text object and the average value of the ordinate of the marked text object in the existing category is smaller than or equal to a first set value, adding the unclassified marked text object into the existing category;
and when the difference between the ordinate of the unclassified marked text object and the average value of the ordinate of the marked text object in the existing category is larger than a first set value, the unclassified marked text object is independently used as a category.
Further, the determining the column number of the text object according to the abscissa of the text object center of each column of the detail column of the assembly drawing and the abscissa of the text object specifically includes:
and taking the column number of the abscissa of the center of the text object of the detail column of the assembly drawing with the minimum difference value between the right side of the abscissa of the text object and the abscissa of the text object as the column number of the text object.
Further, the determining the number of rows of the text object according to the ordinate of the header text object, the height of the text object and the ordinate of the text object specifically includes:
taking the ordinate of the header character object as a reference, taking the height of the character object as an increment, and obtaining the row ordinate value of each row;
and comparing the ordinate of the character object with the ordinate of the row respectively, and recording the row number of the ordinate of the row compared with the character object as the row number of the character object when the difference is smaller than a second set value.
Further, the method also comprises the following steps:
traversing the text objects of the assembly drawing detail column and the part drawing title column, and reading the font type, the font size, the font color, the alignment mode and the text content of the text objects from the attribute values of the text objects;
setting checking rules according to input, wherein the checking rules comprise font types, font sizes, font colors, centering checking and illegal characters;
and checking the font type, the font size, the font color, the alignment mode and the text content of the text object according to the checking rule, and outputting a checking result.
Further, the method also comprises the following steps:
traversing a block object of a part graph to obtain the name of the block object;
confirming a part map title bar block according to the name of the block object, and acquiring part information of the part map title bar block, wherein the part information comprises a part number;
and comparing the part information of the title bar block with the part information of the assembly drawing detail bar table, and outputting a checking result.
Further, the comparing the part information of the title bar block with the part information of the assembly drawing detail bar form, and outputting the checking result, which specifically includes:
acquiring part numbers in the assembly detail column table, and searching the same part numbers in the title column block;
when the same part numbers are not searched, labeling the part numbers in the assembly detail column table;
when the same part number is searched, the part information corresponding to the part number of the assembly detail column table is compared with the part information corresponding to the part number of the same title column block, and the title column block is marked with the part information with the difference.
The second technical scheme adopted by the invention is as follows:
a parts map title bar filling system comprising:
the reading module is used for traversing the text object in the detail column of the assembly drawing and reading the text content, the length, the height, the abscissa and the ordinate of the text object from the attribute value of the text object;
the calculation module is used for determining the header character object of the assembly chart detail column according to the text content and the ordinate of the character object; according to the abscissa and the length of the header character object, obtaining the abscissa of the centers of the character objects in each column of the detail column of the assembly drawing;
the confirming module is used for confirming the column number of the text object according to the abscissa of the text object center of each column of the detail column of the assembly drawing and the abscissa of the text object; determining the number of rows of the text object according to the ordinate of the header text object, the height of the text object and the ordinate of the text object;
the acquisition module is used for generating an assembly drawing detail column table according to the text content of the text object, the column number of the text object and the line number of the text object; acquiring filling information and a part drawing title bar to be filled in an assembly drawing detail bar table according to input;
and the filling module is used for filling the filling information into the corresponding position of the part drawing title bar.
The third technical scheme adopted by the invention is as follows:
a computer readable storage medium having stored thereon a computer program which when executed by a processor implements the part map title bar filling method.
Compared with the prior art, the method and the device have the advantages that the information of the assembly drawing detail column is extracted through the attribute of the text object of the assembly drawing detail column, and the extracted content is filled into the corresponding part drawing title column, so that the automatic filling of the part drawing title column is realized, the repeated filling steps are reduced, and the drawing efficiency is improved.
Drawings
FIG. 1 is a block diagram illustrating steps of a method for populating a parts drawing title bar in accordance with one embodiment of the present invention.
Detailed Description
The conception, specific structure, and technical effects produced by the present invention will be clearly and completely described below with reference to the embodiments and the drawings to fully understand the objects, aspects, and effects of the present invention.
The embodiment of the invention provides a part diagram title bar filling method, which comprises the following steps with reference to fig. 1:
s1, traversing a text object in an assembly chart detail column, and reading text content, length, height, abscissa and ordinate of the text object from attribute values of the text object;
s2, determining the header text object of the assembly drawing detail column according to the text content and the ordinate of the text object;
s3, according to the abscissa and the length of the header character object, obtaining the abscissa of the centers of the character objects in each column of the detail column of the assembly drawing;
s4, determining the column number of the character object according to the abscissa of the center of each column of the character object in the detail column of the assembly drawing and the abscissa of the character object;
s5, determining the number of rows of the character object according to the ordinate of the header character object, the height of the character object and the ordinate of the character object;
s6, generating an assembly drawing detail column table according to the text content of the text object, the column number of the text object and the row number of the text object;
s7, acquiring filling information and a part drawing title bar to be filled in an assembly drawing detail bar table according to input;
and S8, filling the filling information into the corresponding position of the part drawing title bar.
Specifically, the assembly drawing is a drawing expressing the working principle of the machine or the component, the movement mode, the connection between the parts and the assembly relation thereof, and is one of the main technical documents in production. In the process of producing a new machine or component, the design is generally performed first, an assembly drawing is drawn, then the assembly drawing is disassembled to draw a part drawing, then the part is manufactured according to the part drawing, and finally the part is assembled into the machine or component according to the assembly drawing. The detail column of the assembly drawing is typically placed over and aligned with the title column of the assembly drawing. The method is used for filling in serial numbers, names, materials, quantity, standard component specifications, part heat treatment requirements and the like of the component parts.
During CAD drawing, the assembly drawing detail column may be an integral form, or may be a form broken up into discrete objects. If the detail column is an integral Table, that is, the EntityName attribute of the Table in the program is in the Table type, the value of each cell can be obtained through the GetText function, so that the content of the detail column is read. If the detail column is a scattered table, the Text and the table are different objects, and the EntityName attribute of the Text object in the program is Text or MText, namely a single line of Text or a plurality of lines of Text. Since the text objects are scattered at this time, the program can read the content of the text objects through the TextString attribute of the text objects, but at this time, the number of ranks in the list corresponding to each text object cannot be known, so that different text objects cannot be organized into associated content. The embodiment of the invention mainly aims at processing the assembly drawing detail column of a single-row text or multi-row text in the form, and the assembly drawing detail column is a scattered text object, so that the text can not be directly extracted through the form, and the text is required to be positioned as a corresponding cell position in the form through the text coordinates, the text height, the text length and the text content.
Part drawings are patterns that express the shape, size, and characteristics of individual parts, and are also patterns used in the manufacture and inspection of machine parts, also known as part work drawings. In the production process, production preparation, processing and manufacturing and inspection are carried out according to the part patterns and the technical requirements of the patterns. It is therefore an important technical document for guiding the production of parts. The parts drawing title bar is used for recording names, materials, quantity, date, numbers, proportion, drawing staff, auditors and the like of parts.
Parts drawing title bar in order to enable a program to recognize and fill in the parts drawing title bar, some requirements need to be placed on the standardization of the parts drawing title bar. In this embodiment, two schemes are used to achieve the purpose of identifying the part drawing title bar, one scheme is that the text object of the part drawing title bar is put into a separate drawing layer, and the text content of the text object is of the type corresponding to the text content to be filled in, so that the program can identify the text object according to the drawing layer and the text content. If the program traverses the selected words, the words with the layer being a title bar and the content being a (name) represent the part name; and secondly, making the title bar of the part drawing into a block object, setting attributes for the block, and obtaining the corresponding value of each attribute as the content of the title bar. If the block name is "title bar block" and the attribute name is "part name" value, the program traverses the selected block, representing the part name.
The character object refers to an object corresponding to a character type in CAD, and the attribute values of the character object include text content, length, height, coordinates, alignment, and the like.
The assembly drawing detail column table is a corresponding table extracted according to the original assembly drawing detail column, after the assembly drawing detail column table is obtained, a user can input information such as a customer name, a model code number, a designer, a plotter, an equipment name and the like in the table, and one row, namely one part, needs to be selected in a table interface; after the selected program prompts the user to select the corresponding part drawing title bar, after the user selects the corresponding part drawing title bar, the program writes the information of the assembled drawing detail bar table into the corresponding item of the title bar, such as the column content with the table head as the name, into the part name corresponding to the title bar. The program thereby quickly writes information extracted from the assembly drawing details bar and information entered by the user in the form into the parts drawing header bar more efficiently and accurately than manual filling. After the input of a part chart title bar is completed, the program will display the form interface again, and the information such as the customer name, model number, designer, plotter and equipment name of the form interface still displays the value input by the last time, so that the user can continue to select to write in quick succession until all the part chart title bars are written in.
In the embodiment of the invention, the text is positioned into a corresponding cell position in the table through the text coordinates, the text height, the text length and the text content, and the table is formed through the positioning of the text and the text content. After the form is formed, the form content is correspondingly filled into the part drawing title bar according to the form content selected by the user and the corresponding part drawing title bar. Through the steps of automatic extraction and automatic filling, repeated input in the drawing process is reduced, and drawing efficiency is improved.
Further as an optional implementation manner, the determining the header text object of the assembly chart detail column according to the text content and the ordinate of the text object specifically includes:
s21, comparing the text content of the text object with a preset header text set, and marking the text object when the text object exists in the preset header text set to obtain a marked text object;
s22, classifying the marked text objects according to the ordinate;
s23, acquiring an ordinate average value of the class with the largest number of marked text objects as a header ordinate average value;
s24, determining the header character object of the detail column of the assembly drawing according to the header ordinate average value and the ordinate of the character object.
Specifically, the header of the assembled drawing detail column in the drawing process is generally composed of fixed text contents, and candidate text objects serving as the header can be judged by recognizing the text contents of the text objects. In this embodiment, the preset header text set is used to determine whether the text content of the text object is consistent with the text content of the header, where the preset header text set may be set according to specific situations, and generally includes a serial number, a code number, a name, a number, a material/model, a single and remarks, and the like.
By marking the text objects consistent with the preset header text set and performing classification analysis, the rows where the header is located can be identified, and since text contents consistent with the preset header text set may exist in the text objects not having the header, in this embodiment, the row with the most marked text objects is selected as the header, thereby further improving the accuracy of header identification.
Further as an optional implementation manner, the classifying the labeled text objects according to the ordinate specifically includes:
s221, randomly selecting a labeling text object as a category;
s222, comparing the ordinate of the unclassified marked text object with the average value of the ordinate of the marked text object in the existing category;
s223, adding the unclassified marked text object into the existing category when the difference between the ordinate of the unclassified marked text object and the average value of the ordinate of the marked text object in the existing category is smaller than or equal to a first set value;
s224, when the difference between the ordinate of the unclassified marked text object and the average value of the ordinate of the marked text object in the existing category is larger than a first set value, the unclassified marked text object is used as a category independently.
Specifically, the line in which the text object is located is identified by classifying the text object, and in this embodiment, the labeled text object is classified by using a diffusion method, and the standard of classification is a value of the ordinate. Firstly, selecting any one character object as a class, selecting one character object from other character objects, comparing with the other character objects in a vertical coordinate value, and judging that two character objects are in a class if the difference value of the vertical coordinates is smaller than or equal to a first set value, namely, the two character objects are in a row; if the difference value of the ordinate is greater than the first set value, the two text objects are judged to be not in one type, namely the two text objects are not in one row. The labeling text objects can be classified through the logic. The first set value can be adjusted according to actual needs.
Further as an optional implementation manner, the determining the column number of the text object according to the abscissa of the center of each column of the text object and the abscissa of the text object in the detail column of the assembly drawing specifically includes:
and taking the column number of the abscissa of the center of the text object of the detail column of the assembly drawing with the minimum difference value between the right side of the abscissa of the text object and the abscissa of the text object as the column number of the text object.
Specifically, the abscissas of the centers of the character objects in each column are sequenced to obtain the abscissas of the centers of the character objects in each column, the abscissas of the centers of the character objects are compared with the abscissas of the character objects in the column to be determined from small to large, when the abscissas of the character objects in the column to be determined are smaller than the abscissas of the character objects in the first column, the positions of the character objects in the first column are judged, when the abscissas of the character objects in the column to be determined are larger than the abscissas of the character objects in the first column and smaller than the abscissas of the character objects in the second column, the positions of the character objects in the second column are judged, and the columns of all the character objects can be judged by analogy.
Further as an optional implementation manner, the determining the number of rows of the text object according to the ordinate of the header text object, the height of the text object and the ordinate of the text object specifically includes:
s51, taking the ordinate of the header character object as a reference, taking the height of the character object as an increment, and acquiring the row ordinate value of each row;
s52, comparing the ordinate of the text object with the ordinate of the row respectively, and recording the row number of the ordinate of the row compared with the text object as the row number of the text object when the difference is smaller than the second set value.
Specifically, the text height of the content of the general detail column is fixed, the ordinate of each row based on the header can be obtained through the text height of the detail column and the ordinate of the header, and the row number of the text object can be obtained through comparing the ordinate of the text object with the ordinate of each row. The second setting value in this embodiment may be set according to actual needs, for example, may be 0.01, so as to adapt to the situation that the program cannot recognize when the data precision or the text object is slightly shifted.
Further as an alternative embodiment, the method further comprises the steps of:
traversing the text objects of the assembly drawing detail column and the part drawing title column, and reading the font type, the font size, the font color, the alignment mode and the text content of the text objects from the attribute values of the text objects;
setting checking rules according to input, wherein the checking rules comprise font types, font sizes, font colors, centering checking and illegal characters;
and checking the font type, the font size, the font color, the alignment mode and the text content of the text object according to the checking rule, and outputting a checking result.
Specifically, by reading the corresponding attributes of the text objects in the detailed column of the assembly drawing and the title column of the part drawing, the text objects are checked in format, and text elements with format problems are marked with special colors or a check result table is generated. In the embodiment, the text objects of the assembly drawing detail column and the part drawing title column are subjected to format inspection, so that format errors on the drawing can be detected, and the accuracy of the drawing is further improved.
Further as an alternative embodiment, the method further comprises the steps of:
traversing a block object of a part graph to obtain the name of the block object;
confirming a part map title bar block according to the name of the block object, and acquiring part information of the part map title bar block, wherein the part information comprises a part number;
and comparing the part information of the title bar block with the part information of the assembly drawing detail bar table, and outputting a checking result.
Specifically, the checking method mainly aims at a part diagram with a title bar as a block object, the method for confirming the part diagram title bar block is to judge the block object with a block name of 'title bar block' as the title bar block, and the part information of the part diagram title bar block is extracted to carry out matching checking with the part information of an assembly diagram detail bar, and a checking result is output, namely, unmatched text elements are marked or a checking table is generated.
Further as an optional implementation manner, the comparing the part information of the title bar block with the part information of the assembly drawing detail bar form, and outputting the checking result, which specifically includes:
acquiring part numbers in the assembly detail column table, and searching the same part numbers in the title column block;
when the same part numbers are not searched, labeling the part numbers in the assembly detail column table;
when the same part number is searched, the part information corresponding to the part number of the assembly detail column table is compared with the part information corresponding to the part number of the same title column block, and the title column block is marked with the part information with the difference.
Specifically, the inspection method mainly aims at a part diagram with a title bar as a block object, and the part number in the assembly diagram and the part number in the part diagram are subjected to matching inspection, so that the difference part in the assembly diagram and the part number in the part diagram is found, and the color marking is carried out or an inspection table is output. Missing or more part drawings can be checked through matching check, and drawing accuracy is improved.
By comparing the part information of the assembly drawing with the corresponding part information of the part drawing, the error information in the part drawing header column can be identified. The original manual checking flow is replaced by the automatic checking flow, so that the drawing efficiency and accuracy are further improved.
The embodiment of the invention also provides a part drawing title bar filling system, which comprises:
the reading module is used for traversing the text object in the detail column of the assembly drawing and reading the text content, the length, the height, the abscissa and the ordinate of the text object from the attribute value of the text object;
the calculation module is used for determining the header character object of the assembly chart detail column according to the text content and the ordinate of the character object; according to the abscissa and the length of the header character object, obtaining the abscissa of the centers of the character objects in each column of the detail column of the assembly drawing;
the confirming module is used for confirming the column number of the text object according to the abscissa of the text object center of each column of the detail column of the assembly drawing and the abscissa of the text object; determining the number of rows of the text object according to the ordinate of the header text object, the height of the text object and the ordinate of the text object;
the acquisition module is used for generating an assembly drawing detail column table according to the text content of the text object, the column number of the text object and the line number of the text object; acquiring filling information and a part drawing title bar to be filled in an assembly drawing detail bar table according to input;
and the filling module is used for filling the filling information into the corresponding position of the part drawing title bar.
In particular, the layers, modules, units, and/or platforms, etc. included in the embodiment system of the invention may be implemented or embodied by computer hardware, a combination of hardware and software, or by computer instructions stored in a non-transitory computer readable memory. The methods may be implemented in a computer program using standard programming techniques, including a non-transitory computer readable storage medium configured with a computer program, where the storage medium so configured causes a computer to operate in a specific and predefined manner, in accordance with the methods and drawings described in the specific embodiments. Each program may be implemented in a high level procedural or object oriented programming language to communicate with a computer system. However, the program(s) can be implemented in assembly or machine language, if desired. In any case, the language may be a compiled or interpreted language. Furthermore, the program can be run on a programmed application specific integrated circuit for this purpose. Furthermore, the data processing flows that the layers, modules, units, and/or platforms included in the system of embodiments of the present invention correspond to perform may be performed in any suitable order unless otherwise indicated herein or otherwise clearly contradicted by context. The data processing flows that the layers, modules, units, and/or platforms included in the system of embodiments of the present invention correspond to execute under the control of one or more computer systems configured with executable instructions and may be implemented as code (e.g., executable instructions, one or more computer programs, or one or more applications), by hardware, or a combination thereof, that collectively execute on one or more processors. The computer program includes a plurality of instructions executable by one or more processors.
The invention also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor implements the part map title bar filling method.
In particular, the computer readable storage medium stores processor executable instructions for performing an interactive information processing method step according to any of the above-described method embodiments when executed by a processor. For the storage medium, it may include high-speed random access memory, but may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. It can be seen that the content in the above method embodiment is applicable to the present storage medium embodiment, and the specific functions of the present storage medium embodiment are the same as those of the above method embodiment, and the achieved beneficial effects are the same as those of the above method embodiment.
The present invention is not limited to the above embodiments, but can be modified, equivalent, improved, etc. by the same means to achieve the technical effects of the present invention, which are included in the spirit and principle of the present invention. Various modifications and variations are possible in the technical solution and/or in the embodiments within the scope of the invention.
Claims (9)
1. A part map title bar filling method, comprising the steps of:
traversing the text object of the detail column of the assembly drawing, and reading the text content, length, height, abscissa and ordinate of the text object from the attribute value of the text object;
determining an header text object of an assembly drawing detail column according to the text content and the ordinate of the text object;
according to the abscissa and the length of the header character object, obtaining the abscissa of the centers of the character objects in each column of the detail column of the assembly drawing;
determining the column number of the text object according to the abscissa of the text object center of each column of the assembly drawing detail column and the abscissa of the text object;
determining the number of rows of the text object according to the ordinate of the header text object, the height of the text object and the ordinate of the text object;
generating an assembly drawing detail column table according to the text content of the text object, the column number of the text object and the line number of the text object;
acquiring filling information and a part drawing title bar to be filled in an assembly drawing detail bar table according to input;
filling the filling information to the corresponding position of the part drawing title bar;
the method for determining the header text object of the assembly drawing detail column according to the text content and the ordinate of the text object specifically comprises the following steps:
comparing the text content of the text object with a preset header text set, and marking the text object when the text object exists in the preset header text set to obtain a marked text object;
classifying the marked text objects according to the ordinate;
acquiring an ordinate average value of the class with the largest number of marked text objects as a header ordinate average value;
determining the header character object of the detail column of the assembly drawing according to the header ordinate average value and the ordinate of the character object;
when the marked text objects are classified according to the ordinate, the unclassified marked text objects are added into the existing category or are independently used as a category according to the difference between the ordinate of the unclassified marked text objects and the average value of the ordinate of the marked text objects in the existing category.
2. The method for filling the title bar of the part drawing according to claim 1, wherein the classifying the labeled text objects according to the ordinate comprises:
randomly selecting a marked text object as a category;
comparing the vertical coordinate of the unclassified marked text object with the average value of the vertical coordinate of the marked text object in the existing category;
when the difference between the ordinate of the unclassified marked text object and the average value of the ordinate of the marked text object in the existing category is smaller than or equal to a first set value, adding the unclassified marked text object into the existing category;
and when the difference between the ordinate of the unclassified marked text object and the average value of the ordinate of the marked text object in the existing category is larger than a first set value, the unclassified marked text object is independently used as a category.
3. The filling method of the parts drawing title bar according to claim 1, wherein the determining the number of columns of the text object according to the abscissa of the text object center of each column of the assembly drawing detail bar and the abscissa of the text object specifically comprises:
and taking the column number of the abscissa of the center of the text object of the detail column of the assembly drawing with the minimum difference value between the right side of the abscissa of the text object and the abscissa of the text object as the column number of the text object.
4. The filling method of the title bar of the part drawing according to claim 1, wherein the determining the number of lines of the text object according to the ordinate of the header text object, the height of the text object and the ordinate of the text object specifically comprises:
taking the ordinate of the header character object as a reference, taking the height of the character object as an increment, and obtaining the row ordinate value of each row;
and comparing the ordinate of the character object with the ordinate of the row respectively, and recording the row number of the ordinate of the row compared with the character object as the row number of the character object when the difference is smaller than a second set value.
5. The parts drawing title bar filling method according to claim 1, further comprising the steps of:
traversing the text objects of the assembly drawing detail column and the part drawing title column, and reading the font type, the font size, the font color, the alignment mode and the text content of the text objects from the attribute values of the text objects;
setting checking rules according to input, wherein the checking rules comprise font types, font sizes, font colors, centering checking and illegal characters;
and checking the font type, the font size, the font color, the alignment mode and the text content of the text object according to the checking rule, and outputting a checking result.
6. The parts drawing title bar filling method according to claim 1, further comprising the steps of:
traversing a block object of a part graph to obtain the name of the block object;
confirming a part map title bar block according to the name of the block object, and acquiring part information of the part map title bar block, wherein the part information comprises a part number;
and comparing the part information of the title bar block with the part information of the assembly drawing detail bar table, and outputting a checking result.
7. The method for filling a title bar of a part map according to claim 6, wherein comparing the part information of the title bar block with the part information of the detailed bar table of the assembly map, and outputting the inspection result, comprises:
acquiring part numbers in the assembly detail column table, and searching the same part numbers in the title column block;
when the same part numbers are not searched, labeling the part numbers in the assembly detail column table;
when the same part number is searched, the part information corresponding to the part number of the assembly detail column table is compared with the part information corresponding to the part number of the same title column block, and the title column block is marked with the part information with the difference.
8. A parts map title bar filling system, comprising:
the reading module is used for traversing the text object in the detail column of the assembly drawing and reading the text content, the length, the height, the abscissa and the ordinate of the text object from the attribute value of the text object;
the calculation module is used for determining the header character object of the assembly chart detail column according to the text content and the ordinate of the character object; according to the abscissa and the length of the header character object, obtaining the abscissa of the centers of the character objects in each column of the detail column of the assembly drawing;
the confirming module is used for confirming the column number of the text object according to the abscissa of the text object center of each column of the detail column of the assembly drawing and the abscissa of the text object; determining the number of rows of the text object according to the ordinate of the header text object, the height of the text object and the ordinate of the text object;
the acquisition module is used for generating an assembly drawing detail column table according to the text content of the text object, the column number of the text object and the line number of the text object; acquiring filling information and a part drawing title bar to be filled in an assembly drawing detail bar table according to input;
the filling module is used for filling the filling information to the corresponding position of the part drawing title bar;
the method for determining the header text object of the assembly drawing detail column according to the text content and the ordinate of the text object specifically comprises the following steps:
comparing the text content of the text object with a preset header text set, and marking the text object when the text object exists in the preset header text set to obtain a marked text object;
classifying the marked text objects according to the ordinate;
acquiring an ordinate average value of the class with the largest number of marked text objects as a header ordinate average value;
determining the header character object of the detail column of the assembly drawing according to the header ordinate average value and the ordinate of the character object;
when the marked text objects are classified according to the ordinate, the unclassified marked text objects are added into the existing category or are independently used as a category according to the difference between the ordinate of the unclassified marked text objects and the average value of the ordinate of the marked text objects in the existing category.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements a parts drawing title bar filling method according to any of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010121739.3A CN111353284B (en) | 2020-02-18 | 2020-02-18 | Part diagram title bar filling method, system and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010121739.3A CN111353284B (en) | 2020-02-18 | 2020-02-18 | Part diagram title bar filling method, system and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111353284A CN111353284A (en) | 2020-06-30 |
CN111353284B true CN111353284B (en) | 2023-08-04 |
Family
ID=71192472
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010121739.3A Active CN111353284B (en) | 2020-02-18 | 2020-02-18 | Part diagram title bar filling method, system and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111353284B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113190888B (en) * | 2021-04-20 | 2022-10-28 | 东风柳州汽车有限公司 | Process documentation method, device, equipment and storage medium |
CN114398857A (en) * | 2021-11-19 | 2022-04-26 | 浙江省送变电工程有限公司 | Automatic batch filling method for attribute information of picture frame title bar of CAD drawing |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0528206A (en) * | 1991-07-18 | 1993-02-05 | Matsushita Electric Ind Co Ltd | Parts data processing method |
CN102222148A (en) * | 2011-06-30 | 2011-10-19 | 北京数码大方科技有限公司 | Method and device for automatically generating detailed statement of three-dimensional assembly drawing |
CN105975562A (en) * | 2016-05-03 | 2016-09-28 | 水木智博(北京)网络信息科技有限公司 | Method and apparatus for automatically generating budget table of engineering drawing |
-
2020
- 2020-02-18 CN CN202010121739.3A patent/CN111353284B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0528206A (en) * | 1991-07-18 | 1993-02-05 | Matsushita Electric Ind Co Ltd | Parts data processing method |
CN102222148A (en) * | 2011-06-30 | 2011-10-19 | 北京数码大方科技有限公司 | Method and device for automatically generating detailed statement of three-dimensional assembly drawing |
CN105975562A (en) * | 2016-05-03 | 2016-09-28 | 水木智博(北京)网络信息科技有限公司 | Method and apparatus for automatically generating budget table of engineering drawing |
Also Published As
Publication number | Publication date |
---|---|
CN111353284A (en) | 2020-06-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111414165B (en) | Interface code generation method and equipment | |
CN111353284B (en) | Part diagram title bar filling method, system and storage medium | |
CN110309073B (en) | Method, system and terminal for automatically detecting user interface errors of mobile application program | |
US7788612B2 (en) | System, method, and computer program product for matching cell layout of an integrated circuit design | |
CN111611766A (en) | Method, apparatus and storage medium for determining circuit layout constraints | |
CN112597737B (en) | Method, system and readable storage medium for creating PCB test point identification | |
US11256760B1 (en) | Region adjacent subgraph isomorphism for layout clustering in document images | |
CN110059121B (en) | Method, system, device and storage medium for rapidly exporting bill of materials | |
CN114357596B (en) | BIM component resource rapid design method and system | |
CN112037224B (en) | Method for generating axis according to marking line, electronic equipment and storage medium | |
US20150301924A1 (en) | Injection of data into a software application | |
CN117558019A (en) | Method for automatically extracting symbol map parameters from PDF format component manual | |
CN104809053A (en) | Control style testing method and device | |
CN117574851A (en) | Method, device and storage medium for reconstructing circuit schematic diagram in EDA tool | |
CN113781011B (en) | Auditing method and system for power distribution network engineering cost | |
CN114283438A (en) | Nuclear power plant drawing information identification and extraction method and system | |
CN116681792A (en) | Subgraph generation method, device and equipment of vector drawing and readable storage medium | |
JP2011204069A (en) | Testing method, and automatic test specification and test data generation apparatus | |
CN113407545B (en) | Drawing data storage method and device and electronic equipment | |
CN118132143B (en) | Training method, mapping method and equipment for low-code component recognition model | |
CN114357131B (en) | Process card rapid compiling method, equipment, device and medium | |
CN115017872B (en) | Method and device for intelligently labeling table in PDF file and electronic equipment | |
CN105718476A (en) | Engineering question automatic generation method and engineering question automatic generation device | |
CN116776846A (en) | Method and device for extracting form in target document and computer equipment | |
CN113190514B (en) | Method for inputting data into electronic document according to priority order |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |