A method, device and storage medium for determining whether a three-dimensional model grid is repeated

By combining the eigenvalue test method and sampling detection method, the similarity of the three-dimensional model grid is determined, and the problem of misjudgment in the existing technology is solved, accuracy and efficiency are improved, and storage space is reduced.

CN119516534BActive Publication Date: 2025-06-06BEIJING YUANHUI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510089636.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-21
Publication Date
2025-06-06
Estimated Expiration
2045-01-21

AI Technical Summary

Technical Problem

In the prior art, the method of judging whether the three-dimensional model grid is the same is likely to cause misjudgment, resulting in a decrease in the accuracy of the model.

Method used

The combination of eigenvalue detection and sampling detection method is used to combine eigenvalue detection. By first using eigenvalues ​​for the first round of screening, different grids are excluded, and then grids with the same eigenvalues ​​are further judged through eigenvectors and sampling detection.

Benefits of technology

The accuracy of judging whether the three-dimensional model grid is the same is improved, the probability of misjudgment is reduced, and the efficiency of grid deduplication is improved, and the storage space is consumed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119516534B_ABST
    Figure CN119516534B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device and storage medium for determining whether a three-dimensional model grid is repeated, and relates to the field of image data processing technology. The method comprises: respectively calculating the eigenvectors and eigenvalues ​​of the first grid and the second grid in the three-dimensional model, and obtaining the first eigenvector and the first eigenvalue of the first grid, and the second eigenvector and the second eigenvalue of the second grid. If the first eigenvalue is different from the second eigenvalue, the first grid and the second grid are determined to be different grids, otherwise the first grid and the second grid are determined to be the same grid according to the first eigenvector and the second eigenvector. By first using the eigenvalue for the first round of screening to exclude different grids, and further using the eigenvector for judging the grids with the same eigenvalue by sampling detection, the technical effect of improving the judgment accuracy is achieved. The technical problem that the method for judging whether the three-dimensional model grids are the same in the prior art is prone to misjudgment is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of image data processing, and in particular to a method, device and storage medium for determining whether a three-dimensional model grid is repeated. Background Art

[0002] In the fields of aerospace, automobile, shipbuilding and other industrial manufacturing, as well as 3D modeling and game development, the detailed shapes of objects are accurately stored in the form of 3D models. Meshes, as the basic components of 3D models, are composed of vertices, edges and faces (polygons), which together define the shape, surface and details of objects. Figure 1 The 3D model of the car shown in the figure has its front windshield, doors and other parts carefully constructed from meshes, which together define the overall structure and details of the car. Figure 2 In the 3D model of a tree shown, each leaf is also composed of multiple mesh elements (such as Figure 3 ), which is an indispensable part of the 3D model of the entire tree.

[0003] In the process of 3D modeling, in order to improve storage efficiency and model utilization, the same mesh parts are usually identified and merged. Figure 1 In the car model, if the four wheels are identical, only one wheel mesh needs to be stored, and then the four wheels can be constructed by copying and positioning. Figure 2 In the tree model, despite the large number of leaves, only a set of representative leaf meshes need to be stored, which are then copied and transformed to populate the entire tree.

[0004] However, in the prior art, the mesh deduplication algorithm determines whether it is a repeated mesh according to the attributes such as bounding box, area, and edge length. These judgment conditions are prone to misjudgment, resulting in some meshes that are not repeated (identical) being judged as repeated meshes, which ultimately causes a significant decrease in the accuracy of the model. For example, there is ambiguity in the bounding box. The bounding box is a simple and fast preliminary screening tool for determining whether two objects may intersect or overlap. However, it only considers the minimum enclosing rectangle of the object, ignoring the specific shape and details inside. Therefore, even if the bounding boxes of two meshes are exactly the same or highly overlapping, their actual shapes may still be significantly different, leading to misjudgment. For another example, area and edge length are also misleading. As important indicators for measuring mesh size and shape, area and edge length can reflect the basic characteristics of the mesh to a certain extent. However, these two parameters cannot fully capture all the characteristics of the mesh. For example, two meshes with the same area and edge length may have completely different internal structures and layouts, which makes it easy to make deviations when relying solely on these geometric attributes for judgment.

[0005] With respect to the technical problem that the method for judging whether the meshes of the three-dimensional models are the same in the above-mentioned prior art is prone to misjudgment, no effective solution has been proposed so far. Summary of the invention

[0006] The embodiments of the present disclosure provide a method for determining whether a three-dimensional model grid is repeated, so as to at least solve the technical problem in the prior art that is prone to misjudgment.

[0007] According to one aspect of an embodiment of the present disclosure, a method for determining whether a three-dimensional model grid is repeated is provided, comprising: respectively calculating the eigenvectors and eigenvalues ​​of a first grid and a second grid in the three-dimensional model to obtain a first eigenvector and a first eigenvalue of the first grid, and a second eigenvector and a second eigenvalue of the second grid; if the first eigenvalue is different from the second eigenvalue, determining that the first grid and the second grid are different grids, otherwise determining whether the first grid and the second grid are the same grids according to the first eigenvector and the second eigenvector; wherein determining whether the first grid and the second grid are the same grids according to the first eigenvector and the second eigenvector comprises: calculating a first local coordinate system of the first grid according to the first eigenvector, and calculating a second local coordinate system of the second grid according to the second eigenvector; determining a transformation matrix between the two grids according to the first local coordinate system and the second local coordinate system; extracting N vertex coordinates from the first grid by sampling, and obtaining N first intermediate coordinate points according to the transformation matrix; for each of the N first intermediate coordinate points, searching in the second grid whether there is a point identical to the first intermediate coordinate point, if there is no identical point, the first intermediate coordinate point is an error point, and the number and S of all error points are calculated; calculating the error rate If R is less than the first error rate threshold, it is determined that the first grid and the second grid are the same grid within the first error rate threshold range; wherein N and S are both non-negative integers, and S is less than or equal to N.

[0008] According to another aspect of an embodiment of the present disclosure, a storage medium is further provided, the storage medium including a stored program, wherein when the program is running, a processor executes any one of the methods described above.

