Implementation method for quickly matching and searching similar geometries

By judging the mutual relationships and layout consistency between the geometry of the 3D model, fast matching search in 3D graphics processing is realized, which solves the problems of low storage efficiency and poor rendering performance in the traditional method, and improves work efficiency.

CN119357425AActive Publication Date: 2025-01-24DMS CORP
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411920752.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-01-24
Estimated Expiration
2044-12-25

AI Technical Summary

Technical Problem

In three-dimensional graphics processing, traditional methods are difficult to efficiently identify and match the same three-dimensional model, resulting in low storage efficiency, poor rendering performance and low working efficiency.

Method used

By determining whether the relationship between the geometric body of a three -dimensional model is the same as the interrelationship between the geometric body of the other three -dimensional model, and further determine whether each geometric body is consistent with the same layout, and achieve fast matching search.

Benefits of technology

It improves the efficiency and accuracy of 3D model matching and search, reduces file storage volume, optimizes file structure, simplifies editing work, and significantly improves work efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119357425A_ABST
    Figure CN119357425A_ABST
Patent Text Reader

Abstract

The invention relates to an implementation method for quickly matching and searching similar geometries, which belongs to the technical field of three-dimensional graphic processing, and comprises the following steps of: S1, judging whether the mutual relationship among a plurality of geometries forming a three-dimensional model is the same as the mutual relationship among a plurality of geometries of another three-dimensional model or not; and S2, under the condition that the layouts of the two three-dimensional models are the same, judging whether the geometries forming the two three-dimensional models are consistent or not. The method specifically comprises the following steps: analyzing respective center point coordinates of all three-dimensional models in a three-dimensional graphic file; analyzing a vector included angle relationship between the center point coordinates of all geometries corresponding to each three-dimensional model and the center point coordinates of the corresponding three-dimensional model; comparing the vector included angle relations in the at least two three-dimensional models to preliminarily judge whether the spatial layouts of the at least two three-dimensional models are the same or not; matching the comparison object; and sequentially judging whether the to-be-compared geometries are consistent with one another according to the comparison sequence.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of three-dimensional graphics processing, and in particular to a method for realizing fast matching and searching of similar geometric bodies. Background Art

[0002] In the field of modern 3D modeling and computer graphics, especially in applications where a large number of devices of the same type are arranged in complex scenes or systems, such as industrial design, architectural visualization, and virtual reality, the same type of equipment is often repeatedly arranged and installed in the 3D scene, that is, the same type of equipment is installed in different positions, such as pressure gauges, motors, etc. Generally speaking, the same type of equipment is based on the same 3D model, and multiple models are formed after repeatedly arranging it in different positions in the scene and performing translation, rotation, scaling, etc., such as Figure 1 shown.

[0003] Traditionally, there are two main ways to store data for the same 3D objects in different locations (for example, the same model of equipment is repeatedly arranged in different locations): one is to make a complete data copy of each arranged device, and the other is to only record the transformation information relative to the original device.

[0004] The first method, full-copy storage, can ensure the independence of each device object, especially when modifying the properties of an object individually, but it also brings significant problems. The first is the low storage efficiency. The file size will expand rapidly with the increase in the number of devices. Especially in densely arranged scenes, the storage requirements may increase by dozens of times or even more. In addition, when the same model of equipment needs to be updated or replaced uniformly, the existence of duplicate data means that a lot of manpower and time are required for manual operation. More importantly, in the 3D rendering process, this duplicate data directly leads to a huge waste of memory and video memory resources, affecting the efficiency and performance of rendering, which is particularly obvious when dealing with highly complex scenes.

[0005] In contrast, the second approach refers to the original model by only recording transformation information (such as translation, rotation, and scaling), which not only significantly reduces storage space requirements but also provides higher efficiency during updating and rendering.

[0006] However, many current design software only use the first method or a combination of the first and second methods to achieve data storage based on their own considerations, which will undoubtedly have a serious impact on work efficiency. If the same three-dimensional objects in the data stored in the first method can be found and the data format can be converted into data stored in the second method, it can provide a more convenient and efficient operation method for many subsequent businesses. However, the core of this operation is to find the same data, which is a difficult point in three-dimensional data processing. The traditional method is to compare the parameters of each vertex of the triangle one by one. Due to the amount of data and precision, the corresponding accuracy and speed are both relatively large problems.

[0007] The core purpose of instancing is a technology for efficiently processing a large number of identical or similar objects in graphics rendering. It saves memory by reducing the storage of duplicate data and improves rendering performance through GPU optimization. Instancing allows a geometric body to be drawn multiple times, each time with different transformations (position, rotation, scale), color or other attributes. In graphics, instancing technology allows a geometric model to be drawn multiple times, each time with different transformations (such as position, rotation, scale), color or other attributes. The advantage of this is that it reduces memory usage and increases rendering speed through GPU parallel processing. For example, CN116109745A is an object rendering method and device based on instancing technology, wherein the method aims at the situation where the performance details of the model in a three-dimensional scene are gradually increasing, and based on GPU instancing technology, it realizes batch rendering of multiple card instances based on the same card model. When making a model, multiple sets of maps and corresponding UV maps are made for the model. Furthermore, texture maps or other types of maps with similar properties are merged in the same material ball. When rendering an instance of the model, the material properties of different model instances are dynamically set by establishing a model script, and positioned in the merged map through the UV offset value, thereby meeting the requirements of GPU instanced rendering, and then realizing batch rendering of multiple different instances through the same model.

[0008] However, for the 3D graphics files that have been generated, the instantiation technology is useless. This is because the premise of using the instantiation technology is: knowing that a certain 3D model needs to be rendered repeatedly in its 3D graphics file, but when reading a certain 3D graphics file, the system cannot know which 3D models in the 3D graphics file are the same. This is because when the finished 3D graphics file is generated into a publishing format, it usually only stores some triangle information that constitutes each 3D model, such as 3D graphics files in OBJ and FBX formats. Therefore, for 3D graphics files in publishing formats, efficient processing of a large number of identical 3D objects can only be achieved under the premise of determining the identity.

