A three-dimensional modeling method and system based on dot matrix structure
By using implicit methods to represent lattice structures with mathematical function expressions, the problems of large data volume and high computational cost in 3D modeling of large-scale lattice structures are solved, and efficient and accurate 3D modeling is achieved.
Patent Information
- Application Number
- CN202510580680.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-07
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2045-05-07
AI Technical Summary
Existing technologies cannot efficiently and accurately achieve 3D modeling based on lattice structures, especially when constructing large-scale lattice structures, which suffers from problems such as large data volume, high computational processing cost, and low accuracy.
The model is based on a polygonal mesh model and a structure function of the target lattice unit cell. It is modeled implicitly, and the lattice structure is represented by mathematical function expressions. The model is then filled and voxelized to generate the target 3D model.
It effectively reduces the computational cost and memory usage of modeling and processing, improves the accuracy and efficiency of 3D modeling, and can quickly and accurately realize the modeling of large-scale complex lattice structures.
Smart Images

Figure CN120689546B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of three-dimensional modeling, in particular to a three-dimensional modeling method and system based on lattice structure. BACKGROUND
[0002] The lattice structure is composed of continuous and periodic unit cells (or lattice unit cells), has high design freedom, high specific stiffness, high strength, lightweight and other excellent performance, and is widely used in aerospace, automotive engineering, life science, tissue engineering and other fields. Specifically, the structure of the lattice unit cell can be divided into a prism structure, a truss structure and a three-period minimal surface structure. Among them, the lattice unit cell of the truss structure is more widely used, and the lattice unit cell of the truss structure is formed by the connection between the rods. The distribution and number of rod units can be flexibly adjusted according to the needs to meet the diversified application requirements.
[0003] The related method of three-dimensional modeling based on lattice structure mainly represents the three-dimensional model through skeleton structure or mesh representation. Among them, the skeleton structure is to construct a three-dimensional model based on a lattice structure by means of node-node, line-line and other shape parameters. The mesh representation is to represent the three-dimensional model by fitting the triangular patches to the curved surface.
[0004] However, for the skeleton structure, as the size of the three-dimensional model increases or the size of the lattice unit cell decreases, the overall scale of the three-dimensional model will rapidly increase, and the number of lattice structure supports can reach millions. Especially for constructing large-scale lattice structure, the amount of structure data to be stored will increase exponentially, and a large amount of structure data is difficult to store and efficiently process. The mesh representation method is difficult to balance the precision and data amount when facing lattice structures with complex structures and small features. High precision requires more triangular patch fitting, which will greatly increase the data size, thereby increasing the calculation cost and memory storage occupancy. Therefore, for the construction of large-scale lattice structure three-dimensional model, the related technology has the problems of large data processing amount, high calculation processing cost and low precision, which leads to the inability to efficiently and accurately realize three-dimensional modeling based on lattice structure. SUMMARY
[0005] The technical problem to be solved by the present application is the problem of inefficient and accurate three-dimensional modeling based on lattice structure.
[0006] To solve the above technical problems, the present application provides a three-dimensional modeling method and system based on lattice structure, which specifically adopts the following technical solutions:
[0007] In a first aspect, the present application provides a three-dimensional modeling method based on a point lattice structure, comprising: first, extracting bounding box information and patch information of a first model, the first model being a mesh model composed of a plurality of polygon patches, and the patch information being used to represent the structure and attributes of the polygon patches. Then, converting the first model into a first discrete point cloud model based on the bounding box information, the patch information and a first preset point cloud resolution. The first discrete point cloud model includes a first signed distance field, which is used to represent the distance and positional relationship of the sampling points in the first discrete point cloud model to the surface of the first model. Next, determining the unit cell type of a target point lattice unit cell and a structure function corresponding to the unit cell type. Next, filling the target point lattice unit cell in the target bounding box corresponding to the bounding box information by a model filling algorithm based on the bounding box information and the structure function, to determine a target point lattice structure function field. Then, performing voxelization processing based on the target point lattice structure function field and a second preset point cloud resolution, to generate a second discrete point cloud model, which includes first voxel information. Finally, performing merging processing on the first discrete point cloud model and the second discrete point cloud model, to generate a target three-dimensional model, which includes second voxel information.
[0008] The method, based on the polygon mesh model and the structure function of the target point lattice unit cell, models by an implicit (i.e. mathematical function expression) method, realizes filling and arranging the target point lattice unit cell to construct the three-dimensional model based on the point lattice structure, and can represent the three-dimensional model of the point lattice structure by an implicit field (function field). Since the method uses a mathematical function expression to represent the point lattice structure, the model construction process does not involve a large amount of grid intersection processing, which can effectively reduce the calculation cost, time and memory occupation of the model modeling processing, and can solve the problem of low fitting accuracy of the model represented by the fitted surface, and can quickly and accurately realize the modeling of large-scale complex point lattice structures. In this way, the accuracy and efficiency of the three-dimensional modeling based on the point lattice structure can be effectively improved.
[0009] In combination with the first aspect, in an alternative implementation manner, the above converting the first model into the first discrete point cloud model based on the bounding box information, the patch information and the first preset point cloud resolution comprises: first, determining a target bounding box according to the bounding box information. Then, generating a sampling point cloud model according to the first preset point cloud resolution based on the target bounding box. Next, determining the distance and positional relationship of the sampling points in the sampling point cloud model to the surface of the first model according to the patch information, to obtain the first signed distance field. Finally, generating the first discrete point cloud model based on the sampling point cloud model and the first signed distance field.
[0010] In the implementation, the first discrete point cloud model is generated accurately based on the sampling point cloud model and the first signed distance field, and is used to construct the target three-dimensional model.
[0011] In combination with the first aspect, in a possible implementation, the patch information includes patch vertex coordinate information and patch normal information; and the first signed distance field includes a first distance value and a first sign. The first distance value is determined based on the coordinate information of the sampling points in the sampling point cloud model and the patch vertex coordinate information. The first sign is determined based on the coordinate information of the sampling points in the sampling point cloud model, the patch vertex coordinate information and the patch normal information. In a case where the first sign is positive, it indicates that the sampling point in the first discrete point cloud model is outside the first model; in a case where the first sign is negative, it indicates that the sampling point in the first discrete point cloud model is inside the first model; and in a case where the first sign is 0, it indicates that the sampling point in the first discrete point cloud model is on the surface of the first model.
[0012] In the implementation, the first signed distance field is determined accurately based on the coordinate information of the sampling points in the sampling point cloud model, the patch vertex coordinate information and the patch normal information.
[0013] In combination with the first aspect, in a possible implementation, the model filling algorithm includes an arrangement function and a geometry control function. The target point lattice structure function field is determined by filling the target point lattice unit in the target bounding box based on the bounding box information and the structure function through the model filling algorithm, including: first, the target point lattice unit is subjected to a modulo operation based on the structure function through the arrangement function, so as to arrange the target point lattice unit periodically in the target bounding box, to obtain an arranged point lattice function. Then, the target point lattice unit in the arranged point lattice function is adjusted based on a preset point lattice geometry parameter through the geometry control function, to obtain the target point lattice structure function field; wherein the preset point lattice geometry parameter includes a size scaling factor and a thickness parameter.
[0014] In the implementation, the target point lattice structure function field is determined quickly and accurately through the arrangement function and the geometry control function.
[0015] In combination with the first aspect, in a possible implementation, the first voxel information includes a second signed distance field, which is generated based on a second preset point cloud resolution from the target point lattice structure function field; and the second signed distance field is used to represent the distance and position relationship of the sampling point in the second discrete point cloud model to the target point lattice unit.
[0016] In conjunction with the first aspect, in one alternative implementation, the aforementioned unit cell type is one of the following structures: simple cubic truss structure, body-centered cubic truss structure, face-centered cubic truss structure, or custom unit cell structure. The expression for the structure function of the simple cubic truss structure is:
[0017]
[0018] Where sc(q1,e1) represents the structure function of the simple cubic truss structure, q1 represents a point within the unit cell of the simple cubic truss structure, e1 represents the thickness parameter of the simple cubic truss structure, and q 1x This represents the x-axis coordinate of point q1, q 1y This represents the y-axis coordinate of point q1, q 1z This represents the z-axis coordinate of point q1, o x q 1x The square value of o y q 1y The square value of o z q 1z The square value of . The expression for the structural function of a body-centered cubic truss structure is:
[0019]
[0020] m1=|q2|=(|q 2x |,|q 2y |,|q 2z |);
[0021] m 1x =|q 2x |,m 1y =|q 2y |,m 1z =|q 2z |;
[0022] Where bcc(q2,e2) represents the structure function of the body-centered cubic truss structure, q2 represents a point within the unit cell of the body-centered cubic truss structure, e2 represents the thickness parameter of the body-centered cubic truss structure, and q 2x This represents the x-axis coordinate of point q2, q 2y This represents the y-coordinate of point q2, q 2z Let m represent the z-axis coordinate of point q2, m1 represent the absolute value of the coordinate of point q2, and m 1x q 2x The absolute value of m 1y q 2y The absolute value of m 1z q 2z The absolute value of . The expression for the structural function of a face-centered cubic truss structure is:
[0023] fcc(q3, e3) = min(min(|m xy -(n x +n y ), m 2z |, |m xz -(n x +n z ), m 2y |) - e3;
[0024] |m yz -(n y +n z ), m 2x |) - e3;
[0025] m xy = |q 3x | · |q 3y |;
[0026] m xz = |q 3x | · |q 3z |;
[0027] m yz = |q 3y | · |q 3z |;
[0028] m 2x = |q 3x |, m 2y = |q 3y |, m 2z = |q 3z |;
[0029]
[0030] wherein fcc(q3, e3) represents a structure function of the face-centered cubic truss structure, q3 represents a point in a unit cell domain of the face-centered cubic truss structure, e3 represents a thickness parameter of the face-centered cubic truss structure, q 3x represents an x-axis coordinate value of the point q3, q 3y represents a y-axis coordinate value of the point q3, q 3z represents a z-axis coordinate value of the point q3, m 2x represents an absolute value of q 3x , m 2y represents an absolute value of q 3y , m 2z represents an absolute value of q 3z , n x represents one-half of m 2x , n y represents one-half of m 2yhalf of n z denotes m 2z half of m xy denotes m 2x product of m 2y denotes m xz product of m 2x denotes m 2z product of m yz denotes m 2y product of m 2z denotes m The structure function for defining the unit cell structure is determined based on a CSG method of constructing a solid geometry by Boolean operation.
[0031] In combination with the first aspect, in a possible implementation, the second voxel information includes a third signed distance field. The merging of the first discrete point cloud model and the second discrete point cloud model to generate the target three-dimensional model includes: first, matching the sampling points in the first discrete point cloud model with the sampling points in the second discrete point cloud model to obtain a matched point cloud model. Then, determining the maximum value in the first signed distance field and the second signed distance field corresponding to the sampling points in the matched point cloud model as the third signed distance field.
[0032] In combination with the first aspect, in a possible implementation, the second voxel information further includes a unit cell type, a preset lattice geometry parameter, and preset texture information.
[0033] In combination with the first aspect, in a possible implementation, the target three-dimensional model is in an XML format.
[0034] In this implementation, the XML format as a binary storage format can make the data of the target three-dimensional model more compact, facilitate efficient reading and writing of the target three-dimensional model, and facilitate processing of large-scale voxel data (i.e., the second voxel information) in the target three-dimensional model.
[0035] In a second aspect, the present application provides a three-dimensional modeling system based on a lattice structure, comprising: an extraction module, a module conversion module, a lattice unit definition module, a filling module, a voxelization module, and a model generation module. The extraction module is configured to extract bounding box information and face information of a first model, the first model being a mesh model composed of a plurality of polygonal faces, and the face information being used to represent the structure and attributes of the polygonal faces. The module conversion module is configured to convert the first model into a first discrete point cloud model based on the bounding box information, the face information, and a first preset point cloud resolution, the first discrete point cloud model comprising a first signed distance field, and the first signed distance field being used to represent the distance and position relationship of a sampling point in the first discrete point cloud model to a surface of the first model. The lattice unit definition module is configured to determine the unit type of a target lattice unit and a structure function corresponding to the unit type. The filling module is configured to fill the target lattice unit in a target bounding box corresponding to the bounding box information by a model filling algorithm based on the bounding box information and the structure function, and determine a target lattice structure function field. The voxelization module is configured to perform voxelization processing based on the target lattice structure function field and a second preset point cloud resolution, and generate a second discrete point cloud model, the second discrete point cloud model comprising first voxel information. The model generation module is configured to perform merging processing on the first discrete point cloud model and the second discrete point cloud model, and generate a target three-dimensional model, the target three-dimensional model comprising second voxel information.
[0036] In a third aspect, the present application provides an electronic device, comprising: a memory, one or more processors; the memory is coupled to the processor; wherein the memory stores computer program code, the computer program code comprises computer instructions, when the computer instructions are executed by the processor, the electronic device executes the method provided by the first aspect and any one of the optional implementation manners thereof.
[0037] In a fourth aspect, the present application provides a computer readable storage medium, comprising computer instructions, when the computer instructions are run on an electronic device, the electronic device executes the method provided by the first aspect and any one of the optional implementation manners thereof.
[0038] It can be understood that the beneficial effects that can be achieved by the three-dimensional modeling system based on a lattice structure provided by the second aspect, the electronic device of the third aspect, and the computer readable storage medium of the fourth aspect can refer to the beneficial effects in the first aspect and any one of the possible design manners, which will not be described here. BRIEF DESCRIPTION OF DRAWINGS
[0039] Figure 1 A structure diagram of a lattice unit provided by an embodiment of the present application;
[0040] Figure 2 A principle diagram of a three-dimensional modeling method based on a lattice structure provided by an embodiment of the present application;
[0041] Figure 3 A flowchart illustrating the 3D modeling method based on lattice structure provided in this application embodiment;
[0042] Figure 4 A schematic diagram of the lattice unit cell structure of the truss structure provided in the embodiments of this application;
[0043] Figure 5 A schematic diagram of a target lattice unit cell provided in an embodiment of this application;
[0044] Figure 6 This is a schematic diagram of the structure after the target lattice unit cell is filled, as provided in the embodiments of this application;
[0045] Figure 7 This is a schematic diagram of the structure of a 3D modeling system based on a lattice structure provided in an embodiment of this application. Detailed Implementation
[0046] The embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described below do not represent all embodiments consistent with this application. They are merely examples of systems and methods consistent with some aspects of this application as detailed in the claims.
[0047] Lattice structures, composed of continuously and periodically arranged unit cells (or lattice unit cells), possess excellent properties such as high design freedom, high specific stiffness, high strength, and lightweight, thus finding wide applications in aerospace, automotive engineering, life sciences, and tissue engineering. Specifically, lattice unit cell structures can be categorized into prism structures, truss structures, and structures based on three-period minimal surfaces. Among these, truss structures are more widely used. Figure 1 This is a schematic diagram of the structure of a lattice unit cell provided in an embodiment of this application, as shown below. Figure 1 As shown, the lattice unit cells of the truss structure are formed by the connection between the rods, and the distribution and number of rod units can be flexibly adjusted according to the needs to meet diverse application requirements.
[0048] Methods for 3D modeling based on lattice structures primarily represent the 3D model through skeleton structures or mesh representations. Skeleton structures construct the 3D model based on a lattice structure using node-to-node and line-to-line relationships, along with additional shape parameters. Mesh representations represent the 3D model by fitting triangular facets to curved surfaces.
[0049] However, for the skeleton structure, as the size of the three-dimensional model increases or the size of the lattice unit cell decreases, the overall scale of the three-dimensional model will rapidly grow, and the number of struts of the lattice structure can reach millions, especially when constructing a large-scale lattice structure, the structural data to be stored will grow exponentially, and a large amount of structural data is difficult to store and efficiently process. When the grid representation method faces a lattice structure with complex structure and small features, it is difficult to balance the precision and data volume, and high precision requires more triangular patch fitting, which will greatly increase the data size, thereby increasing the calculation cost and memory storage occupancy. Therefore, for the three-dimensional model of a large-scale lattice structure, the related technology has the problems of large data processing, high calculation processing cost and low precision, thereby failing to efficiently and accurately realize three-dimensional modeling based on the lattice structure.
[0050] To solve the above problems, the embodiment of the present application provides a three-dimensional modeling method and system based on a lattice structure, which can be applied to three-dimensional modeling of a large-scale (large data volume) lattice structure. Specifically, Figure 2 The principle diagram of the three-dimensional modeling method based on the lattice structure provided by the embodiment of the present application is shown in Figure 2 As shown in the figure, the method first converts a first model in a polygon mesh format into a first discrete point cloud model. Then, based on the bounding box information of the first model and the structure function of a target lattice unit cell, the target lattice unit cell is filled in the target bounding box to determine the target lattice structure function field. Next, voxelization processing is performed based on the target lattice structure function field to generate a second discrete point cloud model. Finally, the first discrete point cloud model and the second discrete point cloud model are merged to generate a target three-dimensional model.
[0051] The method can model based on the polygon mesh model and the structure function of the target lattice unit cell through an implicit (i.e., mathematical function expression) method, realize filling and arranging the target lattice unit cell to construct a three-dimensional model based on the lattice structure, and represent the three-dimensional model of the lattice structure through an implicit field (function field). The method uses a mathematical function expression to represent the lattice structure, and does not involve a large amount of grid intersection processing in the model construction process, which can effectively reduce the calculation cost, time and memory occupancy of the model modeling process, and can solve the problem of low fitting precision of the model represented by the surface fitting. The method can quickly and accurately realize modeling of a large-scale complex lattice structure. In this way, the accuracy and efficiency of three-dimensional modeling based on the lattice structure can be effectively improved.
[0052] The scheme provided by the embodiment of the present application will be described below with reference to the accompanying drawings.
[0053] Specifically, Figure 3 The flowchart of the three-dimensional modeling method based on the lattice structure provided by the embodiment of the present application is shown in Figure 3As shown, the three-dimensional modeling method based on the dot matrix structure provided in the embodiments of the present application includes the following steps S101-S106:
[0054] S101, extract the bounding box information and the patch information of the first model.
[0055] In the embodiments of the present application, the first model is a pre-acquired model used to construct a three-dimensional model of the dot matrix structure. Specifically, the first model is a mesh model composed of a plurality of polygon patches. For example, the polygon patch can be a triangular patch, a quadrilateral patch, a pentagonal patch, etc. The first model can be a model in a mesh format such as stereolithography (STL), OBJ, etc.
[0056] In order to construct the three-dimensional model of the dot matrix structure corresponding to the first model, first, the bounding box information and the patch information of the first model need to be extracted. The bounding box information can be used to represent a simplified geometric body (such as a cube or a cuboid) that encloses the first model, i.e., a bounding box, which can represent the approximate spatial range of the first model. For example, the bounding box can be an axis-aligned bounding box (AABB).
[0057] The patch information can be used to represent the structure and attributes of the polygon patch. For example, the patch information can include patch vertex coordinate information and patch normal information.
[0058] In some embodiments, the vertex information, patch vertex coordinate information, and patch normal information of the first model can be extracted by parsing the mesh file of the first model. For example, in the case of a first model in STL or OBJ mesh format, the vertex information and patch vertex coordinate information of the first model are usually stored in the mesh file of the first model and can be read. The patch normal information can be determined by calculating the cross product of the patch vertex coordinate information.
[0059] Further, by traversing the vertex information of the first model, the maximum and minimum values in the vertex information can be determined, and then the maximum coordinate max[3] and the minimum coordinate min[3] of the bounding box (hereinafter referred to as the target bounding box) can be determined, i.e., the bounding box information is obtained.
[0060] S102, convert the first model into a first discrete point cloud model based on the bounding box information, the patch information, and a first preset point cloud resolution.
[0061] Next, the first preset point cloud resolution is used to convert the first model into a first discrete point cloud model. Specifically, the first discrete point cloud model includes a first signed distance field, which is used to represent the distance and position relationship (i.e., the inside-outside relationship with the first model) of a sampling point in the first discrete point cloud model to the surface of the first model.
[0062] In some embodiments, S102 can specifically include the following steps S1021-S1024:
[0063] S1021, determine a target bounding box according to the bounding box information.
[0064] First, the target bounding box can be determined according to the bounding box information extracted in S101, so as to serve as the spatial range for generating the sampling point cloud, facilitating point cloud sampling.
[0065] S1022, generate a sampling point cloud model based on the target bounding box and according to the first preset point cloud resolution.
[0066] Then, the point cloud sampling can be performed in the target bounding box according to the first preset point cloud resolution, so as to generate a uniformly distributed 3D point cloud, i.e., the sampling point cloud model. The sampling point cloud model can be used to facilitate the determination of the first signed distance field and can serve as the point cloud basis of the first discrete point cloud model. The sampling points in the sampling point cloud model include sampling points inside the first model, sampling points on the surface of the first model, and sampling points outside the first model.
[0067] S1023, determine the distance and position relationship of the sampling points in the sampling point cloud model to the surface of the first model according to the face information, to obtain the first signed distance field.
[0068] Specifically, the inside-outside relationship of the sampling points with the first model can be determined by calculating the projection distance of the sampling points to the polygonal face and combining the face normal information according to the face information, so as to determine the first signed distance field.
[0069] In some embodiments, the face information can include face vertex coordinate information and face normal information; and the first signed distance field can include a first distance value and a first sign. S1023 can specifically include:
[0070] The first distance value can be determined based on the coordinate information of the sampling points in the sampling point cloud model and the face vertex coordinate information. For example, the projection distance can be calculated according to the coordinate information of the sampling points and the face vertex coordinate information, to serve as the first distance value.
[0071] The first symbol is determined based on the coordinate information of the sampling points, the vertex coordinate information of the facets, and the surface normal information in the sampling point cloud model. For example, based on the coordinate information of the sampling points, the vertex coordinate information of the facets, and the surface normal information, the positional relationship between the sampling points in the sampling point cloud model and the first model can be determined by methods such as random ray casting, weighted pseudonormal method, and spherical uniform sampling method, thus obtaining the first symbol.
[0072] Wherein, when the first sign is positive, it means that the sampling point in the first discrete point cloud model is outside the first model; when the first sign is negative, it means that the sampling point in the first discrete point cloud model is inside the first model; when the first sign is 0, it means that the sampling point in the first discrete point cloud model is on the surface of the first model.
[0073] S1024. Based on the sampled point cloud model and the first symbolic distance field, generate the first discrete point cloud model.
[0074] Finally, the sampled point cloud model and the first symbolic distance field corresponding to the sampled points in the sampled point cloud model can be combined to generate the first discrete point cloud model.
[0075] S103. Determine the cell type of the target lattice unit cell and the structure function corresponding to the cell type.
[0076] In this embodiment, the cell type of the target lattice unit cell can be preset by the user according to the needs of the actual application. Then, the corresponding structure function can be determined according to the preset cell type. In this way, the structure of the target lattice unit cell is represented by the structure function (i.e., mathematical function expression), which facilitates the filling and arrangement of the target lattice unit cells to construct a 3D model based on the lattice structure, thereby improving the accuracy and efficiency of 3D model construction.
[0077] In some embodiments, the unit cell type can be categorized into truss structures and custom structures. Specifically, the unit cell type can be one of the following structures: simple cubic (SC) truss structure, body-centered cubic (BCC) truss structure, face-centered cubic (FCC) truss structure, or custom unit cell structure. For example, Figure 4 This is a schematic diagram of the lattice unit cell structure of the truss structure provided in the embodiments of this application, as shown below. Figure 4 As shown in (a), this is a schematic diagram of the skeleton structure and model structure of a simple cubic truss structure; as Figure 4 As shown in (b), this is a schematic diagram of the skeleton structure and model structure of the body-centered cubic truss structure; as Figure 4 As shown in (c), this is a schematic diagram of the skeleton structure and model structure of the face-centered cubic truss structure. Figure 4As shown, the lattice cell of the truss structure is composed of bar elements, the structure function expression is simple, and the filling of the regular target lattice cell can be quickly realized by combining the periodic arrangement function. At the same time, the structure function expression is coupled by the attribute field, which is convenient for adding attributes to the lattice structure, thereby effectively adjusting the density, thickness, radius and other parameters of the lattice structure.
[0078] Specifically, the function of the target lattice cell can be defined as:
[0079] F u = f(q), q ∈ D u = [q min , q max , q u ];
[0080] Where F x represents the target lattice cell, q:(q y , q z , q u ) is a set of points in the domain D u of the cell. D u defines a hexahedral region, and the values of the three dimensions in D u define the size of the target lattice cell. The structure of the target lattice cell is usually based on a hexahedral frame and has high symmetry. For simple cubic truss structure, body-centered cubic truss structure, face-centered cubic truss structure, the corresponding structure can be represented by processing the square or square root of different components of any point q in the cell domain D 1x , and then adding a specific thickness parameter e to determine the structure function.
[0081] Specifically, the expression of the structure function of the simple cubic truss structure can be:
[0082]
[0083] Where sc(q1,e1) represents the structure function of the simple cubic truss structure, q1 represents a point in the cell domain of the simple cubic truss structure, e1 represents the thickness parameter of the simple cubic truss structure, q 1y represents the x-axis coordinate value of the q1 point, q 1z represents the y-axis coordinate value of the q1 point, q x represents the z-axis coordinate value of the q1 point, o 1x represents the square value of q y , o 1y represents the square value of q z , and o 1z represents the square value of q .
[0084] The expression of the structure function of the body-centered cubic truss structure can be:
[0085]
[0086] m1=|q2|= (|q 2x |,|q 2y |,|q 2z |);
[0087] m 1x =|q 2x |,m 1y =|q 2y |,m 1z =|q 2z |;
[0088] wherein bcc(q2, e2) represents a structure function of the body-centered cubic truss structure, q2 represents a point in a unit cell domain of the body-centered cubic truss structure, e2 represents a thickness parameter of the body-centered cubic truss structure, q 2x represents an x-axis coordinate value of the point q2, q 2y represents a y-axis coordinate value of the point q2, q 2z represents a z-axis coordinate value of the point q2, m1 represents an absolute value of the coordinate of the point q2, m 1x represents an absolute value of q 2x , m 1y represents an absolute value of q 2y , and m 1z represents an absolute value of q 2z .
[0089] The expression of the structure function of the face-centered cubic truss structure can be:
[0090] fcc(q3, e3) = min(min(|m xy -(n x +n y ), m 2z |, |m xz -(n x +n z ), m 2y |),
[0091] |m yz -(n y +n z ), m 2x |) - e3;
[0092] m xy = |q 3x | · |q 3y |;
[0093] m xz = |q 3x | · |q 3z |;
[0094] m yz = |q 3y |·|q 3z |;
[0095] m 2x = |q 3x |,m 2y = |q 3y |,m 2z = |q 3z |;
[0096]
[0097] wherein fcc(q3, e3) represents a structure function of the face-centered cubic truss structure, q3 represents a point in a unit cell domain of the face-centered cubic truss structure, e3 represents a thickness parameter of the face-centered cubic truss structure, q 3x represents an x-axis coordinate value of the point q3, q 3y represents a y-axis coordinate value of the point q3, q 3z represents a z-axis coordinate value of the point q3, m 2x represents an absolute value of q 3x , m 2y represents an absolute value of q 3y , m 2z represents an absolute value of q 3z , n x represents one-half of m 2x , n y represents one-half of m 2y , n z represents one-half of m 2z , m xy represents m 2x times m 2y , m xz represents m 2x times m 2z , m yz represents m 2y times m 2z .
[0098] The structure function of the self-defined unit cell structure is determined based on a CSG method of constructing solid geometry through Boolean operation.
[0099] Specifically, for a custom unit cell structure, for example, for a target lattice unit cell with a complex topological structure or cannot be expressed by a specific function, a CSG method can be used to construct a structure function. The CSG method can define a new geometric shape through a series of Boolean operations of basic geometric primitives, which has significant advantages and convenience, especially for implicit expression. Through the binary operation, multiple implicit primitives can be subjected to Boolean operations. Common unit cell primitives include rod elements, cubes and spheres, and the implicit expression of these unit cell primitives is simple and convenient for use in CSG methods to combine new target lattice unit cell structures. Then, combined with the periodic function, the repeating arrangement can be implemented to fill the three-dimensional model to construct a three-dimensional model.
[0100] For example, the structure function of the custom unit cell structure can be obtained by performing Boolean operations on the unit cell primitives. The Boolean operation in the distance field is represented as:
[0101] f1∪f2=max(f1,f2);
[0102] f1∩f2=min(f1,f2);
[0103] f1-f2=min(f1,-f2);
[0104] Where f1 represents a first unit cell primitive and f2 represents a second unit cell primitive.
[0105] In S104, based on the bounding box information and the structure function, a model filling algorithm is used to fill the target lattice unit cell in the target bounding box corresponding to the bounding box information, and a target lattice structure function field is determined.
[0106] Specifically, based on the structure function determined in S103, a model filling algorithm can be used to repeatedly arrange the target lattice unit cell in the target bounding box to fill the target lattice unit cell, and a target lattice structure function field is determined.
[0107] For example, Figure 5 A schematic diagram of filling a target lattice unit cell is provided for the embodiments of the present application, as shown in Figure 5 Since the unit cell definition domain D u of the target lattice unit cell is a hexahedral domain, coordinate mapping can be performed on the unit cell definition domain D u in the Cartesian coordinate system, and then these mapped hexahedrons with the same size (i.e., the unit cell definition domain D u ) can be arranged along the x, y and z coordinate axes to achieve filling.
[0108] In some embodiments, the model filling algorithm includes an arrangement function and a geometric control function. S104 can specifically include:
[0109] The target point lattice unit is subjected to a modulo operation based on the arrangement function and the structure function, so as to arrange the target point lattice unit periodically in the target bounding box, and obtain an arranged point lattice function.
[0110] For example, the arrangement function can be a linear periodic function, a triangular periodic function, etc. Figure 6 The structure diagram of the target point lattice unit after filling provided by the embodiment of the application is shown in Figure 6 (2), which is a structure diagram of filling the target point lattice unit with the linear periodic function shown in Figure 6 (1). As shown in Figure 6 (4), which is a structure diagram of filling the target point lattice unit with the triangular periodic function shown in Figure 6 (3).
[0111] The target point lattice structure function field is obtained by adjusting the target point lattice unit in the arranged point lattice function based on the preset point lattice geometric parameter through the geometric control function. The preset point lattice geometric parameter includes a size scaling factor and a thickness parameter.
[0112] Specifically, the geometric control function can realize the variable-density point lattice filling by processing the preset point lattice geometric parameter based on the preset point lattice geometric parameter. The preset point lattice geometric parameter can be a discrete control point or a continuous geometric parameter field. The point lattice geometric parameter assignment in the target bounding box can be realized by interpolating the discrete control point, and the custom point lattice geometric parameter can be realized.
[0113] S105, voxelization processing is performed based on the target point lattice structure function field and the second preset point cloud resolution, to generate a second discrete point cloud model.
[0114] Specifically, the voxel format is a representation method of a three-dimensional model, which can explicitly express an implicit function (such as the target point lattice structure function field), and the format is simple and easy to process. Therefore, the voxelization processing can be performed based on the target point lattice structure function field and the second preset point cloud resolution, to generate the second discrete point cloud model. The second preset point cloud resolution can be the same as the first preset point cloud resolution, so as to facilitate the sampling point matching.
[0115] The second discrete point cloud model can include first voxel information. Specifically, the first voxel information can include a second signed distance field, which is generated by the target point lattice structure function field according to the second preset point cloud resolution. The second signed distance field can be used to represent the distance and position relationship between the sampling point in the second discrete point cloud model and the target point lattice unit. For example, the distance value in the second signed distance field can be the nearest distance from the sampling point in the second discrete point cloud model to the surface of the nearest target point lattice unit.
[0116] In some embodiments, the voxelization processing can be performed in a multi-thread parallel manner of a graphics processing unit (GPU), that is, the first voxel information (for example, the second signed distance field) is calculated according to the second preset point cloud resolution through the target point lattice structure function field in a multi-thread parallel manner of the GPU. In this way, the voxelization processing time can be reduced, and the efficiency of the voxelization processing can be improved.
[0117] S106, merging the first discrete point cloud model and the second discrete point cloud model to generate a target three-dimensional model.
[0118] Finally, the first discrete point cloud model and the second discrete point cloud model can be merged, specifically, the first signed distance field of the first discrete point cloud model and the second signed distance field of the second discrete point cloud model can be integrated, and other information in the first voxel information of the second discrete point cloud model can be retained, that is, the second voxel information of the target three-dimensional model is determined.
[0119] In some embodiments, the first signed distance field of the first discrete point cloud model and the second signed distance field of the second discrete point cloud model can be maximum value processing. Specifically, the second voxel information can include a third signed distance field. S106 can specifically include:
[0120] First, the sampling points in the first discrete point cloud model are matched with the sampling points in the second discrete point cloud model to obtain a matched point cloud model.
[0121] Then, the maximum value of the first signed distance field and the second signed distance field corresponding to the sampling points in the matched point cloud model is determined as the third signed distance field.
[0122] In some embodiments, the second voxel information further includes a unit cell type, a preset lattice geometry parameter, and a preset texture information. The preset texture information can be preset by a user according to actual application requirements. The preset texture information can be obtained in advance.
[0123] In an implementation manner, the unit cell type, the preset lattice geometry parameter, and the preset texture information can be included in the first voxel information, and in the merging process in S106, the first voxel information is merged into the second voxel information.
[0124] In some embodiments, the generated target three-dimensional model can be an XML format file, and the XML format is a binary storage format. In this way, the data of the target three-dimensional model can be more compact, the target three-dimensional model can be read and written conveniently and efficiently, and large-scale voxel data (that is, the second voxel information) in the target three-dimensional model can be processed conveniently.
[0125] In some embodiments, the target three-dimensional model can also be in TXT text format, or a.vti format file. Specifically, the format of the target three-dimensional model can be set according to the actual application requirements.
[0126] In some embodiments, the generated target three-dimensional model can be directly used for model slicing and additive manufacturing and direct rendering, which can meet the modeling application requirements and visualization requirements of the three-dimensional model, and greatly improve the practicability of the modeling method.
[0127] The three-dimensional modeling method based on the point array structure provided in the embodiments of the present application first extracts the bounding box information and the patch information of the first model, and converts the first model into a first discrete point cloud model. Then, the target point array unit is filled in the target bounding box based on the bounding box information and the structure function of the target point array unit, and the target point array structure function field is determined. Next, the voxelization processing is performed based on the target point array structure function field, and a second discrete point cloud model is generated. Finally, the first discrete point cloud model and the second discrete point cloud model are merged to generate a target three-dimensional model. This method is based on large-scale point array structure modeling represented by an implicit (i.e., mathematical function expression), which effectively avoids the problems of low fitting accuracy, large model data, and slow processing time of large-scale point array models under traditional grid representation. Moreover, the method uses mathematical function expressions to represent the point array structure, and does not involve a large number of grid intersection processing during the model construction process, which can effectively reduce the calculation cost, time, and memory occupation of the model modeling processing, and can solve the problem of low fitting accuracy of the model represented by the surface fitting curve. The method can quickly and accurately realize the modeling of large-scale complex point array structures. In this way, the accuracy and efficiency of the three-dimensional modeling based on the point array structure can be effectively improved.
[0128] The embodiments of the present application also provide a three-dimensional modeling system based on a point array structure, specifically, Figure 7 The structure diagram of the three-dimensional modeling system based on the point array structure provided in the embodiments of the present application is shown in FIG. 7, which includes an extraction module 701, a model conversion module 702, a point array unit definition module 703, a filling module 704, a voxelization module 705, and a model generation module 706. Figure 7
[0129] The extraction module 701 can be used to extract the bounding box information and the patch information of the first model, the first model being a grid model composed of a plurality of polygon patches, and the patch information being used to represent the structure and attributes of the polygon patches.
[0130] The module conversion module 702 can be configured to convert the first model into a first discrete point cloud model based on the bounding box information, the patch information, and a first preset point cloud resolution. The first discrete point cloud model includes a first signed distance field, which is used to represent the distance and position relationship between a sampling point in the first discrete point cloud model and the surface of the first model.
[0131] The dot cell definition module 703 can be configured to determine the cell type of the target dot cell and a structure function corresponding to the cell type.
[0132] The filling module 704 can be configured to fill the target dot cell in the target bounding box corresponding to the bounding box information based on the bounding box information and the structure function by using a model filling algorithm, and determine a target dot structure function field.
[0133] The voxelization module 705 can be configured to perform voxelization processing based on the target dot structure function field and a second preset point cloud resolution, and generate a second discrete point cloud model. The second discrete point cloud model includes first voxel information.
[0134] In an implementation manner, the voxelization module 705 can perform voxelization processing based on the target dot structure function field and the second preset point cloud resolution by using a GPU multi-thread parallel manner, that is, calculate the voxel information, and generate the second discrete point cloud model.
[0135] The model generation module 706 can be configured to perform merging processing on the first discrete point cloud model and the second discrete point cloud model, and generate a target three-dimensional model. The target three-dimensional model includes second voxel information.
[0136] The three-dimensional modeling system based on dot structure provided by the embodiments of the present application can effectively improve the accuracy and efficiency of three-dimensional modeling based on dot structure.
[0137] The electronic device can include a display screen, a memory, and one or more processors. The display screen, the memory, and the processors are coupled. The memory is configured to store computer program code including computer instructions. When the processors execute the computer instructions, the electronic device can perform each method or step performed in the above-described embodiment of the method for three-dimensional modeling based on a dot matrix structure. Of course, the electronic device includes but is not limited to the above-described display screen, memory, and one or more processors.
[0138] The embodiment of the present application further provides a computer readable storage medium for storing the computer instructions of the above-described method for three-dimensional modeling based on a dot matrix structure.
[0139] Through the description of the above embodiments, those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above-described division of functional modules is taken as an example, and in actual application, the above-described functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
[0140] In the description of the present application, it should be understood that the terms "first", "second" are only for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first", "second" can explicitly or implicitly include at least one of the features. In the description of the present application, the meaning of "a plurality of" is at least two, for example, two, three, etc., unless otherwise specifically limited.
[0141] In the description of the present application, the description of the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In the present specification, the illustrative description of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any suitable manner in any one or more embodiments or examples. In addition, different embodiments or examples described in the present specification and the features of different embodiments or examples can be combined and combined by those skilled in the art without contradiction.
[0142] The similar parts between the embodiments provided in the present application can be referred to each other, and the specific embodiments provided above are only a few examples of the general concept of the present application, and do not constitute a limitation on the protection scope of the present application. For those skilled in the art, any other embodiments extended according to the present application scheme without creative labor are within the protection scope of the present application.
Claims
1. A method for three-dimensional modeling based on dot matrix structure, characterized in that, The method comprises the following steps: extracting bounding box information and patch information of a first model, the first model being a mesh model composed of a plurality of polygonal patches, the patch information being used to represent the structure and attributes of the polygonal patches; converting the first model into a first discrete point cloud model based on the bounding box information, the patch information and a first preset point cloud resolution, the first discrete point cloud model comprising a first signed distance field, the first signed distance field being used to represent the distance and positional relationship of a sampling point in the first discrete point cloud model to the surface of the first model; determining the cell type of a target point lattice cell and a structure function corresponding to the cell type; filling the target point lattice cell in a target bounding box corresponding to the bounding box information by a model filling algorithm based on the bounding box information and the structure function, to determine a target point lattice structure function field; performing voxelization processing based on the target point lattice structure function field and a second preset point cloud resolution, to generate a second discrete point cloud model, the second discrete point cloud model comprising first voxel information, the first voxel information comprising a second signed distance field, the second signed distance field being generated from the target point lattice structure function field according to the second preset point cloud resolution; the second signed distance field being used to represent the distance and positional relationship of a sampling point in the second discrete point cloud model to the target point lattice cell; performing merging processing on the first discrete point cloud model and the second discrete point cloud model, to generate a target three-dimensional model, the target three-dimensional model comprising second voxel information, the second voxel information comprising a third signed distance field, the third signed distance field being the maximum value in the first signed distance field and the second signed distance field corresponding to a sampling point in a matching point cloud model, the matching point cloud model being obtained by matching the sampling point in the first discrete point cloud model with the sampling point in the second discrete point cloud model.
2. The method of claim 1, wherein, The method comprises the following steps: determining the target bounding box according to the bounding box information; generating a sampling point cloud model according to the first preset point cloud resolution based on the target bounding box; determining the distance and positional relationship of a sampling point in the sampling point cloud model to the surface of the first model according to the patch information, to obtain the first signed distance field; generating the first discrete point cloud model based on the sampling point cloud model and the first signed distance field.
3. The method of claim 2, wherein, The patch information comprises patch vertex coordinate information and face normal information; the first signed distance field comprises a first distance value and a first sign. The method comprises the following steps: determining the first distance value based on the coordinate information of the sampling point in the sampling point cloud model and the patch vertex coordinate information; determining the first sign based on the coordinate information of the sampling point in the sampling point cloud model, the patch vertex coordinate information and the face normal information. Wherein, when the first sign is positive, it indicates that the sampling point in the first discrete point cloud model is outside the first model; when the first sign is negative, it indicates that the sampling point in the first discrete point cloud model is inside the first model; when the first sign is 0, it indicates that the sampling point in the first discrete point cloud model is on the surface of the first model.
4. The method of claim 1, wherein, The model filling algorithm includes: permutation function and geometric control function; The step of filling the target lattice unit cell within the target bounding box corresponding to the bounding box information using a model filling algorithm based on the bounding box information to determine the target lattice structure function field includes: The target lattice unit cell is subjected to a modulo operation based on the structure function by the arrangement function, so as to periodically arrange the target lattice unit cell within the target bounding box, thereby obtaining the arranged lattice function. The target lattice unit cell in the arranged lattice function is adjusted by the geometric control function based on preset lattice geometric parameters to obtain the target lattice structure function field; wherein, the preset lattice geometric parameters include: size scaling factor and thickness parameter.
5. The method of claim 1, wherein, The unit cell type is one of the following structures: simple cubic truss structure, body-centered cubic truss structure, face-centered cubic truss structure, or custom unit cell structure; wherein... The expression for the structural function of the simple cubic truss structure is as follows: ; , , ; wherein, denotes a structure function of a simple cubic lattice structure, denotes a point within a unit cell domain of a simple cubic lattice structure, denotes a thickness parameter of a simple cubic lattice structure, denotes denotes an x-axis coordinate value of a point, denotes denotes a y-axis coordinate value of a point, denotes denotes a z-axis coordinate value of a point, denotes denotes a square value of denotes a square value of denotes a square value of denotes a square value of denotes a square value of The expression for the structural function of the body-centered cubic truss structure is as follows: ; ; , , ; wherein, represents a structure function of a body-centered cubic lattice structure, represents a point within a unit cell domain of a body-centered cubic lattice structure, represents a thickness parameter of a body-centered cubic lattice structure, represents an x-axis coordinate value of a point, represents a y-axis coordinate value of a point, represents a z-axis coordinate value of a point, represents a coordinate absolute value of a point, represents an absolute value of, represents an absolute value of, represents an absolute value of ; The expression for the structural function of the face-centered cubic truss structure is: ; ; ; ; , , ; , , ; wherein, represents a structure function of a face-centered cubic lattice structure, represents a point within a unit cell domain of a face-centered cubic lattice structure, represents a thickness parameter of a face-centered cubic lattice structure, represents an x-axis coordinate value of a point, represents a y-axis coordinate value of a point, represents a z-axis coordinate value of a point, represents an absolute value of represents an absolute value of represents an absolute value of represents one-half of represents one-half of represents one-half of represents a product of and represents a product of and represents a product of and The structure function of the custom unit cell structure is determined by Boolean operations based on the construction of solid geometry CSG method.
6. The method of claim 1, wherein, The second voxel information also includes: the unit cell type, preset lattice geometry parameters, and preset texture information.
7. The method of claim 1, wherein, The target 3D model is in XML format.
8. A three-dimensional modeling system based on dot matrix structure, characterized by, include: The module includes an extraction module, a module conversion module, a lattice unit cell definition module, a filling module, a voxelization module, and a model generation module; among them, The extraction module is used to extract bounding box information and patch information of the first model, which is a mesh model composed of multiple polygonal patches. The patch information is used to characterize the structure and properties of the polygonal patches. The module conversion module is used to convert the first model into a first discrete point cloud model based on the bounding box information, the patch information and the first preset point cloud resolution. The first discrete point cloud model includes a first symbolic distance field, which is used to characterize the distance and positional relationship between the sampling points in the first discrete point cloud model and the surface of the first model. The lattice unit cell definition module is used to determine the unit cell type of the target lattice unit cell and the structure function corresponding to the unit cell type; The filling module is used to fill the target lattice unit cell within the target bounding box corresponding to the bounding box information based on the bounding box information and the structure function, and to determine the target lattice structure function field by using a model filling algorithm. The voxelization module is configured to perform voxelization processing based on the target point lattice structure function field and a second preset point cloud resolution to generate a second discrete point cloud model, the second discrete point cloud model including first voxel information, the first voxel information including a second signed distance field, the second signed distance field being generated by the target point lattice structure function field according to the second preset point cloud resolution; and the second signed distance field being configured to represent a distance and position relationship between a sampling point in the second discrete point cloud model and the target point lattice unit cell. The model generation module is configured to perform merging processing on the first discrete point cloud model and the second discrete point cloud model to generate a target three-dimensional model, the target three-dimensional model including second voxel information, the second voxel information including a third signed distance field, the third signed distance field being a maximum value in a first signed distance field and a second signed distance field corresponding to a sampling point in a matching point cloud model, the matching point cloud model being obtained by matching the sampling point in the first discrete point cloud model with the sampling point in the second discrete point cloud model.
Citation Information
Patent Citations
Partitioned quadrilateral mesh reconstruction method for three-dimensional point cloud model
CN117726772A
Space dot matrix modeling method and system based on region boundary grid model clipping
CN118504349A