[0009] According to another aspect of the embodiments of the present disclosure, there is also provided a device for determining whether a three-dimensional model grid is repeated, comprising: a calculation module, for respectively calculating the eigenvectors and eigenvalues ​​of a first grid and a second grid in the three-dimensional model, to obtain a first eigenvector and a first eigenvalue of the first grid, and a second eigenvector and a second eigenvalue of the second grid; a judgment module, for determining whether the first grid and the second grid are the same grid, comprising: if the first eigenvalue is different from the second eigenvalue, determining that the first grid and the second grid are different grids, otherwise determining whether the first grid and the second grid are the same grid according to the first eigenvector and the second eigenvector; wherein, according to the first eigenvector and the second eigenvalue, The method of using two eigenvectors to determine whether the first grid and the second grid are the same grids includes: calculating the first local coordinate system of the first grid according to the first eigenvector, and calculating the second local coordinate system of the second grid according to the second eigenvector; determining the transformation matrix between the two grids according to the first local coordinate system and the second local coordinate system; extracting N vertex coordinates from the first grid by sampling, and obtaining N first intermediate coordinate points according to the transformation matrix; for each of the N first intermediate coordinate points, searching in the second grid whether there is a point identical to the first intermediate coordinate point, if there is no identical point, the first intermediate coordinate point is an error point, and calculating the number and S of all error points; calculating the error rate If R is less than the first error rate threshold, it is determined that the first grid and the second grid are the same grid within the first error rate threshold range; wherein N and S are both non-negative integers, and S is less than or equal to N.

[0010] According to another aspect of the embodiments of the present disclosure, there is also provided a device for determining whether a three-dimensional model grid is repeated, comprising: a processor; and a memory connected to the processor, for providing the processor with instructions for processing the following processing steps: respectively calculating the eigenvectors and eigenvalues ​​of a first grid and a second grid in the three-dimensional model to obtain a first eigenvector and a first eigenvalue of the first grid, and a second eigenvector and a second eigenvalue of the second grid; if the first eigenvalue is different from the second eigenvalue, determining that the first grid and the second grid are different grids, otherwise determining whether the first grid and the second grid are the same grid according to the first eigenvector and the second eigenvector; wherein, according to the first eigenvector and the second eigenvalue, The method of using two eigenvectors to determine whether the first grid and the second grid are the same grids includes: calculating the first local coordinate system of the first grid according to the first eigenvector, and calculating the second local coordinate system of the second grid according to the second eigenvector; determining the transformation matrix between the two grids according to the first local coordinate system and the second local coordinate system; extracting N vertex coordinates from the first grid by sampling, and obtaining N first intermediate coordinate points according to the transformation matrix; for each of the N first intermediate coordinate points, searching in the second grid whether there is a point identical to the first intermediate coordinate point, if there is no identical point, the first intermediate coordinate point is an error point, and calculating the number and S of all error points; calculating the error rate If R is less than the first error rate threshold, it is determined that the first grid and the second grid are the same grid within the first error rate threshold range; wherein N and S are both non-negative integers, and S is less than or equal to N.

[0011] In the disclosed embodiment, a method combining the eigenvalue test method and the sampling test method is adopted, by first using the eigenvalue for the first round of screening to exclude different grids, and then further using the eigenvector for judging the grids with the same eigenvalue by sampling test, thereby achieving the technical effect of improving the accuracy of judging whether the three-dimensional model networks are the same. This solves the technical problem that the judgment method of whether the three-dimensional model grids are the same in the prior art is prone to misjudgment. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The drawings described herein are used to provide a further understanding of the present disclosure and constitute a part of the present application. The illustrative embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation on the present disclosure. In the drawings:

[0013] Figure 1 It is a schematic diagram of a three-dimensional model of a car;

[0014] Figure 2 This is a schematic diagram of the 3D model of the tree in the game;

[0015] Figure 3 It is a mesh diagram of leaves in a three-dimensional model of a tree;

[0016] Figure 4 is a hardware structure block diagram of a computing device for implementing the method according to Embodiment 1 of the present disclosure;

[0017] Figure 5 is a flow chart of a method for determining whether a three-dimensional model grid is repeated according to Embodiment 1 of the present disclosure;

[0018] Figure 6 is a flowchart of a method for determining whether a three-dimensional model grid is repeated according to Embodiment 2 of the present disclosure;

[0019] Figure 7 is a schematic diagram of a device for determining whether a three-dimensional model grid is repeated according to Embodiment 3 of the present disclosure; and

[0020] Figure 8 It is a schematic diagram of a device for determining whether a three-dimensional model grid is repeated according to Embodiment 4 of the present disclosure. DETAILED DESCRIPTION

[0021] In order to enable those skilled in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only embodiments of a part of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative work should fall within the scope of protection of the present disclosure.

[0022] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.

[0023] Example 1

[0024] According to this embodiment, an embodiment of a method for determining whether a three-dimensional model mesh is repeated is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0025] The method embodiment provided in this embodiment can be executed in a mobile terminal, a computer terminal, a server or a similar computing device. Figure 4 FIG. 1 shows a hardware structure block diagram of a computing device for determining whether a 3D model grid is repeated. Figure 4 As shown, the computing device may include one or more processors (the processor may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory for storing data, a transmission device for communication functions, and an input / output interface. The memory, the transmission device, and the input / output interface are connected to the processor via a bus. In addition, it may also include: a display, a keyboard, and a cursor control device connected to the input / output interface. A person skilled in the art can understand that Figure 4 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 4 More or fewer components as shown, or with Figure 4 Different configurations shown.

[0026] It should be noted that the one or more processors and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computing device. As involved in the embodiments of the present disclosure, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0027] The memory can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the method for determining whether the three-dimensional model grid is repeated in the embodiment of the present disclosure. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, the method for determining whether the three-dimensional model grid of the above-mentioned application is repeated. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the computing device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0028] The transmission device is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computing device. In one example, the transmission device includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0029] The display may be, for example, a touch screen liquid crystal display (LCD) that may enable a user to interact with a user interface of the computing device.

[0030] It should be noted that, in some optional embodiments, the above Figure 4 The computing device shown may include hardware elements (including circuits), software elements (including computer code stored on a computer-readable medium), or a combination of both hardware elements and software elements. Figure 4 This is merely one example of a particular embodiment and is intended to illustrate the types of components that may be present in the computing devices described above.

