Engineering drawing generation method and device, electronic equipment and storage medium

By importing drawing templates in engineering drawing generation, applying view layout rules and labeling position rules, and optimizing labeling position with machine learning model, the problem of low generation efficiency of engineering drawings in the existing technology is solved, and the view layout and labeling position are automatically adjusted, improving the generation efficiency.

CN119672168APending Publication Date: 2025-03-21SIEMENS STANDARD MOTORS LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411722716.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2025-03-21

AI Technical Summary

Technical Problem

In the prior art, the generation efficiency of engineering drawings is low, mainly because the view layout and labeling position need to be manually adjusted, and drawing personnel are required to understand the key points of the product, manufacturing and design, which makes it take longer.

Method used

By importing drawing templates, the part view and label position are automatically determined according to the view layout rules and label position rules, and the machine learning model is used to optimize the label position to automatically adjust the view layout and label position.

Benefits of technology

It improves the efficiency of engineering drawing generation, shortens the time to determine the view layout and labeling position, reduces the requirements for drawing personnel, and improves the efficiency and consistency of the drawing process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119672168A_ABST
    Figure CN119672168A_ABST
Patent Text Reader

Abstract

The invention provides an engineering drawing generation method and device, electronic equipment and a storage medium, and the engineering drawing generation method comprises the steps: importing a drawing template according to the type of a part; placing at least one view of the part in the drawing template according to a view layout rule; the initial position of a mark is determined according to a mark position rule, the mark is created in the drawing template according to the initial position, and the mark is used for marking the characteristics of the part; determining an annotation to be optimized from the annotations; inputting the feature information of the marked features of the to-be-optimized marks into a machine learning model to obtain an optimized position output by the machine learning model; and updating the position of the to-be-optimized label on the drawing template according to the optimized position. According to the scheme, the engineering drawing generation efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method, device, electronic equipment and storage medium for generating engineering drawings. Background Art

[0002] The efficiency of engineering drawing generation affects product development and manufacturing efficiency. View layout and annotation position determination are key tasks in the early stages of engineering drawing generation. When generating engineering drawings, it is necessary to set a fixed scale and reference point to ensure that the size and position of the view are appropriate. The size and position of the view will affect the results of the dimension standard and the layout of other graphic elements, and is one of the determining factors of the overall drawing quality. Annotation type, dimension chain, and feature position, etc., will affect the annotation position.

[0003] Currently, when generating engineering drawings, view layout and annotation positions are adjusted manually.

[0004] However, manually adjusting the view layout and annotation positions requires draftsmen to understand the products, manufacturing and design points related to the drawings in order to make reasonable adjustments to the view layout and annotation positions. It takes a long time for draftsmen to understand the products, manufacturing and design requirements related to the drawings, resulting in low efficiency in the generation of engineering drawings. Summary of the invention

[0005] In view of this, the engineering drawing generation method, device, electronic device and storage medium provided by the present invention can improve the generation efficiency of engineering drawings.

[0006] According to a first aspect of an embodiment of the present invention, there is provided a method for generating an engineering drawing, comprising: importing a drawing template according to a type of part; placing at least one view of the part in the drawing template according to a view layout rule; determining an initial position of a annotation according to an annotation position rule, and creating the annotation in the drawing template according to the initial position, wherein the annotation is used to mark a feature of the part; determining an annotation to be optimized from the annotation; inputting feature information of the feature marked by the annotation to be optimized into a machine learning model to obtain an optimized position output by the machine learning model; and updating the position of the annotation to be optimized on the drawing template according to the optimized position.

[0007] In a first possible implementation, in combination with the first aspect above, placing at least one view of the part in the drawing template according to a view layout rule includes: determining position information of a main view and auxiliary views of the part according to the view layout rule; and placing the main view and auxiliary views of the part in the drawing template according to the position information of the main view and auxiliary views of the part.

[0008] In a second possible implementation, in combination with the first possible implementation, the position information of the main view and the auxiliary view of the part is determined according to the view layout rule, including: calculating the distance between the main view of the part and the left and right edges of the drawing template according to the width of the drawing template, wherein, when the number of main views of the part is greater than 1, the main views of the part are arranged in sequence along the height direction of the drawing template, and the widths of the main views are equal; calculating the distance between the main view of the part located at the top of the drawing template and the upper edge of the drawing template according to the height of the drawing template; when the number of main views of the part is greater than 1, calculating the distance between adjacent main views according to the number of dimension chains in the upper main view of adjacent main views; when the number of auxiliary views of the part is greater than 1, calculating the distance between adjacent auxiliary views according to the width and number of the auxiliary views of the part and the position information of the title bar in the drawing template, wherein the auxiliary views of the part are arranged in sequence along the width direction of the drawing template.

[0009] In a third possible implementation, in combination with the first aspect, determining the initial position of the annotation according to the annotation position rule includes: determining the position influencing factors of the annotation according to the type of the annotation, the position influencing factors including at least one of the position of the feature marked by the annotation, the dimension chain, the annotation correlation and the relative position with the view; determining the initial position of the annotation according to the position influencing factors and the annotation position rule.

[0010] In a fourth possible implementation manner, in combination with the first aspect, the feature information includes at least one of feature position information, structural information of the part, and type information of the annotation to be optimized.

[0011] In a fifth possible implementation, in combination with the first aspect above, the method further includes: after updating the position of the mark to be optimized on the drawing template, receiving a position adjustment instruction for the mark to be optimized; and adjusting the position of the mark to be optimized on the drawing template according to the position adjustment instruction.

[0012] In a sixth possible implementation manner, in combination with the above-mentioned fifth possible implementation manner, the method further includes: obtaining position information of the annotation to be optimized, the position information being used to indicate the position of the annotation to be optimized on the drawing template after the position of the annotation to be optimized on the drawing template is adjusted according to the position adjustment instruction; and training the machine learning model through the position information and the feature information.

