Optimization method, device and equipment for three-dimensional mesh processing in geometric modeling and medium

By batch processing surface triangles, new points, and tetrahedral data and constructing external storage mesh files, the problem of excessive memory consumption in traditional methods is solved, achieving efficient 3D mesh processing.

CN122636901APending Publication Date: 2026-08-25HUNAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610691241.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-19
Publication Date
2026-08-25

AI Technical Summary

Technical Problem

In ultra-large-scale mesh scenarios, traditional 3D mesh processing methods result in excessive memory consumption, limiting the scale of mesh refinement and computational efficiency.

Method used

By writing surface triangles into a surface flow file and refining them in batches, new points in the local volume mesh are written into a point table file, the tetrahedron is converted into a tetrahedral flow file, and in the volume refinement stage, internal edge requests are extracted by scanning the tetrahedral flow file in batches, edge keys are generated, hash partitioning is performed to remove duplicates, midpoints are generated, and finally, the result external mesh file is constructed based on the point table file, surface flow file, and refined volume flow file.

Benefits of technology

It significantly reduces the peak memory usage during 3D mesh processing in geometric modeling, avoids memory bottlenecks, and improves computational efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122636901A_ABST
    Figure CN122636901A_ABST
Patent Text Reader

Abstract

The application relates to a three-dimensional mesh processing optimization method, device, equipment and medium in geometric modeling, wherein the method comprises the following steps: acquiring an initial coarse mesh, converting surface triangles in the initial coarse mesh into a fixed-length binary file; writing the surface triangles in the fixed-length binary file into a surface stream file, reading the surface stream file in batches to perform multi-round surface refinement, and generating a local volume mesh; writing new points in the local volume mesh into a point table file, converting tetrahedrons in the local volume mesh into a tetrahedron stream file; extracting internal edge requests of each tetrahedron and generating an edge key, performing hash slicing and deduplication on the edge key, generating a midpoint for each unique internal edge, performing multi-round tetrahedron refinement based on the generated midpoint, and obtaining a refined volume stream file; and constructing a result external storage mesh file and outputting post-processing information. The whole scheme can significantly reduce the memory occupation peak value in the three-dimensional mesh processing process in geometric modeling.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of geometric modeling technology, and in particular to a method, apparatus, computer device, storage medium and computer program product for optimizing three-dimensional mesh processing in geometric modeling. Background Technology

[0002] In scenarios such as finite element analysis, structural simulation, fluid computation, and complex geometric modeling, it is often necessary to generate high-quality tetrahedral mesh models from 3D geometric models. As accuracy requirements continue to increase, the number of mesh refinement layers increases, and the amount of data, including surface triangles, tetrahedral elements, newly added points, and edge midpoint mappings, grows rapidly.

[0003] Traditional methods process data around a complete in-memory subgrid. Each parallel process loads all points, surface cells, volume cells, and newly generated points within its assigned partition into the in-memory grid object. Subsequent output, communication, and quality assessment operations all rely on this complete subgrid.

[0004] In ultra-large-scale mesh scenarios, the above-described method results in a continuous increase in sub-mesh memory usage as the mesh refinement process progresses, easily leading to excessively high memory peaks and limiting the scale of mesh refinement and computational efficiency. Therefore, a 3D mesh processing optimization scheme that can reduce memory usage is needed. Summary of the Invention

[0005] Therefore, it is necessary to provide a method, apparatus, computer device, computer-readable storage medium, and computer program product for optimizing 3D mesh processing in geometric modeling that can reduce memory usage, in order to address the above-mentioned technical problems.

[0006] Firstly, this application provides a method for optimizing 3D mesh processing in geometric modeling. The method includes: Obtain the initial coarse mesh, and convert the surface triangles in the initial coarse mesh into a fixed-length binary file; The surface triangles in the fixed-length binary file are written into the surface stream file. The surface stream file is read in batches to perform multiple rounds of surface refinement. A local volume mesh is generated based on the refined surface. Write the newly added points in the local volume mesh to the point table file, and convert the tetrahedrons in the local volume mesh into a tetrahedron flow file; Scan the tetrahedral flow file in batches, extract the internal edge requests of each tetrahedron and generate edge keys, perform hash sharding to remove duplicates of the edge keys, and generate midpoints for each unique internal edge. Based on the generated midpoints, perform multiple rounds of tetrahedral refinement to obtain the refined volume flow file. Based on the point table file, surface flow file, and refined volume flow file, the resulting external mesh file is constructed and post-processing information is output.

[0007] In one embodiment, obtaining an initial coarse mesh and converting the surface triangles in the initial coarse mesh into a fixed-length binary file includes: Read the 3D geometric model and obtain the initial coarse mesh; The initial coarse mesh is partitioned in parallel and the partition surfaces are extracted; Convert the surface triangles in the partitioned surface into fixed-length binary files.

[0008] In one embodiment, surface triangles from a fixed-length binary file are written into a surface stream file, and the surface stream file is read in batches for multiple rounds of surface refinement. A local volume mesh is generated based on the refined surface, including: Write the surface triangles from the fixed-length binary file to the surface stream file; Surface triangles in the surface stream file are read in batches. A thinning operation is performed on each batch of surface triangles read, and the newly thinned surface triangles are appended to the surface stream file of the next round. The thinning operation is to refine a triangle into multiple smaller triangles. Return to the steps of reading surface triangles from the surface stream file in batches until all surface triangles have been refined; Local meshes are generated based on the refined surface.

[0009] In one embodiment, adding new points in the local volume mesh to a point table file and converting tetrahedrons in the local volume mesh into a tetrahedron flow file includes: Obtain a blank point table file, and write the initial point and the newly added points in the local volume mesh into the point table file; Encode the tetrahedral elements in the local volume mesh into fixed-length binary tetrahedral records and write the fixed-length binary tetrahedral records to the current volume flow file.