[0031] In the above operating environment, according to the first aspect of this embodiment, a method for determining whether a three-dimensional model grid is repeated is provided. Figure 5 A schematic diagram showing the process of the method is shown in FIG. Figure 5 As shown, the method includes:

[0032] S501, respectively calculating the eigenvectors and eigenvalues ​​of a first grid and a second grid in the three-dimensional model to obtain a first eigenvector and a first eigenvalue of the first grid, and a second eigenvector and a second eigenvalue of the second grid;

[0033] S502: If the first eigenvalue is different from the second eigenvalue, determine that the first grid and the second grid are different grids; otherwise, determine whether the first grid and the second grid are the same grid according to the first eigenvector and the second eigenvector.

[0034] In the embodiment of the present invention, the first grid and the second grid are both part of the three-dimensional model and are two grids that need to be compared to see if they are the same. Figure 1 In the 3D model of a car, we need to compare whether the meshes of the two front wheels are the same. We can use the left front wheel as the first mesh and the right front wheel as the second mesh. Figure 1 In the example, if you need to compare whether the left front door and the right back door are in the same grid, you can use the left front door as the first grid and the right back door as the second grid.

[0035] For example, Figure 2 In the three-dimensional model of the tree, the leaves are part of the three-dimensional model of the tree. All the leaves can be compared in turn to see if the meshes of any two leaves are the same mesh. Then, the mesh of one of the two leaves can be used as the first mesh, and the mesh of the other leaf can be used as the second mesh.

[0036] It should be noted that in the embodiment of the present invention, the 3D model is composed of multiple points in the 3D space, each point has a 3D coordinate x, y and z, and all points of the entire 3D model are points in the same coordinate system. As part of the 3D model, the grid can be regarded as a collection of a series of vertices, each vertex is a 3D point in the 3D space, and the coordinates of the vertex are composed of three values ​​of x, y and z, which describe the position of the vertex in the 3D space.

[0037] In S501 of the embodiment of the present invention, three sets of characteristic coordinate axes and eigenvalues ​​are calculated, and the three characteristic coordinate axes are three-dimensional unit vectors orthogonal to each other in three-dimensional space, which describe the three directions in which the discreteness of the grid vertices is the largest, and the eigenvalues ​​describe the degree of discreteness. A matrix with 3 rows is formed according to the vertex set, and its covariance matrix is ​​obtained, and the eigenvectors and eigenvalues ​​of the covariance matrix are calculated, where the eigenvectors and eigenvalues ​​are the characteristic coordinate axes and eigenvalues ​​of the grid, i.e., the first eigenvector and the first eigenvalue of the first grid, and the second eigenvector and the second eigenvalue of the second grid.

[0038] In S502 of this embodiment, firstly, the eigenvalue is used to determine whether the first grid and the second grid are the same grid. In S501, the characteristic coordinate axes and eigenvalues ​​of the first grid and the second grid are obtained respectively, the characteristic coordinate axes describe the maximum discrete direction of the grid vertices, and the eigenvalue describes the degree of discreteness. Since the degree of discreteness of the two repeated grids must be the same, the three eigenvalues ​​of the two repeated grids must be the same. However, there may be a rotational relationship between the two repeated grids, so the characteristic axes may not be the same. Therefore, it can be determined by the eigenvalue first. Two grids with different eigenvalues ​​are definitely not repeated grids.

[0039] Therefore, in this step, by comparing whether the first eigenvalue is different from the second eigenvalue, it can only be determined whether the two grids are different grids, but it cannot be directly determined whether the two grids are the same grid. In other words, in this step, the situation that the two grids are definitely different grids is first excluded, and then further determination is made.

[0040] In S502 of the present invention, after excluding the situation that the first grid and the second grid are definitely different grids through the eigenvalue, it is further determined whether the first grid and the second grid are the same grid according to the eigenvector.

[0041] Through the method of step-by-step judgment of eigenvalues ​​and eigenvectors of the present invention, the situation that the grids are definitely not the same is first eliminated through the eigenvalues, and then the eigenvectors are further used to screen whether they are the same grids, thereby improving the efficiency of grid deduplication and reducing the probability of misjudgment.

[0042] Example 2

[0043] In the above operating environment, according to the second aspect of this embodiment, a method for determining whether a three-dimensional model grid is repeated is provided. Figure 6 A schematic diagram showing the process of the method is shown in FIG. Figure 6 As shown, the method includes:

[0044] S601. Calculate the eigenvectors and eigenvalues ​​of the first grid and the second grid in the three-dimensional model respectively to obtain the first eigenvector and the first eigenvalue of the first grid, and the second eigenvector and the second eigenvalue of the second grid.

[0045] This step is the same as S501 and will not be described again here.

[0046] S602: Determine whether the first eigenvalue is the same as the second eigenvalue. If they are different, execute S603; if they are the same, execute S604.

[0047] S603: Determine whether the first grid and the second grid are different grids.

[0048] It should be noted that if two grids have different eigenvalues, they are definitely not the same grid. Therefore, this step can determine whether the first grid and the second grid are two different grids. However, there may be a rotation relationship between the two repeated grids, so the characteristic axes may not be the same. By comparing whether the first eigenvalue is different from the second eigenvalue, it can only be determined whether the two grids are different grids, but it cannot be directly determined whether the two grids are the same grid. Therefore, when the first eigenvalue is the same as the second eigenvalue, it is necessary to further screen whether they are the same grids through the eigenvector.

[0049] S604: Calculate a first local coordinate system of the first grid according to the first eigenvector, and calculate a second local coordinate system of the second grid according to the second eigenvector.

[0050] In the embodiment of the present invention, the 3D model is composed of multiple points in the 3D space, each point has a 3D coordinate x, y and z, and all points of the entire 3D model are points in the same coordinate system (global coordinate system). As part of the 3D model, the grid can be regarded as a collection of a series of vertices, each vertex is a 3D point in the 3D space, and the coordinates of the vertex are composed of three values ​​of x, y and z, which describe the position of the vertex in the 3D space.

[0051] In order to further determine whether the first grid and the second grid are the same grid, it is necessary to re-establish a local coordinate system for the first grid and the second grid. And the coordinates of the origin of the second local coordinate system The representation is as follows:

[0052] ;

[0053] in, For all vertices in the first mesh in the global coordinate system The average value of the axis coordinates, For all vertices in the first mesh in the global coordinate system The average value of the axis coordinates, For all vertices in the first mesh in the global coordinate system The average value of the axis coordinates;