[0009] From the above, it can be seen that in the field of 3D graphics processing technology, both data storage and graphics rendering require fast matching and searching for similar geometric bodies to improve work efficiency and quality. Based on this, the field is in urgent need of an optimized solution for 3D graphics file processing.

[0010] In addition, on the one hand, there are differences in understanding among those skilled in the art; on the other hand, the applicant studied a large number of documents and patents when making the present invention, but due to space limitations, not all details and contents are listed in detail. However, this does not mean that the present invention does not have the characteristics of these prior arts. On the contrary, the present invention already has all the characteristics of the prior art, and the applicant reserves the right to add relevant prior art to the background technology. Summary of the invention

[0011] In view of the deficiencies in the prior art, the present invention provides a method for implementing fast matching and searching of similar geometric bodies to solve at least part of the above-mentioned technical problems.

[0012] The present invention discloses a method for realizing fast matching and searching of similar geometric bodies, which comprises the following steps: S1, determining whether the mutual relationship between multiple geometric bodies constituting one three-dimensional model is the same as the mutual relationship between multiple geometric bodies of another three-dimensional model; S2. When the layouts of the two three-dimensional models are the same, determine whether the geometric bodies constituting the two three-dimensional models are consistent.

[0013] The implementation method of the present invention realizes similar matching search of three-dimensional models through two main steps. First, by judging whether the relationship between multiple geometric bodies constituting one three-dimensional model is the same as the relationship between multiple geometric bodies of another three-dimensional model (step S1), this step can effectively identify models with the same internal structure by comparing the relative positions and layout relationships between the internal geometric bodies of the models, even if these models may have transformations such as rotation and translation in appearance. Then, when the layouts of the two three-dimensional models are the same, it is further judged whether the various geometric bodies constituting the two three-dimensional models are consistent (step S2). This step ensures that the models are not only similar in macroscopic layout, but also consistent in microscopic geometric details.

[0014] The core advantage of this implementation method is that it greatly improves the efficiency and accuracy of 3D model matching and searching. In the field of 3D design and manufacturing, especially in large projects, it is often necessary to process a large number of 3D model files, which may contain repeated design elements. The traditional manual search and replacement method is not only time-consuming and labor-intensive, but also error-prone. However, through the method of the present invention, all repeated 3D models can be found quickly and accurately, which is of great significance for reducing the file storage volume. On the one hand, identifying and removing duplicate model data can significantly reduce the overall size of the file, thereby saving storage resources; on the other hand, for known duplicate parts, existing model instances can be directly referenced, avoiding the storage of redundant data and further optimizing the file structure. In addition, this method also greatly facilitates the editing of 3D models. For example, when a specific design element needs to be replaced, only one modification is needed to automatically update all related instances, realizing efficient batch editing and significantly improving work efficiency.

[0015] According to a preferred embodiment, step S1 includes the following sub-steps: S1.1. Analyze the center point coordinates of all three-dimensional models in the three-dimensional graphic file; S1.2, analyzing the vector angle relationship between the center point coordinates of all geometric bodies corresponding to each three-dimensional model and the center point coordinates of the corresponding three-dimensional model; S1.3. Compare the vector angle relationship in at least two three-dimensional models to preliminarily determine whether the spatial layouts of at least two three-dimensional models are the same.

[0016] The above further refines the specific implementation method of step S1, and proposes a method for preliminarily judging whether the spatial layout of the three-dimensional model is the same by analyzing the coordinates of the center point of the three-dimensional model and the vector angle relationship between the coordinates of the center points of each geometric body and the coordinates of the center point of the model. This method uses the inherent structural characteristics of the three-dimensional model to make similarity judgments from a geometric perspective, and is highly scientific and practical.

[0017] By analyzing the coordinates of the center point, the spatial position of the model can be quickly located, and the introduction of the vector angle relationship further refines the comparison of the internal structure of the model. This method can not only efficiently identify exactly the same models, but also find models that have similar overall layouts but differ in subtle details, thereby improving the accuracy of matching searches. In practical applications, this method helps to improve the performance of 3D model management systems, especially when dealing with large-scale model libraries, which can significantly speed up searches and reduce unnecessary computing overhead. In addition, through in-depth analysis of the internal structure of the model, it can also provide valuable information for subsequent model optimization, such as identifying redundant parts in the model, helping designers simplify the model structure and improve design efficiency.

[0018] According to a preferred embodiment, in step S1.1, the center point coordinates of the three-dimensional model are calculated in two ways. One is to calculate the center point coordinates of the three-dimensional model based on the coordinates of all vertices of the three-dimensional model; the other is to calculate the center point coordinates of the three-dimensional model based on the center point coordinates of all geometric bodies of the three-dimensional model.

[0019] The above further refines the method of calculating the coordinates of the center point of the 3D model in step S1.1, and provides two different calculation methods: one is to calculate the coordinates of the center point based on the coordinates of all vertices of the 3D model, and the other is to calculate the coordinates of the center point based on the coordinates of the center points of all geometric bodies of the 3D model. These two methods have their own advantages and disadvantages, but both can provide effective support in different scenarios.

[0020] The calculation method based on vertex coordinates is suitable for models with complex geometric structures. By integrating the position information of all vertices, the overall geometric center of the model can be more accurately reflected. The advantage of this method is that the calculation results are more refined and can better adapt to changes in the internal structure of the model. It is particularly suitable for situations that require high-precision matching. The calculation method based on the center point coordinates of the geometric body is more suitable for models with a small number of geometric bodies and simple structures. By directly using the center point coordinates of the geometric body, the calculation process can be simplified and the calculation efficiency can be improved. This method can significantly shorten the calculation time while ensuring basic accuracy. It is particularly suitable for real-time processing or large-scale data processing scenarios.

[0021] In summary, the introduction of these two calculation methods provides flexible options for calculating the center point coordinates of the 3D model, allowing users to choose the most suitable method according to specific needs. This flexibility not only improves the adaptability of the system, but also provides a more reliable foundation for subsequent model matching and analysis. In practical applications, this method helps to improve the efficiency and accuracy of 3D model processing, especially in scenarios that require rapid response or processing of large amounts of data, and can significantly improve the overall performance of the system.

