Fast retrieval method of industrial 3D models based on binary decomposition
By performing recursive cutting and surface area function calculation on the three-dimensional model based on binary decomposition, the problem of time and energy consumption of three-dimensional model retrieval in the prior art is solved, and efficient and accurate industrial-grade three-dimensional model retrieval is achieved.
Patent Information
- Application Number
- CN202411052467.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-01
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2044-08-01
AI Technical Summary
The existing three-dimensional model retrieval technology consumes time and energy when processing high-dimensional data, and is difficult to meet the real-time retrieval needs of industrial-grade applications. Especially when dealing with models with complex structures or topological changes, the generalization ability and adaptability are limited.
Using a binary decomposition method, the three-dimensional model is recursively cut, primary and cumulative surface area functions are generated, and the similarity of the model is calculated through these functions to achieve rapid retrieval.
It improves the accuracy and efficiency of three-dimensional model retrieval, can analyze and compare complex features more precisely, meet the real-time needs of industrial-grade applications, and reduce resource consumption.
Smart Images

Figure CN119066231B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of industrial-grade three-dimensional model retrieval, and in particular to a method for rapid retrieval of industrial-grade three-dimensional models based on binary decomposition. Background Art
[0002] With the rapid development of digital manufacturing and virtual reality technology, the application of three-dimensional models has become extremely extensive in the fields of industrial design, manufacturing and virtual simulation. In particular, in industries such as automobiles, aviation, construction and games, the demand for three-dimensional models is growing at an exponential rate. However, the current three-dimensional model retrieval technology, especially the deep learning-based method, can learn the deep features of the model, but these technologies are time-consuming and energy-consuming when processing high-dimensional data, and it is difficult to meet the needs of real-time retrieval in industrial applications. Especially when dealing with industrial models with complex structures or variable topologies, the generalization ability and adaptability of existing deep learning methods are often relatively limited, which limits their effectiveness in diversified industrial applications. Another retrieval technology based on identifier comparison, although it can perform model matching and comparison to a certain extent, is essentially based on string comparison and cannot be directly connected to the three-dimensional model. This technology cannot perform fuzzy search to identify similar three-dimensional models during the comparison process, which greatly reduces the accuracy of the retrieval.
[0003] For example, a Chinese patent with authorization announcement number CN111382301B discloses a three-dimensional model generation method and system based on a generative adversarial network, including: based on a convolutional neural network, feature extraction of a three-dimensional reference model in a model database; based on a generative adversarial network, establishing a three-dimensional model network for information search; extracting a feature map of a three-dimensional model to be identified; based on a three-dimensional network model, generating a three-dimensional model that meets the similarity requirements with the three-dimensional model to be identified according to the feature map of the three-dimensional model to be identified, so as to improve the accuracy of retrieval.
[0004] The above methods have the problems raised by this background technology. The existing 3D model retrieval technology shows obvious limitations when facing the challenges of rapidly developing market demands and complex models. Therefore, it is necessary to develop new solutions to improve retrieval accuracy and efficiency to meet the growing industrial needs. Summary of the invention
[0005] In view of the shortcomings of the prior art, the purpose of this application is to provide an industrial-grade three-dimensional model rapid retrieval method based on binary decomposition, which can accelerate the retrieval speed and retrieval accuracy of the three-dimensional model. The specific scheme is as follows:
[0006] In a first aspect, an embodiment of the present application provides an industrial-grade three-dimensional model rapid retrieval method based on binary decomposition, comprising: obtaining a three-dimensional model to be retrieved, preprocessing the three-dimensional model to be retrieved in a three-dimensional coordinate system, and calculating the center point coordinates of the three-dimensional model to be retrieved, making the center point coordinates consistent with the origin coordinates in the three-dimensional coordinate system, and generating a first three-dimensional model;
[0007] recursively cutting the first three-dimensional model using a set of spheres whose centers are located at the origin in the three-dimensional coordinate system, calculating the surface area of the first three-dimensional model in each sphere, and generating a primary surface area function of the first three-dimensional model; integrating the primary surface area function of the first three-dimensional model to obtain a cumulative surface area function of the first three-dimensional model;
[0008] Based on the primary surface area function and the cumulative surface area function of the first three-dimensional model, a first evaluation index is used to calculate the similarity between the first three-dimensional model and the candidate three-dimensional model to generate a model similarity score.
[0009] As a possible implementation, the preprocessing includes at least one of the following: scale normalization, rotation normalization, and noise removal; and the generating the first three-dimensional model includes:
[0010] Based on the vertex information of the three-dimensional model to be retrieved, the center point of the three-dimensional model to be retrieved is calculated, and the mathematical expression of the center point is:
[0011]
[0012] Among them, O A is the coordinate of the center point of the three-dimensional model to be retrieved in the three-dimensional coordinate system, p i is the coordinate of the i-th vertex in the three-dimensional model to be retrieved, and M is the number of model vertices of the three-dimensional model to be retrieved.
[0013] The center point of the three-dimensional model to be retrieved is translated to the origin of the three-dimensional coordinate system. The mathematical expression of the vertex coordinates of the three-dimensional model to be retrieved after translation is:
[0014] p′ i =p i -O A
[0015] Among them, p′ i are the vertex coordinates of the 3D model to be retrieved after translation;
[0016] Based on the vertex coordinates p′ after translation of the three-dimensional model to be retrieved i , generating the first three-dimensional model.
[0017] As a possible implementation, recursively cutting the first three-dimensional model using a group of spheres whose centers are located at the origin includes:
[0018] Based on the preset retrieval accuracy, the radius sequence of the sphere is defined as Among them, R k is the radius of the kth sphere, N is the number of spheres, and the radius of each sphere is R k All meet the condition R k+1 >R k ;
[0019] Cutting the first three-dimensional model into N blocks using the N spheres;
[0020] Based on the radius of each of the spheres, determining a spherical area formed by each of the spheres in the three-dimensional coordinate system;
[0021] Divide each vertex in the first three-dimensional model into at least one of the following:
[0022] The vector norm corresponding to the vertex coordinates satisfies the mathematical expression: ||p′ i ||≤R k , dividing the vertex and its connected mesh parts into a spherical area formed by the kth sphere in the three-dimensional coordinate system;
[0023] The vector norm corresponding to the vertex coordinates satisfies the mathematical expression: ||p′ i ||>R k , dividing the vertex and its connected mesh parts outside the spherical area formed by the kth sphere in the three-dimensional coordinate system;
[0024] For each of the N spheres, extract all vertices that are divided into the interior of the k-th sphere and the mesh parts connected thereto, and mark them as a second three-dimensional model cut out of the k-th sphere, wherein the second three-dimensional model is a sub-model of the first three-dimensional model;
[0025] As a possible implementation manner, generating the primary surface area function of the first three-dimensional model includes:
[0026] representing the second three-dimensional model as a plurality of triangular meshes;
[0027] Calculate the area of each triangle and sum the areas of all triangles to obtain the surface area of the second three-dimensional model cut out by the kth sphere;
[0028] Based on the surface areas of the second three-dimensional models cut out of the N spheres, a primary surface area function of the first three-dimensional model is generated; wherein the primary surface area function of the first three-dimensional model is based on the sphere radius Rk is a piecewise function of unit.
[0029] As a possible implementation manner, integrating the primary surface area function of the first three-dimensional model to obtain the cumulative surface area function of the first three-dimensional model includes:
[0030] For each of the N spheres, calculate the radius R from the origin to the sphere k Cumulative surface area within the range;
[0031] Based on the radius R from the origin to each sphere in the N spheres k The cumulative surface area within the range is used to generate the cumulative surface area function of the first three-dimensional model; wherein the cumulative surface area function of the first three-dimensional model is based on the sphere radius R k A piecewise function of units is used to determine the radial characteristics of the first three-dimensional model.
[0032] As a possible implementation manner, the calculating the similarity between the first three-dimensional model and the candidate three-dimensional model based on the primary surface area function and the cumulative surface area function using a first evaluation index to generate a model similarity score includes:
[0033] Acquire the primary surface area function and the cumulative surface area function of the candidate three-dimensional model from a model library;
[0034] Based on the difference between the primary surface area functions of the first three-dimensional model and the candidate three-dimensional model, retaining the candidate three-dimensional model whose difference with the primary surface area function of the first three-dimensional model is less than a first target threshold;
[0035] For the retained candidate three-dimensional models, based on the difference between the cumulative surface area functions of the first three-dimensional model and the candidate three-dimensional model, retain the candidate three-dimensional model whose difference in cumulative surface area function with the first three-dimensional model is less than a second target threshold;
[0036] A model similarity score is generated based on a difference between the primary surface area function and a difference between the cumulative surface area functions of the first three-dimensional model and the candidate three-dimensional model.
[0037] As a possible implementation, the first evaluation index is a composite evaluation function, and the function expression of the model similarity score is:
[0038]
[0039] Among them, Score Composite Indicates that the first evaluation index is the model similarity score under the composite evaluation function, R k is the radius of the kth cutting sphere, w(Rk ) is the weight corresponding to the radius of the k-th cutting ball, Diff F (R k ) is the radius R k The difference in the primary surface area function at F1 (R k ) is the radius R k The difference in the cumulative surface area function at 1-w(R k ) is the weight w(R k ) complementary weights so that the sum of the weights is 1, and N is the total number of balls used to cut the model;
[0040] The weight w is set to be about R k The function of weight w(R k ) is:
[0041]
[0042] Among them, α is the base weight, e is a natural constant, and β is the coefficient of the exponential part of the exponential function, which is used to control the rate at which the weight w increases with the radius.
[0043] As a possible implementation, after calculating the similarity between the first three-dimensional model and the alternative three-dimensional model and generating a model similarity score, it also includes: based on the model similarity score, sorting from low to high to display the alternative three-dimensional models whose model similarity score with the first three-dimensional model is less than or equal to a third target threshold.
[0044] In a second aspect, an optional implementation of the present application further provides a computer device, a processor, and a memory, wherein the memory stores machine-readable instructions executable by the processor, and the processor is used to execute the machine-readable instructions stored in the memory, and when the machine-readable instructions are executed by the processor, the machine-readable instructions perform the steps in the above-mentioned first aspect, or any possible implementation of the first aspect.
[0045] In a third aspect, an optional implementation of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed, the steps of the above-mentioned first aspect, or any possible implementation of the first aspect are executed.
[0046] Compared with the prior art, the present invention has the following beneficial effects:
[0047] 1. Through the binary decomposition method, the present application can more accurately analyze and compare the complex features of the three-dimensional model, thereby improving the retrieval accuracy of the three-dimensional model in industrial applications, especially for the processing of models with complex structures or variable topologies.
[0048] 2. This application uses binary decomposition to recursively cut the model space into smaller parts, reducing the amount of data that needs to be processed during the retrieval process, simplifying the data processing process, and thus achieving efficient data retrieval. The present invention optimizes the time and resource consumption in the search process by finely controlling the granularity of data processing, and meets the needs of real-time retrieval.
[0049] 3. This application can significantly improve the efficiency of industrial design and manufacturing, especially in industries with high automation and precision requirements, such as automobiles, aviation, and game development. In addition, by reducing the redundancy of parts and optimizing component matching, this application also helps to reduce costs and improve production efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 A flowchart of a method for rapid retrieval of industrial-grade three-dimensional models based on binary decomposition provided in an embodiment of the present application;
[0051] Figure 2 A schematic diagram of a model search provided in an embodiment of the present application;
[0052] Figure 3 A schematic diagram of a table-based search interface provided in an embodiment of the present application;
[0053] Figure 4 A schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0054] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.
[0055] The following is an explanation of the industrial-grade three-dimensional model rapid retrieval method based on binary decomposition disclosed in the embodiment of the present application.
[0056] See also Figure 1 FIG. 1 is a flowchart of a method for rapid retrieval of industrial-grade three-dimensional models based on binary decomposition provided by an embodiment of the present application. The method includes steps S101 to S103, wherein:
[0057] S101, obtaining a three-dimensional model to be retrieved, preprocessing the three-dimensional model to be retrieved in a three-dimensional coordinate system, and calculating the coordinates of a center point of the three-dimensional model to be retrieved, making the coordinates of the center point consistent with the coordinates of an origin in the three-dimensional coordinate system, and generating a first three-dimensional model;
[0058] S102, recursively cutting the first three-dimensional model using a group of spheres whose centers are located at the origin in the three-dimensional coordinate system, calculating the surface area of the first three-dimensional model in each sphere, and generating a primary surface area function of the first three-dimensional model; integrating the primary surface area function of the first three-dimensional model to obtain a cumulative surface area function of the first three-dimensional model;
[0059] S103: Based on the primary surface area function and the cumulative surface area function of the first three-dimensional model, using a first evaluation index, calculate the similarity between the first three-dimensional model and the candidate three-dimensional model to generate a model similarity score.
[0060] Among them, industrial-grade three-dimensional models refer to three-dimensional computer-aided design (CAD) models used in industrial applications. These models usually require high precision and can represent mechanical components, building structures or other entities for industrial purposes in detail. These three-dimensional models are not only used for design and testing, but are also commonly used in manufacturing processes, such as directly generating production instructions through computer-aided manufacturing (CAM) systems. The present application aims to solve the problem of rapid retrieval of such industrial-grade three-dimensional models. The binary decomposition in this application is a computing technique for processing and analyzing data or models by decomposing a large problem into two or more smaller problems and then recursively solving these small problems. In three-dimensional model processing, binary decomposition can decompose a complex three-dimensional model into multiple simplified sub-models according to certain rules (such as spatial position, structural similarity, etc.) to optimize storage, retrieval and processing. Recursive cutting is an algorithmic technique that uses a recursive method to segment data structures or geometric bodies. In three-dimensional model processing, recursive cutting can be used to cut a large three-dimensional model into smaller parts to simplify model processing, improve rendering efficiency or perform more sophisticated analysis. For example, a 3D model of a complex mechanical part can be recursively cut into multiple small parts, each of which can be analyzed or modified in detail individually.
[0061] In an embodiment of the present application, the file format of the three-dimensional model to be retrieved can be multiple, for example, STL, which is a widely used three-dimensional printing format that mainly describes the surface geometry of the model. For another example, OBJ, which is a standard three-dimensional model format that supports the geometry and texture information of the model and is widely used in a variety of three-dimensional modeling software. For another example, CAD formats such as DWG (used by AutoCAD), DXF, etc., these formats can be applied to complex engineering design fields. For another example, FBX and Collada (DAE), these formats support complex animations and multiple material properties, and are commonly used in three-dimensional modeling in games and movies.
[0062] In an embodiment of the present application, there may be a variety of ways to obtain the three-dimensional model to be retrieved. For example, many organizations have internal databases that store the three-dimensional models required for different projects and applications. These databases may be optimized for a specific industry or design field, such as automotive design, aviation, or architecture. For another example, with the popularity of cloud computing, many three-dimensional models may also be stored on cloud services such as Amazon S3 or Google Cloud Storage, which makes it easier to access and share models from anywhere. For another example, some open source or commercial platforms provide a large number of three-dimensional model resources that can be downloaded directly, such as Thingiverse or GrabCAD.
[0063] Users can directly download the required 3D model files from internal databases or online resources. In addition, some platforms provide a programming interface (API) that allows developers to automatically obtain and manage 3D model data programmatically. File sharing services such as Dropbox or Google Drive can also be used so that team members can share and obtain updated model files.
[0064] When acquiring a 3D model file, you need to ensure that the file format is compatible with the processing and analysis software used, and that the quality of the model meets the project requirements. This can be done by quality checking and preprocessing the model after acquisition to suit specific technical and business requirements, which is not covered in detail in this application.
[0065] The above S101 to S103 are described in detail below.
[0066] Regarding the above S101: In an embodiment of the present application, first, a three-dimensional model is obtained from a data source (such as a CAD file, three-dimensional scan data, or an online database). Ensure that the acquired model data format is compatible with the processing system, such as STL, OBJ or other general three-dimensional formats. Import the model file into a three-dimensional modeling software or a customized processing system. This system should be able to read and parse the geometric data of the model. Perform necessary preprocessing steps on the model, including but not limited to removing noise, filling holes in the model, smoothing, and deleting unnecessary details, etc., to improve the processing quality of the model and reduce the computational complexity.
[0067] As a possible implementation, the preprocessing includes at least one of the following: scale normalization, rotation normalization, and noise removal.
[0068] In practice, the purpose of scale normalization is to adjust the size of the 3D model to a standard size or ratio, which helps with consistency and comparative analysis in subsequent processing. First, the maximum dimension of the model can be calculated, that is, the maximum distance d between each point of the model on each coordinate axis. max:
[0069] d max =max(d x , d y , d z )
[0070] Among them, d x , d y and d z are the dimensions of the model on the X, Y, and Z axes of the three-dimensional space system. Next, divide all the coordinates of the model by d max to normalize the size of the model.
[0071]
[0072] This ensures that the model extends a maximum of 1 unit in all directions.
[0073] Among them, (x i ,y i , z i ) is the coordinate of the i-th vertex, and (x′ i , y′ i , z′ i ) is the new coordinate after the model coordinate is normalized.
[0074] It should be noted that, in order to facilitate and simplify the understanding of this embodiment, the preprocessed model coordinates in the following text will be expressed as (x i ,y i , z i ) is represented, and this representation can be regarded as the model coordinates of the preprocessed three-dimensional model to be retrieved.
[0075] Rotational normalization ensures that the orientation of the model is aligned with a standard reference frame. This step is particularly important for comparing features of different models. The principal axes of the model can be determined using principal component analysis (PCA). The covariance matrix of the model's vertices is calculated and the eigenvector corresponding to the largest eigenvalue is found, which defines the principal orientation of the model. The principal orientation of the model is rotated so that it is aligned with a predefined coordinate axis (such as the Z axis). This can be achieved by calculating the rotation matrix from the current principal orientation to a standard orientation (such as the Z axis).
[0076] Noise removal is to filter out random or non-random noise points in the model data to improve the quality of the model and processing efficiency. Identifying noise usually relies on local features of the model, such as outlier detection. The average distance from each point to its nearest neighbor can be calculated, and points with abnormally large distances can be regarded as noise. Use Gaussian smoothing or median filtering to remove noise points. For structured mesh data, triangular patches with abnormal areas or angles can also be used for correction or deletion.
[0077] Through the above-mentioned preprocessing steps, the quality and consistency of the model data can be ensured, and it is also more conducive to the model similarity comparison in the subsequent steps of this application. Among them, the model similarity compared in this application refers to the similarity that is invariant in translation and rotation, that is, the similarity of the three-dimensional model itself, and has nothing to do with the spatial position and the posture of the model.
[0078] As a possible implementation, the center point of the three-dimensional model to be retrieved can be calculated based on the vertex information of the three-dimensional model to be retrieved. The mathematical expression of the center point is:
[0079]
[0080] Among them, O A are the coordinates of the center point of the three-dimensional model to be retrieved in the three-dimensional coordinate system, pf is the coordinates of the i-th vertex in the three-dimensional model to be retrieved, and M is the number of model vertices of the three-dimensional model to be retrieved.
[0081] The center point of the three-dimensional model to be retrieved is translated to the origin of the three-dimensional coordinate system. The mathematical expression of the vertex coordinates of the three-dimensional model to be retrieved after translation is:
[0082] p′ i =p i -O A
[0083] Among them, p′ i are the vertex coordinates of the 3D model to be retrieved after translation;
[0084] Based on the vertex coordinates p′ after translation of the three-dimensional model to be retrieved i , generating the first three-dimensional model.
[0085] In a specific implementation, the coordinates of all vertices are firstly extracted from the three-dimensional model A.
[0086] Sum all vertex coordinates and divide by the total number of vertices M. This will calculate the average for the x, y, and z coordinates separately. The summed average value in the formula can be expressed as:
[0087]
[0088] Among them, (x i ,y i , z i ) are the coordinates of the i-th vertex.
[0089] The obtained coordinates O A It will be used as the geometric center of model A for subsequent processing steps, such as model position adjustment or further geometric analysis.
[0090] Get the center point OA Then, for each point p in the model i Perform the operation and calculate the new coordinates:
[0091] p′ i =(x i -x c ,y i -y c , z i -z c )
[0092] Among them, (x i ,y i , z i ) is point p i The original coordinates, (x c ,y c , z c ) is the center point O A The coordinates of .
[0093] Use the calculated new coordinates p′ i Update the model data so that the geometric center of the model will be at the coordinate origin.
[0094] The result of this step is to reposition the 3D model so that its geometric center coincides with the origin of the coordinate system.
[0095] Through this conversion, operations such as model processing, analysis, and visualization are more standardized, facilitating accurate comparison and integrated processing between multiple models.
[0096] The model adjusted through the above steps is the required first 3D model. This model is now in a coordinate system centered at the origin.
[0097] Regarding the above S102: After obtaining the first three-dimensional model, the embodiment of the present application uses a group of spheres whose centers are located at the origin in the three-dimensional coordinate system to recursively cut the first three-dimensional model to perform a more in-depth analysis of the geometric and topological structure of the model.
[0098] In a specific implementation, the first sphere can be created with the origin as the center and a preset initial radius. For each current sphere, calculate its intersection with the first three-dimensional model. Specifically, calculate the model part contained in the sphere, mainly to determine which model vertices fall within the current sphere. Process the relevant data of the model part within the current sphere, such as calculating its surface area or volume. Further, increase the radius of the sphere to generate the next sphere. The radius can be increased by a fixed step size or increased according to a certain ratio. Repeat the above steps until the entire model is covered or the preset number of layers or maximum radius is reached.
[0099] In each recursive step, geometric data of the part of the model inside the sphere, such as volume, surface area, etc., can be collected. Geometric features of the part inside each sphere, such as surface area function or volume function, can also be calculated to help shape analysis of the model. The recursive process ends when the radius of the sphere exceeds the maximum size of the model or when a predetermined recursive depth has been reached.
[0100] As a possible implementation, a set of spheres with their centers at the origin are used to recursively cut the first three-dimensional model, including: based on a preset retrieval accuracy, defining a radius sequence of the spheres as: Among them, R k is the radius of the kth sphere, N is the number of spheres, and the radius of each sphere is R k All meet the condition R k+1 >R k ;
[0101] In specific implementations, the radius sequence of the spheres can be set according to the preset retrieval accuracy to adapt to different analysis requirements and performance limitations. High retrieval accuracy means using more spheres and smaller radius increments to obtain more detailed model feature information; low retrieval accuracy means using fewer spheres and larger radius increments, which is usually used for fast scanning or when the level of detail is not the primary consideration.
[0102] For example, a high-precision search of a three-dimensional model A of a mechanical part requires an accurate matching model for quality control or precision manufacturing of complex components. In this case, a radius sequence can be set: Set the starting radius R 1 = 1mm, start from a very small scale to capture the tiny features of the model, and set the radius increment to increase by 0.5mm each step until the entire model is covered or half of the maximum size of the model is reached. If the maximum size of the model is 20mm, the radius sequence is 1, 1.5, 2, 2.5, ..., 10mm.
[0103] For example, in low-precision search, you can quickly overview or preliminarily screen models, which is suitable for the early stage of design or when a large number of models need to be quickly filtered. You can set the radius sequence: starting radius R 1 =5mm, start with a larger scale to quickly cover the basic model shape. Set the radius increment: increase by 5mm each step to quickly expand to the periphery of the model. If the maximum size of the model is 50mm, the radius sequence is 5, 10, 15, 20, ..., 50mm.
[0104] In practice, these parameters can be adjusted based on the specifics of the model and the processing requirements. For example, if the model has a complex internal structure, a finer radius increment may be required to ensure that all important features are properly captured. In addition, the choice of radius can also be adjusted for specific parts of the model, such as using smaller radius increments at the joints of the model or at key parts of the mechanical function.
[0105] By setting the radius sequence reasonably, the retrieval accuracy and processing speed of the 3D model can be effectively controlled to meet different application requirements. This method provides flexibility for the analysis of 3D models, allowing users to optimize and adjust according to the accuracy requirements of specific tasks.
[0106] After setting the radius sequence, the first three-dimensional model is cut into N blocks using the N spheres;
[0107] Based on the radius of each of the spheres, determining a spherical area formed by each of the spheres in the three-dimensional coordinate system;
[0108] In a specific implementation, when processing a three-dimensional model, the operation of cutting the model into N blocks using N spheres and determining the spherical area based on the radius of each sphere can be performed through the following detailed steps:
[0109] First, define the radius of N spheres that gradually increase according to the size of the model and the required accuracy, where R 1 is the minimum radius, R N is the maximum radius and satisfies R k+1 >R k , for each radius R k , defines a spherical region whose center is at the origin of the three-dimensional coordinate system. This spherical region is defined by the following equation:
[0110]
[0111] Among them, (x, y, z) are the coordinates of any point in three-dimensional space.
[0112] Each vertex in the first three-dimensional model is divided into at least one of the following: the vector modulus of the vertex coordinates satisfies the mathematical expression: ||p′ i ||≤R k , the vertex and its connected mesh parts are divided into a spherical area formed by the kth sphere in the three-dimensional coordinate system; the vector modulus of the vertex coordinates satisfies the mathematical expression: ||p′ i ||>R k , dividing the vertex and its connected mesh parts into outside the spherical area formed by the kth sphere in the three-dimensional coordinate system;
[0113] For each vertex of the first three-dimensional model, check whether it satisfies the equation of the above spherical area. If it does, this point belongs to the interior of the kth sphere. According to whether the vertex is located inside the sphere, the model is cut into N blocks. Each block contains all the points located inside the corresponding sphere. For each of the N spheres, all vertices divided into the interior of the kth sphere and their connected mesh parts are extracted, and marked as the second three-dimensional model cut out of the kth sphere, wherein the second three-dimensional model is a sub-model of the first three-dimensional model; for the second three-dimensional model part in each sphere, further analysis can be performed, such as calculating its volume, surface area or other relevant geometric properties. These data can be used to analyze the geometric characteristics of the model, or compared with other models to determine similarity.
[0114] As a possible implementation, generating a primary surface area function of the first three-dimensional model includes:
[0115] The second three-dimensional model is represented as a plurality of triangular meshes; the area of each triangle is calculated, and the areas of all triangles are summed to obtain the surface area of the second three-dimensional model cut out by the kth sphere; based on the surface areas of the second three-dimensional models cut out by the N spheres, a primary surface area function of the first three-dimensional model is generated; wherein the primary surface area function of the first three-dimensional model is based on the sphere radius R k is a piecewise function of unit.
[0116] In a specific implementation, each radius R k The corresponding second three-dimensional model surface area S k The calculation can be done using the polyhedral surface approximation of the model:
[0117]
[0118] The area of each triangle is calculated as follows:
[0119]
[0120] a and b are the vectors that make up the sides of the triangle. This formula provides a calculation for the area of the triangle based on the length of the cross product of the vectors.
[0121] For a sphere with radius R k By summing all the values less than or equal to R k The surface area S of the second three-dimensional model part inside the sphere k , construct the primary surface area function F(r) as follows:
[0122]
[0123] In specific implementation, the existing widely used retrieval technology based on identification comparison is essentially based on string comparison, which cannot be connected with direct 3D models, and cannot perform fuzzy search through similar 3D models during the comparison process. In the embodiment of the present application, the primary surface area function can be directly used for model similarity comparison.
[0124] For example, an automobile manufacturing company A needs parts management and maintenance. Company A has a huge parts database that stores 3D models of various parts of different models and years. Now, it needs to find a specific part, but only knows its general appearance features without the specific model number or precise size.
[0125] For example, there is a 3D model M to be searched, which is a piston of a car engine. The model is scale normalized, rotation normalized, and noise removed to generate a standardized first 3D model M1.
[0126] M1 is recursively cut and a set of spheres with their centers at the origin are used to calculate its primary surface area function F(r). The primary surface area function F(r) represents the surface area of the model at different radii r.
[0127] Perform the same preprocessing and recursive cutting on all the three-dimensional models of parts in the database, and calculate their primary surface area functions, where the primary surface area functions of the three-dimensional models of parts in the database can be obtained when the three-dimensional model is entered into the database. These functions are stored in a database for quick comparison. Use the primary surface area function F(r) of M1 to compare with the primary surface area function in the database. Calculate the difference between the primary surface area function of each database model and M1, and retain the models with a difference less than a specific threshold as candidate models. For example, the primary surface area function F(r) is as follows: the primary surface area function of the model M1 to be searched: F(r) = {10, 15, 18, 20, 22, 23, 24}, corresponding to the radius r = {1, 2, 3, 4, 5, 6, 7}; the primary surface area functions of the two models in the database: F_A(r) of model A = {12, 14, 17, 21, 23, 24, 25}
[0128] Model B’s F_B(r) = {11, 16, 19, 20, 22, 23, 24}
[0129] Differences between Model A and Model M1
[0130] =|10-12|+|15-14|+|18-17|+|20-21|+|22-23|+|23-24|+|24-25|=7
[0131] Differences between Model B and Model M1
[0132] =|10-11|+|15-16|+|18-19|+|20-20|+|22-22|+|23-23|+|24-24|=3
[0133] Since the difference of model B is smaller (3), model B is retained as the candidate model. If the threshold is set to 5, model A is also retained.
[0134] A more detailed comparison is performed on the candidate models (model A and model B) after the initial screening, such as calculating the cumulative surface area function, to further narrow the candidate range.
[0135] As a possible implementation, integrating the primary surface area function of the first three-dimensional model to obtain the cumulative surface area function of the first three-dimensional model includes: for each of the N spheres, calculating the distance from the origin to the sphere radius R k The cumulative surface area within the range; based on the radius R from the origin to each of the N spheres k The cumulative surface area within the range is used to generate the cumulative surface area function of the first three-dimensional model; wherein the cumulative surface area function of the first three-dimensional model is based on the sphere radius R k A piecewise function of units is used to determine the radial characteristics of the first three-dimensional model.
[0136] In specific implementations, the present application further narrows the candidate range by calculating the cumulative surface area function, and can integrate the primary surface area function F(r) to obtain the cumulative surface area function F1(r), where the cumulative surface area function F1(r) represents the cumulative surface area from the origin to the radius r.
[0137] For each of the N spheres, calculate the cumulative surface area F1(r) from the origin to the radius r of the sphere. The formula is:
[0138]
[0139] Where F(x) is the primary surface area function and r is the radius of the sphere.
[0140] Based on the cumulative surface area corresponding to each sphere, a cumulative surface area function F1(r) of the first three-dimensional model is generated. This function is a piecewise function with the radius of the sphere as the unit, which is used to determine the radial characteristics of the first three-dimensional model. In this way, it is possible to understand how the shape and complexity of the model change with the increase of the radius. By integrating the area after cutting, a piecewise function that can distinguish radial differences is formed.
[0141] The radial difference refers to the difference in the geometric features of the three-dimensional model along the radial direction from the center point (origin) to the outside. This difference can reflect the changes in the shape and size of the three-dimensional model at different radii. The radial difference can help distinguish the structural changes of the three-dimensional model at different scales. For example, a complex model may have many details at a small radius, but mainly the overall outline at a large radius. By analyzing the radial difference, the geometric features of the two models can be compared more comprehensively.
[0142] Through the function F1(r), we can see the cumulative area of the first three-dimensional model at different radii. These cumulative areas can reflect the geometric changes of the model in each radial direction. For example: if the cumulative area of the two models in a small radius is very different, this means that the geometric features of the models near the center are significantly different. If the cumulative area of the two models in a large radius is very different, this means that the geometric features of the models in the periphery are significantly different. Function F1(r) can reflect the cumulative geometric features of the model in different radii by integrating the area. This method can distinguish and compare the radial differences of the two models, thereby more comprehensively evaluating their similarities or differences.
[0143] Regarding the above S103: As a possible implementation manner, based on the primary surface area function and the cumulative surface area function, a first evaluation index is used to calculate the similarity between the first three-dimensional model and the alternative three-dimensional model, and a model similarity score is generated, including: obtaining the primary surface area function and the cumulative surface area function of the alternative three-dimensional model from a model library; based on the difference between the primary surface area function of the first three-dimensional model and the alternative three-dimensional model, retaining the alternative three-dimensional model whose difference with the primary surface area function of the first three-dimensional model is less than a first target threshold; for the retained alternative three-dimensional model, based on the difference between the first three-dimensional model and the cumulative surface area function of the alternative three-dimensional model, retaining the alternative three-dimensional model whose difference with the cumulative surface area function of the first three-dimensional model is less than a second target threshold; generating a model similarity score based on the difference between the primary surface area function of the first three-dimensional model and the difference between the cumulative surface area function of the alternative three-dimensional model.
[0144] In specific implementation, the evaluation index refers to the specific method or formula used to evaluate and compare the difference between two models. The choice of evaluation index depends on the model features that you want to highlight or focus on. According to different engineering requirements and design goals, the evaluation index can be flexibly adjusted to reflect different comparison focuses.
[0145] For example, if the goal is to evaluate the geometric accuracy of the model, the evaluation index can focus on quantifying the differences in model details, such as detecting local geometric inconsistencies by comparing the differences in the primary surface area function F(r). If the focus is on the structural strength or integrity of the model, an evaluation index can be set to measure the surface area or volume differences in the key structural areas of the model. In this case, it is more appropriate to compare the differences in the cumulative surface area function F1(r). For those cases where design changes may affect product functionality, the evaluation index may include analysis of design features in specific areas, such as evaluating cooling efficiency or weight distribution by comparing the surface area or volume of specific sections.
[0146] In this application, the weight w is set as a function of the radius r, so that the weight can be dynamically adjusted as the radius or model characteristics change, reflecting the importance of different areas more finely.
[0147] The weights are set to vary as the radius increases to reflect that the importance of model features away from the central area may increase. A weight function w(r) can be defined so that its value gradually increases or decreases as the radius increases, depending on the needs of the application scenario.
[0148] For example, if the weight increases linearly with the radius, you can set:
[0149] w(r)=α+β·r
[0150] Among them, α is the basic weight and β is the increased slope. These two parameters can be adjusted according to actual needs.
[0151] For another example, if the weights change more dramatically, an exponential form could be used:
[0152] w(r)=α·e βr
[0153] Where e is a natural constant and β is the coefficient of the exponential part of the exponential function, which is used to control the rate at which the weight increases with radius.
[0154] For example, in an aviation manufacturing company, a specific aircraft part needs to be found, and the detailed features of the part are known. The matching model of the part in the company database can be accurately found by calculating the cumulative surface area function. The three-dimensional model M to be found is a complex aircraft engine blade. It is preprocessed to generate a standardized first three-dimensional model M1. A set of spheres M1 are used for recursive cutting to calculate the primary surface area function F M1 (r). For the primary surface area function F M1(r) is integrated to obtain the cumulative surface area function F1(r). The same preprocessing and recursive cutting are performed on all the three-dimensional models of aircraft parts in the database, and their cumulative surface area functions are calculated and stored in a database. Among them, the cumulative surface area function of the three-dimensional model of the parts in the database can be obtained when the three-dimensional model is entered into the database. Use the cumulative surface area function F1(r) of M1 to compare with the cumulative surface area function in the database. Calculate the difference between the cumulative surface area function of each database model and M1, and retain the models with a difference less than a specific threshold as candidate models.
[0155] Exemplarily, if the cumulative surface area function F1(r) of the first three-dimensional model is as follows:
[0156] F1 M1 (r)={10, 25, 43, 65, 90, 118, 150}
[0157] Corresponding radius r = {1, 2, 3, 4, 5, 6, 7}
[0158] Cumulative surface area function for two models in the database:
[0159] Model A: F1 A (r)={12, 24, 40, 64, 88, 120, 152}
[0160] Model B: F1 B (r)={11, 26, 44, 67, 90, 118, 150}
[0161] Model A Difference
[0162] =(|10-12|+|25-24|+|43-40|+|65-64|+|90-88|+|118-120|+|150-152|)=13;
[0163] Model B Difference
[0164] =(|10-11|+| 25-26|+| 43-44|+| 65-67|+| 90-90|+| 118-118|+| 150-150|)=5.
[0165] Since the difference of model B is smaller (5), model B is retained as the candidate model. If the threshold is set to 10, model A is also retained.
[0166] The differences between the cumulative surface area function of model A and the cumulative surface area function of the model to be found M1 are concentrated at radii r=3 and r=6, which indicates that the geometric characteristics of model A within these radius ranges are significantly different from those of M1.
[0167] The cumulative surface area function of model B is very close to that of M1 at most radii, with only a slight difference at radius r = 4. This indicates that the changes in the geometric features of model B in each radial direction are more consistent with those of M1.
[0168] By calculating and comparing the cumulative surface area function, candidate models with similar geometric features to the model M1 in each radial direction can be screened out more accurately. Model B is selected as the most likely matching model because its cumulative surface area in most radial directions is closer to that of M1. This method can not only improve the search accuracy, but also distinguish the geometric differences of the model in different radial directions, thereby improving the accuracy and efficiency of screening.
[0169] The weighted difference between the primary surface area function and the cumulative surface area function is calculated as the final similarity score. The lower the score, the more similar the two models are.
[0170] In a specific implementation, the model similarity score can be obtained by obtaining the primary surface area function F of the candidate model A and the candidate model B from the model library. A (r) and F B (r), and the cumulative surface area function F1 A (r) and Fl B (r).
[0171] For each candidate model, the difference ΔF(r) between the primary surface area function F(r) of the candidate model and the primary surface area function F(r) of the model to be found is calculated.
[0172] For each candidate model, the difference ΔF1(r) between the cumulative surface area function F1(r) of the candidate model and the cumulative surface area function F1(r) of the model to be found is calculated.
[0173] The model similarity score is generated using the weighted difference between the primary surface area function F(r) and the cumulative surface area function F1(r). The lower the score, the more similar the two models are. The similarity score formula is:
[0174] Simi1arity Score=α×ΔF(r)+β×ΔF1(r)
[0175] Among them, α and β are weight coefficients, satisfying α+β=1.
[0176] Exemplarily, the primary surface area function and cumulative surface area function of the model M1 are to be found:
[0177] F M1 (r)={10, 15, 18, 20, 22, 23, 24}
[0178] F1 M1(r)={10, 25, 43, 65, 90, 118, 150}
[0179] The primary surface area function and cumulative surface area function of the two candidate models in the database:
[0180] Model A:
[0181] F A (r)={12, 14, 17, 21, 23, 24, 25}
[0182] F1 A (r)={12, 24, 40, 64, 88, 120, 152}
[0183] Model B:
[0184] F B (r)={11, 16, 19, 20, 22, 23, 24}
[0185] F1 B (r)={11, 26, 44, 67, 90, 118, 150}
[0186] Difference calculation:
[0187] Model A:
[0188] ΔF A (r) = 8, ΔF1 A (r) = 13
[0189] Model B:
[0190] ΔF B (r) = 3, ΔF1 B (r)=5
[0191] Model similarity score calculation:
[0192] The weight coefficients α=0.6 and β=0.4 may be set.
[0193] Similarity score for model A:
[0194] Similarity Score A =0.6×8+0.4×13=4.8+5.2=10
[0195] Similarity score for model B:
[0196] Similarity Score B =0.6×3+0.4×5=1.8+2=3.8
[0197] By calculating the difference between the primary surface area function and the cumulative surface area function and combining the weights to generate a similarity score, it is found that model B has the lowest similarity score (3.8), so it is considered to be the model that best matches the model M1 to be found. This method not only improves the search accuracy, but also effectively distinguishes the geometric differences of the model in different radial directions, improving the accuracy and efficiency of screening.
[0198] As a possible implementation, the first evaluation index is a composite evaluation function, and the function expression of the model similarity score is:
[0199]
[0200] Among them, Score Composite The first evaluation index is the model similarity score under the composite evaluation function, R k is the radius of the kth cutting sphere, w(R k ) is the weight corresponding to the radius of the k-th cutting ball, Diff F (R k ) is the radius R k The difference in the primary surface area function at F1 For the radius R k The difference in the cumulative surface area function at 1-w(R k ) is the weight w(R k ) complementary weights so that the sum of the weights is 1;
[0201] The weight w is set to be about R k The function of weight w(R k ) is:
[0202]
[0203] In the specific implementation, the composite evaluation function is used to calculate the similarity between the 3D model to be retrieved and the candidate model. This function combines the difference between the primary surface area function and the cumulative surface area function, and comprehensively considers the geometric feature changes of the model at different radii. k ) represents the importance of the primary surface area function at this radius, and the weight w(R k ) with radius R k Increase and change.
[0204] In this application, the difference of local and overall characteristic primary surface area function Diff F (R k ) reflects the difference in local geometric features of the model at each radius. Cumulative surface area function difference Diff F1reflects the overall geometric feature difference from the origin to the radius. By combining these two differences, the function can comprehensively evaluate the geometric features of the model. k ) According to the radius R k Dynamic adjustment makes the contribution of the primary surface area function and the cumulative surface area function different within different radius ranges. When the radius is small, the primary surface area function may be more important because it can reflect the detailed characteristics of the model. When the radius is large, the cumulative surface area function may be more important because it can reflect the overall characteristics of the model. By adjusting the parameters α and β of the weight function, the contribution of the primary surface area function and the cumulative surface area function can be flexibly adjusted according to specific application requirements.
[0205] For example, in some applications, if you place more emphasis on the overall characteristics of the model, you can increase the weight of the cumulative surface area function.
[0206] For example, you need to find a specific aircraft part (such as an engine blade). In this process, the difference in the primary surface area function can help identify the local geometric features of the model (such as the change of a detail part), while the difference in the cumulative surface area function can help identify the overall geometric features of the model (such as the overall shape and size).
[0207] Each radius point R k Each has its own specific weight w(R k ), so that the emphasis on local differences and cumulative differences can be dynamically adjusted according to the radius. This dynamic weighting method provides additional flexibility, allowing the system to take into account the importance of specific areas of the model when evaluating. For example, in some industrial applications, the peripheral structure of the model may be more critical than the central area and therefore require a larger weight. Dynamic weighting also helps to achieve more refined tuning in specific applications. For example, in the retrieval of parts with complex geometry or high functional requirements, the relevance and accuracy of the retrieval results can be optimized by adjusting the weight function.
[0208] This method can make the 3D model retrieval system more intelligent and adaptable, and can provide customized solutions for different industrial needs. By comprehensively considering the geometric features at different scales, the candidate model that best matches the model to be found can be found more accurately. This method can not only improve the search accuracy, but also effectively distinguish the geometric differences of the model in different radial directions, improving the accuracy and efficiency of screening.
[0209] As a possible implementation, after calculating the similarity between the first three-dimensional model and the candidate three-dimensional model and generating a model similarity score, the method further includes: based on the model similarity score, displaying the candidate three-dimensional models whose model similarity scores with the first three-dimensional model are less than or equal to a third target threshold in order from low to high. The third target threshold is a similarity score threshold pre-set based on task requirements.
[0210] It can be understood that, since the model similarity score of the present application specifically calculates the corresponding function difference between different models, the closer the model similarity score is to 0, the more similar the two models are.
[0211] See also Figure 2-Figure 3 As shown, Figure 2 A schematic diagram of model retrieval provided for an embodiment of the present application, wherein, exemplarily, a target three-dimensional model is being retrieved, and the target three-dimensional model includes multiple sub-three-dimensional models. Based on the method disclosed in the present application, the model with the highest similarity can be retrieved from the model library for display. If the model storage work is being performed at this time, the model with a model similarity of 100 can no longer be repeatedly stored in the library. If the model matching and quotation work is being performed at this time, real-time quotation can be made by connecting to a specified server or obtaining the model price information already in the model library. In addition, the number of similar models can also be displayed to help optimize the storage space of the model library and avoid duplicate model storage.
[0212] Among them, the similarity can be calculated based on the model similarity score disclosed in this application. When the model similarity score in this application is 0, it means that the two models are exactly the same. In this case, data processing can be performed to generate model similarity, for example, 100 (maximum similarity).
[0213] Figure 3 A schematic diagram of a search interface in a tabular form is provided for an embodiment of the present application, which lists the models in the model library that are similar to the model currently being searched, as well as the storage location of each similar model. This search interface provides a more intuitive display of search results based on the method disclosed in the present application.
[0214] This approach of comparing two different types of functions simultaneously can provide a more comprehensive and in-depth model evaluation.
[0215] Comparison of the functions F(r) provides the instantaneous or local surface area difference at each particular radial point.
[0216] Comparison of function F1(r) provides the cumulative surface area difference from the origin to a certain radius, reflecting the cumulative impact of the overall geometric characteristics.
[0217] In specific implementations, local design changes (such as adding a groove or protrusion) may not significantly affect the overall geometry, but will be shown in the function F(r). In contrast, the F1 function can better reflect the cumulative impact of these local changes on the overall design and help evaluate their proportion in the overall design.
[0218] By comparing the two types of functions, we can more precisely locate the differences between models, both in small-scale details and in large-scale structural changes.
[0219] Focusing only on the surface area at a specific radius, the function F(r), ignores the cumulative effect of design changes on the overall structure. For example, significant differences may occur in some parts of the model, but if these differences are small in the overall picture, their impact may be underestimated.
[0220] If we only focus on function F1(r), although we can show the cumulative surface area difference from the origin to a certain radius, it may mask important local design differences. In some cases, the cumulative perspective may make small local changes seem less significant in the large-scale cumulative differences, thus ignoring these key local features.
[0221] For the analysis of industrial 3D models, comparing the differences between the two functions F(r) and F1(r) can provide a more comprehensive comparison and analysis, which helps to make more accurate decisions in the model design and evaluation process. This method is particularly suitable for occasions where comprehensive evaluation of design accuracy and functional realization is required, such as in the field of mechanical design and manufacturing with high precision requirements. Through this analysis, it can be ensured that the model not only meets the specifications in local design, but also meets the expected functional and performance standards as a whole.
[0222] For example, there are two industrial-grade 3D models, Model A is a high-precision automobile engine piston, while Model B is a slightly modified version of the piston. The main difference between the two models is the different design of the cooling channels on the top of the piston. Model A has simpler cooling channels, while Model B has more complex networked cooling channels.
[0223] In order to fully compare the two piston models, the function F(r) and function F1(r) of each model can be analyzed. In the comparison of function F(r), model A has a radius of r. 1 (piston top area), the surface area is smaller because the cooling channel is simpler. Model B with the same radius r 1At the top of the piston, the surface area is larger, indicating a more complex cooling channel structure. Through the function F(r), it can be directly observed that at the top of the piston, Model B has a larger surface area due to its complex cooling channel design, which highlights the difference in Model B in this local design. However, this comparison may not fully reflect the impact of these local design changes on the overall piston performance. It only focuses on the surface area at a specific radius and does not consider the overall cumulative effect.
[0224] In the comparison of function F1(r), the cumulative surface area of model A is relatively small because the overall design is relatively simple. The cumulative surface area of model B is significantly larger because the complex cooling channel design occupies a large proportion of the volume and surface area of the entire piston. Function F1(r) reflects the cumulative surface area from the origin to a given radius, better demonstrating the complexity of the design of model B and its possible impact on overall performance.
[0225] For the two piston models, comparing the function F(r) and the function F1(r) can provide a more comprehensive analysis perspective to help engineers understand how design changes affect the local characteristics and overall performance of the piston. Through this analysis, it can be ensured that the design improvements truly achieve the purpose of improving product performance, rather than just looking better visually or theoretically. At the same time, this analysis method can reveal design areas that need further adjustment or optimization, thereby promoting more efficient and functional industrial product development.
[0226] This method allows fast and accurate retrieval of complex 3D models by performing multi-level decomposition and function comparison based on geometric shapes. This technology is particularly suitable for industrial applications that require high-precision matching, such as quickly finding and comparing parts or components in manufacturing, design optimization, and quality control. By providing a mathematically quantifiable comparison method, this technology can greatly improve retrieval efficiency and accuracy to meet the needs of industrial-level applications.
[0227] The present application also provides an electronic device, such as Figure 4 FIG. 1 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application, including:
[0228] A processor 41 and a memory 42; the memory 42 stores machine-readable instructions executable by the processor 41, and the processor 41 is used to execute the machine-readable instructions stored in the memory 42. When the machine-readable instructions are executed by the processor 41, the processor 41 performs the following steps:
[0229] Acquire a three-dimensional model to be retrieved, pre-process the three-dimensional model to be retrieved in a three-dimensional coordinate system, calculate the coordinates of the center point of the three-dimensional model to be retrieved, make the coordinates of the center point consistent with the coordinates of the origin in the three-dimensional coordinate system, and generate a first three-dimensional model;
[0230] recursively cutting the first three-dimensional model using a set of spheres whose centers are located at the origin in the three-dimensional coordinate system, calculating the surface area of the first three-dimensional model in each sphere, and generating a primary surface area function of the first three-dimensional model; integrating the primary surface area function of the first three-dimensional model to obtain a cumulative surface area function of the first three-dimensional model;
[0231] Based on the primary surface area function and the cumulative surface area function of the first three-dimensional model, a first evaluation index is used to calculate the similarity between the first three-dimensional model and the candidate three-dimensional model to generate a model similarity score.
[0232] The above-mentioned memory 42 includes internal memory 421 and external memory 422; the memory 421 here is also called internal memory, which is used to temporarily store the calculation data in the processor 41 and the data exchanged with the external memory 422 such as the hard disk. The processor 41 exchanges data with the external memory 422 through the internal memory 421.
[0233] The specific execution process of the above instructions can refer to the steps of the industrial-grade three-dimensional model rapid retrieval method based on binary decomposition described in the embodiment of the present disclosure, which will not be repeated here.
[0234] The present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the industrial-grade three-dimensional model rapid retrieval method based on binary decomposition described in the above method embodiment are executed. The storage medium can be a volatile or non-volatile computer-readable storage medium.
[0235] An embodiment of the present application also provides a computer program product, which carries a program code. The instructions included in the program code can be used to execute the steps of the industrial-grade three-dimensional model rapid retrieval method based on binary decomposition described in the above method embodiment. For details, please refer to the above method embodiment, which will not be repeated here.
[0236] The computer program product may be implemented in hardware, software or a combination thereof. In one optional embodiment, the computer program product is implemented as a computer storage medium. In another optional embodiment, the computer program product is implemented as a software product, such as a software development kit (SDK).
[0237] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0238] It should be understood that determining B based on A does not mean determining B only based on A. B can also be determined based on A and / or other information.
[0239] Those skilled in the art will appreciate that the algorithm steps of each example described in conjunction with the embodiments disclosed in the present invention can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0240] In the description of this specification, the description with reference to the terms "one embodiment", "example", "specific example", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0241] The preferred embodiments of the present invention disclosed above are only used to help explain the present application. The preferred embodiments do not describe all the details in detail, nor do they limit the specific implementation methods of the present application. Obviously, many modifications and changes can be made according to the content of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present application, so that those skilled in the art can understand and use the present application well. The present application is limited only by the claims and their full scope and equivalents.
Claims
1. A rapid retrieval method for industrial-grade three-dimensional models based on binary decomposition, characterized in that: include: Acquire a three-dimensional model to be retrieved, pre-process the three-dimensional model to be retrieved in a three-dimensional coordinate system, calculate the coordinates of the center point of the three-dimensional model to be retrieved, make the coordinates of the center point consistent with the coordinates of the origin in the three-dimensional coordinate system, and generate a first three-dimensional model; recursively cut the first three-dimensional model using a set of spheres whose centers are located at the origin in the three-dimensional coordinate system, calculate the surface area of the first three-dimensional model in each sphere, and generate a primary surface area function of the first three-dimensional model; Integrating the primary surface area function of the first three-dimensional model to obtain a cumulative surface area function of the first three-dimensional model; Wherein, the primary surface area function is used to represent the surface area of the three-dimensional model at different radii; The cumulative surface area function represents the cumulative surface area from the origin to different radii; Based on the primary surface area function and the cumulative surface area function of the first three-dimensional model, using a first evaluation index, calculating the similarity between the first three-dimensional model and the candidate three-dimensional model to generate a model similarity score; The recursive cutting of the first three-dimensional model using a set of spheres whose centers are located at the origin includes: Based on the preset retrieval accuracy, the radius sequence of the sphere is defined as Among them, R k is the radius of the kth sphere, N is the number of spheres, and the radius of each sphere is R k All meet the condition R k+1 >R k ; Cutting the first three-dimensional model into N blocks using the N spheres; Based on the radius of each of the spheres, determining a spherical area formed by each of the spheres in the three-dimensional coordinate system; Divide each vertex in the first three-dimensional model into at least one of the following: The vector norm corresponding to the vertex coordinates satisfies the mathematical expression: ‖p i ′‖≤R k , dividing the vertex and its connected mesh parts into a spherical area formed by the kth sphere in the three-dimensional coordinate system; The vector norm corresponding to the vertex coordinates satisfies the mathematical expression: ‖p i ′‖>R k , dividing the vertex and its connected mesh parts outside the spherical area formed by the kth sphere in the three-dimensional coordinate system; For each of the N spheres, extract all vertices that are divided into the interior of the k-th sphere and the mesh parts connected thereto, and mark them as a second three-dimensional model cut out of the k-th sphere, wherein the second three-dimensional model is a sub-model of the first three-dimensional model; The generating of the primary surface area function of the first three-dimensional model comprises: representing the second three-dimensional model as a plurality of triangular meshes; Calculate the area of each triangle and sum the areas of all triangles to obtain the surface area of the second three-dimensional model cut out by the kth sphere; Based on the surface areas of the second three-dimensional models cut out of the N spheres, a primary surface area function of the first three-dimensional model is generated; wherein the primary surface area function of the first three-dimensional model is based on the sphere radius R k is a piecewise function of unit; Integrating the primary surface area function of the first three-dimensional model to obtain a cumulative surface area function of the first three-dimensional model includes: For each of the N spheres, calculate the radius R from the origin to the sphere k Cumulative surface area within the range; Based on the radius R from the origin to each sphere in the N spheres k The cumulative surface area within the range is used to generate the cumulative surface area function of the first three-dimensional model; wherein the cumulative surface area function of the first three-dimensional model is based on the sphere radius R k A piecewise function of units is used to determine the radial characteristics of the first three-dimensional model.
2. The method according to claim 1, characterized in that The preprocessing includes at least one of the following: scale normalization, rotation normalization, and noise removal; the generating the first three-dimensional model includes: Based on the vertex information of the three-dimensional model to be retrieved, the center point of the three-dimensional model to be retrieved is calculated, and the mathematical expression of the center point is: Among them, O A is the coordinate of the center point of the three-dimensional model to be retrieved in the three-dimensional coordinate system, p i is the coordinate of the i-th vertex in the 3D model to be retrieved, and M is the number of model vertices of the 3D model to be retrieved; The center point of the three-dimensional model to be retrieved is translated to the origin of the three-dimensional coordinate system. The mathematical expression of the vertex coordinates of the three-dimensional model to be retrieved after translation is: p i ′=p i -O A Among them, p i ′ is the vertex coordinates of the three-dimensional model to be retrieved after translation; Based on the vertex coordinates p after translation of the three-dimensional model to be retrieved i ', generate the first three-dimensional model.
3. The method according to claim 1, characterized in that The calculating the similarity between the first three-dimensional model and the candidate three-dimensional model using a first evaluation index based on the primary surface area function and the cumulative surface area function to generate a model similarity score includes: Acquire the primary surface area function and the cumulative surface area function of the candidate three-dimensional model from a model library; Based on the difference between the primary surface area functions of the first three-dimensional model and the candidate three-dimensional model, retaining the candidate three-dimensional model whose difference with the primary surface area function of the first three-dimensional model is less than a first target threshold; For the retained candidate three-dimensional models, based on the difference between the cumulative surface area functions of the first three-dimensional model and the candidate three-dimensional model, retain the candidate three-dimensional model whose difference in cumulative surface area function with the first three-dimensional model is less than a second target threshold; A model similarity score is generated based on a difference between the primary surface area function and a difference between the cumulative surface area functions of the first three-dimensional model and the candidate three-dimensional model.
4. The method according to claim 3, characterized in that The first evaluation index is a composite evaluation function, and the function expression of the model similarity score is: Among them, Score Composite Indicates that the first evaluation index is the model similarity score under the composite evaluation function, R k is the radius of the kth cutting sphere, w(R k ) is the weight corresponding to the radius of the k-th cutting ball, Diff F (R k ) is the radius R k The difference in the primary surface area function at F1 (R k ) is the radius R k The difference in the cumulative surface area function at 1-w(R k ) is the weight w(R k ) complementary weights so that the sum of the weights is 1, and N is the total number of balls used to cut the model; The weight w is set to be about R k The function of weight w(R k ) is: Among them, α is the base weight, e is a natural constant, and β is the coefficient of the exponential part of the exponential function, which is used to control the rate at which the weight w increases with the radius.
5. The method according to claim 1, characterized in that After calculating the similarity between the first three-dimensional model and the candidate three-dimensional model and generating a model similarity score, the method further includes: based on the model similarity score, sorting from low to high and displaying the candidate three-dimensional models whose model similarity scores with the first three-dimensional model are less than or equal to a third target threshold.
6. An electronic device, characterized in that: include: A processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and the processor is used to execute the machine-readable instructions stored in the memory. When the machine-readable instructions are executed by the processor, the processor executes the steps of the industrial-grade three-dimensional model rapid retrieval method based on binary decomposition as described in any one of claims 1 to 5.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program. When the computer program is executed by an electronic device, the electronic device executes the steps of the method for rapid retrieval of industrial-grade three-dimensional models based on binary decomposition as described in any one of claims 1 to 5.
Citation Information
Patent Citations
A three-dimensional model generation method and system based on generative adversarial network
CN111382301B
Three-dimensional comparative analysis method for explosive information
CN116682063A
Method for 3D / 2D registration using multiple views and a surface model of an object
EP1124201A1