Server and method for processing three-dimensional graphics in publication format

By analyzing the relationship between the center point coordinates and vector angles of the 3D model, the problem of efficient matching of identical objects in 3D graphic files is solved, efficient storage and rendering are achieved, and the work efficiency of 3D design and manufacturing is improved.

CN120632149AActive Publication Date: 2025-09-12DMS CORP
View PDF 6 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

When processing 3D graphic files, existing technologies have difficulty in efficiently identifying and matching identical 3D objects, resulting in low storage efficiency, resource waste, and insufficient rendering performance, especially in complex scenes.

Method used

By analyzing the relationship between the center point coordinates and vector angles of a 3D model, the consistency of the model's spatial layout and geometry can be quickly determined. The sum of the vector angles is compared with a preset threshold, combined with grouping and comparison sequences, to achieve efficient matching and search of similar geometries.

Benefits of technology

It significantly improves the efficiency and accuracy of 3D model matching and searching, reduces file storage volume, optimizes file structure, supports efficient editing and batch updates, and improves rendering performance and design efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120632149A_ABST
    Figure CN120632149A_ABST
Patent Text Reader

Abstract

The invention relates to a server and a method for processing a three-dimensional graphic file in a release format. The server is configured to analyze a vector included angle relationship between center point coordinates of all geometries corresponding to each three-dimensional model and 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; under the condition that the layouts of the two three-dimensional models are the same, a plurality of geometries contained in the two three-dimensional models are subjected to one-to-one matching according to a preset matching rule, so that multiple pairs of matched geometries are obtained; and sequentially judging whether the to-be-compared geometries are consistent with one another according to the comparison sequence. According to the invention, the efficiency and accuracy of three-dimensional model matching search are greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] The original basis of this divisional application is the patent application with application number 202411920752X, application date 2024.12.25, and invention name “A method for implementing fast matching and searching of similar geometric bodies”. Technical Field

[0002] The present invention relates to the technical field of three-dimensional graphics processing, and in particular to a server and method for processing three-dimensional graphics files in a publishing format. Background Art

[0003] 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, it is often necessary to repeatedly arrange and install the same type of equipment in the 3D scene. That is, the same type of equipment must be installed in different positions, such as pressure gauges and motors. Generally speaking, the same type of equipment is based on the same 3D model, and is repeatedly arranged in different positions in the scene and subjected to translation, rotation, scaling, and other actions to form multiple models, such as Figure 1 shown.

[0004] Traditionally, for the same 3D object in different locations (e.g., repeated deployment of the same model of equipment in different locations), there are two main ways to store data: one is to make a complete data copy of each deployed device, and the other is to only record the transformation information relative to the original device.

[0005] The first method, full-copy storage, ensures the independence of each device object and provides a certain degree of flexibility, especially when modifying the properties of an object individually. However, it also brings significant problems. The first is low storage efficiency. The file size will expand rapidly as the number of devices increases. Especially in densely deployed scenarios, 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 operations. More importantly, during 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.

[0006] 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.

[0007] However, many current design software programs, based on their own considerations, only use the first method or a combination of the first and second methods to implement data storage, which undoubtedly has a serious impact on work efficiency. However, if identical 3D objects in data stored in the first method could be found and the data format converted to data stored in the second method, it would provide a more convenient and efficient operation path for many subsequent tasks. However, the core of this operation lies in finding identical data, which is a difficult point in 3D data processing. The traditional method involves comparing the parameters of each triangle vertex one by one. Due to the data volume and precision, the corresponding accuracy and speed are both significant issues.

[0008] 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, and each drawing can have different transformations (such as position, rotation, scale), colors or other attributes. In graphics, instancing technology allows a geometric model to be drawn multiple times, and each drawing can have different transformations (such as position, rotation, scale), colors or other attributes. The advantage of doing so is that it reduces memory usage and improves rendering speed through GPU parallel processing. For example, CN116109745A is an object rendering method and device based on instancing technology, wherein the method targets the situation where the performance details of the model in a three-dimensional scene gradually increase, and based on GPU instancing technology, 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 the model instance, 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.