[0010] In one embodiment, the tetrahedral flow file is scanned in batches, the internal edge requests of each tetrahedron are extracted and edge keys are generated, the edge keys are hashed and fragmented to remove duplicates, and a midpoint is generated for each unique internal edge. Based on the generated midpoints, multiple rounds of tetrahedral refinement are performed to obtain the refined volume flow file, which includes: Read the TetRecord in the current tetrahedron stream file in batches, extract the six edges of each tetrahedron, and filter the internal edge requests; For each internal edge request, sort the two endpoint numbers according to the undirected edge rules to form an edge key, and write the edge request to the corresponding edge shard file according to the hash value of the edge key; Within each edge shard file, edge requests with the same edge key are deduplicated independently. A midpoint is generated for each unique internal edge and assigned a unique point number. The midpoint coordinates are appended to the point table file as point coordinate records. At the same time, a hash mapping table from shard edge key to midpoint number is established. The TetRecord in the current round volume stream file is read again in batches. An edge key is generated for each of the six edges of each tetrahedron. The corresponding edge shard file is determined based on the hash value of each edge key. The midpoint number corresponding to each edge key is queried in the hash mapping table corresponding to the edge shard file. Based on the six midpoint numbers found, a tetrahedron is refined into eight sub-tetrahedrons. The eight sub-tetrahedrons are encoded into TetRecords and written to the next round volume stream file. The next round of volume flow files is used as the current round of volume flow files again. The process of reading the TetRecord in the current round of volume flow files in batches is repeated until the preset number of refinement layers is reached, and the refined volume flow files are obtained.

[0011] In one embodiment, based on the point table file, surface flow file, and refined volume flow file, the resulting external mesh file is constructed and post-processing information is output, including: Based on the point table file, the final surface flow file, and the refined volume flow file, a result external storage mesh file is constructed; the result external storage mesh file includes the final point coordinate file, the final tetrahedral connection file, the final boundary identifier file, the final shared surface information file, and the adjacency relationship file; Based on the files in the externally stored mesh file, the output includes point coordinates, tetrahedral connectivity, boundary markers, shared surface information, adjacency relationships, and mesh quality assessment results.

[0012] Secondly, this application also provides a device for optimizing 3D mesh processing in geometric modeling. The device includes: The initialization module is used to obtain the initial coarse mesh and convert the surface triangles in the initial coarse mesh into a fixed-length binary file. The first refinement module is used to write surface triangles from a fixed-length binary file into a surface stream file, read the surface stream file in batches to perform multiple rounds of surface refinement, and generate a local volume mesh based on the refined surface. The file processing module is used to write newly added points in the local volume mesh into a point table file and to convert tetrahedrons in the local volume mesh into tetrahedron flow files. The second refinement module is used to scan the tetrahedral flow file in batches, extract the internal edge requests of each tetrahedron and generate edge keys, perform hash sharding to remove duplicates on the edge keys, generate midpoints for each unique internal edge, and perform multiple rounds of tetrahedral refinement based on the generated midpoints to obtain the refined volume flow file. The aggregation module is used to construct an external mesh file based on the point table file, surface flow file, and refined volume flow file, and output post-processing information.

[0013] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps: Obtain the initial coarse mesh, and convert the surface triangles in the initial coarse mesh into a fixed-length binary file; The surface triangles in the fixed-length binary file are written into the surface stream file. The surface stream file is read in batches to perform multiple rounds of surface refinement. A local volume mesh is generated based on the refined surface. Write the newly added points in the local volume mesh to the point table file, and convert the tetrahedrons in the local volume mesh into a tetrahedron flow file; Scan the tetrahedral flow file in batches, extract the internal edge requests of each tetrahedron and generate edge keys, perform hash sharding to remove duplicates of the edge keys, and generate midpoints for each unique internal edge. Based on the generated midpoints, perform multiple rounds of tetrahedral refinement to obtain the refined volume flow file. Based on the point table file, surface flow file, and refined volume flow file, the resulting external mesh file is constructed and post-processing information is output.

[0014] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps: Obtain the initial coarse mesh, and convert the surface triangles in the initial coarse mesh into a fixed-length binary file; The surface triangles in the fixed-length binary file are written into the surface stream file. The surface stream file is read in batches to perform multiple rounds of surface refinement. A local volume mesh is generated based on the refined surface. Write the newly added points in the local volume mesh to the point table file, and convert the tetrahedrons in the local volume mesh into a tetrahedron flow file; Scan the tetrahedral flow file in batches, extract the internal edge requests of each tetrahedron and generate edge keys, perform hash sharding to remove duplicates of the edge keys, and generate midpoints for each unique internal edge. Based on the generated midpoints, perform multiple rounds of tetrahedral refinement to obtain the refined volume flow file. Based on the point table file, surface flow file, and refined volume flow file, the resulting external mesh file is constructed and post-processing information is output.

[0015] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, performs the following steps: Obtain the initial coarse mesh, and convert the surface triangles in the initial coarse mesh into a fixed-length binary file; The surface triangles in the fixed-length binary file are written into the surface stream file. The surface stream file is read in batches to perform multiple rounds of surface refinement. A local volume mesh is generated based on the refined surface. Write the newly added points in the local volume mesh to the point table file, and convert the tetrahedrons in the local volume mesh into a tetrahedron flow file; Scan the tetrahedral flow file in batches, extract the internal edge requests of each tetrahedron and generate edge keys, perform hash sharding to remove duplicates of the edge keys, and generate midpoints for each unique internal edge. Based on the generated midpoints, perform multiple rounds of tetrahedral refinement to obtain the refined volume flow file. Based on the point table file, surface flow file, and refined volume flow file, the resulting external mesh file is constructed and post-processing information is output.

[0016] The aforementioned 3D mesh processing optimization methods, devices, computer equipment, storage media, and computer program products in geometric modeling achieve this by writing surface triangles into a surface flow file and performing multiple rounds of surface refinement in batches. This ensures that only surface triangles need to be loaded in batches during the surface refinement process, avoiding the complete surface mesh remaining resident in memory. Furthermore, by writing new points of the local volume mesh into a point table file and converting tetrahedrons into tetrahedral flow files, point and volume data are no longer entirely loaded into memory sub-mesh objects. In the volume refinement stage, by scanning the tetrahedral flow file in batches, internal edge requests are extracted and edge keys are generated. The edge keys are hashed and fragmented for deduplication, and midpoints are generated for each unique internal edge. The edge-to-midpoint mapping is split into multiple independent edge fragment files for processing. Each fragment can be loaded and deduplicated independently, avoiding the memory bottleneck caused by maintaining a global memory mapping table. Finally, based on the point table file, surface flow file, and refined volume flow file, a result external mesh file is constructed and post-processing information is output, without needing to reload the complete mesh into memory. The synergistic effect of these processing mechanisms significantly reduces the peak memory usage during 3D mesh processing in geometric modeling. Attached Figure Description