[0022] According to a preferred embodiment, the vector angle relationship is to first connect all the center points of all the geometric bodies of the corresponding three-dimensional model with the center point of the three-dimensional model itself to form vectors from the center points of the respective geometric bodies to the center points of the corresponding three-dimensional models, and then determine the vector angles of the center point lines between the vectors from the center points of the respective geometric bodies to the center points of the corresponding three-dimensional models, and based on these angles, obtain an indicator for characterizing the relationship between the vector angles in the three-dimensional model.

[0023] The above further defines the specific calculation method of the vector angle relationship, that is, all the center points of all the geometric bodies of the corresponding 3D model are connected to the center point of the 3D model itself, forming vectors from the center points of each geometric body to the center point of the corresponding 3D model, and then determining the vector angles of the center point lines between these vectors, and based on these angles, an indicator is obtained to characterize the relationship between the vector angles in the 3D model. This method can more accurately describe the similarity of the internal structure of the 3D model by introducing the concept of vector angle.

[0024] The introduction of the vector angle relationship not only increases the dimension of model matching, but also improves the matching accuracy. By calculating the vector angle from the center point of each geometric body to the center point of the model, the relative position relationship of the internal geometric bodies of the model can be fully reflected. The advantage of this method is that even if the model is rotated or translated in space, as long as the internal structure remains unchanged, its vector angle relationship will not change, so it can effectively identify models with the same internal structure. In practical applications, this method can significantly improve the robustness of model matching and reduce the possibility of misjudgment. In addition, by calculating the vector angle relationship, models that are similar in macro layout but different in micro details can also be found, providing important reference information for subsequent model optimization and analysis.

[0025] In general, the introduction of vector angle relationship not only improves the accuracy and robustness of model matching, but also provides a new tool for in-depth analysis of 3D models. This method has broad application prospects, especially in scenarios that require high-precision matching and analysis, which can significantly improve the performance and reliability of the system. With the continuous advancement of 3D modeling technology, this method will play an important role in more advanced applications.

[0026] According to a preferred embodiment, the index used to characterize the relationship between the vector angles in the three-dimensional model is the sum of the vector angles.

[0027] The present invention clarifies that the index used to characterize the relationship between the angles of various vectors in the three-dimensional model is the sum of the angles of various vectors, so that the similarity of the internal structure of the model can be quantified concisely and effectively by using this index.

[0028] By calculating the sum of the vector angles, complex three-dimensional structural information can be converted into a simple numerical value, which is convenient for subsequent comparison and analysis. The advantage of this method is that it can not only quickly evaluate the similarity between models, but also reflect the complexity of the internal structure of the model to a certain extent. Therefore, by comparing the sum of the vector angles of different models, models with similar internal structures can be quickly identified, thereby improving the efficiency of matching and searching.

[0029] In addition, the calculation method of the sum of vector angles has good scalability and comparability. When processing a large-scale model library, the sum of the vector angles of each model can be calculated in advance and stored as the eigenvalue of the model. When matching models, it is only necessary to compare these eigenvalues ​​to quickly screen out candidate models, greatly reducing computing time and resource consumption. This method is not only suitable for the management of static model libraries, but also can achieve real-time matching in dynamic environments, providing strong support for the efficient management and application of three-dimensional models.

[0030] According to a preferred embodiment, in step S1.3, the sum of the vector angles of the lines connecting the center points in each three-dimensional model is analyzed to calculate the deviation value of the sum of the vector angles of any two three-dimensional models, and the calculated deviation value is compared with a preset threshold to determine whether the spatial layouts of at least two three-dimensional models are the same.

[0031] The above further details how to determine whether the spatial layouts of at least two three-dimensional models are the same by analyzing the sum of the vector angles of the center points of each three-dimensional model in step S1.3. Specifically, by calculating the deviation value of the sum of the vector angles of any two three-dimensional models and comparing the deviation value with a preset threshold, it is possible to effectively determine whether the spatial layouts of the models are consistent.

[0032] The core advantage of this method is that it provides a way to quantify model similarity, making similarity judgment more objective and accurate. By calculating the deviation value of the sum of vector angles, the similarity between models can be converted into specific values, which is convenient for subsequent comparison and analysis. This method can not only quickly identify exactly the same models, but also find models that are similar in macro layout but different in micro details, thereby improving the accuracy of matching search.

[0033] In addition, by setting a preset threshold, the strictness of the match can be flexibly adjusted. For example, in situations where high-precision matching is required, a smaller threshold can be selected to ensure that only highly similar models can pass the match; in situations where a large number of models need to be screened quickly, a larger threshold can be selected to increase the matching speed. The flexibility of this method allows users to choose the most suitable matching strategy according to specific needs, thereby achieving good results in different application scenarios.

[0034] In general, by calculating the deviation value of the sum of vector angles and performing threshold comparison, not only the efficiency and accuracy of model matching are improved, but also new tools and methods are provided for the management and analysis of 3D models. This method has broad application prospects, especially in scenarios that require high-precision matching and analysis, which can significantly improve the performance and reliability of the system.

[0035] According to a preferred embodiment, step S2 includes the following sub-steps: S2.1, matching comparison objects; S2.2. Determine whether the geometric bodies to be compared are consistent with each other in turn according to the comparison sequence.

[0036] The above further refines the specific implementation of step S2, and proposes a method for determining whether the geometric bodies to be compared are consistent by matching the comparison objects and following the comparison sequence. This method can more accurately identify completely identical geometric bodies by gradually refining the comparison of the internal structure of the model, thereby ensuring the consistency of the model in microscopic details.

[0037] First, by matching the comparison objects, the geometric bodies with the same features in the two 3D models can be paired, thereby narrowing the comparison scope and reducing unnecessary computational overhead. The advantage of this method is that it can efficiently screen out potential matching objects and provide a reliable basis for subsequent detailed comparisons. Secondly, by judging whether the geometric bodies to be compared are consistent in turn according to the comparison sequence, the similarity of each geometric body can be systematically verified to ensure the consistency of the model in microscopic details. This method not only improves the accuracy of matching, but also provides important reference information for subsequent model optimization and analysis.

