Server and method for processing three-dimensional graphics documents in a publishing format
By analyzing the coordinates of the center point and the angle relationship between vectors in a 3D model, and combining grouping and comparison sequences, a fast matching and search for similar geometric objects was achieved. This solved the problems of low storage efficiency and insufficient rendering performance in 3D graphics processing, and improved work efficiency and system performance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- DMS CORP
- Filing Date
- 2024-12-25
- Publication Date
- 2026-07-24
AI Technical Summary
In 3D graphics processing, existing technologies struggle to efficiently identify and match identical 3D objects, resulting in low storage efficiency, wasted resources, and insufficient rendering performance, especially in complex scenes.
By analyzing the coordinates of the center point of the 3D model and the relationship between the vector angles, the consistency of the model's spatial layout and geometry is determined. The sum of the vector angles is compared with a preset threshold, and combined with grouping and comparison sequences, the rapid matching and search of similar geometries is achieved.
It improves the efficiency and accuracy of 3D model matching and searching, reduces file storage size, optimizes file structure, supports efficient editing and batch updates, and enhances work efficiency and system performance.
Smart Images

Figure CN120632149B_ABST
Abstract
Description
[0001] The original basis for this divisional application is patent application No. 202411920752X, filed on December 25, 2024, entitled "An Implementation Method for Fast Matching and Searching of Similar Geometric Objects". Technical Field
[0002] This invention relates to the field of three-dimensional graphics processing technology, and in particular to a server and method for processing three-dimensional graphics files in a published format. Background Technology
[0003] In modern 3D modeling and computer graphics, especially in applications involving the deployment of numerous identical types of equipment 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 a 3D scene. This means that the same model of equipment needs to be installed in different locations, such as pressure gauges and motors. Generally, the same type of equipment is based on the same 3D model, and multiple models are created by repeatedly placing it in different locations within the scene and performing translation, rotation, scaling, and other operations. Figure 1 As shown.
[0004] Traditionally, there are two main data storage methods for the same three-dimensional object in different locations (e.g., repeated placement of the same model of equipment in different locations): one is to make a complete data copy for each placed equipment, and the other is to record only the transformation information relative to the original equipment.
[0005] The first method, full copy storage, while ensuring the independence of each device object and offering flexibility, particularly when modifying individual object attributes, also introduces significant problems. Firstly, storage efficiency is low; file size expands rapidly with the number of devices, especially in densely packed scenes where storage requirements can increase tens of times or more. Secondly, when uniformly updating or replacing devices of the same model, the presence of duplicate data necessitates significant manual operations that consume considerable time and manpower. More critically, during 3D rendering, this duplicate data directly leads to a substantial waste of memory and video memory resources, impacting rendering efficiency and performance, especially noticeable when handling highly complex scenes.
[0006] In contrast, the second approach references 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 greater efficiency during updates 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 for data storage, which undoubtedly has a serious impact on work efficiency. If we could find the same 3D objects in the data stored using the first method and convert the data format to the second method, it would provide a more convenient and efficient way to operate on many subsequent tasks. However, the core of this operation lies in finding the same data, which is a challenge in 3D data processing. The traditional method involves comparing the parameters of each vertex of a triangle one by one; due to the amount of data and the need for precision, both accuracy and speed are significant issues.
[0008] The core purpose of instantiation is to efficiently handle large numbers 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. Instantiation allows a geometry to be drawn multiple times, each time with different transformations (position, rotation, scaling), colors, or other attributes. In computer graphics, instantiation allows a geometric model to be drawn multiple times, each time with different transformations (such as position, rotation, scaling), colors, or other attributes. This reduces memory usage and improves rendering speed through GPU parallel processing. For example, CN116109745A describes an object rendering method and apparatus based on instantiation technology. This method, addressing the increasing detail of models in 3D scenes, utilizes GPU instantiation technology to achieve batch rendering of multiple card instances based on the same card model. When creating the model, multiple sets of textures and corresponding UV maps are created for the model. Furthermore, texture maps or other types of maps with similar properties are merged in the same material sphere. When rendering instances of the model, the material properties of different model instances are dynamically set by creating a script for the model, and the UV offset values are used to locate the merged textures, thus meeting the requirements of GPU instantiation rendering and enabling batch rendering of multiple different instances using the same model.
[0009] However, instantiation is useless for already generated 3D graphics files. This is because instantiation relies on the premise that a 3D model needs to be rendered repeatedly within its graphics file. When reading a 3D graphics file, the system cannot determine which 3D models within that file are identical. This is because completed 3D graphics files, when generated into publishing formats, typically only store information about a few triangles that constitute each 3D model, such as OBJ and FBX formats. Therefore, for publishing format 3D graphics files, efficient processing of a large number of identical 3D objects is only possible if their identity is confirmed.
[0010] As can be seen from the above, in the field of 3D graphics processing technology, both data storage and graphics rendering require rapid matching and searching of similar geometric shapes to improve work efficiency and quality. Therefore, there is an urgent need in this field for an optimized solution for 3D graphics file processing.
[0011] Furthermore, 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 this invention, but due to space limitations, not all details and contents were listed in detail. However, this does not mean that the present invention does not possess the features of these prior art. On the contrary, the present invention already possesses all the features of the prior art, and the applicant reserves the right to add relevant prior art to the background art. Summary of the Invention
[0012] To address the shortcomings of existing technologies, this invention provides a method for fast matching and searching of similar geometric objects, thereby solving at least some of the aforementioned technical problems.
[0013] This invention discloses a method for fast matching and searching of similar geometric objects, which includes the following steps:
[0014] S1. Determine whether the relationships between multiple geometric bodies constituting a 3D model are the same as the relationships between multiple geometric bodies in another 3D model.
[0015] S2. Given that the layouts of two 3D models are identical, determine whether the geometric shapes that make up the two 3D models are consistent.
[0016] The method of this invention achieves similarity matching and search of 3D models through two main steps. First, it determines whether the relationships between multiple geometric bodies constituting one 3D model are the same as the relationships between multiple geometric bodies in another 3D model (step S1). This step effectively identifies 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 or translation in their external shape. Next, if the layouts of the two 3D models are the same, it further determines whether the individual geometric bodies constituting the two 3D models are consistent (step S2). This step ensures that the models are similar not only in macroscopic layout but also in microscopic geometric details.
[0017] The core advantage of this method lies in its significantly improved efficiency and accuracy in 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 duplicate design elements. Traditional manual search and replacement methods are not only time-consuming and labor-intensive but also prone to errors. However, the method of this invention can quickly and accurately find all duplicate 3D models, which is of great significance for reducing file storage size. On the one hand, identifying and removing duplicate model data can significantly reduce the overall file size, 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. Furthermore, this method 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, achieving 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 within the 3D graphics file;
[0020] S1.2 Analyze the vector angle relationship between the center point coordinates of all geometric objects that constitute each three-dimensional model and the center point coordinates of the corresponding three-dimensional model;
[0021] S1.3 Compare the angular relationships between vectors in at least two 3D models to make a preliminary judgment on whether the spatial layout of at least two 3D models is the same.
[0022] The above content further refines the specific implementation of step S1, proposing a method to preliminarily determine whether the spatial layout of the 3D models is the same by analyzing the coordinates of the center point of the 3D model and the vector angle relationship between the coordinates of the center points of each geometric object and the coordinates of the model's center point. This method, from a geometric perspective, utilizes the inherent structural features of the 3D model for similarity judgment, and has high scientific validity and practicality.
[0023] By analyzing the coordinates of the center point, the spatial location of the model can be quickly determined, while the introduction of vector angle relationships further refines the comparison of the model's internal structure. This method can not only efficiently identify completely identical models but also discover models that, while having similar overall layouts, differ in subtle details, thus improving the accuracy of matching searches. In practical applications, this method helps improve the performance of 3D model management systems, especially when dealing with large-scale model libraries, significantly accelerating search speed and reducing unnecessary computational overhead. Furthermore, in-depth analysis of the model's internal structure can 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 objects of the three-dimensional model.
[0025] The above content further refines the method for calculating the center point coordinates of the 3D model in step S1.1, providing two different calculation methods: one is to calculate the center point coordinates based on the coordinates of all vertices of the 3D model, and the other is to calculate the center point coordinates based on the coordinates of the center points of all geometric objects in the 3D model. Both methods have their advantages and disadvantages, but both can provide effective support in different scenarios.
[0026] Vertex coordinate-based calculation methods are suitable for models with complex geometries. By integrating the positional information of all vertices, they can more accurately reflect the overall geometric center of the model. 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, making it particularly suitable for applications requiring high-precision matching. In contrast, calculation methods based on the coordinates of the geometric center points are more suitable for models with a smaller number of geometric objects and simpler structures. By directly using the coordinates of the geometric center points, the calculation process can be simplified, improving computational efficiency. This method, while maintaining basic accuracy, can significantly shorten computation time, making it particularly suitable for real-time processing or large-scale data processing scenarios.
[0027] In summary, the introduction of these two calculation methods provides a flexible option for calculating the center point coordinates of 3D models, allowing users to choose the most suitable 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, especially in scenarios requiring rapid response or processing of large amounts of data, significantly enhancing the overall system performance.
[0028] According to a preferred embodiment, the vector angle relationship is as follows: first, all center points of all geometric objects of the corresponding 3D model are connected to the center point of the 3D model itself to form vectors from the center point of each geometric object to the center point of the corresponding 3D model; then, the vector angle between the center point lines connecting the vectors from the center point of each geometric object to the center point of the corresponding 3D model is determined; and based on these angles, an index is obtained to characterize the relationship between the vector angles in the 3D model.
[0029] The above content further defines the specific calculation method for vector angle relationships. This involves connecting the center points of all geometric objects within the corresponding 3D model to the center point of the 3D model itself, forming vectors from each geometric center point to the corresponding 3D model center point. Then, the angles between these vectors are determined, and an index is obtained based on these angles to characterize the relationships between the angles of various vectors within the 3D model. This method, by introducing the concept of vector angles, can more accurately describe the similarity of the internal structure of the 3D model.
[0030] The introduction of vector angle relationships not only increases the dimensionality of model matching but also improves its accuracy. By calculating the vector angles between the center points of each geometric object and the center point of the model, the relative positional relationships of the internal geometric objects within the model can be comprehensively 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 relationships will not change, thus effectively identifying 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. Furthermore, by calculating vector angle relationships, models that are similar in macroscopic layout but differ in microscopic details can be discovered, 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 new tools for in-depth 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. With the continuous advancement of 3D modeling technology, this method will play an important role in more advanced applications.
[0032] According to a preferred embodiment, the index used to characterize the relationship between the included angles of each vector in a three-dimensional model is the sum of the included angles of each vector.
[0033] This invention clarifies that the index used to characterize the relationship between the angles between vectors in a 3D model is the sum of the angles between the vectors, thus enabling a simple and effective quantification of the similarity of the internal structure of the model.
[0034] By calculating the sum of the angles between the vectors, complex 3D structural information can be transformed into a simple numerical value, facilitating subsequent comparison and analysis. The advantage of this method is that it can not only quickly assess the similarity between models but also reflect the complexity of the model's internal structure to a certain extent. 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 and searching.
[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 vector angles for each model can be pre-calculated and stored as a feature value. During model matching, only these feature values need to be compared to quickly filter candidate models, significantly reducing computation time and resource consumption. This method is not only suitable for managing 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 deviation value of the sum of the vector angles of the lines connecting the center points of each three-dimensional model is calculated by analyzing 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 content further details how step S1.3 determines whether the spatial layout of at least two 3D models is the same 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, it is possible to effectively determine whether the spatial layout of the models is consistent.
[0038] The core advantage of this method lies in its provision of a way to quantify model similarity, making similarity assessments more objective and accurate. By calculating the deviation of the sum of the angles between vectors, the similarity between models can be converted into a specific numerical value, facilitating subsequent comparison and analysis. This method can not only quickly identify completely identical models but also discover models that are similar in macroscopic layout but differ in microscopic details, thereby improving the accuracy of matching searches.
[0039] Furthermore, by setting preset thresholds, the stringency of the matching can be flexibly adjusted. For example, in situations requiring high-precision matching, a smaller threshold can be selected to ensure that only highly similar models pass the match; while in situations requiring rapid filtering of a large number of models, a larger threshold can be selected to improve the matching speed. This flexibility allows users to choose the most suitable matching strategy according to their specific needs, thereby achieving good results in different application scenarios.
[0040] In summary, by calculating the deviation of the sum of vector angles and comparing it using a threshold, this method 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 approach 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 and comparing objects;
[0043] S2.2. Determine whether the geometric objects to be compared are identical to each other according to the comparison sequence.
[0044] The above content further refines the specific implementation of step S2, proposing a method that matches comparison objects and sequentially determines whether the geometries to be compared are consistent according to the comparison sequence. This method, by progressively refining the comparison of the internal structure of the model, can more accurately identify completely identical geometries, thereby ensuring the consistency of the model in microscopic details.
[0045] First, by matching comparison objects, geometric shapes with similar features in two 3D models can be paired, thus narrowing down the comparison scope and reducing unnecessary computational overhead. The advantage of this method is its efficient screening of potential matches, providing a reliable basis for subsequent detailed comparisons. Second, by sequentially judging the consistency of the geometric shapes to be compared according to the comparison sequence, the similarity of each geometric shape can be systematically verified, ensuring consistency in the microscopic details of the model. This method not only improves the accuracy of matching but also provides important reference information for subsequent model optimization and analysis.
[0046] Furthermore, this method offers excellent scalability and comparability. When dealing with large-scale model libraries, the feature values of each geometry can be pre-calculated and stored as comparison objects. During model matching, candidate models can be quickly selected by comparing these feature values sequentially according to a pre-defined comparison sequence, significantly reducing computation time and resource consumption. This method is not only suitable for managing 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 judging the consistency of geometry sequentially according to the comparison sequence, this approach 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.
[0048] According to a preferred embodiment, in step S2.1, by analyzing the relationship between the vectors from the center point of the geometry of each of the two selected three-dimensional models to the center point of the corresponding three-dimensional model, the geometry to be compared among the geometry constituting the two three-dimensional models is determined. Based on the comparison sequence of each geometry in the three-dimensional model, these geometry are sorted and paired one by one to obtain paired comparison objects.
[0049] The above content further refines the specific implementation of step S2.1, proposing to determine the geometric objects to be compared among the geometric objects constituting the two selected 3D models by analyzing the relationship between the vectors from the center points of the geometric objects to the corresponding center points of the 3D models. Based on the comparison sequence of each geometric object in the 3D models, these geometric objects are sorted and paired one by one to obtain paired comparison objects. This method, by introducing the concept of a comparison sequence, makes the pairing of geometric objects more orderly and efficient.
[0050] By analyzing the relationships between vectors and determining the comparison sequence, unnecessary computational overhead can be effectively reduced, improving matching efficiency. Specifically, the introduction of the comparison sequence makes the pairing of geometries more systematic and ordered, avoiding the uncertainty caused by random pairing. The advantage of this method is that it can not only efficiently filter potential matching objects but also ensure that the pairing order of each geometry is reasonable, thereby improving the accuracy of subsequent comparisons. Furthermore, by sorting the comparison sequence, it is easier to discover geometries that are similar in macroscopic layout but differ in microscopic details, providing important reference information for subsequent model optimization and analysis.
[0051] In summary, by introducing the concept of contrast sequences, not only is the efficiency and accuracy of geometric pairing improved, but new tools and methods are also provided 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 geometries with 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. Based on the basic properties of the geometry, make a preliminary judgment on whether the two geometry objects are consistent. If the basic properties are different, exit; if they are the same, proceed with the subsequent process.
[0054] b. For the geometry to be compared in the first three-dimensional model, a preset algorithm is used to extract the faces that need to be included in the calculation, and the face normal of each extracted face and its next face is calculated. Each extracted face has two normals.
[0055] c. Calculate the angle between the normals of all faces that need to be included in the calculation and the normals of the next face, and sum 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 included angles of the two geometric shapes. If they are the same, the geometric shapes are the same; otherwise, they are different and the process ends.
[0058] The above content further refines the specific implementation of step S2.2, proposing a method to determine whether two geometric bodies are consistent using 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 participate in the calculation, and the face normal of each extracted face and its next face is calculated; third, the included angles of the normals corresponding to all faces that need to participate in the calculation and their next faces are calculated, and the included angles are accumulated to obtain the sum; finally, for the geometric body to be compared in the second 3D model, the same process is executed, and the included angles of the two geometric bodies are compared to see if they are the same.
[0059] The core advantage of this method lies in its multi-level comparison, ensuring the similarity of geometric shapes across multiple aspects. First, preliminary judgment of basic attributes quickly eliminates obviously inconsistent geometries, reducing unnecessary computational overhead. Second, by calculating surface normals and comparing the sum of included angles, the similarity of geometric shapes can be verified more accurately. This method not only improves matching accuracy but also provides detailed geometric information for subsequent model optimization and analysis.
[0060] Furthermore, by using a preset algorithm to extract the faces to be included in the calculation, the granularity and precision of the calculation can be flexibly adjusted. For example, in situations requiring high-precision matching, a smaller sampling interval can be selected to ensure that each face is fully considered; while in situations requiring rapid screening of a large number of geometries, a larger sampling interval can be selected to improve computational efficiency. This flexibility allows users to choose the most suitable matching strategy according to their specific needs, thereby achieving good results in different application scenarios.
[0061] In summary, through multi-level comparisons and detailed geometric information verification, not only is the efficiency and accuracy of geometric matching improved, but new tools and methods are also provided 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.
[0062] According to a preferred embodiment, the method further includes a step S0 for grouping the three-dimensional models before step S1, wherein in step S0, the three-dimensional models are grouped according to the number of geometry constituting the three-dimensional model, description, storage structure, or set of triangle faces constituting the three-dimensional model, so as to facilitate finding the same three-dimensional model within the same group.
[0063] This invention sets up step S0 before step S1 to significantly improve the efficiency of subsequent matching searches by pre-classifying the models. First, grouping allows models with similar characteristics to be categorized together, reducing unnecessary cross-group comparisons. The advantage of this method is its ability to efficiently narrow the search scope and reduce computation time and resource consumption. Specifically, grouping by the number of geometric shapes can quickly filter out models with similar complexity; grouping by description can classify models based on their name, purpose, creator, etc., improving the targeting of the search; grouping by storage structure can classify models based on file format and data structure characteristics, improving matching accuracy; and grouping by triangle face set can classify models based on their geometry, improving matching robustness. Furthermore, grouping provides valuable reference information for subsequent model optimization and analysis. For example, analyzing models within the same group can reveal common patterns and recurring elements in the design, helping designers simplify model structures and improve design efficiency. In addition, grouping can support 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 the management and analysis of 3D models. 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. Attached Figure Description
[0065] Figure 1 It is a schematic diagram of a 3D scene display containing multiple 3D models of the same type of equipment;
[0066] Figure 2 This is a flowchart of the steps of a preferred embodiment of the present invention.
[0067] Figure 3 This is a sample front view of a 3D model containing three geometric shapes;
[0068] Figure 4 This is an example axial view of a 3D model containing three geometries;
[0069] Figure 5 yes Figure 3 , Figure 4 The diagram shows the angle relationship between vectors in the 3D model.
[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 used in the calculation, extracted from the geometry;
[0072] Figure 8 This is a flowchart illustrating a preferred embodiment of the present invention. Detailed Implementation
[0073] The following is a detailed explanation with reference to the accompanying drawings.
[0074] This invention discloses a method for fast matching and finding similar geometric shapes, used to optimize the subsequent processing of a 3D graphics file by identifying identical 3D models within the file in a published format. Here, "identical" means that all 3D components (i.e., geometric shapes) constituting the 3D model have the same shape, and the relative positional relationships of all 3D components are consistent. To achieve the above objective, this invention specifies that when processing a published format 3D graphics file on a server, the 3D graphics 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 relationships between multiple geometric bodies constituting a 3D model are the same as the relationships between multiple geometric bodies in another 3D model.
[0077] S2. Given that the layouts of two 3D models are identical, determine whether the geometric shapes that make up the two 3D models are consistent.
[0078] Preferably, such as Figure 2As shown, before step S1, there may be a step S0 for grouping the three-dimensional models. In step S0, the three-dimensional models may be grouped according to the number of geometry constituting the three-dimensional model, description, storage structure, or set of triangle faces constituting the three-dimensional model, so as to find the same three-dimensional model within the same group.
[0079] Preferably, the number of geometric objects refers to the number of basic geometric elements that make up a three-dimensional model. 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 objects can be grouped into the same group. More detailed grouping can also be achieved by considering the number of specific types of geometric objects in the model or by 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, or model feature descriptions obtained through mathematical formulas or algorithms. Further, natural language processing techniques can be used to extract keywords from the model's textual description, and then the models can be grouped according to the similarity of the keywords; 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 according to the similarity of the feature vectors.
[0081] Preferably, the storage structure relates to how the 3D model is represented in the computer system. Different file formats may result in different storage structures. Common 3D graphics file formats include STL, OBJ, and FBX. Furthermore, the models can be grouped according to 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 methods between nodes, and grouped based on these structural properties.
[0082] Preferably, almost all 3D models can be decomposed into a series of triangular faces, and the set of these triangular faces determines the appearance and shape of the model. Therefore, grouping can be performed by comparing the similarity of the sets of triangular faces in different models.
[0083] Preferably, such as 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 within the 3D graphics file;
[0085] S1.2 Analyze the vector angle relationship between the center point coordinates of all geometric objects that constitute each three-dimensional model and the center point coordinates of the corresponding three-dimensional model;
[0086] S1.3 Compare the angular relationships between vectors in at least two 3D models to make a preliminary judgment on whether the spatial layout of at least two 3D models is 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 objects of the three-dimensional model.
[0088] Preferably, the coordinates of the center point (centroid) of each 3D model can be determined by analyzing the coordinates of all vertices of all 3D models, using the following formula:
[0089]
[0090] Where ptC is the coordinates of the center point of a 3D model, containing 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; and ptcount is the total number of vertices, i.e., n.
[0091] Furthermore, in the above formula, the following terms are sums of the x, y, and z coordinates of all vertices:
[0092]
[0093] Preferably, in the above formula, the x, y, and z coordinates of all vertices can be summed separately, and then the sum of each set of coordinates can be divided by the number of vertices, ptcount, to obtain the average value of 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 efficiently calculate the geometric center of these vertices.
[0094] Preferably, the center point (centroid) coordinates of each 3D model can be determined by calculating the center point coordinates of all geometries within each 3D model. The center point coordinates of a geometries within a 3D model can be calculated from the vertex coordinates of that geometries. Therefore, the center point (centroid) coordinates of a 3D model can be calculated using the following formula:
[0095]
[0096] Where ptC is the coordinates of the center point of a 3D model, containing 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 j-th geometric object, respectively; and ptEcount is the number of geometric objects in the 3D model, i.e., m.
[0097] Preferably, in the above formula, the x, y, and z coordinates of all geometric objects in the three-dimensional model can be summed separately, and then the sum of each set of coordinates can be divided by the number of geometric objects 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, "vector angle relationship" refers to first connecting all the center points of all the geometric objects of the corresponding three-dimensional model to the center point of the three-dimensional model itself to form vectors from the center point of each geometric object to the center point of the corresponding three-dimensional model, then determining the vector angle between the center point lines connecting the vectors from the center point of each geometric object to the center point of the corresponding three-dimensional model, and obtaining an index to characterize the relationship between the angles of each vector in the three-dimensional model based on these angles.
[0099] Preferably, the angle between the vectors connecting the center points can be obtained by referring to the 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 magnitudes (lengths) of vectors a and b, respectively.
[0102] Specifically, the calculation steps are as follows:
[0103] Calculate 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 included angle:
[0108]
[0109] Calculate the included angle:
[0110]
[0111] Among them, a x a y a z These are the components of vector a along the x-axis, y-axis, and z-axis, respectively; b x b yb z These are the components of vector b along 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 shapes is shown, such as Figure 5 As shown, the center point of the 3D model is ptC, and the three geometric bodies include: the first geometric body with the center point ptE1, the second geometric body with the center point ptE2, and the third geometric body with the center point ptE3.
[0113] Preferably, by analyzing the normal information of the lines connecting the center points of each geometric object to the center point of the corresponding 3D model, the vector angle between the lines connecting the center points of each geometric object to the center point of the corresponding 3D model is determined (e.g., ...). Figure 5 The α, β, γ shown in the figure Figure 5 The angle α between the vectors connecting the center points of the vectors is the angle between vectors ptE1-ptC and ptE2-ptC. Preferably, as shown... Figure 6 As shown, normal information is directional 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 is: ptE1 coordinates - ptC coordinates = (Δ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 vector of the first geometric object is the direction vector from ptC to PtE1. Preferably, the index used to characterize the relationship between the angles between the vectors in the 3D model can be the sum of the angles between the vectors.
[0114] Preferably, in step S1.3, the spatial layout of at least two three-dimensional models 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 lines connecting the center points of each three-dimensional model can be analyzed (e.g., the sum of the vector angles of the lines connecting the center points is calculated) to calculate the deviation value, and the calculated deviation value is compared with a preset threshold, thereby determining whether the spatial layout of multiple three-dimensional models is the same.
[0115] For example, for the first 3D model of the first group of devices, the sum of the vector angles between the lines connecting the center points of each point is calculated to obtain Total1. Then, for the second 3D model of the second group of devices, the same calculation principle as the first 3D model of the first group of devices is used to calculate the same index Total2. Total1 and Total2 are compared. If abs(Total1-Total2) is less than a preset threshold (e.g., 1×10⁻¹⁰), the result is considered complete. -5If two 3D models have the same spatial layout, or in other words, their geometric layouts are identical, then they can be considered to have the same spatial layout. When there are more than two 3D models, any two 3D models can be selected through permutation and combination for the above comparison to determine whether their spatial layouts are the same.
[0116] Preferably, when the implementation method includes step S0, the 3D models can be grouped together, and the angular relationships between vectors in all 3D models within the same group can be compared to preliminarily determine whether these 3D models are the same, thus obtaining a preliminary judgment conclusion. This is because if the geometric distributions in two models are exactly the same, then the relative relationships between their center points should also be very close.
[0117] When using the method described in Part 1 to determine that two 3D models have the same layout, it is still not possible to conclude that the two 3D models are identical. This is because the initial judgment above is a simplified judgment based on the center point relationship to reduce computational intensity. Therefore, there are cases where the layout is the same but the actual geometric shape is different, even when the center point is used as the judgment standard. Based on this, step S2 is used to determine whether the geometric shapes constituting the 3D model are consistent. Since step S1 has already completed most of the elimination and filtering, the computational power required for step S2 is limited.
[0118] Preferably, such as Figure 2 As shown, step S2 may include one or more of the following sub-steps:
[0119] S2.1 Matching and comparing objects;
[0120] S2.2. Determine whether the geometric objects to be compared are identical to each other according to the comparison sequence.
[0121] Preferably, in step S2.1, the geometric bodies to be compared among the geometric bodies constituting the two selected 3D models can be determined by analyzing the relationship between the vectors from the center points of the respective geometric bodies to the center points of the corresponding 3D models. It is preliminarily determined that several geometric bodies contained in the two 3D models with the same spatial layout need to be paired one-to-one according to a preset matching rule to obtain multiple pairs of mutually matching geometric bodies; these geometric bodies are the "comparison objects". Further, the preset matching rule can be any rule capable of clearly distinguishing each geometric body in the 3D model. For example, the comparison sequence of each geometric body in the 3D model can be determined based on the magnitude relationship of the vectors from the center points of each geometric body to the center points of the corresponding 3D models. The comparison sequence can be sorted according to the above values in descending or ascending order. Optionally, the magnitudes of the vectors from the center point of each geometric body to the center point of the corresponding 3D model can be determined by ratio calculation. For example, if ||ptE1-ptC||:||ptE2-ptC||:||ptE3-ptC||=1:2:3, then the vectors can be sorted according to the first geometric body, the second geometric body, and the third geometric body, or according to the third geometric body, the second geometric body, and the first geometric body. Further, if some vectors have the same magnitude, they can be distinguished in step S2.1 using other properties of the geometric bodies. For example, shape features: compare the shape descriptors of the geometric bodies (such as volume, surface area, aspect ratio, etc.); number of vertices: check the number of vertices of the geometric body; normal vector direction: calculate and compare the normal vectors of the geometric body. Alternatively, these geometric bodies belonging to the same situation can be assigned the same comparison sequence, i.e., sorted side-by-side, so that the matching of these geometric bodies can be verified one by one through permutation and combination during subsequent geometric body comparisons.
[0122] Preferably, after determining the comparison sequence of the geometric objects, step S2.2 can compare a pair of geometric objects with the same comparison sequence in two 3D models according to a preset comparison rule, wherein the preset comparison rule may include the following process:
[0123] a. Based on the basic properties of the geometry, make a preliminary judgment on whether the two geometries are consistent. For example, determine whether the number of vertices of at least one geometry constituting the 3D model is the same as that of the geometry of another 3D model. If they are different, exit; if they are the same, proceed with the subsequent process.
[0124] b. For the geometry to be compared in the first 3D model, a preset algorithm is used to extract the faces that need to be included in the calculation (e.g., 1, 6, 11, 17...), and the face normal of each extracted face and its next face is calculated. Each extracted face can correspond to two normals.
[0125] c. Calculate the angle between the normals of all faces that need to be included in the calculation and the normals of the next face, and sum 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 included angles of the two geometric shapes. If they are the same, the geometric shapes are the same; otherwise, they are different and the process ends.
[0128] Preferably, in the above process a, the consistency of two geometric shapes can be initially determined by judging the number of vertices. Furthermore, the number of triangles in the two geometric shapes can be judged; if they are not equal, the two geometric shapes are considered not to be the same. In other words, the basic attributes of the geometric shapes used for preliminary judgment in process a may include, but are not limited to, the number of vertices and the number of triangles. Further, in step a, the consistency of two geometric shapes can be initially determined by judging only the number of vertices or the number of triangles, or both can be judged simultaneously to obtain a more accurate judgment result. Preferably, in the case where some vectors have the same magnitude in step S2.1, the matching relationships of multiple parallelly sorted geometric shapes can be verified one by one using process a to quickly filter out unreasonable matching relationships. In such cases, judging both the number of vertices and the number of triangles simultaneously can be prioritized 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, set the sampling interval to 5) to complete the extraction of faces (usually triangles) according to the sampling interval, so as to be suitable for the case where the geometry is composed of a large number of triangles. The larger the interval value, the higher the comparison efficiency, but the comparison accuracy is reduced. Figure 7 This shows the normal information of a face that needs to be used in the calculation, extracted from the geometry.
[0130] Preferably, in the above process c, starting from the first extracted face, the angle between the normal of the next face in the geometry and the normal of the first 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 geometry to be compared in the second three-dimensional model is the geometry in the second three-dimensional model that has the same comparison sequence as the geometry to be compared in the first three-dimensional model, and the total value of the second vector angle dTotalVE2 of the geometry can be calculated using the same method described above.
[0132] Preferably, in the above process e, dTotalVE1 and dTotalVE2 are compared. If abs(dTotalVE1-dTotalVE2) is less than a preset threshold (e.g., 1×10), then... -5 If ), then the two geometric objects can be considered to be the same geometric object.
[0133] Furthermore, based on the determined comparison sequence, pairs of geometric objects to be compared can be extracted sequentially, and the above process can be executed according to preset comparison rules to determine whether all matching comparison objects are the same geometric object. If a pair of geometric objects is determined to be different after the above process, the process exits; otherwise, the comparison sequence continues to compare the geometric objects to be compared sequentially until all geometric objects have been compared. If all geometric objects have been compared and the comparison results show that they are the same geometric object, then it can be concluded that the two 3D models are the same 3D model.
[0134] Based on this, the implementation method of the present invention can be carried out as follows: Figure 8 The four different judgments shown are used to determine whether at least two sets of input 3D models are the same 3D models. The four judgments may include judging whether the number of geometric objects is the same, judging whether the vector angle relationship between geometric objects is the same, quickly judging whether each pair of geometric objects is the same geometric object, and judging whether each pair of geometric objects is the same geometric object in turn.
[0135] It should be noted that the specific embodiments described above are exemplary. Those skilled in the art can devise various solutions inspired by the disclosure of this invention, and these solutions all fall within the scope of this invention and its protection. Those skilled in the art should understand that this specification and its accompanying drawings are illustrative and do not constitute a limitation on the claims. The scope of protection of this invention is defined by the claims and their equivalents. This specification contains multiple inventive concepts; phrases such as "preferred" or "according to a preferred embodiment" indicate that the corresponding paragraph discloses an independent concept. The applicant reserves the right to file divisional applications based on each inventive concept. Throughout the text, the feature introduced by "preferred" is only an optional mode and should not be construed as mandatory. Therefore, the applicant reserves the right to abandon or delete relevant preferred features at any time.
Claims
1. A server for processing three-dimensional graphic files in a publishing format, characterized in that, The server is configured as follows: Analyze the vector angle relationship between the center point coordinates of all geometric objects that constitute each 3D model and the center point coordinates of the corresponding 3D model. Compare the angular relationships between vectors in at least two 3D models to make a preliminary judgment on whether the spatial layout of at least two 3D models is the same; When two 3D models have the same layout, the geometric objects contained in each of the two 3D models are matched one by one according to the preset matching rules to obtain multiple pairs of matching geometric objects. The geometric objects to be compared are judged one by one according to the comparison sequence to determine whether they are identical to each other; The step of determining whether the geometric objects to be compared are identical to each other according to the comparison sequence includes: Based on the basic properties of the geometric objects, a preliminary judgment can be made as to whether two geometric objects are consistent. For the geometry to be compared in the first 3D model, a preset algorithm is used to extract the faces that need to be included in the calculation, and the face normal of each extracted face and its next face is calculated. Calculate the included angles of the normals of all faces that need to be included in the calculation and the normals of the next face, and sum them together to obtain the angle sum; For the geometry to be compared in the second 3D model, another frame is formed following the same process; Compare the spans of two geometric shapes. If they are the same, the geometric shapes are identical; otherwise, they are different and the process ends.
2. The server according to claim 1, characterized in that, The server is also configured to calculate the coordinates of the center point of the 3D model based on the coordinates of all vertices of the 3D model. Alternatively, the center point coordinates of the 3D model can be calculated based on the center point coordinates of all the geometric objects in the 3D model.
3. The server according to claim 2, characterized in that, The analysis steps for the angle relationship between the vectors include: Connect the center points of all geometric objects of the corresponding 3D model to the center point of the 3D model itself to form a vector from the center point of each geometric object to the center point of the corresponding 3D model. Determine the angle between the vectors connecting the center points of each geometric object to the center point of the corresponding 3D model; An index is obtained based on the vector angles to characterize the relationship between the angles between the vectors in the 3D model. The index is the sum of the angles between the vectors.
4. The server according to claim 3, characterized in that, The server is also configured to: In the process of calculating the facets, when the geometry is composed of a large number of triangles, the preset algorithm is to set a sampling interval to complete the extraction of faces according to the sampling interval.
5. The server according to any one of claims 1 to 3, characterized in that, The server is also configured to: If a pair of geometric objects is determined to be different, the comparison is terminated; otherwise, the comparison sequence is continued to compare the geometric objects to be compared in turn until all geometric objects have been compared. If all the geometry of two 3D models is compared and the comparison results show that all the geometry is the same, then the two 3D models are identical 3D models.
6. The server according to any one of claims 1 to 3, characterized in that, The steps for the server to initially determine whether at least two 3D model spatial layouts are the same include: By analyzing the sum of the vector spans of the lines connecting the center points in each 3D model, the deviation value of the sum of the vector spans of any two 3D models is calculated, and the calculated deviation value is compared with a preset threshold to determine whether the spatial layout of at least two 3D models is the same.
7. The server according to any one of claims 1 to 3, characterized in that, The server is also configured to: Before analyzing the relationship between the included vector angles, the 3D model is grouped; Specifically, the three-dimensional models are grouped according to the number of geometric bodies constituting the three-dimensional model, their descriptions, storage structures, or the set of three-dimensional faces constituting the three-dimensional model, so as to facilitate the search for the same three-dimensional model within the same group.
8. The server according to claim 3, characterized in that, The steps for the server to determine the included angle of the vectors include: Analyze the normal information of the lines connecting the center points of each geometric object to the center point of the 3D model it belongs to. Based on the normal information, determine the vector clamp between the center points of the vectors connecting the center points of each geometric body to the center point of the corresponding 3D model.