[0009] However, for 3D graphics files that have already been generated, instancing technology is useless. This is because the premise of using instancing technology is: knowing that a certain 3D model needs to be rendered repeatedly in its 3D graphics file, but when reading a 3D graphics file, the system cannot know which 3D models in the 3D graphics file are the same as each other. This is because when the completed 3D graphics file is generated into a publishing format, it usually only stores the information of several triangles that constitute each 3D model, such as 3D graphics files in formats such as OBJ and FBX. 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 identity.

[0010] Based on the above, it can be seen that in the field of 3D graphics processing technology, whether it is data storage or graphics rendering, it is necessary to quickly match and find similar geometric bodies to improve work efficiency and quality. Based on this, the field urgently needs an optimized solution for 3D graphics file processing.

[0011] 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

[0012] In view of the deficiencies of the prior art, the present invention provides a method for quickly matching and searching similar geometric bodies to solve at least some of the above technical problems.

[0013] The present invention discloses a method for realizing fast matching and searching of similar geometric bodies, which comprises the following steps:

[0014] S1. Determine 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;

[0015] 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.

[0016] 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 the multiple geometric bodies constituting one three-dimensional model is the same as the relationship between the 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.

[0017] 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-scale projects, it is often necessary to process a large number of 3D model files, which may contain duplicate design elements. The traditional manual search and replacement method is not only time-consuming and labor-intensive, but also prone to errors. However, through the method of the present invention, all duplicate 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, all related instances can be automatically updated by modifying only one place, realizing efficient batch editing and significantly improving work efficiency.

[0018] According to a preferred embodiment, step S1 includes the following sub-steps:

[0019] S1.1. Analyze the center point coordinates of all 3D models in the 3D graphics file;

[0020] 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;

[0021] S1.3. Compare the angle relationship between the vectors 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.

[0022] The above further details the specific implementation of step S1, proposing a method for preliminarily determining whether the spatial layouts of 3D models are identical by analyzing the coordinates of the 3D model's center point and the vector angles between the center points of each geometric object and the model's center point. This method, starting from a geometric perspective and leveraging the inherent structural characteristics of the 3D model to determine similarity, is highly scientific and practical.

[0023] By analyzing the center point coordinates, 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 identical models, but also find models that have similar overall layouts but subtle differences, 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 computational 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.

[0024] 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.

[0025] The above further refines the method for calculating the coordinates of the 3D model's center point in step S1.1, providing two different calculation methods: one based on the coordinates of all vertices in the 3D model, and the other based on the coordinates of the centers of all geometric entities in the 3D model. Both methods have their advantages and disadvantages, but both can provide effective support in different scenarios.

[0026] 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 a simple structure. 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, and is particularly suitable for scenarios such as real-time processing or large-scale data processing.

[0027] In summary, the introduction of these two calculation methods provides flexible options for calculating the center point coordinates of 3D models, allowing users to select the most appropriate method based on their specific needs. This flexibility not only improves the system's adaptability but also provides a more reliable foundation for subsequent model matching and analysis. In practical applications, this method helps improve the efficiency and accuracy of 3D model processing, particularly in scenarios requiring rapid response or processing large amounts of data, significantly enhancing overall system performance.

[0028] 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 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.

[0029] The above further defines a specific method for calculating vector angle relationships. This involves connecting the center points of all geometric bodies within a 3D model to the center point of the model itself, forming vectors from the center points of each body to the center point of the corresponding 3D model. The vector angles between the lines connecting these center points are then determined. Based on these angles, a metric is derived to characterize the relationship between the angles of each vector within the 3D model. By introducing the concept of vector angles, this method can more accurately describe the similarity of the internal structures of 3D models.

[0030] The introduction of vector angle relationships not only increases the dimension of model matching, but also improves the accuracy of matching. By calculating the vector angles between the center points of each geometric body and the center point of the model, the relative positional relationships of the internal geometric bodies of the model can be fully reflected. The advantage of this method is that even if the model rotates or translates 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 macroscopic layout but differ in microscopic details can also be found, providing important reference information for subsequent model optimization and analysis.

[0031] In summary, the introduction of vector angle relationships not only improves the accuracy and robustness of model matching but also provides a new tool for in-depth analysis of 3D models. This approach has broad application prospects, particularly in scenarios requiring high-precision matching and analysis, where it can significantly improve system performance and reliability. As 3D modeling technology continues to advance, this approach will play a vital role in more advanced applications.

