Two-dimensional icon labeling method, system and device based on three-dimensional model feature recognition
By acquiring the parameters and assembly association information of the 3D model, extracting 3D features, and performing multi-view search and projection optimization, and combining industry rules to generate 2D icon annotations, the problems of low efficiency and low accuracy of 2D icon annotations in existing technologies are solved, and efficient and accurate 2D icon annotations are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 广域铭岛数字科技有限公司
- Filing Date
- 2026-02-27
- Publication Date
- 2026-06-23
AI Technical Summary
In existing technologies, when generating two-dimensional engineering drawings from three-dimensional models, the two-dimensional annotation is inefficient and lacks precision. It is also easily affected by human factors, leading to problems such as omissions, errors, or non-compliance with standards.
By acquiring parameter information and assembly association information of the 3D model, 3D features are extracted and the association relationship is determined based on the multi-view search method. The optimal projection direction is selected to project the 3D features onto the virtual space plane, the shape and size information of the 2D features are determined, tolerance information is automatically matched in combination with industry rules, and the annotation data package is encapsulated and the layout is optimized to generate 2D icon annotations.
It achieves accurate conversion of 3D features to 2D features, ensures the accuracy of 2D feature shape and size, avoids distortion caused by manual selection, improves annotation efficiency and quality, meets engineering drawing specifications, supports common engineering drawing formats, reduces labor costs and avoids human error.
Smart Images