[0017] Figure 1 This is a diagram illustrating the application environment of a 3D mesh processing optimization method in geometric modeling in one embodiment. Figure 2 This is a flowchart illustrating a method for optimizing 3D mesh processing in geometric modeling in one embodiment. Figure 3 This is a flowchart illustrating a 3D mesh processing optimization method in geometric modeling in another embodiment; Figure 4 for Figure 2 A schematic diagram of the sub-process of step S400; Figure 5 This is a structural block diagram of a 3D mesh processing optimization device in geometric modeling in one embodiment; Figure 6 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0019] The 3D mesh processing optimization method in geometric modeling provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. The data storage server can store the data that server 104 needs to process. The data storage server can be integrated onto server 104, or it can be located in the cloud or on another network server. Terminal 102 sends a geometric modeling request to server 104. Server 104 responds to the request from terminal 102 and begins to execute the 3D mesh processing optimization method in the geometric modeling of this application. Specifically, server 104 obtains the initial coarse mesh, converts the surface triangles in the initial coarse mesh into a fixed-length binary file, writes the surface triangles in the fixed-length binary file into a surface flow file, reads the surface flow file in batches for multiple rounds of surface refinement, and generates a local volume mesh based on the refined surface. New points in the local volume mesh are written into a point table file, and tetrahedrons in the local volume mesh are converted into tetrahedral flow files. The tetrahedral flow files are scanned in batches, the internal edge requests of each tetrahedron are extracted and edge keys are generated, the edge keys are hashed and deduplicated, and midpoints are generated for each unique internal edge. Based on the generated midpoints, multiple rounds of tetrahedral refinement are performed to obtain the refined volume flow file. Based on the point table file, the surface flow file, and the refined volume flow file, the resulting external storage mesh file is constructed and post-processing information is output. Furthermore, server 104 can continue the subsequent geometric modeling process based on the optimized 3D mesh. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, and smart in-vehicle devices. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices. Server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers. It is understood that the 3D mesh processing optimization in the geometric modeling of this application can also be directly applied to the terminal; the specific processing procedure is similar to that described above and will not be repeated here.

[0020] In one embodiment, such as Figure 2 As shown, a method for optimizing 3D mesh processing in geometric modeling is provided, and this method is applied to... Figure 1 Taking server 104 as an example, the explanation includes the following steps: S100: Obtain the initial coarse mesh and convert the surface triangles in the initial coarse mesh into a fixed-length binary file.

[0021] The process begins by reading the 3D geometric model to obtain an initial coarse mesh composed of multiple initial tetrahedrons (this coarse mesh is relative to the subsequently refined mesh; it can be simply understood as the unrefined mesh). The initial coarse mesh is then partitioned in parallel, for example using MPI (Message Passing Interface) parallel processing, dividing the entire mesh into multiple partitions, with each parallel process handling one partition. For each partition, its outer surface is extracted, which is the set of surface triangles exposed at the global boundary or partition boundary. Each extracted surface triangle is encoded into a fixed-length binary record, called a FaceRecord, and written sequentially to a fixed-length binary file. The advantage of using a fixed-length binary file is that the storage length of each surface triangle is fixed. Therefore, during subsequent batch readings, the target batch can be directly located using the correspondence between the record number and the byte offset, eliminating the need to scan the entire file sequentially from the beginning, thus supporting efficient random batch reading.

[0022] S200: Writes the surface triangles in the fixed-length binary file into the surface stream file, reads the surface stream file in batches to perform multiple rounds of surface refinement, and generates a local volume mesh based on the refined surface.

[0023] The surface records in the fixed-length binary file generated in step S100 are written into a surface stream file, which serves as the input for the first round of surface refinement. During surface refinement, the server reads the surface records from the surface stream file of the current round in batches, loading only one batch of surface records into memory at a time. For each loaded surface triangle, a refinement operation is performed, splitting it into multiple smaller triangles, and each new surface triangle generated by the split is re-encoded as a surface record and appended to the surface stream file of the next round. After the current batch is processed, the memory occupied by that batch can be repeatedly used for the processing of the next batch. This cycle continues until all batches of the current round have been processed. Here, "streaming" means that throughout the refinement process, the complete dataset is stored in external storage as a file stream, and only batches flow into memory during processing. The processing results then flow out to the file of the next round, and only a single or a few batches of data need to be maintained in memory, thus decoupling memory usage from the total mesh size. In multiple rounds of looping, the output stream file of each round automatically becomes the input stream file of the next round, and the server repeats the above batch processing process until the preset number of surface refinement layers or other termination conditions are reached. Based on the final refined surface, the server generates a local volume mesh corresponding to that partition.

[0024] S300: Writes newly added points in the local volume mesh to a point table file, and converts tetrahedrons in the local volume mesh into a tetrahedron flow file.

[0025] During mesh refinement, initial points and newly added points (e.g., edge midpoints) generated during surface refinement are uniformly treated as point coordinate records. The server acquires (creates) an independent point table file, appends these point coordinates to the file line by line in a fixed binary format, and assigns a globally unique point number to each point. When subsequent refinement, output, or quality assessment operations require the coordinates of a point, they can simply be read from the point table file as needed based on the point number, without maintaining a complete array of point coordinates in memory. This mechanism makes point data an external memory structure that can be read independently by number, decoupling point data from in-memory sub-mesh objects. Simultaneously, each tetrahedral element in the local volume mesh generated after surface refinement is encoded as a fixed-length binary tetrahedral record (TetRecord) and written to a volume flow file. This volume flow file serves as the first round of input for subsequent volume refinement stages. Subsequent volume refinement no longer expands directly based on the in-memory sub-mesh but instead reads and writes to the volume flow file in batches, proceeding in a streaming manner.

[0026] S400: Scan tetrahedral flow files in batches, extract the internal edge requests of each tetrahedron and generate edge keys, perform hash sharding to remove duplicates on the edge keys, and generate midpoints for each unique internal edge. Based on the generated midpoints, perform multiple rounds of tetrahedral refinement to obtain the refined volume flow file.