[0013] In a seventh possible implementation, in combination with the first aspect or any possible implementation of the first aspect, the machine learning model is trained in the following manner: obtaining multiple sample drawings, the sample drawings including at least one view and at least one annotation of the corresponding sample parts; extracting the annotations of the sample parts from the sample drawings; grouping the annotations extracted from the same sample drawings to obtain multiple annotation groups, and the positions of the annotations in each annotation group including multiple annotations are related; determining a representative annotation from the annotations included in each annotation group; determining a bounding box corresponding to each representative annotation on the sample drawings, and the representative annotation is located within the corresponding bounding box; determining the coordinates of a corner point of the bounding box corresponding to the representative annotation, and the feature information of the feature marked by the representative annotation as training samples; training the model to be trained using a training data set including multiple training samples to obtain the machine learning model.

[0014] According to a second aspect of an embodiment of the present invention, there is provided an engineering drawing generating device, comprising: an importing unit, for importing a drawing template according to a part type; an inserting unit, for placing at least one view of the part in the drawing template according to a view layout rule; a creating unit, for determining an initial position of a annotation according to an annotation position rule, and creating the annotation in the drawing template according to the initial position, wherein the annotation is used to mark a feature of the part; a selecting unit, for determining an annotation to be optimized from the annotation; an optimizing unit, for inputting feature information of the feature marked by the annotation to be optimized into a machine learning model to obtain an optimized position output by the machine learning model; and an updating unit, for updating the position of the annotation to be optimized on the drawing template according to the optimized position.

[0015] In the third aspect, an embodiment of the present invention further provides an electronic device, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other through the communication bus; the memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform operations corresponding to the engineering drawing generation method provided in the first aspect or any possible implementation of the first aspect.

[0016] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which computer instructions are stored. When the computer instructions are executed by a processor, the processor executes an engineering drawing generation method provided in the first aspect or any possible implementation of the first aspect.

[0017] In a fifth aspect, an embodiment of the present invention further provides a computer program product, which is tangibly stored on a computer-readable medium and includes computer-executable instructions, which, when executed, enable at least one processor to execute an engineering drawing generation method provided in the first aspect or any possible implementation of the first aspect.

[0018] It can be seen from the above technical solution that after importing the drawing template according to the type of part, the view of the part can be placed in the drawing template according to the view layout rules, and the annotation can be created in the drawing template according to the annotation position rules. For the annotations to be optimized in the drawing template that need to be optimized, the feature information of the features marked by the annotations to be optimized can be input into the machine learning model, and the position of the annotations to be optimized is optimized by the machine learning model to obtain the optimized position, and then the position of the annotations to be optimized on the drawing template is updated according to the optimized position. The position of the view in the drawing template is automatically determined according to the view layout rules, and the position of the annotation in the drawing template is automatically determined according to the annotation position rules and the machine learning model to ensure that the position of the annotation in the drawing template is appropriate, thereby realizing the automatic determination of the view layout and annotation position, shortening the time for determining the view layout and annotation position in the process of generating engineering drawings, and thus improving the efficiency of generating engineering drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 is a flow chart of a method for generating an engineering drawing according to an embodiment of the present invention;

[0020] Figure 2 is a schematic diagram of an engineering drawing of a rotor part of an embodiment of the present invention;

[0021] Figure 3 is a schematic diagram of an engineering drawing of a rotor part of another embodiment of the present invention;

[0022] Figure 4 is a flow chart of a machine learning model training method according to an embodiment of the present invention;

[0023] Figure 5 is a schematic diagram of an engineering drawing generating device according to an embodiment of the present invention;

[0024] Figure 6 is a schematic diagram of an electronic device according to an embodiment of the present invention.

[0025] List of reference numerals:

[0026] 100: Engineering drawing generation method; 101-106: Method steps; 21: Border; 22: Title bar; 23: Bill of materials; 24: Supplementary information; 251: Axis view; 252: Rotor view; 26: Auxiliary view; 400: Machine learning model training method; 401-407: Method steps; 500: Engineering drawing generation device; 501: Import unit; 502: Insert unit; 503: Create unit; 504: Select unit; 505: Optimize unit; 506: Update unit; 600: Electronic device; 602: Processor; 604: Communication interface; 606: Memory; 608: Communication bus; 610: Program. DETAILED DESCRIPTION

[0027] As mentioned above, when generating engineering drawings, engineers need to analyze the geometric features of three-dimensional entities, select a better viewing angle, and perform two-dimensional projection within the frame. At the same time, they also need to set a fixed scale and reference point to ensure that the size and position of the view are appropriate, which is convenient for the subsequent layout of dimension marks and other elements. At present, in the process of generating engineering drawings, the view layout and annotation position are adjusted manually. However, manual adjustment of the view layout and annotation position requires the draftsman to understand the product, manufacturing and design points related to the drawings. It takes a lot of time to understand this information, which leads to a long time to adjust the view layout and annotation position, which in turn leads to low efficiency in generating engineering drawings.

[0028] In an embodiment of the present invention, the view of a part is placed at an appropriate position in a drawing template according to view layout rules, annotations for marking part features are created in the drawing template according to annotation position rules, and the annotation positions can be optimized through a machine learning model to make the positions of the annotations in the drawing template more reasonable, thereby realizing automatic adjustment of view layout and annotation positions, saving the time spent on adjusting view layout and annotation positions during the generation of engineering drawings, thereby improving the generation efficiency of engineering drawings.

[0029] The following describes in detail the engineering drawing generation method, device and electronic device provided by the embodiments of the present invention in conjunction with the accompanying drawings.

[0030] Figure 1 FIG. 1 is a flow chart of a method 100 for generating an engineering drawing according to an embodiment of the present invention. Figure 1 As shown, the engineering drawing generation method 100 includes the following steps:

[0031] Step 101: Import the drawing template according to the type of part.

[0032] Multiple drawing templates are created in advance. Different drawing templates are suitable for drawing engineering drawings of different types of parts. The corresponding drawing template can be obtained according to the type of part.

[0033] In one example, a plurality of drawing templates are stored in a drawing template database. Based on the type information of the part of the engineering drawing to be drawn, a drawing template suitable for drawing the engineering drawing of the part can be found from the drawing template database. For example, if the part of the engineering drawing to be drawn is an electronic rotor, a drawing template suitable for drawing the engineering drawing of the rotor can be found from the drawing template database with the rotor as the part type.