[0054] ;

[0055] in, For all vertices in the second mesh in the global coordinate system The average value of the axis coordinates, For all vertices in the second mesh in the global coordinate system The average value of the axis coordinates, For all vertices in the second mesh in the global coordinate system The average of the axis coordinate values.

[0056] For the first grid, the first eigenvector obtained by S601 includes three eigenaxis vectors, which can be expressed as , and ,in:

[0057] , , ;

[0058] The first local coordinate system is the local coordinate system of the first grid, and the coordinate system of the three-dimensional model is called the global coordinate system. Then:

[0059] is the component of the x-axis of the local coordinate system of the first grid in the x-axis direction of the global coordinate system, is the component of the y-axis of the local coordinate system of the first grid in the x-axis direction of the global coordinate system, is the component of the z-axis of the local coordinate system of the first grid in the x-axis direction of the global coordinate system, is the component of the x-axis of the local coordinate system of the first grid in the y-axis direction of the global coordinate system, is the component of the y-axis of the local coordinate system of the first grid in the y-axis direction of the global coordinate system, is the component of the z-axis of the local coordinate system of the first grid in the y-axis direction of the global coordinate system, is the component of the x-axis of the local coordinate system of the first grid in the z-axis direction of the global coordinate system, is the component of the y-axis of the local coordinate system of the first grid in the z-axis direction of the global coordinate system, is the component of the z-axis of the local coordinate system of the first grid in the z-axis direction of the global coordinate system;

[0060] That is to say, The elements in this characteristic axis vector are the components of the x-axis of the local coordinate system of the first grid in the x, y, and z-axis directions of the global coordinate system, respectively. The elements in this characteristic axis vector are the components of the y-axis of the local coordinate system of the first grid in the x-, y-, and z-axis directions of the global coordinate system, respectively. The elements in this characteristic axis vector are the components of the z-axis of the local coordinate system of the first grid in the x-, y-, and z-axis directions of the global coordinate system, respectively.

[0061] For the second grid, the second eigenvector obtained by S601 includes three eigenaxis vectors, which can be expressed as , and ,in:

[0062] , , ;

[0063] The second local coordinate system is the local coordinate system of the second grid, and the coordinate system of the three-dimensional model is called the global coordinate system. Then:

[0064] is the component of the x-axis of the local coordinate system of the second grid in the x-axis direction of the global coordinate system, is the component of the y-axis of the local coordinate system of the second grid in the x-axis direction of the global coordinate system, is the component of the z-axis of the local coordinate system of the second grid in the x-axis direction of the global coordinate system, is the component of the x-axis of the local coordinate system of the second grid in the y-axis direction of the global coordinate system, is the component of the y-axis of the local coordinate system of the second grid in the y-axis direction of the global coordinate system, is the component of the z-axis of the local coordinate system of the second grid in the y-axis direction of the global coordinate system, is the component of the x-axis of the local coordinate system of the second grid in the z-axis direction of the global coordinate system, is the component of the y-axis of the local coordinate system of the second grid in the z-axis direction of the global coordinate system, is the component of the z-axis of the local coordinate system of the second grid in the z-axis direction of the global coordinate system;

[0065] That is to say, The elements in this characteristic axis vector are the components of the x-axis of the local coordinate system of the second grid in the x, y, and z-axis directions of the global coordinate system, respectively. The elements in this characteristic axis vector are the components of the y-axis of the local coordinate system of the second grid in the x-, y-, and z-axis directions of the global coordinate system, respectively. The elements in this characteristic axis vector are the components of the z-axis of the local coordinate system of the second grid in the x-, y-, and z-axis directions of the global coordinate system, respectively.

[0066] It should be noted that the global coordinate system is used to describe the coordinate system followed by all elements in the three-dimensional model, and the local coordinate system is used to describe the position and direction of the local grid part in the three-dimensional model relative to itself or a specific reference point. That is, the first local coordinate system is used to describe the position and direction of the first grid part in the three-dimensional model relative to itself or a specific reference point. The second local coordinate system is used to describe the position and direction of the second grid part in the three-dimensional model relative to itself or a specific reference point.

[0067] Then, the local coordinate system of the first grid is (i.e., the first local coordinate system) can be expressed as:

[0068] ;

[0069] Correspondingly, the local coordinate system of the second grid is (i.e., the second local coordinate system) can be expressed as:

[0070] ;

[0071] S605: Determine a transformation matrix between two grids according to the first local coordinate system and the second local coordinate system.

[0072] In this step, according to the first local coordinate system and the second local coordinate system , the transformation matrix between the two meshes can be calculated.

[0073] Specifically, for the matrices of the two grids , , the transformation matrix to be calculated is , their relationship is the matrix go through Transformation can be turned into a matrix , that is, the following relationship is satisfied:

[0074] ;

[0075] Transpose both sides:

[0076] ;

[0077] ;

[0078] Ride both sides :

[0079] ;

[0080] ;

[0081] Continue transposing both sides to get the transformation matrix of the two grids :

[0082] .

[0083] S606: Extract N vertex coordinates from the first grid by sampling, and obtain N first intermediate coordinate points according to the transformation matrix calculation.

[0084] First, the vertex coordinates of the two meshes are processed, and the coordinate values ​​are converted from floating point to long integer. Compared with the comparison operation of floating point values, long integer can greatly improve the operation efficiency.

[0085] Considering that the number of vertices of the mesh may be large, the present invention adopts a sampling detection method and does not verify all vertices. The sampling rate is set to SR, and the specific value can be, for example, 10%, and the minimum number of samples is set to 20 to ensure that the sampled data has a certain sample coverage and accuracy. The first error rate threshold errorRate is set, and the specific value can be, for example, a range of 0 to 30%.

[0086] In some embodiments, the number N of extracted vertex coordinates is determined according to the following formula: ;

[0087] in, DN is the number of vertices in the first mesh, SR The sampling ratio of selecting some vertices from the number of vertices in the first mesh by sampling, SR is a number greater than 0 and less than 1;

[0088] Floor means round down.

[0089] In some embodiments, the sampling method includes:

[0090] Calculate sampling interval ;

[0091] In the first grid, every vertices, and select a vertex as the sampling point.