[0027] Here, the key aspects for controlling memory peaks during the volume refinement stage are the streaming refinement of the volume mesh and the "hash-based deduplication of internal edge midpoints" mechanism. The volume refinement process adopts a "two-pass, multi-round loop" architecture. Specifically, the first pass is used to extract internal edge requests from the volume stream file and generate unique midpoints through hash-based deduplication. Specifically, tetrahedral records (TetRecord) in the current round's volume stream file are read in batches. For each tetrahedron, its six edges are extracted. Internal edge requests are then selected, meaning edges located within a partition rather than at partition or global boundaries, as the midpoints of boundary edges may be generated by other partitions. For each internal edge request, the two endpoints are numbered numerically to form an undirected edge key. This rule ensures that the same undirected edge will have the same edge key regardless of which tetrahedron it is extracted from or in what order. Then, the hash value of the edge key is calculated, and the edge request is mapped and written to the corresponding edge shard file based on the hash value. Since the hash value of the edge key of the same undirected edge is necessarily the same, all identical edge requests will be written to the same edge shard file. This physically divides the global set of edge requests into multiple independent edge shard files based on hash values. For each edge shard file, the server can load it into memory sequentially and perform deduplication on edge requests with the same edge key within the shard. That is, multiple requests for the same edge within a shard are retained only once, thus generating a midpoint for each unique internal edge. The server calculates the spatial coordinates of this midpoint, assigns it a globally unique point number, appends its coordinate record to the point table file in step S300 according to the aforementioned format, and simultaneously establishes a hash mapping table from edge key to newly generated midpoint number within the current shard for querying in the second scan. Traditional methods typically maintain a global edge-to-midpoint mapping table (edgemap) in memory to handle edge deduplication and midpoint generation. However, in ultra-large-scale meshes, the number of internal edges is extremely large, and the global mapping table becomes a significant memory bottleneck. This application uses hash sharding to split this global mapping into multiple smaller shards. Each shard can be loaded and deduplicated independently, and its memory can be released after processing, significantly reducing the memory peak at this stage. The second scan refines the tetrahedron based on the generated midpoints. The tetrahedron records in the current round volume stream file are read in batches again, and edge keys are generated for each of the six edges of the tetrahedron. The midpoint number corresponding to each edge is retrieved from the hash mapping table of the corresponding shard. Based on the six retrieved midpoint numbers (if an edge is a boundary edge, an existing or newly generated midpoint can be directly retrieved), the original tetrahedron is refined into multiple smaller sub-tetrahedrons, and each sub-tetrahedron is encoded as a tetrahedron record and written to the next round volume stream file.Subsequently, the newly generated volume flow file for the next round is used as the new current round volume flow file, and the process of the first and second scans is repeated to form a multi-round volume refinement cycle until the preset number of refinement layers is reached or the mesh quality requirements are met, and finally the refined volume flow file is obtained.

[0028] S500: Based on point table files, surface flow files, and refined volume flow files, it constructs external mesh files and outputs post-processing information.

[0029] After all surface and volume refinement processes are completed, the server no longer merges the data from each external storage file to restore a complete sub-mesh object. Instead, it directly constructs a unified external storage mesh file based on the point table file, the final round of surface flow file, the refined volume flow file, and the pre-generated or synchronously generated boundary surface attribution file. This external storage mesh file can be organized into a logical set containing multiple independent data files, such as the final point coordinate file, the final tetrahedral connection file, the final boundary identifier file, the final shared surface information file, and the adjacency relationship file. When the post-processing stage requires outputting point coordinates, tetrahedral connection relationships, boundary identifiers, shared surface information, adjacency relationships, or even mesh quality evaluation results, the corresponding data files in the aforementioned external storage mesh file are read in batches for calculation and output. The entire process does not require maintaining a complete sub-mesh structure in memory, thus minimizing the memory overhead of the post-processing stage.

[0030] The aforementioned optimized 3D mesh processing method in geometric modeling involves writing surface triangles into a surface flow file and performing multiple rounds of surface refinement in batches. This ensures that only surface triangles need to be loaded in batches during surface refinement, avoiding the complete surface mesh remaining resident in memory. By writing new points of the local volume mesh into a point table file and converting tetrahedrons into tetrahedral flow files, point and volume data are no longer entirely loaded into memory sub-mesh objects. In the volume refinement stage, the tetrahedral flow file is scanned in batches to extract internal edge requests and generate edge keys. The edge keys are hashed and fragmented for deduplication, and midpoints are generated for each unique internal edge. The edge-to-midpoint mapping is split into multiple independent edge fragment files for processing. Each fragment can be loaded and deduplicated independently, avoiding the memory bottleneck caused by maintaining a global memory mapping table. Finally, based on the point table file, surface flow file, and refined volume flow file, an external mesh file is constructed and post-processing information is output, without needing to reload the complete mesh into memory. The synergistic effect of these processing mechanisms significantly reduces the peak memory usage during 3D mesh processing in geometric modeling.

[0031] In one embodiment, obtaining an initial coarse mesh and converting the surface triangles in the initial coarse mesh into a fixed-length binary file includes: Step 1: Read the 3D geometric model and obtain the initial coarse mesh.

[0032] The 3D geometric model can be a geometric model file from computer-aided design (CAD) software, or a point cloud or surface model reconstructed through reverse engineering. The server generates an initial coarse mesh composed of multiple initial tetrahedrons by parsing the geometric information of the model.

[0033] Step 2: Perform parallel partitioning on the initial coarse mesh and extract the partition surfaces.

[0034] The initial coarse mesh generated in step 1 is partitioned in parallel, for example using MPI parallel processing, dividing the entire mesh into multiple partitions roughly evenly according to the number of elements. Each parallel process is responsible for processing one partition. After partitioning, each process has a sub-mesh belonging to the current partition. For each sub-mesh, its partition surface is extracted. The partition surface refers to the set of outer surface triangles located at the partition boundary or the boundary of the overall geometric model in the sub-mesh. These surface triangles constitute the interface between the partition and adjacent partitions or the external space.

[0035] Step 3: Convert the surface triangles in the partitioned surface into fixed-length binary files.

[0036] Each surface triangle extracted in step 2 is encoded according to a preset fixed-length binary format to generate a corresponding surface record. Since the encoding length of each surface triangle is fixed, all surface records occupy the same number of bytes in the file. These surface records are written sequentially to the same binary file in the order they were generated, forming a fixed-length binary file.

[0037] In one embodiment, such as Figure 3 As shown, surface triangles from a fixed-length binary file are written into a surface stream file. The surface stream file is read in batches for multiple rounds of surface refinement. Based on the refined surface, a local volume mesh is generated, including: S220: Writes surface triangles from a fixed-length binary file to a surface stream file.