[0032] According to a preferred embodiment, the indicator used to characterize the relationship between the angles between the vectors in the three-dimensional model is the sum of the angles between the vectors.

[0033] The present invention clarifies 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, so that the similarity of the internal structure of the model can be quantified concisely and effectively using this index.

[0034] By calculating the sum of the angles between these vectors, complex 3D structural information can be converted into a simple numerical value, facilitating subsequent comparison and analysis. The advantage of this method is that it not only quickly assesses the similarity between models but also, to a certain extent, reflects the complexity of the models' internal structures. Therefore, by comparing the sum of the angles between the vectors of different models, models with similar internal structures can be quickly identified, thereby improving the efficiency of matching searches.

[0035] Furthermore, the method for calculating the sum of vector angles offers excellent scalability and comparability. When processing large-scale model libraries, the sum of the vector angles for each model can be pre-calculated and stored as the model's eigenvalues. During model matching, candidate models can be quickly screened by simply comparing these eigenvalues, significantly reducing computational time and resource consumption. This method is not only applicable to the management of static model libraries but also enables real-time matching in dynamic environments, providing strong support for the efficient management and application of 3D models.

[0036] According to a preferred embodiment, in step S1.3, the sum of the vector angles of 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 layout of at least two three-dimensional models is the same.

[0037] The above further details how, in step S1.3, the spatial layout of at least two 3D models is determined to be identical by analyzing the sum of the vector angles between the center points of each 3D model. Specifically, by calculating the deviation of the sum of the vector angles between any two 3D models and comparing this deviation with a preset threshold, the consistency of the spatial layout of the models can be effectively determined.

[0038] The core advantage of this method is that it provides a way to quantify model similarity, making similarity determination more objective and accurate. By calculating the deviation of the sum of vector angles, the similarity between models can be converted into a specific numerical value, facilitating subsequent comparison and analysis. This method not only quickly identifies identical models but also discovers models that are similar in macroscopic layout but differ in microscopic details, thereby improving the accuracy of matching searches.

[0039] Furthermore, by setting a preset threshold, the strictness of the matching can be flexibly adjusted. For example, when high-precision matching is required, a smaller threshold can be selected to ensure that only highly similar models pass the match; whereas, when rapid screening of a large number of models is required, a larger threshold can be selected to increase matching speed. This flexibility allows users to select the most appropriate matching strategy based on their specific needs, achieving optimal results in various application scenarios.

[0040] In summary, calculating the deviation of the sum of vector angles and performing a threshold comparison not only improves the efficiency and accuracy of model matching but also provides new tools and methods for the management and analysis of 3D models. This method has broad application prospects, especially in scenarios requiring high-precision matching and analysis, where it can significantly improve system performance and reliability.

[0041] According to a preferred embodiment, step S2 includes the following sub-steps:

[0042] S2.1, matching comparison objects;

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

[0044] The above further refines the specific implementation of step S2, proposing a method for matching comparison objects and determining the consistency of the compared geometric bodies in a sequential comparison sequence. This method, by gradually refining the comparison of the internal structure of the model, can more accurately identify identical geometric bodies, thereby ensuring the consistency of the model in microscopic details.

[0045] First, by matching comparison objects, geometric objects with identical features in 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 potential matching objects, providing a reliable basis for subsequent detailed comparisons. Second, by determining the consistency of the compared geometric objects in a sequential order, the similarity of each geometric object can be systematically verified, ensuring the consistency of the model in microscopic details. This method not only improves matching accuracy but also provides important reference information for subsequent model optimization and analysis.

[0046] This approach also offers excellent scalability and comparability. When processing large-scale model libraries, the eigenvalues ​​of each geometric body can be pre-calculated and stored as comparison targets. During model matching, candidate models can be quickly screened by simply comparing these eigenvalues ​​sequentially according to a pre-set comparison sequence, significantly reducing computational time and resource consumption. This approach is not only applicable to the management of static model libraries but also enables real-time matching in dynamic environments, providing strong support for the efficient management and application of 3D models.