Figure CN122263289A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of three-dimensional data processing, and in particular to a two-dimensional icon annotation method, system and device based on three-dimensional model feature recognition. Background Technology
[0002] With the digitalization and intelligentization of the manufacturing industry, Computer-Aided Design (CAD) technology has become a crucial foundational tool in fields such as machinery, aerospace, automotive, shipbuilding, and equipment manufacturing. Currently, mainstream 3D modeling software, such as CATIA, SolidWorks, UG NX, Creo, and Inventor, is widely used throughout the entire product lifecycle, from conceptual design to manufacturing. Designers typically need to create part and assembly models in a 3D environment to perform functions such as structural design, interference analysis, and motion simulation. Then, based on product manufacturing needs, they generate 2D engineering drawings from the 3D models for process design, manufacturing, and quality inspection.
[0003] However, in the process of generating two-dimensional engineering drawings from three-dimensional models, although the projection view function of three-dimensional software can be used, information such as dimension annotations, geometric tolerance annotations, surface roughness symbols, welding symbols, and technical requirements of the two-dimensional drawings still need to be added manually. This is time-consuming and labor-intensive, and easily affected by human factors. Especially in the design of complex assemblies or high-precision parts, the workload of annotation on two-dimensional drawings is huge, and the proportion of manual intervention is high. This not only reduces design efficiency but also increases the risk of errors, leading to problems such as omissions, errors, or non-compliance with standards. Summary of the Invention
[0004] This application provides a method, system, and device for two-dimensional icon annotation based on three-dimensional model feature recognition, in order to solve the problems of low efficiency and low accuracy of two-dimensional icon annotation based on three-dimensional model feature recognition in the prior art.
[0005] In a first aspect, this application provides a two-dimensional icon annotation method based on three-dimensional model feature recognition, comprising: acquiring model parameter information, including the target three-dimensional model and the information of the assembly of the target three-dimensional model with the corresponding parts; extracting three-dimensional features of the target three-dimensional model, determining the association relationship of the three-dimensional features under multiple views based on a multi-view search method, wherein the three-dimensional features include geometric features and corresponding spatial coordinates; selecting the optimal projection direction according to the association relationship to project the three-dimensional features onto a virtual space plane, and determining the shape and size information of the two-dimensional features; determining the feature name according to the matching relationship between the shape and size information of the two-dimensional features and the information of the assembly, and matching the two-dimensional features according to preset industry rules to determine tolerance information; encapsulating the view position information, feature spatial position, tolerance information and feature name corresponding to the two-dimensional features to generate an annotation data package, wherein the feature spatial position is calculated by the spatial coordinates corresponding to the geometric features; and optimizing the layout formed by the annotation data package to generate two-dimensional icon annotations.
[0006] In some possible embodiments of the first aspect, optimizing the layout formed by the annotation data package to generate two-dimensional icon annotations includes: classifying the annotation data package according to views and obtaining classification feature information, wherein the views are at least one of six views; optimizing the layout formed by the classification feature information to determine the layout result, wherein the layout optimization includes minimizing the annotation overlap rate, minimizing the number of annotation line intersections, maximizing the annotation uniformity and readability score; and splitting and / or merging the feature distributions under the same views in the layout result to determine the two-dimensional icon annotations.
[0007] In some possible embodiments of the first aspect, splitting and / or merging the feature distribution under different views in the layout result to determine the two-dimensional icon annotation includes: determining the degree of feature distribution under different views in the layout result; if the degree of feature distribution includes dense areas, then splitting the features of the dense areas under the same view to generate a new view; if the degree of feature distribution includes sparse areas, then merging the features of the sparse areas under the same view to generate a new view; if it is detected that the new view has at least one of a local magnified view or a section view, then uniformly arranging them in the new view to generate a two-dimensional icon annotation.
[0008] In some possible embodiments of the first aspect, optimizing the layout formed by the annotation data package to generate two-dimensional icon annotations includes: arranging the data according to the model parameter information in the annotation data package to generate a layout; using a heuristic algorithm to optimize the layout so that the features are flat and completely cover the layout; and rendering the annotation data package onto a two-dimensional map based on the optimized layout to generate two-dimensional icon annotations. The layout optimization includes minimizing the annotation overlap rate, minimizing the number of annotation line intersections, and maximizing the annotation uniformity and readability score.
[0009] In some possible embodiments of the first aspect, the optimal projection direction is selected based on the correlation to project the three-dimensional features onto a virtual space plane, and the shape and size information of the two-dimensional features are determined. This includes: obtaining the set of model surface normals of the target three-dimensional model; determining the set of visible areas under each view based on the set of model surface normals; calculating the viewpoint redundancy under each view; determining the optimal projection direction based on the view corresponding to the minimum viewpoint redundancy and the largest set of visible areas; projecting the three-dimensional features onto a virtual space plane based on the optimal projection direction to determine the plane equation; and fitting the shape and size in the plane equation to determine the shape and size information of the two-dimensional features.
[0010] In some possible embodiments of the first aspect, the three-dimensional features of the target three-dimensional model are extracted, and the association relationship of the three-dimensional features under multiple views is determined based on a multi-view search method, including: extracting the geometric features of the target three-dimensional model; extracting the spatial coordinates of the geometric features based on feature semanticization of deep learning; determining the geometric features to be labeled in the target three-dimensional model and their corresponding spatial coordinates; obtaining the view that reflects the most features of the target three-dimensional model as the main view; obtaining the main view information from the main view perspective; processing the three-dimensional features based on the main view information using a multi-view search method to obtain local magnification information and section view information; and associating and binding the same three-dimensional feature with the main view information, local magnification information, and section view information to determine the association relationship.
[0011] In some possible embodiments of the first aspect, determining the feature name based on the matching relationship between the shape information and size information of the two-dimensional feature and the information of the counterpart part, and determining the tolerance information by matching the two-dimensional feature according to preset industry rules, includes: determining the feature name corresponding to the two-dimensional feature based on the matching relationship between the shape information and size information of the two-dimensional feature and the information of the counterpart part; determining the tolerance information by matching the two-dimensional feature according to preset industry rules, wherein the tolerance information includes standard geometrical tolerances and special geometrical tolerances; if the tolerance information is a standard geometrical tolerance, determining the size tolerance and geometrical tolerance information corresponding to the two-dimensional feature; if the tolerance information is a special geometrical tolerance, determining the size tolerance and geometrical tolerance information corresponding to the two-dimensional feature by matching the counterpart part information or a preset database.
[0012] In some possible embodiments of the first aspect, it further includes: defining template parameters for the target view, filling the template parameters into a preset template based on the target view, and rendering and outputting the two-dimensional icon annotation based on the preset template.
[0013] In a second aspect, this application provides a two-dimensional icon annotation system based on three-dimensional model feature recognition, comprising: an acquisition module for acquiring model parameter information, including the target three-dimensional model and the information of the assembly of the target three-dimensional model with the corresponding parts; a view search module for extracting three-dimensional features of the target three-dimensional model and determining the association relationship of the three-dimensional features under multiple views based on a multi-view search method, wherein the three-dimensional features include geometric features and corresponding spatial coordinates; a projection module for selecting the optimal projection direction according to the association relationship to project the three-dimensional features onto a virtual space plane and determining the shape and size information of the two-dimensional features; a determination module for determining the feature name according to the matching relationship between the shape and size information of the two-dimensional features and the information of the assembly, and for matching the two-dimensional features according to preset industry rules to determine the tolerance information; a data package module for encapsulating the view position information, feature spatial position, tolerance information and feature name corresponding to the two-dimensional features to generate an annotation data package, wherein the feature spatial position is calculated by the spatial coordinates corresponding to the geometric features; and an annotation generation module for optimizing the layout formed by the annotation data package to generate two-dimensional icon annotations.
[0014] In a third aspect, this application also provides an electronic device, including a processor, a memory, and a communication bus; the communication bus is used to connect the processor and the memory; the processor is used to execute a computer program stored in the memory to implement the two-dimensional icon annotation system based on three-dimensional model feature recognition as described above.
[0015] The beneficial effects of this application are as follows: It obtains model parameter information of the target 3D model and its associated assembly parts, accurately extracting target 3D model parameters and assembly parts information, ensuring data reliability; simultaneously, it integrates parts information into the annotation process, breaking the limitations of single model annotation; it extracts the 3D features of the target 3D model, and determines the association relationship of 3D features under multiple views based on a multi-view search method, significantly improving the accuracy of determining the 3D feature association relationship and avoiding feature omissions and association errors caused by single-view analysis; based on the association relationship, it selects the optimal projection direction to project the 3D features onto a virtual space plane, determining the shape and size information of the 2D features. Through optimization algorithms to select the optimal projection direction, combined with orthogonal projection transformation, it achieves accurate conversion of 3D features to 2D features, ensuring the accuracy of the 2D feature shape and size, and avoiding distortion problems caused by manual selection of the projection direction; based on the shape and size information of the 2D features and the associated assembly parts, it achieves accurate conversion of 3D features to 2D features, ensuring the accuracy of the 2D feature shape and size, and avoiding distortion problems caused by manual selection of the projection direction; based on the shape and size information of the 2D features and the associated assembly parts information, it achieves accurate conversion of 3D features to 2D features. The matching relationship of hand-part information determines feature naming, realizing deep binding between feature naming and assembly functions, avoiding naming ambiguity, improving the readability of 2D drawings and assembly convenience, and matching 2D features according to preset industry rules to determine tolerance information. Automatic matching of tolerance information through preset industry rules realizes the automation and standardization of tolerance annotation, avoiding deviations caused by manual standard lookup. The view position information, feature spatial position, tolerance information and feature naming corresponding to 2D features are encapsulated to generate annotation data packages. Through the structured encapsulation of various annotation data, the standardized format of annotation data packages improves data reusability and cross-platform compatibility. The layout formed by the annotation data package is optimized to generate 2D icons, solving the problems of overlapping annotations and messy layout in existing technologies. The generated 2D icon annotations conform to engineering drawing specifications, greatly improving readability and standardization. At the same time, it supports common engineering drawing formats, improving compatibility with existing drawing software.
[0016] Furthermore, this application requires no manual intervention throughout the entire process, significantly reducing labor costs and avoiding human error, thereby improving annotation efficiency and quality; it is adaptable to the annotation needs of different industries and types of 3D models, with strong compatibility and flexibility. Attached Figure Description
[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0018] In the attached diagram:
[0019] Figure 1A flowchart of a two-dimensional icon annotation method based on three-dimensional model feature recognition provided in an embodiment of this application; Figure 2 A flowchart illustrating the layout process in a two-dimensional icon annotation method based on three-dimensional model feature recognition, provided in an embodiment of this application. Figure 3 A flowchart illustrating the calculation process in a two-dimensional icon annotation method based on three-dimensional model feature recognition provided in an embodiment of this application; Figure 4 This is a structural block diagram of a two-dimensional icon annotation system based on three-dimensional model feature recognition provided in an embodiment of this application; Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0020] The following specific examples illustrate the implementation of this application. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. This application can also be implemented or applied through other different specific embodiments. Various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this application. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0021] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of this application. The drawings only show the components related to this application and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.
[0022] In the following description, numerous details are explored to provide a more thorough explanation of embodiments of the present application. However, it will be apparent to those skilled in the art that embodiments of the present application may be practiced without these specific details. In other embodiments, well-known structures and devices are shown in block diagram form rather than in detail to avoid obscuring embodiments of the present application.
[0023] In related technologies, the conversion of 3D models to 2D annotations often encounters technical problems such as low annotation efficiency, poor accuracy, insufficient standardization, and difficulty in adapting to assembly-related requirements. These problems are detailed below: First, the association information between the 3D model and assembly components is not effectively integrated into the 2D annotation process. Feature naming relies solely on a single 3D feature, which is disconnected from actual assembly functions and can easily lead to ambiguity in subsequent assembly operations. Second, the accuracy of extracted 3D features and multi-view relationships is insufficient. Single-view analysis is often used, which can easily lead to feature omissions and association errors, resulting in distorted 2D feature reconstruction. Third, the selection of projection direction lacks quantitative basis and relies heavily on manual experience, which cannot guarantee the integrity and dimensional accuracy of 2D features and increases the cost of manual correction. Fourth, the annotation layout lacks systematic optimization, which can easily lead to overlapping annotations and chaotic layout, affecting the readability and standardization of 2D drawings and failing to meet the standardization requirements of engineering drawings.
[0024] To address the aforementioned issues and achieve automated, accurate, and standardized conversion of 3D models to 2D annotations, thereby improving annotation efficiency and adaptability, please refer to [link / reference needed]. Figure 1 The above is a flowchart illustrating a two-dimensional icon annotation method based on three-dimensional model feature recognition provided in an embodiment of this application, including: Step S110: Obtain model parameter information, which includes information on the counterparts associated with the assembly of the target 3D model and the target 3D model. For example, a 3D model parameter acquisition module is built, and a data interaction interface is established with mainstream 3D modeling software such as SolidWorks, CATIA, UGNX, Creo, and Inventor. The structured data of the target 3D model is called through the data interaction interface to extract the basic parameters of the target 3D model, including the overall size of the model and material parameters. At the same time, the assembly database is retrieved to retrieve the data of the counterpart parts that are associated with the target 3D model. The counterpart part information specifically includes the 3D model identifier of the counterpart part, the size of the assembly mating surface, the assembly constraints (such as fitting constraints, coaxial constraints), the mating clearance requirements, and the assembly priority, etc. The extracted target 3D model parameters and counterpart part information are deduplicated and verified to remove invalid data, thus forming the model parameter information.
[0025] For example, image recognition technology can also be used to extract model parameter information of the target 3D model. Multi-view images of the target 3D model can be captured by an industrial camera, and geometric parameters of the model can be extracted based on edge detection and contour fitting algorithms. At the same time, assembly association information of the parts can be extracted by comparing with the assembly drawing database.
[0026] Step S120: Extract the three-dimensional features of the target three-dimensional model, and determine the relationship between the three-dimensional features under multiple views based on the multi-view search method. The three-dimensional features include geometric features and corresponding spatial position coordinates. For example, model parameter information is obtained, and feature extraction is performed on the three-dimensional features of the target 3D model from the model parameter information. A hybrid feature extraction algorithm is used. First, a surface fitting algorithm is used to extract the macroscopic geometric features of the model, including but not limited to planes, cylinders, cones, holes, slots, bosses, etc. Then, an edge detection algorithm (Canny algorithm) is used to extract the microscopic geometric features, including but not limited to chamfers, fillets, thread contours, etc. Simultaneously, the spatial coordinates of key points of each geometric feature are collected, such as the center coordinates of holes, the vertex coordinates of planes, the axis coordinates of cylinders, etc., forming a one-to-one correspondence between geometric features and spatial coordinates. Subsequently, multiple views of the target 3D model are generated, including a front view, a top view, a side view, and at least two oblique views, constructing a multi-view dataset. A multi-view collaborative matching paradigm is adopted, and feature information from different perspectives is aggregated through a cross-view attention mechanism. The projection features of each 3D feature in each view are extracted to generate feature descriptors. Based on the similarity comparison of feature descriptors, for example, through Euclidean distance comparison, combined with the mapping relationship of spatial position coordinates, the correspondence of the same 3D feature in different views is determined, a multi-view association matrix of 3D features is constructed, the projection correspondence rules of 3D features in each view are clarified, and the association relationship is determined.
[0027] For example, 3D feature extraction methods can replace SIFT and SURF algorithms. These algorithms possess scale invariance and rotation invariance, which can improve the feature extraction accuracy of complex curved surface models and irregularly shaped models, and are suitable for extraction scenarios with non-standard geometric features. Furthermore, multi-view search methods can replace deep learning-based multi-view feature association models. By training a multi-view feature matching network, it autonomously learns the association rules of 3D features under different views and generates feature descriptors. This is suitable for feature association scenarios of large-scale 3D models, and can improve association efficiency and accuracy.
[0028] Step S130: Select the optimal projection direction based on the correlation relationship to project the three-dimensional features onto the virtual space plane, and determine the shape and size information of the two-dimensional features; For example, the relationships between 3D features in multiple views are determined to form a 3D feature multi-view relationship matrix. Relationship constraints for each 3D feature are extracted, including but not limited to unoccluded features and complete projected contours. An evaluation index system for the optimal projection direction is constructed, with evaluation indices including feature projection integrity, size distortion rate, view overlap, and annotation convenience. Each index is assigned a preset weight (which can be adjusted according to industry needs). A genetic algorithm is used as the optimization algorithm, with the highest comprehensive score of the evaluation indices as the objective function. The projection direction is iteratively optimized. During the iteration process, the projection effect corresponding to the projection direction is verified in real time, and projection directions that do not meet the constraints are eliminated, such as directions that cause occlusion of key features. The optimal projection direction is then determined. Based on the orthogonal projection transformation matrix, 3D features and their spatial coordinates are projected onto a preset virtual space plane, i.e., the virtual plane is perpendicular to the projection direction, thus completing the transformation from 3D features to 2D features. Through contour extraction algorithms, the contours of the projected 2D features are extracted to determine the shape information of the 2D features, including but not limited to circles, rectangles, polygons, and irregular contours. Based on the relationship between the spatial coordinates of the 3D features and the projection transformation, the actual size information of the 2D features is calculated using coordinate conversion formulas, including but not limited to length, width, diameter, and angle. The calculated size information is then calibrated to ensure that the calibration accuracy matches the modeling accuracy of the 3D model, forming a set of corresponding shape information and size information for the 2D features.
[0029] For example, the algorithm for finding the optimal projection direction can replace the greedy algorithm. This algorithm has low computational cost and fast processing speed, and is suitable for selecting the projection direction of simple 3D models (with a small number of geometric features). In addition, the projection method can replace perspective projection. Perspective projection simulates the way the human eye observes an object. The projection lines converge at a single viewpoint, which can enhance the three-dimensionality of 2D features and is suitable for scenarios that require a direct display of the spatial relationships of 3D features.
[0030] Step S140: Determine the feature name based on the matching relationship between the shape information and size information of the two-dimensional feature and the information of the hand part, and determine the tolerance information by matching the two-dimensional feature according to the preset industry rules; For example, a feature naming rule library is constructed, which associates the shape, size, and assembly function of two-dimensional features and stores standard naming formats for various features. For instance, a φ10 through hole and a 20×30 rectangular mating surface are both bound to the assembly requirements of the mating parts. The determined shape and size information of the two-dimensional features are compared and matched with the acquired mating part information to identify the assembly function corresponding to the two-dimensional features, such as the hole that mates with the mating part or the mating plane. Based on the matching results, the corresponding naming format in the feature naming rule library is retrieved, and combined with the specific dimensions of the two-dimensional features, a standardized feature name is generated. For example, when the mating part is a shaft-type part, the corresponding naming format is used. The mating hole is named "φ20 mating hole"; simultaneously, an industry rule database is built to store tolerance standards for different industries (including national standards such as GB / T42124.1-2022 and international standards such as ISO1101). This tolerance standard covers the tolerance grades, tolerance zones, and annotation specifications for various two-dimensional features; based on the application industry of the target three-dimensional model, the corresponding industry's tolerance rules are retrieved, and the shape and size information of the two-dimensional feature are fuzzily matched with the tolerance rules to determine the tolerance information of the two-dimensional feature, including dimensional tolerances, such as ±0.02mm; and geometric tolerances, such as flatness 0.05mm and coaxiality φ0.03mm.
[0031] Step S150: Encapsulate the view position information, feature spatial position, tolerance information and feature naming corresponding to the two-dimensional feature to generate a label data package. The feature spatial position is calculated by the spatial position coordinates corresponding to the geometric feature. For example, the view position information of the two-dimensional feature in the virtual space plane includes, but is not limited to, the projection coordinates of the two-dimensional feature, the view affiliation (such as front view, top view), and the view scaling ratio; by obtaining the spatial position coordinates of the three-dimensional feature, combined with the inverse operation formula of projection transformation, the feature spatial position corresponding to the two-dimensional feature is calculated, that is, the spatial position of the three-dimensional feature in the original three-dimensional model; the feature naming and tolerance information are obtained, and the view position information, feature spatial position, tolerance information, and feature naming are structurally encapsulated to form a standardized annotation data package.
[0032] Optionally, each type of data is assigned a unique data identifier and field name according to a preset data format to clarify the data relationship; a data encryption algorithm is used to encrypt the structured data to be encapsulated to avoid the risk of data leakage; the encrypted data is then encapsulated to generate a standardized labeled data package.
[0033] Optionally, the annotation data packet includes a data header and a data body. The data header includes, but is not limited to, recording the data packet version, generation time, and model identifier. The data body contains various types of annotation data. At the same time, a data packet checksum is generated for subsequent data packet integrity verification.
[0034] Step S160: Optimize the layout formed by the labeled data package to generate two-dimensional icon annotations.
[0035] For example, various annotation data in the annotation data package are parsed to extract the view position information, feature spatial position, tolerance information, and feature name of the two-dimensional features. An initial annotation layout is constructed based on this data. Layout optimization constraints are set, including but not limited to non-overlapping annotations, annotation positions corresponding to two-dimensional features (e.g., dimension annotations close to the corresponding feature contours), tolerance annotations closely following dimension annotations, a compact layout that conforms to engineering drawing specifications, and clearly legible annotation text. The initial annotation layout is optimized using a simulated annealing algorithm, iteratively adjusting the position, angle, and text size of various annotations, verifying in real time whether the layout meets the constraints, and calculating the layout optimization score. When the score reaches a preset threshold or the number of iterations reaches the upper limit, optimization stops, resulting in the optimal annotation layout. Based on the optimal annotation layout, a two-dimensional drawing engine is called to draw two-dimensional feature contours, annotation lines, dimension numbers, tolerance symbols, and feature names, generating standardized two-dimensional icon annotations. The two-dimensional icon annotations support common engineering drawing formats such as DXF and DWG.
[0036] For example, the layout optimization algorithm can replace the particle swarm optimization algorithm, which has a fast convergence speed and high computational efficiency, and is suitable for complex two-dimensional icon annotation layout optimization with a large number of annotation elements.
[0037] Through the above methods, the 2D icon annotation method obtains model parameter information of the target 3D model and its associated assembly parts, accurately extracting the target 3D model parameters and assembly parts information, ensuring data reliability. Simultaneously, integrating parts information into the annotation process breaks the limitations of single-model annotation. The 3D features of the target 3D model are extracted, and the association relationships of these features under multiple views are determined based on a multi-view search method, significantly improving the accuracy of determining 3D feature association relationships and avoiding feature omissions and association errors caused by single-view analysis. Based on the association relationships, the optimal projection direction is selected to project the 3D features onto a virtual space plane, determining the shape and size information of the 2D features. An optimization algorithm is used to select the optimal projection direction, combined with orthogonal projection transformation, achieving accurate conversion of 3D features to 2D features, ensuring the accuracy of the 2D feature shape and size, and avoiding distortion problems caused by manual selection of the projection direction. Based on the shape and size information of the 2D features… The matching relationship between the feature name and the component information determines the feature naming, achieving deep binding between feature naming and assembly functions. This avoids naming ambiguity, improves the readability of 2D drawings and assembly convenience, and matches 2D features according to preset industry rules to determine tolerance information. Automatic matching of tolerance information through preset industry rules automates and standardizes tolerance annotation, avoiding deviations caused by manual standard lookup. The view position information, feature spatial position, tolerance information, and feature name corresponding to the 2D feature are encapsulated to generate annotation data packages. Through the structured encapsulation of various annotation data, the standardized format of the annotation data packages improves data reusability and cross-platform compatibility. The layout formed by the annotation data packages is optimized to generate 2D icons, solving the problems of overlapping annotations and chaotic layout in existing technologies. The generated 2D icon annotations conform to engineering drawing specifications, significantly improving readability and standardization. At the same time, it supports common engineering drawing formats, improving compatibility with existing drawing software.
[0038] Furthermore, this application requires no manual intervention throughout the entire process, significantly reducing labor costs and avoiding human error, thereby improving annotation efficiency and quality; it is adaptable to the annotation needs of different industries and types of 3D models, with strong compatibility and flexibility.
[0039] In some embodiments, optimizing the layout formed by the labeled data packet to generate two-dimensional icon annotations includes: The labeled data packets are classified according to the views to obtain classification feature information. Each view is at least one of the six views. The layout formed by the classification feature information is optimized to determine the layout result. The layout optimization includes minimizing the label overlap rate, minimizing the number of label line intersections, and maximizing the label uniformity and readability score. Split and / or merge the feature distributions under the same view in the layout results to determine the two-dimensional icon annotations.
[0040] For example, the annotation data package is parsed to extract the view attribution identifier corresponding to each annotation feature. The view attribution identifier is bound to the view location information when the annotation data package is generated, and is used to characterize the specific view to which the annotation feature belongs. The division criteria and identification rules of the six views are clarified. The six views specifically include the front view, top view, left view, right view, bottom view, and rear view. A unique view code is assigned to each view, such as front view code 01, top view code 02, etc. Based on the mapping relationship between the view attribution identifier and the view code, all annotation feature information in the annotation data package is classified. Annotation feature information belonging to the same view code is grouped into one category to form multiple sets of view classification sets. Each set of view classification sets corresponds to one view in the six views. The annotation feature information in each set of view classification sets is structured and organized to extract classification feature information, including but not limited to the feature names, tolerance information, view location coordinates, annotation line parameters, feature association relationships, and feature priorities (such as key assembly features having higher priority than ordinary features) of all annotation features under that view.
[0041] For example, an initial layout is constructed for each set of view classifications. The initial layout is based on the view position coordinates in the classification feature information, and the label features are arranged in order of feature priority. A multi-objective layout optimization function is constructed, and the optimization objectives include minimizing the label overlap rate, minimizing the number of label line intersections, maximizing the label uniformity, and maximizing the readability score. A quantitative calculation method is set for each optimization objective. For example, the label overlap rate = number of overlapping labels / total number of labels × 100%, the number of label line intersections = number of intersection label line pairs, the label uniformity = reciprocal of the standard deviation of the label density in the view area, and the readability score is based on a comprehensive evaluation of label font size, label spacing, and label line length. The process involves: calculating and assigning preset weights to each optimization objective (the weights can be adjusted according to industry needs and view type, such as readability score having a higher weight than other objectives); converting the multi-objective optimization function into a single-objective comprehensive optimization function; using an improved genetic algorithm as the optimization algorithm, with the optimal value of the comprehensive optimization function as the objective, iteratively optimizing the initial layout; during the iteration process, calculating the quantitative value of each optimization objective in real time, verifying whether the layout conforms to engineering drawing specifications, and eliminating layout schemes that do not meet the constraints; stopping optimization when the number of iterations reaches a preset upper limit or the comprehensive score of the optimization objective reaches a preset threshold, and outputting the layout results corresponding to each group of view classification sets to form a multi-view layout result set.
[0042] For example, for the layout result corresponding to each view, the distribution density, feature correlation, and annotation spacing of the annotation features under that view are calculated, dense and sparse feature distribution areas are identified, and the correlation between features is determined. For example, multiple annotation features of the same assembly mating surface are related features. Splitting and merging rules are set. The splitting rule is that when the distribution density of annotation features in a certain area exceeds a preset threshold (e.g., 5 annotation features per square centimeter) and the feature correlation is higher than the preset threshold, the annotation features in that area are split into multiple subgroups, and the positions of the subgroups are adjusted to ensure that the annotation density of each subgroup after splitting meets the preset requirements. The merging rule is that when there are multiple annotation features with correlation higher than the preset threshold under the same view and the annotation spacing is too large, such related features are merged into a single annotation set to optimize the annotation line arrangement and reduce redundant annotations. The feature distribution in the layout result is split and / or merged in sequence, the optimized layout results of all views are integrated, and a 2D drawing engine is called to draw the 2D feature outlines, annotation lines, dimension numbers, tolerance symbols, and feature names of each view, generating standardized 2D icon annotations.
[0043] By employing the above methods, standardized classification feature information is obtained, effectively avoiding mutual interference between annotation features from different views. A multi-objective layout optimization strategy is used to achieve coordinated optimization of annotation overlap rate, annotation line intersection count, annotation uniformity, and readability, allowing for flexible selection of optimization target combinations based on requirements. The application of an improved genetic algorithm avoids local optima and reduces the optimized annotation overlap rate. Through refined splitting and merging of feature distributions under the same view, problems such as uneven feature distribution, redundant annotations, and key feature occlusion are effectively solved, making the annotation feature distribution under the same view more uniform and reasonable.
[0044] In some embodiments, the feature distributions under different views in the layout result are split and / or merged to determine the two-dimensional icon annotations, including: Determine the degree of feature distribution in different views of the layout result; If the feature distribution includes dense areas, then the features of the dense areas in the same view will be split to generate a new view; If the feature distribution includes sparse regions, the features of the sparse regions in the same view are merged to generate a new view; If a new view is detected to have at least one of the following conditions: a local magnified view or a section view, then these conditions are evenly distributed in the new view to generate two-dimensional icon annotations.
[0045] For example, the degree of feature distribution can be judged based on the principle of statistical quantification. By constructing a multi-dimensional quantitative index system, the qualitative description of the "dense" and "sparse" distribution of features can be converted into calculable quantitative indicators, thereby achieving an accurate judgment of the degree of distribution. For example, the feature density per unit area is used to intuitively characterize the density of features within a view. The higher the density, the denser the distribution. The standard deviation of feature distribution is based on the statistical analysis of each feature coordinate. The larger the standard deviation, the more uneven the feature distribution is, and the more likely dense or sparse areas are to appear. In this way, the degree of feature distribution can be accurately determined.
[0046] For example, based on the number and area of features in a dense region, the dense region is divided into multiple sub-regions. During the division, it is ensured that the feature density per unit area of each sub-region is lower than a preset threshold, and features of the same association group are not split into different sub-regions. Alternatively, through a region segmentation algorithm or K-means clustering algorithm, based on feature coordinates and association degree, the features of the dense region are divided to generate a set of sub-region features, forming a new view. The features of all sparse regions in the same view are integrated into a feature set. During the merging, it is ensured that the distance between adjacent features does not exceed a preset distance threshold (e.g., 5mm), and the merged feature set has no overlapping labels. Features with low association degree can be retained separately in the original view. Through a feature integration algorithm and based on feature coordinates and association degree, the features of sparse regions are merged, redundant label lines are removed, and the feature arrangement is optimized to generate a merged feature set, forming a new view.
[0047] For example, the system detects whether a new view has at least one of the following conditions: a magnified view or a sectioning view. If the magnification ratio of the new view is greater than 1:1, it is determined that a magnified view exists. If the new view contains sectioning contours, sectioning symbols, and sectioning annotations, it is determined that a sectioning view exists. New views with the above-mentioned view conditions are selected. Based on the size and number of views of the new view, a grid layout method is used, such as 1 row 2 columns or 2 rows 2 columns, to evenly distribute the magnified view and the sectioning view in a preset area (such as the right side or the bottom) of the new view. When arranging, it is ensured that the spacing between each view is not less than the preset spacing (such as 3mm), the view markings are clearly identifiable, and they correspond one-to-one with the original feature annotations. After the layout is completed, a two-dimensional drawing engine is called to integrate the layout results of all new views and original views, draw two-dimensional feature contours, annotation lines, dimension numbers, tolerance symbols, view markings, and related lines, and generate standardized two-dimensional icon annotations.
[0048] By using the above methods, the problems of crowded annotations and feature occlusion in dense areas of the original view are completely solved by splitting the features of dense areas and generating new views. By merging the features of sparse areas and generating new views, the redundant blank areas of the original view are effectively reduced, and the view utilization rate is improved. The fully automated processing of accurate judgment of feature distribution, processing of dense / sparse areas to generate new views, and standardized arrangement of special perspectives requires no manual intervention throughout the entire process, which greatly reduces the cost of manual operation and human error. It effectively solves the problems of inaccurate distribution judgment, non-standard new view generation, and chaotic arrangement of special perspectives in existing solutions.
[0049] In some embodiments, optimizing the layout formed by the labeled data packet to generate two-dimensional icon annotations includes: Based on the model parameter information in the labeled data package, the layout is generated. Heuristic algorithms are used to optimize the layout of the text to make the features flat and fully cover the layout. Based on the optimized layout, the annotation data package is rendered into a two-dimensional map to generate two-dimensional icon annotations. The layout optimization includes minimizing the annotation overlap rate, minimizing the number of annotation line intersections, and maximizing the annotation uniformity and readability score.
[0050] For example, layout constraints are constructed based on model parameter information. These constraints include: feature arrangement must be adapted to the overall size of the model, and the layout boundary must not exceed the preset engineering drawing size range; high-priority features are preferentially arranged in the central area of the layout to ensure visibility; related features are arranged nearby to facilitate the representation of assembly relationships; feature arrangement must ensure initial flatness, with no tilt or distortion in feature contours; based on the above constraints, a coordinate mapping algorithm is used to map the spatial coordinates of the features of the 3D model to the 2D coordinates of the layout, and each labeled feature is arranged sequentially according to feature priority, while reserving reserved areas for label lines and tolerance labels to avoid conflicts between subsequent labels and features; after the arrangement is completed, an initial layout is generated, and the model parameter information of the initial layout is fine-tuned to generate the final layout.
[0051] For example, an improved simulated annealing algorithm is selected as the core heuristic algorithm. The algorithm parameters are initialized, including the initial temperature, cooling coefficient, and upper limit of the number of iterations (the initial temperature is set to 1000, the cooling coefficient is set to 0.95, and the upper limit of the number of iterations is set to 1000, which can be adjusted according to the typesetting complexity). A multi-objective optimization function is constructed, and the annotation overlap rate, the number of annotation line intersections, the annotation uniformity, the readability score, the feature flatness error, and the feature coverage are used as optimization variables, and each variable is assigned a preset weight. For example, readability score has the highest weight, followed by feature coverage and feature flatness error. The weights of annotation overlap rate, annotation line intersection number, and annotation uniformity can be adjusted according to industry needs. The multi-objective optimization function is converted into a single-objective comprehensive optimization function, with the optimal value of the comprehensive optimization function as the optimization target. A heuristic algorithm is launched to iteratively optimize the layout. In each iteration, the feature arrangement position, annotation line direction, and reserved area size are adjusted, and the values of each optimization variable are calculated in real time to verify whether the features are flat and completely covered. That is, the feature coverage must reach 100%, and the flatness error must not exceed 0.1mm. At the same time, the layout is checked to see if it conforms to engineering drawing specifications. When the number of iterations reaches the upper limit or the comprehensive optimization function score reaches the preset threshold, the optimization stops, and the optimized layout is output. Based on the optimized layout, the annotation data such as annotation features, annotation lines, tolerance information, and feature naming are aligned and rendered one by one onto a two-dimensional virtual plane to ensure that the rendered features are completely adapted to the layout and presented flatly, generating standardized two-dimensional icon annotations.
[0052] By using the above methods, based on the accurate layout of model parameter information in the labeled data package, the generated layout is highly adapted to the 3D model parameters, effectively avoiding the problem of the layout being out of touch with the model requirements; a heuristic algorithm is used to achieve multi-objective layout optimization, while ensuring feature flatness and complete coverage, and reducing the overlap rate of the optimized annotations.
[0053] In some embodiments, the optimal projection direction is selected based on the association relationship to project the three-dimensional features onto a virtual space plane, and the shape and size information of the two-dimensional features are determined, including: Obtain the set of surface normals of the target 3D model, and determine the set of visible areas under each view based on the set of surface normals; The viewpoint redundancy is calculated for each view, and the optimal projection direction is determined based on the view corresponding to the minimum viewpoint redundancy and the largest set of visible areas. Based on the optimal projection direction, the 3D features are projected onto a virtual space plane to determine the plane equation; Shape and size fitting are performed on the plane equations respectively to determine the shape and size information of the two-dimensional features.
[0054] For example, a surface normal extraction algorithm is used to traverse and calculate the discrete points on the surface of the target 3D model, extracting the surface normal vector for each discrete point. The normal vector includes direction parameters (x, y, and z axis components) and a magnitude parameter, used to characterize the orientation and tilt of the model surface. The extracted surface normal vectors are denoised and normalized, and abnormal normal vectors (such as vectors with magnitudes exceeding a preset range or whose directions deviate too much from the normals of adjacent points) are removed. The preprocessed normal vectors are then categorized and aggregated according to 3D features to form a model surface normal set, with each 3D feature corresponding to a sub-normal set. A set of view projection directions is constructed. For each view projection direction, based on the model surface normal set, a visibility judgment algorithm is used to calculate the visibility of discrete points on the model surface under that projection direction. The area of the region formed by all visible discrete points under each view projection direction is counted to form visible area data for each view. The visible area data of all views are categorized and organized according to view type to generate a set of visible areas for each view.
[0055] For example, the view redundancy is calculated as follows: (Sum of visible area overlap between the current view and all other views) / Visible area of the current view × 100%, where the visible area overlap is the intersection area of the visible regions of the current view and another view. Following this formula, the view redundancy is calculated for each view sequentially. During the statistical process, the coordinate range of the visible region of each view is precisely extracted. Through region intersection operations, the visible area overlap of any two views is calculated, and the sum of the overlap amounts for each view is obtained. This sum is then substituted into the formula to obtain the view redundancy value. All views are sorted from smallest to largest view redundancy, and the set of views with the smallest view redundancy (multiple views may have the smallest redundancy value) is selected. Simultaneously, the visible areas of each view are sorted from largest to smallest, and the set of views with the largest visible areas is selected. The intersection view of the two sets is taken. If the intersection view is unique, the projection direction corresponding to the unique view is the optimal projection direction. If there are multiple intersection views, a weighted comprehensive score is calculated for each intersection view, and the view with the highest comprehensive score is selected as the optimal projection direction.
[0056] For example, based on the principle of orthogonal projection transformation, a projection transformation matrix corresponding to the optimal projection direction is constructed. The spatial coordinates of the three-dimensional features are substituted into the projection transformation matrix to calculate the two-dimensional projection coordinates of each three-dimensional feature on the virtual space plane. Simultaneously, the normal vectors of the model surface corresponding to the three-dimensional features are extracted, and combined with the projection transformation matrix, the normal vectors are converted into two-dimensional normal components in the virtual space plane. The two-dimensional projection coordinates of each three-dimensional feature are extracted, and combined with the normal constraints of the plane equation, a contour fitting algorithm is used to fit the projection coordinates to generate the contour curves of the two-dimensional features. Through a contour recognition algorithm, the geometric shape of the contour curves is analyzed to determine the shape information of the two-dimensional features, and shape feature parameters are extracted, including but not limited to the diameter of a circle, the aspect ratio of a rectangle, and the number of sides of a polygon. Based on the size information of the three-dimensional features, the projection transformation matrix, and the plane equation, the actual size of the three-dimensional features is converted into the projected size of the two-dimensional features through a size conversion formula; or a size fitting algorithm is used, combined with the shape feature parameters, to fit and optimize the projected size to obtain the size information of the two-dimensional features.
[0057] Through the above methods, the accurate extraction of the surface normal set of the target 3D model and the standardized statistics of the visible area set of each view are achieved; the minimum viewpoint redundancy and the maximum visible area are selected through collaborative screening and combined with a comprehensive scoring mechanism; the 3D features are accurately projected onto the virtual space plane based on the optimal projection direction, and the projection coordinate deviation is controlled within the preset accuracy; at the same time, the accuracy of the optimal projection direction is significantly improved based on the plane equation fitting.
[0058] In some embodiments, the three-dimensional features of the target three-dimensional model are extracted, and the correlation between the three-dimensional features under multiple views is determined based on a multi-view search method, including: Extract the geometric features of the target 3D model, extract the spatial coordinates of the geometric features based on deep learning feature semanticization, and determine the geometric features to be labeled in the target 3D model and their corresponding spatial coordinates; Obtain the view that best reflects the features of the target 3D model as the main view, and obtain the main view information from the perspective of the main view. Based on the main view information, a multi-view search method is used to process 3D features to obtain local magnification information and section view information; The same 3D feature is associated and bound together with the main view information, local magnification information and section view information to determine the association relationship.
[0059] For example, geometric features of the target 3D model are extracted using traditional algorithm-based geometric calculation methods, and spatial coordinates of the geometric features are extracted using deep learning-based feature semanticization. This determines the geometric features to be labeled in the target 3D model and their corresponding spatial coordinates. The number of features corresponding to each of the six views is counted, and the view with the most features is selected as the main view. Information about the main view is then obtained from the perspective of the main view.
[0060] For example, a deep learning-based multi-view search method is adopted. The main view information is input into a preset multi-view search model. Combining the projected contours, semantic labels, and spatial coordinates of the geometric features to be labeled in the main view, a cross-view search is performed on the 3D features to locate the feature regions that need to be locally magnified and sectioned. For the located local feature regions, a local magnification ratio is set, and the local feature regions are magnified based on the main view perspective. The local magnification information is extracted, including the projection parameters of the magnified view, the feature contours of the magnified area, size details, semantic labels, association identifiers with the main view, and magnification ratio. For the located feature regions that need to be sectioned, the sectioning plane is determined by combining the main view information and the spatial coordinates of the 3D features. A sectioning perspective is generated, and the sectioning perspective information is extracted. The sectioning perspective information includes the sectioning plane parameters, the projected contours of the sectioning perspective, the internal structural details of the features, the sectioning symbol, and the association binding with the main view and corresponding features to generate an association identifier.
[0061] The multi-view search method based on the main view benchmark, as described above, accurately locates feature regions and can precisely locate feature regions that need to be magnified and sectioned for display. This avoids positioning errors and realizes fully automated processing of 3D model feature annotation from geometric feature extraction, main view filtering, multi-view information extraction to feature and view information association and binding. The entire process requires no manual intervention and effectively solves the problems of poor accuracy, insufficient correlation, and incomplete feature display.
[0062] In some embodiments, feature naming is determined based on the matching relationship between the shape information and size information of the two-dimensional feature and the information of the counterpart, and tolerance information is determined by matching the two-dimensional feature according to preset industry rules, including: The feature name corresponding to the two-dimensional feature is determined based on the matching relationship between the shape information, size information and the information of the two-dimensional feature and the counterpart; Two-dimensional features are matched according to preset industry rules to determine tolerance information, which includes standard geometric tolerances and special geometric tolerances. If the tolerance information is a standard geometric tolerance, determine the dimensional tolerance and geometric tolerance information corresponding to the two-dimensional feature; If the tolerance information is a special geometric tolerance, the dimensional tolerance and geometric tolerance information corresponding to the two-dimensional feature are determined by matching the part information or a preset database.
[0063] For example, an association matching model for two-dimensional feature information and feature names is established. The association matching model is configured with a preset feature naming rule library, which stores standardized feature names corresponding to different shapes, sizes, and pair-part adaptation relationships. The weights and joint matching logic of shape information, size information, and pair-part information are clearly defined. The acquired two-dimensional feature shape information, size information, and pair-part information are input into the association matching model, the feature values of each information are extracted, and they are matched one by one with the standardized naming conditions in the preset feature naming rule library to calculate the matching degree. The standardized name with the highest matching degree is selected as the feature name of the two-dimensional feature.
[0064] For example, the naming of two-dimensional features and their corresponding basic information (shape, size, and information about the counterpart) are extracted and precisely matched with the tolerance judgment rules in the preset industry rule library. The matching is performed on the type, size range, assembly accuracy requirements, and adaptation requirements of the two-dimensional features and the counterpart. Based on the matching results, the type of tolerance information corresponding to the two-dimensional features is determined. If the application scenario, size range, and assembly requirements of the two-dimensional features all meet the applicable conditions of standard geometric tolerances in the industry rule library and there are no special assembly restrictions, then the tolerance information is determined to be a standard geometric tolerance. If the application scenario of the two-dimensional features is special, the size exceeds the normal range, or there are special accuracy requirements for the adaptation of the counterpart, and it does not meet the applicable conditions of standard geometric tolerances, then the tolerance information is determined to be a special geometric tolerance.
[0065] For example, basic information of two-dimensional features is extracted, and standard tolerance records that match perfectly are selected from the standard tolerance database based on this basic information. The correspondence between feature type, size range and tolerance grade is matched. According to the selected standard tolerance records, the dimensional tolerances (including upper deviation, lower deviation and tolerance band width) and geometric tolerance information (including geometric tolerance items, tolerance values and datum elements) corresponding to the two-dimensional features are determined.
[0066] By combining the shape and size information of two-dimensional features with the matching relationship of the parts information to determine feature naming, the problem of non-standard and ambiguous two-dimensional feature naming in the prior art is effectively solved. By matching two-dimensional features to determine tolerance information according to preset industry rules, the technical pain points of ambiguous, non-standard and large error in tolerance type determination in the prior art are effectively solved. For standard or special geometric tolerances, the size tolerance and geometric tolerance information are determined by matching with a preset standard tolerance database, which effectively solves the technical pain points of low efficiency, insufficient accuracy and poor adaptability in determining standard or special geometric tolerances in the prior art.
[0067] In some embodiments, the method further includes: defining template parameters for the target view, filling the template parameters into a preset template based on the target view, and rendering and outputting the two-dimensional icon annotations based on the preset template.
[0068] For example, a preset template library is invoked. This library stores standardized templates corresponding to different view types and application scenarios. Each preset template includes clearly defined parameters for the area to be filled, filling rules, and area identifiers. The structure of the preset template is adapted to the annotation requirements of the target view, covering all the core areas required for 2D icon annotation. Based on the view adaptation parameters in the defined template parameter set, a template matching algorithm is used to select the preset template that best matches the target view from the preset template library, ensuring that the size, type, and annotation framework of the preset template completely match the target view. Furthermore, according to the area identifiers and filling rules of the preset template, a one-to-one correspondence is established between the template parameters and the areas to be filled in the preset template. Various parameters, such as annotation precision parameters and annotation style parameters, from the template parameter set are accurately filled into the corresponding areas to be filled in the preset template. The graphics rendering engine is then invoked to perform the 2D icon annotation rendering operations step by step, generating standardized 2D icon annotation results.
[0069] By employing the above methods, template matching algorithms and parameter mapping mechanisms, omissions, errors, and mismatches that occur during manual filling are avoided, significantly improving the efficiency and accuracy of parameter filling. At the same time, the design of the preset template library and the precise matching of templates with the target view ensure the standardization of the filled templates.
[0070] In some embodiments, as the entry point of a 2D icon annotation system based on 3D model feature recognition, it receives corresponding parameter inputs, performs multiple calculations, and obtains all features and annotation information that need to be marked in the 2D engineering drawing. See details. Figure 3 The following is a flowchart illustrating the calculation process in a two-dimensional icon annotation method based on three-dimensional model feature recognition, provided in an embodiment of this application: Step 1: Input of parameterized information Open the model information in any 3D software, input the model parameter information of all 3D models corresponding to the DBOM (Design Bill of Materials), the corresponding path location, and the model information for which 2D engineering drawings need to be made. After saving this information, the corresponding 2D engineering drawings will be automatically generated.
[0071] Step 2: Automated Handpiece Detection Algorithm The system extracts the corresponding model path location from the input DBOM information and the model information of the 2D engineering drawing; it converts the corresponding target 3D model into a unified data format within the system through the digital-to-analog conversion function; and it automatically detects the target 3D model and its surrounding model information to obtain information on all the surrounding components of the target 3D model.
[0072] Step 3: Fusion algorithm identifies 3D features For the target 3D model, computational geometry based on traditional algorithms and feature semanticization based on deep learning are used to extract features respectively. All 3D features that need to be labeled in the current target model are fused and calculated to obtain the corresponding position information, automatically identify the annotation features of 2D drawings, and build the corresponding 3D model database.
[0073] Step 4: Multi-view search algorithm Select the viewpoint that best represents the target 3D model as the main viewpoint. After obtaining the main viewpoint information, use multi-viewpoint information judgment to obtain local magnification information and section viewpoint information; record the correlation between the features of the target 3D model under all views.
[0074] Step 5: Viewpoint Projection and Shape Fitting The three-dimensional features of the target three-dimensional model are calculated. Based on the optimal projection direction of the three-dimensional model features, a virtual space plane is created, and the three-dimensional model features are projected onto the virtual space plane. The corresponding shape fitting algorithm and size fitting algorithm are used to identify the shape and size information of all two-dimensional features.
[0075] Step Six: Determine tolerance information based on part information Based on the component information corresponding to the two-dimensional features, the system matches different industry and enterprise rules with a pre-set industrial rule database to generate dimensional tolerance and geometric tolerance information corresponding to the features. For special geometric tolerances, the system continuously improves the database information to meet the special behavioral tolerance requirements of all industries and enterprises.
[0076] Step 7: Output structured data Organize structured data, meaning that individual data contents include: the current two-dimensional feature's corresponding viewpoint position information, the feature's corresponding spatial position coordinate information, dimensional tolerance information, geometric tolerance information, and feature naming information.
[0077] In some embodiments, please refer to Figure 2 This is a flowchart of a layout process in a two-dimensional icon annotation method based on three-dimensional model feature recognition provided in an embodiment of this application. The method receives the obtained structured data, processes it through a spatial projection and layout optimization algorithm, obtains sequentially arranged two-dimensional engineering views and their annotations, and outputs a two-dimensional engineering drawing.
[0078] 1) Data Acquisition Obtain all data information from the structured data, classify it according to perspective information, and generate classification feature information to facilitate layout optimization.
[0079] 2) Heuristic layout optimization The classification feature information is obtained, and an improved heuristic algorithm is used to perform multi-objective layout optimization on the layout results. The layout optimization includes minimizing the label overlap rate, minimizing the number of label line intersections, maximizing the label uniformity and readability score, so that the features are flattened and completely covered on multiple two-dimensional engineering drawings.
[0080] 3) Merging and splitting data information The layout information is merged and split. Based on the feature distribution under different viewpoints, the feature-dense areas are split and a new view is generated for annotation. Areas with fewer viewpoint features are merged to optimize the layout space. Additional layouts for local magnified views and section views are evenly distributed in the current view.
[0081] 4) Custom parameter output By customizing template parameters and selecting parametric information, the corresponding template is matched based on the target view to generate two-dimensional engineering drawings with annotation information. The corresponding drawing format can be opened, modified, and viewed in 3D modeling software and 2D CAD software.
[0082] In some embodiments, by employing a two-dimensional icon annotation method based on three-dimensional model feature recognition, this application achieves the following technical effects: First, it achieves data normalization processing for mainstream 3D design software, and can convert different input data into self-developed data structure types, and perform corresponding structure optimization and data compression. At runtime, it can run independently as a plugin for 3D design software without relying on other additional platforms, which significantly reduces operating costs and has the advantages of strong multi-platform compatibility and low operating costs.
[0083] Secondly, on the one hand, by fusing traditional algorithms with deep learning algorithms, and leveraging the speed and stability of geometric algorithms to identify standard geometric features, the recognition accuracy and stability are ensured, significantly improving recognition speed. On the other hand, non-standardized feature regions are divided using geometric algorithms, and deep learning models are applied to identify these regions. The provision of corresponding Regions of Interest (ROIs) significantly improves the recognition accuracy and precision of the deep learning model. The fusion of these two methods automatically and intelligently identifies features in 3D models, and the 3D feature recognition fusion algorithm significantly improves recognition accuracy and effectiveness.
[0084] Third, based on the self-developed shape and size fitting algorithm, standardized feature shapes, including circles, squares, rectangles, regular polygons, ellipses, and bosses, are fitted and calculated. This results in the assignment of functional attributes to dimension annotations. The dimension fitting accuracy is high, and it does not rely on the structure tree information from the modeling process, enabling completely independent fitting and shape judgment. Furthermore, the automatic identification algorithm for handpiece information allows for diversified customization of tolerance attributes during dimension annotation, moving beyond reliance on fixed-format tolerance generation. This establishes an independent tolerance annotation system that meets the customized needs of industries and enterprises. The shape fitting algorithm and the automated identification algorithm assign annotation attributes to 3D features.
[0085] Fourth, a self-developed multi-view generation algorithm determines the main viewpoint, and then an adaptive viewpoint determines the local magnification and sectioning viewpoints. A heuristic layout optimization algorithm automatically generates 2D annotated drawings with non-overlapping areas, clear features, and rich feature attribute values. The generated format can be directly opened within 3D modeling software for easy secondary editing. Dynamic model association automatically aligns the modified 3D model information to the generated 2D drawings, enabling one-step 3D-to-2D conversion without requiring multi-platform operation.
[0086] Please refer to Figure 4 This application also provides a structural block diagram of a two-dimensional icon annotation system based on three-dimensional model feature recognition, comprising: The acquisition module 410 is used to acquire model parameter information, which includes the information of the counterpart parts associated with the assembly of the target 3D model; The view search module 420 is used to extract the three-dimensional features of the target three-dimensional model and determine the relationship between the three-dimensional features under multiple views based on the multi-view search method. The three-dimensional features include geometric features and corresponding spatial position coordinates. The projection module 430 is used to select the optimal projection direction based on the correlation relationship to project the three-dimensional features onto the virtual space plane and determine the shape and size information of the two-dimensional features. The determination module 440 is used to determine the feature name based on the matching relationship between the shape information and size information of the two-dimensional feature and the information of the hand part, and to match the two-dimensional feature according to the preset industry rules to determine the tolerance information; The data package module 4650 is used to encapsulate the view position information, feature spatial position, tolerance information and feature naming corresponding to the two-dimensional feature to generate a label data package. The feature spatial position is calculated by the spatial position coordinates corresponding to the geometric feature. The annotation generation module 660 is used to optimize the layout formed by the annotation data package and generate two-dimensional icon annotations.
[0087] Through the above methods, the 2D icon annotation system accurately extracts the target 3D model parameters and assembly component information based on the model parameter information of the target 3D model and its associated assembly components, ensuring data reliability. Simultaneously, integrating component information into the annotation process breaks the limitations of single-model annotation. It extracts the 3D features of the target 3D model and determines the relationships between these features in multiple views using a multi-view search method, significantly improving the accuracy of determining these relationships and avoiding feature omissions and association errors caused by single-view analysis. Based on the relationships, it selects the optimal projection direction to project the 3D features onto a virtual space plane, determining the shape and size information of the 2D features. By optimizing the algorithm to select the optimal projection direction and combining it with orthogonal projection transformation, it achieves accurate conversion of 3D features to 2D features, ensuring the accuracy of the 2D feature shape and size and avoiding distortion caused by manual selection of the projection direction. Based on the shape and size information of the 2D features… The matching relationship between information and component information determines feature naming, achieving deep binding between feature naming and assembly functions. This avoids naming ambiguity, improves the readability of 2D drawings and assembly convenience, and matches 2D features according to preset industry rules to determine tolerance information. Automatic matching of tolerance information through preset industry rules automates and standardizes tolerance annotation, avoiding deviations caused by manual standard lookup. The view position information, feature spatial position, tolerance information, and feature naming corresponding to 2D features are encapsulated to generate annotation data packages. Through structured encapsulation of various annotation data, the standardized format of annotation data packages improves data reusability and cross-platform compatibility. The layout formed by the annotation data packages is optimized to generate 2D icons, solving the problems of overlapping annotations and chaotic layout in existing technologies. The generated 2D icon annotations conform to engineering drawing specifications, significantly improving readability and standardization. At the same time, it supports common engineering drawing formats, improving compatibility with existing drawing software.
[0088] It should be noted that the two-dimensional icon annotation system based on three-dimensional model feature recognition and the two-dimensional icon annotation method based on three-dimensional model feature recognition provided in the above embodiments belong to the same concept. The specific way each module performs its operation has been described in detail in the method embodiments and will not be repeated here. In practical applications, the two-dimensional icon annotation method based on three-dimensional model feature recognition provided in the above embodiments can be assigned to different functional modules as needed, that is, the internal structure of the system can be divided into different functional modules to complete all or part of the functions described above. This is not a limitation here.
[0089] The above method was used to pass.
[0090] In some embodiments, an electronic device is also provided, which may be a server, and its internal structure diagram is shown below. Figure 5As shown, the electronic device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile and / or volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used to communicate with external clients via a network connection. The computer program is executed by the processor to implement the functions or steps of the server-side method described above.
[0091] In some embodiments, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the methods described above.
[0092] In some embodiments, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the above-described method.
[0093] It should be noted that the functions or steps that can be implemented by the computer-readable storage medium or electronic device described above can be referred to the relevant descriptions on the server side and client side in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.
[0094] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of methods and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0095] The above embodiments are merely illustrative of the principles and effects of this application and are not intended to limit this application. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of this application. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in this application should still be covered by the claims of this application.
Claims
1. A two-dimensional icon annotation method based on three-dimensional model feature recognition, characterized in that, include: Obtain model parameter information, which includes information on the counterpart components associated with the assembly of the target 3D model; Extract the three-dimensional features of the target three-dimensional model, and determine the association relationship of the three-dimensional features under multiple views based on the multi-view search method. The three-dimensional features include geometric features and corresponding spatial position coordinates. Based on the correlation, the optimal projection direction is selected to project the three-dimensional feature onto the virtual space plane, thereby determining the shape and size information of the two-dimensional feature; The feature name is determined based on the matching relationship between the shape information and size information of the two-dimensional feature and the information of the counterpart; and the tolerance information is determined by matching the two-dimensional feature according to the preset industry rules. The view position information, feature spatial position, tolerance information and feature naming corresponding to the two-dimensional feature are encapsulated to generate a label data package. The feature spatial position is calculated by the spatial position coordinates corresponding to the geometric feature. The layout formed by the labeled data package is optimized to generate two-dimensional icon annotations.
2. The two-dimensional icon annotation method based on three-dimensional model feature recognition according to claim 1, characterized in that, The layout formed by the labeled data package is optimized to generate two-dimensional icon annotations, including: The labeled data packets are classified according to views to obtain classification feature information, wherein the view is at least one of six views; The layout formed by the classification feature information is optimized to determine the layout result. The layout optimization includes minimizing the label overlap rate, minimizing the number of label line intersections, and maximizing the label uniformity and readability score. The feature distributions under the same view in the layout results are split and / or merged to determine the two-dimensional icon annotations.
3. The two-dimensional icon annotation method based on three-dimensional model feature recognition according to claim 2, characterized in that, The feature distributions under different views in the layout result are split and / or merged to determine the two-dimensional icon annotations, including: Determine the degree of feature distribution in different views of the layout result; If the feature distribution includes dense regions, then the features of the dense regions in the same view are split to generate a new view; If the feature distribution includes sparse regions, the features of the sparse regions in the same view are merged to generate a new view; If it is detected that the new view has at least one of a local magnified view or a section view, then the two-dimensional icon annotations are generated by arranging them evenly in the new view.
4. The two-dimensional icon annotation method based on three-dimensional model feature recognition according to claim 1, characterized in that, The layout formed by the labeled data package is optimized to generate two-dimensional icon annotations, including: Based on the model parameter information in the labeled data package, a layout is generated. A heuristic algorithm is used to optimize the layout so that the features are flat and completely covered by the layout. Based on the optimized layout, the annotation data package is rendered into a two-dimensional image to generate two-dimensional icon annotations. The layout optimization includes minimizing the annotation overlap rate, minimizing the number of annotation line intersections, and maximizing the annotation uniformity and readability score.
5. The two-dimensional icon annotation method based on three-dimensional model feature recognition according to claim 1, characterized in that, Based on the aforementioned correlation, the optimal projection direction is selected to project the three-dimensional feature onto a virtual space plane, determining the shape and size information of the two-dimensional feature, including: Obtain the set of model surface normals of the target 3D model, and determine the set of visible areas under each view based on the set of model surface normals; The viewpoint redundancy under each view is calculated, and the optimal projection direction is determined based on the view corresponding to the minimum viewpoint redundancy and the largest set of visible areas. Based on the optimal projection direction, the three-dimensional features are projected onto a virtual space plane to determine the plane equation; The shape and size information of the two-dimensional feature are determined by fitting the shape and size of the plane equation, respectively.
6. The two-dimensional icon annotation method based on three-dimensional model feature recognition according to claim 1, characterized in that, Extracting the 3D features of the target 3D model, and determining the association relationship of the 3D features under multiple views based on a multi-view search method, including: Extract the geometric features of the target 3D model, extract the spatial coordinates of the geometric features based on deep learning feature semanticization, and determine the geometric features to be labeled and their corresponding spatial coordinates in the target 3D model; The view that best reflects the features of the target 3D model is obtained as the main view, and the main view information is obtained from the perspective of the main view. Based on the main view information, a multi-view search method is used to process the three-dimensional features to obtain local magnification information and section view information; The same 3D feature is associated and bound with the main view information, the local magnification information and the sectioning perspective information to determine the association relationship.
7. The two-dimensional icon annotation method based on three-dimensional model feature recognition according to claim 1, characterized in that, The feature name is determined based on the matching relationship between the shape information and size information of the two-dimensional feature and the information of the counterpart, and the tolerance information is determined by matching the two-dimensional feature according to preset industry rules, including: Based on the matching relationship between the shape information and size information of the two-dimensional feature and the information of the counterpart, the feature name corresponding to the two-dimensional feature is determined; The two-dimensional features are matched according to preset industry rules to determine tolerance information, which includes standard geometric tolerances and special geometric tolerances. If the tolerance information is a standard geometric tolerance, determine the dimensional tolerance and geometric tolerance information corresponding to the two-dimensional feature; If the tolerance information is a special geometric tolerance, the dimensional tolerance and geometric tolerance information corresponding to the two-dimensional feature are determined by matching the information of the hand part or a preset database.
8. The two-dimensional icon annotation method based on three-dimensional model feature recognition according to any one of claims 1 to 7, characterized in that, Also includes: Define template parameters for the target view, fill the template parameters into a preset template based on the target view, and render and output the two-dimensional icon annotation based on the preset template.
9. A two-dimensional icon annotation system based on three-dimensional model feature recognition, characterized in that, include: The acquisition module is used to acquire model parameter information, which includes information on the counterparts associated with the target 3D model and the assembly of the target 3D model. The view search module is used to extract the three-dimensional features of the target three-dimensional model and determine the association relationship of the three-dimensional features under multiple views based on the multi-view search method. The three-dimensional features include geometric features and corresponding spatial position coordinates. The projection module is used to select the optimal projection direction according to the correlation to project the three-dimensional feature onto the virtual space plane, and to determine the shape and size information of the two-dimensional feature. The determination module is used to determine the feature name based on the matching relationship between the shape information and size information of the two-dimensional feature and the information of the counterpart, and to match the two-dimensional feature according to preset industry rules to determine the tolerance information; The data package module is used to encapsulate the view position information, feature spatial position, tolerance information and feature naming corresponding to the two-dimensional feature to generate a labeled data package. The feature spatial position is calculated by the spatial position coordinates corresponding to the geometric feature. The annotation generation module is used to optimize the layout formed by the annotation data package and generate two-dimensional icon annotations.
10. An electronic device, characterized in that, It includes a processor, a memory, and a communication bus; the communication bus is used to connect the processor and the memory; the processor is used to execute a computer program stored in the memory to implement the two-dimensional icon annotation method based on three-dimensional model feature recognition as described in any one of claims 1 to 8.