[0038] All surface triangle records in the final fixed-length binary file obtained in step S100 are written one by one into a new file, either in their existing order or after reordering. This file is the surface stream file. Each record in the surface stream file retains its fixed-length binary format, enabling random batch access. This surface stream file serves as the initial input for the surface refinement cycle and can be considered the set of surfaces to be refined in the "first round." In subsequent surface refinement processes, the role of the surface stream file is dynamically transferred: the current round reads a surface stream file, and the next round generates a new surface stream file. This file-based transfer mechanism is the foundation of the entire streaming refinement framework.

[0039] S240: Read surface triangles from the surface stream file in batches, perform a thinning operation on each batch of surface triangles, and append the new surface triangles generated by the thinning to the surface stream file of the next round; the thinning operation is to thin a triangle into multiple smaller triangles.

[0040] A batch size is pre-defined, which can be dynamically determined based on factors such as available memory, number of processes, and grid size. For the surface stream file of the current round, the server reads a continuous batch of surface triangle records into memory, starting from the beginning of the file. For each surface triangle in this batch, a refinement operation is performed. According to preset subdivision rules, the refinement operation inserts new points on the edges or inside a triangle, splitting it into multiple smaller triangles. The vertices of the resulting new triangles include some vertices of the original triangle and the newly inserted points; these new triangles inherit some boundary attributes or region information from the original triangle. Each newly generated surface triangle is encoded as a surface record using the same fixed-length binary format and appended to a new surface stream file created for the next round. Since the processing results of multiple batches are written sequentially to the same next-round surface stream file, this file is gradually filled throughout the entire processing round. After the current batch is completed, the memory occupied by that batch can be reclaimed or overwritten to load the surface triangle records of the next batch.

[0041] S260: Return to the steps of reading surface triangles in the surface stream file in batches until all surface triangles have been refined.

[0042] The batch loop within a round refers to the following: After each execution of S240 to read and process a batch of the current round, the server checks if there are any remaining unread surface triangle records in the surface flow file of the current round. If so, it returns to S240 to continue reading the next batch and refining it, until all batches of the current round have been processed. At this point, the surface flow file for the next round has been completely generated. The outer loop between multiple rounds refers to the following: After a round is completely finished, the server determines whether the preset termination condition is met. If not, the newly generated surface flow file for the next round is used as the new surface flow file for the current round, and the batch loop of S240 is entered again to start a new round of surface refinement. This process is repeated until the preset number of refinement layers is reached or all surface triangles meet the geometric quality requirements. Here, "all surface triangles have been refined" is understood as the overall refinement task reaching the termination condition, and no further refinement is needed.

[0043] S280: Generates a local mesh based on the refined surface.

[0044] Once all surface refinement is complete, the final surface flow file stores a set of high-resolution surface triangles refined through multiple rounds of refinement. The server reads all surface triangle records from this file and, based on their vertices and connectivity, generates tetrahedral elements within the space enclosed by the corresponding surface partition, forming a local volume mesh. This local volume mesh can be generated using established tetrahedral mesh generation algorithms, such as Delaunay triangulation or the leading edge method, with the refined surface serving as boundary constraints to ensure that the generated tetrahedral mesh is geometrically consistent with the surface.

[0045] In one embodiment, adding new points in the local volume mesh to a point table file and converting tetrahedrons in the local volume mesh into a tetrahedron flow file includes: Step 1: Obtain a blank point table file, and write the initial point and the newly added points in the local volume mesh into the point table file.

[0046] When point data is first written, the server creates a blank point table file. This point table file uses a fixed-length record format, with each record storing the coordinate information of a single point. The position of each record in the file is determined by its corresponding point number. During writing, the server first encodes all existing initial points in the initial coarse mesh into point coordinate records, one by one, according to the point number assigned to each point, and writes them into the point table file. Subsequently, all newly added points generated during the surface refinement process, including new vertices inserted on or inside the edges of surface triangles, are also encoded into point coordinate records and appended to the same point table file in point number order. Thus, initial points and newly added points generated at each stage are uniformly stored in the point table file, completely decoupling the point data from the sub-mesh objects in memory. When subsequent refinement operations, output, or mesh quality evaluation processes require the coordinates of a point, the corresponding record can be directly read from the point table file according to its position based on the point number, without needing to maintain an array or mapping structure containing all point coordinates in memory. This "read by number" mechanism makes point data an external storage structure that can be accessed in batches. No matter how much the total number of points grows, the pressure on memory is limited to the point coordinates that are actually needed to be read at the moment.

[0047] Step 2: Encode the tetrahedral elements in the local volume mesh into fixed-length binary tetrahedral records and write the fixed-length binary tetrahedral records to the current volume flow file.

[0048] Each tetrahedral element in the local volume mesh generated in step S280 is encoded according to a preset fixed-length binary format to generate a corresponding fixed-length binary tetrahedral record. Each tetrahedral record contains at least the four vertex numbers of the tetrahedron to uniquely identify its geometry and spatial position. All tetrahedral records are written to a newly created volume flow file in the order of generation. This file serves as the input file for the first round of the volume refinement loop, i.e., the current round's volume flow file. Using the same fixed-length record design as the surface flow file allows the volume flow file to also support random batch reading based on record sequence number and byte offset. Subsequent volume refinement stages will no longer directly expand the submesh in memory. Instead, tetrahedral records in the volume flow file will be read in batches, and after refinement, new tetrahedral records will be generated and written to the next round's volume flow file, thus advancing the refinement process round by round in a flow-to-flow manner.

[0049] In one embodiment, such as Figure 4 As shown, the tetrahedral flow file is scanned in batches, the internal edge requests of each tetrahedron are extracted and edge keys are generated, the edge keys are hashed and fragmented to remove duplicates, and a midpoint is generated for each unique internal edge. Based on the generated midpoints, multiple rounds of tetrahedral refinement are performed to obtain the refined volume flow file, which includes: S410: Read the TetRecord in the current tetrahedron stream file in batches, extract the six edges of each tetrahedron, and filter the internal edge requests.