[0047] In summary, by matching and comparing objects and determining geometric consistency according to the comparison sequence, not only does this improve the efficiency and accuracy of model matching, it also provides new tools and methods for 3D model management and analysis. This approach has broad application prospects, especially in scenarios requiring high-precision matching and analysis, where it can significantly improve system performance and reliability.

[0048] 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.

[0049] The above further refines the implementation of step S2.1, proposing a method that analyzes the relationship between the vectors from the center points of the two selected 3D models' geometric bodies to the center points of the corresponding 3D models, identifies the geometric bodies to be compared within the two 3D models, and then sorts and pairs these geometric bodies based on their comparison sequences within the 3D models to obtain paired comparison objects. This method, by introducing the concept of comparison sequences, makes the pairing of geometric bodies more organized and efficient.

[0050] By analyzing the relationship between vectors and determining a comparison sequence, unnecessary computational overhead can be effectively reduced and matching efficiency can be improved. Specifically, the introduction of a comparison sequence makes the pairing of geometric bodies more systematic and orderly, avoiding the uncertainty brought about 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 geometric bodies that are similar in macroscopic layout but differ in microscopic details, providing important reference information for subsequent model optimization and analysis.

[0051] In summary, the introduction of the comparison sequence concept not only improves the efficiency and accuracy of geometry pairing but also provides new tools and methods for the management and analysis of 3D models. This approach has broad application prospects, especially in scenarios requiring high-precision matching and analysis, where it can significantly improve system performance and reliability.

[0052] 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:

[0053] a. Preliminarily determine whether the two geometric bodies are consistent based on their basic properties. If the basic properties are different, the process will be exited; if they are the same, the subsequent process will be executed;

[0054] b. For the geometric body to be compared in the first 3D model, use a preset algorithm to extract the faces required for calculation, and calculate the face normal of each extracted face and the face below it, where each extracted face has two corresponding normals;

[0055] c. Calculate the angles between the normals of all faces involved in the calculation and the next face, and add them together to get the sum of the angles;

[0056] d. For the geometry to be compared in the second 3D model, execute the process from b to c to form another angle sum;

[0057] e. Compare the sum of the included angles of the two geometric bodies. If they are the same, the geometric bodies are the same; otherwise, they are different and the program exits.

[0058] The above content further refines the specific implementation method of step S2.2 and proposes a method for determining 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, a preliminary judgment is made as to whether the two geometric bodies are consistent; second, for the geometric body to be compared in the first 3D model, a preset algorithm is used to extract the faces that need to be involved in the calculation, and the face normal of each extracted face and the face next to it is calculated; third, the normal angles corresponding to all faces that need to be involved in the calculation and the face next to it are calculated, and the sum of the angles is accumulated; finally, for the geometric body to be compared in the second 3D model, the same process is executed and the angle sums of the two geometric bodies are compared to see if they are the same.

[0059] The core advantage of this approach lies in its multi-level comparison, ensuring geometric similarity across multiple dimensions. First, through a preliminary assessment of basic properties, obviously inconsistent geometries can be quickly eliminated, reducing unnecessary computational overhead. Second, by calculating face normals and comparing summed angles, geometric similarity can be more accurately verified. This approach not only improves matching accuracy but also provides detailed geometric information for subsequent model optimization and analysis.

[0060] Furthermore, by using a pre-set algorithm to extract the faces required for calculation, the granularity and accuracy of the calculation can be flexibly adjusted. For example, when high-precision matching is required, a smaller sampling interval can be selected to ensure that every face is fully considered; when rapidly screening a large number of geometric bodies, a larger sampling interval can be selected to improve computational efficiency. This flexibility allows users to select the most appropriate matching strategy based on their specific needs, achieving optimal results in various application scenarios.

[0061] Overall, this multi-level comparison and detailed geometric verification not only improves the efficiency and accuracy of geometry matching but also provides new tools and methods for 3D model management and analysis. This approach has broad application prospects, particularly in scenarios requiring high-precision matching and analysis, where it can significantly improve system performance and reliability.

[0062] According to a preferred embodiment, the method also includes a step S0 for grouping 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.

