Method, device and equipment for automatically labeling ball mark of engineering drawing and medium
By automatically calculating the point of the model's pointing position and the number placement point of the ball marking in the MDA three-dimensional design software, preliminary labeling and correction of the ball marking drawings is solved, and the problem of time-consuming and labor-intensive use of the ball marking creation function in the existing technology is achieved, and efficient , accurate ball marking.
Patent Information
- Application Number
- CN202411497149.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-02-14
AI Technical Summary
The existing MDA three-dimensional design software comes with its own ball mark creation function and is time-consuming and laborious to use and cannot meet user needs well.
By reading the digital model engineering drawings, traversing all models, automatically calculating the point of the model's pointing position and the number placement points of the ball markings, performing preliminary labeling of the ball markings, and checking and correcting the preliminary labeling results to obtain the final labeling results.
It realizes ball marking with high degree of automation, improves the efficiency and accuracy of marking, and can better meet user needs.
Smart Images

Figure CN119442520A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of engineering drawing, and in particular to a method, device, equipment and medium for automatically marking ball marks on engineering drawings. Background Art
[0002] During the product manufacturing process, engineering drawings are used to convey design intent. After the digital model design is completed, a complete mechanical engineering drawing is produced. Ball marks need to be added to the parts of each model on the mechanical engineering drawing to facilitate inspection personnel's review and operation. The MDA 3D design software's built-in ball mark creation function is relatively simple, requiring manual adjustment of the part ball mark's starting and ending points, which is time-consuming and requires ensuring the starting point is on the appropriate surface of the part, that leads do not cross, and that the ball marks are sorted and evenly distributed. The software lacks these functions, cannot fully meet user needs, and is inconvenient to operate and use. Summary of the Invention
[0003] The purpose of the present invention is to overcome the deficiencies in the prior art and provide a method, device, equipment and medium for automatically marking ball marks in engineering drawings, so as to solve the technical problem that the ball mark creation function provided in the existing MDA three-dimensional design software is time-consuming and labor-intensive to use and cannot well meet user needs.
[0004] To achieve the above object, the present invention is implemented by adopting the following technical solutions: In a first aspect, the present invention provides a method for automatically marking engineering drawing balloons, comprising: Read the digital model engineering drawing, traverse all models in the digital model engineering drawing, and obtain the pointing position points and ball mark serial number placement points of the models; Perform preliminary marking of the engineering drawing ball mark according to the pointing position point and the ball mark serial number placement point; Check and correct the preliminary marking results of the engineering drawing ball mark to obtain the final marking results of the engineering drawing ball mark.
[0005] Optionally, the acquiring of the pointing location point of the model includes: S2.1. Determine all faces of all parts in the model and obtain the center point of each face; S2.2, determine whether the center point is on the surface, If it is on the surface, get the angle between the surface and each view, and initialize ; If it is not on the surface, reselect the center point; S2.3, determine the surface and the Whether the angle of each view meets the preset angle requirements, If the preset angle requirement is met, proceed to step S2.4; If the preset angle requirement is not met, and , then let , return to S2.3; is the number of views; If the preset angle requirement is not met, and , then an error is reported; S2.4, The view is recorded as the target view, and it is determined whether the center point is covered in the target view. If it is covered, then , return to S2.3; If it is not covered, the center point is used as the pointing position point of the surface on the target view.
[0006] Optionally, reselecting the center point includes: Determine all edges in the face, and select any endpoint of any edge as an edge point; Repeat the following steps until the center point is on the surface, and output the final center point: Obtain the midpoint of the line connecting the center point and the side point, and use the midpoint of the line as the reselected center point.
[0007] Optionally, determining whether the center point is covered in the target view includes: S4.1. Determine all parts in the model and initialize ; S4.2, for the a part, determining all edges of all faces of the part; S4.3. Select a point at a preset position on the edge, and record it as a selected point; S4.4. Obtain the distance between the selected point and the target view, and remove the selected points whose distance is greater than the distance between the center point and the target view; S4.5. Form a polygon with the selected points after removal in the direction of the target view, and determine whether the projection point of the center point in the direction of the target view is within the polygon. If it is within the polygon, determining that the center point is covered on the target view; If it is not inside the polygon, and , then let , return to S4.2; is the number of parts; If it is not inside the polygon, and , it is determined that the center point is not covered on the target view.
[0008] Optionally, obtaining the ball marker serial number placement point includes: The contour line of the target view is determined, and the pointing position point is offset to the contour line with the shortest distance to obtain the ball mark serial number placement point corresponding to the pointing position point.
[0009] Optionally, the checking and correcting of the preliminary annotation results of the engineering drawing balloons includes: Calculate the linear equation of the ball marker guide line according to the two-dimensional coordinates of the pointing position point and the ball marker serial number placement point on its view; It is determined whether there is an intersection between the ball marker leads according to the straight line equation of the ball marker leads. If there is an intersection, the ball marker serial number placement points corresponding to the ball marker leads are interchanged.
[0010] Optionally, the checking and correcting of the preliminary annotation results of the engineering drawing balloons includes: Determine whether the ball mark serial numbers meet the requirement of being arranged in a counterclockwise or clockwise order; if not, modify the ball mark serial numbers in order.
[0011] In a second aspect, the present invention provides a device for automatically marking engineering drawing balloons, comprising: A point acquisition module is used to read the digital model engineering drawing, traverse all models in the digital model engineering drawing, and obtain the pointing position points and ball mark serial number placement points of the models; A preliminary marking module, configured to perform preliminary marking of the engineering drawing ball mark according to the pointing position point and the ball mark serial number placement point; The revised annotation module is used to check and revise the preliminary annotation results of the engineering drawing ball mark to obtain the final annotation results of the engineering drawing ball mark.
[0012] In a third aspect, the present invention provides an electronic device, including a processor and a storage medium; The storage medium is used to store instructions; The processor is configured to operate according to the instructions to execute the steps of the above method.
[0013] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the above method when executed by a processor.
[0014] Compared with the prior art, the present invention has the following beneficial effects: The present invention provides a method, device, equipment, and medium for automatically annotating engineering drawing balloons. The method reads a digital model engineering drawing, traverses all models within the drawing, and automatically calculates the model's pointing position and balloon number placement points, ensuring automatic association between the balloons and models. After association, the drawing balloons are initially annotated, followed by inspection and correction. Compared to existing MDA 3D design software with built-in balloon creation capabilities, the present invention offers a higher degree of automation, efficient, and accurate annotation, better meeting user needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 1 is a flow chart of a method for automatically marking engineering drawing balloons provided by an embodiment of the present invention; Figure 2 1 is a schematic diagram of a process for obtaining a pointing position point of a model provided by an embodiment of the present invention; Figure 3 This is a flowchart of determining whether a center point is covered in a target view, provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0016] The present invention will be further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention and are not intended to limit the scope of protection of the present invention.
[0017] Example 1:
[0018] like Figure 1 As shown, an embodiment of the present invention provides a method for automatically marking engineering drawing balloons, comprising the following steps: (1) Read the digital model engineering drawing, traverse all models in the digital model engineering drawing, and obtain the pointing position point and ball mark serial number placement point of the model.
[0019] like Figure 2 As shown, specifically in this embodiment, obtaining the pointing position of the model includes: S2.1. Determine all faces of all parts in the model and obtain the center point of each face; S2.2, determine whether the center point is on the surface, If it is on the surface, get the angle between the surface and each view, and initialize ; If it is not on the surface, reselect the center point; S2.3, Judgment surface and Whether the angle of each view meets the preset angle requirements, If the preset angle requirement is met, proceed to step S2.4; If the preset angle requirement is not met, and , then let , return to S2.3; is the number of views; If the preset angle requirement is not met, and , then an error is reported; S2.4, The view is recorded as the target view, and the center point is judged whether it is covered in the target view. If it is covered, then , return to S2.3; If not covered, the center point is used as the pointing position of the surface on the target view.
[0020] Reselecting the center point includes: Determine all the edges in the face and select any endpoint of any edge as an edge point; Repeat the following steps until the center point is on the surface and output the final center point: Get the midpoint of the line connecting the center point and the edge point, and use the midpoint of the line as the reselected center point.
[0021] Among them, such as Figure 3 As shown, judging whether the center point is covered in the target view includes: S4.1. Identify all parts in the model and initialize them ; S4.2, for the A part, determine all edges of all faces of the part; S4.3. Select a point at the preset position of the edge and record it as the selected point; S4.4. Obtain the distance between the selected point and the target view, and remove the selected points whose distance is greater than the distance between the center point and the target view; S4.5. Form a polygon with the selected points after removal in the target view direction, and determine whether the projection point of the center point in the target view direction is within the polygon. If it is inside the polygon, the center point is determined to be covered on the target view; If not inside the polygon, and , then let , return to S4.2; is the number of parts; If not inside the polygon, and , it is determined that the center point is not covered on the target view.
[0022] Specifically in this embodiment, obtaining the ball marker serial number placement point of the model includes: Determine the contour line of the target view, offset the pointing position point to the contour line with the shortest distance, and obtain the ball mark serial number placement point corresponding to the pointing position point.
[0023] The outline of the view is based on the center of the view and is removed according to the preset length and width.
[0024] (2) Make preliminary markings on the engineering drawing ball marks based on the pointing position points and the ball mark serial number placement points.
[0025] (3) Check and correct the preliminary marking results of the engineering drawing ball mark to obtain the final marking results of the engineering drawing ball mark.
[0026] Check and correct the preliminary annotation results of engineering drawing balloons, including: (3.1) Calculate the linear equation of the ball marker guide line based on the two-dimensional coordinates of the pointing position point and the ball marker serial number placement point on its view; determine whether there is an intersection between the ball marker guide lines based on the linear equation of the ball marker guide lines. If there is an intersection, swap the ball marker serial number placement points corresponding to the ball marker guide lines.
[0027] (3.2) Determine whether the ball mark serial numbers satisfy the requirement of being arranged in a counterclockwise then clockwise order. If not, modify the ball mark serial numbers in order.
[0028] Furthermore, users can also adjust the final annotation results of the engineering drawing ball marks. If some ball mark leaders cross and affect viewing, you can perform ball mark cross processing. If the ball mark placement is messy, you can select the view or select the ball marks to evenly distribute them. Users can modify the ball mark sequence number, and the corresponding detailed list will also be modified. There are many ways to modify the ball mark sequence number. You can select the view to sort clockwise or counterclockwise, select the ball marks to sort in a specified direction, or manually select the ball marks to sort. You can select multiple ball marks to keep them on the same horizontal or vertical line, and then move them as a whole.
[0029] Example 2:
[0030] Based on the method for automatically marking engineering drawing balloons provided in the first embodiment, the present invention further provides a device for automatically marking engineering drawing balloons, comprising: A point acquisition module is used to read the digital model engineering drawing, traverse all models in the digital model engineering drawing, and obtain the pointing position points and ball mark serial number placement points of the models; A preliminary marking module, configured to perform preliminary marking of the engineering drawing ball mark according to the pointing position point and the ball mark serial number placement point; The revised annotation module is used to check and revise the preliminary annotation results of the engineering drawing ball mark to obtain the final annotation results of the engineering drawing ball mark.
[0031] Example 3:
[0032] Based on the method for automatically marking engineering drawing balloons provided in the first embodiment, an embodiment of the present invention further provides an electronic device, including a processor and a storage medium; The storage medium is used to store instructions; The processor is configured to operate according to the instructions to execute the steps of the above method.
[0033] Example 4:
[0034] Based on the method for automatically marking engineering drawing ball marks provided in the first embodiment, the embodiment of the present invention also provides A computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the steps of the above method are implemented.
[0035] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0036] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0037] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0038] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0039] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for automatically marking engineering drawing balloons, characterized in that: include: Read the digital model engineering drawing, traverse all models in the digital model engineering drawing, and obtain the pointing position points and ball mark serial number placement points of the models; Perform preliminary marking of the engineering drawing ball mark according to the pointing position point and the ball mark serial number placement point; Check and correct the preliminary marking results of the engineering drawing ball mark to obtain the final marking results of the engineering drawing ball mark.
2. The method for automatically marking engineering drawing balloons according to claim 1, characterized in that: The acquisition model's pointing position point includes: S2.
1. Determine all faces of all parts in the model and obtain the center point of each face; S2.2, judging whether the center point is on the surface, If it is on the surface, get the angle between the surface and each view, and initialize ; If it is not on the surface, reselect the center point; S2.3, determine the surface and the Whether the angle of each view meets the preset angle requirements, If the preset angle requirement is met, proceed to step S2.4; If the preset angle requirement is not met, and , then let , return to S2.3; is the number of views; If the preset angle requirement is not met, and , then an error is reported; S2.
4. The view is recorded as the target view, and it is determined whether the center point is covered in the target view. If it is covered, then , return to S2.3; If it is not covered, the center point is used as the pointing position point of the surface on the target view.
3. The method for automatically marking engineering drawing balloons according to claim 2, characterized in that: The reselection of the center point comprises: Determine all the edges in the face, and select any endpoint of any edge as an edge point; Repeat the following steps until the center point is on the surface, and output the final center point: The midpoint of the line connecting the center point and the side point is obtained, and the midpoint of the line is used as the re-selected center point.
4. The method for automatically marking engineering drawing balloons according to claim 2, characterized in that: The determining whether the center point is covered in the target view comprises: S4.
1. Determine all parts in the model and initialize ; S4.
2. a part, determining all edges of all faces of the part; S4.3, selecting a point at a preset position of the edge, recorded as a selected point; S4.
4. Obtain the distance between the selected point and the target view, and remove the selected points whose distance is greater than the distance between the center point and the target view; S4.5, forming a polygon with the selected points after removal in the direction of the target view, and determining whether the projection point of the center point in the direction of the target view is within the polygon, If it is within the polygon, determining that the center point is covered on the target view; If it is not inside the polygon, and , then let , return to S4.2; is the number of parts; If it is not inside the polygon, and , it is determined that the center point is not covered on the target view.
5. The method for automatically marking engineering drawing balloons according to claim 2, characterized in that: The acquisition of the ball marker serial number placement point includes: The contour line of the target view is determined, and the pointing position point is offset to the contour line with the shortest distance to obtain the ball mark serial number placement point corresponding to the pointing position point.
6. The method for automatically marking engineering drawing balloons according to claim 1, characterized in that: The checking and correction of the preliminary marking results of the engineering drawing ball mark includes: Calculate the linear equation of the ball marker guide line according to the two-dimensional coordinates of the pointing position point and the ball marker serial number placement point on its view; It is determined whether there is an intersection between the ball marker guide lines according to the straight line equation of the ball marker guide lines. If there is an intersection, the ball marker serial number placement points corresponding to the ball marker guide lines are interchanged.
7. The method for automatically marking engineering drawing balloons according to claim 1, characterized in that: The checking and correction of the preliminary marking results of the engineering drawing ball mark includes: Determine whether the ball mark serial numbers satisfy the requirement of being arranged in a counterclockwise or clockwise order; if not, modify the ball mark serial numbers in order.
8. A device for automatically marking engineering drawing balloons, characterized in that: include: A point acquisition module is used to read the digital model engineering drawing, traverse all models in the digital model engineering drawing, and obtain the pointing position point and the ball mark serial number placement point of the model; A preliminary marking module, used for performing preliminary marking of the ball mark on the engineering drawing according to the pointing position point and the ball mark serial number placement point; The annotation correction module is used to check and correct the preliminary annotation results of the engineering drawing ball mark to obtain the final annotation results of the engineering drawing ball mark.
9. An electronic device, characterized in that: including processor and storage medium; The storage medium is used to store instructions; The processor is configured to operate according to the instructions to execute the steps of the method according to any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.