Finite difference uniform grid parallel generation method for STL (Standard Template Library) model

By generating finite difference uniform meshes for STL models through parallel computing and differential methods, the problem of long processing time in traditional methods is solved, and efficient meshing processing is achieved, which is suitable for generating large-scale complex models and small-sized meshes.

CN121480136APending Publication Date: 2026-02-06BAIMTEC MATERIAL CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511404869.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-29
Publication Date
2026-02-06

AI Technical Summary

Technical Problem

Traditional finite difference uniform mesh generation methods are time-consuming and prone to errors when dealing with large-scale complex models, making it difficult to meet the needs of high-precision numerical simulations.

Method used

A parallel computational approach combining octree recursive decomposition and ray casting with a finite difference method is used to generate a finite difference uniform mesh for the STL model. The octree root node is initialized using a bounding box, and multi-threaded parallel computation is used to recursively create black child nodes of the octree. The ray casting method is used to fill the internal mesh, and the finite difference method is used to handle abnormal locations.

Benefits of technology

It enables rapid generation of finite difference uniform meshes, reduces the number of triangular face traversals, and improves meshing efficiency, especially for the generation of large-scale or small-sized meshes, reducing time consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121480136A_ABST
    Figure CN121480136A_ABST
Patent Text Reader

Abstract

The invention relates to a finite difference uniform grid parallel generation method for an STL (Standard Template Library) model in the technical field of finite difference numerical simulation grid subdivision, which comprises the following steps of: importing an STL model file of a workpiece, and reading all triangular surface information of the STL model; calculating a bounding box according to the STL model, initializing an octree root node and initializing a grid array; according to the information of the bounding box, the size of a preset grid of the STL model and information of all triangular facets, a plurality of threads are used for parallel computing and recursive creation of octree black child nodes, a surface grid of the STL model is obtained, and a result is recorded to a grid array; and performing internal filling on the surface grid by using a ray method to obtain a finite difference uniform grid of the STL model, recording a result to a grid array, and storing the grid array and related information to a file to obtain a grid file. According to the method provided by the invention, the finite difference uniform grid can be quickly generated, the gridding efficiency is improved, and the method has a great application value.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application relates to the technical field of finite difference numerical simulation grid partitioning, in particular to a finite difference uniform grid parallel generation method for an STL model. BACKGROUND

[0002] The STL model is a common general format of a three-dimensional model, for example, in the process of finite difference numerical simulation of a casting process, gridization of STL models such as a casting, a pouring inlet and a runner is the first step in the numerical simulation process, the complexity of a traditional gridization algorithm is extremely high, a large number of traversal operations need to be performed on triangular facets, especially when facing a machine case, the number of triangular facets will sharply expand due to the large model size and the complex model structure; when the target grid size is small, the number of traversal operations on the triangular facets will significantly increase, directly leading to a large amount of time consumed for generating the finite difference uniform grid.

[0003] The most common finite difference uniform grid generation method at present is a ray method and a slicing method. The idea of the ray method is to use a cluster of rays to pass through the model, and to determine whether a grid exists at a certain position in space according to the intersection number and intersection position of the rays and the triangular facets; the idea of the slicing method is to first divide the model into layers, to obtain the outline of each layer, and then to use the intersection of rays and the outline to obtain the grid of each layer, and the grids of all layers are combined together to obtain the complete grid. However, the two methods need to perform multiple traversal operations on the triangular facets in the implementation process, the time complexity is high, and the time is long when facing a large-scale model or generating a small-size grid. In addition, if the model has some triangular facet abnormal problems, the grid generated by using the above two methods will also have obvious errors or the program will throw an exception.

[0004] The actual production has higher and higher requirements for the precision of the finite difference numerical simulation, and the target grid size is smaller and smaller, thereby leading to grid scale expansion and partitioning difficulty. Nowadays, the computer CPU frequency is higher and higher, the parallel computing capability is stronger and stronger, and the running memory is larger and larger, and in view of the performance requirements of the current finite difference grid partitioning, how to use the existing computer resources as much as possible to realize efficient grid division has become a problem to be solved. SUMMARY

[0005] In view of the problems in the background art, the application provides a finite difference uniform grid parallel generation method for an STL model, which can realize fast generation of the finite difference uniform grid, improve the gridization efficiency, and has great application value.