[0092] After extracting N vertices, the coordinates of the first intermediate point can be calculated according to the transformation matrix. That is, for the coordinates of each vertex in the N vertex coordinates , the coordinates of the first intermediate point for:

[0093] .

[0094] S607. For each of the N first intermediate coordinate points, search in the second grid whether there is a point identical to the first intermediate coordinate point. If there is no identical point, the first intermediate coordinate point is an error point, and the number and S of all error points are calculated.

[0095] In this step, each point in the first intermediate coordinate is compared with all the points in the second grid. If there are identical points, the point is not an error point. If there are no identical points, the point is an error point. The number of error points and S are calculated.

[0096] Wherein, N and S are both non-negative integers, and S is less than or equal to N.

[0097] S608, calculate error rate , determine whether R is less than the first error rate threshold, if so, execute S610, otherwise execute S609.

[0098] The first error rate threshold errorRate is preset, and the specific value may be in the range of 0-30%, for example, errorRate=5%.

[0099] S609: Determine whether the first grid and the second grid are different within a first error rate threshold range.

[0100] That is, if the error rate R is greater than or equal to the first error rate threshold, it is determined that the first grid and the second grid are different grids within the first error rate threshold range.

[0101] S610: Determine whether the first grid and the second grid are the same within a first error rate threshold range.

[0102] That is, if the error rate R is less than the first error rate threshold, it is determined that the first grid and the second grid are the same grid within the first error rate threshold range.

[0103] At this point, step S609 or S610 has completed the operation of determining whether the first grid and the second grid are the same grid according to the first eigenvector and the second eigenvector.

[0104] The method for determining whether the 3D model grids are repeated in this embodiment first eliminates the grids that are definitely different through the eigenvalues, and then determines whether the remaining grids are the same grids within the set error range based on the eigenvectors and the sampling detection method. After two-step verification, the probability of misjudgment is reduced and the efficiency of grid deduplication is improved. After identifying the same grids, the same grids can be merged, thereby reducing the storage space of the 3D model. For example, Figure 1 For the car shown in FIG. 1 , if the method of the present invention is used to determine that the four wheels are the same grid, the grids of the four wheels can be numbered as grid 1. In the three-dimensional model of the car, the car tire part only needs to store the grid data of one tire, and the grid data of the other tires can only store the grid number, thereby saving at least the storage space occupied by three car tire grids. Figure 2In the three-dimensional model of the tree shown, assuming that through the method of the present invention, it is found that 1000 leaves are the same grid, that is, these 1000 leaves have the same shape, then the grid can be numbered as grid No. 1. It is also found that another 2000 leaves are the same grid, that is, these 2000 leaves have the same shape, then the grid can be numbered as grid No. 2. And so on, all grids with repeated leaves are identified and numbered. Therefore, for the same grid, only one copy of the grid data and its grid number need to be stored, thereby greatly reducing the storage space occupied by the three-dimensional model of the tree.

[0105] In addition, reference Figure 1 As shown, according to the third aspect of this embodiment 1 or embodiment 2, a storage medium is provided. The storage medium includes a stored program, wherein when the program is running, the method described in the above embodiment 1 or embodiment 2 is executed by a processor.

[0106] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.

[0107] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.

[0108] Example 3

[0109] Figure 7 A device for determining whether a three-dimensional model grid is repeated is shown. The device corresponds to the method according to embodiment 1 or embodiment 2, is based on the same inventive concept, solves the same technical problem, and achieves the same technical effect. Figure 7As shown, the device includes: a calculation module 701, which is used to calculate the eigenvectors and eigenvalues ​​of the first grid and the second grid in the three-dimensional model respectively, and obtain the first eigenvector and the first eigenvalue of the first grid, and the second eigenvector and the second eigenvalue of the second grid; a judgment module 702, which is used to judge whether the first grid and the second grid are the same grid, including: if the first eigenvalue is different from the second eigenvalue, then judging that the first grid and the second grid are different grids, otherwise judging whether the first grid and the second grid are the same grid according to the first eigenvector and the second eigenvector.

[0110] Optionally, the judgment module 702 is also used to: judge whether the first grid and the second grid are the same grid according to the first eigenvector and the second eigenvector, specifically including: calculating the first local coordinate system of the first grid according to the first eigenvector, and calculating the second local coordinate system of the second grid according to the second eigenvector; determining the transformation matrix between the two grids according to the first local coordinate system and the second local coordinate system; extracting N vertex coordinates from the first grid by sampling, and obtaining N first intermediate coordinate points according to the transformation matrix; for each of the N first intermediate coordinate points, searching in the second grid whether there is a point identical to the first intermediate coordinate point, if there is no identical point, the first intermediate coordinate point is an error point, and calculating the number and S of all error points; calculating the error rate , if R is less than the first error rate threshold, then it is determined that the first grid and the second grid are the same within the first error rate threshold range; wherein N and S are both non-negative integers, and S is less than or equal to N.

[0111] Optionally, the value of N is determined as follows:

[0112] ;

[0113] in, DN is the number of vertices in the first mesh, SR The sampling ratio of selecting some vertices from the number of vertices in the first mesh by sampling, SR is a number greater than 0 and less than 1;

[0114] Floor means round down.

[0115] Optionally, the sampling method includes: calculating the sampling interval ; In the first grid, every vertices, and select a vertex as the sampling point.

[0116] Optionally, the first eigenvector and the second eigenvector include:

[0117] The first eigenvector includes three eigenaxis vectors , and ,in:

[0118] , , ;

[0119] in, is the component of the x-axis of the local coordinate system of the first grid in the x-axis direction of the global coordinate system, is the component of the y-axis of the local coordinate system of the first grid in the x-axis direction of the global coordinate system, is the component of the z-axis of the local coordinate system of the first grid in the x-axis direction of the global coordinate system, is the component of the x-axis of the local coordinate system of the first grid in the y-axis direction of the global coordinate system, is the component of the y-axis of the local coordinate system of the first grid in the y-axis direction of the global coordinate system, is the component of the z-axis of the local coordinate system of the first grid in the y-axis direction of the global coordinate system, is the component of the x-axis of the local coordinate system of the first grid in the z-axis direction of the global coordinate system, is the component of the y-axis of the local coordinate system of the first grid in the z-axis direction of the global coordinate system, is the component of the z-axis of the local coordinate system of the first grid in the z-axis direction of the global coordinate system;

