A three-dimensional model lightweight online analysis method
By employing a front-end and back-end parsing architecture and model simplification algorithms, 3D models are decomposed into standard and non-standard sub-models and converted into lightweight formats. This solves the problems of slow processing speed and poor compatibility of 3D models, and achieves efficient lightweighting and convenient sharing of models.
Patent Information
- Application Number
- CN202310285821.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-22
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2043-03-22
AI Technical Summary
Existing 3D model processing methods are slow and have limited processing capabilities, making it difficult to achieve lightweighting and digitization of large-scale metallurgical equipment production line-level models, which leads to difficulties in model compatibility and sharing between different software.
The system adopts a front-end and back-end parsing architecture. First, the 3D model is initially parsed on the front end, and the model is divided into standard and non-standard sub-models. These sub-models are then converted into mesh and XML formats and simplified in a lightweight manner on the cloud server. The number of triangles is reduced through a model simplification algorithm, resulting in a lightweight B3D format file.
It effectively reduces the complexity and size of 3D models, improves the compatibility and ease of sharing of models across different software, reduces network transmission pressure, and avoids data loss.
Smart Images

Figure CN116436973B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of image processing and data processing, and particularly relates to a three-dimensional model lightweight online analysis method. BACKGROUND
[0002] Three-dimensional technology is applied in various industries, and the more complex a three-dimensional model is, the more difficult it is to process. At present, the processing of three-dimensional models is basically manual, which is slow and has limited model processing capacity. Therefore, it is necessary to make large models and complex models as lightweight as possible. The lightweight model can be quickly opened and edited on various three-dimensional software and clients, which greatly improves the work convenience of three-dimensional model users. Therefore, how to provide a three-dimensional model lightweight method to improve the lightweight rate of metallurgical equipment production line level models and the security of digital models, and realize large-scale metallurgical equipment production line level digital model assembly, visualization expression and collaboration, is a technical problem to be solved by those skilled in the art. SUMMARY
[0003] In view of the above problems in the prior art, the three-dimensional model lightweight online analysis method provided by the application solves the problems in the prior art.
[0004] In order to achieve the above-mentioned application purposes, the technical scheme adopted by the application is:
[0005] A three-dimensional model lightweight online analysis method comprises the following steps:
[0006] The three-dimensional model to be lightweighted is analyzed to determine the standard sub-model, the non-standard sub-model and the sub-model relationship in the three-dimensional model to be lightweighted. The standard model is used to represent a regular three-dimensional model. The non-standard model is used to represent an irregular three-dimensional model generated by modeling software. The sub-model relationship is used to represent the positional relationship and assembly relationship between the sub-models.
[0007] The non-standard sub-model in the three-dimensional model to be lightweighted is converted according to a first preset format to obtain a converted non-standard sub-model. The standard sub-model and the sub-model relationship in the three-dimensional model to be lightweighted are converted according to a second preset format to obtain a converted standard sub-model and a converted sub-model relationship. The attribute information of the three-dimensional model to be lightweighted is extracted and converted according to the second preset format to obtain converted attribute information.
[0008] The converted non-standard sub-model, the converted standard sub-model, the converted sub-model relationship and the converted attribute information are packaged to obtain a packaged file, and the packaged file is uploaded to a cloud server for lightweight processing; the packaged file is analyzed by the cloud server to obtain the converted non-standard sub-model, the converted standard sub-model, the converted sub-model relationship and the converted attribute information;
[0009] The converted non-standard sub-model is simplified by using a model simplification algorithm to obtain a simplified sub-model, and the converted standard sub-model is converted according to a first preset format corresponding to the simplified sub-model to obtain a standard sub-model associated with the simplified sub-model.
[0010] According to the simplified sub-model, the standard sub-model associated with the simplified sub-model, the converted sub-model relationship and the converted attribute information, a lightweight three-dimensional model is obtained by using a third preset format for packaging with GUID as the primary key.
[0011] In a possible implementation, converting the non-standard sub-model in the three-dimensional model to be lightweighted according to a first preset format includes:
[0012] The first preset format is determined to be a mesh format;
[0013] The non-standard sub-model in the three-dimensional model to be lightweighted is converted into a mesh format file to obtain a converted non-standard sub-model, and the converted non-standard sub-model is a mesh model.
[0014] In a possible implementation, converting the standard sub-model and the sub-model relationship in the three-dimensional model to be lightweighted according to a second preset format includes:
[0015] The second preset format is determined to be an XML format;
[0016] The standard sub-model in the three-dimensional model to be lightweighted is converted into an XML format file to obtain a converted standard sub-model;
[0017] The sub-model relationship corresponding to the three-dimensional model to be lightweighted is converted into an XML format file to obtain a converted sub-model relationship.
[0018] In a possible implementation, converting the attribute information of the three-dimensional model to be lightweighted according to a second preset format includes:
[0019] The second preset format is determined to be an XML format;
[0020] The attribute information of the three-dimensional model to be lightweighted is converted into an XML format file to obtain converted attribute information.
[0021] In a possible implementation, the converted non-standard sub-model is simplified by using a model simplification algorithm, including:
[0022] All triangular faces of the converted non-standard sub-model are obtained, and all the triangular faces are classified according to a preset rule to obtain a plurality of category sets, and each category set contains a plurality of triangular faces;
[0023] For each category set, the similarity between two triangular faces in the category set is obtained, and the triangular faces with a similarity greater than a set threshold in the category set are aggregated to obtain a set of triangular faces to be simplified;
[0024] An edge of each triangular face in the set of triangular faces to be simplified is taken as a target edge;
[0025] For the converted non-standard sub-model, an error matrix Q of all vertices in the non-standard sub-model is obtained;
[0026] According to the error matrix Q of all vertices in the non-standard sub-model, a contraction cost corresponding to all target edges is determined;
[0027] All the contraction costs are sorted in size order, and the target edge with the smallest contraction cost is folded, where the folding means that two initial vertices on the target edge are merged into a new vertex, and the new vertex is connected to all other vertices connected to the two initial vertices, a new edge is generated, and all edges connected to the two initial vertices are deleted;
[0028] It is judged whether the simplification rate exceeds a preset simplification threshold, if yes, the current non-standard sub-model is taken as a simplified sub-model, otherwise the next folding process is performed until the simplification rate exceeds the preset simplification threshold, and the simplified sub-model is obtained.
[0029] In a possible implementation, the error matrix Q of all vertices in the non-standard sub-model is obtained as follows:
[0030]
[0031] wherein, K p represents a quadratic error, planes(vi) represents a triangular face set containing vertex vi, p represents a triangular face in the triangular face set planes(vi), C vi represents a curvature size at vertex vi, γ vi represents a planeness at vertex vi, S sum represents a domain area of vertex vi, i=1, 2, …, I, and I represents a total number of vertices in the non-standard sub-model.
[0032] In a possible implementation, the curvature size C vi at the vertex vi is as follows:
[0033]
[0034]
[0035]
[0036] wherein n vi denotes the normal vector of vertex vi, n ki denotes the normal vector of the kth triangle face containing vertex vi, k = 1, 2,..., K, K denotes the total number of triangle faces containing vertex vi, v ki1 , v ki2 and v ki3 denote the three vertices of the kth triangle face containing vertex vi, respectively.
[0037] In a possible implementation, the flatness γ vi at the vertex vi is determined as follows:
[0038]
[0039] wherein β j denotes the included angle between the normal vectors of two triangle faces on the jth edge sharing the vertex.
[0040] In a possible implementation, the contraction cost corresponding to each target edge is determined according to the error matrix Q of all vertices in the non-standard sub-model, including:
[0041] determining the two vertices corresponding to the target edge to obtain a first target vertex v1 and a second target vertex v2;
[0042] determining a first target error matrix Q1 corresponding to the first target vertex v1 and a second target error matrix Q2 corresponding to the second target vertex v2 according to the error matrix Q of all vertices in the non-standard sub-model;
[0043] determining an intermediate point v3 = (v1 + v2) / 2 and obtaining a third target error matrix Q3 corresponding to the intermediate point v3;
[0044] determining the minimum value of the first target error matrix Q1, the second target error matrix Q2 and the third target error matrix Q3, and taking the minimum value as the contraction cost corresponding to the target edge.
[0045] In a possible implementation, all contraction costs are sorted in size order, and the target edge with the smallest contraction cost is folded, including:
[0046] A1, sorting all contraction costs in size order to determine the target edge with the smallest contraction cost;
[0047] A2, acquire the first target error matrix Q1, the second target error matrix Q2 and the third target error matrix Q3 corresponding to the target edge with the minimum shrinkage cost;
[0048] A3, judge whether the first target error matrix Q1 corresponding to the target edge with the minimum shrinkage cost is smaller than the second target error matrix Q2 and the third target error matrix Q3, if yes, take the first target vertex v1 as a new vertex, and fold the target edge with the minimum shrinkage cost based on the new vertex, otherwise, enter step A4;
[0049] A4, judge whether the second target error matrix Q2 corresponding to the target edge with the minimum shrinkage cost is smaller than the first target error matrix Q1 and the third target error matrix Q3, if yes, take the second target error matrix Q2 as a new vertex, and fold the target edge with the minimum shrinkage cost based on the new vertex, otherwise, take the third target error matrix Q3 as a new vertex, and fold the target edge with the minimum shrinkage cost based on the new vertex.
[0050] The three-dimensional model lightweight online analysis method provided by the application can effectively reduce network transmission pressure, and can analyze a three-dimensional model into a geometric part and a non-geometric part, only perform lightweight processing on the geometric part, combine the geometric part and the non-geometric part after lightweight processing of the geometric part, avoid the problem that data is easily lost in the lightweight conversion process of a traditional three-dimensional model, and finally convert the three-dimensional model after lightweight processing into a preset format, thereby effectively reducing the complexity and size of the three-dimensional model, and solving the problem that data generated by different three-dimensional software is incompatible on a heterogeneous platform, and it is difficult to exchange and share three-dimensional model information. BRIEF DESCRIPTION OF DRAWINGS
[0051] The accompanying drawings, which are incorporated herein and form a part of the specification, illustrate embodiments consistent with the present application and, together with the description, further serve to explain the principles of the application.
[0052] Figure 1 A flowchart of the three-dimensional model lightweight online analysis method provided by the embodiment of the application.
[0053] Figure 2 A folding operation schematic diagram provided by the embodiment of the application.
[0054] The specific embodiments of the application have been shown and described in the foregoing drawings together with the accompanying text, which will be described in more detail below. These drawings and text are not intended to limit the scope of the concept of the application in any way, but to illustrate the concept of the application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0055] The specific embodiments of the present application are described below to enable those skilled in the art to understand the present application, but it should be clear that the present application is not limited to the scope of the specific embodiments, and that all the inventions utilizing the concept of the present application are within the scope of the present application as long as various changes are obvious to those skilled in the art within the spirit and scope of the present application defined and determined by the appended claims.
[0056] The embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0057] As shown in the figure, the embodiment of the present application provides a three-dimensional model lightweight online analysis method, comprising: Figure 1
[0058] S1, analyze the three-dimensional model to be lightened, determine the standard sub-model, non-standard sub-model and sub-model relationship in the three-dimensional model to be lightened, the standard model is used to represent the regular solid model, the non-standard model is used to represent the irregular solid model generated by the modeling software, and the sub-model relationship is used to represent the positional relationship and assembly relationship between the sub-models.
[0059] For example, the standard model can be a regular solid model such as a sphere, a cylinder, a rectangular body, a circular truncated cone and a circular cone, and the non-standard model can be a solid model other than the standard model (such as a three-dimensional grid model or a BIM non-standard model generated by the modeling software).
[0060] S2, convert the non-standard sub-model in the three-dimensional model to be lightened according to the first preset format, and obtain the converted non-standard sub-model. Convert the standard sub-model and the sub-model relationship in the three-dimensional model to be lightened according to the second preset format, and obtain the converted standard sub-model and the sub-model relationship. Extract the attribute information of the three-dimensional model to be lightened, and convert the attribute information of the three-dimensional model to be lightened according to the second preset format, and obtain the converted attribute information.
[0061] Since the complexity of the standard model is low, it does not need to be simplified, and the sub-model relationship and the attribute information of the three-dimensional model to be lightened belong to text information, which also does not need to be simplified. Therefore, the embodiment of the present application mainly converts the non-standard sub-model.
[0062] Optionally, the first preset format can be set as a mesh (triangular face mesh) format, which can represent the details of the three-dimensional model with a small data size, realize the preliminary analysis of the three-dimensional model to be lightened, and effectively reduce the pressure of network transmission.
[0063] The first type of three-dimensional model generated by modeling software (mainly containing the geometric information of the model) is converted into a mesh format of triangular mesh sheets by using the prior art, and the non-geometric information is manually supplemented by using an eXtensible Markup Language (XML) file.
[0064] The second type of BIM (Building Information Modeling) model generated by BIM software (containing the geometric information and non-geometric information of the model) is parsed into a model of geometric information and non-geometric information data according to an API (Application Program Interface) provided by the software, the model of geometric information is converted into a mesh intermediate format of triangular mesh sheets, and the non-geometric information is automatically extracted by using an eXtensible Markup Language file.
[0065] The third type of three-dimensional entity model generated by mechanical software (having a complex assembly relationship and being separated from the model) is divided into a standard entity and a non-standard entity according to an API (Application Program Interface) provided by the software, the non-standard entity is converted into a mesh intermediate format of triangular mesh sheets according to the API provided by the software, the standard entity (cylinder, cube, sphere, cone or frustum, etc.) is expressed by using a self-defined standard array, and the non-geometric information, BOM assembly structure, reference, instance attribute, etc. are automatically extracted by using an eXtensible Markup Language file.
[0066] S3, the converted non-standard sub-model, the converted standard sub-model, the converted sub-model relationship and the converted attribute information are packaged to obtain a packaged file, and the packaged file is uploaded to a cloud server for lightweight processing. The converted non-standard sub-model, the converted standard sub-model, the converted sub-model relationship and the converted attribute information are obtained by analyzing the packaged file on the cloud server.
[0067] S4, the converted non-standard sub-model is simplified by using a model simplification algorithm to obtain a simplified sub-model, and the converted standard sub-model is converted according to a first preset format corresponding to the simplified sub-model, i.e., the standard sub-model is converted into a mesh format to obtain a standard sub-model associated with the simplified sub-model.
[0068] The three-dimensional model to be lightweighted is preliminarily analyzed on the front-end device and then uploaded to the cloud server for lightweight processing, which can reduce the data processing pressure of the front-end device and the network transmission pressure.
[0069] S5, according to the simplified sub-model, the standard sub-model associated with the simplified sub-model, the converted sub-model relationship and the converted attribute information, taking the GUID as the primary key, packing in the third preset format, and obtaining the lightweight three-dimensional model.
[0070] Optionally, the third preset format is determined as the B3D format, and the simplified sub-model, the standard sub-model associated with the simplified sub-model, the converted sub-model relationship and the converted attribute information are uniformly packed into a B3D format file.
[0071] The application adopts a front-end and back-end mode, the front end performs preprocessing locally, mainly converts the model into a mesh format of triangular mesh sheets according to categories, filters unnecessary model data, ensures data security and privacy, then packs and uploads to the cloud for secondary optimization processing, and packs into a self-defined B3D format, facilitating the exchange and sharing of three-dimensional models.
[0072] In a possible implementation, the non-standard sub-model in the three-dimensional model to be lightweighted is converted according to the first preset format, including:
[0073] The first preset format is determined as the mesh format.
[0074] The non-standard sub-model in the three-dimensional model to be lightweighted is converted into a mesh format file, to obtain a converted non-standard sub-model, and the converted non-standard sub-model is a mesh model.
[0075] In a possible implementation, the standard sub-model and the sub-model relationship in the three-dimensional model to be lightweighted are converted according to the second preset format, including:
[0076] The second preset format is determined as the XML format.
[0077] The file in the XML format can exchange data between incompatible systems, and the data stored by computer systems and database systems has multiple forms, and the most time-consuming work is to exchange data between systems distributed in the network. Converting data into the XML format for storage will greatly reduce the complexity of exchanging data, and also enables these data to be read by different programs. For the standard sub-model, the sub-model relationship and the attribute information, converting them into the XML format can realize preliminary lightweighting, and also make the data more compatible.
[0078] The standard sub-model in the three-dimensional model to be lightweighted is converted into an XML format file, to obtain a converted standard sub-model.
[0079] The sub-model relationship corresponding to the three-dimensional model to be lightweighted is converted into an XML format file, to obtain a converted sub-model relationship.
[0080] In a possible implementation, the attribute information of the three-dimensional model to be lightweighted is converted according to a second preset format, including:
[0081] The second preset format is determined as an XML format.
[0082] The attribute information of the three-dimensional model to be lightweighted is converted into an XML format file to obtain converted attribute information.
[0083] In a possible implementation, a model simplification algorithm (Quadic Error Metrics, QEM) is used to simplify the converted non-standard sub-model, including:
[0084] All triangular faces of the converted non-standard sub-model are obtained, and all the triangular faces are classified according to a preset rule to obtain a plurality of category sets, and each category set contains a plurality of triangular faces. For example, hierarchical clustering, region growing or spectral clustering method can be used for clustering of triangular faces.
[0085] For each category set, the similarity between two triangular faces in the category set is obtained, and the triangular faces in the category set with a similarity greater than a set threshold are aggregated to obtain a set of triangular faces to be simplified.
[0086] The similarity between the triangular faces can represent the similarity between the positions, postures and / or sizes of the two triangular faces. For example, the shortest distance between the two triangular faces, the average curvature size of the triangular face vertices and / or the average flatness of the triangular face vertices can be used as a similarity correlation factor. When the shortest distance between the two triangular faces is less than a set threshold, the difference between the average curvature sizes of the triangular face vertices is less than a set threshold, and the difference between the average flatness of the triangular face vertices is less than a set threshold, the two triangular faces are added to the set of triangular faces to be simplified. It should be noted that other methods can also be used for aggregation, for example, an aggregation instruction generated by human-computer interaction can also be received to determine the set of triangular faces to be simplified.
[0087] Optionally, the triangular faces in each category set can also be directly simplified without aggregation, so as to perform lightweight operation while retaining model features.
[0088] The edges of each triangular face in the set of triangular faces to be simplified are taken as target edges.
[0089] For the converted non-standard sub-model, an error matrix Q of all vertices in the non-standard sub-model is obtained.
[0090] According to the error matrix Q of all vertices in the non-standard sub-model, the shrinkage cost corresponding to all target edges is determined.
[0091] All the shrinkage costs are sorted in size order, and the target edge with the smallest shrinkage cost is folded.
[0092] Through the above simplification operation, the number of triangular faces of the model can be greatly reduced while ensuring the overall shape of the model, thereby providing a basis for loading and displaying the model.
[0093] As shown in Figure 2 , the folding operation combines two initial vertices on the target edge into a new vertex, and the new vertex is connected to all other vertices connected to the two initial vertices, generates a new edge, and deletes all edges connected to the two initial vertices.
[0094] It is determined whether the simplification rate exceeds a preset simplification threshold. If yes, the current non-standard sub-model is taken as a simplified sub-model. Otherwise, the next folding process is performed until the simplification rate exceeds the preset simplification threshold, and the simplified sub-model is obtained.
[0095] In a possible implementation, the error matrix Q of all vertices in the non-standard sub-model is:
[0096]
[0097] wherein K p represents a quadratic error, planes(vi) represents a triangular face set containing the vertex vi, p represents a triangular face in the triangular face set planes(vi), C vi represents a curvature at the vertex vi, γ vi represents a planeness at the vertex vi, S sum represents a domain area of the vertex vi, i=1, 2, …, I, and I represents a total number of vertices in the non-standard sub-model.
[0098] A triangular face in a three-dimensional space can be represented by a plane equation ax+by+cz+d=0, wherein (x, y, z) represents coordinates of an arbitrary point on the triangular face, a 2 +b 2 +c 2 =1, a represents a first coefficient, b represents a second coefficient, c represents a third coefficient, and d represents a fourth coefficient.
[0099] Therefore, the triangular face can be represented by p=[a b c d] T , the coordinates of the vertex v are determined as [v x v y v z 1] T , and the square of the distance of the vertex v to the triangular face p is D=v T (pp T )v=v T (K p )v, wherein T represents transposition.
[0100]
[0101] In a possible implementation, the curvature size C at the vertex vi is vi :
[0102]
[0103]
[0104]
[0105] wherein n vi represents the normal vector of the vertex vi, n ki represents the normal vector of the kth triangle face containing the vertex vi, k = 1, 2,..., K, K represents the total number of triangle faces containing the vertex vi, v ki1 , v ki2 and v ki3 respectively represent three vertices of the kth triangle face containing the vertex vi.
[0106] In a possible implementation, the planeness γ at the vertex vi is vi :
[0107]
[0108] wherein β j represents the included angle of two triangle face normals on the jth edge sharing the vertex.
[0109] In the present embodiment, the area S of the domain of the vertex vi can be sum :
[0110]
[0111] wherein S k represents the area of the kth triangle face containing the vertex vi.
[0112] In a possible implementation, the shrinkage cost corresponding to all target edges is determined according to the error matrix Q of all vertices in the non-standard sub-model, including:
[0113] The two vertices corresponding to the target edge are determined to obtain a first target vertex v1 and a second target vertex v2.
[0114] The first target error matrix Q1 corresponding to the first target vertex v1 and the second target error matrix Q2 corresponding to the second target vertex v2 are determined according to the error matrix Q of all vertices in the non-standard sub-model.
[0115] Determine the intermediate point v3=(v1+v2) / 2, and obtain the third target error matrix Q3 corresponding to the intermediate point v3.
[0116] Determine the minimum value of the first target error matrix Q1, the second target error matrix Q2 and the third target error matrix Q3, and take the minimum value as the contraction cost corresponding to the target edge.
[0117] In a possible implementation, all contraction costs are sorted in size order, and the target edge with the minimum contraction cost is folded, including:
[0118] A1, sort all contraction costs in size order, and determine the target edge with the minimum contraction cost.
[0119] A2, obtain the first target error matrix Q1, the second target error matrix Q2 and the third target error matrix Q3 corresponding to the target edge with the minimum contraction cost.
[0120] A3, determine whether the first target error matrix Q1 corresponding to the target edge with the minimum contraction cost is smaller than the second target error matrix Q2 and the third target error matrix Q3, if yes, take the first target vertex v1 as a new vertex, and fold the target edge with the minimum contraction cost based on the new vertex, otherwise go to step A4.
[0121] A4, determine whether the second target error matrix Q2 corresponding to the target edge with the minimum contraction cost is smaller than the first target error matrix Q1 and the third target error matrix Q3, if yes, take the second target error matrix Q2 as a new vertex, and fold the target edge with the minimum contraction cost based on the new vertex, otherwise take the third target error matrix Q3 as a new vertex, and fold the target edge with the minimum contraction cost based on the new vertex.
[0122] Optionally, in addition to the edge folding method described in the embodiment, other methods can also be used for lightweight, for example, a triangle folding operation can also be used for lightweight.
[0123] The three-dimensional model lightweight online analysis method provided by the application first performs preliminary analysis on the three-dimensional model in the front end, and then performs lightweight in the cloud server, thereby forming a front-end and back-end analysis architecture, which can effectively reduce network transmission pressure, and analyze the three-dimensional model into a geometric part and a non-geometric part, only the geometric part is lightweighted, and after the geometric part is lightweighted, the geometric part and the non-geometric part are combined, avoiding the problem that data is easily lost in the lightweight conversion process of the traditional three-dimensional model, and finally converting the lightweight three-dimensional model into a preset format, that is, effectively reducing the complexity and size of the three-dimensional model, and solving the problem that the data generated by different three-dimensional software is not compatible under a heterogeneous platform, resulting in difficulty in exchanging and sharing three-dimensional model information.
[0124] It is to be understood that any variation of the methods utilizing the concepts of the present application should be within the scope of the present application. Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. It is intended that the present application cover any and all variations of the present application comprising modifications and / or additions of known or customary techniques in the art; and further scope of the application will be apparent to those skilled in the art.
[0125] It is to be understood that the application is not limited to the precise construction hereinafter described and as shown in the attached drawings, and that various changes in shape, size and arrangements of parts thereof can be made by those skilled in the art without departing from the scope of the present application. The scope of the application should only be limited by the appended claims.
Claims
1. A lightweight online analytical method for 3D models, characterized in that, include: The 3D model to be lightweight is analyzed to determine the standard sub-models, non-standard sub-models, and sub-model relationships in the 3D model to be lightweight. The standard model is used to represent a regular 3D model, the non-standard model is used to represent an irregular 3D model generated by the modeling software, and the sub-model relationships are used to represent the positional and assembly relationships between the various sub-models. The non-standard sub-models in the 3D model to be lightweighted are converted according to the first preset format to obtain the converted non-standard sub-models. The standard sub-models and sub-model relationships in the 3D model to be lightweighted are converted according to the second preset format to obtain the converted standard sub-models and sub-model relationships. Extract the attribute information of the 3D model to be lightweighted, and convert the attribute information of the 3D model to be lightweighted according to the second preset format to obtain the converted attribute information; The transformed non-standard sub-model, the transformed standard sub-model, the transformed sub-model relationships, and the transformed attribute information are packaged into a packaged file, which is then uploaded to a cloud server for lightweighting. The cloud server parses the packaged file to obtain the transformed non-standard sub-model, the transformed standard sub-model, the transformed sub-model relationships, and the transformed attribute information. The transformed non-standard sub-model is simplified using a model simplification algorithm to obtain a simplified sub-model. The transformed standard sub-model is then transformed according to the first preset format corresponding to the simplified sub-model to obtain the standard sub-model associated with the simplified sub-model. Based on the simplified sub-model, the standard sub-model associated with the simplified sub-model, the transformed sub-model relationships, and the transformed attribute information, a lightweight 3D model is obtained by packaging it using GUID as the primary key and a third pre-defined format.
2. The lightweight online analytical method for three-dimensional models according to claim 1, characterized in that, Convert the non-standard sub-models in the 3D model to be lightweighted according to the first preset format, including: The first preset format is set to mesh format; The non-standard sub-models in the 3D model to be lightweighted are converted into mesh format files to obtain the converted non-standard sub-models, which are mesh models.
3. The lightweight online parsing method for three-dimensional models according to claim 1, characterized in that, The standard sub-models and their relationships in the 3D model to be lightweighted are converted according to the second preset format, including: The second preset format is set to XML format; Convert the standard sub-model in the 3D model to be lightweighted into an XML format file to obtain the converted standard sub-model. The sub-model relationships corresponding to the 3D model to be lightweighted are converted into XML format files to obtain the converted sub-model relationships.
4. The lightweight online parsing method for three-dimensional models according to claim 1, characterized in that, The attribute information of the 3D model to be lightweighted is converted according to the second preset format, including: The second preset format is set to XML format; The attribute information of the 3D model to be lightweighted is converted into an XML format file to obtain the converted attribute information.
5. The lightweight online parsing method for three-dimensional models according to claim 2, characterized in that, The transformed non-standard sub-model is simplified using a model simplification algorithm, including: Obtain all triangles of the transformed non-standard sub-model, and classify all triangles according to preset rules to obtain multiple category sets, each of which contains multiple triangles; For each category set, the similarity between each pair of triangles in the category set is obtained, and triangles with similarity greater than a set threshold in the category set are aggregated to obtain a set of triangles to be simplified. Use the edge of each triangle in the set of triangles to be simplified as the target edge; For the transformed non-standard sub-model, obtain the error matrix Q of all vertices in the non-standard sub-model; Based on the error matrix Q of all vertices in the non-standard sub-model, determine the shrinkage cost corresponding to all target edges; Sort all shrinkage costs in order of magnitude, and fold the target edge with the smallest shrinkage cost. Folding means merging the two initial vertices on the target edge into a new vertex, and connecting the new vertex to all other vertices connected to the two initial vertices to generate a new edge, and deleting all edges connected to the two initial vertices. Determine if the simplification rate exceeds the preset simplification threshold. If so, use the current non-standard sub-model as the simplified sub-model; otherwise, proceed to the next folding process until the simplification rate exceeds the preset simplification threshold to obtain the simplified sub-model.
6. The lightweight online parsing method for three-dimensional models according to claim 5, characterized in that, The error matrix Q of all vertices in the non-standard sub-model is obtained as follows: Among them, K p Let C represent the quadratic error, planes(vi) represent the set of triangles containing vertex vi, p represent the triangles in the set planes(vi), and C represent the quadratic error. vi γ represents the magnitude of curvature at vertex vi. vi S represents the flatness at vertex vi. sum Let i represent the area of the neighborhood of vertex vi, where i = 1, 2, ..., I, and I represents the total number of vertices in the non-standard submodel.
7. The lightweight online parsing method for three-dimensional models according to claim 6, characterized in that, The curvature C at vertex vi vi for: Where, n vi Let n represent the normal vector of vertex vi. ki Let v represent the normal vector of the k-th triangle containing vertex vi, where k = 1, 2, ..., K, and K represents the total number of triangles containing vertex vi. ki1 v ki2 and v ki3 Let each of the three vertices represent the three vertices of the k-th triangle containing vertex vi.
8. The lightweight online parsing method for three-dimensional models according to claim 6, characterized in that, The flatness γ at vertex vi vi for: Where, β j Let represent the angle between the normals of two triangles on the j-th edge sharing a vertex.
9. The lightweight online parsing method for three-dimensional models according to claim 6, characterized in that, Based on the error matrix Q of all vertices in the non-standard sub-model, determine the shrinkage cost corresponding to all target edges, including: Determine the two vertices corresponding to the target edge to obtain the first target vertex v1 and the second target vertex v2; Based on the error matrix Q of all vertices in the non-standard sub-model, determine the first target error matrix Q1 corresponding to the first target vertex v1 and the second target error matrix Q2 corresponding to the second target vertex v2; Determine the intermediate point v3 = (v1 + v2) / 2, and obtain the third objective error matrix Q3 corresponding to the intermediate point v3; Determine the minimum values of the first target error matrix Q1, the second target error matrix Q2, and the third target error matrix Q3, and use the minimum values as the shrinkage cost corresponding to the target edge.
10. The lightweight online parsing method for three-dimensional models according to claim 9, characterized in that, Sort all contraction costs in order of magnitude, and collapse the target edge with the smallest contraction cost, including: A1. Sort all shrinkage costs in order of magnitude and determine the target edge with the smallest shrinkage cost; A2. Obtain the first target error matrix Q1, the second target error matrix Q2, and the third target error matrix Q3 corresponding to the target edge with the minimum shrinkage cost; A3. Determine whether the first target error matrix Q1 corresponding to the target edge with the minimum shrinkage cost is less than the second target error matrix Q2 and the third target error matrix Q3. If so, take the first target vertex v1 as the new vertex and fold the target edge with the minimum shrinkage cost based on the new vertex. Otherwise, proceed to step A4. A4 determines whether the second target error matrix Q2 corresponding to the target edge with the minimum shrinkage cost is less than the first target error matrix Q1 and the third target error matrix Q3. If so, the second target error matrix Q2 is used as the new vertex, and the target edge with the minimum shrinkage cost is folded based on the new vertex. Otherwise, the third target error matrix Q3 is used as the new vertex, and the target edge with the minimum shrinkage cost is folded based on the new vertex.
Citation Information
Patent Citations
Model processing method and device, nonvolatile storage medium and computer equipment
CN114943804A
Quadratic error measurement edge folding BIM (Building Information Modeling) lightweight method based on vertex importance
CN115345988A