[0063] The present invention includes step S0 before step S1 to pre-classify models, significantly improving the efficiency of subsequent matching searches. First, grouping allows models with similar features to be grouped together, reducing unnecessary cross-group comparisons. The advantage of this approach is that it effectively narrows the search scope, reducing computational time and resource consumption. Specifically, grouping by geometric number allows for rapid screening of models of similar complexity; grouping by description allows for classification based on model name, purpose, creator, and other information, improving search targeting; grouping by storage structure allows for classification based on file format and data structure characteristics, improving matching accuracy; and grouping by triangle facet sets allows for classification based on model geometry, enhancing matching robustness. Furthermore, grouping provides valuable reference information for subsequent model optimization and analysis. For example, by analyzing models within the same group, common patterns and repetitive elements within the design can be identified, helping designers simplify model structures and improve design efficiency. Furthermore, grouping supports model version management and collaborative work. For example, grouping models from the same project together facilitates version control and team collaboration.

[0064] In summary, pre-grouping 3D models not only improves the efficiency and accuracy of subsequent matching searches, but also provides new tools and methods for 3D model management and analysis. This approach has broad application prospects, especially in scenarios requiring the processing of large-scale model libraries, where it can significantly improve the overall performance and reliability of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] Figure 1 It is a schematic diagram showing a 3D scene that includes multiple 3D models of the same type of equipment;

[0066] Figure 2 This is a flowchart of the steps of a method for implementing a preferred embodiment of the present invention;

[0067] Figure 3 This is the main view of an example 3D model containing three geometric bodies;

[0068] Figure 4 This is an axial view of an example 3D model containing three geometric bodies;

[0069] Figure 5 yes Figure 3 、 Figure 4 Schematic diagram of the vector angle relationship in the three-dimensional model shown;

[0070] Figure 6 It is a schematic diagram of the normal information of a face (such as a triangle);

[0071] 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;

[0072] Figure 8 It is a flowchart of an implementation method of a preferred embodiment provided by the present invention. DETAILED DESCRIPTION

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

[0074] The present invention discloses a method for implementing rapid matching and searching for similar geometric bodies. The method is used to optimize subsequent processing of a 3D graphic file in a published format by identifying identical 3D models within the file. The term "identical" as used herein means that all 3D components (i.e., geometric bodies) constituting the 3D model have identical shapes and that the relative positions of all 3D components constituting the 3D model are consistent. To achieve the above objectives, the present invention provides that, when processing a 3D graphic file in a published format on a server, the 3D graphic file includes at least two 3D models.

[0075] like Figure 2 As shown, preferably, the implementation method of the present invention may include the following steps:

[0076] S1. Determine 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;

[0077] 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.

[0078] Preferably, if Figure 2As shown, before step S1, step S0 for grouping the three-dimensional models may also be included, wherein in step S0, the three-dimensional models may be 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.

[0079] 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 divided 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.

[0080] Preferably, the description refers to various information that can express the characteristics of the 3D model, including but not limited to textual descriptions such as the model's name, purpose, creator, and copyright information. It can also be a description of the model's characteristics derived through mathematical formulas or algorithms. Furthermore, natural language processing techniques can be used to extract keywords from the model's textual description, and then the models can be grouped based on keyword similarity. Alternatively, the characteristics of each model can be converted into a feature vector, and then clustering algorithms (such as K-means) can be used to group the models based on the similarity of the feature vectors.

[0081] Preferably, the storage structure relates to how 3D models are represented in a computer system. Different file formats may result in different storage structures. Common 3D graphics file formats include STL, OBJ, and FBX. Furthermore, 3D models can be grouped based on the file format used. Alternatively, the data structure of each model can be analyzed in depth, such as the depth of the node tree and the connection between nodes, and grouped based on these structural properties.

[0082] 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 collections of triangular faces in different models.

[0083] Preferably, if Figure 2 As shown, step S1 may include one or more of the following sub-steps:

[0084] S1.1. Analyze the center point coordinates of all 3D models in the 3D graphics file;

[0085] 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;

[0086] S1.3. Compare the angle relationship between the vectors 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.

[0087] 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.

[0088] 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:

[0089]

[0090] Where ptC is the coordinate of the center point of a 3D model, consisting of x, y, and z components; pt[i].x, pt[i].y, and pt[i].z represent the x, y, and z coordinates of the i-th vertex, respectively; and ptcount is the total number of vertices, n.