[0120] The second eigenvector includes three eigenaxis vectors , and ,in:

[0121] , , ;

[0122] in, is the component of the x-axis of the local coordinate system of the second grid in the x-axis direction of the global coordinate system, is the component of the y-axis of the local coordinate system of the second grid in the x-axis direction of the global coordinate system, is the component of the z-axis of the local coordinate system of the second grid in the x-axis direction of the global coordinate system, is the component of the x-axis of the local coordinate system of the second grid in the y-axis direction of the global coordinate system, is the component of the y-axis of the local coordinate system of the second grid in the y-axis direction of the global coordinate system, is the component of the z-axis of the local coordinate system of the second grid in the y-axis direction of the global coordinate system, is the component of the x-axis of the local coordinate system of the second grid in the z-axis direction of the global coordinate system, is the component of the y-axis of the local coordinate system of the second grid in the z-axis direction of the global coordinate system, It is the component of the z-axis of the local coordinate system of the second grid in the z-axis direction of the global coordinate system; wherein the global coordinate system is used to describe the coordinate system followed by all elements in the three-dimensional model, and the local coordinate system is used to describe the position and direction of the local grid part in the three-dimensional model relative to itself or a specific reference point.

[0123] Optionally, the judgment module 702 is further used to: calculate a first local coordinate system of the first grid according to the first eigenvector, and calculate a second local coordinate system of the second grid according to the second eigenvector, specifically including:

[0124] First local coordinate system for:

[0125] ;

[0126] in, For all vertices in the first mesh in the global coordinate system The average value of the axis coordinates, For all vertices in the first mesh in the global coordinate system The average value of the axis coordinates, For all vertices in the first mesh in the global coordinate system The average value of the axis coordinates;

[0127] Second local coordinate system for:

[0128] ;

[0129] in, For all vertices in the second mesh in the global coordinate system The average value of the axis coordinates, For all vertices in the second mesh in the global coordinate system The average value of the axis coordinates, For all vertices in the second mesh in the global coordinate system The average of the axis coordinate values.

[0130] Optionally, the determination module 702 is further configured to: determine a transformation matrix between two grids according to the first local coordinate system and the second local coordinate system, specifically including: a transformation matrix Determined by the following formula: ;

[0131] in, yes The inverse matrix of .

[0132] Optionally, extracting N vertex coordinates from the first grid by sampling, and obtaining N first intermediate coordinate points by calculation according to the transformation matrix includes: for each vertex in the N vertex coordinates , the coordinates of the first intermediate point for: .

[0133] It should be noted that the device disclosed in this embodiment 3 belongs to the same inventive concept as the above method embodiments 1 and 2, solves the same technical problem, and achieves the same technical effect. The similarities are not repeated here.

[0134] Example 4

[0135] The embodiment of the present invention provides a device for determining whether a three-dimensional model grid is repeated. Figure 8 As shown, the device includes: a processor 801 and a memory 802.

[0136] The processor 801 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 801 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field Programmable Gate Array), and PLA (Programmable Logic Array). The processor 801 may also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 1000 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 801 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0137] The memory 802 may include one or more computer-readable storage media, which may be non-transitory. The memory 802 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 802 is used to store at least one program code, and the at least one program code is used to be executed by the processor 801 to implement the corpus resource scheduling method provided in the method embodiment of the present application.

[0138] In some embodiments, the corpus resource scheduling device of this embodiment may optionally include: a bus interface 804 and at least one user interface 803. The processor 801, the memory 802 and the user interface 803 may be connected via a bus interface or a signal line.

[0139] As an optional example, when the processor 801 reads and executes the program code stored in the memory 802, it implements: respectively calculating the eigenvectors and eigenvalues ​​of the first grid and the second grid in the three-dimensional model to obtain the first eigenvector and the first eigenvalue of the first grid, and the second eigenvector and the second eigenvalue of the second grid; if the first eigenvalue is different from the second eigenvalue, then it is determined that the first grid and the second grid are different grids; otherwise, it is determined whether the first grid and the second grid are the same grid based on the first eigenvector and the second eigenvector.

[0140] As an optional example, when the processor 801 reads and executes the program code stored in the memory 802, it implements: calculating the first local coordinate system of the first grid according to the first eigenvector, and calculating the second local coordinate system of the second grid according to the second eigenvector; determining the transformation matrix between the two grids according to the first local coordinate system and the second local coordinate system; extracting N vertex coordinates from the first grid by sampling, and obtaining N first intermediate coordinate points according to the transformation matrix; for each of the N first intermediate coordinate points, searching in the second grid whether there is a point identical to the first intermediate coordinate point; if there is no identical point, the first intermediate coordinate point is an error point, and the number and S of all error points are calculated; and calculating the error rate , if R is less than the first error rate threshold, then it is determined that the first grid and the second grid are the same within the first error rate threshold range; wherein N and S are both non-negative integers, and S is less than or equal to N.

[0141] Optionally, the value of N is determined as follows:

[0142] ;

[0143] in, DN is the number of vertices in the first mesh, SRThe sampling ratio of selecting some vertices from the number of vertices in the first mesh by sampling, SR is a number greater than 0 and less than 1;

[0144] Floor means round down.

[0145] Optionally, the sampling method includes:

[0146] Calculate sampling interval ;

[0147] In the first grid, every vertices, and select a vertex as the sampling point.

[0148] Optionally, the first eigenvector and the second eigenvector include:

[0149] The first eigenvector includes three eigenaxis vectors , and ,in:

[0150] , , ;

[0151] in, is the component of the x-axis of the local coordinate system of the first grid in the x-axis direction of the global coordinate system, is the component of the y-axis of the local coordinate system of the first grid in the x-axis direction of the global coordinate system, is the component of the z-axis of the local coordinate system of the first grid in the x-axis direction of the global coordinate system, is the component of the x-axis of the local coordinate system of the first grid in the y-axis direction of the global coordinate system, is the component of the y-axis of the local coordinate system of the first grid in the y-axis direction of the global coordinate system, is the component of the z-axis of the local coordinate system of the first grid in the y-axis direction of the global coordinate system, is the component of the x-axis of the local coordinate system of the first grid in the z-axis direction of the global coordinate system, is the component of the y-axis of the local coordinate system of the first grid in the z-axis direction of the global coordinate system, is the component of the z-axis of the local coordinate system of the first grid in the z-axis direction of the global coordinate system;

