This is a U.S. National Stage under 35 U.S.C 371 of the International Application PCT/CN2016/107179, filed Nov. 25, 2016, which claims priority under 35 U.S.C. 119(a-d) to CN 201610273300.6, filed Apr. 27, 2016.
Field of Invention
The present invention relates to a method for processing a 3-dimensional mesh, and more particularly to a method for generating a hexahedral mesh based on a closed-form polycube.
Description of Related Arts
Hexahedral meshes have a wide range of applications in computer graphics and in industries such as CAD, physical simulation, geometrical construction, and so on. However, there are still many problems in automating the generation of hexahedral meshes, such as the low degree of automation and the inability to avoid global degradation, and the resulting hexahedral mesh quality is not high. Conventionally, fully automatic hexahedral mesh generation is still a big challenge.
The conventional hexahedral mesh generation methods have their own shortcomings:
1, For a hexahedral mesh generation method based on polycubes, it is necessary to assume that the initial orientation of the model is good, see [Gregson et al. 2011 All-hex mesh generation via volumetric polycube deformation In Computer graphics forum, vol. 30, Wiley Online Library, 1407-1416]. Furthermore, the method lacks user control, see [Gregson et al. 2011 All-hex mesh generation via volumetric polycube deformation In Computer graphics forum, vol. 30, Wiley Online Library, 1407-1416. Tarini et al. 2004 Polycube-maps. In ACM Transactions on Graphics (TOG), vol. 23, ACM, 853-860].
2, For complex models, such as high genus and models with complex feature line constraint, it is impossible to get a high-quality hexahedral mesh based on polycube. [Huang et al 2014. L1 based construction of polycube maps from complex shapes. ACM TOG 33, 3, 25:1-11] discloses a polycube generation method based on L1 optimization, which can be used for hexahedral mesh generation. However, the method is based on the global uniform frame field, and the quality of the hexahedral mesh is not high.
3, [Li et al. 2012. All-hex meshing using singularity-restricted field. ACM TOG 31, 6, 177:1-11] discloses a hexahedral mesh generation method based on a three-dimensional frame field with singularity. However, the method requires a grid modification operation for many degradations, and has poor robustness, leading to difficulty in handling of complex global degradation.
According to defects of conventional technologies, an object of the present invention is to provide a method for generating a hexahedral mesh based on a closed-form polycube which not only automatically generates a closed-form polycube by mapping from a triangular mesh, but also is independent of a position of a model, so as to obtain a high quality hexahedral mesh for a model with a complex topological structure.
Accordingly, in order to accomplish the above object, the present invention comprises steps of:
1) inputting a triangular mesh model, and converting into a tetrahedral mesh model;
2) obtaining all handles on surface meshes, and using the handles as a boundary of a cut surface; establishing a fitting surface and cutting the fitting surface to obtained the cut surface; cutting the tetrahedral mesh model into a model Mc with a first Betti number of 0;
3) defining a frame Rt in each of tetrahedrons of the model Mc, wherein the frame Rt is a 3×3 matrix; using a method in [Huang et al. 2011. Boundary aligned smooth 3d cross-frame field. ACM TOG] for obtaining an initial 3-dimensional frame field R, establishing a minimum spanning tree with the tetrahedrons as nodes in the model Mc which is cut, and globally aligning for the 3-dimensional frame field R, so as to obtain an aligned 3-dimensional frame field;
4) according to cut tetrahedral mesh model surface normal alignment constraint and cut model internal frame field smoothness requirements both inputted by a user, establishing and solving a frame field optimizing formula, so as to obtain a smooth frame field without singular line inside the model;
5) extracting a transition relation on the cut surface based on the smooth frame field obtained in the step 4);
6) providing Poisson reconstruction based on the smooth frame field obtained in the step 4) and the transition relation on the cut surface obtained in the step 5); constructing and solving a Poisson optimizing formula for obtaining a preliminary parameterized result;
7) according to the transition relation obtained in the step 5) and a polycube generating method optimized by a norm l1 according to [Huang et la. 2014. l1 based construction of polycube maps from complex shapes. ACM TOG], establishing and solving a L1-optimized formula for forming the closed-form polycube, wherein the L1-optimized formula is:
wherein Ā(
8) according to a polycube result generated in the step 7), extracting a polycube surface normal; according to the polycube surface normal and the transition relation on the cut surface, optimizing with an mixed integer for obtaining a final parameterized result; and
9) extracting according to the final parameterized result for generating the hexahedral mesh.
In the step 4), the frame field optimizing formula is:
wherein wf is a frame field smoothness weight, wc is a frame field smoothness weight at the cut surface, wa is a surface normal alignment weight, wd is a surface normal smoothness weight, wR is a frame field orthogonal constraint weight, Es is frame field smoothness energy, Ec is frame field smoothness energy at the cut surface, EA normal alignment energy, Ed is surface normal smoothness energy, and ER is frame field orthogonal constraint energy.
In the step 5), the transition relation on the cut surface is extracted with a following formula, and an optimized rotation of 24 kinds of cube symmetrical rotations is selected as an optimized Πk:
wherein ck is a piece collection of a number k cut surface, ti∩tj is a public plane of a tetrahedron ti and a tetrahedron tj, At
In the step 6), the Poisson optimizing formula is:
wherein Πa,b represents the public plane transfer relation from the tetrahedron ta to the tetrahedron tb,
The frame field smoothness energy Es, the frame field smoothness energy Ec at cut boundaries, the normal alignment energy EA, the surface normal smoothness energy Ed, and the frame field orthogonal constraint energy ER are calculated as follows:
the frame field smoothness energy Es is:
wherein C is the collection of the cut surface pieces, dt
the frame field smoothness energy Ec at the cutting boundaries is:
wherein C is the collection of the cut surface pieces, dt
the normal alignment energy EA is:
wherein ∥.∥1 is the norm l1, ∂M is a boundary of a tetrahedral mesh M, Rt is a frame defined in a tetrahedron t, f is a public plane of the tetrahedron t and ∂M, Af is an area of the public plane f of the tetrahedron t and ∂M, nf is a normal of the public plane f;
the above formula is optimized using an approximate replacement ∥u∥1≈√{square root over (u2+ϵ)}, ϵ=10−3;
the surface normal smoothness energy Ed is:
wherein ∂M is the boundary of the tetrahedral mesh M, fi is a public plane of the tetrahedron ti and ∂M, f1 is a public plane of the tetrahedron tj and ∂M, nf
the frame field orthogonal constraint energy ER is:
wherein t is a tetrahedron in an inputted tetrahedral mesh, Vt is a volume of t, VM is a total volume of the inputted tetrahedral mesh M, and I is a 3×3 unit matrix.
Weights of the above energy are:
wherein Vt
The rotation-irrelevant function h(r) is calculated by:
h(r)=rx2ry2+ry2rz2+rz2rx2,r=(rx,ry,rz)
wherein r=(rx,ry,rz) is a 3-dimensional vector, rx, ry, rz are respectively x, y and z coordinates of the 3-dimensional vector.
In the step 4), the aligned 3-dimensional frame field obtained in the step 3) is used as an initial value, and an LBFGS optimizer in a public database Alglib is used to optimize the frame field optimizing formula.
In the step 6), an IPOPT method is used for solving.
In the step 7), solving the L1-optimized formula specifically comprises a step of solving the preliminary parameterized result in the step 6) with an SQP method for obtaining the closed-form polycube.
In the step 7), energy in the L1-optimized formula is defined as follows.
The ARAP (as-rigid-as-possible) energy Earap is:
wherein polar(∇
The normal alignment energy Ealign is:
wherein A∂M is a total surface area of M, ∂M is a surface triangular mesh of the inputted tetrahedral mesh, Af is the area of f, and (
The normal difference energy Ediff is:
wherein
Compared with conventional technologies, the present invention has advantages as follows:
The method of the present invention has nothing to do with an initial position of an object, and is able to better satisfy a characteristic constraint of the model; further, for a model with complex topology, or a model with a characteristic line, high quality hexahedral mesh is available; L1-optimization is similar to allowing the user to control details of the polycube, thereby controlling a structure of the hexahedral mesh.
Referring to the drawings, the present invention is further illustrated.
An embodiment of a method of the present invention is as follows:
1) inputting a triangular mesh model as shown in
2) obtaining all handles on surface meshes, and using the handles as a boundary of a cut surface; establishing a fitting surface and cutting the fitting surface to obtained the cut surface; referring to
3) defining a frame Rt in each of tetrahedrons t of a tetrahedral mesh M of the model Mc, wherein the frame Rt is a 3×3 matrix; using a method in [Huang et al. 2011. Boundary aligned smooth 3d cross-frame field. ACM TOG] for obtaining an initial 3-dimensional frame field R, establishing a minimum spanning tree with the tetrahedrons as nodes in the model Mc which is cut, and globally aligning for the 3-dimensional frame field R, so as to obtain an aligned 3-dimensional frame field as shown in
4) according to cut tetrahedral mesh model surface normal alignment constraint and cut model internal frame field smoothness requirements both inputted by a user, establishing a frame field optimizing formula, wherein the aligned 3-dimensional frame field obtained in the step 3) is used as an initial value, and an LBFGS optimizer in a public database Alglib is used to solve the frame field optimizing formula, so as to obtain a smooth frame field without singular line inside the model;
5) extracting a transition relation on the cut surface based on the smooth frame field obtained in the step 4), wherein according to the embodiment, the transition relation is a rotation matrix:
6) providing Poisson reconstruction based on the smooth frame field obtained in the step 4) and the transition relation on the cut surface obtained in the step 5); constructing and solving a Poisson optimizing formula with an IPOPT method for obtaining a preliminary parameterized result as shown in
7) according to the transition relation obtained in the step 5) and a polycube generating method optimized by a norm l1 according to [Huang et la. 2014. l1 based construction of polycube maps from complex shapes. ACM TOG], establishing a L1-optimized formula, solving the preliminary parameterized result in the step 6) with an SQP method for obtaining the closed-form polycube as shown in
8) according to a polycube result generated in the step 7), extracting a polycube surface normal; according to the polycube surface normal and the transition relation on the cut surface, optimizing with a mixed integer for obtaining a final parameterized result; and
9) extracting according to the final parameterized result for generating the hexahedral mesh as shown in
Compared with conventional polycube based method, the final hexahedral mesh considers topological constraints, and has fewer angular points, wherein hexahedral units are of higher quality and features of the model are better kept.
The embodiments have been shown and described for the purposes of illustrating the functional and structural principles of the present invention and is subject to change without departure from such principles. Therefore, this invention includes all modifications encompassed within the spirit and scope of the following claims.
Number | Date | Country | Kind |
---|---|---|---|
2016 1 0273300 | Apr 2016 | CN | national |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/CN2016/107179 | 11/25/2016 | WO | 00 |
Publishing Document | Publishing Date | Country | Kind |
---|---|---|---|
WO2017/185730 | 11/2/2017 | WO | A |
Number | Name | Date | Kind |
---|---|---|---|
9972128 | Gregson | May 2018 | B2 |
20140028673 | Gregson et al. | Jan 2014 | A1 |
20160240001 | Sheffer | Aug 2016 | A1 |
20170024931 | Sheffer | Jan 2017 | A1 |
Number | Date | Country |
---|---|---|
102254351 | Nov 2011 | CN |
103824331 | May 2014 | CN |
105957151 | Sep 2016 | CN |
2012198847 | Oct 2012 | JP |
Entry |
---|
Huang, Jin, et al. “L1-Based Construction of Polycube Maps from Complex Shapes.”;ACM Transactions on Graphics (TOG);33.3 (2014): 25. (Year: 2014). |
Gregson, James, Alla Sheffer, and Eugene Zhang. “All-hex mesh generation via volumetric polycube deformation.”; Computer graphics forum. vol. 30. No. 5. Oxford, UK: Blackwell Publishing Ltd, 2011. (Year: 2011). |
Li, Yufei, et al. “All-hex meshing using singularity-restricted field.”;ACM Transactions on Graphics (TOG);31.6 (2012): 177. (Year: 2012). |
Huang, Jin, et al. “Boundary aligned smooth 3D cross-frame field.”;ACM transactions on graphics (TOG). vol. 30. No. 6. ACM, 2011. (Year: 2011). |
Jiang, Tengfei, et al. “Frame field singularity correctionfor automatic hexahedralization.”; IEEE Transactions on Visualization and Computer Graphics; 20.8 (2014): 1189-1199. (Year: 2014). |
Sorkine, Olga, and Marc Alexa. “As-rigid-as-possible surface nnodeling.”;Symposiunn on Geometry processing. vol. 4. 2007. (Year: 2007). |
Peng et al., Local to Global Optimization Algorithm for Hexahedral Mesh Quality. Journal of Mechanical Engineering, Dec. 31, 2014, vol. 50, No. 23, p. 140-146. |
Number | Date | Country | |
---|---|---|---|
20190096127 A1 | Mar 2019 | US |