[0006] According to one aspect of the present application, a method for generating a finite difference uniform grid for an STL model is provided, comprising: S1: importing an STL model file of a workpiece, reading all triangle surface information of the STL model; calculating a bounding box in the form of a hexahedron capable of enclosing the STL model according to the STL model, initializing an octree root node, and initializing a grid array; S2: using a plurality of threads to perform parallel calculation according to the information of the bounding box, the preset grid size, and all triangle surface information of the STL model, recursively creating an octree black child node until the node size is equal to the preset grid size, obtaining a surface grid of the STL model, and recording the result to the grid array; S3: using a ray method, based on the grid array containing the surface grid, performing internal filling on the surface grid to obtain a finite difference uniform grid of the STL model, continuously recording the result to the grid array, saving the grid array and related information to a file, and obtaining a grid file.

[0007] In some embodiments of the present application, step S1 comprises the following steps performed in sequence: reading STL model triangle surface information, calculating STL model bounding box information, creating an octree root node root, and creating a grid array; wherein the triangle surface information is the basic unit of the STL model, and the triangle surface information includes the coordinates of three points; the structure of the octree is a spatial management structure, and spatial management is achieved by continuously 8-dividing the space; the node includes the following member variables: eight child node pointers, a triangle surface array, a node coordinate variable, and a node size; wherein the node coordinate variable represents the coordinates of the node in the seventh quadrant direction in the three-dimensional space; the node size represents the edge length of the node; the node coordinate variable and the node size together describe a three-dimensional space; and the triangle surface array represents the triangular patches contained by the node; when initializing the octree root node, the node is made to be capable of wrapping the entire STL model in the three-dimensional space according to the calculated bounding box information, and all triangle surfaces are inserted into the triangle surface array; and the grid array is a three-dimensional integer array used to represent the finite difference uniform grid.

[0008] In some embodiments of the present application, the calculation of the bounding box comprises: loading the STL model, traversing the triangle surfaces of the STL model, and determining the maximum coordinate P max and the minimum coordinate P min in the vertex set of the triangle surface in the traversal process; the maximum coordinate P max and the minimum coordinate P min are defined as follows: p min =[x min , y min , z min ] p max =[x max , y max , zmax ] wherein x min is the minimum value of x in the vertex coordinates of the triangle set, x max is the maximum value of x in the vertex coordinates of the triangle set, y min , y max , z min and z max are the same; The size length of the bounding box is the minimum value satisfying the following condition:

[0009]

[0010]

[0011]

[0012]

[0013]

[0014]

[0015] That is, there is a positive integer n, such that the size length of the bounding box divided by 2 raised to the power of n is equal to the preset grid size size.

[0016] In some embodiments of the present application, the grid array size is nx, ny and nz, which respectively represent the number of grids on the x, y and z coordinate axes, and nx, ny and nz are calculated by the following formula:

[0017]

[0018] .

[0019] In some embodiments of the present application, step S2 comprises recursively decomposing the octree root node root using multiple threads, the method of decomposition is to determine whether the space represented by the eight child nodes of the current node will overlap with the triangle, if a child node overlaps with the triangle, the child node is created and initialized, and all overlapping triangles are inserted into the triangle array triangles of the child node; the stopping condition of recursion is that the size of the current node is consistent with the preset grid size; the grid array is modified, and the value of the position corresponding to the octree leaf node is modified to be non-zero, indicating that there is a material grid at this position.

[0020] In some embodiments of the present application, step S3 comprises: transmitting a cluster of rays to penetrate the grid array, when the rays pass through the surface grid, obtaining the triangular surface corresponding to the octree leaf node position of the surface grid, calculating the intersection information of the rays and the corresponding triangular surface, and then filling the position of the internal grid according to the intersection information.

[0021] In some embodiments of the present application, in step S3, if it is found that the collision information of a ray is abnormal in the process of using the ray method, the ray is skipped and the position of the ray is recorded, and then the grid at the position corresponding to the skipped ray is filled using a differential method.

[0022] In some embodiments of the present application, if the number of intersection points of a ray after penetration is odd, the position of the ray is abnormal and the ray is skipped.

[0023] In some embodiments of the present application, the differential method comprises: if the number of solid grids in 6 adjacent positions of a position is greater than a threshold value, it is considered that there is a grid at the position.