[0038] In addition, this method has good scalability and comparability. When dealing with large-scale model libraries, the eigenvalues ​​of each geometric body can be calculated in advance and stored as comparison objects. When matching models, it is only necessary to compare these eigenvalues ​​in sequence according to the preset comparison sequence to quickly screen out candidate models, greatly reducing computing time and resource consumption. This method is not only suitable for the management of static model libraries, but also can achieve real-time matching in dynamic environments, providing strong support for the efficient management and application of 3D models.

[0039] In general, by matching and comparing objects and judging the consistency of geometric bodies in sequence, not only the efficiency and accuracy of model matching are improved, but also new tools and methods are provided for the management and analysis of 3D models. This method has broad application prospects, especially in scenarios that require high-precision matching and analysis, which can significantly improve the performance and reliability of the system.

[0040] According to a preferred embodiment, in step S2.1, the geometric bodies to be compared among the geometric bodies constituting the two three-dimensional models are determined by analyzing the relationship between the vectors from the center points of the geometric bodies of the two screened three-dimensional models to the center points of the corresponding three-dimensional models, and these geometric bodies are sorted and paired one by one based on the comparison sequence of each geometric body in the three-dimensional model to obtain paired comparison objects.

[0041] The above further refines the specific implementation method of step S2.1, and proposes to determine the geometric bodies to be compared among the geometric bodies constituting the two three-dimensional models by analyzing the relationship between the vectors from the center points of the geometric bodies of the two selected three-dimensional models to the center points of the corresponding three-dimensional models, and sort and pair these geometric bodies one by one based on the comparison sequence of each geometric body in the three-dimensional model to obtain paired comparison objects. This method makes the pairing of geometric bodies more orderly and efficient by introducing the concept of comparison sequence.

[0042] By analyzing the relationship between vectors and determining the comparison sequence, unnecessary computational overhead can be effectively reduced and the matching efficiency can be improved. Specifically, the introduction of the comparison sequence makes the pairing of geometric bodies more systematic and orderly, avoiding the uncertainty caused by random pairing. The advantage of this method is that it can not only efficiently screen out potential matching objects, but also ensure that the pairing order of each geometric body is reasonable, thereby improving the accuracy of subsequent comparisons. In addition, by sorting the comparison sequence, it is easier to find those geometric bodies that are similar in macroscopic layout but different in microscopic details, providing important reference information for subsequent model optimization and analysis.

[0043] In general, by introducing the concept of comparison sequence, not only the efficiency and accuracy of geometric pairing are improved, but also new tools and methods are provided for the management and analysis of 3D models. This method has broad application prospects, especially in scenarios that require high-precision matching and analysis, which can significantly improve the performance and reliability of the system.

[0044] According to a preferred embodiment, in step S2.2, a pair of geometric bodies having the same comparison sequence in two three-dimensional models are compared according to a preset comparison rule, wherein the preset comparison rule includes the following process: a. Preliminarily determine whether the two geometric bodies are consistent based on the basic properties of the geometric bodies. If the basic properties are different, exit; if they are the same, execute the subsequent process; b. For the geometric body to be compared in the first three-dimensional model, a preset algorithm is used to extract the faces that need to be involved in the calculation, and the face normals of each extracted face and the next face are calculated, wherein each extracted face corresponds to two normals; c. Calculate the angles between all the faces that need to be calculated and the normals of the next face, and add them together to get the angle sum; d. For the geometric body to be compared in the second 3D model, execute the process from b to c to form another angle sum; e. Compare the angle sums of the two geometric bodies to see if they are the same. If they are the same, the geometric bodies are the same; otherwise, they are different and the program exits.

[0045] The above content further refines the specific implementation method of step S2.2, and proposes a method for judging whether two geometric bodies are consistent through preset comparison rules. Specifically, this method includes the following steps: first, based on the basic properties of the geometric bodies, preliminarily judge whether the two geometric bodies are consistent; second, for the geometric body to be compared in the first three-dimensional model, use a preset algorithm to extract the faces that need to be involved in the calculation, and calculate the face normal of each extracted face and its next face; third, calculate the normal angles corresponding to all faces that need to be involved in the calculation and their next face, and accumulate them to obtain the angle sum; finally, for the geometric body to be compared in the second three-dimensional model, execute the same process and compare whether the angle sums of the two geometric bodies are the same.

[0046] The core advantage of this method is that it ensures the similarity of geometries in multiple aspects through multi-level comparisons. First, through the preliminary judgment of basic properties, those geometries that are obviously inconsistent can be quickly eliminated, reducing unnecessary calculation overhead. Secondly, through the calculation of face normals and the comparison of angle sums, the similarity of geometries can be verified more accurately. This method not only improves the accuracy of matching, but also provides detailed geometric information for subsequent model optimization and analysis.

[0047] In addition, by extracting the faces that need to be involved in the calculation through the preset algorithm, the granularity and accuracy of the calculation can be flexibly adjusted. For example, in situations where high-precision matching is required, a smaller sampling interval can be selected to ensure that each face is fully considered; and in situations where a large number of geometric bodies need to be quickly screened, a larger sampling interval can be selected to improve calculation efficiency. The flexibility of this method allows users to choose the most suitable matching strategy according to specific needs, so that good results can be achieved in different application scenarios.

[0048] In general, through multi-level comparison and detailed geometric information verification, not only the efficiency and accuracy of geometric matching are improved, but also new tools and methods are provided for the management and analysis of 3D models. This method has broad application prospects, especially in scenarios that require high-precision matching and analysis, which can significantly improve the performance and reliability of the system.

[0049] According to a preferred embodiment, the method further includes a step S0 for grouping the three-dimensional models, which is arranged before step S1, wherein in step S0, the three-dimensional models are grouped according to the number of geometric bodies, descriptions, storage structures or sets of triangular faces constituting the three-dimensional models, so as to facilitate finding the same three-dimensional model within the same group.