[0034] After finding a suitable drawing template, the found drawing template can be imported to generate an engineering drawing of the part based on the drawing template. In one example, the drawing template can be imported into computer-aided design (CAD) software to generate an engineering drawing based on the drawing template through the CAD software.

[0035] The drawing template includes a border, a title bar, a bill of materials (BOM), and other instructions, etc. The border, title bar, bill of materials, and other instructions are located in fixed positions on the drawing template.

[0036] Step 102: Place at least one view of the part on the drawing template according to the view layout rule.

[0037] The view layout rules define the layout rules of part views on the drawing template. According to the view layout rules, the positions of each part view on the drawing template can be determined, and then the views of the part can be automatically placed in the appropriate positions on the drawing template.

[0038] The view of a part may include a main view and / or an auxiliary view, and both the main view and the auxiliary view may be one or more. The view type and the number of views of a part on an engineering drawing may be determined in any suitable manner, such as by determining the view type and the number of views of the part according to the type of the part. The embodiment of the present invention does not limit the method for determining the view type and the number of views.

[0039] Step 103: Determine the initial position of the annotation according to the annotation position rule, and create the annotation on the drawing template according to the initial position.

[0040] The annotation position rule defines the rules for the position of the annotation on the drawing template. According to the annotation position rule, the initial position of the annotation on the drawing template can be determined, and then the annotation can be automatically created on the drawing template according to the initial position of the annotation.

[0041] Annotations are used to mark the features of parts on a view. Annotations can mark the dimensions and annotations of parts. Dimensions can include horizontal dimensions, diameter dimensions, chamfer dimensions, fillet dimensions, thread dimensions, etc. Annotations can include part number labels, keyway labels, shape and position tolerances, datums, roughness, etc. For different types of parts, the type and quantity of annotations can be different. For example, complex structure parts have more annotations, while simple structure parts have fewer annotations.

[0042] The annotations on the engineering drawings can be generated in any suitable manner. For example, the features of the parts can be identified from the three-dimensional model of the parts, and then annotations for marking the features can be generated. The user can also specify the features to be marked, and then annotations for marking the features specified by the user can be generated. The embodiments of the present invention do not limit the method for generating annotations.

[0043] Step 104: Determine the annotations to be optimized from the annotations.

[0044] After the annotations are created on the drawing template according to the initial positions of the annotations, the drawing template including the views and annotations can be displayed to allow the user to confirm whether the positions of the annotations on the drawing template are appropriate. If the user confirms that the positions of the annotations on the drawing template are appropriate, the drawing template including the views and annotations is determined as the engineering drawing of the part. If the user confirms that the positions of one or more annotations on the drawing template are inappropriate, the user can select the annotations with inappropriate positions, and then, according to the user's selection instructions for the annotations, each annotation with inappropriate positions is determined as the annotation to be optimized.

[0045] Step 105: input the feature information of the features marked by the annotations to be optimized into the machine learning model to obtain the optimized position output by the machine learning model.

[0046] The machine learning model can output the position of the annotation used to mark the feature on the drawing template based on the feature information of the feature to be marked. For the convenience of explanation, the annotation position determined by the annotation position rule is defined as the initial position, and the annotation position determined by the machine learning model is defined as the optimized position.

[0047] Since there are many factors that affect the annotation position, the initial position of the annotation determined by the annotation position rules may not be appropriate. Optimizing the annotation position through a machine learning model can make the optimized position more appropriate.

[0048] Step 106: Update the position of the mark to be optimized on the drawing template according to the optimized position.

[0049] After obtaining the optimized position of the annotation through the machine learning model, the position of the annotation on the drawing template can be updated according to the optimized position of the annotation so that the annotation is located at the optimized position.

[0050] In one example, according to the optimized position of each annotation to be optimized, after the position of the annotation to be optimized is updated on the drawing template, the drawing template including the view and the annotation is determined as the engineering drawing of the part.

[0051] In another example, after the position of each annotation to be optimized is updated according to the corresponding optimized position, the drawing template including the view and annotation can be displayed to allow the user to confirm again whether the position of the annotation on the drawing template is appropriate. If the user confirms that the position of each annotation on the drawing template is appropriate, the drawing template including the view and annotation is determined as the engineering drawing of the part. If the user confirms that the position of one or more annotations to be optimized on the drawing template is still not appropriate, the user can manually adjust the position of the annotation to be optimized that is not appropriate, and then the drawing template including the view and annotation after the user adjusts the annotation position is determined as the engineering drawing of the part.

[0052] In an embodiment of the present invention, after importing the drawing template according to the type of part, the view of the part can be placed in the drawing template according to the view layout rules, and the annotation can be created in the drawing template according to the annotation position rules. For the annotation to be optimized in the drawing template that needs to be optimized in position, the feature information of the feature marked by the annotation to be optimized can be input into the machine learning model, and the position of the annotation to be optimized is optimized by the machine learning model to obtain the optimized position, and then the position of the annotation to be optimized on the drawing template is updated according to the optimized position. The position of the view in the drawing template is automatically determined according to the view layout rules, and the position of the annotation in the drawing template is automatically determined according to the annotation position rules and the machine learning model, ensuring that the position of the annotation in the drawing template is appropriate, thereby realizing the automatic determination of the view layout and the annotation position, shortening the time for determining the view layout and the annotation position in the process of generating engineering drawings, and thus improving the efficiency of generating engineering drawings.

[0053] In a possible implementation, when the views of a part include a main view and an auxiliary view, the position information of the main view and the auxiliary view of the part can be determined according to the view layout rules, and then the main view and the auxiliary view of the part can be placed in the drawing template according to the position information of the main view and the auxiliary view of the part.

[0054] The view layout rules define the correspondence between the size of the drawing template, the type of part view, the number of part views and other information and the view position. After determining the drawing template and the type and number of part views, the position information of each part view in the drawing template can be determined according to the view layout rules, and then the part views can be arranged at the corresponding positions in the drawing template according to the corresponding position information.