[0091] Furthermore, in the above formula, the following terms are the sums of the x-coordinates, y-coordinates, and z-coordinates of all vertices:

[0092]

[0093] Preferably, in the above formula, the x, y, and z coordinates of all vertices are summed separately, and then the sum of each set of coordinates is divided by the number of vertices (ptcount) to obtain the average value for each axis. The final ptC is the coordinate of the center point of all vertices. This formula is applicable to any 3D model with multiple vertices and can effectively calculate the geometric center of these vertices.

[0094] Preferably, the coordinates of the center point (center of mass) of each 3D model can be determined by calculating the center point coordinates of all geometric bodies in all 3D models. The center point coordinates of a geometric body in a 3D model can be calculated from the vertex coordinates of the geometric body. Therefore, the coordinates of the center point (center of mass) of a 3D model can be calculated using the following formula:

[0095]

[0096] Where ptC is the coordinate of the center point of a 3D model, consisting of x, y, and z components; ptE[j].x, ptE[j].y, and ptE[j].z represent the x, y, and z coordinates of the center point of the j-th geometric body, respectively; and ptEcount is the number of geometric bodies in the 3D model, that is, m.

[0097] 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.

[0098] Preferably, in step S1.2, the "vector angle relationship" means first connecting 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 determining the vector angles of the center point connecting the vectors from the center points of each geometric body to the center point 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.

[0099] Preferably, the vector angle of the center point 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:

[0100]

[0101] 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.

[0102] Specifically, the calculation steps are as follows:

[0103] Compute the dot product:

[0104] a·b=a x b x +a y b y +a z b z

[0105] Calculation module:

[0106]

[0107] Calculate the cosine of the angle:

[0108]

[0109] Calculate the angle:

[0110]

[0111] 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.

[0112] 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 with a center point of ptE1, a second geometric body with a center point of ptE2, and a third geometric body with a center point of ptE3.