[0050] According to a preset batch size, a batch of tetrahedral records is read from the current body stream file. For each tetrahedron in this batch, its six edges are determined based on its four vertex numbers. Each of these six edges represents a potential refinement requirement: if a new point is inserted at the midpoint of the edge, the edge will be split. The server evaluates each of these six edges one by one, filtering out internal edge requests. An internal edge is one whose two endpoints are both located inside the current partition, rather than on the partition boundary or the global model boundary. The reason for filtering internal edge requests is that edges on the partition boundary may be shared by multiple adjacent partitions, and the responsibility for generating the midpoint may belong to other partitions. If the current partition also generates the midpoint for it, duplicate points will be generated, leading to mesh topology breaks.

[0051] S420: For each internal edge request, sort the two endpoint numbers according to the undirected edge rules to form an edge key, and write the edge request to the corresponding edge shard file according to the hash value of the edge key.

[0052] For each internal edge request filtered by S410, the two endpoint numbers of that edge are obtained. Since the same edge may appear in different endpoint orders in tetrahedral data (e.g., from endpoint a to endpoint b, or from endpoint b to endpoint a), directly using the original endpoint order as the identifier could result in different identifiers for the same edge, making accurate deduplication impossible. Therefore, the server sorts the two endpoint numbers according to the undirected edge rules, taking the smaller value as the first element and the larger value as the second element, forming an ordered pair. This ordered pair is the edge key of the edge. In this way, regardless of the endpoint order of an edge during extraction, the final generated edge key is always the same, thus uniquely identifying an undirected edge. Then, the server calculates the hash value of the edge key and maps the edge request to the corresponding edge shard file based on the hash value. The mapping rule can be, for example, modulo the hash value with the total number of shards. Since the edge keys of the same undirected edge are completely identical, their hash values ​​must also be identical; therefore, edge requests with the same edge key will be written to the same edge shard file without exception. In this way, at the physical storage level, the server distributes the global set of edge requests into multiple independent edge shard files based on the edge key hash value. Each file contains only a portion of the edge requests, which can be processed independently later.

[0053] S430: Within each edge shard file, edge requests with the same edge key are deduplicated independently. A midpoint is generated for each unique internal edge and assigned a unique point number. The midpoint coordinates are appended to the point table file as point coordinate records. At the same time, a hash mapping table from shard edge key to midpoint number is established.

[0054] For each edge shard file generated by S420, the server loads it into memory sequentially. Since each shard contains only edge requests whose edge key hash values ​​belong to the range of that shard, and identical edge keys will inevitably enter the same shard, the deduplication operation for all internal edges involved in a shard can be completed within a single shard. The deduplication method is as follows: traverse all edge requests within the shard; if multiple edge requests have the same edge key, only one is retained, thus determining each unique internal edge within the shard. For each unique internal edge determined after deduplication, the server calculates its geometric midpoint coordinates. The midpoint coordinates can be obtained by averaging the coordinates of the two endpoints, while the endpoint coordinates are read from the point table file as needed using the endpoint numbers. The server assigns a globally unique point number to the midpoint and appends its midpoint coordinates to the point table file in the format of fixed-length point coordinate records. Simultaneously, a hash mapping table unique to the current shard is established in the memory of the current shard. The key of this mapping table is the edge key, and the value is the newly assigned point number of the midpoint corresponding to that edge key. This mapping table is used to quickly find the midpoint number corresponding to each edge during the subsequent second scan. Compared with the traditional method of maintaining a global edge-to-midpoint mapping table in memory, this method splits the mapping table into multiple smaller partitioned mapping tables through hash partitioning. Each partition can be loaded and deduplicated independently, and its memory can be released after processing to load the next partition. This mechanism makes the memory usage at this stage determined by the size of the partition, rather than by the total number of internal edges, fundamentally eliminating the memory bottleneck caused by the global edge mapping table in ultra-large-scale grids.

[0055] S440: Read the TetRecord in the current round body stream file again in batches, generate edge keys for the six edges of each tetrahedron, determine the corresponding edge shard file based on the hash value of each edge key, and query the midpoint number corresponding to each edge key in the hash mapping table corresponding to the edge shard file; based on the six midpoint numbers found, refine a tetrahedron into eight sub-tetrahedrons, and encode the eight sub-tetrahedrons into TetRecords and write them to the next round body stream file.

[0056] The server reads tetrahedral records from the same current round volume stream file again in batches. For each tetrahedron, its six edges are extracted, and an edge key is generated for each edge according to the undirected edge rules in S420. Then, the edge fragment to which each edge key belongs is determined based on its hash value. In the hash mapping table corresponding to the fragment established in S430, the midpoint number corresponding to each edge key is queried. For each of the six edges, the point number of its corresponding midpoint can be obtained through this query. After obtaining the point numbers of the six midpoints, the server uses the four vertices of the original tetrahedron and these six midpoints to divide the original tetrahedron into multiple smaller sub-tetrahedrons according to a preset subdivision template. The subdivision template defines how to use the original vertices and midpoints to generate new sub-tetrahedrons to ensure that the sub-tetrahedrons are topologically consistent, without gaps or overlaps. Each sub-tetrahedron is encoded as a new tetrahedron record and appended to the next round volume stream file.

[0057] S450: The next round of volume flow file is used as the current round of volume flow file again. The process of reading the TetRecord in the current round of volume flow file in batches is repeated until the preset number of refinement layers is reached, and the refined volume flow file is obtained.

[0058] Once S440 completes all second passes of the current round and the next volume flow file has been fully generated, the server determines whether the current number of refinement rounds has reached the preset refinement level. The refinement level can be preset by the user based on simulation accuracy requirements or automatically determined based on mesh quality metrics. If the preset refinement level has not been reached, the server designates the newly generated next-round volume flow file as the new current-round volume flow file and returns to S410 to start a new round of two-pass refinement. This process iterates in a loop, with each round further improving the mesh resolution based on the previous round. When the preset refinement level is reached, the loop terminates, and the volume flow file at this point is the refined volume flow file, ready for final post-processing.

[0059] In one embodiment, based on the point table file, surface flow file, and refined volume flow file, the resulting external mesh file is constructed and post-processing information is output, including: Step 1: Based on the point table file, the final surface flow file, and the refined volume flow file, construct the result external storage mesh file; the result external storage mesh file includes the final point coordinate file, the final tetrahedral connection file, the final boundary identifier file, the final shared surface information file, and the adjacency relationship file.