[0050] The present invention sets step S0 before step S1 to classify the models in advance, thereby significantly improving the efficiency of subsequent matching and searching. First, by grouping, models with similar features can be classified together, thereby reducing unnecessary cross-group comparisons. The advantage of this method is that it can efficiently narrow the search scope and reduce computing time and resource consumption. Specifically, the grouping of the number of geometric bodies can quickly screen out models with the same complexity; the grouping of descriptions can be classified according to information such as the name, purpose, and creator of the model, thereby improving the pertinence of the search; the grouping of storage structures can be classified according to the characteristics of the file format and data structure, thereby improving the accuracy of matching; the grouping of triangular face sets can be classified according to the geometric shape of the model, thereby improving the robustness of matching. In addition, by grouping, valuable reference information can be provided for subsequent model optimization and analysis. For example, by analyzing the models in the same group, common patterns and repeated elements in the design can be found, thereby helping designers simplify the model structure and improve design efficiency. In addition, grouping can also provide support for version management and collaborative work of models. For example, by classifying models of the same project together, version control and team collaboration can be more convenient.

[0051] In general, by grouping 3D models in advance, not only the efficiency and accuracy of subsequent matching searches are improved, but also new tools and methods are provided for the management and analysis of 3D models. This method has broad application prospects, especially in scenarios where large-scale model libraries need to be processed, which can significantly improve the overall performance and reliability of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 It is a schematic diagram showing a 3D scene including multiple 3D models of the same type of equipment; Figure 2 It is a flowchart of the steps of a method for implementing a preferred embodiment provided by the present invention; Figure 3 This is a main view of an example 3D model containing three geometric bodies; Figure 4 is an axial view of an example three-dimensional model containing three geometric bodies; Figure 5 yes Figure 3 , Figure 4 Schematic diagram of the vector angle relationship in the three-dimensional model shown; Figure 6 It is a schematic diagram of the normal information of a face (such as a triangle); Figure 7 It is a schematic diagram of the normal information of the faces that need to be involved in the calculation extracted from the geometric body; Figure 8It is a flowchart of a method for implementing a preferred embodiment of the present invention. DETAILED DESCRIPTION

[0053] The following is a detailed description with reference to the accompanying drawings.

[0054] The present invention discloses a method for implementing fast matching and searching of similar geometric bodies, which is used to optimize the subsequent processing of a three-dimensional graphic file in a published format by determining the same three-dimensional models in the three-dimensional graphic file, wherein the "same" mentioned here means that all three-dimensional components (i.e., geometric bodies) constituting the three-dimensional model have the same shape; and the relative positional relationship of all three-dimensional components constituting the three-dimensional model is consistent. In order to achieve the above purpose, the present invention stipulates that when a three-dimensional graphic file in a published format is processed on a server, the three-dimensional graphic file includes at least two three-dimensional models.

[0055] like Figure 2 As shown, preferably, the implementation method of the present invention may include the following steps: S1, determining whether the mutual relationship between multiple geometric bodies constituting one three-dimensional model is the same as the mutual relationship between multiple geometric bodies of another three-dimensional model; S2. When the layouts of the two three-dimensional models are the same, determine whether the geometric bodies constituting the two three-dimensional models are consistent.

[0056] Preferably, if Figure 2 As shown, before step S1, step S0 for grouping the three-dimensional models may be included, wherein in step S0, the three-dimensional models may be grouped according to the number of geometric bodies constituting the three-dimensional model, description, storage structure or the set of triangular faces constituting the three-dimensional model, so as to facilitate finding the same three-dimensional model in the same group.

[0057] Preferably, the number of geometric bodies refers to the number of basic geometric elements that make up a three-dimensional model, wherein the total number of all basic geometric elements in each three-dimensional model can be counted and grouped according to this total number, so that three-dimensional models with the same number of geometric bodies can be grouped into the same group; more detailed grouping can also be performed by considering the number of specific types of geometric bodies in the model or calculating the number of certain specific features.

[0058] Preferably, the description refers to various information that can express the characteristics of the three-dimensional model, including but not limited to text descriptions such as the model's name, purpose, creator, and copyright information, and can also be a description of the model's characteristics obtained through mathematical formulas or algorithms. Furthermore, natural language processing technology can be used to extract keywords from the text description of the model, and then the models can be grouped according to the similarity of the keywords; the characteristics of each model can also be converted into a feature vector, and then a clustering algorithm (such as K-means) can be used to group the models according to the similarity of the feature vectors.

[0059] Preferably, the storage structure involves the representation of the 3D model in the computer system. Different file formats may lead to different storage structures. Common 3D graphics file formats include STL, OBJ, FBX, etc. Further, the 3D models can be grouped according to the file format used; the data structure of each model can also be deeply analyzed, such as the depth of the node tree, the connection method between nodes, etc., and grouped according to these structural properties.

[0060] Preferably, almost all three-dimensional models can be decomposed into a series of triangular faces, and the collection of these triangular faces determines the appearance and shape of the model. Therefore, grouping can be performed by comparing the similarity of the collection of triangular faces in different models.

[0061] Preferably, if Figure 2 As shown, step S1 may include one or more of the following sub-steps: S1.1. Analyze the center point coordinates of all three-dimensional models in the three-dimensional graphic file; S1.2. S1.2. Analyze the vector angle relationship between the center point coordinates of all geometric bodies corresponding to each three-dimensional model and the center point coordinates of the corresponding three-dimensional model; S1.3. Compare the vector angle relationship in at least two three-dimensional models to preliminarily determine whether the spatial layouts of at least two three-dimensional models are the same.

[0062] Preferably, in step S1.1, the center point coordinates of the three-dimensional model can be calculated in two ways. One is to calculate the center point coordinates of the three-dimensional model based on the coordinates of all vertices of the three-dimensional model; the other is to calculate the center point coordinates of the three-dimensional model based on the center point coordinates of all geometric bodies of the three-dimensional model.

[0063] Preferably, the coordinates of the center point (center of mass) of each three-dimensional model can be determined by analyzing the coordinates of all vertices of all three-dimensional models, and the prescribed formula is as follows:

[0064] Among them, ptC is the coordinate of the center point of a 3D model, which contains three components: x, y, and z; pt[i].x, pt[i].y, and pt[i].z represent the x, y, and z coordinates of the i-th vertex respectively; ptcount is the total number of vertices, that is, n.