[0113] Preferably, by analyzing the normal information of the line connecting the center point of each geometric body and the center point of the three-dimensional model in which it is located, the vector angle between the center point of each geometric body and the center point of the corresponding three-dimensional model is determined (such as 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. 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 5 The 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 is the direction vector from ptC to PtE1. Preferably, the index used to characterize the relationship between the angles between the vectors in the three-dimensional model may be the sum of the angles between the vectors.

[0114] Preferably, in step S1.3, whether the spatial layouts of at least two three-dimensional models are the same is determined by comparing the vector angle relationship 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 the preset threshold, so as to determine whether the spatial layouts of multiple three-dimensional models are the same.

[0115] For example, for the first three-dimensional model of the first group of devices, the sum of the vector angles of the lines connecting the center points is calculated to obtain Total1. Then, for the second three-dimensional model of the second group of devices, the same calculation principle as that of the first three-dimensional model of the first group of devices is used to calculate the same indicator Total2. When Total1 and Total2 are compared, if abs(Total1-Total2) is less than a preset threshold (e.g., 1×10 -5), then the two 3D models can be considered to have the same spatial layout, or in other words, to have the same geometric layout. If there are more than two 3D models, any two 3D models can be selected through permutations and combinations to perform the above comparison to determine whether the spatial layouts of these models are the same.

[0116] Preferably, when the implementation method includes step S0, the three-dimensional models can be grouped and the vector angle relationships of all three-dimensional models in the same group can be compared to preliminarily determine whether the three-dimensional models are identical, thereby obtaining a preliminary determination. This is because if the geometric distributions of two models are exactly the same, then the relative relationship between their center points should also be very close.

[0117] When the method in the first part is used to determine whether the layouts of two 3D models are the same, it is still not possible to assume that the two 3D models are identical. 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 cases where the layout is 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 of the 3D models are consistent. Since step S1 has completed most of the exclusion and filtering, the computing power required for step S2 is limited.

[0118] Preferably, if Figure 2 As shown, step S2 may include one or more of the following sub-steps:

[0119] S2.1, matching comparison objects;

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

[0121] 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 screened three-dimensional models to the center points of the corresponding three-dimensional models. It is preliminarily determined that the 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 based on the numerical size relationship of the vectors from the center points of each geometric body to the center points 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 numerical values. Alternatively, the 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 a ratio, for example, if ||ptE1-ptC||:||ptE2-ptC||:||ptE3-ptC||=1:2:3, then the geometric bodies can be sorted in the order of first geometric body, second geometric body, third geometric body, or third geometric body, second geometric body, first geometric body. Furthermore, if the magnitude of the modulus of some vectors is 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. Alternatively, the geometric bodies belonging to the same situation can be assigned the same comparison sequence, i.e., sorted in parallel, so that the matching of these geometric bodies can be verified one by one by permutation and combination in subsequent geometric body comparison.

[0122] 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:

[0123] a. Preliminarily determine whether two geometric bodies are consistent based on their basic properties. For example, determine whether at least one geometric body constituting a 3D model has the same number of vertices as another geometric body in the 3D model. If they are not consistent, exit the process; if they are consistent, proceed to the next step.

[0124] b. For the geometry to be compared in the first 3D model, use a preset algorithm to extract the faces required for calculation (e.g., 1, 6, 11, 17, etc.), and calculate the face normal of each extracted face and the face below it. Each extracted face may correspond to two normals.

[0125] c. Calculate the angles between the normals of all faces involved in the calculation and the next face, and add them together to get the sum of the angles;

[0126] d. For the geometry to be compared in the second 3D model, execute the process from b to c to form another angle sum;

[0127] e. Compare the sum of the included angles of the two geometric bodies. If they are the same, the geometric bodies are the same; otherwise, they are different and the program exits.

[0128] Preferably, in the above process a, whether the two geometric bodies are identical can be preliminarily determined by determining the number of vertices of the two geometric bodies. In addition, whether the number of triangles of the two geometric bodies is equal can also be determined. If they are not equal, the two geometric bodies are considered to be different geometric bodies. In other words, the basic attributes of the geometric bodies used for preliminary determination in process a may include but are not limited to the number of vertices and the number of triangles of the geometric bodies. Furthermore, in step a, whether the two geometric bodies are identical can be preliminarily determined by determining only the number of vertices or the number of triangles of the two geometric bodies, or a method of simultaneously determining the number of vertices and the number of triangles of the two geometric bodies can be used to obtain a relatively more accurate determination result. Preferably, in 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, the method of simultaneously determining the number of vertices and the number of triangles of the two geometric bodies can be preferred to accurately filter out the correct matching relationships.

[0129] Preferably, in the above process b, the preset algorithm can be to set a reasonable sampling interval (for example, setting 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, and the lower the comparison accuracy. Figure 7 Shows the normal information of a face extracted from the geometry that needs to be involved in the calculation.

[0130] Preferably, in the above process c, starting from the first extracted face, the angle between the normal of the next face in the geometric body and the normal of the face is calculated, recorded, and added to the total value dTotalVE1. For example, the normal of the first extracted face is V1, and the normal of the next 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. Then, based on the set sampling interval step = 5, the subsequent normal information and angles are calculated one by one, for example, DV7 is the angle between V7 and V6, and the total value dTotalVE1 is accumulated.

[0131] 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 that has 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.

[0132] Preferably, in the above process e, dTotalVE1 is compared with dTotalVE2. If abs(dTotalVE1-dTotalVE2) is less than a preset threshold (such as 1×10 -5 ), then the two geometries can be considered to be the same geometries.

[0133] Furthermore, based on the determined comparison sequence, pairs of geometric bodies to be compared can be sequentially extracted and the above process can be executed according to the preset comparison rules to determine whether all matched comparison objects are identical geometric bodies. If a pair of geometric bodies is determined to be non-identical through the above process, the process is terminated. Otherwise, the comparison sequence is continued, with the geometric bodies to be compared sequentially, until all geometric bodies are compared. If all geometric bodies are compared and the comparison results are identical, it can be determined that the two 3D models are identical.

[0134] 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 model, wherein the four judgments may include judging whether the number of geometric bodies is the same, judging whether the vector angle relationship between the geometric bodies is the same, quickly judging whether each pair of geometric bodies is the same geometric body, and judging whether each pair of geometric bodies is the same geometric body in turn.

[0135] 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 on 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 having to be set. Therefore, the applicant reserves the right to abandon or delete the relevant preferred features at any time.

Claims

1. A server for processing a three-dimensional graphic file in a published format, characterized in that: The server is configured to: 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; Comparing the angle relationship between vectors 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; When the layouts of the two three-dimensional models are the same, the geometric bodies contained in the two three-dimensional models are paired one by one according to a preset matching rule to obtain multiple pairs of mutually matching geometric bodies; According to the comparison sequence, it is determined in turn whether the geometric bodies to be compared are consistent with each other.

2. The server according to claim 1, wherein: The server is further configured to: calculate the coordinates of the center point of the three-dimensional model based on the coordinates of all vertices of the three-dimensional model; Alternatively, the center point coordinates of the three-dimensional model are calculated based on the center point coordinates of all geometric bodies of the three-dimensional model.

3. The server according to claim 2, wherein: The steps of analyzing the vector angle relationship include: Connecting all center points of all geometric bodies of the corresponding three-dimensional model to the center point of the three-dimensional model itself to form vectors from the center points of the respective geometric bodies to the center point of the corresponding three-dimensional model; Determine the vector angle between the center points of the respective geometric bodies and the center points of the corresponding three-dimensional models; An index for characterizing the relationship between the vector angles in the three-dimensional model is obtained according to the vector angles, and the index is the sum of the vector angles.

4. The server according to any one of claims 1 to 3, characterized in that: The step of sequentially judging whether the geometric bodies to be compared are consistent with each other according to the comparison sequence includes: Preliminary judgment of whether two geometric bodies are consistent based on their basic properties; For the geometric body to be compared in the first 3D model, a preset algorithm is used to extract the faces that need to be involved in the calculation, and the face normal of each extracted face and the next face is calculated. 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; For the geometry to be compared in the second 3D model, another angle sum is formed according to the same process; Compare the angle sums of two geometries. If they are the same, the geometries are the same. Otherwise, they are different and the program exits.

5. The server according to claim 4, wherein: The server is further configured to: In the process of calculating the sum of angles, when the geometric body is composed of a large number of triangles, the preset algorithm is to set a sampling interval to complete the extraction of the surface according to the sampling interval.

6. The server according to any one of claims 1 to 3, characterized in that: The server is further configured to: When a pair of geometries is judged to be non-identical, the process exits; otherwise, the geometries to be compared are compared in sequence until all geometries are compared. If all geometries of two 3D models are compared and the comparison results are all the same geometries, then the two 3D models are the same 3D models.

7. The server according to any one of claims 1 to 3, characterized in that: The step of the server preliminarily determining whether the spatial layouts of at least two three-dimensional models are the same includes: By analyzing the sum of the vector angles connecting the center points in each three-dimensional model, the deviation value of the sum of the vector angles of any two three-dimensional models is calculated, and the calculated deviation value is compared with a preset threshold to determine whether the spatial layout of at least two three-dimensional models is the same.

8. The server according to any one of claims 1 to 3, characterized in that: The server is further configured to: Before analyzing the vector angle relationship, the three-dimensional model is grouped; 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 searching for the same three-dimensional model in the same group.

9. The server according to any one of claims 1 to 8, characterized in that: The step of the server determining the vector angle includes: Analyze the normal information of the line connecting the center point of each geometric body and the center point of the 3D model in which it is located. Based on the normal information, the vector angle between the center point connecting the vectors from the center point of each geometric body to the center point of the corresponding three-dimensional model is determined.

10. A method for processing a three-dimensional graphic file in a publishing format, characterized in that: The method comprises: 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; Comparing the angle relationship between vectors 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; When the layouts of the two three-dimensional models are the same, the geometric bodies contained in the two three-dimensional models are paired one by one according to a preset matching rule to obtain multiple pairs of mutually matching geometric bodies; According to the comparison sequence, it is determined in turn whether the geometric bodies to be compared are consistent with each other.

Citation Information

Patent Citations

  • Tensor-based three-dimensional model retrieval method

    CN106970956A

  • Three-dimensional model verification method, system, equipment and medium

    CN114661935A

  • Similar model searching method and device and storage medium

    CN115496865A

  • Similarity matching search method and system based on geometrical shape features of three-dimensional model

    CN116342908A

  • Method and system for determining same geometric object in three-dimensional space

    CN116861023A