[0060] After both surface flow refinement and volume flow refinement are completed, the following external storage data files exist on the server: a point table file (stores the coordinates of the initial points and newly added points generated in each refinement stage), a final-round surface flow file (stores the surface triangle records after refinement), a refined volume flow file (i.e., the tetrahedral records output from the final round of volume refinement), and a boundary surface assignment file (records the boundary type to which each surface triangle or tetrahedral surface belongs, such as global boundary, partition boundary, etc.). The server uses these files as the basic data source to construct a unified external storage mesh file. This external storage mesh file is not a simple merger of the above files, but rather the data within it is extracted, reorganized, and indexed to form multiple sub-files categorized by purpose. Specifically, the external mesh files may include: a final point coordinate file, which centrally stores the coordinate information of all points, with each record corresponding to one point, accessible directly by point number; a final tetrahedral connection file, which stores the four vertex numbers and region numbers of each tetrahedron, describing the mesh topology; a final boundary identifier file, which identifies which faces belong to the boundary and the type of the boundary; a final shared face information file, which records the shared faces between partitions and their corresponding adjacent partition information; and an adjacency relationship file, which stores the adjacency relationships between tetrahedrons for subsequent physical simulation calculations.

[0061] Step 2: Based on the files in the externally stored mesh file, output the point coordinates, tetrahedral connection relationships, boundary markers, shared surface information, adjacency relationships, and mesh quality assessment results.

[0062] Once the external mesh file is constructed, all outputs and computational tasks in the post-processing stage are directly based on the sub-files within that file set. For example, when all point coordinates need to be output, the server reads the records in the final point coordinate file in batches and outputs them sequentially; when tetrahedral connectivity needs to be output, the final tetrahedral connectivity file is read in batches and output; when boundary identifiers and shared face information need to be output, the final boundary identifier file and the final shared face information file are read in batches and output respectively. For adjacency relationships, they can be directly read and output in batches from the adjacency relationship file. For mesh quality assessment, the server can read the final tetrahedral connectivity file and the final point coordinate file in batches, calculate the quality indicators (such as aspect ratio, minimum dihedral angle, etc.) for each tetrahedron, and summarize and output the assessment results.

[0063] All output and calculation operations are performed in a "batch read-process-output" mode. Only the data of the current batch needs to reside in memory, and it can be released after processing is complete. The entire post-processing process does not require rebuilding a complete sub-mesh object containing all points, tetrahedrons, boundary information, shared information, and adjacency relationships in memory, thus maintaining a low memory footprint even in the final stage.

[0064] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0065] Based on the same inventive concept, this application also provides a three-dimensional mesh processing optimization device for implementing the aforementioned three-dimensional mesh processing optimization method in geometric modeling. The solution provided by this device is similar to the implementation scheme described in the above method. Therefore, the specific limitations in one or more embodiments of the three-dimensional mesh processing optimization device in geometric modeling provided below can be found in the limitations of the three-dimensional mesh processing optimization method in geometric modeling described above, and will not be repeated here.

[0066] In one embodiment, such as Figure 5 As shown, a 3D mesh processing optimization device for geometric modeling is provided, comprising: Initialization module 100 is used to obtain the initial coarse mesh and convert the surface triangles in the initial coarse mesh into a fixed-length binary file; The first refinement module 200 is used to write surface triangles from a fixed-length binary file into a surface stream file, read the surface stream file in batches to perform multiple rounds of surface refinement, and generate a local volume mesh based on the refined surface. The file processing module 300 is used to write newly added points in the local volume mesh into a point table file and convert tetrahedrons in the local volume mesh into tetrahedron flow files. The second refinement module 400 is used to scan the tetrahedral flow file in batches, extract the internal edge requests of each tetrahedron and generate edge keys, perform hash sharding and deduplication on the edge keys, generate midpoints for each unique internal edge, and perform multiple rounds of tetrahedral refinement based on the generated midpoints to obtain the refined volume flow file. The aggregation module 500 is used to construct an external mesh file based on the point table file, surface flow file, and refined volume flow file, and output post-processing information.

[0067] In one embodiment, the initialization module 100 is further configured to read the three-dimensional geometric model and obtain an initial coarse mesh; partition the initial coarse mesh in parallel and extract the partition surfaces; and convert the surface triangles in the partition surfaces into fixed-length binary files.

[0068] In one embodiment, the first refinement module 200 is further configured to write surface triangles from a fixed-length binary file into a surface stream file; read surface triangles from the surface stream file in batches, perform a refinement operation on each batch of surface triangles read, and append the newly refined surface triangles to the next round of surface stream file; the refinement operation is to refine a triangle into multiple smaller triangles; return to the step of reading surface triangles from the surface stream file in batches until all surface triangles have been refined; and generate a local mesh based on the refined surface.

[0069] In one embodiment, the file processing module 300 is further configured to obtain a blank point table file, write the initial point and the newly added points in the local volume mesh into the point table file; encode the tetrahedral elements in the local volume mesh into fixed-length binary tetrahedral records and write the fixed-length binary tetrahedral records into the current volume flow file.

[0070] In one embodiment, the second refinement module 400 is further configured to read the TetRecord in the current wheel body stream file in batches, extract the six edges of each tetrahedron, and filter internal edge requests; for each internal edge request, sort the two endpoint numbers according to the undirected edge rules to form an edge key, and write the edge request into the corresponding edge shard file according to the hash value of the edge key; in each edge shard file, deduplicated edge requests with the same edge key are performed independently, a midpoint is generated for each unique internal edge and assigned a unique point number, the midpoint coordinates are appended to the point table file as point coordinate records, and a hash mapping table from shard edge key to midpoint number is established; and the current wheel body stream is read in batches again. In the TetRecord of the volume flow file, each tetrahedron's six edges generate an edge key. Based on the hash value of each edge key, the corresponding edge shard file is determined. The midpoint number corresponding to each edge key is queried in the hash mapping table of the edge shard file. Based on the six midpoint numbers found, a tetrahedron is refined into eight sub-tetrahedrons. The eight sub-tetrahedrons are encoded as TetRecords and written to the next round of volume flow file. The next round of volume flow file is used as the current round of volume flow file, and the step of reading the TetRecord in the current round of volume flow file in batches is returned until the preset refinement level is reached, resulting in the refined volume flow file.