[0065] Furthermore, in the above formula, the following items are the sum of the x-coordinates, y-coordinates, and z-coordinates of all vertices respectively:

[0066] Preferably, in the above formula, the x, y, and z coordinates of all vertices can be summed up respectively, and then the sum of each set of coordinates is divided by the number of vertices ptcount to obtain the average value of each axis, and the final ptC is the center point coordinate of all vertices. This formula is applicable to any three-dimensional model with multiple vertices, and can effectively calculate the geometric center of these vertices.

[0067] Preferably, the coordinates of the center point (center of mass) of each three-dimensional model can be determined by calculating the coordinates of the center points of all geometric bodies of all three-dimensional models, wherein the coordinates of the center point of a geometric body in a three-dimensional model can be calculated by the vertex coordinates of the geometric body. Therefore, the coordinates of the center point (center of mass) of a three-dimensional model can be calculated by the following formula:

[0068] Among them, ptC is the coordinate of the center point of a 3D model, which contains three components: x, y, and z; ptE[j].x, ptE[j].y, and ptE[j].z represent the x, y, and z coordinates of the center point of the jth geometric body, respectively; ptEcount is the number of geometric bodies in the 3D model, that is, m.

[0069] Preferably, in the above formula, the x, y, and z coordinates of all geometric bodies in the three-dimensional model can be summed separately, and then the sum of each set of coordinates is divided by the number of geometric bodies ptEcount to obtain the average value of each axis. The final ptC is the coordinate of the center point of the three-dimensional model.

[0070] Preferably, in step S1.2, "vector angle relationship" means first connecting all center points of all geometric bodies of the corresponding three-dimensional model with the center point of the three-dimensional model itself to form vectors from the center points of each geometric body to the center point of the corresponding three-dimensional model, and then determining the vector angles of the center point lines between the vectors from the center points of each geometric body to the center points of the corresponding three-dimensional model, and obtaining an indicator for characterizing the relationship between the vector angles in the three-dimensional model based on these angles.

[0071] Preferably, the vector angle of the center point connection line can be obtained by referring to the angle calculation method between two three-dimensional vectors. Given two vectors a and b, the angle θ between them can be calculated by the following formula:

[0072] Where a·b is the dot product of vectors a and b, and ||a|| and ||b|| are the modulos (lengths) of vectors a and b, respectively.

[0073] Specifically, the calculation steps are as follows: Compute the dot product:

[0074] Calculation module:

[0075] Calculate the cosine of the angle:

[0076] Calculate the angle:

[0077] Among them, a x 、a y 、a z are the components of vector a on the x-axis, y-axis, and z-axis respectively; b x , b y , b z are the components of vector b on the x-axis, y-axis, and z-axis respectively.

[0078] For example, Figure 3 and Figure 4 A three-dimensional model consisting of three geometric bodies is shown. Figure 5 As shown, the center point of the three-dimensional model is ptC, wherein the three geometric bodies include: a first geometric body whose center point is ptE1, a second geometric body whose center point is ptE2, and a third geometric body whose center point is ptE3.