[0152] The second eigenvector includes three eigenaxis vectors , and ,in:

[0153] , , ;

[0154] in, is the component of the x-axis of the local coordinate system of the second grid in the x-axis direction of the global coordinate system, is the component of the y-axis of the local coordinate system of the second grid in the x-axis direction of the global coordinate system, is the component of the z-axis of the local coordinate system of the second grid in the x-axis direction of the global coordinate system, is the component of the x-axis of the local coordinate system of the second grid in the y-axis direction of the global coordinate system, is the component of the y-axis of the local coordinate system of the second grid in the y-axis direction of the global coordinate system, is the component of the z-axis of the local coordinate system of the second grid in the y-axis direction of the global coordinate system, is the component of the x-axis of the local coordinate system of the second grid in the z-axis direction of the global coordinate system, is the component of the y-axis of the local coordinate system of the second grid in the z-axis direction of the global coordinate system, It is the component of the z-axis of the local coordinate system of the second grid in the z-axis direction of the global coordinate system; wherein the global coordinate system is used to describe the coordinate system followed by all elements in the three-dimensional model, and the local coordinate system is used to describe the position and direction of the local grid part in the three-dimensional model relative to itself or a specific reference point.

[0155] Optionally, calculating a first local coordinate system of the first grid according to the first eigenvector and calculating a second local coordinate system of the second grid according to the second eigenvector comprises: the first local coordinate system for:

[0156] ;

[0157] in, For all vertices in the first mesh in the global coordinate system The average value of the axis coordinates, For all vertices in the first mesh in the global coordinate system The average value of the axis coordinates, For all vertices in the first mesh in the global coordinate system The average value of the axis coordinates;

[0158] Second local coordinate system for:

[0159] ;

[0160] in, For all vertices in the second mesh in the global coordinate system The average value of the axis coordinates, For all vertices in the second mesh in the global coordinate system The average value of the axis coordinates, For all vertices in the second mesh in the global coordinate system The average of the axis coordinate values.

[0161] Optionally, determining the transformation matrix between the two grids according to the first local coordinate system and the second local coordinate system includes: the transformation matrix Determined by the following formula:

[0162] ;

[0163] in, yes The inverse matrix of .

[0164] Optionally, extracting N vertex coordinates from the first grid by sampling, and obtaining N first intermediate coordinate points by calculation according to the transformation matrix includes: for each vertex in the N vertex coordinates , the coordinates of the first intermediate point for:

[0165] .

[0166] It should be noted that the device disclosed in this embodiment 4 belongs to the same inventive concept as the above method embodiments 1 and 2, solves the same technical problem, and achieves the same technical effect. The similarities are not repeated here.

[0167] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0168] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0169] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0170] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0171] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0172] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc. Various media that can store program codes.

[0173] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A method for determining whether a three-dimensional model grid is repeated, characterized in that: The three-dimensional model grid is constructed based on the detailed morphology of objects in the industrial manufacturing field, and the determination method includes: Calculate the eigenvectors and eigenvalues ​​of the first grid and the second grid in the three-dimensional model respectively, and obtain the first eigenvector and the first eigenvalue of the first grid, and the second eigenvector and the second eigenvalue of the second grid; wherein the eigenvectors are three characteristic coordinate axes, i.e., three-dimensional unit vectors that are orthogonal to each other in the three-dimensional space, and describe the three directions in which the discrete degree of the grid vertices is the largest; and the eigenvalues ​​describe the discrete degree of the grid vertices; If the first eigenvalue is different from the second eigenvalue, determining that the first grid and the second grid are different grids; otherwise, determining whether the first grid and the second grid are the same grid according to the first eigenvector and the second eigenvector; The step of determining whether the first grid and the second grid are the same grid according to the first eigenvector and the second eigenvector comprises: Calculate a first local coordinate system of the first grid according to the first eigenvector, and calculate a second local coordinate system of the second grid according to the second eigenvector; Determine a transformation matrix between two grids according to the first local coordinate system and the second local coordinate system; Extracting N vertex coordinates from the first grid by sampling, and obtaining N first intermediate coordinate points by calculation according to the transformation matrix; For each of the N first intermediate coordinate points, search in the second grid whether there is a point identical to the first intermediate coordinate point; if there is no identical point, the first intermediate coordinate point is an error point, and the number and S of all error points are calculated; Calculate the error rate , if R is less than a first error rate threshold, then determining that the first grid and the second grid are the same grid within the first error rate threshold range; Wherein, N and S are both non-negative integers, and S is less than or equal to N.

2. The method according to claim 1, characterized in that The value of N is determined as follows: ; in, DN is the number of vertices in the first mesh, SR A sampling ratio for selecting a portion of vertices from the number of vertices in the first mesh by sampling, SR is a number greater than 0 and less than 1; Floor means round down.

3. The method according to claim 2, characterized in that The sampling methods include: Calculate sampling interval ; In the first grid, every vertices, and select a vertex as the sampling point.

4. The method according to claim 1, characterized in that The first eigenvector includes three eigenaxis vectors , and ,in: , , ; in, is the component of the x-axis of the local coordinate system of the first grid in the x-axis direction of the global coordinate system, is the component of the y-axis of the local coordinate system of the first grid in the x-axis direction of the global coordinate system, is the component of the z-axis of the local coordinate system of the first grid in the x-axis direction of the global coordinate system, is the component of the x-axis of the local coordinate system of the first grid in the y-axis direction of the global coordinate system, is the component of the y-axis of the local coordinate system of the first grid in the y-axis direction of the global coordinate system, is the component of the z-axis of the local coordinate system of the first grid in the y-axis direction of the global coordinate system, is the component of the x-axis of the local coordinate system of the first grid in the z-axis direction of the global coordinate system, is the component of the y-axis of the local coordinate system of the first grid in the z-axis direction of the global coordinate system, is the component of the z-axis of the local coordinate system of the first grid in the z-axis direction of the global coordinate system; The second eigenvector includes three eigenaxis vectors , and ,in: , , ; in, is the component of the x-axis of the local coordinate system of the second grid in the x-axis direction of the global coordinate system, is the component of the y-axis of the local coordinate system of the second grid in the x-axis direction of the global coordinate system, is the component of the z-axis of the local coordinate system of the second grid in the x-axis direction of the global coordinate system, is the component of the x-axis of the local coordinate system of the second grid in the y-axis direction of the global coordinate system, is the component of the y-axis of the local coordinate system of the second grid in the y-axis direction of the global coordinate system, is the component of the z-axis of the local coordinate system of the second grid in the y-axis direction of the global coordinate system, is the component of the x-axis of the local coordinate system of the second grid in the z-axis direction of the global coordinate system, is the component of the y-axis of the local coordinate system of the second grid in the z-axis direction of the global coordinate system, is the component of the z-axis of the local coordinate system of the second grid in the z-axis direction of the global coordinate system; The global coordinate system is used to describe the coordinate system followed by all elements in the three-dimensional model, and the local coordinate system is used to describe the position and direction of a local grid part in the three-dimensional model relative to itself or a specific reference point.

