File conversion method and device, model visualization rendering method and device, equipment and medium
By simplifying the geometric structure of the three-dimensional model file, the multi-precision target model file is generated, which solves the problem of lack of application flexibility after compression and conversion of model files in the existing technology, and achieves a wider range of application scenario adaptability.
Patent Information
- Application Number
- CN202310945994.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-28
- Publication Date
- 2025-02-14
AI Technical Summary
In the prior art, the compressed files generated after compression conversion of model files cannot be applicable to different application scenarios and lack application flexibility.
By analyzing the three-dimensional model in the initial model file, geometric structure data is obtained, and geometric structure simplification processing is performed based on multiple planning accuracy, corresponding target model files are generated, and file compression conversion is realized under different accuracy.
The compressed volume of the file after compression conversion of the model file is no longer limited to the size of the original model file, so that the generated model file can meet the application needs of more digital twin application scenarios.
Smart Images

Figure CN119441149A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of data processing technology, and in particular relates to a file conversion method, a model visualization rendering method, a device, a equipment and a medium. Background Art
[0002] In digital twin application scenarios, three-dimensional model files need to be compressed and converted into digital twin application model files.
[0003] The compression range of the model based on the file processing flow of the set file compression algorithm is mainly limited by the size of the original model file. The generated compressed file cannot be applied to different application scenarios and lacks application flexibility. Summary of the invention
[0004] The embodiments of the present application provide a file conversion method, a model visualization rendering method, an apparatus, a device and a medium to solve the problem in the prior art that the compressed files generated after the compression conversion of the model files cannot be applied to different application scenarios and lack application flexibility.
[0005] A first aspect of an embodiment of the present application provides a file conversion method, comprising:
[0006] Parsing the three-dimensional model in the initial model file to obtain first geometric structure data;
[0007] Based on the first geometric structure data, geometric structure simplification processing is performed respectively according to a plurality of planning accuracies to obtain second geometric structure data;
[0008] Based on the second geometric structure data, a target model file corresponding to each of the planning accuracies is generated.
[0009] This process gives multiple planning accuracies and parses the geometric structure data in the three-dimensional model based on the model file. Then, according to different planning accuracies, the geometric structure simplification processing of the model is performed respectively to generate a target model file corresponding to each planning accuracy, and realize file compression conversion under different accuracies. The compressed volume of the final model file generated by the conversion is no longer limited by the volume of the original model file with a fixed compression ratio, so that the model file can be compressed and converted to meet the application needs of more digital twin application scenarios with multi-precision compression design.
[0010] In some embodiments, based on the first geometric structure data, performing geometric structure simplification processing according to multiple planning accuracies to obtain second geometric structure data includes:
[0011] Based on the first geometric structure data, select a plurality of vertex pairs, and calculate the shrinkage cost corresponding to each of the vertex pairs;
[0012] Based on the shrinkage cost, determining a shrinkage vertex pair from the plurality of vertex pairs;
[0013] According to the target planning accuracy, a geometric structure simplification process is performed based on the contracted vertex pairs to obtain the second geometric structure data.
[0014] In this process, the contraction cost of vertex pairs in the geometric structure is introduced to select appropriate vertex pairs as contraction vertex pairs, and then the geometric structure simplification processing is carried out in an orderly manner according to the planning accuracy to ensure the rationality and effectiveness of the geometric simplification operation.
[0015] In some embodiments, performing geometric structure simplification processing based on the contracted vertex pairs in accordance with the target planning accuracy to obtain the second geometric structure data includes:
[0016] Performing geometric structure simplification processing based on the contracted vertex pairs to obtain simplified geometric structure data;
[0017] If the simplified geometric structure data does not meet the target planning accuracy, updating the first geometric structure data to the simplified geometric structure data;
[0018] Return to execute the step of selecting multiple vertex pairs based on the first geometric structure data, and calculating the shrinkage cost corresponding to each vertex pair, until the simplified geometric structure data meets the target planning accuracy, and determine the simplified geometric structure data as the second geometric structure data.
[0019] This process, aimed at the current target planning accuracy, combines the iterative processing of the geometric structure simplification process to ensure the simplified compression effect of the geometric structure data corresponding to the simplified model under the current planning accuracy.
[0020] In some embodiments, the file conversion method further includes:
[0021] Determine a set of model simplified control parameters corresponding to each of the planning accuracies;
[0022] In the case where the geometric structure simplification process satisfies the target model simplification control parameter, it is determined that the simplified geometric structure data satisfies the target planning accuracy corresponding to the target model simplification control parameter.
[0023] In this process, the model simplification control parameters corresponding to the target planning accuracy are used as the criterion for judging whether the geometric structure simplification processing has met the standards. The judgment is made from the geometric structure simplification processing process to ensure that the simplified geometric structure data meets the target planning accuracy and ensure the accuracy and rationality of the geometric structure simplification processing.
[0024] In some embodiments, determining a set of model simplification control parameters corresponding to each planning accuracy includes:
[0025] For each of the planning precisions, determining a set of model simplification control parameters corresponding to each of the planning precisions based on a model simplification target value indicated by the planning precision;
[0026] The model simplification target value includes a model simplification ratio value, a number value of geometric elements in the simplified model, or a file volume value corresponding to the simplified model.
[0027] Here, each planning accuracy is associated with the model simplification ratio value, the number of geometric elements in the simplified model or the file volume value corresponding to the simplified model, and the corresponding model simplification control parameters are determined with the help of the associated model simplification ratio value, the number of geometric elements in the simplified model or the file volume value corresponding to the simplified model, so as to facilitate the effective determination of the model simplification control parameters.
[0028] In some embodiments, parsing the three-dimensional model in the initial model file to obtain the first geometric structure data includes:
[0029] Based on the mesh model, geometrically disassemble the three-dimensional model in the initial model file to obtain vertex data and facet data;
[0030] The first geometric structure data is obtained based on the vertex data and the patch data.
[0031] In this process, the surface structure of the three-dimensional model is disassembled to obtain the vertex data and facet data corresponding to the three-dimensional model in the original model file based on the mesh model, and the surface structure data of the geometric body corresponding to the three-dimensional model is obtained, so as to implement model compression processing based on the surface structure data of the geometric body, expand the model compression space, and reduce the compression space limit of the model file imposed by the volume of the original model file.
[0032] In some embodiments, obtaining the first geometric structure data based on the vertex data and the patch data includes:
[0033] Based on the vertex data and the patch data, determining a first mapping relationship between each patch, a required vertex of each patch, and an associated patch of each patch;
[0034] The first geometric structure data including the vertex data, the patch data and the first mapping relationship is obtained.
[0035] This process, based on the surface structural feature information of the geometric body obtained by disassembly, further obtains the connection relationship between the surface feature information to ensure the content completeness of the obtained geometric structure data, so as to carry out effective file compression and conversion processing based on this.
[0036] In some embodiments, generating a target model file corresponding to each of the planning accuracies based on the second geometric structure data includes:
[0037] Based on the second geometric structure data, a mesh model file corresponding to each of the planning accuracies is generated.
[0038] In this process, the geometric structure data obtained after the final simplification and shrinkage processing is converted into a file corresponding to the mesh model structure, which reserves a large compression space for file compression and conversion processing, and enables effective and convenient model application implementation.
[0039] In some embodiments, before performing geometric structure simplification processing based on the first geometric structure data and obtaining the second geometric structure data according to multiple planning accuracies, the method further includes:
[0040] Generate a hash value based on each of the vertex data;
[0041] Based on the hash value, determining repeated first target vertex data from the vertex data;
[0042] The repeated first target vertex data is deduplicated from the vertex data to obtain updated first geometric structure data.
[0043] In this way, by eliminating the vertex data corresponding to the overlapping vertices, the performance loss caused by the model shrinkage calculation is reduced, ensuring that the converted file has a better volume optimization effect.
[0044] In some embodiments, before performing geometric structure simplification processing based on the first geometric structure data and obtaining the second geometric structure data according to multiple planning accuracies, the method further includes:
[0045] Based on the vertex data and the patch data, vertices that have no subordinate relationship with the patch are screened out, and second target vertex data corresponding to the vertex is determined;
[0046] The second target vertex data is removed from the vertex data to obtain updated first geometric structure data.
[0047] In this way, the vertex data corresponding to isolated vertices are eliminated, the performance loss caused by model shrinkage calculation is reduced, and the converted file is guaranteed to have a better volume optimization effect.
[0048] In some embodiments,
[0049] Before the step of performing geometric structure simplification processing based on the first geometric structure data and obtaining the second geometric structure data according to a plurality of planning accuracies, the method further comprises:
[0050] Determine third target vertex data corresponding to the required vertex of each face piece from the vertex data;
[0051] Based on the third target vertex data, construct an edge vector of any two vertices among the required vertices of each of the face pieces;
[0052] In the case where there are a first edge vector and a second edge vector whose cross product result is zero in the edge vector, determining fourth target vertex data of two vertices corresponding to the first edge vector and fifth target vertex data of two vertices corresponding to the second edge vector from the third target vertex data;
[0053] The fourth target vertex data or the fifth target vertex data is eliminated from the vertex data to obtain updated first geometric structure data.
[0054] In this way, the vertex data corresponding to the overlapping edges are eliminated, reducing the performance loss caused by the model shrinkage calculation, and ensuring that the converted file has a better volume optimization effect.
[0055] In some embodiments, after generating a target model file corresponding to each of the planning accuracies based on the second geometric structure data, the method further includes:
[0056] Parsing the target model file to obtain the second geometric structure data;
[0057] Performing model visualization rendering based on the second geometric structure data;
[0058] When the processing effect of the model visualization rendering meets the set indicators, it is confirmed that the target model file is valid.
[0059] Here, visual rendering is used to achieve visual verification of the compression conversion effect of the model file.
[0060] In some embodiments, after generating a target model file corresponding to each of the planning accuracies based on the second geometric structure data, the method further includes:
[0061] The target model file is subjected to file compression processing, and the compressed file is updated as the target model file.
[0062] In this process, the target model file after compression conversion is compressed twice to further adjust the size of the generated model file, thereby improving the rate of file transmission and subsequent file decompression and rendering.
[0063] A second aspect of an embodiment of the present application provides a model visualization rendering method, comprising:
[0064] Acquire multiple target model files, each of the target model files corresponds to a different planning accuracy;
[0065] Parsing each of the target model files respectively to obtain multiple sets of second geometric structure data;
[0066] In response to the operation instruction, selecting target geometric structure data corresponding to the target planning accuracy from the plurality of sets of the second geometric structure data;
[0067] Model visualization rendering is performed based on the target geometric structure data.
[0068] The above process obtains multiple target model files under different planning accuracies at one time, and based on application requirements, selects a set of geometric structure data under a suitable planning accuracy from multiple sets of geometric structure data corresponding to the target model files, so as to meet the model rendering application requirements in more application scenarios with different planning accuracies.
[0069] In some embodiments, different planning accuracies correspond to corresponding observation distances; and in response to the operation instruction, selecting target geometric structure data corresponding to the target planning accuracy from the plurality of sets of the second geometric structure data comprises:
[0070] In response to the operation instruction, determining a target observation distance adapted to the operation instruction;
[0071] Determining a planning accuracy that matches the target observation distance as the target planning accuracy;
[0072] The geometric structure data corresponding to the target planning accuracy is selected from the plurality of groups of the second geometric structure data as the target geometric structure data.
[0073] The above process, through operation instructions, allocates geometric structure data under appropriate planning accuracy, ensures the selection and adjustment of different model accuracies in model visualization rendering processing, and meets the model rendering application requirements in more application scenarios by allocating geometric structure data under different planning accuracies.
[0074] In some embodiments, the second geometric structure data is obtained by performing geometric structure simplification processing based on the first geometric structure data according to each set of model simplification control parameters;
[0075] The first geometric structure data is obtained by parsing the three-dimensional model in the initial model file;
[0076] The model simplification control parameters are determined based on the precision planning array; the precision planning array includes multiple planning precisions, and each planning precision corresponds to a group of model simplification control parameters.
[0077] In this case, a method is provided to convert and generate multiple target model files, realizing file compression conversion under different precisions. The compression volume of the final model file generated by the conversion is no longer limited by the volume of the original model file with a fixed compression ratio, so that the model file can be compressed and converted with multi-precision design to meet the application requirements of more digital twin application scenarios.
[0078] A third aspect of an embodiment of the present application provides a file conversion device, including:
[0079] A model parsing module, used for parsing the three-dimensional model in the initial model file to obtain first geometric structure data;
[0080] A model simplification module, configured to perform geometric structure simplification processing according to a plurality of planning accuracies based on the first geometric structure data to obtain second geometric structure data;
[0081] The file generation module is used to generate a target model file corresponding to each of the planning accuracies based on the second geometric structure data.
[0082] A fourth aspect of an embodiment of the present application provides a model visualization rendering device, including:
[0083] A file acquisition module, used to acquire multiple target model files, each of which corresponds to a different planning accuracy;
[0084] A file parsing module, used for parsing each of the target model files to obtain multiple sets of second geometric structure data;
[0085] A data selection module, configured to select a target geometric structure number corresponding to a target planning accuracy from a plurality of sets of the second geometric structure data in response to an operation instruction;
[0086] A rendering module is used to perform model visualization rendering based on the target geometric structure data.
[0087] The fifth aspect of an embodiment of the present application provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in the first aspect or the second aspect when executing the computer program.
[0088] A sixth aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect or the second aspect are implemented.
[0089] The seventh aspect of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the steps in the method described in the first aspect or the second aspect above.
[0090] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0091] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Moreover, the same reference numerals are used throughout the drawings to represent the same components. In the drawings:
[0092] Figure 1 is a flowchart of a file conversion method in some embodiments of the present application;
[0093] Figure 2 is a flowchart of a file conversion method in some embodiments of the present application;
[0094] Figure 3 These are model effect diagrams of files before and after compression conversion at different conversion ratios in some embodiments of the present application;
[0095] Figure 4 is a flowchart of a file conversion method in some embodiments of the present application;
[0096] Figure 5 is a flowchart of a file conversion method in some embodiments of the present application;
[0097] Figure 6 is a flowchart of a file conversion method in some embodiments of the present application;
[0098] Figure 7 is a flowchart of a file conversion method in some embodiments of the present application;
[0099] Figure 8 is a flowchart of a model visualization rendering method according to some embodiments of the present application;
[0100] Fig. 9is a structural diagram of a file conversion device in some embodiments of the present application;
[0101] Fig.10 is a structural diagram of a model visualization rendering device in some embodiments of the present application;
[0102] Fig.11 It is a structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0103] The following embodiments of the technical solution of the present application are described in detail in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present application, and are therefore only used as examples, and cannot be used to limit the scope of protection of the present application.
[0104] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by technicians in the technical field to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" in the specification and claims of this application and the above-mentioned figure descriptions and any variations thereof are intended to cover non-exclusive inclusions.
[0105] In the description of the embodiments of the present application, the technical terms "first", "second", etc. are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features. In the description of the embodiments of the present application, the meaning of "multiple" is more than two, unless otherwise clearly and specifically defined.
[0106] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0107] In the description of the embodiments of the present application, the term "and / or" is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0108] In digital twin application scenarios, three-dimensional model files need to be compressed and converted into digital twin application model files, such as compressing and converting CAD (Computer Aided Design) model files into mesh model files.
[0109] Different digital twin application scenarios have different requirements for model accuracy. For example, precision mechanical twin scenarios require higher-precision mechanical three-dimensional models, while simulations at the urban building level focus more on the three-dimensional building models at the outer contour level.
[0110] The conventional file processing flow based on a set file compression algorithm is mainly to quickly generate complex CAD model files for specific fields, combined with a library for compressing and decompressing 3D geometric meshes and point clouds, and perform overall compression conversion on the CAD model files with a set compression ratio.
[0111] The compression range of the model is mainly limited by the size of the original model file. If the original 3D model file is too large, the converted model file will also be too large. The complexity of the converted 3D model depends on the size of the original model file. The generated compressed file cannot be applied to different application scenarios and lacks application flexibility.
[0112] In order to solve this problem, multiple planning accuracies are given in the embodiment of the present application, and the geometric structure data in the three-dimensional model is parsed based on the model file. Then, according to different planning accuracies, the geometric structure simplification processing of the model is performed respectively, and a target model file corresponding to each planning accuracy is generated to achieve file compression conversion under different accuracies. The compressed volume of the final model file generated by the conversion is no longer limited to the volume of the original model file with a fixed compression ratio, so that the model file can be compressed and converted to meet the application requirements of more digital twin application scenarios with a multi-precision compression design.
[0113] Combination Figure 1 As shown, in some embodiments, a file conversion method is proposed, comprising:
[0114] Step 101: parse the three-dimensional model in the initial model file to obtain first geometric structure data.
[0115] The initial model file is a file to be compressed. The initial model file contains a three-dimensional model, and the initial model file is, for example, a CAD file or other file in which the three-dimensional model is drawn. The file format of the initial model file is not limited to CAD standard formats such as .stp or .step.
[0116] Here, it is necessary to first perform geometric analysis on the three-dimensional model in the file to obtain its corresponding geometric structure data.
[0117] The geometric structure data is the descriptive data of the structural features of the geometric body corresponding to the model.
[0118] The geometric structure data is, for example, the relevant description data of geometric elements such as points, lines, and surfaces constituting the geometric body, and the description data is, for example, the index data of points, lines, and surfaces, the relative position relationship data of points, lines, and surfaces, the three-dimensional coordinate data of points, lines, and surfaces, the spatial feature data of points, lines, and surfaces, the drawing order data of points, lines, and surfaces, the mapping relationship data used to describe the dependency relationship between points, lines, and surfaces, etc. Or the geometric structure data is, for example, the relevant description information of the spatial configuration of the geometric body, such as the spatial distribution information of the geometric structure, the shape information formed by the geometric structure in space, etc.
[0119] The initial model file can be stored locally or in a cloud server.
[0120] In the process of parsing the 3D model in the initial model file, the 3D model in the initial model file can be geometrically disassembled to obtain geometric elements such as points, lines, and surfaces, and form corresponding geometric structure data. Alternatively, the 3D model in the initial model file can be spatially measured to obtain spatial distribution information of the geometric structure, spatial shape information of the geometric structure, etc., and form corresponding geometric structure data.
[0121] In the process of parsing the three-dimensional model in the initial model file, the open source OCCT (OpenCASCADE Technology) algorithm can be introduced to load the initial model file stored in the local or cloud server. During the loading process, the initial model file is converted and split into the geometric structure data required by the target model file.
[0122] Step 102 : Based on the first geometric structure data, geometric structure simplification processing is performed respectively according to a plurality of planning accuracies to obtain second geometric structure data.
[0123] Planning accuracy is the accuracy value formed by planning design. Different planning accuracy corresponds to different file accuracy, and different file accuracy requires different degrees of file compression processing.
[0124] Among them, when the geometric structure simplification processing is performed according to multiple planning accuracies, the geometric structure of the model corresponds to different simplification degrees under different planning accuracies, thereby forming files with different compression processing degrees, which correspond to different file accuracies. There is a positive correlation between the simplification degree of the model, the compression degree of the file, the file accuracy and the planning accuracy.
[0125] The geometric structure simplification process is a structural simplification and shrinkage process based on the geometry.
[0126] When performing geometric structure simplification processing, the number of geometric elements in the geometric structure will be reduced, the spatial volume of the geometric structure will be reduced, and the file size corresponding to the model after geometric structure simplification processing will also be smaller.
[0127] In some implementation processes, geometric structure simplification processing is performed based on the first geometric structure data. Specifically, geometric elements such as points, edges, and patches in the geometric structure that can be used for simplification and shrinkage are determined, and the geometric surface of the model is shrunk according to different planning accuracies based on these points, edges, and patches to achieve model simplification processing.
[0128] Among them, when performing model surface shrinkage processing based on points, edges, and patches, specific vertices, specific edges, or specific faces can be merged according to the geometric characteristics of the points, edges, and patches, and the dependencies between them, to achieve shrinkage and simplification of the model's geometric structure.
[0129] Alternatively, in other implementation processes, geometric structure simplification processing is performed based on the first geometric structure data, specifically, the spatial distribution information corresponding to the geometric structure, the spatial shape of the geometric structure and other geometric feature information are determined, the geometric center point of the geometric structure, the symmetry, straightness, closure and other features of the geometric structure are determined, and the model is geometrically spatially shrunk according to different planning accuracies to achieve model simplification processing.
[0130] Among them, when the model is subjected to the geometric body space contraction processing, the geometric body can be spatially superimposed based on the geometric features such as symmetry, straightness, and closure of the geometric structure, with the geometric center point of the geometric structure as the reference, to achieve the contraction and simplification of the model geometric body structure. After the geometric body structure simplification processing, due to the simplification and contraction of the geometric body structure, the number and interdependence of the points, edges, and patches, the size of the geometric body structure space, etc. are changed compared with the previous ones, and new geometric body structure data corresponding to each planning accuracy will be generated accordingly, that is, the second geometric body structure data.
[0131] This step starts with the model structure in the model file, and performs simplification processing on the model's geometric structure according to different planning accuracies. By shrinking the model's geometric structure in the model file, the volume of the model file is compressed. The compression processing of the model's geometric structure in the model file is combined with different planning accuracies to achieve multi-precision simplification processing of the geometric structure in the model.
[0132] Step 103: Generate a target model file corresponding to each planning accuracy based on the second geometric structure data.
[0133] Among them, there are multiple target model files, and each target model file corresponds to a planning accuracy, ensuring that the model file can be compressed and converted with multi-precision compression design to meet the application requirements of more digital twin application scenarios.
[0134] The file size of the target model file under different planning accuracies is less than or equal to the file size of the initial model file.
[0135] Based on the second geometric structure data, a target model file corresponding to each planning accuracy is generated. A target model file containing the second geometric structure data calculated under each planning accuracy can be generated; or, the second geometric structure data calculated under each planning accuracy can be further processed by data screening, compression, integration, etc. to generate the target model file, thereby realizing compression processing of the model file.
[0136] In an embodiment of the present application, multiple planning accuracies are given, and the geometric structure data in the three-dimensional model is parsed based on the model file. Then, according to different planning accuracies, the geometric structure simplification processing of the model is performed respectively, and a target model file corresponding to each planning accuracy is generated to achieve file compression conversion under different accuracies. The compressed volume of the final model file generated by the conversion is no longer limited to the volume of the original model file with a fixed compression ratio, so that the model file can be compressed and converted to meet the application needs of more digital twin application scenarios with a multi-precision compression design.
[0137] Based on the above embodiments, further, in some embodiments, combined with Figure 2 As shown, step 102 performs geometric structure simplification processing based on the first geometric structure data according to multiple planning accuracies to obtain second geometric structure data, including:
[0138] Step 201 : Based on the first geometric structure data, multiple vertex pairs are selected, and the shrinkage cost corresponding to each vertex pair is calculated.
[0139] The geometric structure of the model contains many vertices. When simplifying the geometric structure, different vertices can be formed into vertex pairs, and combined with the corresponding contraction costs of the vertex pairs, vertex pairs suitable for contraction processing are selected from these vertex pairs as contraction vertex pairs, so as to perform vertex contraction processing of the geometric structure based on these contraction vertex pairs and realize simplification of the geometric structure.
[0140] When selecting vertex pairs, vertex matching can be performed based on factors such as the relative distance between vertices and whether the vertices share common edges to form vertex pairs. Specifically, two vertices that do not share common edges but have a relative distance less than a distance threshold can be selected to form a vertex pair, or two vertices that share common edges can be directly selected to form a vertex pair.
[0141] When calculating the shrinkage cost based on the vertex pair, a quadratic error matrix may be introduced at each vertex. Based on the quadratic error matrix, the shrinkage cost of shrinking the vertex pair to the target vertex is calculated.
[0142] Specifically, for a shrinking process that shrinks a vertex pair to a target vertex, the target vertex can be any vertex in the vertex pair or the midpoint of the two vertices. The choice depends on which point has the smallest quadratic error matrix. An optional method is to find the partial derivative of the quadratic error matrix corresponding to any vertex in the vertex pair or the midpoint of the two vertices and select the minimum value therefrom. When the target vertex is the midpoint of the two vertices, the quadratic error matrix of the midpoint is the average of the quadratic error matrices of the two vertices.
[0143] Step 202: Determine a contraction vertex pair from a plurality of vertex pairs based on the contraction cost.
[0144] After the shrinkage cost of each vertex pair is determined, a target vertex pair may be selected as a shrinkage vertex pair based on the size of the shrinkage cost.
[0145] Specifically, when selecting a shrinking vertex pair based on the shrinking cost, each time the shrinking cost is calculated, a vertex pair with the maximum, minimum or middle shrinking cost is selected from multiple vertex pairs as the shrinking vertex pair.
[0146] Alternatively, based on the calculated shrinkage cost, simplification planning is performed in combination with the simplification processing time and the number of simplification processing loop iterations that may be included in the model simplification control parameters to determine the shrinkage cost required in the current simplification processing process. Based on the shrinkage cost required and the shrinkage cost corresponding to each vertex pair calculated in the previous steps, a vertex pair that can ensure that the shrinkage cost error is within an acceptable range is selected from multiple vertex pairs as a shrinkage vertex pair.
[0147] Step 203 , according to the target planning accuracy, a geometric structure simplification process is performed based on the contraction of the vertex pairs to obtain second geometric structure data.
[0148] The target planning accuracy is one of the multiple planning accuracy. In the process of performing geometric structure simplification processing according to the multiple planning accuracy, each time a planning accuracy is executed, the planning accuracy is formed as the target planning accuracy, and the geometric structure simplification processing based on the contraction vertex pair is performed once to obtain the second geometric structure data.
[0149] According to the target planning accuracy, vertex shrinkage processing can be performed based on the shrinkage vertex pairs, and the two vertices in the shrinkage vertex pair can be shrunk into the aforementioned target vertex, so that the geometric structure can be simplified. Based on the simplified geometric structure, its corresponding second geometric structure data can be determined.
[0150] Correspondingly, the second geometric structure data obtained after the simplification process includes the vertex data after the contraction process, and the edge data and facet data that have been changed due to the contraction of the vertex.
[0151] In this process, the contraction cost of vertex pairs in the geometric structure is introduced to select appropriate vertex pairs as contraction vertex pairs, and then the geometric structure simplification processing is carried out in an orderly manner according to the planning accuracy to ensure the rationality and effectiveness of the geometric simplification operation.
[0152] Among them, when performing geometric structure simplification processing based on shrinking vertex pairs according to the target planning accuracy, a suitable number of shrinking vertex pairs can be selected according to the model simplification degree corresponding to the target planning accuracy to perform vertex shrinkage processing to achieve geometric structure simplification.
[0153] Alternatively, an iterative process of structural simplification may be introduced, during which an appropriate number of shrinking vertex pairs are selected each time to perform vertex shrinkage processing, and the geometric structure data obtained after each geometric structure simplification is judged to be up to standard, and the process is repeated until it is determined to be up to standard.
[0154] Correspondingly, in some implementations, step 203 performs geometric structure simplification processing based on the contraction vertex pairs according to the target planning accuracy to obtain the second geometric structure data, including:
[0155] Performing geometric structure simplification processing based on the contracted vertex pairs to obtain simplified geometric structure data;
[0156] If the simplified geometric structure data does not meet the target planning accuracy, the first geometric structure data is updated to the simplified geometric structure data;
[0157] Return to step 201 to select multiple vertex pairs based on the first geometric structure data, calculate the shrinkage cost corresponding to each vertex pair, until the simplified geometric structure data meets the target planning accuracy, and determine the simplified geometric structure data as the second geometric structure data.
[0158] Under the current target planning accuracy, each time a round of geometric structure simplification processing operation is performed, it is necessary to determine whether the simplified geometric structure data has met the standard in combination with the target planning accuracy.
[0159] Afterwards, if it is determined that the simplified geometric structure data does not meet the target planning accuracy, then based on the simplified geometric structure data obtained by the current round of geometric structure simplification processing operation, the next round of geometric structure simplification processing operation in the iterative processing process is continuously executed, that is, returning to execute step 201 based on the first geometric structure data, selecting multiple vertex pairs, and calculating the shrinkage cost corresponding to each vertex pair, and continuously executing step 202 until it is determined in step 203 that the simplified geometric structure data meets the current target planning accuracy. At this time, the simplified iterative processing process is stopped, otherwise it is necessary to repeat the simplified iterative processing flow until the geometric structure simplification meets the standard, that is, it is determined that the simplified geometric structure data meets the target planning accuracy.
[0160] Among them, to judge whether the simplified geometric structure data meets the target planning accuracy, the iterative processing data such as the number and duration of the geometric structure simplification processing that has been executed can be recorded, and the simplification degree of the model geometric structure can be judged in combination with the iterative processing data in the geometric structure simplification iterative processing flow to determine whether the generated simplified geometric structure data meets the target planning accuracy.
[0161] Alternatively, the degree of simplification of the model's geometric structure is determined directly based on the data content contained in the simplified geometric structure data, such as the number of geometric elements in the simplified geometry, the volume of the geometric space, and other information, and then it is determined whether the generated simplified geometric structure data meets the target planning accuracy.
[0162] This process introduces an iterative process of geometric structure simplification for the current target planning accuracy, ensuring the simplified compression effect of the geometric structure data corresponding to the simplified model under each planning accuracy.
[0163] Wherein, in some implementations, the file conversion method further includes:
[0164] A set of model simplified control parameters corresponding to each planning accuracy is determined.
[0165] In the case where the geometric structure simplification process satisfies the target model simplification control parameters, it is determined that the simplified geometric structure data satisfies the target planning accuracy corresponding to the target model simplification control parameters.
[0166] The model simplification control parameters are processing control parameters in the model simplification process.
[0167] The model simplification control parameters are used to control the process of simplification of the geometric structure of the model. More specifically, the model simplification control parameters are used to control the process of iterative processing of geometric structure simplification.
[0168] Multiple planning precisions can form a precision planning array, and each planning precision included in the precision planning array corresponds to a set of model simplified control parameters.
[0169] The precision planning array is, for example, [100%, 80%, 60%, 40%, 20%], where 100%, 80%, 60%, 40%, and 20% are the planning precisions contained in the array respectively.
[0170] A set of model simplification control parameters may include one or more model simplification control parameters.
[0171] Model simplification control parameters include, for example, the number of iterations of the simplification process loop of the geometric structure, the duration of the simplification process, and other control parameters.
[0172] When determining a set of model simplification control parameters corresponding to each planning accuracy, the target degree of model simplification required to meet the planning accuracy can be determined based on each planning accuracy. The target degree of model simplification can be decomposed into simplification tasks and allocated to the model's geometric structure simplification processing process to generate corresponding model simplification control parameters such as simplification processing time, simplification processing loop iteration number, etc.
[0173] Here, when determining whether the simplified geometric structure data meets the target planning accuracy, a judgment is made based on the geometric structure simplification iterative processing process. If the geometric structure simplification processing meets the model simplification control parameters set corresponding to the target planning accuracy during the simplification iterative processing, then the corresponding simplified geometric structure data generated is considered to meet the target planning accuracy.
[0174] During the implementation process, based on a set of model simplification control parameters corresponding to the current planning accuracy, it can be determined whether the current cumulative duration of the geometric structure simplification process has reached the set duration. If not, it is determined that the standard is not met, otherwise it is determined that the standard is met. Alternatively, based on a set of model simplification control parameters corresponding to the current planning accuracy, it can be determined whether the cumulative number of simplification process iterations of the geometric structure simplification process has reached the set number. If not, it is determined that the standard is not met, otherwise it is determined that the standard is met.
[0175] In this process, the model simplification control parameters corresponding to the target planning accuracy are used as the criterion for judging whether the geometric structure simplification processing has met the standards. The judgment is made from the geometric structure simplification processing process to ensure that the simplified geometric structure data meets the target planning accuracy and ensure the accuracy and rationality of the geometric structure simplification processing.
[0176] In some implementations, determining a set of model simplification control parameters corresponding to each planning accuracy includes:
[0177] For each planning accuracy, a set of model simplification control parameters corresponding to each planning accuracy is determined based on the model simplification target value indicated by the planning accuracy; wherein the model simplification target value includes the model simplification ratio value, the number of geometric elements in the simplified model, or the file volume value corresponding to the simplified model.
[0178] When determining a set of model simplification control parameters corresponding to each planning accuracy, these model simplification target values can be decomposed into simplification tasks based on the model simplification ratio value required for each planning accuracy, the number of geometric elements in the simplified model, or the file volume value corresponding to the simplified model. These values are then allocated to the model's geometric structure simplification process, generating corresponding model simplification control parameters such as simplification processing time, simplification processing loop iteration number, etc.
[0179] The above implementation method is described by way of example by taking the model simplification target value indicated by planning accuracy as the model simplification ratio value, the geometric structure simplification processing as the model surface shrinkage processing, and the model simplification control parameter as the number of simplification processing loop iterations.
[0180] Among them, when the model simplification target value indicated by the planning accuracy includes a model simplification ratio value, it is necessary to determine a set of model simplification control parameters required for the model to reach the simplification ratio based on the ratio value, implement the model simplification shrinkage iterative processing according to the model simplification control parameters, and shrink the model's geometric structure by a corresponding ratio on the basis of the analyzed geometric structure data.
[0181] Taking the model simplification ratio value corresponding to the planning accuracy of 80% as an example, it is necessary to determine the shrinkage points based on the geometric structure data, and determine the number of model surface simplification shrinkage iterations required to achieve a planning accuracy of 80%. After the model surface shrinkage iterative processing is performed based on these shrinkage points, the model accuracy after processing is reduced by 20% compared with the model accuracy before processing, which facilitates the effective determination of the model simplification control parameters.
[0182] Furthermore, when the model is simplified in geometric structure according to the model simplification ratio value indicated by the planning accuracy, the number of geometric elements in the simplified model is reduced, and the file volume value corresponding to the simplified model is also reduced.
[0183] Taking the accuracy planning array of [100%, 80%, 60%, 40%, 20%] as an example, the model simplification ratio values indicated by different planning accuracy in the array represent the conversion ratio of model simplification compression, which are 100%, 80%, 60%, 40%, and 20% respectively.
[0184] The following table is a data comparison table of the number of faces, number of vertices, and final compressed and converted export file size in the geometric structure data under different conversion ratios.
[0185]
[0186]
[0187] Refer to this table, combined with Figure 3 As shown in 3a-3e, in one example, when the conversion ratio is 100%, there is no simplified compression processing in the model file, and the size of the exported file is the same as that of the initial model file, which is 235kb. The number of faces in the geometric structure data obtained by parsing the 3D model in the initial model file is the same as that in the exported file, which is 2502, and the number of vertices is the same as that in the exported file, which is 7524. There is no contraction in the geometric structure of the model. The model effects in the files before and after the conversion are as follows: Figure 3 As shown in 3a.
[0188] In one example, when the conversion ratio is 80%, the size of the converted file changes from that before the conversion. In this process, after the model is simplified according to the target ratio of 80%, the number of faces in the geometric structure data is reduced to 1504, and the number of vertices is reduced to 6018. The size of the final compressed and converted exported file is 190kb. The model effects in the files before and after the conversion are as follows: Figure 3 As shown in 3b.
[0189] In one example, when the conversion ratio is 60%, the size of the converted file changes from that before and after the conversion. In this process, after the model is simplified according to the target ratio of 60%, the number of faces in the geometric structure data is reduced to 2006, and the number of vertices is reduced to 4512. The size of the final compressed and converted exported file is 143kb. The model effects in the files before and after the conversion are as follows: Figure 3 As shown in 3c.
[0190] In one example, when the conversion ratio is 40%, the size of the converted file changes from that before the conversion. In this process, after the model is simplified according to the target ratio of 40%, the number of faces in the geometric structure data is reduced to 1002, and the number of vertices is reduced to 3006. The size of the final compressed and converted exported file is 96kb. The model effects in the files before and after the conversion are as follows: Figure 3 As shown in 3D.
[0191] In one example, when the conversion ratio is 20%, the size of the converted file changes from that before and after the conversion. In this process, the model is simplified according to the target ratio of 40%, the number of faces in the geometric structure data is reduced to 500, and the number of vertices is reduced to 1500. The size of the final compressed and converted exported file is 49kb. The model effects in the files before and after the conversion are as follows: Figure 3 As shown in 3e.
[0192] In the above implementation process, each planning accuracy is associated with the model simplification ratio value, the number of geometric elements in the simplified model or the file volume value corresponding to the simplified model, and the corresponding model simplification control parameters are determined with the help of the associated model simplification ratio value, the number of geometric elements in the simplified model or the file volume value corresponding to the simplified model, so as to facilitate the effective and reasonable determination of the model simplification control parameters.
[0193] In some embodiments, in combination Figure 4 As shown, step 101 parses the three-dimensional model in the initial model file to obtain first geometric structure data, including:
[0194] Step 401 , based on the mesh model, geometrically decompose the three-dimensional model in the initial model file to obtain vertex data and facet data.
[0195] Here, when geometrically decomposing the three-dimensional model in the initial model file, its geometric elements may be decomposed based on the model features corresponding to the mesh model.
[0196] A mesh model is a surface model composed of a large number of triangles or polygonal meshes. It represents the shape and surface details of an object by defining vertices, edges, and faces.
[0197] In the process of geometrically decomposing the three-dimensional model in the initial model file based on the mesh model and obtaining vertex data and facet data, it is specifically necessary to geometrically decompose the three-dimensional model in the initial model file, extract its surface features, and obtain the corresponding vertex data and facet data.
[0198] The patch data specifically refers to the description data of the surface triangles or polygonal patches disassembled from the three-dimensional model.
[0199] The patch data includes, for example, patch index data, relative position spatial distribution data of patches, and the like.
[0200] The vertex data is specifically the description data of the vertex data disassembled from the three-dimensional model, such as vertex index data, spatial position coordinate data of the vertex, etc.
[0201] In one example, during the compression conversion process of the initial model file, the 3D model in the initial model file needs to be used as a compression and simplification processing object for geometric decomposition, and the internal structure of the 3D model is removed during the decomposition to retain its surface structural features. Optionally, the 3D model in the initial model file is a solid model.
[0202] When geometrically decomposing the three-dimensional model in the initial model file, the model vertices and model lines in the three-dimensional model can be extracted to identify the surface structural features of the three-dimensional model, and on this basis, the geometric vertices required to form the mesh model and the patch features corresponding to the geometric vertices are obtained.
[0203] Step 402, obtaining first geometric structure data based on vertex data and facet data.
[0204] Here, the geometric body structure data finally obtained is the surface structure data of the geometric body corresponding to the three-dimensional model.
[0205] In this process, the surface structure of the three-dimensional model is disassembled to obtain the vertex data and facet data corresponding to the three-dimensional model in the original model file based on the mesh model, and the surface structure data of the geometric body corresponding to the three-dimensional model is obtained, so as to implement model compression processing based on the surface structure data of the geometric body, expand the model compression space, and reduce the compression space limit of the model file imposed by the volume of the original model file.
[0206] In some embodiments, step 402 obtains first geometric structure data based on vertex data and facet data, including:
[0207] Based on the vertex data and the patch data, determining a first mapping relationship between each patch, required vertices of each patch, and associated patches of each patch;
[0208] The first geometric structure data including vertex data, patch data and a first mapping relationship is obtained.
[0209] The associated facet of a facet is a facet that has a special spatial position relationship with the facet. The special spatial position relationship is, for example, a co-edge relationship, that is, two facets are adjacent facets and have an adjacent position relationship; or a special spatial position relationship is, for example, a parallel relationship, that is, two facets are opposite facets and have a relative position relationship, etc.
[0210] After obtaining the vertex data and the patch data, the mapping relationship between patches and vertices, and between patches and patches can be constructed based on the association relationship between vertices and patches, and finally the geometric structure data including the vertex data, patch data and the mapping relationship can be obtained.
[0211] This process, based on the surface structural feature information of the geometric body obtained by disassembly, further obtains the connection relationship between the surface feature information to ensure the content completeness of the obtained geometric structure data, so as to carry out effective file compression and conversion processing based on this.
[0212] Corresponding to the above process, in some embodiments, step 103 generates a target model file corresponding to each planning accuracy based on the second geometric structure data, including:
[0213] Based on the second geometric structure data, a mesh model file corresponding to each planning accuracy is generated.
[0214] In one case, corresponding to the first geometric structure data obtained in the aforementioned manner, when the first geometric structure data contains vertex data and patch data, the second geometric structure data obtained after performing geometric structure simplification processing based on the first geometric structure data according to multiple planning accuracies includes vertex data and patch data after the geometric structure simplification processing.
[0215] In another case, corresponding to the first geometric structure data obtained in the aforementioned manner, on the premise that the first geometric structure data includes vertex data, patch data and the mapping relationship between each patch, the required vertices of each patch and the associated patches of each patch, the second geometric structure data obtained after performing geometric structure simplification processing based on the first geometric structure data according to multiple planning precisons includes the vertex data, patch data and the mapping relationship between each patch, the required vertices of each patch and the associated patches of each patch after the geometric structure simplification processing.
[0216] Ensure the completeness of the content of the geometric structure data obtained after simplification processing, and ensure the model effect in the file after compression processing.
[0217] Among them, the target model file finally generated is a mesh model file, and the three-dimensional model in the mesh model file is a mesh model.
[0218] The adoption of this file format reserves a large compression space for file compression conversion processing.
[0219] The mesh model retains the surface structural features of the three-dimensional model in the original model file, so that visual rendering operations can be implemented directly based on the mesh model in the mesh model file, and effective and convenient model application implementation can be carried out.
[0220] In this process, the geometric structure data obtained after the final simplification and shrinkage processing is converted into a file corresponding to the mesh model structure, which reserves a large compression space for file compression and conversion processing, and enables effective and convenient model application implementation.
[0221] In some scenarios, complex 3D models are required, and the model files corresponding to these 3D models are usually too large. In order to reduce the performance loss caused by compression calculations during file conversion and ensure that the converted files have better volume optimization effects, some optimization preprocessing methods are proposed in the embodiments of this application before model simplification.
[0222] On the one hand, in some embodiments, in combination Figure 5As shown, step 102 performs geometric structure simplification processing based on the first geometric structure data according to multiple planning accuracies respectively, and before obtaining the second geometric structure data, it also includes:
[0223] Step 501: Generate a hash value based on each vertex data.
[0224] Step 502: Determine repeated first target vertex data from the vertex data based on the hash value.
[0225] Here, when determining repeated target vertex data from vertex data based on hash values, each vertex data can be mapped to a corresponding position on the hash ring based on the hash value. If at least two vertex data are mapped to the same position on the hash ring, it is determined that the vertices corresponding to the two vertex data overlap.
[0226] Step 503: remove duplicate first target vertex data from the vertex data to obtain updated first geometric structure data.
[0227] At this time, it is necessary to deduplicate the overlapping vertices. Specifically, one vertex data is selected from at least two vertex data with the same hash value to be retained, and other redundant duplicate vertex data is removed.
[0228] In this way, by eliminating the vertex data corresponding to the overlapping vertices, the performance loss caused by the model shrinkage calculation is reduced, ensuring that the converted file has a better volume optimization effect.
[0229] On the other hand, in some embodiments, in combination Figure 6 As shown, step 102 performs geometric structure simplification processing based on the first geometric structure data according to multiple planning accuracies respectively, and before obtaining the second geometric structure data, it also includes:
[0230] Step 601 , based on vertex data and face patch data, screen out vertices that have no subordinate relationship with the face patch, and determine second target vertex data corresponding to the vertex.
[0231] Step 602: remove the second target vertex data from the vertex data to obtain updated first geometric structure data.
[0232] When filtering out vertices that have no subordinate relationship with a facet based on vertex data and facet data, it can be to filter out vertices that have no subordinate relationship with a specific facet, such as a facet whose relative distance to the vertex is within a set range, or a facet whose number ratio in the total facets exceeds a threshold. Alternatively, vertices that have no subordinate relationship with any facet can be filtered out. Here, the filtered vertices that have no subordinate relationship with a facet will be confirmed as isolated vertices.
[0233] In one example, isolated vertices can be confirmed by identifying, for any vertex p(x, y, z), based on the mapping relationship between each facet and the required vertex, vertices that do not have the mapping relationship with any facet are isolated vertices.
[0234] In this way, the vertex data corresponding to isolated vertices are eliminated, the performance loss caused by model shrinkage calculation is reduced, and the converted file is guaranteed to have a better volume optimization effect.
[0235] On the other hand, in some embodiments, in combination Figure 7 As shown, step 102 performs geometric structure simplification processing based on the first geometric structure data according to multiple planning accuracies respectively, and before obtaining the second geometric structure data, it also includes:
[0236] Step 701, determining third target vertex data corresponding to required vertices of each facet from vertex data.
[0237] Here, taking each face patch as a unit, the vertices corresponding to the face patch are determined, and vertex data corresponding to the vertices are obtained.
[0238] Step 702: construct edge vectors of any two vertices among the required vertices of each face piece based on the third target vertex data.
[0239] The third target vertex data may be vertex space coordinate data or vertex index data.
[0240] The edge vector is constructed based on any two vertices on each patch. When constructing, any two vertices p1 and p2 in each patch can be marked as vector v(p1, p2), i.e., edge vector, according to the vertex drawing order in the patch.
[0241] Step 703, when there are a first edge vector and a second edge vector whose cross product results are zero in the edge vector, determine the fourth target vertex data of the two vertices corresponding to the first edge vector and the fifth target vertex data of the two vertices corresponding to the second edge vector from the third target vertex data.
[0242] In this step, it is necessary to determine whether there are overlapping edges based on whether the cross product result between the edge vectors is zero. When it is determined that there are two edge vectors whose cross product results are zero, it is necessary to determine the vertex data of the two vertices corresponding to the two edge vectors respectively.
[0243] Step 704: remove the fourth target vertex data or the fifth target vertex data from the vertex data to obtain updated first geometric structure data.
[0244] The fourth target vertex data includes the first vertex data and the second vertex data, and the vertex corresponding to the first vertex data and the vertex corresponding to the second vertex data are distributed in sequence along the vector direction of the first edge vector. The fifth target vertex data includes the third vertex data and the fourth vertex data, and the vertex corresponding to the third vertex data and the vertex corresponding to the fourth vertex data are distributed in sequence along the vector direction of the second edge vector.
[0245] Determine the vertex data corresponding to the first vertex data in the fourth target vertex data (i.e. the third vertex data mentioned above) from the fifth target vertex data, and determine the vertex data corresponding to the second vertex data in the fourth target vertex data (i.e. the fourth vertex data mentioned above) from the fifth target vertex data.
[0246] Directly select any one set of vertex data from the fourth target vertex data and the fifth target vertex data for elimination, and deduplicate the overlapping edges by deduplicating the vertex data.
[0247] In this way, the vertex data corresponding to the overlapping edges are eliminated, reducing the performance loss caused by the model shrinkage calculation, and ensuring that the converted file has a better volume optimization effect.
[0248] After generating the target model file, in order to ensure the reliability of the model conversion results, visual rendering can be used to verify the compression conversion effect of the model file.
[0249] Correspondingly, in some embodiments, after step 103 generates a target model file corresponding to each planning accuracy based on the second geometric structure data, it further includes:
[0250] Parse the target model file to obtain second geometric structure data; perform model visualization rendering based on the second geometric structure data; and confirm that the target model file is valid when the processing effect of the model visualization rendering meets the set indicators.
[0251] The set indicators include, for example, model clarity, model structure integrity and other indicator data.
[0252] The model is visualized and rendered based on the second geometric structure data. Specifically, based on the vertex data, facet data and the mapping relationship data between vertices and faces in the geometric structure data, graphic rendering space positioning can be implemented. Facet rendering processing such as filling color in the facets can be performed based on the facet data to achieve visualization rendering of the model.
[0253] Here, visual rendering is used to achieve visual verification of the compression conversion effect of the model file.
[0254] In some embodiments, after generating a target model file corresponding to each planning accuracy based on the second geometric structure data in step 103, the method further includes:
[0255] The target model file is compressed, and the compressed file is updated as the target model file.
[0256] Here, in order to further adjust the file size after compression conversion, a secondary compression process may be performed on the file, wherein the target model file is used as a processing object, and the final file of the secondary compression process is updated as the target model file.
[0257] Optionally, the secondary compression may be implemented using the Draco compression algorithm.
[0258] In this process, the target model file after compression conversion is compressed twice to further adjust the size of the generated model file, increase the file compression processing space, and improve the rate of file transmission and subsequent file decompression and rendering.
[0259] To overcome the problem that the generated compressed files cannot be applied to different application scenarios and lack application flexibility.
[0260] The present application also proposes an application processing method that can implement model visualization rendering based on multiple target model files with different planning accuracies.
[0261] According to actual application needs, this method can select target parsing data of corresponding planning accuracy from the parsing data corresponding to multiple target model files, and use this to implement model visualization rendering operations, which has application flexibility in different scenarios.
[0262] In order to illustrate the technical solution described in this application, a specific embodiment is provided below for illustration.
[0263] Combination Figure 8 As shown, in some embodiments, a model visualization rendering method is proposed, comprising:
[0264] Step 801, obtaining multiple target model files, each target model file corresponds to a different planning accuracy.
[0265] Optionally, the multiple target model files are files generated based on the file conversion method provided in the above embodiment. Alternatively, the multiple target model files are pre-built files existing in a file library.
[0266] The multiple target model files may be stored in a local server or a cloud server.
[0267] The size of planning accuracy is positively correlated with the size of the model accuracy corresponding to the target model file. Planning accuracy includes but is not limited to a specific target accuracy value or an accuracy simplification ratio value.
[0268] The planning accuracies corresponding to the multiple target model files are, for example, 100%, 80%, 60%, 40%, and 20%.
[0269] The target model file is a file to be rendered and includes a mesh model, and the target model file is, for example, a mesh model file having a mesh model drawn therein.
[0270] Step 802: parse each target model file respectively to obtain multiple sets of second geometric structure data.
[0271] The geometric structure data is the description data of the structural composition characteristics of the geometric body corresponding to the model. The geometric structure data is, for example, the relevant description data of the points, lines, and surfaces that constitute the geometric body in the grid model, and the description data is, for example, the index data of the points, lines, and surfaces, the relative position relationship data of the points, lines, and surfaces, the three-dimensional coordinate data of the points, lines, and surfaces, the spatial feature data of the points, lines, and surfaces, the drawing order data of the points, lines, and surfaces, and the mapping relationship data used to describe the dependency relationship between the points, lines, and surfaces.
[0272] Step 803 , in response to the operation instruction, selecting target geometric structure data corresponding to the target planning accuracy from the multiple sets of second geometric structure data.
[0273] The operation instruction may be triggered by a user inputting a desired precision for model visualization rendering, or by a user sliding and zooming a desired precision for model visualization rendering.
[0274] By triggering the operation instructions, the matching selection of multiple planning accuracies is realized.
[0275] Step 804: Perform model visualization rendering based on the target geometric structure data.
[0276] The target geometry structure data corresponds to the planning accuracy adapted to the current application scenario, ensuring the presentation effect of the model visualization rendering.
[0277] The above process obtains multiple target model files under different planning accuracies at one time, and based on application requirements, selects a set of geometric structure data under a suitable planning accuracy from multiple sets of geometric structure data corresponding to the target model files, so as to meet the model rendering application requirements in more application scenarios with different planning accuracies.
[0278] In the case where the aforementioned multiple target model files are files generated based on the file conversion method provided in the aforementioned embodiments, in some embodiments, the second geometric structure data is obtained by performing geometric structure simplification processing based on the first geometric structure data according to each set of model simplification control parameters.
[0279] The first geometric structure data is obtained by parsing the three-dimensional model in the initial model file; the model simplification control parameters are determined based on the precision planning array; the precision planning array contains multiple planning precisions, and each planning precision corresponds to a set of model simplification control parameters.
[0280] In this case, a method is provided to convert and generate multiple target model files, realizing file compression conversion under different precisions. The compression volume of the final model file generated by the conversion is no longer limited by the volume of the original model file with a fixed compression ratio, so that the model file can be compressed and converted with multi-precision design to meet the application requirements of more digital twin application scenarios.
[0281] The generation process of multiple target model files can refer to the various implementation processes of the file conversion method provided in the aforementioned embodiments, which will not be repeated here.
[0282] In some embodiments, different planning accuracies correspond to corresponding observation distances.
[0283] Correspondingly, step 803 selects target geometric structure data corresponding to the target planning accuracy from the multiple sets of second geometric structure data in response to the operation instruction, including:
[0284] In response to the operation instruction, determine the target observation distance adapted to the operation instruction; determine the planning accuracy matching the target observation distance as the target planning accuracy; select the geometric structure data corresponding to the target planning accuracy from multiple groups of second geometric structure data as the target geometric structure data.
[0285] Observation distance refers to the viewing distance corresponding to the model visualization display from the user's perspective.
[0286] There is a negative correlation between the viewing distance and the model accuracy required for model visualization rendering. The closer the viewing distance, the greater the accuracy required for model display.
[0287] Optionally, the operation instruction is, for example, a model scaling operation instruction.
[0288] The above process, through operation instructions, allocates geometric structure data under appropriate planning accuracy, ensures the selection and adjustment of different model accuracies in model visualization rendering processing, and meets the model rendering application requirements in more application scenarios by allocating geometric structure data under different planning accuracies.
[0289] Below, based on the above-mentioned implementation processes, the processing flow of the file conversion method and the model visualization rendering processing flow of the model visualization rendering method are exemplarily described.
[0290] In digital twin application scenarios, in order to meet the local 3D graphics rendering requirements of different terminals, it is necessary to first generate a mesh model file that can directly perform 3D model visualization rendering in the digital twin application scenario.
[0291] The 3D model can be compressed and converted based on the CAD file obtained by 3D modeling. First, the OCCT algorithm is introduced in the terminal and the algorithm environment is initialized.
[0292] The CAD file stored in a local or cloud server is read, and based on the OCCT algorithm, the CAD file is converted and split into geometric vertex data and facet data required for the Mesh model.
[0293] Based on the hash values of different vertex data, duplicate vertices are identified and removed.
[0294] Traverse each patch data, obtain the required vertices and associated faces of the patch, and establish a mapping relationship between each patch and the required vertices and associated faces.
[0295] Based on this mapping relationship, all vertices are traversed, and the mapping relationship between any vertex p(x, y, z) and all facets is obtained. The vertices that have no mapping information with any facet are determined and regarded as isolated vertices for elimination.
[0296] Based on the vertex drawing order in each face patch, any two vertices are marked as vectors v(p1, p2), and the vertices corresponding to the vectors whose cross product result of vectors v1 and v2 is 0 are deduplicated and culled.
[0297] After the above vertex culling process, the remaining geometric vertex data and face data are left, and the following processing flow continues.
[0298] The output model accuracy is planned based on the LOD (Levels of Detail) concept, and the accuracy planning is [100%, 80%, 60%, 40%, 20%]. File compression processing is implemented based on the planned compression accuracy.
[0299] Based on the remaining geometric vertex data and patch data, under each of the above planning accuracy, the quadratic error matrix is used to perform iterative processing of model surface simplification and shrinkage, and the final iterative result is converted into a Mesh model file under a planning accuracy.
[0300] In addition, the Mesh model structure in the Mesh model file can be visually verified. You can create a browser-based project running environment locally, initialize the 3D scene based on the corresponding rendering protocol, and parse the Mesh model file data obtained in the above steps into geometric mesh data (i.e. geometric vertex data and facet data) for visual rendering verification.
[0301] You can also initialize the Draco compression algorithm interface, and based on the verified Mesh model file, compress the Mesh model file using the Draco compression algorithm to obtain the final Mesh model file.
[0302] When the user needs to graphically render the 3D model locally on the terminal in a digital twin application scenario, the user can export the final Mesh model file corresponding to different planning accuracies generated in the aforementioned process and download it to the user terminal.
[0303] It is loaded and parsed in the user terminal to obtain multiple groups of geometric structure data, and each group of geometric structure data can produce a model rendering effect with a certain precision.
[0304] Therefore, in the model visualization rendering operation, the user can touch the mouse and slide the mouse wheel. Based on the scrolling operation of the mouse wheel, the terminal determines the user's adjustment of the observation distance of the model, adapts the geometric structure data of appropriate accuracy, and implements model visualization rendering. It implements model visualization rendering with appropriate model accuracy at different observation distances to provide users with satisfactory visualization viewing effects.
[0305] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0306] Based on the same inventive concept, the embodiment of the present application also provides a file conversion device. The file conversion device provided in the embodiment of the present application can implement each process of the embodiment of the above-mentioned file conversion method and can achieve the same technical effect. Therefore, the specific limitations in one or more file conversion device embodiments provided below can refer to the limitations of the file conversion method above. To avoid repetition, they will not be repeated here.
[0307] In one embodiment, Fig. 9 As shown, a file conversion device 9 is provided, comprising:
[0308] The model parsing module 901 is used to parse the three-dimensional model in the initial model file to obtain first geometric structure data;
[0309] A model simplification module 902 is used to perform geometric structure simplification processing according to multiple planning accuracies based on the first geometric structure data to obtain second geometric structure data;
[0310] The file generating module 903 is used to generate a target model file corresponding to each of the planning accuracies based on the second geometric structure data.
[0311] Optionally, the model simplification module 902 is specifically used to:
[0312] Based on the first geometric structure data, select a plurality of vertex pairs, and calculate the shrinkage cost corresponding to each of the vertex pairs;
[0313] Based on the shrinkage cost, determining a shrinkage vertex pair from the plurality of vertex pairs;
[0314] According to the target planning accuracy, a geometric structure simplification process is performed based on the contracted vertex pairs to obtain the second geometric structure data.
[0315] Optionally, the model simplification module 902 is more specifically configured to:
[0316] Performing geometric structure simplification processing based on the contracted vertex pairs to obtain simplified geometric structure data;
[0317] If the simplified geometric structure data does not meet the target planning accuracy, updating the first geometric structure data to the simplified geometric structure data;
[0318] Return to execute the step of selecting multiple vertex pairs based on the first geometric structure data, and calculating the shrinkage cost corresponding to each vertex pair, until the simplified geometric structure data meets the target planning accuracy, and determine the simplified geometric structure data as the second geometric structure data.
[0319] Optionally, the file conversion device also includes:
[0320] A determination module, used for determining a set of model simplified control parameters corresponding to each of the planning accuracies;
[0321] In the case where the geometric structure simplification process satisfies the target model simplification control parameter, it is determined that the simplified geometric structure data satisfies the target planning accuracy corresponding to the target model simplification control parameter.
[0322] Optionally, the determination module is specifically configured to:
[0323] For each of the planning precisions, determining a set of model simplification control parameters corresponding to each of the planning precisions based on a model simplification target value indicated by the planning precision;
[0324] The model simplification target value includes a model simplification ratio value, a number value of geometric elements in the simplified model, or a file volume value corresponding to the simplified model.
[0325] Optionally, the model parsing module 901 is specifically used for:
[0326] Based on the mesh model, geometrically disassemble the three-dimensional model in the initial model file to obtain vertex data and facet data;
[0327] The first geometric structure data is obtained based on the vertex data and the patch data.
[0328] Optionally, the model parsing module 901 is more specifically used for:
[0329] Based on the vertex data and the patch data, determining a first mapping relationship between each patch, a required vertex of each patch, and an associated patch of each patch;
[0330] The first geometric structure data including the vertex data, the patch data and the first mapping relationship is obtained.
[0331] Optionally, the file generation module 903 is specifically used to:
[0332] Based on the second geometric structure data, a mesh model file corresponding to each of the planning accuracies is generated.
[0333] Optionally, the file conversion device also includes:
[0334] The first rejection module is used to:
[0335] Generate a hash value based on each of the vertex data;
[0336] Based on the hash value, determining repeated first target vertex data from the vertex data;
[0337] The repeated first target vertex data is deduplicated from the vertex data to obtain updated first geometric structure data.
[0338] Optionally, the file conversion device also includes:
[0339] The second rejection module is used to:
[0340] Based on the vertex data and the patch data, vertices that have no subordinate relationship with the patch are screened out, and second target vertex data corresponding to the vertex is determined;
[0341] The patch removes the second target vertex data from the vertex data to obtain updated first geometric structure data.
[0342] Optionally, the file conversion device also includes:
[0343] The third rejection module is used to:
[0344] Determine third target vertex data corresponding to the required vertex of each face piece from the vertex data;
[0345] Based on the third target vertex data, construct an edge vector of any two vertices among the required vertices of each of the face pieces;
[0346] In the case where there are a first edge vector and a second edge vector whose cross product result is zero in the edge vector, determining fourth target vertex data of two vertices corresponding to the first edge vector and fifth target vertex data of two vertices corresponding to the second edge vector from the third target vertex data;
[0347] The fourth target vertex data or the fifth target vertex data is eliminated from the vertex data to obtain updated first geometric structure data.
[0348] Optionally, the file conversion device also includes:
[0349] Validity confirmation module, used to:
[0350] Parsing the target model file to obtain the second geometric structure data;
[0351] Performing model visualization rendering based on the second geometric structure data;
[0352] When the processing effect of the model visualization rendering meets the set indicators, it is confirmed that the target model file is valid.
[0353] Optionally, the file conversion device also includes:
[0354] The compression module is used to perform file compression processing on the target model file and update the file after the file compression processing to the target model file.
[0355] Based on the same inventive concept, the embodiment of the present application also provides a model visualization rendering device. The model visualization rendering device provided in the embodiment of the present application can implement each process of the embodiment of the above-mentioned model visualization rendering method, and can achieve the same technical effect. Therefore, the specific limitations in one or more embodiments of the model visualization rendering device provided below can refer to the limitations of the model visualization rendering method above. To avoid repetition, it will not be repeated here.
[0356] In one embodiment, Fig.10 As shown, a model visualization rendering device 10 is provided, comprising:
[0357] The file acquisition module 1001 is used to acquire multiple target model files, each of which corresponds to a different planning accuracy;
[0358] A file parsing module 1002, used to parse each of the target model files to obtain multiple sets of second geometric structure data;
[0359] A data selection module 1003 is used for selecting a target geometric structure number corresponding to a target planning accuracy from a plurality of sets of the second geometric structure data in response to an operation instruction;
[0360] The rendering module 1004 is used to perform model visualization rendering based on the target geometric structure data.
[0361] Optionally, different planning accuracies correspond to corresponding observation distances; the data selection module 1003 is specifically used to:
[0362] In response to the operation instruction, determining a target observation distance adapted to the operation instruction;
[0363] Determining a planning accuracy that matches the target observation distance as the target planning accuracy;
[0364] The geometric structure data corresponding to the target planning accuracy is selected from the plurality of groups of the second geometric structure data as the target geometric structure data.
[0365] Optionally, the second geometric structure data is obtained by performing geometric structure simplification processing based on the first geometric structure data according to each group of model simplification control parameters;
[0366] The first geometric structure data is obtained by parsing the three-dimensional model in the initial model file;
[0367] The model simplification control parameters are determined based on the precision planning array; the precision planning array includes multiple planning precisions, and each planning precision corresponds to a group of model simplification control parameters.
[0368] Each module in the above-mentioned file conversion device and model visualization rendering device can be implemented in whole or in part by software, hardware and their combination. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0369] In one embodiment, Fig.11 As shown, a computer device is provided. The computer device 11 of this embodiment includes: at least one processor 1100 ( Fig.11 Only one is shown), a memory 1101, and a computer program 1102 stored in the memory 1101 and executable on the at least one processor 1100, wherein the processor 1100 implements the steps of any of the above-mentioned method embodiments when executing the computer program 1102.
[0370] The computer device 11 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The computer device 11 may include, but is not limited to, a processor 1100 and a memory 1101. Those skilled in the art will appreciate that Fig.11 It is only an example of the computer device 11 and does not constitute a limitation of the computer device 11. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the computer device may also include input and output devices, network access devices, buses, etc.
[0371] The processor 1100 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
[0372] The memory 1101 may be an internal storage unit of the computer device 11, such as a hard disk or memory of the computer device 11. The memory 1101 may also be an external storage device of the computer device 11, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the computer device 11. Further, the memory 1101 may also include both an internal storage unit of the computer device 11 and an external storage device. The memory 1101 is used to store the computer program and other programs and data required by the computer device. The memory 1101 may also be used to temporarily store data that has been output or is to be output.
[0373] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0374] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0375] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0376] In the embodiments provided in the present application, it should be understood that the disclosed apparatus / computer equipment and methods can be implemented in other ways. For example, the apparatus / computer equipment embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of the apparatus or unit, which can be electrical, mechanical or other forms.
[0377] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0378] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0379] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0380] The present application implements all or part of the processes in the above-mentioned embodiment methods, and may also be implemented through a computer program product. When the computer program product runs on a computer device, the computer device can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0381] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A file conversion method, characterized in that: include: Parsing the three-dimensional model in the initial model file to obtain first geometric structure data; Based on the first geometric structure data, geometric structure simplification processing is performed respectively according to a plurality of planning accuracies to obtain second geometric structure data; Based on the second geometric structure data, a target model file corresponding to each of the planning accuracies is generated.
2. The method according to claim 1, characterized in that The step of performing geometric structure simplification processing based on the first geometric structure data according to a plurality of planning accuracies to obtain second geometric structure data includes: Based on the first geometric structure data, select a plurality of vertex pairs, and calculate the shrinkage cost corresponding to each of the vertex pairs; Based on the shrinkage cost, determining a shrinkage vertex pair from the plurality of vertex pairs; According to the target planning accuracy, a geometric structure simplification process is performed based on the contracted vertex pairs to obtain the second geometric structure data.
3. The method according to claim 2, characterized in that The step of performing geometric structure simplification processing based on the contracted vertex pairs in accordance with the target planning accuracy to obtain the second geometric structure data includes: Performing geometric structure simplification processing based on the contracted vertex pairs to obtain simplified geometric structure data; If the simplified geometric structure data does not meet the target planning accuracy, updating the first geometric structure data to the simplified geometric structure data; Return to execute the step of selecting multiple vertex pairs based on the first geometric structure data, and calculating the shrinkage cost corresponding to each vertex pair, until the simplified geometric structure data meets the target planning accuracy, and determine the simplified geometric structure data as the second geometric structure data.
4. The method according to claim 3, characterized in that Also includes: Determine a set of model simplified control parameters corresponding to each of the planning accuracies; In the case where the geometric structure simplification process satisfies the target model simplification control parameter, it is determined that the simplified geometric structure data satisfies the target planning accuracy corresponding to the target model simplification control parameter.
5. The method according to claim 4, characterized in that The step of determining a set of model simplified control parameters corresponding to each planning accuracy comprises: For each of the planning precisions, determining a set of model simplification control parameters corresponding to each of the planning precisions based on a model simplification target value indicated by the planning precision; The model simplification target value includes a model simplification ratio value, a number value of geometric elements in the simplified model, or a file volume value corresponding to the simplified model.
6. The method according to any one of claims 1 to 5, characterized in that: The step of parsing the three-dimensional model in the initial model file to obtain first geometric structure data includes: Based on the mesh model, geometrically disassemble the three-dimensional model in the initial model file to obtain vertex data and facet data; The first geometric structure data is obtained based on the vertex data and the patch data.
7. The method according to claim 6, characterized in that The obtaining of the first geometric structure data based on the vertex data and the patch data includes: Based on the vertex data and the patch data, determining a first mapping relationship between each patch, a required vertex of each patch, and an associated patch of each patch; The first geometric structure data including the vertex data, the patch data and the first mapping relationship is obtained.
8. The method according to claim 6, characterized in that The step of generating a target model file corresponding to each of the planning accuracies based on the second geometric structure data comprises: Based on the second geometric structure data, a mesh model file corresponding to each of the planning accuracies is generated.
9. The method according to claim 6, characterized in that Before the step of performing geometric structure simplification processing based on the first geometric structure data and obtaining the second geometric structure data according to a plurality of planning accuracies, the method further comprises: Generate a hash value based on each of the vertex data; Based on the hash value, determining repeated first target vertex data from the vertex data; The repeated first target vertex data is deduplicated from the vertex data to obtain updated first geometric structure data.
10. The method according to claim 6, characterized in that Before the step of performing geometric structure simplification processing based on the first geometric structure data and obtaining the second geometric structure data according to a plurality of planning accuracies, the method further comprises: Based on the vertex data and the patch data, vertices that have no subordinate relationship with the patch are screened out, and second target vertex data corresponding to the vertex is determined; The patch removes the second target vertex data from the vertex data to obtain updated first geometric structure data.
11. The method according to claim 6, characterized in that Before the step of performing geometric structure simplification processing based on the first geometric structure data and obtaining the second geometric structure data according to a plurality of planning accuracies, the method further comprises: Determine third target vertex data corresponding to the required vertex of each face piece from the vertex data; Based on the third target vertex data, construct an edge vector of any two vertices among the required vertices of each of the face pieces; In the case where there are a first edge vector and a second edge vector whose cross product result is zero in the edge vector, determining fourth target vertex data of two vertices corresponding to the first edge vector and fifth target vertex data of two vertices corresponding to the second edge vector from the third target vertex data; The fourth target vertex data or the fifth target vertex data is eliminated from the vertex data to obtain updated first geometric structure data.
12. The method according to any one of claims 1 to 11, characterized in that: After generating a target model file corresponding to each of the planning accuracies based on the second geometric structure data, the method further includes: Parsing the target model file to obtain the second geometric structure data; Performing model visualization rendering based on the second geometric structure data; When the processing effect of the model visualization rendering meets the set indicators, it is confirmed that the target model file is valid.
13. The method according to any one of claims 1 to 12, characterized in that: After generating a target model file corresponding to each of the planning accuracies based on the second geometric structure data, the method further includes: The target model file is subjected to file compression processing, and the compressed file is updated as the target model file.
14. A model visualization rendering method, characterized in that: include: Acquire multiple target model files, each of the target model files corresponds to a different planning accuracy; Parsing each of the target model files respectively to obtain multiple sets of second geometric structure data; In response to the operation instruction, selecting target geometric structure data corresponding to the target planning accuracy from the plurality of sets of the second geometric structure data; Model visualization rendering is performed based on the target geometric structure data.
15. The method according to claim 14, characterized in that Different planning accuracies correspond to corresponding observation distances; and in response to the operation instruction, selecting target geometric structure data corresponding to the target planning accuracy from the plurality of sets of the second geometric structure data comprises: In response to the operation instruction, determining a target observation distance adapted to the operation instruction; Determining a planning accuracy that matches the target observation distance as the target planning accuracy; The geometric structure data corresponding to the target planning accuracy is selected from the plurality of groups of the second geometric structure data as the target geometric structure data.
16. The method according to claim 14 or 15, characterized in that The second geometric structure data is obtained by performing geometric structure simplification processing based on the first geometric structure data according to each set of model simplification control parameters; The first geometric structure data is obtained by parsing the three-dimensional model in the initial model file; The simplified control parameters of the model are determined based on the precision planning array; The precision planning array includes a plurality of planning precisions, and each planning precision corresponds to a set of simplified control parameters of the model.
17. A file conversion device, characterized in that: include: A model parsing module, used for parsing the three-dimensional model in the initial model file to obtain first geometric structure data; A model simplification module, configured to perform geometric structure simplification processing according to a plurality of planning accuracies based on the first geometric structure data to obtain second geometric structure data; The file generation module is used to generate a target model file corresponding to each of the planning accuracies based on the second geometric structure data.
18. A model visualization rendering device, characterized in that: include: A file acquisition module, used to acquire multiple target model files, each of which corresponds to a different planning accuracy; A file parsing module, used for parsing each of the target model files to obtain multiple sets of second geometric structure data; A data selection module, configured to select a target geometric structure number corresponding to a target planning accuracy from a plurality of sets of the second geometric structure data in response to an operation instruction; A rendering module is used to perform model visualization rendering based on the target geometric structure data.
19. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 16 are implemented.
20. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 16 are implemented.
21. A computer program product, characterized in that The invention comprises a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code is executed in an electronic device, a processor in the electronic device executes the steps of the method according to any one of claims 1 to 16.