[0024] In some embodiments of the present application, the threshold value is set to 4.

[0025] The embodiments of the present application provide a finite difference uniform grid parallel generation method for an STL model. The method creates a bounding box (an octree root node) for the STL model of a workpiece, uses a plurality of threads to perform parallel calculation according to the information of the bounding box, the preset grid size of the STL model and all triangular surface information, recursively creates an octree black child node, and stops until the size of the node is equal to the preset grid size. First, the surface grid of the STL model can be obtained. After the result of the surface grid is recorded to the grid array, the grid array containing the surface grid can be penetrated by rays, and the surface grid is internally filled according to the penetration information. Compared with the conventional ray method and the slicing method, the parallel generation method of the present application does not need to traverse the triangular surface multiple times, effectively reduces the time consumption, especially for large-scale models or small-size grids, can realize fast generation of finite difference uniform grids, improves the griding efficiency, and has great application value. BRIEF DESCRIPTION OF DRAWINGS

[0026] Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The accompanying drawings are included to provide a description of preferred embodiments, and are not meant to limit the application. In the drawings: Figure 1 is a schematic diagram of the octree data structure of the present application; Figure 2 is a flowchart of the finite difference grid generation method provided by the present application. Detailed Implementation

[0027] It should be understood that the described embodiments are merely some, not all, of the embodiments in this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.

[0028] In the following description, when referring to the accompanying drawings, the same numbers in different drawings denote the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of methods consistent with some aspects of this application as detailed in the appended claims.

[0029] This application discloses a parallel generation method for finite difference uniform meshes for STL models. For example... Figure 1 and Figure 2 As shown, the parallel generation method for finite difference uniform grids for STL models includes the following steps: S1: Import the STL model file of the workpiece, read all the triangular face information of the STL model; calculate a hexahedral bounding box that can enclose the STL model based on the STL model, initialize the octree root node and initialize the mesh array.

[0030] S2: Based on the bounding box information, the preset mesh size of the STL model, and all triangular face information, use several threads to perform parallel calculations, recursively create black child nodes of the octree until the node size equals the preset mesh size, obtain the surface mesh of the STL model, and record the results to the mesh array.

[0031] S3: Using the ray casting method, based on a mesh array containing the surface mesh, the surface mesh is filled internally to obtain a finite difference uniform mesh of the STL model. The results are then recorded to the mesh array, and the mesh array and related information are saved to a file to obtain the mesh file.

[0032] In this invention, a bounding box (root node of an octree) is created from the STL model of the workpiece. Based on the information of the bounding box, the preset mesh size of the STL model, and the information of all triangular faces, several threads are used to perform parallel computation to recursively create black child nodes of the octree until the node size equals the preset mesh size. First, the surface mesh of the STL model can be obtained. After the surface mesh result is recorded in the mesh array, a ray can be used to penetrate the mesh array based on the mesh array containing the surface mesh. According to the penetration information, the surface mesh is filled internally. Compared with the conventional ray casting and slicing methods, which require multiple traversals of the triangular faces, the parallel generation method of this invention does not require multiple traversals of the triangular faces, effectively reducing time consumption. Especially for large-scale models or generating small-sized meshes, it can quickly generate finite difference uniform meshes, improve meshing efficiency, and has great application value.

[0033] In some embodiments of the present invention, step S1 includes the following steps performed sequentially: reading STL model triangle information, calculating STL model bounding box information, creating an octree root node, and creating a mesh array.

[0034] Among them, the triangular facet information is the basic unit of the STL model, and the triangular facet information includes the coordinates of three points.

[0035] The octree structure is a space management structure, which manages space by dividing the space into eight equal parts. The member variables of a node include: eight child node pointers, a triangle array `triangles`, a node coordinate variable `position`, and a node size `voxelSize`. The node coordinate variable `position` represents the coordinates of the node in the seventh quadrant in three-dimensional space. The node size `voxelSize` represents the side length of the node. The node coordinate variable `position` and the node size `voxelSize` together describe a three-dimensional space. The triangle array `triangles` represents the triangles contained in the node. When initializing the root node of the octree, the calculated bounding box information ensures that the node can wrap the entire STL model in three-dimensional space, and all triangles are inserted into the triangle array `triangles`.