[0055] View layout rules can be customized by users and stored in the view layout rule database. Different types of parts can correspond to different view layout rules. When generating engineering drawings of parts, you can search for matching view layout rules from the view layout database according to the type of part, and then arrange the views of the part on the drawing template based on the found view layout rules.

[0056] In an embodiment of the present invention, the view layout rule defines the correspondence between the size of the drawing template, the part view type, the number of part views and other information and the view position. After determining the view type and number of the drawing template and the part, the position information of the part view on the drawing template can be automatically determined according to the view layout rule, and then the view can be arranged on the drawing template according to the view position information, thereby realizing the automation of view layout, reducing the requirements for draftsmen in drawing engineering drawings, and reducing the labor intensity of draftsmen.

[0057] In a possible implementation, the positions of the main view and the auxiliary views may be determined according to information such as the size of the drawing template, the number of main views, and the number of auxiliary views.

[0058] According to the width of the drawing template, the distance between the main view of the part and the left and right edges of the drawing template can be calculated. When there are multiple main views of a part, the main views of the part are arranged in sequence along the height direction of the drawing template, and the widths of the main views of the part are equal. Figure 2 An engineering drawing showing a rotor component of one embodiment of the present invention is shown, Figure 2 As shown, the main view of the rotor part includes an axis view 251 and a rotor view 252. The width of the frame 21 of the drawing template is W sheet , the height of the border 21 is H sheet The axis view 251 and the rotor view 252 are arranged in sequence along the height direction of the drawing template, and the widths of the axis view 251 and the rotor view 252 are equal. The distance between the axis view 251 and the rotor view 252 and the left and right edges of the frame 21 is a. In one example,

[0059] Based on the height of the drawing template, the distance between the main view located at the top of the drawing template and the upper edge of the drawing template can be calculated. Figure 2 As shown, the axial view 251 and the rotor view 252 are arranged in sequence along the height direction of the drawing template, and the axial view 251 is located at the top of the drawing template. The distance b between the axial view 251 and the upper edge of the drawing template can be calculated based on the height H of the frame 21. sheet In one example, b = H sheet ×5%.

[0060] When the number of main views of a part is greater than 1, the distance between the adjacent main views can be calculated based on the number of dimension chains in the upper main view. Dimension chain is a closed dimension combination that is interconnected and connected in a certain order during part processing or machine assembly. It consists of a series of interrelated dimensions that jointly affect the final accuracy and performance of the product. Figure 2 As shown, the shaft view 251 and the rotor view 252 are adjacent main views, and the shaft view 251 is located above the rotor view 252. The distance c between the shaft view 251 and the rotor view 252 can be determined according to the number of dimension chains in the shaft view 251. In one example, c = 5 × N chains , N chains is the number of dimension chains in axial view 251.

[0061] When the number of auxiliary views of a part is greater than 1, the distance between adjacent auxiliary views can be calculated based on the width and number of auxiliary views of the part and the position information of the title bar in the drawing template. When there are multiple auxiliary views of a part, the auxiliary views are arranged in sequence along the width direction of the drawing template.

[0062] After the drawing template is determined, the position information of the title block in the drawing template can be determined. Since the auxiliary view is arranged on the right side of the title block, the position information of the title block can be the x coordinate of the right border of the title block.

[0063] like Figure 2 As shown, there are n auxiliary views 26 of the rotor part. The x coordinate of the right edge of the title bar 22 on the drawing template is X title , the width of auxiliary view 26 is W view , then the distance d between adjacent auxiliary views 26 can be calculated based on X title , W view and n are determined. In one example,

[0064] like Figure 2 As shown, the drawing template includes a title bar 22, a bill of materials (BOM) 23 and additional descriptions 24. The title bar 22, BOM 23 and additional descriptions 24 are usually located at fixed positions on the drawing template, and the main view and auxiliary view will be arranged at other positions on the drawing template. When drawing engineering drawings, the paper size of the drawing template is fixed, and the main view is horizontally centered in the drawing.

[0065] In an embodiment of the present invention, the distance between the main view and the left and right edges of the drawing template can be determined according to the width of the drawing template to achieve the horizontal positioning of the main view, the distance between the main view located at the top and the upper edge of the drawing template can be determined according to the height of the drawing template, and the distance between adjacent main views can be determined according to the number of dimension chains in the main view, thereby achieving the vertical positioning of the main view. The distance between adjacent auxiliary views can be determined according to the number, width and title bar position information of the auxiliary views. The view layout rules define the correspondence between the positions of the main view and auxiliary views and the drawing template size, the number of auxiliary views and other information. Therefore, the positions of the main view and auxiliary views in the drawing template can be determined according to the view layout rules, thereby realizing the automation of view layout, without the need to manually adjust the positions of each view of the part on the drawing template, improving the efficiency of view layout, and standardizing view layout.

[0066] In a possible implementation, when determining the initial position of the annotation according to the annotation position rule, the position influencing factor of the annotation may be determined according to the type of the annotation, and then the initial position of the annotation may be determined according to the position influencing factor of the annotation and the annotation position rule. The position influencing factor of the annotation includes at least one of the position of the feature marked by the annotation, the dimension chain, the annotation correlation, and the relative position of the view, and the position influencing factors of different types of annotations may be different.

[0067] The annotation position rule defines the position influencing factors of the annotation and defines the relationship between the position of the annotation and the position influencing factors. Different types of annotations may correspond to different position influencing factors. Taking the rotor part as an example, when drawing the engineering drawing of the rotor part, there are 2 types of annotations (dimensions and labels), each type includes 5 sub-types, and the position influencing factors corresponding to each sub-type are shown in Table 1 below.

[0068] Table 1

[0069]

[0070]

[0071] In addition to defining the position influencing factors of the annotation, the annotation position rule also defines the relationship between the annotation position and the corresponding position influencing factors, that is, the position influencing factors provide a reference position for the annotation. For example, taking the engineering drawing of the rotor as an example, Figure 3In the engineering drawing shown, the annotation location rules define that horizontal dimensions are marked below the feature, and if there is a dimension chain, they are marked from top to bottom in the space between the shaft view 251 and the rotor view 252. Diameter dimensions are marked in the middle of cylindrical features. Chamfers and fillets are marked slightly higher or lower than the feature. Thread dimensions are marked to the left or right of the feature. Part numbers, keyway labels, and tolerance labels are marked with label leaders, and the coordinates are calculated based on the relative position to the view. Datum and roughness labels are marked in the middle of the feature.