5. The method according to claim 4, characterized in that Calculating a first local coordinate system of the first grid according to the first eigenvector, and calculating a second local coordinate system of the second grid according to the second eigenvector comprises: First local coordinate system for: ; in, For all vertices in the first mesh in the global coordinate system The average value of the axis coordinates, For all vertices in the first mesh in the global coordinate system The average value of the axis coordinates, For all vertices in the first mesh in the global coordinate system The average value of the axis coordinates; Second local coordinate system for: ; in, For all vertices in the second mesh in the global coordinate system The average value of the axis coordinates, For all vertices in the second mesh in the global coordinate system The average value of the axis coordinates, For all vertices in the second mesh in the global coordinate system The average of the axis coordinate values.

6. The method according to claim 5, characterized in that Determining a transformation matrix between two grids according to the first local coordinate system and the second local coordinate system comprises: The transformation matrix Determined by the following formula: ; in, yes The inverse matrix of .

7. The method according to claim 6, characterized in that The extracting N vertex coordinates from the first grid by sampling, and obtaining N first intermediate coordinate points by calculation according to the transformation matrix comprises: For each of the N vertex coordinates , the coordinates of the first intermediate point for: 。 8. A storage medium, characterized in that: The storage medium includes a stored program, wherein when the program is run, the processor executes the method for determining whether a three-dimensional model grid is repeated as described in any one of claims 1 to 7.

9. A device for determining whether a three-dimensional model grid is repeated, characterized in that: The three-dimensional model grid is constructed based on the detailed morphology of objects in the field of industrial manufacturing, and the judgment device includes: A calculation module, used to calculate the eigenvectors and eigenvalues ​​of the first grid and the second grid in the three-dimensional model respectively, to obtain the first eigenvector and the first eigenvalue of the first grid, the second eigenvector and the second eigenvalue of the second grid; wherein the eigenvectors are three characteristic coordinate axes, i.e., three-dimensional unit vectors that are orthogonal to each other in the three-dimensional space, and describe the three directions in which the discreteness of the grid vertices is the largest; and the eigenvalues ​​describe the discreteness of the grid vertices; A judging module, configured to judge whether the first grid and the second grid are the same grid, comprising: if the first eigenvalue is different from the second eigenvalue, judging that the first grid and the second grid are different grids; otherwise, judging whether the first grid and the second grid are the same grid according to the first eigenvector and the second eigenvector; The step of determining whether the first grid and the second grid are the same grid according to the first eigenvector and the second eigenvector comprises: Calculate a first local coordinate system of the first grid according to the first eigenvector, and calculate a second local coordinate system of the second grid according to the second eigenvector; Determine a transformation matrix between two grids according to the first local coordinate system and the second local coordinate system; Extracting N vertex coordinates from the first grid by sampling, and obtaining N first intermediate coordinate points by calculation according to the transformation matrix; For each of the N first intermediate coordinate points, search in the second grid whether there is a point identical to the first intermediate coordinate point; if there is no identical point, the first intermediate coordinate point is an error point, and the number and S of all error points are calculated; Calculate the error rate , if R is less than a first error rate threshold, then determining that the first grid and the second grid are the same grid within the first error rate threshold range; Wherein, N and S are both non-negative integers, and S is less than or equal to N.

10. A device for determining whether a three-dimensional model grid is repeated, characterized in that: The three-dimensional model grid is constructed based on the detailed morphology of objects in the field of industrial manufacturing, and the judgment device includes: Processor; and A memory, connected to the processor, configured to provide the processor with instructions for processing the following processing steps: Calculate the eigenvectors and eigenvalues ​​of the first grid and the second grid in the three-dimensional model respectively, and obtain the first eigenvector and the first eigenvalue of the first grid, and the second eigenvector and the second eigenvalue of the second grid; wherein the eigenvectors are three characteristic coordinate axes, i.e., three-dimensional unit vectors that are orthogonal to each other in the three-dimensional space, and describe the three directions in which the discrete degree of the grid vertices is the largest; and the eigenvalues ​​describe the discrete degree of the grid vertices; If the first eigenvalue is different from the second eigenvalue, determining that the first grid and the second grid are different grids; otherwise, determining whether the first grid and the second grid are the same grid according to the first eigenvector and the second eigenvector; The step of determining whether the first grid and the second grid are the same grid according to the first eigenvector and the second eigenvector comprises: Calculate a first local coordinate system of the first grid according to the first eigenvector, and calculate a second local coordinate system of the second grid according to the second eigenvector; Determine a transformation matrix between two grids according to the first local coordinate system and the second local coordinate system; Extracting N vertex coordinates from the first grid by sampling, and obtaining N first intermediate coordinate points by calculation according to the transformation matrix; For each of the N first intermediate coordinate points, search in the second grid whether there is a point identical to the first intermediate coordinate point; if there is no identical point, the first intermediate coordinate point is an error point, and the number and S of all error points are calculated; Calculate the error rate , if R is less than a first error rate threshold, then determining that the first grid and the second grid are the same grid within the first error rate threshold range; Wherein, N and S are both non-negative integers, and S is less than or equal to N.

Citation Information

Patent Citations

  • Normal, geometric and uv factors-based mesh simplification method

    CN106780697A

  • Corner point grid generation method based on 3D printing digital model

    CN117994450A