[0036] The mesh array is a three-dimensional integer array used to represent a finite difference uniform mesh, that is, the set of surface mesh and the meshes inside the surface mesh.

[0037] In some embodiments of the present invention, the calculation of the bounding box includes the following steps: Load the STL model, traverse the triangles of the STL model, and determine the maximum coordinate P in the set of triangle vertices during the traversal. max and minimum coordinates P min Maximum coordinate Pmax and minimum coordinates P min The definition is as follows: p min =[x min y min , z min (1) p max =[x max y max , z max (2) Where x min It is the minimum x-value among the vertex coordinates of the triangular face set, x max It is the maximum x-value among the vertex coordinates of the triangular face set, y min y max z min and z max Similarly.

[0038] The bounding box dimension (length) is the minimum value that satisfies the following conditions.

[0039] (3) (4) (5) (6) (7) (8) (9) That is, the bounding box length is divisible by 2 to the power of n, where n is a positive integer, and the result is equal to the preset grid size.

[0040] In some embodiments of the present invention, the grid array sizes are nx, ny, and nz, representing the number of grids on the three coordinate axes x, y, and z, respectively. nx, ny, and nz are calculated using the following formulas: (10) (11) (12) Based on the STL model and the preset mesh size, the bounding box (the root node of the octree) is divided into nx, ny, and nz equal parts along the x, y, and z coordinate axes, respectively, to obtain a mesh array of size nx*ny*nz.

[0041] In some embodiments of the present invention, step S2 includes: recursively decomposing the octree root node using multiple threads. The decomposition method is to determine whether the space represented by the eight child nodes of the current node will overlap with the triangles. If a child node overlaps with a triangle, the child node is created and initialized, and all overlapping triangles are inserted into the triangle array triangles of the child node. The recursion stops when the size of the current node is consistent with the preset mesh size. The mesh array is modified by changing the value of the position corresponding to the leaf child node of the octree to non-zero, indicating that there is a material mesh (model mesh) here. That is, all the material meshes obtained in this step constitute the surface mesh of the STL model.

[0042] In some embodiments of the present invention, step S3 includes: emitting a cluster of rays to penetrate the grid array; when the rays pass through the surface grid, obtaining the triangular face at the position of the octagonal leaf node of the surface grid; calculating the intersection information of the rays and the corresponding triangular face; and then filling the position of the internal grid based on the intersection information.

[0043] In some embodiments of the present invention, in step S3, if an abnormal collision information of a certain ray is found during the use of the ray method, the ray is skipped and its position is recorded. Then, the mesh at the corresponding position of the skipped ray is filled using the difference method.

[0044] In some embodiments of the present invention, if the number of intersections after a ray passes through is odd, then there is an anomaly at the location of the ray, and the ray is skipped.

[0045] In some embodiments of the present invention, the differential method includes: if the number of solid grids in the six adjacent locations of a certain location is greater than a threshold, then it is considered that there is a grid at that location.

[0046] In some embodiments of the present invention, the threshold is set to 4, that is, if the number of solid grids in the 6 adjacent positions of a certain position is greater than 4, it is considered that there is also a grid at that position. Thus, when the ray method cannot fill the abnormal position, the differential method is used to fill the corresponding position.

[0047] The parallel generation method for finite difference uniform grids for STL models will be further explained below with reference to specific embodiments.

[0048] Example 1 Please see Figures 1 to 2 This method is used for parallel generation of finite difference uniform meshes in numerical simulation of casing castings. It adopts the idea of ​​parallel recursive space partitioning, and the specific implementation steps are as follows: Step 1: Initialize the calculation conditions.

[0049] Create an octree root node object `space`. This octree data structure includes eight child node pointers, a triangle array `triangles`, a node coordinate variable `position`, and a node size `voxelSize`. `position` represents the coordinates of the node in the seventh quadrant in 3D space; `voxelSize` represents the side length of the node. `position` and `voxelSize` together describe a 3D space, and `triangles` represents the triangles contained within the node. Load the STL model, traverse the triangles of the STL model, and insert them into the triangle array `triangles` of `space`. During the traversal, determine the maximum and minimum coordinates of the triangle vertex set. The maximum coordinate `P`... max and minimum coordinates P min The definition is as follows: (13) (14) Where x min It is the minimum x-value among the vertex coordinates of the triangular face set, x max It is the maximum x-value among the vertex coordinates of the triangular face set, y min y max z min and z max Similarly, calculate the coordinates and size of the bounding box and modify the variable 'space'. The bounding box refers to the root node 'space' of the octree, the bounding box coordinates refer to the position, and the bounding box size 'length' is the minimum value that satisfies the following conditions.

[0050] (15) (16) (17) (18) (19) (20) (twenty one) Initialize the VoxelArray mesh array. This mesh array is a three-dimensional array used to store mesh data; 0 represents air, and non-zero represents a model mesh. The array size is nx, ny, and nz, representing the number of meshes on the x, y, and z coordinate axes. nx, ny, and nz are calculated using the following formula: (twenty two) (twenty three) (twenty four) Step 2: Recursively decompose the octree nodes.

[0051] Determine if the 3D space occupied by the eight child nodes of the root node `space` overlaps with the triangles stored in `triangles` within `space`. If overlap occurs, create the corresponding child node (called the black child node) and initialize it, storing the overlapping triangles in the child node's `triangles`. Create eight threads to recursively decompose the eight child nodes of the root node, one thread per node, using the same decomposition method as `space`. The recursive decomposition stops when the current node's size equals the mesh size `voxelSize`. Store the leaf node information of the octree in the mesh array `VoxelArray`, for example, modifying the value at the corresponding position of the model mesh to 1. After the octree decomposition is complete, the leaf nodes are the surface mesh of the model. The coordinates of the leaf node in the mesh array can be calculated using its `position` and `voxelSize`. (25) (26) (27) Step 3: Fill the internal mesh using the ray casting method.

[0052] The surface mesh is filled using a ray tracing method. A cluster of rays is emitted from the negative z-axis of the VoxelArray towards the positive z-axis, accumulating to nx*ny rays that traverse nx*ny one-dimensional arrays. When a ray passes through a surface mesh node (a non-zero position in the mesh array), the corresponding octagonal leaf node is located bottom-up from the space node using the grid node's index values ​​{ix, iy, iz}. This identifies the triangular faces overlapping with that node, and the intersection points of the ray with these triangular faces are calculated. If a ray collides with the edge of a triangular face, a random offset is provided to the ray, ensuring it remains within the range of the one-dimensional array, and the ray is re-emitted.

[0053] Based on the intersection information of the ray and the triangular face, the location that needs to be filled is determined and filled. When the ray collides with the triangular face an odd number of times, the ray is located inside the STL model, and the grid array elements it passes through need to be filled. When the ray collides with the triangular face an even number of times, the ray is located outside the STL model, and the grid array elements it passes through no longer need to be filled. This achieves one-time filling of a series of grid array elements between the first and second collisions, the third and fourth collisions, or the fifth and sixth collisions, etc. On the basis of the surface grid, the accurate calculation of the internal grids that need to be filled in nx*ny one-dimensional arrays is achieved through nx*ny rays. If an abnormal collision information is found for a ray during the use of the ray method, skip the ray, eliminate the modification of the array by the ray, and record the position of the ray. For example, if a ray collides with a triangle once and enters the STL model, and as the ray continues to extend, it eventually exits the STL model without colliding with any triangle, or if a ray enters the STL model directly without colliding with any triangle, and as the ray continues to extend, it eventually collides with a triangle and exits the STL model, meaning that a triangle may be missing, resulting in an odd number of collisions, then the one-dimensional array in nx*ny corresponding to the ray is determined to be abnormal.

[0054] Step 4: Fill the internal mesh at the abnormal locations using the difference method.

[0055] The differential method is used to fill the gaps instead of the problematic rays in step three. If the number of solid meshes in the six adjacent locations of a certain position is greater than four, then it is assumed that there is also a mesh at that position.

[0056] Step 5: Save the grid file.

[0057] Write the grid size to a file; write the grid array size information nx, ny, nz to a file; write the grid array to a file.

[0058] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A parallel generation method for finite difference uniform meshes for STL models, characterized in that, include: S1: Import the STL model file of the workpiece and read all the triangular face information of the STL model; Calculate a hexahedral bounding box that can enclose the STL model based on the STL model, initialize the octree root node and initialize the mesh array; S2: Based on the bounding box information, the preset mesh size of the STL model, and all triangular face information, use several threads to perform parallel calculations, recursively create octree black child nodes until the node size equals the preset mesh size, obtain the surface mesh of the STL model, and record the results in the mesh array. S3: Using the ray casting method, based on the grid array containing the surface grid, the surface grid is filled internally to obtain the finite difference uniform grid of the STL model. The results are then recorded to the grid array, and the grid array and related information are saved to a file to obtain the grid file.

2. The parallel generation method for finite difference uniform meshes for STL models according to claim 1, characterized in that, Step S1 includes the following steps performed sequentially: reading the STL model triangle information, calculating the STL model bounding box information, creating the octree root node, and creating the mesh array; The triangular facet information is the basic unit of the STL model, and the triangular facet information includes the coordinates of three points; The octree structure is a space management structure, which achieves space management by continuously dividing the space into 8 equal parts. The member variables of the node include: eight child node pointers, a triangle face array, node coordinate variables, and node size. The node coordinate variables represent the coordinates of the node in the seventh quadrant in three-dimensional space; the node size represents the side length of the node. The node coordinate variables and node size together describe a three-dimensional space. The triangle face array represents the triangles contained in the node. When initializing the root node of the octree, the calculated bounding box information is used to ensure that the node can wrap the entire STL model in three-dimensional space, and all triangle faces are inserted into the triangle face array. The grid array is a three-dimensional integer array used to represent a finite difference uniform grid.

3. The parallel generation method for finite difference uniform meshes for STL models according to claim 2, characterized in that, The calculation of the bounding box includes: Load the STL model, traverse the triangles of the STL model, and determine the maximum coordinate P in the set of triangle vertices during the traversal. max and minimum coordinates P min The maximum coordinate P max and minimum coordinates P min The definition is as follows: p min =[x min ,y min ,z min ] p max =[x max ,y max ,z max ] Where x min It is the minimum x-value among the vertex coordinates of the triangular face set, x max It is the maximum x-value among the vertex coordinates of the triangular face set, y min y max z min and z max Similarly; The length of the bounding box is the minimum value that satisfies the following condition: That is, the bounding box length is divisible by 2 to the power of n, where n is a positive integer, and the result is equal to the preset grid size.

4. The parallel generation method for finite difference uniform meshes for STL models according to claim 3, characterized in that, The grid array has dimensions nx, ny, and nz, representing the number of grids on the x, y, and z coordinate axes, respectively. nx, ny, and nz are calculated using the following formulas: 。 5. The parallel generation method for finite difference uniform meshes for STL models according to claim 2, characterized in that, Step S2 includes: recursively decomposing the root node of the octree using multiple threads. The decomposition method is to determine whether the space represented by the eight child nodes of the current node will overlap with the triangle face. If a child node overlaps with a triangle face, the child node is created and initialized, and all overlapping triangle faces are inserted into the triangle face array of the child node. The recursion stops when the size of the current node is consistent with the preset mesh size. The mesh array is modified by changing the value of the position corresponding to the leaf child node of the octree to non-zero, indicating that there is a material mesh at this position.

6. The parallel generation method for finite difference uniform meshes for STL models according to claim 5, characterized in that, Step S3 includes: emitting a cluster of rays to penetrate the mesh array; when the rays pass through the surface mesh, obtaining the triangular face at the position of the corresponding octagonal leaf node of the surface mesh; calculating the intersection information of the rays and the corresponding triangular face; and then filling the position of the internal mesh based on the intersection information.

7. The parallel generation method for finite difference uniform meshes for STL models according to claim 6, characterized in that, In step S3, if an abnormal collision information of a ray is found during the use of the ray method, the ray is skipped and its position is recorded. Then, the mesh at the corresponding position of the skipped ray is filled using the difference method.

8. The parallel generation method for finite difference uniform meshes for STL models according to claim 7, characterized in that, If a ray passes through a point and the number of intersections is odd, then there is an anomaly at the location of that ray, and the ray should be skipped.

9. The parallel generation method for finite difference uniform meshes for STL models according to claim 7, characterized in that, The differential method includes: if the number of entity grids in the 6 adjacent locations of a certain position is greater than a threshold, then it is considered that there is a grid at that position.

10. The parallel generation method for finite difference uniform meshes for STL models according to claim 9, characterized in that, The threshold is set to 4.