[0072] In an embodiment of the present invention, the annotation position rule defines the position influencing factors of the annotation and the relative position of the annotation and the position influencing factors. After the main view and auxiliary views of the part are arranged on the drawing template, the position of the position influencing factors of the annotation on the drawing template is determined, so that the position of the annotation on the drawing template can be determined according to the annotation position rule, and then the position is determined as the initial position of the annotation, thereby realizing automatic determination of the initial position of the annotation, and improving the efficiency of determining the annotation position in the process of drawing engineering drawings.

[0073] In a possible implementation, if the user is not satisfied with the initial position of the annotation, the annotation can be determined as the annotation to be optimized, and then the feature information of the feature marked by the annotation to be optimized is input into the machine learning model, and the position of the annotation to be optimized is optimized by the machine learning model to obtain the optimized position of the annotation. The feature information of the feature marked by the annotation to be optimized may include at least one of feature position information, structural information of the part, and type information of the annotation to be optimized.

[0074] The feature position information can indicate the position of the feature marked by the to-be-optimized annotation in the part. For example, when drawing an engineering drawing of a rotor, the feature position information can indicate which section of the shaft the corresponding feature is located at.

[0075] The structural information of a part may indicate the overall structure of the part. For example, when drawing an engineering drawing of a rotor, the structural information may indicate the number of shaft segments included in the shaft.

[0076] The type information of the annotation to be optimized may indicate the type or subtype of the annotation to be optimized. For example, when the type information of the annotation to be optimized indicates the type of the annotation to be optimized, the type information indicates that the annotation to be optimized is marked with a dimension or a label, and when the type information of the annotation to be optimized indicates the subtype of the annotation to be optimized, the type information indicates that the annotation to be optimized is marked with a horizontal dimension, a diameter dimension, a chamfer dimension, a fillet dimension, a thread dimension, a part number label, a keyway label, a form and position tolerance, a reference, or a roughness.

[0077] In one example, the input to a machine learning model is<i,n,t> , the output is the optimized position. i is the position information of the feature marked by the annotation to be optimized or the feature vector generated based on the position information, n is the structural information of the part or the feature vector generated based on the structural information, and t is the type information of the annotation to be optimized or the feature vector generated based on the type information. The optimized position output by the machine learning model can be coordinate information including abscissa and ordinate. For example, when drawing an engineering drawing of a rotor part, i is the number of the shaft segment where the feature to be marked is located, n is the total number of shaft segments included in the shaft, and t is the type of annotation.

[0078] In an embodiment of the present invention, the feature information of the feature marked by the annotation to be optimized may include feature position information, structural information of the part, and type information of the annotation to be optimized, etc. The position of the annotation on the drawing template is affected by the various information included in the feature information. Therefore, the feature information of the feature marked by the feature to be optimized is used as the input of the machine learning model. The trained machine learning model can output a suitable annotation position (optimized position) based on the input feature information, thereby ensuring the rationality of the optimized position and thus ensuring the quality of the generated engineering drawings.

[0079] It should be noted that for the annotations to be optimized, the optimized position determined by the machine learning model is more suitable than the initial position determined by the annotation position rules, but the time-consuming and costly to determine the annotation position by the machine learning model is high, so the initial positions of all annotations are first determined by the annotation position rules, and for some annotations whose initial positions are not suitable, the machine learning object model is used to optimize the annotation positions. While ensuring that all annotation positions are suitable, only some annotations need to be optimized through the machine learning model, which shortens the time for determining the annotation position and reduces the cost of determining the annotation position.

[0080] In a possible implementation, after the position of the annotation to be optimized on the drawing template is updated according to the optimized position, the drawing template including the view and the annotation can be displayed so that the user can confirm again whether the position of the annotation on the drawing template is appropriate. If the user confirms that the position of each annotation on the drawing template is appropriate, the current drawing template including the view and the annotation is determined as an engineering drawing. If the user confirms that the position of one or more annotations on the drawing template is not appropriate, the user can manually adjust the position of the annotation that is not appropriately located, and then the drawing template including the view and the annotation after the user manually adjusts the position of the annotation is determined as an engineering drawing. When the user manually adjusts the annotation position, a position adjustment instruction can be generated based on the user's adjustment operation on the annotation, and then the position of the annotation to be optimized on the drawing template is adjusted according to the position adjustment instruction.

[0081] It should be understood that after the initial position of the annotation is determined based on the annotation position rule, the user confirms for the first time whether the position of the annotation is appropriate. For the annotation to be optimized that the user confirms is inappropriate, after the position is optimized through the machine learning model, the user determines for the second time whether the position of the annotation is appropriate. Therefore, the annotation that the user confirms is inappropriate for the second time is the annotation that the user still confirms is inappropriate after the position is optimized through the machine learning model.

[0082] In an embodiment of the present invention, after the position of the annotation to be optimized is optimized by the machine learning model, if the user still confirms that the position of some or all of the annotations to be optimized is inappropriate, the user can manually adjust the position of the inappropriate annotations to be optimized until all the inappropriate annotations to be optimized are adjusted to appropriate positions. After determining the annotation position based on the annotation position rule and the machine learning model, the user can also manually adjust the position of the annotation to ensure that each annotation in the drawn engineering drawing is in an appropriate position, thereby ensuring the quality of the drawn engineering drawing.

[0083] In one possible implementation, after adjusting the position of the annotation to be optimized on the drawing template according to the position adjustment instruction, position information indicating the position of the annotation to be optimized on the drawing template is obtained, and then the machine learning model can be trained through the position information and the feature information of the feature marked by the annotation to be optimized.

[0084] The machine learning model is obtained through training and can predict the position of the corresponding annotation based on feature information. If the user manually adjusts the position of a certain annotation, it means that the position predicted by the machine learning model for the annotation is not optimal. Then, the machine learning model can be further trained based on the manually adjusted position of the annotation to improve the accuracy of the machine learning model's prediction of the annotation position.