[0071] In one embodiment, the aggregation module 500 is further configured to construct an external storage mesh file based on the point table file, the final surface flow file, and the refined volume flow file; the external storage mesh file includes the final point coordinate file, the final tetrahedral connection file, the final boundary identifier file, the final shared surface information file, and the adjacency relationship file; based on each file in the external storage mesh file, the module outputs the point coordinates, tetrahedral connection relationships, boundary identifiers, shared surface information, adjacency relationships, and mesh quality evaluation results.

[0072] The modules in the 3D mesh processing and optimization device described above in geometric modeling can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.

[0073] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 6 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores preset data. The network interface communicates with external terminals via a network connection. When executed by the processor, the computer program implements a 3D mesh processing optimization method in geometric modeling.

[0074] Those skilled in the art will understand that Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0075] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-described 3D mesh processing optimization method in geometric modeling.

[0076] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the three-dimensional mesh processing optimization method in the above-described geometric modeling.

[0077] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the three-dimensional mesh processing optimization method in the above-described geometric modeling.

[0078] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0079] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0080] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for optimizing 3D mesh processing in geometric modeling, characterized in that, The method includes: Obtain an initial coarse mesh, and convert the surface triangles in the initial coarse mesh into a fixed-length binary file; The surface triangles in the fixed-length binary file are written into the surface stream file. The surface stream file is read in batches and multiple rounds of surface refinement are performed. A local volume mesh is generated based on the refined surface. Write the newly added points in the local volume mesh into a point table file, and convert the tetrahedrons in the local volume mesh into a tetrahedron flow file; The tetrahedral flow file is scanned in batches, the internal edge requests of each tetrahedron are extracted and edge keys are generated, the edge keys are hashed and fragmented to remove duplicates, and a midpoint is generated for each unique internal edge. Based on the generated midpoints, multiple rounds of tetrahedral refinement are performed to obtain the refined volume flow file. Based on the point table file, the surface flow file, and the refined volume flow file, a result external mesh file is constructed and post-processing information is output.

2. The method according to claim 1, characterized in that, The step of obtaining the initial coarse mesh and converting the surface triangles in the initial coarse mesh into a fixed-length binary file includes: Read the 3D geometric model and obtain the initial coarse mesh; The initial coarse mesh is partitioned in parallel and the partition surfaces are extracted; Convert the surface triangles in the partitioned surface into fixed-length binary files.

3. The method according to claim 1, characterized in that, The steps of writing surface triangles from the fixed-length binary file into a surface stream file, reading the surface stream file in batches for multiple rounds of surface refinement, and generating a local volume mesh based on the refined surface include: Write the surface triangles in the fixed-length binary file into the surface stream file; Surface triangles in the surface stream file are read in batches. A thinning operation is performed on each batch of surface triangles read, and the newly thinned surface triangles are appended to the surface stream file of the next round. The thinning operation is to thin a triangle into multiple smaller triangles. Return to the step of reading surface triangles in the surface stream file in batches until all surface triangles have been refined; Local meshes are generated based on the refined surface.

4. The method according to claim 1, characterized in that, The step of writing the newly added points in the local volume mesh into a point table file and converting the tetrahedrons in the local volume mesh into a tetrahedron flow file includes: Obtain a blank point table file, and write the initial point and the newly added points in the local volume mesh into the point table file; The tetrahedral cells in the local volume mesh are encoded as fixed-length binary tetrahedral records, and the fixed-length binary tetrahedral records are written to the current volume stream file.

5. The method according to claim 1, characterized in that, The process involves scanning the tetrahedral flow file in batches, extracting the internal edge requests of each tetrahedron and generating edge keys, hashing and deduplicating the edge keys, generating midpoints for each unique internal edge, and performing multiple rounds of tetrahedral refinement based on the generated midpoints to obtain the refined volume flow file, which includes: Read the TetRecord in the current tetrahedron stream file in batches, extract the six edges of each tetrahedron, and filter the internal edge requests; For each internal edge request, sort the two endpoint numbers according to the undirected edge rules to form an edge key, and write the edge request to the corresponding edge shard file according to the hash value of the edge key; Within each edge shard file, edge requests with the same edge key are deduplicated independently. A midpoint is generated for each unique internal edge and assigned a unique point number. The midpoint coordinates are appended to the point table file as point coordinate records. At the same time, a hash mapping table from shard edge key to midpoint number is established. The TetRecord in the current round body stream file is read again in batches. An edge key is generated for each of the six edges of each tetrahedron. The corresponding edge shard file is determined based on the hash value of each edge key. The midpoint number corresponding to each edge key is queried in the hash mapping table corresponding to the edge shard file. Based on the six midpoint numbers found, a tetrahedron is refined into eight sub-tetrahedrons. The eight sub-tetrahedrons are encoded as TetRecords and written to the next round body stream file. The next round of volume flow file is used as the current round of volume flow file again. The step of reading the TetRecord in the current round of volume flow file in batches is returned until the preset number of refinement layers is reached, and the refined volume flow file is obtained.

6. The method according to claim 1, characterized in that, The process of constructing an external mesh file based on the point table file, the surface flow file, and the refined volume flow file, and outputting post-processing information, includes: Based on the point table file, the final surface flow file, and the refined volume flow file, a result external storage mesh file is constructed; the result external storage mesh file includes the final point coordinate file, the final tetrahedral connection file, the final boundary identifier file, the final shared surface information file, and the adjacency relationship file; Based on the files in the externally stored mesh file, the output includes point coordinates, tetrahedral connectivity, boundary markers, shared surface information, adjacency relationships, and mesh quality assessment results.

7. A three-dimensional mesh processing optimization device for geometric modeling, characterized in that, The device includes: An initialization module is used to obtain an initial coarse mesh and convert the surface triangles in the initial coarse mesh into a fixed-length binary file. The first refinement module is used to write the surface triangles in the fixed-length binary file into the surface stream file, read the surface stream file in batches to perform multiple rounds of surface refinement, and generate a local volume mesh based on the refined surface. The file processing module is used to write newly added points in the local volume mesh into a point table file and convert tetrahedrons in the local volume mesh into a tetrahedron flow file. The second refinement module is used to scan the tetrahedral flow file in batches, extract the internal edge requests of each tetrahedron and generate edge keys, perform hash sharding to remove duplicates of the edge keys and generate midpoints for each unique internal edge, and perform multiple rounds of tetrahedral refinement based on the generated midpoints to obtain the refined volume flow file. The aggregation module is used to construct an external mesh file based on the point table file, the surface flow file, and the refined volume flow file, and output post-processing information.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.