Engineering drawing automatic labeling method and device based on feature direction matching and storage medium
By matching feature directions in engineering drawings, the appropriate view is automatically determined for dimensioning, which solves the problems of low efficiency and poor accuracy in engineering drawing annotation in the existing technology, and achieves efficient and accurate automated annotation.
Patent Information
- Application Number
- CN202411510077.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-28
- Publication Date
- 2025-01-24
AI Technical Summary
The existing engineering drawing annotation methods are inefficient, resulting in inaccurate dimension marking, frequent overlap and misreading. Especially when the engineering drawings are large in size and the amount of data increases, it is difficult for designers to complete efficiently during the labeling process.
By matching the features of the three -dimensional physical model with the feature direction in the two -dimensional engineering diagram, automatically determine the most suitable view to label the size, and adjust the position of the text through the algorithm to ensure the neat and accuracy marked.
The efficient and accurate automation label of the engineering diagram has been achieved, improved the efficiency of the designer, reduced the error rate, and ensured that the data of the engineering diagram was neat and accurate.
Smart Images

Figure CN119358055A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of dimensioning, and in particular relates to a method, a device and a storage medium for automatic annotation of engineering drawings based on feature direction matching. Background Art
[0002] At present, the 3D structural tool software MDA has a detailed drawing function, which requires manual annotation of accurate 2D engineering drawings. It contains key information such as the geometry, size, position and material of the parts; among them, the size is very important for controlling the quality and accuracy of the product. Manufacturers can process and inspect based on this information to ensure the qualification of parts and assemblies and reduce errors in the production process. Therefore, the dimensions marked on the engineering drawings are crucial for designers.
[0003] In the actual design process, with the iteration of product versions, the volume of engineering drawings is getting larger and larger, and the amount of data is also increasing exponentially. The workload of engineering drawing annotation is huge, which greatly restricts the improvement of design efficiency. In addition, since the parts of the model design are also correspondingly complex, when the 3D model is converted to the engineering drawing, there will be overlaps in the parts. When manually annotating, it may not be possible to accurately select the edges that need to be annotated. When the number of annotations is too large, most of the dimension leads will overlap, and it is impossible to identify which edge the dimension corresponds to; or the dimension text is mixed together, causing misunderstanding. When there are multiple engineering drawing views, each view has the same dimension. When selecting a view suitable for annotation, it is also necessary to comprehensively consider how many dimensions should be displayed in different views, the location of the annotations, etc., resulting in low efficiency in dimension annotation and difficulty for designers to consult. Summary of the invention
[0004] The present invention provides a method, device and storage medium for automatic annotation of engineering drawings based on feature direction matching. By converting the three-dimensional spatial relationship between the features of each part of an entity into a two-dimensional engineering drawing, the association between the feature dimension display and the view can be quickly obtained in the engineering drawing, and the feature dimension display can be matched to the most suitable attached view, thereby achieving accurate, efficient and neat engineering drawing dimension annotation.
[0005] To achieve the above object, the present invention is implemented by adopting the following technical solutions: The present invention provides an automatic annotation method for engineering drawings based on feature direction matching, comprising: Acquire each part of the solid three-dimensional model and the features corresponding to each part according to the solid three-dimensional model corresponding to the engineering drawing; Obtain the direction of each feature in the three-dimensional coordinate system; Acquire each view of the solid three-dimensional model and the direction of each view in the three-dimensional coordinate system; Based on the direction of the feature and the direction of the view, each feature is matched with a preferred view suitable for displaying its dimensions, and each geometric edge of the feature is dimensioned on the matched view; Gets the evenly distributed dimension text position.
[0006] Optionally, the obtaining of each part of the solid three-dimensional model and a feature corresponding to each part according to the solid three-dimensional model corresponding to the engineering drawing includes: Determine the type of the solid three-dimensional model. If the type is a part, place the part in a pre-built unique container of the object. If it is a component, collect the lower-level components of the component and determine the types of the lower-level components in turn. If it is a part, place the part in the container. If it is a component, traverse the lower-level components in turn until all the component types are parts, and place the parts in the container. Collect the feature information corresponding to each part according to the annotation requirements.
[0007] Optionally, obtaining the direction of each feature in the three-dimensional coordinate system includes: Obtain the normal direction of each feature on the three-dimensional solid model according to the feature type; The direction of each feature is determined according to its normal on the three-dimensional solid model.
[0008] Optionally, acquiring the normal of each feature on the three-dimensional solid model according to the feature type includes: When the feature is a fillet feature, a cylindrical surface is obtained from each solid surface of the fillet feature, and the axial direction of the cylindrical surface is extracted as the normal direction; When the feature is a chamfer feature, determine the type of the original surface to which the chamfer feature is attached. If it is a cone or a torus, extract the axial direction corresponding to the cone or the torus as the normal. If it is a plane, extract the vertical direction of the plane as the normal. When the feature is a hole feature, the center coordinates and the normal direction in the three-dimensional coordinate system of the hole feature are obtained according to the original surface information to which the hole feature is attached; When the feature is a flat feature or a flange feature, the larger surface of the two planes connected to the feature bending part is obtained, and the vertical direction of the larger surface is used as the normal direction; When the feature is a stretch feature, determine the stretch feature type. If it is an extension operation, obtain the starting face and the ending face of the feature creation, and use the center point of the starting face as the normal starting point and the center point of the ending face as the normal end point. If it is a material removal operation, obtain the starting face and the ending face of the feature creation, and use the center point of the ending face as the normal starting point and the center point of the starting face as the normal end point.
[0009] Optionally, the acquiring each view of the solid three-dimensional model includes: Obtaining view information on each page of the engineering drawing in sequence; Get the view object in the view information according to the view name.
[0010] Optionally, the directions of the views in the three-dimensional coordinate system are obtained by: Determine whether the current view is a parent view. If it is a parent view, obtain the direction of each view in the three-dimensional coordinate system based on the transformation matrix between the three-dimensional coordinates and the two-dimensional coordinates. If it is a mapping view, traverse the parent views of the mapping view, and collect the transformation matrix between each layer of mapping view and its parent view in turn until the initial parent view is found. According to the direction of the initial parent view in the three-dimensional coordinate system and each transformation matrix, obtain the direction of the mapping view in the three-dimensional coordinate system.
[0011] Optionally, matching each feature with a preferred view suitable for displaying its size based on the direction of the feature and the direction of the view includes: Use the ray algorithm to perform occlusion check on the feature direction on each view to determine whether the dimension annotation of the feature is displayed in the direction of each view. If the dimension annotation of the feature is displayed on views in different directions, compare the visibility of the dimension display of the feature on each view and assign the annotation position of the feature to the view with the highest visibility. For other unassigned features, determine whether the direction of each feature is consistent with the view in which it is located. If consistent, assign the annotation position of the feature to the view and remove the feature in the container. If inconsistent, determine the number of two-dimensional divisions of the view in which the feature is located. If the number is not 0, assign the annotation position of the feature to the parent view of the view.
[0012] Optionally, obtaining evenly distributed dimension annotation text positions includes: Iterate each view and display the dimensions marked on each view; Get the view's size and the text position of the dimension display, and record the dimension objects whose text positions are outside the preset range; Set the increment and offset of the engineering drawing dimensions, and call the adaptive adjustment algorithm to adjust the text position of the recorded dimension objects; After the text position is adjusted, restore the drawing dimension configuration.
[0013] In a second aspect, the present invention provides an automatic annotation device for engineering drawings based on feature direction matching, comprising: Model part feature acquisition module: used to acquire each part of the solid three-dimensional model and the features corresponding to each part according to the solid three-dimensional model corresponding to the engineering drawing; Feature direction acquisition module: used to obtain the direction of each feature in the three-dimensional coordinate system; A view direction acquisition module: used to acquire each view of the solid three-dimensional model and the direction of each view in the three-dimensional coordinate system; Feature and view matching module: used to match each feature with a preferred view suitable for its size display based on the direction of the feature and the direction of the view, and to dimension each geometric edge of the feature on the matched view; Text position adjustment module: used to obtain evenly distributed dimension text positions.
[0014] In a third aspect, the present invention provides a computer storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for automatic annotation of engineering drawings based on feature direction matching as described in any step of the first aspect.
[0015] Compared with the prior art, the beneficial effects achieved by the present invention are as follows: the present invention calculates the geometric information of parts and entities in three-dimensional entities, collects the relationship chain between features, obtains the spatial relationship between the features through an algorithm, and then converts the corresponding relationship into a two-dimensional engineering drawing. In the engineering drawing, the association between dimensions and views can be quickly calculated, and efficient and accurate automatic processing of engineering drawing dimensions is achieved, which improves the work efficiency of development engineers, reduces the error rate, and realizes agile development. For products that need to be put into production quickly, the present invention can shorten the cycle during the verification process, save time and labor costs, and to a certain extent ensure the robustness of the product, thereby improving the core competitiveness of the product; in the engineering drawing Based on factors such as view type, normal, occlusion shadow, uniform distribution, etc., the position of the dimension displayed in different views can be intelligently determined, and the most suitable attachment view can be obtained through comparison and judgment. This process is fast and efficient, and the calculated position will not cause overlapping and occlusion of other dimensions or data, ensuring the neatness of the data on the engineering drawing interface; it can automatically identify overlapping and intertwined elements in the engineering drawing according to the spatial relationship between features, and mark the key dimension information of different edges. For the dimensions that have been marked, the program can also recognize the corresponding information, and automatically adjust the position of other dimensions that need to be marked according to the view and text position, which will not affect the original data, further ensuring the accuracy of the engineering drawing data. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 Shown is a flow chart of an automatic annotation method for engineering drawings based on feature direction matching in an embodiment of the present invention;
[0017] Figure 2 The figure shows a ray algorithm flow chart in one embodiment of the present invention;
[0018] Figure 3 Shown is a flow chart of a feature and view matching algorithm in an embodiment of the present invention. DETAILED DESCRIPTION
[0019] 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 solution of the present invention, and cannot be used to limit the protection scope of the present invention.
[0020] Example 1
[0021] like Figure 1 As shown, this embodiment provides an automatic annotation method for engineering drawings based on feature direction matching, including:
[0022] Acquire each part of the solid three-dimensional model and the features corresponding to each part according to the solid three-dimensional model corresponding to the engineering drawing;
[0023] Obtain the direction of each feature in the three-dimensional coordinate system;
[0024] Acquire each view of the solid three-dimensional model and the direction of each view in the three-dimensional coordinate system;
[0025] Based on the direction of the feature and the direction of the view, each feature is matched with a preferred view suitable for displaying its dimensions, and each geometric edge of the feature is dimensioned on the matched view;
[0026] Gets the evenly distributed dimension text position.
[0027] In the process of engineering drawing design, dimensional data is a basic and important link. It can efficiently reflect industry standards and modeling specifications and reduce errors generated in the process. For details, detailed and specific data information can improve the communication efficiency between users. When the dimensional data is marked in a normal way, there is a situation where the selected coordinates are inaccurate, resulting in data deviation. In view of this situation, the present invention can automatically identify overlapping and intertwined graphics elements in the engineering drawing according to the relationship between the features in three-dimensional space. For example, when the edges of multiple parts are projected from three dimensions to two dimensions, only due to the difference in z coordinates, when the xy coordinates are consistent, only one edge can be seen. The program can easily mark the key dimensional information of different edges according to the conversion relationship from three-dimensional coordinates to two-dimensional coordinates.
[0028] Example 2
[0029] Based on Example 1, this example also makes the following design.
[0030] The automatic annotation method of engineering drawings is divided into the following steps.
[0031] Step 1: Get the parts and part features of the solid model.
[0032] The automatic dimensioning function of the engineering drawing of the present invention identifies the corresponding solid three-dimensional model (Solid) according to the engineering drawing activated in the current window, and determines its type as a part (part) or an assembly (assembly). If it is an assembly, it is necessary to collect the lower-level components of the assembly, and then determine the type of the components in turn. In the case of an assembly, the lower-level components are determined in turn until no component of the assembly type is found. At this time, the current structure tree has been parsed and all the collected component information is placed in a container that is unique to an object, otherwise the parts can be directly added to the container; after all the parts are collected, the container is iterated, and the feature information of the parts is collected according to the needs, and the features that do not need to be marked are screened out, and the relationship between the parts and the features is mapped in the program. This step completes the framework recording of the current solid three-dimensional model to facilitate subsequent operations, and the first step of preparation is completed.
[0033] Step 2: Get the view direction and feature direction.
[0034] In an engineering drawing, there may be multiple pages (Sheets). The program will automatically obtain all pages and the view information on each page in turn. Each view name is unique. The view object is obtained according to the view name. The three-dimensional to two-dimensional transformation matrix is calculated through the algorithm. The direction of the current view in the three-dimensional coordinate system can be reversed. The direction facing the screen is the front, the direction from the screen to the inside is the back, and the three-dimensional center coordinate system is the center to determine the direction up, down, left, and right. If the view is generated by mapping another view, it is necessary to first collect the transformation matrix with the parent view, collect it layer by layer, find the initial view, and obtain the direction of the initial view. After obtaining the direction of the initial view, the final direction of the mapped view can be obtained through different transformation relationships. If it is a section view, the priority of this view needs to be set, because there is more data on the section, there is more dimensional information, and the structural hierarchy relationship can be clearly judged. After determining the direction and mapping relationship of the view, the main extension direction of each feature is calculated based on the feature information collected from all parts. For example, for the stretch feature, you can find the starting face selected when creating the feature, find the center position of this face, use the center coordinates as the normal starting point, and the center of the end face as the normal end point. Based on the normal, calculate which of the six major directions it belongs to. If it is a material removal operation, the normal needs to be reversed. After preliminary calculations, the program obtains the direction of the view and the direction of all features, and the second step of preparation is completed.
[0035] Step 3: Check the occlusion of the feature direction and preliminarily determine the attachment view with appropriate feature size.
[0036] The direction of the feature needs to be checked again, because the normal of the feature cannot correspond to one of the six three-dimensional directions (front, back, left, right, top, and bottom). Next, a special algorithm is needed to check the direction of the feature. Round feature collects all the solid faces of the feature, obtains one of the cylindrical faces, and extracts the axial direction; Chamfer feature first determines whether the original face it is attached to is a cone, torus, or plane, and calculates the normal according to the type. In the case of a cone and torus, the normal is the axial direction, and in the case of a plane, the normal is the vertical direction; Hole feature parses the dependent original face information and obtains its three-dimensional center coordinates and normal. Starting from the center of the circle, a ray algorithm is performed in the direction corresponding to the end point of the normal direction to calculate the number of ray directions and other faces that pass through, and the total number is determined. If the number is equal to 0, it can be considered that the size can be correctly displayed in the direction of this view. On the contrary, if the number is greater than 0, there are other faces blocking it. At this time, the normal is negated, and another judgment is made to conclude whether the feature size needs to be displayed. For flat features (Flat) and flange features (Flange), first obtain the cylindrical surface at the bend, and use the algorithm to obtain the two planes connected to the bend. Compare the larger one, and this surface can be used as the object surface. The normal of the surface is obtained and set as the direction of the feature. For stretch features, this type of feature is mainly divided into extension (extend) and removal (Reduce) of materials. The directions of the two are opposite. In the case of removing materials, it is necessary to determine whether the size display is visible by the number of ray passing through the surface, and if it is visible, on which view the visibility is greater, etc. Through further normal verification, the accuracy of the size display is improved, and the third step of preparation is completed.
[0037] In this embodiment, the process steps of the ray algorithm are as follows: Figure 2 As shown in the figure, the purpose of this algorithm is to determine whether there is an occlusion surface in a certain direction based on the center point and normal of the geometric surface associated with the feature, so as to obtain a display view of appropriate size. First, the parent feature to which the target feature is attached is parsed, and the geometric surface and geometric edge information of the parent feature is collected. The target feature is also processed in this way to collect the information of the geometric surface and geometric edge; then the geometric edges of the two are matched, because the two features are in contact, and the contact surface must have the same edge, and then the geometric edge information is parsed to obtain the contour where it is located. According to the midpoints of all the edges of the contour, a center point is constructed in turn, which is regarded as the starting point of the target feature. The equation of the line is constructed using the starting point and the normal of the parent feature; all the geometric surfaces are collected using the current entity object of the engineering drawing, and the number of contacts between the line and all the geometric surfaces is determined. The result can clearly show whether there is occlusion when the target feature is projected onto a view.
[0038] Step 4: Further view matching is performed on the feature sizes of the unmatched views.
[0039] After the preparation is completed, the dimensions of some of the determined positions can be displayed. According to the principle of section view priority, all views are iterated. When judging a view, all features need to be matched one by one. When the direction of the view and the direction of the feature are consistent, the pairing is successful, the feature dimension is recorded, and the feature object where the dimension is located is removed from the container to prevent repeated calculation of data. The matching logic is shown in Figure 3 When the direction of the view is inconsistent with the direction of the feature, it is necessary to determine the number of two-dimensional divisions of the view. When the number is not 0, it is necessary to find the parent view and mark it on the parent view. This process ends.
[0040] In this embodiment, during the marking process, for some cases where parts are missing or some features fail due to feature reasons, the program will collect these dimensions that may fail and cannot display correct information, and ask the user whether to delete or update these data to ensure the real-time correctness of the engineering drawing data.
[0041] Step 5: Adjust the text position of the marked dimensions so that the text is evenly distributed.
[0042] Most of the dimensions that need to be displayed have been assigned to different views on the engineering drawing. At this point, only the step of assigning the dimensions to the appropriate views has been completed. Next, the display position of the dimensions in the view needs to be adjusted. Iterate the view, display the recorded dimensions, obtain the view's outline size, obtain the text position of the corresponding display dimension, and if the position is outside 2 / 3 of the view size (the dimension is counted as long as it touches this range), select and record these dimension objects, then set the engineering drawing dimension increment to 7 and the offset to 10, call the algorithm to achieve adaptive adjustment of the dimension position, and finally restore the engineering drawing dimension configuration. This process ends.
[0043] Step 6: Determine whether there are any height dimensions of the stretch feature that are not displayed, filter out the dimensions that are already displayed from the height dimension list, and display the remaining dimensions.
[0044] Example 3
[0045] This embodiment provides an automatic annotation device for engineering drawings based on feature direction matching, comprising:
[0046] Model part feature acquisition module: used to acquire each part of the solid three-dimensional model and the features corresponding to each part according to the solid three-dimensional model corresponding to the engineering drawing;
[0047] Feature direction acquisition module: used to obtain the direction of each feature in the three-dimensional coordinate system;
[0048] A view direction acquisition module: used to acquire each view of the solid three-dimensional model and the direction of each view in the three-dimensional coordinate system;
[0049] Feature and view matching module: used to match each feature with a preferred view suitable for its size display based on the direction of the feature and the direction of the view, and to dimension each geometric edge of the feature on the matched view;
[0050] Text position adjustment module: used to obtain evenly distributed dimension text positions.
[0051] Example 4
[0052] This embodiment provides a computer storage medium on which a computer program is stored. When the computer program is executed by a processor, the automatic annotation method for engineering drawings based on feature direction matching as described in any step of Embodiment 2 is implemented.
[0053] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0054] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, 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 generate 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 flowchart and / or block diagram. 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.
[0055] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate 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 A function specified in one or more boxes.
[0056] 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 instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0057] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the enlightenment of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the purpose of the present invention and the claims, which all fall within the protection of the present invention.
Claims
1. A method for automatic annotation of engineering drawings based on feature direction matching, characterized in that: include: Acquire each part of the solid three-dimensional model and the features corresponding to each part according to the solid three-dimensional model corresponding to the engineering drawing; Obtain the direction of each feature in the three-dimensional coordinate system; Obtaining each view of the solid three-dimensional model and the direction of each view in a three-dimensional coordinate system; Based on the direction of the feature and the direction of the view, each feature is matched with a preferred view suitable for displaying its dimensions, and each geometric edge of the feature is dimensioned on the matched view; Gets the evenly distributed dimension text position.
2. The automatic annotation method for engineering drawings based on feature direction matching according to claim 1 is characterized in that: The step of obtaining each part of the solid three-dimensional model and the features corresponding to each part according to the solid three-dimensional model corresponding to the engineering drawing includes: Determine the type of the solid three-dimensional model. If the type is a part, place the part in a pre-built unique container of the object. If it is a component, collect the lower-level components of the component and determine the types of the lower-level components in turn. If it is a part, place the part in the container. If it is a component, traverse the lower-level components in turn until all the component types are parts, and place the parts in the container. Collect the feature information corresponding to each part according to the annotation requirements.
3. The automatic annotation method for engineering drawings based on feature direction matching according to claim 2 is characterized in that: The obtaining of the direction of each feature in the three-dimensional coordinate system includes: Obtain the normal direction of each feature on the three-dimensional solid model according to the feature type; The direction of each feature is determined according to its normal on the three-dimensional solid model.
4. The automatic annotation method for engineering drawings based on feature direction matching according to claim 3 is characterized in that: The step of obtaining the normal direction of each feature on the three-dimensional solid model according to the feature type includes: When the feature is a fillet feature, a cylindrical surface is obtained from each solid surface of the fillet feature, and the axial direction of the cylindrical surface is extracted as the normal direction; When the feature is a chamfer feature, determine the type of the original surface to which the chamfer feature is attached. If it is a cone or a torus, extract the axial direction corresponding to the cone or the torus as the normal. If it is a plane, extract the vertical direction of the plane as the normal. When the feature is a hole feature, the center coordinates and the normal direction in the three-dimensional coordinate system of the hole feature are obtained according to the original surface information to which the hole feature is attached; When the feature is a flat feature or a flange feature, the larger surface of the two planes connected to the feature bending part is obtained, and the vertical direction of the larger surface is used as the normal direction; When the feature is a stretch feature, determine the stretch feature type. If it is an extension operation, obtain the starting face and the ending face of the feature creation, and use the center point of the starting face as the normal starting point and the center point of the ending face as the normal end point. If it is a material removal operation, obtain the starting face and the ending face of the feature creation, and use the center point of the ending face as the normal starting point and the center point of the starting face as the normal end point.
5. The automatic annotation method for engineering drawings based on feature direction matching according to claim 3 or 4, characterized in that: The obtaining of each view of the solid three-dimensional model comprises: Obtaining view information on each page of the engineering drawing in sequence; Get the view object in the view information according to the view name.
6. The automatic annotation method for engineering drawings based on feature direction matching according to claim 5 is characterized in that: The directions of the views in the three-dimensional coordinate system are obtained by the following method: Determine whether the current view is a parent view. If it is a parent view, obtain the direction of each view in the three-dimensional coordinate system based on the transformation matrix between the three-dimensional coordinates and the two-dimensional coordinates. If it is a mapping view, traverse the parent views of the mapping view, and collect the transformation matrix between each layer of mapping view and its parent view in turn until the initial parent view is found. According to the direction of the initial parent view in the three-dimensional coordinate system and each transformation matrix, obtain the direction of the mapping view in the three-dimensional coordinate system.
7. The automatic annotation method for engineering drawings based on feature direction matching according to claim 6 is characterized in that: The matching of each feature with a preferred view suitable for displaying its size based on the direction of the feature and the direction of the view comprises: Use the ray algorithm to perform occlusion check on the feature direction on each view to determine whether the dimension annotation of the feature is displayed in the direction of each view. If the dimension annotation of the feature is displayed on views in different directions, compare the visibility of the dimension display of the feature on each view and assign the annotation position of the feature to the view with the highest visibility. For other unassigned features, determine whether the direction of each feature is consistent with the view in which it is located. If consistent, assign the annotation position of the feature to the view and remove the feature in the container. If inconsistent, determine the number of two-dimensional divisions of the view in which the feature is located. If the number is not 0, assign the annotation position of the feature to the parent view of the view.
8. The method for automatic annotation of engineering drawings based on feature direction matching according to claim 7, characterized in that: The step of obtaining evenly distributed dimension annotation text positions includes: Iterate each view and display the dimensions marked on each view; Get the view's size and the text position of the dimension display, and record the dimension objects whose text positions are outside the preset range; Set the increment and offset of the engineering drawing dimensions, and call the adaptive adjustment algorithm to adjust the text position of the recorded dimension objects; After the text position is adjusted, restore the drawing dimension configuration.
9. An automatic annotation device for engineering drawings based on feature direction matching, characterized in that: include: Model part feature acquisition module: used to acquire each part of the solid three-dimensional model and the features corresponding to each part according to the solid three-dimensional model corresponding to the engineering drawing; Feature direction acquisition module: used to obtain the direction of each feature in the three-dimensional coordinate system; A view direction acquisition module: used to acquire each view of the solid three-dimensional model and the direction of each view in the three-dimensional coordinate system; Feature and view matching module: used to match each feature with a preferred view suitable for its size display based on the direction of the feature and the direction of the view, and to dimension each geometric edge of the feature on the matched view; Text position adjustment module: used to obtain evenly distributed dimension text positions.
10. A computer storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the automatic annotation method for engineering drawings based on feature direction matching as described in any one of claims 1 to 8 is implemented.
Citation Information
Cited By
Vector drawing generation method and system based on GAI, terminal and medium
CN120997867A
Engineering data automatic labeling method based on feature direction matching
CN121328028A
An Automatic Annotation Method for Engineering Data Based on Feature Orientation Matching
CN121328028B