[0085] In one example, the feature information of the feature marked by annotation A is<i,n,t> , i is the position information of the feature marked by annotation A, n is the structural information of the part, and t is the type information of annotation A. For example, when drawing an engineering drawing of a rotor part, i is the number of the shaft segment where the feature to be marked is located, n is the total number of shaft segments included in the shaft, and t is the type of annotation. After the user manually adjusts the position of annotation A, the coordinates of annotation A on the drawing template are (x A ,y A ), then construct the training sample [<i,n,t> ,(x A ,y A )],in<i,n,t> is the input feature of the training sample, (x A ,y A ) is the label of the sample.

[0086] When the user manually adjusts the positions of multiple annotations, a corresponding training sample can be obtained for each annotation whose position is passively adjusted, and the machine learning model can be further optimized and trained through the obtained training samples.

[0087] In an embodiment of the present invention, after the user manually adjusts the position of the annotation, a training sample can be constructed based on the feature information of the feature marked by the annotation and the position information of the annotation after manual adjustment, and the machine learning model can be further optimized and trained through the constructed training samples to improve the accuracy of the machine learning model in predicting the annotation position, thereby gradually reducing the number of times the user manually adjusts the annotation position and improving the efficiency of engineering drawing generation.

[0088] In one possible implementation, the machine learning model for predicting the annotation position can be trained based on feature information extracted from sample drawings. Figure 4 A flow chart of a machine learning model training method 400 according to an embodiment of the present invention is shown. Figure 4 As shown, the machine learning model training method 400 includes the following steps:

[0089] Step 401: Obtain multiple sample drawings.

[0090] The sample drawing includes at least one view and at least one annotation of the corresponding sample part. The obtained multiple sample drawings may include engineering drawings of multiple types of parts.

[0091] In one example, the drawing number can be searched according to the drawing name rule, and the sample drawings used for model training can be imported from the Product Lifecycle Management (PLM) into the CAD software.

[0092] Step 402: extract the annotations of the sample parts from the sample drawings.

[0093] For each sample drawing obtained, annotations of the sample parts can be extracted from the sample drawing.

[0094] In one example, after the sample drawing is imported into the CAD software, the objects in the drawing file may be traversed in the CAD software to identify the views and annotations included in the sample drawing.

[0095] Step 403: group the annotations extracted from the same sample drawing to obtain multiple annotation groups.

[0096] After extracting the annotations included in a sample drawing, the extracted annotations can be grouped so that the positions of the annotations in each annotation group including multiple annotations are related, and the annotations that have positional correlation with other annotations are treated as a separate annotation group, that is, each annotation group includes one or more annotations, and the annotations in the annotation group including multiple annotations have positional correlation.

[0097] In one example, multiple annotations included in the same dimension chain will be divided into the same annotation group, and annotations with strong binding relationships will be divided into the same annotation group.

[0098] Step 404: Determine a representative annotation from the annotations included in each annotation group.

[0099] Since the annotations in the same annotation group are positionally correlated, once the position of one annotation is determined, the positions of the other annotations are also determined. In order to improve the efficiency of model training, it is necessary to deduplicate the training data, so as to determine a representative annotation from the annotation groups included in each annotation group, and then train the machine learning model based on the representative annotation for easy storage and calculation.

[0100] If the annotation group includes only one annotation, the annotation is determined as the representative annotation. If the annotation group includes multiple annotations, one annotation is selected from them as the representative annotation, such as by a random algorithm.

[0101] Step 405: Determine a bounding box corresponding to each representative annotation on the sample drawing.

[0102] After determining the representative annotation, a bounding box is created for each representative annotation so that the representative annotation is located in the corresponding bounding box, and the coordinates of a corner point (such as the lower left vertex) of the bounding box and the type of the representative annotation are extracted to represent the representative annotation.

[0103] Step 406: Determine the coordinates of a corner point of the bounding box corresponding to the representative annotation and the feature information of the feature marked by the representative annotation as a training sample.

[0104] The feature information representing the feature marked by the annotation may include at least one of feature position information, part structure information, and type information representing the annotation. The coordinates of a corner point of a bounding box corresponding to the annotation are used as a label of the sample, and the feature information representing the feature marked by the annotation is used as an input feature of the sample to form a training sample.

[0105] In one example, the feature information representing the feature marked by the annotation is<i,n,t> , i represents the position information of the feature marked by the annotation, n represents the structural information of the part, and t represents the type information of the annotation. The coordinates of the lower left vertex of the bounding box corresponding to the annotation are (x, y), then the training sample [<i,n,t> ,(x,y)], where<i,n,t> is the input feature of the training sample, and (x, y) is the label of the sample.

[0106] Step 407: Train the model to be trained using a training data set including multiple training samples to obtain a machine learning model.

[0107] After obtaining corresponding training samples for multiple representative annotations, the obtained training samples are organized into a training data set, and then the training model to be trained is trained by the training data set to obtain a machine learning model. The model input of the machine learning model is the feature information of the feature to be labeled, and the model output is the position information of the annotation used to label the feature.

[0108] In one example, when a machine learning model is obtained by training a training model with a training data set, a classification and regression tree (CART) can be selected as a regression algorithm, and the mean square error (MSE) and the coefficient of determination (R-squared, R2) can be calculated simultaneously during the model training process to evaluate the regression model. When the MSE and R2 meet the requirements, that is, the model converges, a machine learning model that can be used for annotation position prediction is obtained.

[0109] In the embodiment of the present invention, the position information of the annotation and the feature information of the marked feature are extracted from the sample drawing, and a training sample is constructed based on the extracted position information and feature information, and then the machine learning model is trained by the training sample. Since the training sample is extracted from the real engineering drawing, it is guaranteed that the machine learning model trained by the training sample can accurately predict the annotation position, thereby reducing the number of manual adjustments to the annotation during the engineering drawing generation process and improving the efficiency of engineering drawing generation.

[0110] Figure 5 FIG. 5 is a schematic diagram of an engineering drawing generating device 500 according to an embodiment of the present invention. Figure 5 As shown, the engineering drawing generating device 500 includes:

