Model component placement information reconstruction method
By calculating the eigenax length ratio of the model components and the distribution around the eigenax, combined with the comprehensive feature code string of the triangle, the three-dimensional model is grouped and placed information reconstructed, which solves the problem of loss of placement information of the model components and improves the three-dimensional model Update efficiency and reduce costs.
Patent Information
- Application Number
- CN202311656373.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-05
- Publication Date
- 2024-12-13
AI Technical Summary
During the three-dimensional model production process, due to the loss of placement information of model components during data import and export, manual adjustments are required in the later stage, which increases cost and time, and may even require re-creation of the model.
By obtaining the node data of the model component, calculating the eigenax length ratio and distribution around the eigenax, determining the comprehensive feature code string of the triangle, and matching and grouping the model components, selecting the reference model components to reconstruct the placement information of the other model components. .
It effectively solves the problem of loss of model component placement information, reduces manual adjustment, realizes fast and accurate model modification and maintenance, improves the update efficiency of three-dimensional model scenarios and reduces costs.
Smart Images

Figure CN119131228A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of three-dimensional models, and in particular to a method for reconstructing model component placement information. Background Art
[0002] In the field of 3D modeling, there are many different software, each with its own unique functions and focus. In actual business applications, due to the limitations of various factors such as demand, funding, working hours and effects, it is often necessary to use multiple software at the same time to produce scene data. However, this approach may cause the placement information of some model components to be lost when importing and exporting data. When the scene data needs to be published and maintained in the later stage, the placement information of these model components is required to determine the model components inside the 3D model. Without this placement information, it is necessary to rely on manual replacement and careful adjustment of model components one by one, which will greatly increase costs and cause the 3D model production to be postponed due to modifications, or even need to be remade. Summary of the invention
[0003] Based on this, it is necessary to propose a method for reconstructing model component placement information to address the above problems, which can effectively solve the technical problems existing in the prior art.
[0004] To achieve the above object, the present invention provides a method for reconstructing model component placement information in a first aspect, the method comprising:
[0005] Get the node data of all model components;
[0006] Calculate the intrinsic axis length ratio and distribution around the eigenaxis of the ith model component according to the node data of the ith model component, and determine the comprehensive feature code string of each triangle of the ith model component according to the node data of the ith model component; repeat the above steps, i takes integers greater than 0 in turn, to obtain the intrinsic axis length ratios and distribution around the eigenaxis of all model components, and the comprehensive feature code string of each triangle of all model components;
[0007] The model components are matched and grouped according to the intrinsic axis length ratios and distribution around the intrinsic axis of all model components, as well as the node data of all model components, to obtain multiple groups of model components;
[0008] Select any one model component from the jth group of model components as a reference model component, match the triangle of the reference model component with the triangles of the remaining model components according to the comprehensive feature code string of each triangle of the reference model component in the jth group of model components and the comprehensive feature code string of each triangle of the remaining model components, obtain multiple pairs of lists of triangles with the same name, and determine multiple pairs of lists of points with the same name of the jth group of model components according to each pair of lists of triangles with the same name and the node data of the corresponding model component;
[0009] Calculate placement information of remaining model components in the jth group of model components according to multiple pairs of lists of points and multiple pairs of triangles of the same name of the jth group of model components and placement information of reference model components in the jth group of model components;
[0010] Repeat the above steps, with j taking integers greater than 0 in turn, to obtain the placement information of the remaining model components in all groups of model components.
[0011] Optionally, the node data of the i-th model component includes vertex coordinates of a triangle, and the step of calculating the intrinsic axis length ratio and distribution around the intrinsic axis of the i-th model component according to the node data of the i-th model component includes:
[0012] Calculate three eigenvectors according to the vertex coordinates of all triangles of the i-th model component, and use the three eigenvectors as three eigenaxes of the i-th model component;
[0013] Obtain three axis length values according to the three intrinsic axes of the i-th model component, and use the smallest axis length value among the three axis length values as the reference axis length value;
[0014] Convert the three axis length values into three ratio values according to the reference axis length value, and use the three ratio values as the intrinsic axis length ratios of the i-th model component;
[0015] Determine a plurality of vertex-bottom distances between the vertices of all triangles of the ith model component and the bottom of the ith model component according to the vertex coordinates of all triangles of the ith model component, and determine a plurality of vertex-eigenaxis distances between the vertices of all triangles of the ith model component and the kth eigenaxis of the ith model component according to the vertex coordinates of all triangles of the ith model component and the kth eigenaxis of the ith model component;
[0016] Construct two-dimensional coordinates by one-to-one correspondence between the bottom distances of multiple vertices and the eigen-axis distances of multiple vertices, and obtain multiple two-dimensional coordinates of the kth eigen-axis of the i-th model component;
[0017] Calculate two eigenvalues according to a plurality of two-dimensional coordinates of the kth eigenaxis of the ith model component, and use the two eigenvalues as the distribution of the kth eigenaxis of the ith model component;
[0018] Repeat the above steps, k takes integers greater than 0 in turn, to obtain the distribution of the three eigenaxis of the ith model component, and use the distribution of the three eigenaxis of the ith model component as the distribution around the eigenaxis of the ith model component.
[0019] Optionally, the node data of the i-th model component includes vertex coordinates of a triangle, normal information of a triangle, and triangle topology information, and the step of determining the comprehensive feature code string of each triangle of the i-th model component according to the node data of the i-th model component includes:
[0020] Determine the total number of adjacent triangles of the vth triangle of the ith model component according to the vertex coordinates of all triangles of the ith model component and the triangle topology information of the ith model component;
[0021] In the case where the vth triangle of the ith model component has a texture, the node data of the ith model component also includes the texture coordinates of the vth triangle;
[0022] Calculate three eigenvectors according to the vertex coordinates of all triangles of the ith model component, and use the three eigenvectors as the three eigenaxes of the ith model component; stratify each eigenaxe of the ith model component by percentage to obtain the stratification values of each stratification level of each eigenaxe of the ith model component; determine the centroid coordinates of the vth triangle of the ith model component according to the vertex coordinates of the vth triangle of the ith model component; determine the three stratification values corresponding to the three eigenaxes of the vth triangle of the ith model component located on the i-th model component according to the centroid coordinates of the vth triangle of the ith model component and the stratification values of each stratification level of each eigenaxe of the ith model component, and use the three stratification values as the spatial index of the vth triangle of the ith model component;
[0023] Determine a characteristic code string of adjacent triangle face change of the vth triangle of the ith model component according to the normal information of all triangles of the ith model component and the triangle topology information of the ith model component;
[0024] Calculate the three magnitude distances corresponding to the center of gravity of the vth triangle of the ith model component and the three eigenaxis planes of the ith model component according to the center of gravity coordinates of all triangles of the ith model component and the three eigenaxis of the ith model component;
[0025] Calculate the sum of the side lengths of three magnitudes of the projection triangles corresponding to the projection of the vth triangle of the ith model component on the three eigenaxis planes of the ith model component according to the vertex coordinates of all triangles of the ith model component and the three eigenaxis of the ith model component;
[0026] In the case that the vth triangle of the i-th model component has a texture, the total number of adjacent triangles, texture coordinates, spatial index, feature code string of adjacent triangle face changes, three-magnitude distances and three-magnitude projection triangle side lengths of the vth triangle of the i-th model component are used as the comprehensive feature code string of the vth triangle of the i-th model component;
[0027] In the case that the vth triangle of the i-th model component does not have a texture, the total number of adjacent triangles, spatial index, feature code string of adjacent triangle face changes, three-magnitude distances and three-magnitude projected triangle side lengths of the vth triangle of the i-th model component are used as the comprehensive feature code string of the vth triangle of the i-th model component;
[0028] Repeat the above steps, with v taking integers greater than 0 in turn, to obtain the comprehensive feature code string of all triangles of the i-th model component.
[0029] Optionally, the step of determining the adjacent triangle face change characteristic code string of the vth triangle of the i-th model component according to the normal information of all triangles of the i-th model component and the triangle topology information of the i-th model component comprises:
[0030] When the normal information of the vth triangle of the ith model component is parallel to the normal information of the zth adjacent triangle of the ith model component, the surface change of the zth adjacent triangle of the ith model component is a plane character;
[0031] When the normal information of the vth triangle of the ith model component is not parallel to the normal information of the zth adjacent triangle of the ith model component and the upper part intersects, the surface change of the zth adjacent triangle of the ith model component is an ascending character;
[0032] When the normal information of the vth triangle of the ith model component is not parallel to the normal information of the zth adjacent triangle of the ith model component and the lower part intersects, the face change of the zth adjacent triangle of the ith model component is a descending character;
[0033] Repeat the above steps, with z taking integers greater than 0 in turn, to obtain the surface changes of all adjacent triangles of the i-th model component, and use the characters corresponding to the surface changes of all adjacent triangles of the i-th model component as the feature code string of the surface changes of adjacent triangles of the v-th triangle of the i-th model component.
[0034] Optionally, the calculating, according to the barycentric coordinates of all triangles of the i-th model component and the three eigenaxis planes of the i-th model component, three magnitude distances corresponding to the barycenter of the v-th triangle of the i-th model component and the three eigenaxis planes of the i-th model component comprises:
[0035] Calculate multiple barycenter intrinsic axis plane distances corresponding to the barycenters of all triangles of the ith model component and the kth intrinsic axis of the ith model component according to the barycenter coordinates of all triangles of the ith model component and the kth intrinsic axis of the ith model component, and determine the maximum barycenter intrinsic axis plane distance, the minimum barycenter intrinsic axis plane distance and the target barycenter intrinsic axis plane distance according to the multiple barycenter intrinsic axis plane distances; wherein the target barycenter intrinsic axis plane distance is the barycenter intrinsic axis plane distance corresponding to the barycenter of the vth triangle of the ith model component and the kth intrinsic axis plane of the ith model component;
[0036] Calculate the magnitude distance corresponding to the center of gravity of the vth triangle of the ith model component and the kth eigenaxis plane of the ith model component according to the maximum center of gravity eigenaxis plane distance, the minimum center of gravity eigenaxis plane distance and the target center of gravity eigenaxis plane distance;
[0037] Repeat the above steps, with k taking integers greater than 0 in turn, to obtain three magnitude distances corresponding to the centroid of the vth triangle of the ith model component and the three intrinsic axis planes of the ith model component.
[0038] Optionally, the step of calculating the sum of side lengths of three magnitudes of projected triangles corresponding to the projection of the vth triangle of the ith model component on three eigenaxis planes of the ith model component according to the vertex coordinates of all triangles of the ith model component and three eigenaxis of the ith model component comprises:
[0039] According to the vertex coordinates of all triangles of the ith model component and the kth intrinsic axis of the ith model component, calculate the sum of the side lengths of multiple projected triangles corresponding to the projection of all triangles of the ith model component on the kth intrinsic axis plane of the ith model component, and determine the maximum sum of the side lengths of the projected triangles, the minimum sum of the side lengths of the projected triangles, and the target sum of the side lengths of the projected triangles according to the multiple sums of the side lengths of the projected triangles; wherein the target sum of the side lengths of the projected triangles is the sum of the side lengths of the projected triangles corresponding to the projection of the vth triangle of the ith model component on the kth intrinsic axis plane of the ith model component;
[0040] Calculate the magnitude projection triangle side length sum corresponding to the projection of the vth triangle of the ith model component on the kth intrinsic axis plane of the ith model component according to the maximum projection triangle side length sum, the minimum projection triangle side length sum and the target projection triangle side length sum;
[0041] Repeat the above steps, with k taking integers greater than 0 in turn, to obtain the sum of the side lengths of three magnitude projection triangles corresponding to the projection of the vth triangle of the ith model component on the three eigenaxis planes of the ith model component.
[0042] Optionally, the calculating three feature vectors according to the vertex coordinates of all triangles of the i-th model component includes:
[0043] Calculate the first covariance matrix of the ith model component according to the vertex coordinates of all triangles of the ith model component, and decompose the first covariance matrix of the ith model component to obtain three eigenvectors;
[0044] Two eigenvalues are calculated based on multiple two-dimensional coordinates of the kth eigenaxis of the i-th model component, including:
[0045] A second covariance matrix of the kth eigenaxis of the ith model component is calculated according to multiple two-dimensional coordinates of the kth eigenaxis of the ith model component, and the second covariance matrix of the kth eigenaxis of the ith model component is decomposed to obtain two eigenvalues.
[0046] Optionally, the node data of each model component includes the vertex coordinates, normal information and triangle topology information of the triangle, and the model components are matched and grouped according to the intrinsic axis length ratios and distribution around the intrinsic axes of all model components and the node data of all model components to obtain multiple groups of model components, including:
[0047] In the case where the triangles of the model components have textures, the node data of the model components also include the texture coordinates of the triangles and the texture data of the triangles; the total number of vertices of all triangles of all model components, the total number of triangles of all triangles, the total number of textures of all triangles and the texture coordinates of all triangles are determined according to the vertex coordinates of all triangles of all model components, the normal information of all triangles, the triangle topology information, the texture coordinates of all triangles and the texture data of all triangles; and matching and grouping are performed according to the intrinsic axis length ratios of all model components, the distribution around the intrinsic axes, the total number of vertices of all triangles of all model components, the total number of triangles of all triangles, the total number of textures of all triangles and the texture coordinates of all triangles to obtain multiple groups of model components;
[0048] When there is no texture in the triangles of the model components, the total number of vertices of all triangles of all model components and the total number of triangles of all triangles are determined according to the vertex coordinates of all triangles of all model components, the normal information of all triangles and the triangle topology information, and matching and grouping are performed according to the intrinsic axis length ratio of all model components, the distribution around the intrinsic axis, the total number of vertices of all triangles of all model components and the total number of triangles of all triangles to obtain multiple groups of model components.
[0049] Optionally, the placement parameters of the nth model component of the remaining model components in the jth group of model components include a scaling matrix, a rotation matrix, and a translation matrix, and the calculation of the placement information of the remaining model components in the jth group of model components according to the multiple pairs of lists of points with the same name and the multiple pairs of lists of triangles with the same name of the jth group of model components and the placement information of the reference model components in the jth group of model components includes:
[0050] Determine the vertex coordinates of all points with the same name of the nth model component of the remaining model components in the jth group of model components according to the list of multiple pairs of triangles with the same name of the jth group of model components;
[0051] Calculating transformed vertex coordinates of all the same-named points of the nth model component of the remaining model components in the jth group of model components according to the vertex coordinates of all the same-named points of the nth model component of the remaining model components in the jth group of model components and the placement information of the reference model component in the jth group of model components;
[0052] Calculate the translation matrix of the nth model component of the remaining model components in the jth group of model components according to the vertex coordinates of all the same-name points of the nth model component of the remaining model components in the jth group of model components and the transformed vertex coordinates of all the same-name points of the nth model component of the remaining model components in the jth group of model components;
[0053] Determine all the same-named edges of the nth model component of the remaining model components in the jth group of model components according to the list of multiple pairs of same-named points of the jth group of model components;
[0054] Determine all transformed same-named edges of the nth model component of the remaining model components in the jth group of model components according to all same-named edges of the nth model component of the remaining model components in the jth group of model components, vertex coordinates of all same-named points of the nth model component of the remaining model components in the jth group of model components, and transformed vertex coordinates of all same-named points of the nth model component of the remaining model components in the jth group of model components;
[0055] Calculate the scaling matrix and rotation matrix of the nth model component of the remaining model components in the jth group of model components according to all transformed edges with the same name of the nth model component of the remaining model components in the jth group of model components and all edges with the same name of the nth model component of the remaining model components in the jth group of model components;
[0056] Repeat the above steps, with n taking integers greater than 0 in turn, to obtain the scaling matrix, rotation matrix, and translation matrix of the remaining model components in the j-th group of model components.
[0057] Optionally, the step of calculating the transformed vertex coordinates of all the same-named points of the nth model component of the remaining model components in the jth group of model components according to the vertex coordinates of all the same-named points of the nth model component of the remaining model components in the jth group of model components and the placement information of the reference model component in the jth group of model components comprises:
[0058] Using the formula Calculate the transformed vertex coordinates of all the points with the same name of the nth model component of the remaining model components in the jth group of model components;
[0059] Among them, P j ' ,n,m is the transformed vertex coordinate of the mth point of the same name of the nth model component of the rest of the model components in the jth group of model components, P j,n,m is the vertex coordinate of the mth point of the same name of the nth model component of the rest of the model components in the jth group of model components, T j,1 is the translation matrix of the reference model component in the jth group of model components with the center of mass returned to zero, R j,axis is the rotation matrix of the three intrinsic axes of the reference model component in the jth group of model components converted to the three coordinate axes, S j,axis is the scaling matrix of the three eigen-axes of the reference model component in the jth group of model components, For R j,axis The inverse matrix, R j is the rotation matrix of the reference model component in the jth group of model components, T j is the translation matrix of the reference model component in the jth group of model components;
[0060] The step of calculating the scaling matrix and the rotation matrix of the nth model component of the remaining model components in the jth group of model components according to all transformed edges with the same name of the nth model component of the remaining model components in the jth group of model components and all edges with the same name of the nth model component of the remaining model components in the jth group of model components comprises:
[0061] The scaling matrix and rotation matrix of the nth model component of the remaining model components in the jth group of model components are calculated using the following formula:
[0062] make
[0063] For S x , S y and S z To perform the derivation:
[0064]
[0065] Solve the above equation:
[0066]
[0067] Solving for S j,n,axxis Substitution Get R j,n ;
[0068] Among them, V j ' ,n,a is the ath edge with the same name of the nth model component of the rest of the model components in the jth group of model components, V j,n,a is the ath transformed edge with the same name of the nth model component of the rest of the model components in the jth group of model components, S j,n,axxis is the scaling matrix of the three eigen-axes of the nth model component of the remaining model components in the jth group of model components, V j ' ,n,a The three components on the three coordinate axes, V j,n,a The three components on the three coordinate axes, For S j,n,axxis The three components of the three coordinate axes, Q j,n is the module length variance of the nth model component of the rest of the model components in the jth group of model components, A is the total number of the same-name edges or the transformed same-name edges of the nth model component of the rest of the model components in the jth group of model components, R j,n,axis is the rotation matrix for converting the three intrinsic axes of the nth model component of the remaining model components in the jth group of model components to the three coordinate axes, For R j,n,axis The inverse matrix, R j,n is the rotation matrix of the nth model component among the remaining model components in the jth group of model components.
[0069] To achieve the above object, the present invention provides, in a second aspect, a device for reconstructing model component placement information, the device comprising:
[0070] The acquisition module is used to obtain the node data of all model components;
[0071] Repeat the determination of the calculation module, which is used to calculate the intrinsic axis length ratio and the distribution around the eigenaxis of the ith model component according to the node data of the ith model component, and determine the comprehensive feature code string of each triangle of the ith model component according to the node data of the ith model component; repeat the above steps, i takes integers greater than 0 in turn, to obtain the intrinsic axis length ratios and the distribution around the eigenaxis of all model components, and the comprehensive feature code string of each triangle of all model components;
[0072] A grouping module is used to match and group the model components according to the intrinsic axis length ratios and distribution around the intrinsic axis of all model components and the node data of all model components to obtain multiple groups of model components;
[0073] A matching module is used to select any one model component from the jth group of model components as a reference model component, match the triangle of the reference model component with the triangles of the remaining model components according to the comprehensive feature code string of each triangle of the reference model component in the jth group of model components and the comprehensive feature code string of each triangle of the remaining model components, obtain multiple pairs of lists of triangles with the same name, and determine multiple pairs of lists of points with the same name of the jth group of model components according to each pair of lists of triangles with the same name and the node data of the corresponding model component;
[0074] A calculation module, used for calculating placement information of remaining model components in the jth group of model components according to multiple pairs of lists of points with the same name and multiple pairs of lists of triangles with the same name of the jth group of model components and placement information of reference model components in the jth group of model components;
[0075] The repeating module is used to repeat the above steps, and j takes integers greater than 0 in turn to obtain the placement information of the remaining model components in all group model components.
[0076] To achieve the above-mentioned object, the present invention provides in a third aspect a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor executes the method as described in any one of the first aspects.
[0077] To achieve the above-mentioned purpose, the present invention provides a computer device in a fourth aspect, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the method as described in any one of the first aspects.
[0078] The embodiment of the present invention has the following beneficial effects: the above method obtains the node data of all model components to calculate the intrinsic axis length ratio and the distribution around the intrinsic axis of the ith model component according to the node data of the ith model component, and determines the comprehensive feature code string of each triangle of the ith model component according to the node data of the ith model component, and then matches and groups the model components according to the intrinsic axis length ratios and the distribution around the intrinsic axis of all model components and the node data of all model components to obtain multiple groups of model components, and selects any one model component from the jth group of model components as a reference model component, and matches the triangles of the reference model component with the triangles of the remaining model components according to the comprehensive feature code string of each triangle of the reference model component in the jth group of model components and the comprehensive feature code string of each triangle of the remaining model components to obtain multiple pairs of lists of triangles with the same name, and determines multiple pairs of lists of model components of the jth group according to each pair of lists of triangles with the same name and the node data of the corresponding model components. A list of points with the same name, and finally, the placement information of the remaining model components in the jth group of model components is calculated according to the multiple pairs of lists of points with the same name and the multiple pairs of lists of triangles with the same name of the jth group of model components, as well as the placement information of the reference model components in the jth group of model components; that is, the intrinsic axis length ratio, the distribution around the intrinsic axis and the comprehensive feature code string of each triangle of each model component are obtained according to the node data of all model components, and the model components are grouped based on the node data, the intrinsic axis length ratio and the distribution around the intrinsic axis of all model components, and then a reference model component is selected for each group of model components, and the remaining model components in each group of model components are matched with the reference model components according to the comprehensive feature code string of each triangle of each group of model components, and the placement parameters of the remaining model components in each group of model components are reconstructed based on the reference model components. This method can effectively solve the technical problems existing in the prior art (that is, the placement parameters of the remaining models can be reconstructed based on the reference model components if they are lost). BRIEF DESCRIPTION OF THE DRAWINGS
[0079] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0080] in:
[0081] Figure 1 A schematic diagram of a method for reconstructing model component placement information in an embodiment of the present application;
[0082] Figure 2 A schematic diagram of a device for reconstructing model component placement information in an embodiment of the present application;
[0083] Figure 3 1 is a diagram of the internal structure of a computer device in some embodiments. DETAILED DESCRIPTION
[0084] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0085] See also Figure 1 , is a schematic diagram of a method for reconstructing model component placement information in an embodiment of the present application, the method comprising:
[0086] Step 110: Obtain node data of all model components.
[0087] It should be noted that a model component refers to a holistic combination of one or several models in a three-dimensional model scene, that is, the corresponding operations of the combination of one or several models are holistic, such as adding the whole together, translating the whole together, rotating the whole together, etc. These one or several models are called model components; the node data of a model component refers to the data generated in the process of building the model.
[0088] In some embodiments, the node data of the model component includes but is not limited to the vertex coordinates of the triangle, the texture coordinates of the triangle, the normal information of the triangle, the topological information of the triangle, the texture data of the triangle, and the like.
[0089] Step 120: Calculate the intrinsic axis length ratio and distribution around the eigenaxis of the ith model component based on the node data of the ith model component, and determine the comprehensive feature code string of each triangle of the ith model component based on the node data of the ith model component; repeat the above steps, with i taking integers greater than 0 in turn, to obtain the intrinsic axis length ratios and distribution around the eigenaxis of all model components, and the comprehensive feature code string of each triangle of all model components.
[0090] It should be noted that the intrinsic axis length ratio of the model component refers to the length ratio of the three eigenaxis of the model component. It can be understood that since the length values of the eigenaxis of the model component in the positive and negative directions are different when the model component is uneven, the length ratio of the three eigenaxis of the model component can be used as the intrinsic axis length ratio of the model component, so as to reflect the directional characteristics of the three eigenaxis of the model component; the distribution of the model component around the eigenaxis refers to the distribution of the vertices of all triangles of the model component around the eigenaxis. It can be understood that since the distribution of the vertices of all triangles of the same model component around the eigenaxis is the same, It will not be affected by parameters such as the scaling of the eigenaxis of the model component. Therefore, the distribution of the vertices of all triangles of the model component around the eigenaxis can be used as the distribution of the model component around the eigenaxis, so as to facilitate the subsequent accurate grouping of the model component; the comprehensive feature code string of each triangle of the model component refers to the code string formed by all the features of the triangle. It can be understood that all features of the same-name triangles of the model component are the same. Therefore, the code string formed by all the features of the triangle can be used as the comprehensive feature code string of each triangle of the model component, so as to facilitate the subsequent matching of triangles of the model component with the same name.
[0091] In some embodiments, the three eigenaxes of the model component can be calculated according to the vertex coordinates of the triangle of the model component to obtain the length value of each eigenaxes according to the three eigenaxes of the model component, and then the three length values of the three eigenaxes of the model component are compared to obtain the eigenaxes length ratio of the model component; the vertex-bottom distance between the vertex and the bottom of the triangle of the model component can be determined according to the vertex coordinates of the triangle of the model component, and the vertex-eigenaxes distance between the vertex of the triangle of the model component and the eigenaxes of the model component can be determined, and then the vertex-bottom distance and the vertex-eigenaxes distance form a two-dimensional point set to calculate the distribution of the vertices of all triangles of the model component around the eigenaxes according to the two-dimensional point set to obtain the distribution of the model component around the eigenaxes; and all features of each triangle of the model component can be determined according to the vertex coordinates of the triangle of the model component, the normal information of the triangle and the topological information of the triangle, such as the number of adjacent triangles of the triangle, the texture coordinates of the triangle, etc., and then all the features of each triangle of the model component can be strung into a code string as a comprehensive feature code string of each triangle of the model component.
[0092] Step 130: matching and grouping the model components according to the intrinsic axis length ratios and distributions around the intrinsic axes of all model components and the node data of all model components to obtain multiple groups of model components.
[0093] It should be noted that, in the process of matching and grouping model components, the present application uses model component invariant features to match and group model components. The model component invariant features will not change with the scaling, rotation and translation of the model components, such as the intrinsic axis length ratio of the model components, the distribution of the model components around the intrinsic axis, the total number of vertices of all triangles of the model components, the total number of triangles of all triangles of the model components, etc., to ensure that the model components are accurately grouped and avoid model components of the same category being divided into different groups.
[0094] In some embodiments, the total number of vertices of all triangles of the model component, the total number of triangles of all triangles of the model component, etc. can be obtained based on the node data of the model component, and then the model components are matched and grouped according to the total number of vertices of all triangles of the model component, the total number of triangles of all triangles of the model component, etc., as well as the intrinsic axis length ratio of the model component and the distribution of the model component around the eigenaxis to obtain multiple groups of model components.
[0095] Step 140: Select any model component from the jth group of model components as a reference model component, match the triangles of the reference model component with the triangles of the remaining model components according to the comprehensive feature code string of each triangle of the reference model component in the jth group of model components and the comprehensive feature code string of each triangle of the remaining model components, and obtain multiple pairs of lists of triangles with the same name, and determine multiple pairs of lists of points with the same name for the jth group of model components according to each pair of lists of triangles with the same name and the node data of the corresponding model components.
[0096] It should be noted that, by selecting any one model component in each group of model components as a reference model component, the placement parameters of the remaining model components in each group of model components can be solved based on the reference model component of each group to avoid the situation where the placement parameters of the remaining model components in each group of model components are lost. It can be understood that, based on the reference model, through the list of triangles with the same name and the list of points with the same name, it can be considered that each model component in the remaining model components is obtained by transforming the reference model (such as translation, rotation, scaling, etc.), so as to solve the placement parameters of each model component in the remaining model components.
[0097] It should be further explained that, in the process of matching the reference model component with the remaining model components, it is a one-to-many match, that is, the reference model component is matched with each model component in the remaining model components to obtain a pair of triangle lists with the same name, and this pair of triangle lists with the same name can determine the order of the three vertices of the triangles with the same name based on some vertex-related features of the corresponding model component, such as the total number of adjacent triangles of the triangle, the texture coordinates of the triangle, etc., and use the three vertices of the triangles with the same name sorted in order as points with the same name to obtain a corresponding pair of point lists with the same name for the model component.
[0098] In other embodiments, the reference model component may also be a model component specifically designated by the operator and having no placement information lost, or may be the first model component in each group of model components by default (the first model component will basically not have any placement information lost).
[0099] Step 150: Calculate placement information of remaining model components in the jth group of model components based on multiple pairs of lists of points and multiple pairs of triangles of the jth group of model components and placement information of reference model components in the jth group of model components.
[0100] It should be noted that the placement parameters of the model components refer to the parameters such as scaling, rotation and translation that need to be adjusted when the model components are placed in the three-dimensional model scene.
[0101] Step 160: Repeat the above steps, with j taking integers greater than 0 in turn, to obtain placement information of the remaining model components in all groups of model components.
[0102] In an embodiment of the present application, the intrinsic axis length ratio, distribution around the intrinsic axis and the comprehensive feature code string of each triangle of each model component are obtained according to the node data of all model components, and the model components are grouped based on the node data, intrinsic axis length ratio and distribution around the intrinsic axis of all model components. Then, a reference model component is selected for each group of model components, and the remaining model components in each group of model components are matched with the reference model component according to the comprehensive feature code string of each triangle of each group of model components. The placement parameters of the remaining model components in each group of model components are reconstructed based on the reference model component. This method can effectively solve the technical problems existing in the prior art (i.e., the placement parameters of the remaining models can be reconstructed based on the reference model component if they are lost).
[0103] In addition, the above method also solves the technical problem that it is difficult to locate and replace local model components during the later maintenance and update of the 3D model scene, reduces manual interaction, and uses algorithm matching to achieve faster and more accurate modification and update of local model components, and even one-click replacement; it can effectively avoid manual adjustments, achieve precise modification and maintenance, and solve the efficiency and cost issues of updating the 3D model scene.
[0104] In a feasible implementation, in step 120 of the above embodiment, the node data of the ith model component includes the vertex coordinates of the triangles, and the intrinsic axis length ratio and the distribution around the intrinsic axis of the ith model component are calculated according to the node data of the ith model component, including: calculating three eigenvectors according to the vertex coordinates of all triangles of the ith model component, and using the three eigenvectors as the three eigenaxes of the ith model component; obtaining three axis length values according to the three eigenaxes of the ith model component, and using the smallest axis length value among the three axis length values as the reference axis length value; converting the three axis length values into three ratio values according to the reference axis length value, and using the three ratio values as the intrinsic axis length ratio of the ith model component; determining the distance between the vertices of all triangles of the ith model component and the bottom of the ith model component according to the vertex coordinates of all triangles of the ith model component. The method comprises the following steps: determining multiple vertex-bottom distances of the i-th model component and multiple vertex eigenaxis distances between the vertices of all triangles of the i-th model component and the k-th eigenaxis of the i-th model component according to the vertex coordinates of all triangles of the i-th model component and the k-th eigenaxis of the i-th model component; constructing two-dimensional coordinates by one-to-one correspondence between the multiple vertex-bottom distances and the multiple vertex eigenaxis distances to obtain multiple two-dimensional coordinates of the k-th eigenaxis of the i-th model component; calculating two eigenvalues according to the multiple two-dimensional coordinates of the k-th eigenaxis of the i-th model component, and taking the two eigenvalues as the distribution of the k-th eigenaxis of the i-th model component; repeating the above steps, k successively takes integers greater than 0, obtaining the distribution of the three eigenaxis of the i-th model component, and taking the distribution of the three eigenaxis of the i-th model component as the distribution around the eigenaxis of the i-th model component.
[0105] It should be noted that since the vertex coordinates are three-dimensional coordinates, the three eigenvectors can be calculated by using the covariance matrix, and the eigenvectors are used as eigenaxes to obtain the three eigenaxes of the model component; and since the coordinates constructed by the vertex-bottom distance and the vertex-eigenaxes distance are two-dimensional coordinates, for example, for vertex c, the two-dimensional coordinates (vertex-bottom distance H c , the vertex eigenaxis distance R c ), therefore, the covariance matrix can be used to calculate the two eigenvalues, and the eigenvalues can be used as the distribution of the eigenaxis to obtain the distribution of the model components around the eigenaxis; since the component models of the same category may have different eigenaxis length values due to different scaling sizes, but the ratios of each eigenaxis are the same, the smallest axis length value among the three axis length values can be used as the benchmark axis length value, and the remaining axis length values can be converted according to the benchmark axis length value to obtain the smallest ratio value, so as to avoid the model components of the same category being divided into different groups when the model components are subsequently grouped due to different scaling sizes. This method can avoid the influence of scaling to effectively improve the accuracy of model grouping.
[0106] In some embodiments, the three ratio values may be sorted from small to large as the eigenaxis length ratio of the model component; and the two eigenvalues may be sorted from small to large as the distribution of the eigenaxis of the model component.
[0107] In the embodiment of the present application, by calculating three eigenvectors according to the vertex coordinates of all triangles of the model component as the three eigenaxes of the model component, the eigenaxes of the model component can be calculated efficiently and accurately, and the characteristics of the eigenaxes can be determined later. By obtaining three axis length values according to the three eigenaxes of the model component, and taking the minimum axis length value as the reference axis length value, the three axis length values are converted into three ratio values according to the reference axis length value as the eigenaxes of the model component. This can avoid the model components of the same category being divided into different groups when the model components are subsequently grouped due to different sizes of scaling. This method can avoid the influence of scaling to effectively improve the accuracy of model grouping. A two-dimensional coordinate is constructed by determining multiple vertex-bottom distances between a vertex and a bottom according to the vertex coordinates of all triangles of the model component, and determining multiple vertex eigenaxis distances between a vertex and an eigenaxis according to the vertex coordinates of all triangles of the model component and the eigenaxis of the model component. Then, two eigenvalues are calculated according to the multiple two-dimensional coordinates of the eigenaxis of the model component as the distribution of the eigenaxis of the model component. Finally, the distribution of the three eigenaxis of the model component is used as the distribution of the model component around the eigenaxis. That is, the distribution of the model component around the eigenaxis obtained in this way will not be affected by parameters such as the scaling of the eigenaxis of the model component, so as to facilitate the subsequent accurate grouping of the model components.
[0108] In a feasible implementation, in step 120 of the above embodiment, the node data of the ith model component includes the vertex coordinates of the triangle, the normal information of the triangle and the triangle topology information, and the comprehensive feature code string of each triangle of the ith model component is determined according to the node data of the ith model component, including: determining the total number of adjacent triangles of the vth triangle of the ith model component according to the vertex coordinates of all triangles of the ith model component and the triangle topology information of the ith model component; in the case that the vth triangle of the ith model component has a texture, the node data of the ith model component also includes the texture coordinates of the vth triangle; calculating three feature codes according to the vertex coordinates of all triangles of the ith model component. , and use the three eigenvectors as the three eigenaxes of the ith model component; stratify each eigenaxe of the ith model component by percentage to obtain the stratification values of each stratification level of each eigenaxe of the ith model component; determine the centroid coordinates of the vth triangle of the ith model component according to the vertex coordinates of the vth triangle of the ith model component; determine the three stratification values corresponding to the three eigenaxes of the vth triangle of the ith model component located in the ith model component according to the centroid coordinates of the vth triangle of the ith model component and the stratification values of each stratification level of each eigenaxe of the ith model component, and use the three stratification values as the spatial index of the vth triangle of the ith model component; The normal information of the triangle and the triangle topology information of the ith model component determine the feature code string of the change of the adjacent triangle faces of the vth triangle of the ith model component; the three magnitude distances corresponding to the center of gravity of the vth triangle of the ith model component and the three intrinsic axis faces of the ith model component are calculated according to the centroid coordinates of all triangles of the ith model component and the three eigenaxis of the ith model component; the three magnitude sums of the projected triangle sides corresponding to the projection of the vth triangle of the ith model component on the three eigenaxis faces of the ith model component are calculated according to the vertex coordinates of all triangles of the ith model component and the three eigenaxis of the ith model component; if the vth triangle of the ith model component has texture, The total number of adjacent triangles, texture coordinates, spatial index, feature code string of adjacent triangle face changes, three orders of magnitude distances and three orders of magnitude projection triangle side lengths of the vth triangle of the ith model component are used as the comprehensive feature code string of the vth triangle of the ith model component; when the vth triangle of the ith model component does not have texture, the total number of adjacent triangles, spatial index, feature code string of adjacent triangle face changes, three orders of magnitude distances and three orders of magnitude projection triangle side lengths of the vth triangle of the ith model component are used as the comprehensive feature code string of the vth triangle of the ith model component; repeat the above steps, with v taking integers greater than 0 in turn, to obtain the comprehensive feature code string of all triangles of the ith model component.
[0109] It should be noted that the spatial index of the triangle of the model component refers to the three hierarchical values of the triangle of the model component on the three intrinsic axes; the feature code string of the face change of the adjacent triangles of the triangle of the model component refers to the face change of the adjacent triangles of the triangle of the model component relative to the triangle; the magnitude distance refers to the three maximum distances and the three minimum distances among the multiple distances between the centroid of all triangles of the model component and the three intrinsic axis planes of the model component, and the three distances between the centroid of the vth triangle of the model component and the three intrinsic axis planes of the model component, and the three magnitude distances calculated; the three magnitude projected triangle side length sums refer to the three maximum projected triangle side length sums and the three minimum projected triangle side length sums among the multiple projected triangle side length sums corresponding to the projection of all triangles of the model component on the three intrinsic axis planes of the model component, and the three magnitude projected triangle side length sums corresponding to the projection of the vth triangle of the model component on the three intrinsic axis planes of the model component.
[0110] In some embodiments, three hierarchical values can be used as spatial indexes in the form of three-dimensional coordinates; all adjacent triangular face changes of a triangle can be represented by characters, and all characters can be connected in a character string to form a ring character string to obtain a feature code string of adjacent triangular face changes of the triangle; and when there is texture on the triangle of the model component, the total number of adjacent triangles of the triangle of the model component, texture coordinates, spatial index, feature code string of adjacent triangular face changes, three orders of magnitude distances and three orders of magnitude projection triangle side lengths and can be serially connected in sequence in order as a comprehensive feature code string of the triangle of the model component; and when there is no texture on the triangle of the model component, the total number of adjacent triangles of the triangle of the model component, spatial index, feature code string of adjacent triangular face changes, three orders of magnitude distances and three orders of magnitude projection triangle side lengths and can be serially connected in sequence in order as a comprehensive feature code string of the triangle of the model component.
[0111] Furthermore, in other embodiments, taking into account the situation that adjacent triangles of a triangle may have a front side and a back side, a circular string is obtained on the front side and a circular string is also obtained on the back side. The circular string on the front side and the circular string on the back side are then added from small to large to obtain a characteristic code string of the changes in the adjacent triangle faces of the triangle.
[0112] In an embodiment of the present application, when there is texture on the triangles of the model component, the total number of adjacent triangles, texture coordinates, spatial index, feature code string of adjacent triangle face changes, three orders of magnitude distance and three orders of magnitude projected triangle side lengths of the triangles of the model component and a comprehensive feature code string of the triangles of the model component are used; and when there is no texture on the triangles of the model component, the total number of adjacent triangles, spatial index, feature code string of adjacent triangle face changes, three orders of magnitude distance and three orders of magnitude projected triangle side lengths of the triangles of the model component and a comprehensive feature code string of the triangles of the model component are used, and all features of these triangles will not be affected by parameters such as scaling, that is, the influence of parameters such as scaling can be ignored, which is beneficial to improving the accuracy of matching triangles with the same name when the feature code string of adjacent triangle face changes of the triangle is used to match triangles with the same name.
[0113] In a feasible implementation, the above embodiment determines the adjacent triangle face change feature code string of the vth triangle of the ith model component according to the normal information of all triangles of the ith model component and the triangle topology information of the ith model component, including: when the normal information of the vth triangle of the ith model component is parallel to the normal information of the zth adjacent triangle of the ith model component, the face change of the zth adjacent triangle of the ith model component is a plane character; when the normal information of the vth triangle of the ith model component is not parallel to the normal information of the zth adjacent triangle of the ith model component, and the upper part crosses In this case, the surface change of the zth adjacent triangle of the ith model component is an ascending character; in the case that the normal information of the vth triangle of the ith model component is not parallel to the normal information of the zth adjacent triangle of the ith model component and they intersect at the bottom, the surface change of the zth adjacent triangle of the ith model component is a descending character; repeat the above steps, with z taking integers greater than 0 in turn, to obtain the surface change of all adjacent triangles of the ith model component, and use the characters corresponding to the surface change of all adjacent triangles of the ith model component as the feature code string of the surface change of adjacent triangles of the vth triangle of the ith model component.
[0114] In some embodiments, the plane character can be set to 0, the ascending character can be set to 1, and the descending character can be set to 2; assuming that there are three adjacent triangles of a triangle, which are a plane character, an ascending character, and a descending character, then the characteristic code string of the change of the adjacent triangle faces of the triangle is a circular character string 012 (0 and 2 are connected); further, in other embodiments, the characteristic code string of the change of the adjacent triangle faces of the triangle is a circular character string 024 (obtained by adding 012 and 210 from small to large, and 0 and 4 are connected).
[0115] In an embodiment of the present application, the face changes of adjacent triangles of the model component are judged by the relationship between the normal information of the triangle of the model component and the normal information of the adjacent triangles of the model component, and different characters are assigned according to different face changes. This can highlight the characteristics of the triangle and facilitate the subsequent matching of triangles with the same name to improve the matching accuracy.
[0116] In a feasible implementation, the above embodiment calculates the three magnitude distances corresponding to the center of gravity of the vth triangle of the ith model component and the three eigenaxis of the ith model component according to the center of gravity coordinates of all triangles of the ith model component and the three eigenaxis of the ith model component, including: calculating the multiple center of gravity eigenaxis plane distances corresponding to the center of gravity of all triangles of the ith model component and the kth eigenaxis of the ith model component according to the center of gravity coordinates of all triangles of the ith model component and the kth eigenaxis of the ith model component, and determining the maximum center of gravity eigenaxis plane distance, the minimum center of gravity eigenaxis plane distance and the minimum center of gravity eigenaxis plane distance according to the multiple center of gravity eigenaxis plane distances. The target barycenter intrinsic axis plane distance is the barycenter intrinsic axis plane distance corresponding to the barycenter of the vth triangle of the ith model component and the kth intrinsic axis plane of the ith model component; the magnitude distance corresponding to the barycenter of the vth triangle of the ith model component and the kth intrinsic axis plane of the ith model component is calculated according to the maximum barycenter intrinsic axis plane distance, the minimum barycenter intrinsic axis plane distance and the target barycenter intrinsic axis plane distance; the above steps are repeated, with k taking integers greater than 0 in turn, to obtain the three magnitude distances corresponding to the barycenter of the vth triangle of the ith model component and the three intrinsic axis planes of the ith model component.
[0117] In some embodiments, the formula Calculate the magnitude distance L between the centroid of the vth triangle of the i-th model component and the kth eigenaxis plane of the i-th model component i,v ; where int is the integer data type of the code, cl i,v is the distance between the target center of gravity and the eigenaxis, maxL i,v is the maximum center of gravity eigenaxial distance, minL i,v is the minimum center of gravity eigenaxial distance.
[0118] In an embodiment of the present application, a plurality of corresponding center-of-gravity eigenaxis plane distances between the center of gravity of all triangles of a model component and the three intrinsic axis planes of the model component are calculated, and three maximum center-of-gravity eigenaxis plane distances, three minimum center-of-gravity eigenaxis plane distances and three target center-of-gravity eigenaxis plane distances are determined based on the plurality of center-of-gravity eigenaxis plane distances, so as to calculate the corresponding magnitude distance between the center of gravity of the vth triangle of the model component and the eigenaxis plane of the model component based on the corresponding maximum center-of-gravity eigenaxis plane distance, minimum center-of-gravity eigenaxis plane distance and target center-of-gravity eigenaxis plane distance, which is beneficial to the subsequent matching of triangles with the same name to improve the matching accuracy.
[0119] In a feasible implementation, the above embodiment calculates the three magnitudes of the sums of projected triangle sides corresponding to the projections of the vth triangle of the ith model component on the three eigenaxis planes of the ith model component according to the vertex coordinates of all triangles of the ith model component and the three eigenaxis of the ith model component, including: calculating the sums of multiple projected triangle sides corresponding to the projections of all triangles of the ith model component on the kth eigenaxis plane of the ith model component according to the vertex coordinates of all triangles of the ith model component and the kth eigenaxis of the ith model component, and determining the maximum sum of the projected triangle sides and the minimum sum of the projected triangle sides according to the multiple sums of the projected triangle sides. The sum of the lengths and the target projected triangle side lengths; wherein, the target projected triangle side lengths are the projected triangle side lengths corresponding to the projection of the vth triangle of the ith model component on the kth intrinsic axis plane of the ith model component; the magnitude projected triangle side lengths corresponding to the projection of the vth triangle of the ith model component on the kth intrinsic axis plane of the ith model component are calculated according to the maximum projected triangle side lengths, the minimum projected triangle side lengths and the target projected triangle side lengths; repeat the above steps, k takes integers greater than 0 in turn, to obtain the three magnitude projected triangle side lengths corresponding to the projection of the vth triangle of the ith model component on the three intrinsic axis planes of the ith model component.
[0120] In some embodiments, the formula Calculate the magnitude projection triangle side length and E corresponding to the projection of the vth triangle of the i-th model component on the kth eigenaxis plane of the i-th model component i,v ; Among them, int is the integer data type of the code, eLen i,v is the sum of the side lengths of the target projection triangle, maxE i,v is the maximum projected triangle side length, minE i,v is the minimum sum of the projected triangle sides.
[0121] In an embodiment of the present application, the sums of multiple projected triangle side lengths corresponding to the projections of all triangles of the model component on the eigenaxis plane of the model component are calculated, and three maximum sums of projected triangle side lengths, three minimum sums of projected triangle side lengths and three target sums of projected triangle side lengths are determined based on the multiple sums of projected triangle side lengths, so as to calculate the magnitude sum of projected triangle side lengths corresponding to the projection of the vth triangle of the model component on the eigenaxis plane of the model component based on the corresponding maximum sum of projected triangle side lengths, minimum sum of projected triangle side lengths and target sum of projected triangle side lengths, which is beneficial to the subsequent matching of triangles with the same name to improve the matching accuracy.
[0122] In a feasible implementation, the above embodiment calculates three eigenvectors according to the vertex coordinates of all triangles of the ith model component, including: calculating the first covariance matrix of the ith model component according to the vertex coordinates of all triangles of the ith model component, and decomposing the first covariance matrix of the ith model component to obtain three eigenvectors; calculating two eigenvalues according to multiple two-dimensional coordinates of the kth intrinsic axis of the ith model component, including: calculating the second covariance matrix of the kth intrinsic axis of the ith model component according to the multiple two-dimensional coordinates of the kth intrinsic axis of the ith model component, and decomposing the second covariance matrix of the kth intrinsic axis of the ith model component to obtain two eigenvalues.
[0123] In an embodiment of the present application, three eigenvectors and two eigenvalues are calculated by adopting a covariance matrix method to obtain three eigenaxes of the model components and the distribution of the model components around the eigenaxes, which is beneficial to grouping the model components and improves the accuracy of the grouping.
[0124] In a feasible implementation, in step 130 of the above embodiment, the node data of each model component includes the vertex coordinates, normal information and triangle topology information of the triangle, and the model components are matched and grouped according to the intrinsic axis length ratios and distribution around the intrinsic axes of all model components, as well as the node data of all model components, to obtain multiple groups of model components, including: in the case where the triangles of the model components have textures, the node data of the model components also includes the texture coordinates and texture data of the triangles, and the total number of vertices of all triangles of all model components, the total number of triangles of all triangles, the total number of textures of all triangles of all triangles are determined according to the vertex coordinates of all triangles of all model components, the normal information of all triangles, the triangle topology information, the texture coordinates of all triangles and the texture data of all triangles. The total number of vertices of all triangles of all model parts and the total number of triangles of all triangles are determined according to the vertex coordinates of all triangles of all model parts, the normal information of all triangles and the triangle topology information, and the total number of vertices of all triangles of all model parts and the total number of triangles of all triangles are matched and grouped according to the intrinsic axis length ratio of all model parts, the distribution around the intrinsic axis, the total number of vertices of all triangles of all model parts and the total number of triangles of all triangles, to obtain multiple groups of model parts. When there is no texture in the triangles of the model parts, the total number of vertices of all triangles of all model parts and the total number of triangles of all triangles are determined according to the vertex coordinates of all triangles of all model parts, the normal information of all triangles and the triangle topology information, and the total number of vertices of all triangles of all model parts and the total number of triangles of all triangles are matched and grouped according to the intrinsic axis length ratio of all model parts, the distribution around the intrinsic axis, the total number of vertices of all triangles of all model parts and the total number of triangles of all triangles are matched and grouped to obtain multiple groups of model parts.
[0125] It should be noted that the total number of vertices of all triangles, the total number of triangles of all triangles, the total number of textures of all triangles and the texture coordinates of all triangles obtained in the present application, as well as the intrinsic axis length ratio of the model component and the distribution around the intrinsic axis are all invariant characteristics of the model component. The invariant characteristics of the model component will not change with the scaling, rotation and translation of the model component, which can ensure the accurate grouping of the model components and avoid model components of the same category being divided into different groups.
[0126] In an embodiment of the present application, by matching and grouping according to the intrinsic axis length ratio of all model components, the distribution around the intrinsic axis, the total number of vertices of all triangles of all model components, the total number of triangles of all triangles, the total number of textures of all triangles and the texture coordinates of all triangles when texture exists in the triangles of the model components, and by matching and grouping according to the intrinsic axis length ratio of all model components, the distribution around the intrinsic axis, the total number of vertices of all triangles of all model components and the total number of triangles of all triangles when texture does not exist in the triangles of the model components, multiple groups of model components with higher accuracy can be obtained, thereby avoiding model components of the same category from being divided into different groups.
[0127] In a feasible implementation, in step 140 of the above embodiment, the placement parameters of the nth model component of the remaining model components in the jth group of model components include a scaling matrix, a rotation matrix, and a translation matrix, and the placement information of the remaining model components in the jth group of model components is calculated according to a plurality of pairs of lists of same-name points and a plurality of pairs of lists of same-name triangles of the jth group of model components, as well as the placement information of the reference model components in the jth group of model components, including: determining the vertex coordinates of all the same-name points of the nth model component of the remaining model components in the jth group of model components according to the plurality of pairs of lists of same-name triangles of the jth group of model components; calculating the transformed vertex coordinates of all the same-name points of the nth model component of the remaining model components in the jth group of model components according to the vertex coordinates of all the same-name points of the nth model component of the remaining model components in the jth group of model components and the placement information of the reference model components in the jth group of model components; calculating the transformed vertex coordinates of all the same-name points of the nth model component of the remaining model components in the jth group of model components according to the vertex coordinates of all the same-name points of the nth model component of the remaining model components in the jth group of model components and the placement information of the reference model components in the jth group of model components; calculating the transformed vertex coordinates of all the same-name points of the nth model component of the remaining model components in the jth group of model components according to the vertex coordinates of all the same-name points of the nth model component of the remaining model components in the jth group of model components point coordinates to calculate the translation matrix of the nth model component of the remaining model components in the jth group of model components; determine all the same-name edges of the nth model component of the remaining model components in the jth group of model components according to the list of multiple pairs of same-name points of the jth model components; determine all the transformed same-name edges of the nth model component of the remaining model components in the jth group of model components according to all the same-name edges of the nth model component of the remaining model components in the jth group of model components, the vertex coordinates of all the same-name points of the nth model component of the remaining model components in the jth group of model components, and the transformed vertex coordinates of all the same-name points of the nth model component of the remaining model components in the jth group of model components; calculate the scaling matrix and rotation matrix of the nth model component of the remaining model components in the jth group of model components according to all the transformed same-name edges of the nth model component of the remaining model components in the jth group of model components and all the same-name edges of the nth model component of the remaining model components in the jth group of model components; repeat the above steps, n takes integers greater than 0 in turn, to obtain the scaling matrix, rotation matrix and translation matrix of the remaining model components in the jth group of model components.
[0128] It should be noted that the same-name sides of a triangle are obtained by connecting two same-name points. Therefore, after obtaining the coordinates of the transformed vertices, the same-name sides can be transformed accordingly.
[0129] In some embodiments, calculating the translation matrix of the nth model component among the remaining model components in the jth group of model components based on the vertex coordinates of all the same-name points of the nth model component among the remaining model components in the jth group of model components and the transformed vertex coordinates of all the same-name points of the nth model component among the remaining model components in the jth group of model components includes: determining the center of mass coordinates of the nth model component among the remaining model components in the jth group of model components based on the vertex coordinates of all the same-name points of the nth model component among the remaining model components in the jth group of model components, and determining the transformed center of mass coordinates of the nth model component among the remaining model components in the jth group of model components based on the transformed vertex coordinates of all the same-name points of the nth model component among the remaining model components in the jth group of model components, and then calculating the translation matrix of the nth model component among the remaining model components in the jth group of model components based on the center of mass coordinates and the transformed center of mass coordinates.
[0130] In an embodiment of the present application, by matching triangles with the same name based on the triangle features between the model components in the group, the triangles and points with the same name of the model components are obtained, and based on the placement parameters of the reference model, according to the transformation parameters between the back-calculated points with the same name and the reference, the placement parameters of the remaining model components in the group can be obtained, which can effectively solve the technical problems existing in the prior art, that is, the placement parameters of the remaining model components can be reconstructed by back-calculating based on the reference model components if they are lost.
[0131] In a feasible implementation, the above embodiment calculates the transformed vertex coordinates of all the same-name points of the nth model component of the remaining model components in the jth group of model components according to the vertex coordinates of all the same-name points of the nth model component of the remaining model components in the jth group of model components and the placement information of the reference model component in the jth group of model components, including:
[0132] Using the formula Calculate the transformed vertex coordinates of all points with the same name in the nth model component of the remaining model components in the jth group of model components.
[0133] Among them, P j ' ,n,m is the transformed vertex coordinate of the mth point of the same name of the nth model component of the rest of the model components in the jth group of model components, P j,n,m is the vertex coordinate of the mth point of the same name of the nth model component of the rest of the model components in the jth group of model components, T j,1 is the translation matrix of the reference model component in the jth group of model components with the center of mass returned to zero, R j,axis is the rotation matrix of the three intrinsic axes of the reference model component in the jth group of model components converted to the three coordinate axes, Sj,axis is the scaling matrix of the three eigen-axes of the reference model component in the jth group of model components, For R j,axis The inverse matrix, R j is the rotation matrix of the reference model component in the jth group of model components, T j is the translation matrix of the reference model component in the jth group of model components.
[0134] In the above embodiment, the scaling matrix and the rotation matrix of the nth model component of the remaining model components in the jth group of model components are calculated according to all transformed same-name edges of the nth model component of the remaining model components in the jth group of model components and all same-name edges of the nth model component of the remaining model components in the jth group of model components, including:
[0135] The scaling matrix and rotation matrix of the nth model component of the remaining model components in the jth group of model components are calculated using the following formula:
[0136] make
[0137] For S x , S y and S z Take the derivative:
[0138]
[0139] Solve the above equation:
[0140]
[0141] Solving for S j,n,axxis Substitution Get R j,n ;
[0142] Among them, V′ j,n,a is the ath edge with the same name of the nth model component of the rest of the model components in the jth group of model components, V j,n,a is the ath transformed edge with the same name of the nth model component of the rest of the model components in the jth group of model components, S j,n,axxis is the scaling matrix of the three eigen-axes of the nth model component of the remaining model components in the jth group of model components, V′ j,n,a The three components on the three coordinate axes, V j,n,a The three components on the three coordinate axes, For S j,n,axxis The three components of the three coordinate axes, Q j,nis the module length variance of the nth model component of the rest of the model components in the jth group of model components, A is the total number of the same-name edges or the transformed same-name edges of the nth model component of the rest of the model components in the jth group of model components, R j,n,axis is the rotation matrix for converting the three intrinsic axes of the nth model component of the remaining model components in the jth group of model components to the three coordinate axes, For R j,n,axis The inverse matrix, R j,n is the rotation matrix of the nth model component among the remaining model components in the jth group of model components.
[0143] In the embodiments of the present application, rigorous transformation calculation formulas for like-name points, as well as calculation formulas for scaling matrices and rotation matrices of model components are provided from a mathematical perspective. The accuracy of the transformation of like-name points, as well as the accuracy of scaling matrices and rotation matrices of model components can be ensured from the rigor of mathematical logic, and the above-mentioned calculation formulas are preferably shown to provide reference, understanding and calculation, etc. for technical personnel; in addition, by adopting the above-mentioned calculation formulas, the scaling matrix and rotation matrix of the model component can be quickly calculated, and the reconstruction of the placement parameters of the remaining model components in the group can be completed.
[0144] In some embodiments, the present application also provides a device for reconstructing model component placement information.
[0145] See also Figure 2 , is a schematic diagram of a device for reconstructing model component placement information in an embodiment of the present application, the device 210 includes:
[0146] An acquisition module 211 is used to acquire node data of all model components;
[0147] Repeat the determination calculation module 212, which is used to calculate the intrinsic axis length ratio and the distribution around the intrinsic axis of the i-th model component according to the node data of the i-th model component, and determine the comprehensive feature code string of each triangle of the i-th model component according to the node data of the i-th model component; repeat the above steps, i takes integers greater than 0 in turn, to obtain the intrinsic axis length ratios and the distribution around the intrinsic axis of all model components, and the comprehensive feature code string of each triangle of all model components;
[0148] A grouping module 213 is used to match and group the model components according to the intrinsic axis length ratios and distribution around the intrinsic axis of all model components and the node data of all model components to obtain multiple groups of model components;
[0149] A matching module 214 is used to select any one model component from the jth group of model components as a reference model component, match the triangle of the reference model component with the triangles of the remaining model components according to the comprehensive feature code string of each triangle of the reference model component in the jth group of model components and the comprehensive feature code string of each triangle of the remaining model components, obtain multiple pairs of lists of triangles with the same name, and determine multiple pairs of lists of points with the same name of the jth group of model components according to each pair of lists of triangles with the same name and the node data of the corresponding model component;
[0150] A calculation module 215, configured to calculate placement information of remaining model components in the jth group of model components according to the multiple pairs of lists of points with the same name and the multiple pairs of lists of triangles with the same name of the jth group of model components and the placement information of the reference model components in the jth group of model components;
[0151] The repeating module 216 is used to repeat the above steps, and j takes integers greater than 0 in turn to obtain the placement information of the remaining model components in all groups of model components.
[0152] In the embodiment of the present application, the related contents of the acquisition module 211, the duplication determination calculation module 212, the grouping module 213, the matching module 214, the calculation module 215 and the duplication module 216 can be referred to in Figure 1 The contents in the illustrated embodiment will not be described in detail here.
[0153] It should be noted that the device 210 of the present application also includes some other modules. It can be understood that the method of the present application and the device 210 have a one-to-one correspondence. Therefore, some other modules of the device 210 of the present application are the contents corresponding to the method of the present application in the above-mentioned embodiment.
[0154] In an embodiment of the present application, the intrinsic axis length ratio, distribution around the intrinsic axis and the comprehensive feature code string of each triangle of each model component are obtained according to the node data of all model components, and the model components are grouped based on the node data, intrinsic axis length ratio and distribution around the intrinsic axis of all model components. Then, a reference model component is selected for each group of model components, and the remaining model components in each group of model components are matched with the reference model component according to the comprehensive feature code string of each triangle of each group of model components. The placement parameters of the remaining model components in each group of model components are reconstructed based on the reference model component. The device 210 can effectively solve the technical problems existing in the prior art (that is, the placement parameters of the remaining models can be reconstructed based on the reference model component if they are lost).
[0155] In addition, the above-mentioned device 210 also solves the technical problem that it is difficult to locate and replace local model components during the later maintenance and update of the three-dimensional model scene, reduces manual interaction, and uses algorithm matching to achieve faster and more accurate modification and update of local model components, and even one-click replacement; it can effectively avoid manual adjustments, realize accurate modification and maintenance, and solve the efficiency and cost problems of updating the three-dimensional model scene.
[0156] In some embodiments, the present application further provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor executes a method for reconstructing model component placement information in the above method embodiment.
[0157] In some embodiments, the present application also provides a computer device including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes a method for reconstructing model component placement information in the above method embodiment.
[0158] Figure 3 The internal structure diagram of a computer device in some embodiments is shown. The computer device may be a terminal, a server, or a gateway. Figure 3 As shown, the computer device includes a processor, a memory and a network interface connected through a system bus.
[0159] The memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program. When the computer program is executed by the processor, the processor can implement each step in the above method embodiment. The internal memory may also store a computer program. When the computer program is executed by the processor, the processor can implement each step in the above method embodiment. Those skilled in the art can understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0160] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing related hardware through a computer program. The program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods.
[0161] Among them, any reference to memory, storage, database or other media used in the embodiments provided in the present application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0162] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0163] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for reconstructing model component placement information, characterized in that: The method comprises: Get the node data of all model components; Calculate the intrinsic axis length ratio and distribution around the eigenaxis of the ith model component according to the node data of the ith model component, and determine the comprehensive feature code string of each triangle of the ith model component according to the node data of the ith model component; repeat the above steps, i takes integers greater than 0 in turn, to obtain the intrinsic axis length ratios and distribution around the eigenaxis of all model components, and the comprehensive feature code string of each triangle of all model components; The model components are matched and grouped according to the intrinsic axis length ratios and distribution around the intrinsic axis of all model components, as well as the node data of all model components, to obtain multiple groups of model components; Select any one model component from the jth group of model components as a reference model component, match the triangle of the reference model component with the triangles of the remaining model components according to the comprehensive feature code string of each triangle of the reference model component in the jth group of model components and the comprehensive feature code string of each triangle of the remaining model components, obtain multiple pairs of lists of triangles with the same name, and determine multiple pairs of lists of points with the same name of the jth group of model components according to each pair of lists of triangles with the same name and the node data of the corresponding model component; Calculate placement information of remaining model components in the jth group of model components according to multiple pairs of lists of points and multiple pairs of triangles of the same name of the jth group of model components and placement information of reference model components in the jth group of model components; Repeat the above steps, with j taking integers greater than 0 in turn, to obtain the placement information of the remaining model components in all groups of model components.
2. The method according to claim 1, characterized in that The node data of the i-th model component includes the vertex coordinates of the triangle, and the calculation of the intrinsic axis length ratio and the distribution around the intrinsic axis of the i-th model component according to the node data of the i-th model component includes: Calculate three eigenvectors according to the vertex coordinates of all triangles of the i-th model component, and use the three eigenvectors as three eigenaxes of the i-th model component; Obtain three axis length values according to the three intrinsic axes of the i-th model component, and use the smallest axis length value among the three axis length values as the reference axis length value; Convert the three axis length values into three ratio values according to the reference axis length value, and use the three ratio values as the intrinsic axis length ratios of the i-th model component; Determine a plurality of vertex-bottom distances between the vertices of all triangles of the ith model component and the bottom of the ith model component according to the vertex coordinates of all triangles of the ith model component, and determine a plurality of vertex-eigenaxis distances between the vertices of all triangles of the ith model component and the kth eigenaxis of the ith model component according to the vertex coordinates of all triangles of the ith model component and the kth eigenaxis of the ith model component; Construct two-dimensional coordinates by one-to-one correspondence between the bottom distances of multiple vertices and the eigen-axis distances of multiple vertices, and obtain multiple two-dimensional coordinates of the kth eigen-axis of the i-th model component; Calculate two eigenvalues according to a plurality of two-dimensional coordinates of the kth eigenaxis of the ith model component, and use the two eigenvalues as the distribution of the kth eigenaxis of the ith model component; Repeat the above steps, k takes integers greater than 0 in turn, to obtain the distribution of the three eigenaxis of the ith model component, and use the distribution of the three eigenaxis of the ith model component as the distribution around the eigenaxis of the ith model component.
3. The method according to claim 1, characterized in that The node data of the i-th model component includes the vertex coordinates of the triangle, the normal information of the triangle and the triangle topology information. The method of determining the comprehensive feature code string of each triangle of the i-th model component according to the node data of the i-th model component includes: Determine the total number of adjacent triangles of the vth triangle of the ith model component according to the vertex coordinates of all triangles of the ith model component and the triangle topology information of the ith model component; In the case where the vth triangle of the ith model component has a texture, the node data of the ith model component also includes the texture coordinates of the vth triangle; Calculate three eigenvectors according to the vertex coordinates of all triangles of the ith model component, and use the three eigenvectors as the three eigenaxes of the ith model component; stratify each eigenaxe of the ith model component by percentage to obtain the stratification values of each stratification level of each eigenaxe of the ith model component; determine the centroid coordinates of the vth triangle of the ith model component according to the vertex coordinates of the vth triangle of the ith model component; determine the three stratification values corresponding to the three eigenaxes of the vth triangle of the ith model component located on the i-th model component according to the centroid coordinates of the vth triangle of the ith model component and the stratification values of each stratification level of each eigenaxe of the ith model component, and use the three stratification values as the spatial index of the vth triangle of the ith model component; Determine a characteristic code string of adjacent triangle face change of the vth triangle of the ith model component according to the normal information of all triangles of the ith model component and the triangle topology information of the ith model component; Calculate the three magnitude distances corresponding to the center of gravity of the vth triangle of the ith model component and the three eigenaxis planes of the ith model component according to the center of gravity coordinates of all triangles of the ith model component and the three eigenaxis of the ith model component; Calculate the sum of the side lengths of three magnitudes of the projection triangles corresponding to the projection of the vth triangle of the ith model component on the three eigenaxis planes of the ith model component according to the vertex coordinates of all triangles of the ith model component and the three eigenaxis of the ith model component; In the case that the vth triangle of the i-th model component has a texture, the total number of adjacent triangles, texture coordinates, spatial index, feature code string of adjacent triangle face changes, three-magnitude distances and three-magnitude projection triangle side lengths of the vth triangle of the i-th model component are used as the comprehensive feature code string of the vth triangle of the i-th model component; In the case that the vth triangle of the i-th model component does not have a texture, the total number of adjacent triangles, spatial index, feature code string of adjacent triangle face changes, three-magnitude distances and three-magnitude projected triangle side lengths of the vth triangle of the i-th model component are used as the comprehensive feature code string of the vth triangle of the i-th model component; Repeat the above steps, with v taking integers greater than 0 in turn, to obtain the comprehensive feature code string of all triangles of the i-th model component.
4. The method according to claim 3, characterized in that The method of determining the adjacent triangle face change characteristic code string of the vth triangle of the i-th model component according to the normal information of all triangles of the i-th model component and the triangle topology information of the i-th model component comprises: When the normal information of the vth triangle of the ith model component is parallel to the normal information of the zth adjacent triangle of the ith model component, the surface change of the zth adjacent triangle of the ith model component is a plane character; When the normal information of the vth triangle of the ith model component is not parallel to the normal information of the zth adjacent triangle of the ith model component and the upper part intersects, the surface change of the zth adjacent triangle of the ith model component is an ascending character; When the normal information of the vth triangle of the ith model component is not parallel to the normal information of the zth adjacent triangle of the ith model component and the lower part intersects, the face change of the zth adjacent triangle of the ith model component is a descending character; Repeat the above steps, with z taking integers greater than 0 in turn, to obtain the surface changes of all adjacent triangles of the i-th model component, and use the characters corresponding to the surface changes of all adjacent triangles of the i-th model component as the feature code string of the surface changes of adjacent triangles of the v-th triangle of the i-th model component.
5. The method according to claim 3, characterized in that: The calculating, based on the barycentric coordinates of all triangles of the i-th model component and the three eigenaxis of the i-th model component, three magnitude distances corresponding to the barycentric coordinates of the v-th triangle of the i-th model component and the three eigenaxis planes of the i-th model component comprises: Calculate multiple barycenter intrinsic axis plane distances corresponding to the barycenters of all triangles of the ith model component and the kth intrinsic axis of the ith model component according to the barycenter coordinates of all triangles of the ith model component and the kth intrinsic axis of the ith model component, and determine the maximum barycenter intrinsic axis plane distance, the minimum barycenter intrinsic axis plane distance and the target barycenter intrinsic axis plane distance according to the multiple barycenter intrinsic axis plane distances; wherein the target barycenter intrinsic axis plane distance is the barycenter intrinsic axis plane distance corresponding to the barycenter of the vth triangle of the ith model component and the kth intrinsic axis plane of the ith model component; Calculate the magnitude distance corresponding to the center of gravity of the vth triangle of the ith model component and the kth eigenaxis plane of the ith model component according to the maximum center of gravity eigenaxis plane distance, the minimum center of gravity eigenaxis plane distance and the target center of gravity eigenaxis plane distance; Repeat the above steps, with k taking integers greater than 0 in turn, to obtain three magnitude distances corresponding to the centroid of the vth triangle of the ith model component and the three intrinsic axis planes of the ith model component.
6. The method according to claim 3, characterized in that The method of calculating the sum of the side lengths of three magnitudes of the projected triangles corresponding to the projection of the vth triangle of the ith model component on the three eigenaxis planes of the ith model component according to the vertex coordinates of all triangles of the ith model component and the three eigenaxis of the ith model component comprises: According to the vertex coordinates of all triangles of the ith model component and the kth intrinsic axis of the ith model component, calculate the sum of the side lengths of multiple projected triangles corresponding to the projection of all triangles of the ith model component on the kth intrinsic axis plane of the ith model component, and determine the maximum sum of the side lengths of the projected triangles, the minimum sum of the side lengths of the projected triangles, and the target sum of the side lengths of the projected triangles according to the multiple sums of the side lengths of the projected triangles; wherein the target sum of the side lengths of the projected triangles is the sum of the side lengths of the projected triangles corresponding to the projection of the vth triangle of the ith model component on the kth intrinsic axis plane of the ith model component; Calculate the magnitude projection triangle side length sum corresponding to the projection of the vth triangle of the ith model component on the kth intrinsic axis plane of the ith model component according to the maximum projection triangle side length sum, the minimum projection triangle side length sum and the target projection triangle side length sum; Repeat the above steps, with k taking integers greater than 0 in turn, to obtain the sum of the side lengths of three magnitude projection triangles corresponding to the projection of the vth triangle of the ith model component on the three eigenaxis planes of the ith model component.
7. The method according to claim 2 or 3, characterized in that: The three feature vectors are calculated according to the vertex coordinates of all triangles of the i-th model component, including: Calculate the first covariance matrix of the ith model component according to the vertex coordinates of all triangles of the ith model component, and decompose the first covariance matrix of the ith model component to obtain three eigenvectors; Two eigenvalues are calculated based on multiple two-dimensional coordinates of the kth eigenaxis of the i-th model component, including: A second covariance matrix of the kth eigenaxis of the ith model component is calculated according to multiple two-dimensional coordinates of the kth eigenaxis of the ith model component, and the second covariance matrix of the kth eigenaxis of the ith model component is decomposed to obtain two eigenvalues.
8. The method according to claim 1, characterized in that The node data of each model component includes the vertex coordinates, normal information and triangle topology information of the triangle. The model components are matched and grouped according to the intrinsic axis length ratios and distribution around the intrinsic axes of all model components and the node data of all model components to obtain multiple groups of model components, including: In the case where the triangles of the model components have textures, the node data of the model components also include the texture coordinates of the triangles and the texture data of the triangles; the total number of vertices of all triangles of all model components, the total number of triangles of all triangles, the total number of textures of all triangles and the texture coordinates of all triangles are determined according to the vertex coordinates of all triangles of all model components, the normal information of all triangles, the triangle topology information, the texture coordinates of all triangles and the texture data of all triangles; and matching and grouping are performed according to the intrinsic axis length ratios of all model components, the distribution around the intrinsic axes, the total number of vertices of all triangles of all model components, the total number of triangles of all triangles, the total number of textures of all triangles and the texture coordinates of all triangles to obtain multiple groups of model components; When there is no texture in the triangles of the model components, the total number of vertices of all triangles of all model components and the total number of triangles of all triangles are determined according to the vertex coordinates of all triangles of all model components, the normal information of all triangles and the triangle topology information, and matching and grouping are performed according to the intrinsic axis length ratio of all model components, the distribution around the intrinsic axis, the total number of vertices of all triangles of all model components and the total number of triangles of all triangles to obtain multiple groups of model components.
9. The method according to claim 1, characterized in that: The placement parameters of the nth model component of the remaining model components in the jth group of model components include a scaling matrix, a rotation matrix, and a translation matrix, and the calculation of the placement information of the remaining model components in the jth group of model components according to the multiple pairs of lists of points with the same name and the multiple pairs of lists of triangles with the same name of the jth group of model components and the placement information of the reference model components in the jth group of model components includes: Determine the vertex coordinates of all points with the same name of the nth model component of the remaining model components in the jth group of model components according to the list of multiple pairs of triangles with the same name of the jth group of model components; Calculating transformed vertex coordinates of all the same-named points of the nth model component of the remaining model components in the jth group of model components according to the vertex coordinates of all the same-named points of the nth model component of the remaining model components in the jth group of model components and the placement information of the reference model component in the jth group of model components; Calculate the translation matrix of the nth model component of the remaining model components in the jth group of model components according to the vertex coordinates of all the same-name points of the nth model component of the remaining model components in the jth group of model components and the transformed vertex coordinates of all the same-name points of the nth model component of the remaining model components in the jth group of model components; Determine all the same-named edges of the nth model component of the remaining model components in the jth group of model components according to the list of multiple pairs of same-named points of the jth group of model components; Determine all transformed same-named edges of the nth model component of the remaining model components in the jth group of model components according to all same-named edges of the nth model component of the remaining model components in the jth group of model components, vertex coordinates of all same-named points of the nth model component of the remaining model components in the jth group of model components, and transformed vertex coordinates of all same-named points of the nth model component of the remaining model components in the jth group of model components; Calculate the scaling matrix and rotation matrix of the nth model component of the remaining model components in the jth group of model components according to all transformed edges with the same name of the nth model component of the remaining model components in the jth group of model components and all edges with the same name of the nth model component of the remaining model components in the jth group of model components; Repeat the above steps, with n taking integers greater than 0 in turn, to obtain the placement parameters of the remaining model components in the j-th group of model components.
10. The method according to claim 9, characterized in that The step of calculating the transformed vertex coordinates of all the same-named points of the nth model component of the remaining model components in the jth group of model components according to the vertex coordinates of all the same-named points of the nth model component of the remaining model components in the jth group of model components and the placement information of the reference model component in the jth group of model components comprises: Using the formula Calculate the transformed vertex coordinates of all the points with the same name of the nth model component of the remaining model components in the jth group of model components; Among them, P j ' ,n,m is the transformed vertex coordinate of the mth point of the same name of the nth model component of the rest of the model components in the jth group of model components, P j,n,m is the vertex coordinate of the mth point of the same name of the nth model component of the rest of the model components in the jth group of model components, T j,1 is the translation matrix of the reference model component in the jth group of model components with the center of mass returned to zero, R j,axis is the rotation matrix of the three intrinsic axes of the reference model component in the jth group of model components converted to the three coordinate axes, S j,axis is the scaling matrix of the three eigen-axes of the reference model component in the jth group of model components, For R j,axis The inverse matrix, R j is the rotation matrix of the reference model component in the jth group of model components, T j is the translation matrix of the reference model component in the jth group of model components; The step of calculating the scaling matrix and the rotation matrix of the nth model component of the remaining model components in the jth group of model components according to all transformed edges with the same name of the nth model component of the remaining model components in the jth group of model components and all edges with the same name of the nth model component of the remaining model components in the jth group of model components comprises: The scaling matrix and rotation matrix of the nth model component of the remaining model components in the jth group of model components are calculated using the following formula: make For S x , S y and S z Take the derivative: Solve the above equation: Solving for S j,n,axxis Substitution Get R j,n ; Among them, V′ j,n,a is the ath edge with the same name of the nth model component of the rest of the model components in the jth group of model components, V j,n,a is the ath transformed edge with the same name of the nth model component of the rest of the model components in the jth group of model components, S j,n,axxis is the scaling matrix of the three eigen-axes of the nth model component of the remaining model components in the jth group of model components, V′ j,n,a The three components on the three coordinate axes, V j,n,a The three components on the three coordinate axes, For S j,n,axxis The three components of the three coordinate axes, Q j,n is the module length variance of the nth model component of the rest of the model components in the jth group of model components, A is the total number of the same-name edges or the transformed same-name edges of the nth model component of the rest of the model components in the jth group of model components, R j,n,axis is the rotation matrix for converting the three intrinsic axes of the nth model component of the remaining model components in the jth group of model components to the three coordinate axes, For R j,n,axis The inverse matrix, R j,n is the rotation matrix of the nth model component among the remaining model components in the jth group of model components.