[0079] Preferably, by analyzing the normal information of the line formed by connecting the center point of each geometric body with the center point of the three-dimensional model in which it is located, the vector angle of the center point line between the vectors from the center point of each geometric body to the center point of the corresponding three-dimensional model is determined (e.g. Figure 5 α, β, γ shown in Figure 5 The angle α between the center point connecting vectors in is the angle between the vector ptE1-ptC and the vector ptE2-ptC. Preferably, Figure 6 As shown, the normal information is the direction information from the center of the model to the center of the geometry, for example, Figure 5The normal information of the first geometric body in is: ptE1 coordinate - ptC coordinate = (Δx, Δy, Δz). Preferably, the normal is a vector from the center point of the model to the center point of the geometric body, for example, Figure 5 The normal direction of the first geometric body in is the direction vector from ptC to PtE1. Preferably, the index used to characterize the relationship between the angles of the vectors in the three-dimensional model may be the sum of the angles of the vectors.

[0080] Preferably, in step S1.3, whether the spatial layouts of at least two three-dimensional models are the same is determined by comparing the relationship between the vector angles in at least two three-dimensional models. In the simplest case, the relationship between the vector angles of the center point lines in each three-dimensional model can be analyzed (for example, the sum of the vector angles of the center point lines is calculated) to calculate the deviation value, and the calculated deviation value is compared with a preset threshold, so as to determine whether the spatial layouts of multiple three-dimensional models are the same.

[0081] For example, the sum of the vector angles of the lines connecting the center points of the first three-dimensional model of the first group of devices is calculated to obtain Total1, and then the same indicator Total2 is calculated using the same calculation principle as the first three-dimensional model of the first group of devices for the second three-dimensional model of the second group of devices. When Total1 is compared with Total2, if abs(Total1-Total2) is less than a preset threshold (such as 1×10 -5 ), the spatial layouts of the two 3D models are considered to be the same, or the geometric layouts are consistent. When there are more than two 3D models, any two 3D models can be selected by permutation and combination to perform the above comparison to determine whether the spatial layouts of these models are the same.

[0082] Preferably, when the implementation method includes step S0, based on the grouping of the three-dimensional models, the vector angle relationship in all three-dimensional models in the same group can be compared to preliminarily determine whether these three-dimensional models are the same, so as to obtain a preliminary judgment conclusion. This is because if the geometric body distributions in two models are exactly the same, then the relative relationship between their center points should also be very close.

[0083] When the method in the first part is used to determine that the layouts of two three-dimensional models are the same, it is still not possible to consider that the two three-dimensional models are identical to each other. This is because the above preliminary judgment is a simplified judgment of the center point relationship in order to reduce the computational intensity. Therefore, there are situations where the layouts are the same but the actual geometric shapes are different when the center point is used as the judgment standard. On this basis, step S2 is used to determine whether the geometric shapes that constitute the three-dimensional model are consistent. Since step S1 has completed most of the exclusion and filtering, the computing power required for step S2 is limited.

[0084] Preferably, if Figure 2As shown, step S2 may include one or more of the following sub-steps: S2.1, matching comparison objects; S2.2. Determine whether the geometric bodies to be compared are consistent with each other in turn according to the comparison sequence.

[0085] Preferably, in step S2.1, the geometric bodies to be compared among the geometric bodies constituting the two three-dimensional models can be determined by analyzing the relationship between the vectors from the center points of the respective geometric bodies of the two selected three-dimensional models to the center points of the corresponding three-dimensional models. It is preliminarily determined that the several geometric bodies contained in the two three-dimensional models with the same spatial layout need to be paired one by one according to the preset matching rules to obtain multiple pairs of mutually matching geometric bodies, which are the "comparison objects". Furthermore, the preset matching rules can be any rules that can clearly distinguish the various geometric bodies in the three-dimensional model. For example, the comparison sequence of each geometric body in the three-dimensional model can be determined according to the numerical size relationship of the modulus of the vector from the center point of each geometric body to the center point of the corresponding three-dimensional model, wherein the comparison sequence can be sorted from large to small or from small to large according to the above-mentioned numerical values. Optionally, the numerical magnitude relationship of the modulus of the vectors from the center point of each geometric body to the center point of the corresponding three-dimensional model can be determined by calculating the ratio, for example, ||ptE1-ptC||:||ptE2-ptC||:||ptE3-ptC||=1:2:3, and then the vectors can be sorted in the order of the first geometric body, the second geometric body, the third geometric body, or the third geometric body, the second geometric body, and the first geometric body. Further, if the numerical magnitudes of the moduli of some vectors are the same, other attributes of the geometric bodies can be used to distinguish them in step S2.1, for example, shape features: comparing the shape descriptors of the geometric bodies (such as volume, surface area, aspect ratio, etc.), number of vertices: checking the number of vertices of the geometric bodies, normal vector direction: calculating the normal vectors of the geometric bodies and comparing them; or the geometric bodies belonging to the same situation can be given the same comparison sequence, that is, sorted in parallel, so that the matching of these geometric bodies can be verified one by one by permutation and combination when the geometric bodies are compared later.

[0086] Preferably, after determining the comparison sequence of the geometric bodies, step S2.2 may compare a pair of geometric bodies having the same comparison sequence in the two three-dimensional models according to a preset comparison rule, wherein the preset comparison rule may include the following process: a. Preliminarily determine whether the two geometric bodies are consistent based on the basic properties of the geometric bodies. For example, determine whether the number of vertices of at least one geometric body constituting the three-dimensional model is the same as that of the geometric body of the other three-dimensional model. If they are not the same, exit; if they are the same, execute the subsequent process; b. For the geometric body to be compared in the first three-dimensional model, a preset algorithm is used to extract faces (such as 1, 6, 11, 17, etc.) that need to be calculated, and the face normal of each extracted face and the next face is calculated, wherein each extracted face may correspond to two normals; c. Calculate the angles between all the faces that need to be calculated and the normals of the next face, and add them together to get the angle sum; d. For the geometric body to be compared in the second 3D model, execute the process from b to c to form another angle sum; e. Compare the angle sums of the two geometric bodies to see if they are the same. If they are the same, the geometric bodies are the same; otherwise, they are different and the program exits.

[0087] Preferably, in the above process a, it is possible to preliminarily determine whether the two geometric bodies are consistent by judging the number of vertices of the two geometric bodies. In addition, it is also possible to judge whether the number of triangles of the two geometric bodies is equal. If they are not equal, it is considered that the two geometric bodies are not the same geometric bodies. In other words, the basic attributes of the geometric body used for preliminary judgment in process a may include but are not limited to the number of vertices and the number of triangles of the geometric body. Further, in step a, it is possible to preliminarily determine whether the two geometric bodies are consistent only by judging the number of vertices or the number of triangles of the two geometric bodies, or it is possible to simultaneously judge the number of vertices and the number of triangles of the two geometric bodies to obtain a relatively more accurate judgment result. Preferably, for the case where the numerical values ​​of the moduli of some vectors are the same in step S2.1, with the help of process a, the matching relationships of multiple geometric bodies sorted in parallel can be verified one by one to quickly filter out unreasonable matching relationships. In the above case, it is preferred to simultaneously judge the number of vertices and the number of triangles of the two geometric bodies to accurately filter out the correct matching relationship.

[0088] Preferably, in the above process b, the preset algorithm can be to set a reasonable sampling interval (for example, set the sampling interval to 5) to complete the extraction of the surface (usually a triangle) according to the sampling interval, so as to be suitable for the situation where the geometric body is composed of a large number of triangles, wherein the larger the interval value, the higher the comparison efficiency, while the comparison accuracy is reduced. Figure 7 Shows the normal information of a face extracted from the geometry that needs to be involved in the calculation.

[0089] Preferably, in the above process c, starting from the first extracted face, the angle between the normal of the next face of the face in the geometric body and the normal of the face is calculated, recorded and added to the total value dTotalVE1. Exemplarily, the normal of the first extracted face is V1, the normal of the next face of the face is V2, the angle between V2 and V1 is calculated, recorded as DV2, and added to the total value dTotalVE1 of the first vector angle, and then based on the set sampling interval step=5, the subsequent normal information and angles are calculated one by one, such as DV7 is the angle between V7 and V6, so as to accumulate and obtain the total value dTotalVE1.

[0090] Preferably, in the above process d, the geometric body to be compared in the second three-dimensional model is a geometric body in the second three-dimensional model having the same comparison sequence as the geometric body to be compared in the first three-dimensional model, and the second vector angle total value dTotalVE2 of the geometric body can be calculated using the same method as above.

[0091] Preferably, in the above process e, dTotalVE1 is compared with dTotalVE2, and if abs(dTotalVE1-dTotalVE2) is less than a preset threshold (such as 1×10 -5 ), we can consider these two geometries to be the same geometries.

[0092] Furthermore, according to the determined comparison sequence, a pair of geometric bodies to be compared can be extracted in sequence to execute the above process according to the preset comparison rules to determine whether all the matched comparison objects are the same geometric bodies. If a pair of geometric bodies is determined to be non-identical geometric bodies through the above process, then exit, otherwise continue to compare the geometric bodies to be compared in sequence according to the comparison sequence until all the geometric bodies are compared. If all the geometric bodies are compared and the comparison results are the same geometric bodies, it can be indicated that the two three-dimensional models are the same three-dimensional model.

[0093] Based on this, the implementation method of the present invention can be as follows: Figure 8 The four different judgments shown are used to determine whether at least two groups of three-dimensional models passed in are the same three-dimensional models, wherein the four judgments may include determining whether the number of geometric bodies is the same, determining whether the vector angle relationship between the geometric bodies is the same, quickly determining whether each pair of geometric bodies is the same, and determining in turn whether each pair of geometric bodies is the same.

[0094] It should be noted that the above-mentioned specific embodiments are exemplary, and those skilled in the art can come up with various solutions inspired by the disclosure of the present invention, and these solutions also belong to the disclosure scope of the present invention and fall within the protection scope of the present invention. Those skilled in the art should understand that the present invention specification and its drawings are illustrative and do not constitute a limitation of the claims. The scope of protection of the present invention is defined by the claims and their equivalents. The present invention specification contains multiple inventive concepts, such as "preferably" or "according to a preferred embodiment", which means that the corresponding paragraph discloses an independent concept, and the applicant reserves the right to file a divisional application based on each inventive concept. Throughout the text, the features guided by "preferably" are only an optional method and should not be understood as a must-have setting. Therefore, the applicant reserves the right to abandon or delete the relevant preferred features at any time.

Claims

1. A method for realizing fast matching and searching of similar geometric bodies, characterized in that: It includes the following steps: S1, determining whether the mutual relationship between multiple geometric bodies constituting one three-dimensional model is the same as the mutual relationship between multiple geometric bodies of another three-dimensional model; S2. When the layouts of the two three-dimensional models are the same, determine whether the geometric bodies constituting the two three-dimensional models are consistent.

2. The method according to claim 1, characterized in that Step S1 includes the following sub-steps: S1.

1. Analyze the center point coordinates of all three-dimensional models in the three-dimensional graphic file; S1.2, analyzing the vector angle relationship between the center point coordinates of all geometric bodies corresponding to each three-dimensional model and the center point coordinates of the corresponding three-dimensional model; S1.

3. Compare the vector angle relationship in at least two three-dimensional models to preliminarily determine whether the spatial layouts of the at least two three-dimensional models are the same.

3. The method according to claim 2, characterized in that In step S1.1, the center point coordinates of the three-dimensional model are calculated in two ways. One is to calculate the center point coordinates of the three-dimensional model based on the coordinates of all vertices of the three-dimensional model; the other is to calculate the center point coordinates of the three-dimensional model based on the center point coordinates of all geometric bodies of the three-dimensional model.

4. The method according to claim 2, characterized in that: The vector angle relationship is to first connect all the center points of all the geometric bodies of the corresponding three-dimensional model with the center point of the three-dimensional model itself to form vectors from the center points of each geometric body to the center point of the corresponding three-dimensional model, and then determine the vector angle of the center point connection line between the vectors from the center points of each geometric body to the center point of the corresponding three-dimensional model, and obtain an indicator for characterizing the relationship between the vector angles in the three-dimensional model based on these angles.

5. The method according to claim 4, characterized in that The index used to characterize the relationship between the angles of various vectors in a three-dimensional model is the sum of the angles of various vectors.

6. The method according to claim 5, characterized in that In step S1.3, the deviation value of the sum of the vector angles of any two three-dimensional models is calculated by analyzing the sum of the vector angles of the center points in each three-dimensional model, and the calculated deviation value is compared with a preset threshold to determine whether the spatial layouts of at least two three-dimensional models are the same.

7. The method according to claim 1, characterized in that Step S2 includes the following sub-steps: S2.1, matching comparison objects; S2.

2. Determine whether the geometric bodies to be compared are consistent with each other in turn according to the comparison sequence.

8. The method according to claim 7, characterized in that In step S2.1, the geometric bodies to be compared among the geometric bodies constituting the two three-dimensional models are determined by analyzing the relationship between the vectors from the center points of the geometric bodies of the two selected three-dimensional models to the center points of the corresponding three-dimensional models. These geometric bodies are sorted and paired one by one based on the comparison sequence of each geometric body in the three-dimensional model to obtain paired comparison objects.

9. The method according to claim 8, characterized in that In step S2.2, a pair of geometric bodies having the same comparison sequence in the two three-dimensional models are compared according to a preset comparison rule, wherein the preset comparison rule includes the following process: a. Preliminarily determine whether the two geometric bodies are consistent based on the basic properties of the geometric bodies. If the basic properties are different, exit; if they are the same, execute the subsequent process; b. For the geometric body to be compared in the first three-dimensional model, a preset algorithm is used to extract the faces that need to be involved in the calculation, and the face normals of each extracted face and the next face are calculated, wherein each extracted face corresponds to two normals; c. Calculate the angles between all the faces that need to be calculated and the normals of the next face, and add them together to get the angle sum; d. For the geometric body to be compared in the second 3D model, execute the process from b to c to form another angle sum; e. Compare the angle sums of the two geometric bodies to see if they are the same. If they are the same, the geometric bodies are the same; otherwise, they are different and the program exits.

10. The method according to claim 1, characterized in that The method also includes a step S0 for grouping the three-dimensional models, which is arranged before step S1, wherein in step S0, the three-dimensional models are grouped according to the number, description, storage structure of the geometric bodies constituting the three-dimensional models or the set of triangular faces constituting the three-dimensional models, so as to facilitate finding the same three-dimensional model in the same group.

Citation Information

Patent Citations

  • 3-D model (three-dimensional model) search method based on weighted topology constraint comparison

    CN101937453A

  • Three-dimensional model retrieval method based on geometrical shapes and structural characteristics

    CN110275976A

  • Self-adaptive standard part three-dimensional CAD model retrieval system

    CN110941732A

  • Three-dimensional CAD model similar structure retrieval method based on local feature expression

    CN115170842A

  • Three-dimensional CAD model retrieval method and device based on global features and medium

    CN118394963A