[0111] The import unit 501 is used to import the drawing template according to the type of the part;

[0112] The placing unit 502 is used to place at least one view of the part into the drawing template according to the view layout rule;

[0113] A creation unit 503 is used to determine the initial position of the annotation according to the annotation position rule, and create the annotation in the drawing template according to the initial position, wherein the annotation is used to mark the features of the part;

[0114] A selection unit 504, used to determine the annotations to be optimized from the annotations;

[0115] An optimization unit 505 is used to input feature information of the feature marked by the annotation to be optimized into the machine learning model to obtain an optimized position output by the machine learning model;

[0116] The updating unit 506 is used to update the position of the mark to be optimized on the drawing template according to the optimized position.

[0117] In the embodiment of the present invention, after the import unit 501 imports the drawing template according to the type of the part, the placement unit 502 can place the view of the part in the drawing template according to the view layout rule, the creation unit 503 can create the annotation in the drawing template according to the annotation position rule, and after the selection unit 504 determines the annotation to be optimized that needs to be optimized from the drawing template, the optimization unit 505 can input the feature information of the feature marked by the annotation to be optimized into the machine learning model, optimize the position of the annotation to be optimized through the machine learning model, and obtain the optimized position, and then the update unit 506 updates the position of the annotation to be optimized on the drawing template according to the optimized position. The position of the view in the drawing template is automatically determined according to the view layout rule, and the position of the annotation in the drawing template is automatically determined according to the annotation position rule and the machine learning model, ensuring that the position of the annotation in the drawing template is appropriate, thereby realizing the automatic determination of the view layout and the annotation position, shortening the time for determining the view layout and the annotation position in the process of generating engineering drawings, and thus improving the efficiency of generating engineering drawings.

[0118] It should be noted that the interaction between the various parts in the above-mentioned engineering drawing generation device 500 is based on the same concept as the above-mentioned engineering drawing generation method embodiment. The specific content and beneficial effects can be found in the description in the above-mentioned engineering drawing generation method embodiment, and will not be repeated here.

[0119] Figure 6 is a schematic diagram of an electronic device provided by an embodiment of the present invention. The specific embodiment of the present invention does not limit the specific implementation of the electronic device. Figure 6 , the electronic device 600 provided by the embodiment of the present invention includes: a processor 602, a communication interface 604, a memory 606, and a communication bus 608. Among them:

[0120] The processor 602 , the communication interface 604 , and the memory 606 communicate with each other via a communication bus 608 .

[0121] The communication interface 604 is used to communicate with other electronic devices or servers.

[0122] The processor 602 is used to execute the program 610, and specifically can execute the relevant steps in the above-mentioned embodiment of the engineering drawing generation method.

[0123] Specifically, the program 610 may include program codes, which include computer operation instructions.

[0124] The processor 602 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention. The one or more processors included in the smart device may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.

[0125] The memory 606 is used to store the program 610. The memory 606 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0126] The program 610 may be specifically used to enable the processor 602 to execute the engineering drawing generation method in any of the aforementioned embodiments.

[0127] The specific implementation of each step in program 610 can refer to the corresponding description of the corresponding steps and units in the above-mentioned engineering drawing generation method embodiment, which will not be repeated here. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described devices and modules can refer to the corresponding process description in the above-mentioned method embodiment, which will not be repeated here.

[0128] Through the electronic device of this embodiment, after importing the drawing template according to the type of part, the view of the part can be placed in the drawing template according to the view layout rules, and the annotation can be created in the drawing template according to the annotation position rules. For the annotation to be optimized in the drawing template that needs to be optimized in position, the feature information of the feature marked by the annotation to be optimized can be input into the machine learning model, and the position of the annotation to be optimized is optimized by the machine learning model to obtain the optimized position, and then the position of the annotation to be optimized on the drawing template is updated according to the optimized position. The position of the view in the drawing template is automatically determined according to the view layout rules, and the position of the annotation in the drawing template is automatically determined according to the annotation position rules and the machine learning model, ensuring that the position of the annotation in the drawing template is appropriate, thereby realizing the automatic determination of the view layout and annotation position, shortening the time for determining the view layout and annotation position in the process of generating engineering drawings, and thus improving the efficiency of generating engineering drawings.

[0129] The present invention also provides a computer-readable storage medium storing instructions for causing a machine to execute the method for generating engineering drawings as described herein. Specifically, a system or device equipped with a storage medium may be provided, on which a software program code for implementing the functions of any of the above-mentioned embodiments is stored, and a computer (or CPU or MPU) of the system or device is enabled to read and execute the program code stored in the storage medium.

[0130] In this case, the program code itself read from the storage medium can realize the function of any one of the above-mentioned embodiments, and thus the program code and the storage medium storing the program code constitute a part of the present invention.

[0131] The storage medium embodiments for providing the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), a magnetic tape, a non-volatile memory card, and a ROM. Alternatively, the program code can be downloaded from a server computer by a communication network.

[0132] In addition, it should be clear that the functions of any of the above embodiments can be implemented not only by executing the program code read by the computer, but also by enabling an operating system operating on the computer to complete part or all of the actual operations based on instructions from the program code.

[0133] In addition, it can be understood that the program code read from the storage medium is written to a memory provided in an expansion board inserted into the computer or to a memory provided in an expansion module connected to the computer, and then based on the instructions of the program code, a CPU installed on the expansion board or expansion module is enabled to perform part or all of the actual operations, thereby realizing the functions of any of the above-mentioned embodiments.

[0134] The embodiment of the present invention further provides a computer program product, which is tangibly stored on a computer-readable medium and includes computer executable instructions, which, when executed, cause at least one processor to execute the motor heat dissipation rib design method provided in the above embodiments. It should be understood that each solution in this embodiment has the corresponding technical effect in the above method embodiment, which will not be repeated here.

[0135] It should be noted that not all steps and modules in the above-mentioned processes and system structure diagrams are necessary, and some steps or modules can be ignored according to actual needs. The execution order of each step is not fixed and can be adjusted as needed. The system structure described in the above-mentioned embodiments can be a physical structure or a logical structure, that is, some modules may be implemented by the same physical entity, or some modules may be implemented by multiple physical entities, or some components in multiple independent devices may be implemented together.

[0136] Nouns and pronouns relating to persons in this patent application are not limited to a specific gender.

[0137] In the above embodiments, the hardware module can be implemented mechanically or electrically. For example, a hardware module can include permanent dedicated circuits or logic (such as special processors, FPGA or ASIC) to complete the corresponding operation. The hardware module can also include programmable logic or circuits (such as general-purpose processors or other programmable processors), which can be temporarily set by software to complete the corresponding operation. The specific implementation method (mechanical method, or dedicated permanent circuit, or temporarily set circuit) can be determined based on cost and time considerations.

[0138] The present invention is shown and described in detail above through the accompanying drawings and preferred embodiments. However, the present invention is not limited to these disclosed embodiments. Based on the above multiple embodiments, those skilled in the art can know that the code review methods in the above different embodiments can be combined to obtain more embodiments of the present invention, and these embodiments are also within the protection scope of the present invention.

Claims

1. A method (100) for generating an engineering drawing, characterized in that: include: Import drawing templates according to the type of parts; placing at least one view of the part in the drawing template according to a view layout rule; Determining an initial position of the annotation according to an annotation position rule, and creating the annotation in the drawing template according to the initial position, wherein the annotation is used to mark a feature of the part; Determining a label to be optimized from the labels; Inputting feature information of the feature marked by the annotation to be optimized into a machine learning model to obtain an optimized position output by the machine learning model; According to the optimized position, the position of the mark to be optimized on the drawing template is updated.

2. The method according to claim 1, characterized in that Placing at least one view of the part in the drawing template according to the view layout rule comprises: Determining position information of the main view and the auxiliary view of the part according to the view layout rule; According to the position information of the main view and the auxiliary view of the part, the main view and the auxiliary view of the part are placed in the drawing template.

3. The method according to claim 2, characterized in that Determining the position information of the main view and the auxiliary view of the part according to the view layout rule includes: According to the width of the drawing template, the distance between the main view of the part and the left and right edges of the drawing template is calculated, wherein when the number of the main views of the part is greater than 1, the main views of the part are arranged in sequence along the height direction of the drawing template, and the widths of the main views are equal; Calculating the distance between the main view of the part located at the top of the drawing template and the upper edge of the drawing template according to the height of the drawing template; When the number of the main views of the part is greater than 1, the distance between the adjacent main views is calculated according to the number of dimension chains in the upper main view in the adjacent main views; When the number of auxiliary views of the part is greater than 1, the distance between adjacent auxiliary views is calculated according to the width and number of the auxiliary views of the part and the position information of the title bar in the drawing template, wherein the auxiliary views of the part are arranged sequentially along the width direction of the drawing template.

4. The method according to claim 1, characterized in that: Determining the initial position of the annotation according to the annotation position rule includes: Determine, according to the type of the annotation, a position influencing factor of the annotation, wherein the position influencing factor includes at least one of a position of a feature marked by the annotation, a dimension chain, annotation relevance, and a relative position to a view; An initial position of the annotation is determined according to the position influencing factors and the annotation position rule.

5. The method according to claim 1, characterized in that The feature information includes at least one of feature position information, structural information of the part, and type information of the annotation to be optimized.

6. The method according to claim 1, characterized in that The method further comprises: After updating the position of the mark to be optimized on the drawing template, receiving a position adjustment instruction of the mark to be optimized; According to the position adjustment instruction, the position of the mark to be optimized on the drawing template is adjusted.

7. The method according to claim 6, characterized in that The method further comprises: Acquire position information of the mark to be optimized, where the position information is used to indicate the position of the mark to be optimized on the drawing template after the position of the mark to be optimized on the drawing template is adjusted according to the position adjustment instruction; The machine learning model is trained using the location information and the feature information.

8. The method according to any one of claims 1 to 7, characterized in that: The machine learning model is trained in the following way: Acquire a plurality of sample drawings, wherein the sample drawings include at least one view and at least one annotation corresponding to the sample parts; Extracting annotations of the sample parts from the sample drawings; Grouping annotations extracted from the same sample drawing to obtain a plurality of annotation groups, wherein positions of annotations in each annotation group including a plurality of annotations are related; Determine a representative annotation from the annotations included in each of the annotation groups; Determine a bounding box corresponding to each representative annotation on the sample drawing, wherein the representative annotation is located within the corresponding bounding box; Determine the coordinates of a corner point of a bounding box corresponding to the representative annotation and feature information of a feature marked by the representative annotation as a training sample; The machine learning model is obtained by training a model to be trained with a training data set including a plurality of training samples.

9. An engineering drawing generating device (500), characterized in that: include: An import unit (501) is used to import a drawing template according to the type of the part; An inserting unit (502) is used to place at least one view of the part in the drawing template according to a view layout rule; A creation unit (503) is used to determine an initial position of a mark according to a mark position rule, and to create the mark in the drawing template according to the initial position, wherein the mark is used to mark a feature of the part; A selection unit (504), configured to determine a label to be optimized from the label; An optimization unit (505), used to input feature information of the feature marked by the annotation to be optimized into a machine learning model, and obtain an optimized position output by the machine learning model; An updating unit (506) is used to update the position of the mark to be optimized on the drawing template according to the optimized position.

10. An electronic device (600), characterized in that: include: A processor (602), a communication interface (604), a memory (606) and a communication bus (608), wherein the processor (602), the memory (606) and the communication interface (604) communicate with each other via the communication bus (608); The memory (606) is used to store at least one executable instruction, and the executable instruction enables the processor (602) to perform operations corresponding to the engineering drawing generation method according to any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, which, when executed by a processor, cause the processor to execute the method according to any one of claims 1 to 8.

12. A computer program product, characterized in that The computer program product is tangibly stored on a computer-readable medium and comprises computer-executable instructions which, when executed, cause at least one processor to perform the method according to any one of claims 1-8.

Citation Information

Cited By

  • Automatic layout method and device of engineering drawing, equipment and medium

    CN120217473A

  • Engineering drawing automatic labeling method and device and medium

    CN120340032A