You are on page 1of 14

Cut-enhanced PolyCube-Maps for Feature-aware All-Hex Meshing

HAO-XIANG GUO∗ , Tsinghua University and Microsoft Research Asia


XIAOHAN LIU∗ and DONG-MING YAN, NLPR, Institute of Automation, Chinese Academy of Sciences and School of
Artificial Intelligence, University of Chinese Academy of Sciences
YANG LIU† , Microsoft Research Asia
𝐽min : 0.589
𝐽avg : 0.947

𝐽min : 0.484 𝐽min : 0.421 𝐽min : 0.412


𝐽avg : 0.930 𝐽avg : 0.954 𝐽avg : 0.975

𝐽min : 0.364 𝐽min : 0.518 𝐽min : 0.432


𝐽avg : 0.952 𝐽avg : 0.901 𝐽avg : 0.938

𝐽min : 0.305
𝐽avg : 0.952

𝐽min : 0.467 𝐽min : 0.242


𝐽avg : 0.951 𝐽avg : 0.959

Fig. 1. High-quality hexahedral meshes generated by our CE-PolyCubeMap algorithm. Their interior singular graphs are illustrated in the insets. 𝐽min and 𝐽avg
are the minimal and average scaled Jacobian of the hexahedral mesh.

Volumetric PolyCube-Map-based methods offer automatic ways to construct essential interior singularities and preserve most input features. Our main
all-hexahedral meshes for closed 3D polyhedral domains, but their meshing idea is simple and intuitive: by inserting proper parameterization seams
quality is limited by the lack of interior singularities and feature alignment. into the initial PolyCube-Map via novel PolyCube cutting operations, the
In the presented work, we propose cut-enhanced PolyCube-Maps, to introduce mapping distortion can be reduced significantly.
∗ Both
The cut-enhanced PolyCube-Map computation includes feature-aware
authors were intern students at Microsoft Research Asia.
† Corresponding PolyCube-Map construction and cut-enhanced PolyCube deformation. The
author
former aims to preserve input feature edges during the initial PolyCube-
Authors’ addresses: Hao-Xiang Guo, ghx17@mails.tsinghua.edu.cn, Tsinghua Univer- Map construction. The latter introduces seams into the volumetric PolyCube
sity, Microsoft Research Asia; Xiaohan Liu, liuxiaohan2017@ia.ac.cn; Dong-Ming Yan, shape by cutting it through selective PolyCube edges and deforms the modi-
yandongming@gmail.com, NLPR, Institute of Automation, Chinese Academy of Sci-
fied PolyCube under the seamless constraints to compute a low-distortion
ences, School of Artificial Intelligence, University of Chinese Academy of Sciences;
Yang Liu, yangliu@microsoft.com, Microsoft Research Asia. PolyCube-Map. The hexahedral mesh induced by the final PolyCube-Map
can be further enhanced by our mesh improvement algorithm.
Permission to make digital or hard copies of all or part of this work for personal or We validate the efficacy of our method on a collection of more than one
classroom use is granted without fee provided that copies are not made or distributed
hundred CAD models and demonstrate its advantages over other automatic
for profit or commercial advantage and that copies bear this notice and the full citation
on the first page. Copyrights for components of this work owned by others than the all-hex meshing methods and padding strategies. The limitations of cut-
author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or enhanced PolyCube-Maps are also discussed thoroughly.
republish, to post on servers or to redistribute to lists, requires prior specific permission
and/or a fee. Request permissions from permissions@acm.org. CCS Concepts: • Computing methodologies → Volumetric models.
© 2020 Copyright held by the owner/author(s). Publication rights licensed to ACM.
0730-0301/2020/7-ART106 $15.00 Additional Key Words and Phrases: hexahedral meshing, PolyCube-Map,
https://doi.org/10.1145/3386569.3392378 cut-enhanced, feature-aware

ACM Trans. Graph., Vol. 39, No. 4, Article 106. Publication date: July 2020.
106:2 • Guo, et al.

ACM Reference Format: We have tested our algorithm on a collection of CAD models. Our
Hao-Xiang Guo, Xiaohan Liu, Dong-Ming Yan, and Yang Liu. 2020. Cut- resulting mesh quality is significantly better than other existing
enhanced PolyCube-Maps for Feature-aware All-Hex Meshing. ACM Trans. PolyCube-Map based methods in terms of the minimal scaled Jaco-
Graph. 39, 4, Article 106 (July 2020), 14 pages. https://doi.org/10.1145/3386569. bian and the ratio of preserved feature curves. The minimal scaled
3392378 Jacobian metric of our results is also better than the state-of-the-
art octree-based method. Besides, our method is computationally
efficient and took less than 5 minutes on average for generating
1 INTRODUCTION moderate-sized hex meshes (10k elements) on a common desktop
Hexahedral meshes are favorable by many applications, includ- PC. Nevertheless, our method still inherits intrinsic limitations of
ing computer graphics and computational simulation, due to their PolyCube-Map-based methods like the failure of PolyCube construc-
nice properties like reduced approximation error, smaller element tion. We provide a detailed discussion for further study.
counts and improved reliability [Shepherd and Johnson 2008]. The-
oretical analysis and practical algorithms of all-hexahedral mesh- 2 RELATED WORK
ing (abbreviated as all-hex meshing) have been studied for several PolyCube-based approaches. PolyCube-Maps are introduced by
decades, however, decomposing a 3D volume into an all-hexahedral Tarini et al. [2004] for efficient texture storage and mapping. They
mesh is still challenging as many requirements like low-distorted are later successfully applied for quadrilateral meshing [Bommes
hexes, feature-preserving, boundary conforming and low-number et al. 2013], volumetric spline fitting [He et al. 2009] and all-hex
elements, are not easy to satisfy. Experienced users usually need meshing [Han et al. 2010], as the iso-lines of a PolyCube-Map natu-
to partition domain interactively and spend considerable time in rally induce all-quad or all-hex meshes. However, as the singularities
processing complex inputs [Staten 2007; Takayama 2019]. of PolyCube-Maps are on the boundary and their number is also low,
Various automatic all-hex meshing methods have been devel- the resulting all-hex meshes may suffer from large distortion near
oped over the past three decades. Splitting a tetrahedron into four boundary regions. Hence, the key to improving PolyCube-Maps is
hexes is the simplest and most robust way but yields low-quality the construction of better distribution of singularities.
hex elements. Grid-based [Schneiders 1996] and octree-based meth- Gregson et al. [2011] propose a volumetric deformation method to
ods [Gao et al. 2019; Maréchal 2009] use a regular grid or extract the drive an input tetrahedral mesh to a PolyCube shape while minimiz-
dual of an octree as the hexahedral mesh efficiently, but low-quality ing the distortion introduced by the deformation. Livesu et al. [2013]
boundary hexes may exist as they deviate from regular cubes in formulate the problem of PolyCube construction as a graph-cut min-
a large degree. Sweeping-based methods require an appropriate imization, where both singularity location and mapping distortion
domain partition which is usually specified by experienced users. are considered. Yu et al. [2014] optimize PolyCube domains via pa-
The plastering approach [Staten et al. 2005] advances hex layers rameterization for reducing the map distortion. Huang et al. [2014]
from the volume boundary towards the interior region, however, it minimize the 𝑙 1 norm of mesh normals, using an as-rigid-as-possible
is hard to fill the void with hexes only. Medial structures have been deformation as the regularizer. Fang et al. [2016] guide the Poly-
used to guide all-hex meshing for simple CAD models [Sheffer et al. Cube construction by frame fields based on the previous 𝑙 1 approach
1999] and skeleton-like shapes [Livesu et al. 2016], but they do not and extend PolyCube-Maps via cuts for handling high-genus mod-
apply to more general inputs. PolyCube-Maps, which deforms a vol- els. Due to the highly non-linear optimization involved in 𝑙 1 -norm
umetric mesh to a PolyCube shape [Gregson et al. 2011; Tarini et al. approaches, their computations are very time-consuming. Fu et
2004] and extracts all-hex meshes from the integer grid lines of the al. [2016] speed up the PolyCube construction by interleaving nor-
map, have been demonstrated as an efficient and automatic all-hex mal smoothing and normal alignment deformation. Recently Yang et
meshing method. However, due to the lack of interior singularities, al. [2019] propose a robust surface PolyCube-Map via a constrained
low-quality hexes near the domain boundary are hard to avoid. voxelization, however, the induced hex meshes still have poor qual-
In the presented work, we propose a novel algorithm — Cut- ity as a high-quality surface PolyCube-Map cannot guarantee the
enhanced PolyCube-Map (abbreviated as CE-PolyCubeMap) to insert quality of volumetric PolyCube-Maps.
essential interior singularities into the initial PolyCube-Map for Li et al. [2013] extend PolyCube-Maps to generalized PolyCubes
reducing the mapping distortion and improving the resulting hex (GPCs) which are composed of a set of cuboids glued together topo-
mesh quality significantly. The singularity insertion is realized by logically, without the restriction of axis-aligned cubes. GPCs can
cutting PolyCube open from selective PolyCube edges with large handle curved domains better than PolyCube-Maps and have fewer
distortion and deforming the cut-open PolyCube under the seamless cuboids and corner points. But its domain partition relies on proper
constraints to yield a low-distortion PolyCube-Map. In this way, the surface segmentation which may need user interaction and it does
seams introduced by the cutting form the interior singularities. not support interior singularities similar to PolyCube-Maps.
To preserve as many input features as possible, we also pro- In our work, we explicitly insert interior singularities into ini-
pose a feature-aware initial PolyCube-Map construction method. It tial PolyCube-Maps for reducing map distortion and yielding hex
first determines the set of feature edges that are compatible with meshes with high-quality.
the PolyCube-Map and then computes the feature-aware initial
PolyCube-Map that maps compatible feature curves to PolyCube Frame-field-based approaches. As surface frame fields help to
edges. We also develop a mesh untangling and smoothing algorithm guide quadrilateral meshing [Bommes et al. 2009; Kälberer et al.
to further improve the hex mesh quality. 2007], their counterparts in 3D — 3D frame fields have been used

ACM Trans. Graph., Vol. 39, No. 4, Article 106. Publication date: July 2020.
Cut-enhanced PolyCube-Maps for Feature-aware All-Hex Meshing • 106:3

for hexahedral meshing [Nieser et al. 2011]. However, an arbitrary volumetric mappings from tetrahedral meshes to PolyCube shapes.
3D frame field cannot always induce a valid hex mesh layout. Li et Specifically speaking, a volumetric PolyCube mesh has the bound-
al. [2012] and Jiang et al. [2014] apply a series of mesh and field ary axis-aligned property, i.e. , the normal direction of any bound-
operations to repair frame fields but have no theoretical guarantee ary facet aligns with one of coordinate axis directions: (±1, 0, 0),
of their success. The works of [Liu et al. 2018; Solomon et al. 2017] (0, ±1, 0), (0, 0, ±1). The boundary of a PolyCube mesh can be clus-
construct all-hex meshes from octahedral fields, but octahedral fields tered to a set of co-planar regions, called PolyCube charts. Each
either have no singularity or its singular graph valid to hex meshing chart 𝐶𝑖 consists of a set of connected triangle facets that lie on the
requires manual editing. By observing that the local characteriza- common plane, denoted by Π𝑖 : x · n𝑖 = 𝑤𝑖 , x ∈ R3 , where n𝑖 is the
tion of cross fields and ordinary frame fields are identical, Corman normal direction of 𝐶𝑖 and 𝑤𝑖 is called axis-coordinate value of 𝐶𝑖 .
and Crane [2019] introduce symmetric moving frames for designing For any two PolyCube charts 𝐶𝑖 and 𝐶 𝑗 whose normal directions
3D frame fields. However, its singular graph construction is still are parallel and 𝑤𝑖 ≥ 𝑤 𝑗 , we denote this relationship by 𝐶𝑖 ⪰ 𝐶 𝑗 .
manually specified. Livesu et al. [2020] propose an strongly hex- PolyCube edges are the straight lines between any two adjacent
dominant meshing algorithm based on block decomposition, which PolyCube charts and the endpoints of PolyCube edges are called
is guided by a pre-computed frame field on the surface. But such PolyCube corners. If the interior angle between two adjacent Poly-
decomposition is not always valid for all-hex meshing, as it heavily Cube charts is 90°, we say the PolyCube edge between these charts
depends on frame field topologies. Till now, generating 3D frame convex; for another case that the angle is 270°, we say the PolyCube
fields compatible with all-hex meshing is still challenging. edge concave.
In our work, we restrict the topology of PolyCube shapes by the
Mesh layout and quality improvement. Hex meshes generated by
sufficient criteria used in [Eppstein and Mumford 2010; Fu et al.
various approaches can be further improved by post-processing. Op-
2016; Livesu et al. 2013], i.e. , any charts have at least four neighbor-
timizing vertex positions to maximize mesh quality [Knupp 2001a,b]
ing charts; any two neighboring charts have no opposite normal
is the mainstream approach [Brewer et al. 2003; Ruiz-Gironés et al.
directions; and the valance of any PolyCube corner is 3.
2015]. Livesu et al. [2015] improve hexahedra quality by optimizing
With a PolyCube-Map that parameterizes a tetrahedral mesh as
the shape of the overlapping cones of the tetrahedra surrounding
a PolyCube shape, one can trace the integer parameterization lines
every directed hex edge. Gao et al. [2015] improve mesh quality by
inside the tetrahedral mesh to construct an all-hex mesh.
reparameterizing and adjusting mesh layouts. Wang et al. [2018;
2017] manipulate the hex mesh layout by various sheet operations Algorithm input. The objective of our algorithm is to generate a
for improving mesh quality. high-quality all-hex mesh for an input closed domain Ω. The input
For hex meshes generated from PolyCube-Maps, padding one or to our algorithm includes:
more layers of hexes along the boundary globally can provide more
chances to improve mesh quality [Gregson et al. 2011]. However, – M: a closed triangle mesh representing the domain boundary 𝜕Ω
𝑛𝑓 𝑒
original good-quality hexes can be damaged as pointed out by Cher- with the labelled sharp feature edges {f𝑖 }𝑖=1 ;
chi et al. [2019] . Cherchi et al. propose to add a padding layer on – T0 : a tetrahedral mesh that discretizes Ω;
the selected distorted regions, to improve hexes with poor-quality
– 𝑙ℎ : the expected average edge length of the resulting hex mesh.
only. However, as the selective padding is only able to add at most
one layer of hexes, its improvement to hex quality is still limited. T0 can be obtained by applying conforming Delaunay triangula-
Our CE-PolyCubeMap provides an automatic mechanism to adjust tion [Si 2015] to M and the feature edges of M are transformed to
hex mesh layouts for improving quality. T0 , denoted by {f𝑖0 }𝑛𝑖=1
0
. The feature edges could be sharp features
Cut-enhanced parameterization. The idea of adding cuts into sur- detected from CAD models according to the dihedral angle or man-
face parameterization progressively for improving parameterization ually labeled. To avoid the degeneracy that the facets of a boundary
quality can be dated back to the works of [Gu et al. 2002; Sorkine tetrahedron are contained by different PolyCube charts and the
et al. 2002], in which mesh edges with large distortion are cut open case that four vertices of a boundary tetrahedron are all on the do-
from the boundary. The recent approaches [Li et al. 2018; Poranne main boundary, we pre-process T0 as follows: for any non-boundary
et al. 2017] jointly optimize surface cuts and parameterization to tetrahedral edge whose endpoints are on the boundary, we perform
balance the cut number and the parameterization quality in a more edge split from its middle point; and for any tetrahedron whose
efficient way. Sharp and Crane [2018] formulate a flow approach that four vertices are on the boundary, we split it into four tetrahedra
minimizes distortion without explicit surface parameterization, and by inserting a center point.
their cuts are not restricted to mesh edges. The above cut-enhanced
parameterization methods work on surface domains only and do Algorithm pipeline. Our algorithm includes three main steps which
not hold the global seamless property on the cuts, while our CE- are illustrated in Figure 2.
PolyCubeMap and the work of [Fang et al. 2016] which adds cuts (1) Feature-aware initial PolyCube-Map construction (Section 4).
for breaking handle loops are for 3D seamless parameterization. Representing all the feature lines by hex mesh edges is difficult
due to the topological restriction of PolyCube-Maps. We design
3 ALGORITHM OVERVIEW a 3D PolyLine deformation algorithm to filter out feature edges
PolyCube and PolyCube-Map. PolyCube shapes are volumes bounded that are not compatible with PolyCube-Maps, and use the re-
by axis-aligned planes. The commonly-used PolyCube-Maps define maining features as guidance to deform the tetrahedral mesh

ACM Trans. Graph., Vol. 39, No. 4, Article 106. Publication date: July 2020.
106:4 • Guo, et al.
tetrahedral mesh initial PolyCube-Map

feature-aware deform cut & deform cut & deform

hex extract & optimize cut & deform

all-hex mesh singular graph CE-PolyCubeMap

Fig. 2. The algorithm pipeline of our CE-PolyCubeMap. An input surface mesh is first converted to a tetrahedral mesh with tagged feature edges (in green
color). The tetrahedral mesh is deformed to a PolyCube shape by a feature-aware PolyCube deformation (PolyCube edges corresponding to the input feature
edges are also in green color). A series of cutting and deformation operations are applied to the initial PolyCube (the newly-added PolyCube charts are in blue
color). The all-hex mesh is extracted from the final CE-PolyCubeMap and is further improved by our mesh improvement method. We illustrate the PolyCube
shape of the CE-PolyCubeMap from two different views for better visualization, the singular graph of the hex mesh is also rendered.

of which feature lines can be mapped to PolyCube edges, so that


some feature lines can become the hex mesh edges that correspond
to PolyCube edges. We call this step 3D PolyLine deformation (Sec-
tion 4.1). In the second step, we encourage PolyCube-compatible
(a) (b1) (c1) (d1)
feature lines to align with the coordinate axes directions during the
PolyCube deformation of T0 (Section 4.2). Finally, we label the mesh
boundary as PolyCube charts and construct the initial PolyCube-
Map (Section 4.3).
(b2) (c2) (d2)
4.1 3D PolyLine deformation
Fig. 3. (a) An input tetrahedral mesh with feature edges in green color.
(b1,b2), (c1, c2), (d1, d2) are the PolyCube shapes and the all-hex meshes We denote l𝑖 = v𝑖,0 v𝑖,1, 𝑖 = 1, . . . , 𝐿 as the feature edge segments of
computed by the method of [Livesu et al. 2013], [Fu et al. 2016] and our T0 , and V ′ as the set of vertices on the feature edges. We seek an
CE-PolyCubeMap, respectively. The first two methods do not preserve the as-isometric-as-possible deformation to align each l𝑖 with one of
curved feature lines. coordinate axis directions. The deformation is formulated as the
into a PolyCube shape in which the remaining feature curves following nonlinear minimization problem:
map to PolyCube edges.
1Õ  2

0 0
(2) Cut-enhanced PolyCube-Map construction (Section 5). On the min ∥v𝑖,0 − v𝑖,1 ∥ − ∥v𝑖,0 − v𝑖,1 ∥ +
R,l𝑖 𝐿
initial PolyCube shape, we insert interior singularities on the 𝑖
2 2 2 2 2 2 1 Õ
∥v − v𝑐 ∥ 2, (1)

large distortion region via cutting the initial PolyCube through 𝜇 1 (𝑒𝑖,𝑥 𝑒𝑖,𝑦 + 𝑒𝑖,𝑦 𝑒𝑖,𝑧 + 𝑒𝑖,𝑧 𝑒𝑖,𝑥 ) + 𝜇 2 ′
selected PolyCube edges with adaptive cutting depths, and de- |V | ′
v∈V
form the cut-open PolyCube into a low-distortion PolyCube where R is the global rotation matrix applied to all the feature lines,
shape under the seamless constraints. These cutting and defor- and (𝑒𝑖,𝑥 , 𝑒𝑖,𝑦 , 𝑒𝑖,𝑧 )𝑇 is the normalized edge direction of R · l𝑖 , v𝑐 is
mation operations are executed iteratively until there is no cut the average of one-ring neighbors of v in V ′ , v𝑖,0 0 and v0 are the
that can improve the PolyCube-Map. 𝑖,1
initial vertex coordinates. The first term is the isometric term that
(3) Hex mesh extraction and improvement (Section 6). We extract keeps the feature edge lengths unchanged, the second term aligns
an all-hex mesh from the cut-enhanced PolyCube-Map, and the rotated edge direction to be one of coordinate axis directions, the
improve its mesh quality and geometry fidelity to the input third term is a smoothing regularization term that helps to prevent
shape and the PolyCube-compatible feature lines. neighboring edges from folding together.
We employ the L-BFGS algorithm [Liu and Nocedal 1989] to min-
4 FEATURE-AWARE INITIAL POLYCUBE-MAP imize the above objective with respect to R and vertex positions al-
CONSTRUCTION ternatively. R is initialized by the identity transformation and repre-
Existing PolyCube-Map methods like [Fu et al. 2016; Gregson et al. sented by the Euler angles. 𝜇 1 and 𝜇 2 are initialized with 0.01 and 0.1
2011; Livesu et al. 2013] do not consider feature preserving explicitly. respectively, and they are updated with the rule: 𝜇 1 = 10𝜇 1 and 𝜇 2 =
Figure 3 shows such an example whose sharp curved feature lines 𝜇 2 /10 after every 500 L-BFGS iterations for enforcing align edges
are not kept by existing methods. with the axis directions progressively. The algorithm terminates
To preserve feature lines maximally in PolyCube-Maps, we pro- when the angle deviation between the edge direction and its closest
pose a three-step approach. We first deform the input feature lines of axis direction is smaller than 5°, or the total iteration number exceeds
T0 towards the coordinate axes directions and check the possibility 1500. Figure 4-a shows the deformation of the Fandisk’s features.

ACM Trans. Graph., Vol. 39, No. 4, Article 106. Publication date: July 2020.
Cut-enhanced PolyCube-Maps for Feature-aware All-Hex Meshing • 106:5

criterion and operations introduced in Section 4.2 & 4.3 will be used
(a) (b) for determining the remaining non-compatible feature edges.
We use the above criteria as guidance to filter out most non-
compatible feature edges. The basic procedure is to remove the non-
(c) compatible feature edges with the largest deformation distortion
progressively and check whether the removal makes the remaining
(e) (d)
feature edges PolyCube-compatible. Figure 4-b shows this kind of
edge removal, where red edges violate criteria (3)&(4).

4.2 Feature-aware PolyCube deformation


Fig. 4. Illustration of feature-aware initial PolyCube-Map construction. (a) After removing most PolyCube-incompatible feature lines, we adopt
For the input model with tagged feature lines, the features are first deformed Fu et al. [2016]’s approach with the consideration of feature line
by our 3D PolyLine deformation. (b) The incompatible features in red color alignment to deform T0 towards a PolyCube shape.
are removed and the tetrahedral mesh is then deformed to a PolyCube-like The deformation energy includes the following terms.
shape. (c) The boundary facets of the deformed tetrahedral mesh are labelled
as PolyCube charts. (d) For the feature lines which do not correspond to - The Advanced MIPS energy 𝐸𝑖𝑠𝑜 for penalizing the isometric
PolyCube chart boundaries, we revise the chart labelling (see the zoomin distortion [Fu et al. 2016]:
inset) accordingly. (e) With the corrected chart labels, all the chart facets of
1 Õ  
𝐸𝑖𝑠𝑜 := Í exp (𝛿𝑖 (2)
𝑐𝑜𝑛𝑓
the tetrahedral mesh are flattened and form a PolyCube shape. + 𝛿𝑖𝑣𝑜𝑙 )/2 .
t𝑖 1 t 𝑖

PolyCube-compatible feature edges. We use the deformed feature and are conformal distortion and volumetric distor-
𝑐𝑜𝑛𝑓
𝛿𝑖 𝛿𝑖𝑣𝑜𝑙
lines to select PolyCube-compatible feature edges. We first classify tion of tetrahedron t𝑖 with respect to its initial shape: 𝛿𝑖 =
𝑐𝑜𝑛𝑓
the original feature lines as feature curve loops and feature curve 1 ∥A ∥ 2 ∥A−1 ∥ 2 − 1 , 𝛿 𝑣𝑜𝑙 = 1 (det A + det A−1 ). A is defined
 
segments, any of which consists of a set of feature tetrahedral edges. 8 𝑖 𝐹 𝑖 𝐹 𝑖 2 𝑖 𝑖 𝑖
The two endpoints of a feature curve segment are the vertices that by the linear transformation from t𝑖 to its initial shape.
connect with 1 or more than 2 feature edges. The 3D PolyLine - The normal-alignment energy 𝐸𝑠 that aligns the face normal to
deformation may create several turning points on each feature curve, one of the axis directions:
we call these points corners, and these corners turn the loop feature 1 Õ
curves and feature curve segments into a set of shorter feature curve 𝐸𝑠 := Í 𝑛𝑥 (f𝑖 ) 2𝑛 𝑦 (f𝑖 ) 2 + 𝑛 𝑦 (f𝑖 ) 2𝑛𝑧 (f𝑖 ) 2 + 𝑛𝑧 (f𝑖 ) 2𝑛𝑥 (f𝑖 ) 2,
f𝑖 1
segments. We assign the closest axis directions of these feature f𝑖
curve segments as their target feature directions. Note that target (3)
edge directions are oriented according to the direction of feature where (𝑛𝑥 (f𝑖 ), 𝑛 𝑦 (f𝑖 ), 𝑛𝑧 (f𝑖 ))𝑇 is the normal of the boundary facet
edge segments. f𝑖 under the global rotation R𝑔 .
To allow a feature curve segment 𝐹𝑒 (whose endpoints are denoted - The feature direction-alignment energy 𝐸𝑙 defined on all the fil-
by a and b) to be mapped to a PolyCube edge or a partial PolyCube tered feature edges:
edge whose one of two endpoints correspond to a or b, we ask 𝐹𝑒
1 Õ 2 2 2 2 2 2

to obey the following criteria. 𝐸𝑙 := Í 𝑛𝑖,𝑥 𝑛𝑖,𝑦 + 𝑛𝑖,𝑦 𝑛𝑖,𝑧 + 𝑛𝑖,𝑧 𝑛𝑖,𝑥 . (4)
𝑙𝑖 1
(1) deg(a) ≤ 3 and deg(b) ≤ 3. Here deg(·) measure the vertex
𝑙𝑖

degree in the curve network spanned by the feature curves. - The orthogonal adjacent normal energy 𝐸𝑜 defined on all the
(2) deg(a) and deg(b) cannot be 1 at the same time. filtered feature edges:
(3) For any of edge points whose vertex degree is 2, the two feature 1 Õ
𝐸𝑜 := Í ∥n𝑖,0 · n𝑖,1 ∥ 2, (5)
curve segments connecting to it should not have opposite target 𝑙𝑖 1 𝑙𝑖
edge directions, i.e. , the neighboring edges cannot collapse.
(4) If the degree of one of the endpoints is 3, the target edge di- where n𝑖,0 and n𝑖,1 are the normals of the boundary facets adjacent
rections of its three adjacent feature curve segments should be to 𝑙𝑖 , they should be orthogonal to each other if 𝑙𝑖 appears as a
orthogonal to each other. segment of a PolyCube edge.
- The feature normal-guided energy 𝐸𝑔 for aligning these feature
The above first criterion is due to our topological restriction of
edges remained from the 3D PolyLine deformation with their
valence-3 PolyCube corners, so at most three feature curves can
target axis directions:
meet at a common PolyCube corner. The second criterion enforces
that at least one of the endpoints maps to a PolyCube corner. The 1 Õ
𝐸𝑔 := Í ∥R𝑔 n(𝑙𝑖 ) − n𝑜 (𝑙𝑖 )∥ 2, (6)
third criterion avoids two neighboring feature curves overlapping to 𝑙𝑖 1 𝑙𝑖
each other, and the fourth criterion requires that any three feature
segments that share a common endpoint should form a PolyCube where n(𝑙𝑖 ) is the normalized edge direction of 𝑙𝑖 and n𝑜 (𝑙𝑖 ) is its
corner region. Note that these criteria are not sufficient, one more target normal direction.

ACM Trans. Graph., Vol. 39, No. 4, Article 106. Publication date: July 2020.
106:6 • Guo, et al.

- The smoothing energy 𝐸 𝑣 which adds the Laplacian energy on changes small.
each boundary vertex:
1
∥v − v𝑐 ∥ 2 .
Õ
𝐸 𝑣 := Í (7) 𝐾
v∈𝜕 T 1 |𝑤𝑘 − 𝑤𝑘0 | 2
Õ
v∈𝜕 T Minimize
𝑤1 ,...,𝑤𝐾
Here v𝑐 is the average of the vertices in the one-ring neighbor-
𝑘=1 (9)
subject to (c𝑖 − c 𝑗 ) · e𝑖 𝑗 ≥ 𝑙ℎ′ , ∀𝐸𝑖 𝑗 ;
hood of v. Note that if v is on the feature edges, its neighborhood
should include the feature points only. 𝑤 𝑗 − 𝑤𝑘 ≥ 0, ∀(𝐶 𝑗 , 𝐶𝑘 ) is a parallel pair,
By combining the above energy terms, we formulate our feature-
aware PolyCube deformation energy 𝐸𝑎𝑙𝑙 : where 𝐸𝑖 𝑗 represents a PolyCube edge whose endpoints are c𝑖 and
𝐸𝑎𝑙𝑙 := 𝐸𝑖𝑠𝑜 + 𝜇 3 (𝐸𝑠 + 𝐸𝑜 ) + 𝜇 4 𝐸 𝑣 + 𝜇 5 (𝐸𝑙 + 𝐸𝑔 ). (8) c 𝑗 , e𝑖 𝑗 is the edge direction of 𝐸𝑖 𝑗 , 𝑤𝑘0 is the average coordinate
value of the vertices on the chart 𝐶𝑘 , and 𝐾 is the number of charts.
We again use the L-BFGS algorithm to minimize the objective with The first constraint enforces the length of each PolyCube edge to
respect to the tetrahedral mesh vertices and R𝑔 alternatively. The be no shorter than 𝑙ℎ′ . The second constraint separates two parallel
weights are initialized as 𝜇 3 = 1, 𝜇4 = 1000, 𝜇5 = 1, and they are charts to avoid PolyCube self-intersected. Here we assume 𝑤 0𝑗 ≥ 𝑤𝑘0
updated after 500 iterations by the rule: 𝜇 3 = 10𝜇 3, 𝜇5 = 𝜇 5 /10. The
without loss of generality.
algorithm terminates when the angle deviation from the boundary
The pairs of parallel charts are constructed in the following way.
facet normal to the closest axis direction is smaller than 5°, or the
We first flatten the PolyCube charts by setting 𝑤 𝑗 s to 𝑤 0𝑗 s. On each
total iteration number exceeds 2500. After the optimization, the
coordinate axis plane, i.e. , xy-,yz-,zx- planes, the plane can be di-
deformed tetrahedral mesh, denoted by T1 , is ready for building the
vided into multiple rectangles by the projection of all the orthogonal
initial PolyCube shape.
chart planes. By shooting an orthogonal ray from the center of each
PolyCube-compatible feature edge reselection. In the 3D PolyLine rectangle and intersecting it with PolyCube charts, any two adja-
deformation, we select the PolyCube-compatible feature edges only cent intersection points along the ray are on the two parallel charts,
based on the feature curve deformation. In fact, these feature edges which define a parallel chart pair. Similarly, on each chart plane, we
should also comply with the PolyCube charts. We introduce one also shoot orthogonal rays from each segment of the chart boundary
more criterion for filtering out non-compatible feature edge seg- to find other parallel chart pairs.
ments further. Once all the 𝑤𝑖 s are updated, we translate the boundary vertices of
(5) The target normal directions of the neighboring facets of a fea- T1 to the new chart planes to obtain a new boundary of P0 . Since the
ture edge should be orthogonal to each other and the target interior vertices are not changed, P0 may contain large distortion
axis direction of the feature edge too. Here the target normal and even inverted elements. We employ the algorithm of [Escobar
direction of a facet is the closest axis direction of its facet normal. et al. 2003] to untangle and smooth P0 and let the boundary vertices
move along PolyCube edges or on chart planes only. The resulting
4.3 Initial PolyCube construction PolyCube mesh is denoted by P𝑐 .
Chart labeling. We employ the monotone graph-cut algorithm
to label the boundary facets of T1 as PolyCube charts [Livesu et al. 5 CUT-ENHANCED POLYCUBE-MAP CONSTRUCTION
2013] . However, this algorithm does not take feature edge align- PolyCube edge prioritization. We observe that low-quality hexes
ment into consideration. We propose to refine the graph-cut result extracted from PolyCube-Maps are often close to some PolyCube
by the following greedy approach. If a feature edge is not on the edges due to large deformation. We assign a distortion score to each
chart boundary, the region surrounded by the feature and the nearby PolyCube edge for determining the severe degree of their distortion
chart boundary is selected, and the chart orientation of this region and prioritize all the PolyCube edges according to their scores for
is relabeled so that the feature edge can appear as a chart boundary. the cutting operation. The distortion score is computed as follows.
The greedy assignment works robustly in our experiments. For the For each PolyCube edge 𝐸 in P𝑐 , the average isometric distortion
very rare case that the relabeling always violates the PolyCube topol- of the tetrahedra in the 𝑚-ring neighborhood of 𝐸 is defined as
ogy, we set the relevant feature edge as incompatible and remove it its distortion score score(𝐸), where the isometric distortion 𝛿 𝑖𝑠𝑜 is
from the feature edge set. Figure 4-c&d illustrate the labelling and defined as max(𝜎max, 1/𝜎min ), in which 𝜎max, 𝜎min are the maximal
refinement steps. and minimal singular values of the associated linear transformation
PolyCube construction. For the user-specified hex edge length 𝑙ℎ , matrix. We set 𝑚 = 3 in our implementation.
Remark. An alternative and more accurate way to score Poly-
we scale it in the PolyCube domain: 𝑙ℎ′ := 𝑙 P 𝑙ℎ , here 𝑙 P and 𝑙 T are Cube edges is to extract a hex mesh from the PolyCube-Map first and
𝑙T
the average tetrahedral edge length of T1 and T0 . To make the initial then measure the hex quality around the PolyCube edges directly.
PolyCube compatible to the target edge length 𝑙ℎ′ , the length of each But this way requires an additional integer programming for hex
PolyCube edge should be larger than 𝑙ℎ′ . We solve the following mesh extraction and a hex mesh optimization step for improving
linearly-constrained quadratic programming problem to relocate hex quality. Our scoring strategy provides a good balance between
the axis-coordinate values of all the charts while keeping these computational efficiency and score accuracy.

ACM Trans. Graph., Vol. 39, No. 4, Article 106. Publication date: July 2020.
Cut-enhanced PolyCube-Maps for Feature-aware All-Hex Meshing • 106:7

p c

Fig. 6. Left: an invalid 1-cut for the red-colored PolyCube edge. p is a


hanging vertex, the line segment pc cannot be cut open. Right: the associated
cuts (in green color) and the cutting surface.

1-cut 3-cut
– A 3-cut associated with PolyCube edges 𝐸𝑎 , 𝐸𝑏 , 𝐸𝑐 is valid if and
only if all the other PolyCube edges adjacent to any of 𝐸𝑎 , 𝐸𝑏 and
Fig. 5. 1-cut and 3-cut. There are only two cases of 1-cut: cutting from a 𝐸𝑐 are convex.
convex edge or a concave edge. Depending on the convex combination of
The above rules can be verified by enumerating all the convex/concave
three PolyCube edges, there are four cases of 3-cut: (convex, convex, convex),
(convex, convex, concave), (convex, concave, concave) and (concave, concave, edge combinations. We omit the details here.
concave). The gray regions are the cutting surface. Associated cuts. We solve the issue of invalid cuts by involving
more neighboring edges for a joint cut. If a hanging vertex p induced
by a PolyCube edge 𝐸 is connected to a PolyCube corner c, we add
5.1 PolyCube cut operation all the PolyCube edges connected with c into the cut edge set. If
We process all the PolyCube edges one by one in a distortion- any added PolyCube edge introduces new hanging vertices, we
descending order. The ordered PolyCube edges are denoted by keep adding the neighboring edges of PolyCube corners that have a
E𝑐 := {𝐸 1, . . . , 𝐸𝑐 }. We remove the PolyCube edges that correspond common connection to the new hanging vertices. The set of all the
to features from E𝑐 as they are supposed to represent the features involved PolyCube edges is called associated cuts of 𝐸. Figure 6(right)
without further operations. Without loss of generality, we assume shows an example of the associated cut edges. All the associated
𝐸 1, . . . , 𝐸𝑘−1 ∈ E𝑐 have been processed and a few of PolyCube cut edges induce a joint cutting surface illustrated in gray.
edges have been cut successfully, denoted by U𝑘−1 . We detail the
Joint cut selection. To cut through edge 𝐸𝑘 , we need to consider
processing of 𝐸𝑘 as follows.
its associated PolyCube edges and the cuts from the previous step
Cut type. The basic cut operation is to insert a planar rectangu- for 𝐸𝑘−1 . We initialize an edge set E that includes 𝐸𝑘 and start the
lar sheet 𝑠𝑘 with a depth 𝑑𝑘 into P𝑐 through 𝐸𝑘 from outside to following recursive edge-growing to find a joint cut that is valid to
inside, thus the cutting surface can be split into two new charts our PolyCube cut.
for introducing an interior singular edge to the map. We let 𝑠𝑘 be (1) For any PolyCube edge ∈ E, we add its neighboring PolyCube
coincident with the bisector plane passing through 𝐸𝑘 , and this edges that belong to U𝑘−1 into E for a joint cut.
type of cut operation is called 1-cut. Figure 5(left) illustrates 1-cuts (2) For any PolyCube corner who has two neighboring PolyCube
on a convex PolyCube edge (top) and a concave PolyCube edge edges in E, we add the third neighboring PolyCube edge into E.
(bottom), respectively. There is another type of cut called 3-cut, i.e. , In this way, we add a 3-cut at this corner.
three connected PolyCube edges including 𝐸𝑘 can be cut through (3) For any PolyCube edge ∈ E, if its 1-cut is not valid, we add its
together. The cutting surface of 3-cut is the sweeping offset of three associated cuts into E.
edges along their bisector planes. Figure 5-right enumerates all the
The growing of E is terminated until there is no more new edge
four cases of the 3-cut: each case corresponds to a combination of
added, we call E the joint cut set of 𝐸𝑘 . Note that the joint cut set
edge convexity of the three edges. Note that 1-cut and 3-cut are
may contain PolyCube edges corresponding to the feature edges. In
all the possible cut types as we restrict the PolyCube topology by
this case, these PolyCube edges can be cut.
allowing valence-3 PolyCube corners only.
The above cut types are not always feasible to introduce two new Cut-enhanced PolyCube construction. A new cutting surface can
PolyCube charts. A hanging vertex at the cutting surface, i.e. , a cor- be induced by the joint cut set E and the initial PolyCube shape can
ner point of a cutting sheet which is not on the PolyCube boundary be modified accordingly. We detail the algorithm as follows.
and is not shared by other cutting sheets, prevents splitting the (1) Cutting surface updating. Notice that E may contain Poly-
cutting surface into two opposite charts, because the line segment Cube edges that have been cut before. To avoid the conflict
connecting the hanging corner and one of the two endpoints of the between the new cutting surfaces and the existing cutting sur-
PolyCube edge are always glued. Figure 6(left) shows a hanging face set (denoted by 𝑆𝑘−1 ), we remove the cutting surfaces from
vertex caused by an invalid 1-cut. 𝑆𝑘−1 if one of their corresponding PolyCube edges is in E. The
Invalid 1-cuts or 3-cuts can be detected by the following rules: updated cutting surface set is denoted by 𝑆𝑘−1′ .

– A 1-cut of PolyCube edge 𝐸 is valid if and only if all the PolyCube (2) New cutting surface creation. We construct a cutting sheet
edges adjacent to 𝐸 are convex. 𝑠𝑘 by offsetting all the cuts in E along the bisector plane with

ACM Trans. Graph., Vol. 39, No. 4, Article 106. Publication date: July 2020.
106:8 • Guo, et al.

𝐶 0𝑗 0
𝐶𝑞 𝐶 𝑗 𝐶 0𝑗 𝐶𝑞
𝐶𝑝 orientation by 𝐶𝑠0 and n𝑠0 , 𝑠 = 1, . . . , 𝑁𝑐 , respectively. The new charts
𝐶 0𝑗
𝐶𝑞
induced by the cut appear in pair. For two paired charts 𝐶𝑝 and 𝐶𝑞
𝐶𝑞
𝐶𝑝
𝐶𝑝 𝐶𝑝
𝐶𝑙0 𝐶𝑙0 𝐶𝑙0 𝐶𝑙0
which lie on the bisector plane of the PolyCube charts 𝐶 0𝑗 and 𝐶𝑙0
(𝐶𝑝 is adjacent to 𝐶𝑙0 and 𝐶𝑞 is adjacent to 𝐶 𝑗 ), we assign the target
(a) (b) (c) (d)
Fig. 7. Cut chart orientation assignment. (a) and (c) are the projection orientations of 𝐶𝑝 and 𝐶𝑞 to be n𝑙0 and n0𝑗 , respectively, if the cut
views of a cut on a convex PolyCube edge and a concave PolyCube edge, edge is convex. Otherwise, the target orientations are set to −n𝑙0
respectively. Charts 𝐶𝑝 and 𝐶𝑞 deviate from their original positions for and −n0𝑗 . Figure 7 illustrates these chart orientation assignment.
better visualization. The proposed chart assignments make (a) become (b),
and (c) become (d) via deformation. Seamless mapping constraints. We explicitly construct hard con-
straints to guarantee that any two paired newly-added charts have
depth 𝑑𝑘 . 𝑑𝑘 is initialized by 𝑑𝑘 = 𝛽 𝑑 max , where 𝑑 max is the
the same original image during deformation. For any vertex v at
maximum cutting depth with which 𝑠𝑘 has no intersection with
one of a pair of new charts, there is a corresponding vertex w at
any existing cutting surface and the input PolyCube boundary.
another chart. Before deformation, v and w lie on a bisector plane:
The minimum cutting depth is set to 𝑑★ as 𝛼 𝑙ℎ′ . In our imple-
n𝑐 ·x−𝑑 = 0, x ∈ R3, 𝑑 ∈ R. we enforce v and w be always symmetric
mentation, we set 𝛼 = 0.5 and 𝛽 = 0.3.
with respect to the bisector plane during deformation:
(3) Retopology PolyCube mesh. We re-tetrahedralize P𝑐 using
the constrained Delaunay triangulation [Si 2015]. The constrained w = v − 2(v · n𝑐 − 𝑑) n𝑐 . (10)
facets consist of 𝜕P𝑐 , 𝑆𝑘−1
′ and the cutting surface 𝑠𝑘 . By duplicat- Seamless PolyCube-based deformation. We substitute Equation (10)
ing the vertices and facets on the cutting surface, we obtain a new into the objective Equation (8). Since the initial P𝑘 is already a
mesh topology where each cut in 𝑠𝑘 corresponds to two charts. PolyCube-like shape except the newly added charts, a few iterations
The modified P𝑐 is denoted by P𝑘′ . By mapping the vertices of are sufficient to align new charts with their target normal directions.
P𝑘′ back to the original domain via the barycentric interpolation
using the original map defined by P𝑐 , we obtain a tetrahedral 6 HEX MESH EXTRACTION AND IMPROVEMENT
mesh T𝑘 in the original domain whose mesh topology is the After all the PolyCube edges are processed by the cutting oper-
same as P𝑘 . As the feature edges are mapped to PolyCube edges, ation and deformation, we extract the integer iso-lines from the
they also have correspondences to the new tetrahedral edges cut-enhanced PolyCube-Map (denoted by P𝑐★), and map them back
along those PolyCube edges. to the final generated tetrahedral mesh (denoted by T𝑐★), to form an
(4) Seamless PolyCube deformation. We then deform P𝑘′ using all-hex mesh. This kind of all-hex meshes usually have good average
a seamless PolyCube deformation method (Section 5.2) to drive quality, but may still contain low-quality hexes due to the mapping
the new charts to become PolyCube charts and ensure that the distortion. We propose an efficient mesh untangling and smoothing
inverse images of these charts are seamlessly connected in the method to improve mesh quality.
original domain. The deformed mesh is denoted by P𝑘 .
(5) Cutting depth adjustment. We check whether the total iso- 6.1 Hex mesh extraction
metric distortion of the map from T𝑘 to P𝑘 is smaller than that We first resize P𝑐★ with a scale factor of 1/𝑙ℎ′ for making the unit
of the map from T𝑘−1 to P𝑘−1 . The total isometric distortion 𝐷𝑘 length 1 correspond to the expected edge length, then solve the
is defined as t∈ T𝑘 min(𝛿 𝑖𝑠𝑜 (t), 10). Here we truncate 𝛿 𝑖𝑠𝑜 (t) following linearly-constrained integer quadratic programming (IQP)
Í
to remove the outlier. If 𝐷𝑘 < 𝐷𝑘−1 , we accept this cutting oper- problem to align axis-coordinates of all the PolyCube charts to
ation and update 𝑆𝑘 := 𝑆𝑘−1′ Ð 𝑠 ; U := U 𝐸𝑘 ; otherwise integer values.
Ð
𝑘 𝑘 𝑘−1
we reduce the cutting depth by 𝑑𝑘 := 𝑑𝑘 /2 and goto Step (2). If 𝐾
𝑑𝑘 < 𝑑★, we set 𝑑𝑘 = 𝑑★ and cut 𝐸𝑘 directly and continue to |𝑤𝑘 − 𝑤𝑘0 | 2
Õ
Minimize
process the next PolyCube edge 𝐸𝑘+1 . 𝑤1 ,...,𝑤𝐾
𝑘=1
subject to (c𝑖 − c 𝑗 ) · e𝑖 𝑗 ≥ 1, ∀𝐸𝑖 𝑗 ;
5.2 Seamless PolyCube deformation
(c𝑖 − c 𝑗 ) · e𝑖 𝑗 = (c𝑖 − c𝑘 ) · e𝑖𝑘 , ∀𝐸𝑖 𝑗 = pair(𝐸𝑖𝑘 );
The cutting surface constructed in the cutting step is composed of a
𝑤𝑘 ∈ Z, ∀𝑤𝑘 ,
set of planar sheets. In the retopology step, each sheet is split into
two opposite boundary charts. We propose a PolyCube deformation where 𝐸𝑖 𝑗 = pair(𝐸𝑖𝑘 ) means that 𝐸𝑖 𝑗 and 𝐸𝑖𝑘 are the corresponding
method to turn these newly-added charts into PolyCube charts. PolyCube edges on a pair of newly-added PolyCube charts. Under
the seamless condition, these two edges should have the same length.
Prepocessing. T𝑘 constructed via the barycenter interpolation may
e𝑖 𝑗 and e𝑖𝑘 are the PolyCube edge directions of 𝐸𝑖 𝑗 and 𝐸𝑖𝑘 .
contain some inverted elements. We employ the algorithm of [Es-
We use the Mosek software [ApS 2015] to solve the above IQP
cobar et al. 2003] to untangle inverted tetrahedra and improve the
program. For the rare case that there are no feasible solutions, we
isometric quality of T𝑘 with respect to the vertex positions of P𝑘 so
reduce the expected hex edge length by half to enrich a larger
that both T𝑘 and P𝑘 are inversion-free.
integer search space and solve the problem again. The updated
Cut chart orientation. For the original PolyCube charts in P𝑐 , chart coordinates determine a new PolyCube shape boundary. We
their orientations are known. We denote these charts and their axis then use the same smoothing algorithm introduced in Section 4 to

ACM Trans. Graph., Vol. 39, No. 4, Article 106. Publication date: July 2020.
Cut-enhanced PolyCube-Maps for Feature-aware All-Hex Meshing • 106:9

eliminate the inverted tetrahedra while minimizing the mapping contains feature edges, we run 10 iterations of Laplacian smoothing
distortion with respect to vertex positions of T𝑐★. Finally, we trace on its feature edges, boundary non-feature vertices, and the interior
the integer lines inside T𝑐★ to obtain an all-hex mesh H via the hex vertices sequentially, and project the boundary vertices back
robust hex extraction tool, HexEx [Lyon et al. 2016]. to the input feature edges or onto the surface of M. We define a
smoothing energy term on the boundary vertices:
6.2 Hex mesh improvement
𝜆𝑖 ∥v𝑖 − v𝑖0 ∥ 2 .
Õ
We formulate the hex mesh quality improvement as the following E𝑙 = (15)
optimization problem. For each corner of a hex cell ℎ𝑐𝑖 , denoted v𝑖 ∈𝜕H
by 𝐶𝑖,𝑗 , 𝑗 ∈ {1, . . . , 8}, we define the following energy function to Here v𝑖0 is the smoothed version of v𝑖 . We set a large 𝜆𝑖 = 105 for
penalize low-quality hexes:
feature points and a smaller value 103 for non-feature points.
1
𝑓𝑖,𝑗 := q . (11) Mesh improvement. We minimize the nonlinear objective E = E𝑠 +
𝐽𝑖,𝑗 − 𝜂 + (𝐽𝑖,𝑗 − 𝜂) 2 + 𝜎 E𝑙 using the following inexact block coordinate descent algorithm.
Here 𝐽𝑖,𝑗 is the scaled Jacobian defined by the three hex edges at this (1) For each mesh vertex v ∈ H , compute the gradient of E with
corner, 𝜎 is a tiny value and is set to 10−12 in our implementation respect to v, which is denoted by 𝑔v . A simple line-search is per-
and 0 ≤ 𝜂 < 1 is a soft lower bound of scaled Jacobian specified by formed: v := v − 𝜆𝑔v until the update reduces E or the maximal
the user. If 𝐽𝑖,𝑗 is smaller than or close to 𝜂, the value of 𝑓𝑖,𝑗 increases line-search step is reached. If v𝑖 is a boundary vertex, v𝑖0 is also
rapidly (≈ 𝜎 −1 ); if 𝐽𝑖,𝑗 reaches the optimal value 1, 𝑓𝑖,𝑗 is also in its replaced with this update.
minimum (≈ (1 − 𝜂) −1 /2). The summation of 𝑓𝑖,𝑗 over all the hex (2) Go to Step (1) until no hex has the scaled Jacobian 𝐽 ★ less than
corners forms the objective function: 𝜂 or the max iteration number is reached.
𝑁Õ 8
ℎ𝑒𝑥 Õ
In our implementation, we speed up the above iteration by executing
E𝑠 := 𝑓𝑖,𝑗 . (12)
the vertex update in a parallel mechanism. We experimentally found
20 iterations are usually sufficient to reach good quality as Laplacian
𝑖=1 𝑗=1
where 𝑁ℎ𝑒𝑥 is the total hex number. smoothing provides a good initialization.
Extension. As pointed by Zhang [2005], positive Jacobians at the
eight corners of a hex cannot guarantee that the trilinear mapping 7 EXPERIMENTS
defined in a hex has positive Jacobians everywhere. Zhang [2005] We evaluate our CE-PolyCubeMap on a collection of CAD models.
gives a sufficient and necessary condition: 32 subtetrahedra of a hex All the experiments were conducted automatically, on a desktop
including 8 corner subtetrahdra should have positive Jacobians. We PC with an Intel Core I7-4790 CPU (3.60 GHz) and 16 GB memory.
extend Equation (12) by involving all these 32 subtetrahedra. As the The default expected hex edge length is set to min{3𝑙¯T0 , 0.03𝑙𝑏 },
optimal scaled Jacobians√of each subtetrahedron are √ different: 1 for where 𝑙¯T0 is the average edge length of the input surface mesh
8 corner subtetrahedra, 2/2 for 12 subtetrahedra, 6/6 for other and 𝑙𝑏 is diagonal length of the bounding box of the mesh. 𝜂 in
12 subtetrahedra, we revise 𝐽𝑖,𝑗 in Equation (12) by using the unified Equation (14) is set to 0.4 by default. Hex mesh images in our paper
mesh quality definition [Lobos 2015] as follows. Denote the optimal were rendered by the hex mesh viewer [Bracci et al. 2019]. The C++
scale Jacobian by 𝐾, 𝐽𝑖,𝑗 is revised as: implementation of our algorithm is available at https://guohaoxiang.
github.io/projects/ce_polycube.html.


 1 + 𝐾 − 𝐽𝑖,𝑗 𝐽𝑖,𝑗 > 𝐾;
(13) Evaluation metrics. The quality of PolyCube-Maps and all-hex



𝐽𝑖,𝑗 = −(1 + 𝐾) − 𝐽𝑖,𝑗 𝐽𝑖,𝑗 < −𝐾;
otherwise. meshes are evaluated using the following metrics. For PolyCube-

 𝐽𝑖,𝑗 /𝐾

Maps, we report the ratio of how many feature edges are preserved

Accordingly, Equation (12) is revised to (denoted by 𝐹𝑟 ), the number of cuts — 𝑁𝑐 , the number of PolyCube
𝑁Õ 32 corners in the initial PolyCube — 𝑁𝑛𝑐 and the number of added
ℎ𝑒𝑥 Õ
1
E𝑠 := q . (14) PolyCube corners in the cut-enhanced PolyCube — 𝑁𝑖𝑐 . For hex
★ −𝜂 + ★ − 𝜂) 2 + 𝜎
(𝐽𝑖,𝑗
𝑖=1 𝑗=1 𝐽𝑖,𝑗 meshes, the commonly-used minimal and average of the scaled
Jacobians at eight hex corners are measured, denoted by 𝐽min and
Feature edge correspondence. As we have the correspondence of
𝐽avg whose optimal values are 1.
input feature lines and PolyCube edges, we obtain these feature
We also measure how well the hex edge length matches the user-
correspondences between M and H automatically. We denote the
specified edge length. We report its average ratio: 𝑟 avg . To evaluate
pairs of feature lines by {C𝑖 ∈ M, C𝑖𝐻 ∈ H }, where each feature
the singularity of hex meshes, we build its interior singular graph by
line consists of a series of mesh edges. The hex mesh vertices on
adding all the interior hex edges whose two endpoints are irregular,
the feature lines are called feature points.
i.e. , the vertex degree of an interior vertex is not 6, and the vertex de-
Mesh fairing. Laplacian smoothing is the classic mesh fairing gree of a boundary vertex is not 4. The branch number of the singular
scheme for improving mesh layout although it may introduce in- graph, denoted by 𝑁𝑠 , reflects the singularity complexity. The aver-
verted elements on the constrained concave region, here we use it age distance 𝑑 avg and Hausdorff distance 𝑑𝐻 between the boundary
as the preprocessing for our mesh improvement algorithm. If H of the hex mesh and the input surface mesh are also reported.

ACM Trans. Graph., Vol. 39, No. 4, Article 106. Publication date: July 2020.
106:10 • Guo, et al.

Table 1. Mesh quality statistics of our method, [Livesu et al. 2013] and [Gao Joint
et al. 2019] on the benchmark dataset. Here #Np is the number of models
that a method fails to generate a valid PolyCube-Map, #Nh is the number
𝐽min : 0.683 𝐽min : 0.729
of models that a method fails to solve the integer programming problem 𝐽avg : 0.980 𝐽avg : 0.984
for extracting hex meshes. The “a-b” range counts the number of models
whose 𝐽min is in this range. Hanger

Method #Np #Nh <0.0 0.0-0.2 0.2 - 0.4 0.4 - 0.6 0.6 - 1.0 𝐽min : 0.412 𝐽min : 0.599
𝐽avg : 0.881 𝐽avg : 0.964
[Gao et al. 2019] - - 0 80 26 3 0
[Livesu et al. 2013] 21 17 28 15 16 12 0 CE-PolyCubeMap [Li et al. 2012]
CE-PolyCubeMap 11 13 0 19 11 34 21 Fig. 8. Comparison with the method of [Li et al. 2012].

7.1 Benchmark and comparisons


We conducted an all-hex meshing benchmark on a collection of
CAD models: 109 CAD models from [Gao et al. 2019]’s collection.
We experienced with our CE-PolyCubeMap, and two other auto-
matic hex-meshing methods: (1) The PolyCut method of [Livesu et al.
2013] whose binary executable files and mesh optimizer [Livesu
et al. 2015] are publicly available. We use the default parameters
of PolyCut toolsets. (2) The octree-based meshing approach [Gao
et al. 2019] that is able to preserve all the shape features. Our CE-
PolyCubeMap uses the default and same parameters for all the
models except the Fandisk model, for which we use 𝜂 = 0.2 to avoid
large surface derivation on some poor-quality hexes during mesh
Fig. 9. CE-PolyCubeMaps on simple shapes (triangle prism, tetrahedron
optimization.
and torus). From left to right: the input shape, the cut-enhanced PolyCube
We also tested the global padding [Gregson et al. 2011], selective shape, the resulting hex mesh. Their minimal scaled Jacobians are 0.482,
padding [Cherchi et al. 2019] and no-padding strategies based on our 0.402 and 0.696, respectively.
initial feature-aware PolyCube-Maps. Since there is no public imple-
mentation of the selective padding algorithm, we re-implemented it
for the comparison purpose. We also found that the trilinear mappings from our optimized hex
The quality statistics of all the tested methods on a subset of meshes always have positive Jacobians thanks to the use of our
models is reported in Table 2, and the hex meshes are illustrated in revised objective (Equation (14)).
Figure 1 and Figure 10. The meshing results of CE-PolyCubeMap
Comparison with SRF. In Figure 8, we compare CE-PolyCubeMap
are also provided in the supplemental material. The success rate of
with the singularity-restricted field (SRF) method [Li et al. 2012]
all the PolyCube-based methods and the statistics of the resulting
which controls mesh layout by 3D frame-fields. Due to better decom-
hex mesh quality are reported in Table 1. A few facts are revealed
positions induced by boundary-aligned frame fields, SRF achieves
from our experiments.
better mesh quality than our CE-PolyCubeMap, especially on the
(1) All the PolyCube-based methods include our CE-PolyCubeMap cylinder-like region where PolyCube-Maps always create corners.
cannot deal with arbitrary inputs. The failure happens when However, SRF often fails to handle more complex inputs like the
the chart labeling fails to yield a valid PolyCube topology, and rkm012_1 model (shown in Figure 10) according to our experiments.
the integer programming solver fails to find a feasible solution.
Capability of meshing polyhedral shapes. It is known that sim-
Note that the method of [Livesu et al. 2013] has a higher failure
ple polyhedral shapes like tetrahedra and triangular prism are not
rate than CE-PolyCubeMap.
friendly to PolyCube deformation and construction as their sharp
(2) CE-PolyCubeMap achieves much higher 𝐽min than using other features are not easy to align with the PolyCube edges. With our CE-
padding strategies and other alternative methods in most tested PolyCubeMap, these shapes can be converted to feature-preserved
models. It also obtains fewer cuboids than using the global or all-hex meshes with good quality (see Figure 9).
the selective padding strategy while the average hex edge length
is closer to the expected hex edge length. 7.2 Robustness evaluation
(3) The octree-based method of [Gao et al. 2019] is capable of pre- We evaluate the robustness of our algorithm to the choice of different
serving all the input features but the mesh quality is not high parameters from the following aspects.
due to the poor quality hexes close to the mesh boundary, while
our CE-PolyCubeMap may miss a small portion of features (see Random cutting order. We compare our cutting strategy with a
𝐹𝑟 metric in Table 2). On the computational efficiency aspect, random cutting order on a model shown in Figure 11. The resulting
CE-PolyCubeMap spends 5 minutes on a single model averagely, PolyCube structures are similar, but the cutting depths are different.
while the octree method needs 69 minutes. Our default cutting strategy achieves the highest quality.

ACM Trans. Graph., Vol. 39, No. 4, Article 106. Publication date: July 2020.
Cut-enhanced PolyCube-Maps for Feature-aware All-Hex Meshing • 106:11

Table 2. Statistics and timings for cut-enhanced PolyCube-Map construction and all-hex meshing. We report tetrahedra number (#tet0 , #tet) of initial PolyCube
shapes and cut-enhanced PolyCube shapes, the ratio of how many features are preserved int the PolyCube-Maps: 𝐹𝑟 , the PolyCube construction time 𝑇𝑝 (in
seconds), the original PolyCube corner number (𝑁𝑒𝑐 ) and the added corner number (𝑁𝑖𝑐 ), the number of cut 𝑁𝑐 and the mapping computation time 𝑇𝑐 (in
seconds), the number (#hvert) and hex number (#hex) of the hex mesh, the minimal and average of scaled Jacobian (𝐽min , 𝐽avg ), the average and standard
derivation of hex edge ratio with respect to the user-specified edge length, the average and Hausdorff distance between the boundary of hex mesh and the
input model (𝑑 avg and 𝑑𝐻 normalized by the scale of the model and multiplied by 1000), the number of singularity branches 𝑁𝑠 of the hex mesh, and the
untangling and smoothing time (𝑇𝑠 in seconds). The model name with suffix (cut) means the result is from our CE-PolyCubeMap, and the suffix (sp), (gp)
and (ori) mean the hex mesh is obtained from the initial PolyCube with the selective padding, the global padding and without padding, respectively. The
suffix (octree) denotes the results of [Gao et al. 2019] and the suffix (polycut) corresponds to the approach of [Livesu et al. 2013] which fails to compute the
PolyCube-Map for the socket2-Part model. “-” means the statistics are not applicable. Numbers with bold fonts mean better quality. The order of models is the
same as the figure order in Figure 10.

Model&Method #tet0 𝐹𝑟 𝑇𝑝 #tet 𝑁𝑒𝑐 𝑁𝑖𝑐 𝑁𝑐 𝑇𝑐 #hvert #hex 𝐽min 𝐽avg 𝑟 avg 𝑑 avg 𝑑𝐻 𝑁𝑠 𝑇𝑠
Caddy02_63(cut) 5955 1.000 8.97 7102 24 36 8 25.27 1483 1058 0.518 0.901 1.009 0.921 5.580 16 0.42
Caddy02_63(sp) 5955 1.000 8.97 - 24 - - - 2188 1628 0.282 0.925 0.875 0.512 5.178 16 0.74
Caddy02_63(gp) 5955 1.000 8.97 - 24 - - - 2275 1756 0.155 0.884 0.870 0.532 5.350 60 1.58
Caddy02_63(ori) 5955 1.000 8.97 - 24 - - - 1365 848 0.163 0.829 1.059 0.548 5.508 0 0.41
Caddy02_63(octree) - - - - - - - - 4358 3418 0.168 0.762 - 0.397 2.663 1770 -
Caddy02_63(polycut) - - 5.03 - - - - - 1048 773 0.134 0.872 - 1.143 7.720 60 2.10
DEMO01_1(cut) 57440 1.000 46.41 5385 96 50 8 31.33 6522 4767 0.444 0.936 1.011 0.116 7.684 23 2.09
DEMO01_1(sp) 57440 1.000 46.41 - 96 - - - 6834 5069 0.163 0.963 0.994 0.087 10.030 18 4.28
DEMO01_1(gp) 57440 1.000 46.41 - 96 - - - 9384 7687 0.071 0.897 0.902 0.096 8.390 240 2.53
DEMO01_1(ori) 57440 1.000 46.41 - 96 - - - 6126 4421 0.118 0.975 1.034 0.085 7.597 0 1.89
DEMO01_1(octree) - - - - - - - - 12275 9949 0.091 0.771 - 0.052 1.987 4933 -
DEMO01_1(polycut) - - 31.24 - - - - - 20674 17529 -0.899 0.954 - 0.559 10.427 240 664.42
DEMO09_1(cut) 56266 1.000 77.10 4983 96 36 8 31.61 10330 8222 0.364 0.961 0.975 0.171 8.206 16 3.25
DEMO09_1(sp) 56266 1.000 77.10 - 96 - - - 11686 9332 0.084 0.963 0.932 0.120 7.797 20 40.67
DEMO09_1(gp) 56266 1.000 77.10 - 96 - - - 13147 11112 0.064 0.900 0.905 0.134 9.170 240 3.45
DEMO09_1(ori) 56266 1.000 77.10 - 96 - - - 9187 7144 0.061 0.960 1.019 0.127 10.157 0 2.73
DEMO09_1(octree) - - - - - - - - 18139 15163 0.163 0.793 - 0.092 14.101 6585 -
DEMO09_1(polycut) - - 45.68 - - - - - 25784 22539 -0.790 0.952 - 0.656 12.534 210 360.57
drill-trace1_1(cut) 48970 1.000 104.27 4045 32 64 16 14.13 31568 27313 0.762 0.985 0.958 0.063 1.040 16 8.87
drill-trace1_1(sp) 48970 1.000 104.27 - 32 - - - 34464 30025 0.501 0.979 0.931 0.052 1.011 12 8.22
drill-trace1_1(gp) 48970 1.000 104.27 - 32 - - - 38368 34111 0.149 0.961 0.901 0.058 1.026 80 9.27
drill-trace1_1(ori) 48970 1.000 104.27 - 32 - - - 30144 25885 0.163 0.979 0.976 0.052 1.001 0 8.06
drill-trace1_1(octree) - - - - - - - - 18581 15696 0.169 0.883 - 0.071 1.681 3735 -
drill-trace1_1(polycut) - - 22.06 - - - - - 6226 5126 0.339 0.941 - 1.122 9.792 80 3.74
fandisk(cut) 50538 0.933 188.64 9095 40 52 10 64.10 45156 39858 0.242 0.959 0.905 0.044 4.151 20 13.39
fandisk(sp) 50538 0.933 188.64 - 40 - - - 48739 43276 0.070 0.959 0.897 0.030 4.912 18 38.33
fandisk(gp) 50538 0.933 188.64 - 40 - - - 57094 51722 0.054 0.943 0.829 0.041 5.712 100 14.49
fandisk(ori) 50538 0.933 188.64 - 40 - - - 46650 41280 0.022 0.956 0.903 0.031 5.031 0 12.34
fandisk(octree) - - - - - - - - 12954 10552 0.044 0.770 - 0.063 4.307 5705 -
fandisk(polycut) - - 165.31 - - - - - 4562 3751 -0.359 0.914 - 1.322 15.554 90 123.86
retainer_1(cut) 38100 1.000 77.69 4338 48 40 10 11.55 16608 13514 0.412 0.975 0.986 0.085 3.477 10 4.91
retainer_1(sp) 38100 1.000 77.69 - 48 - - - 17275 14152 0.065 0.957 0.976 0.077 1.670 10 11.18
retainer_1(gp) 38100 1.000 77.69 - 48 - - - 22615 19528 0.046 0.928 0.898 0.086 1.586 120 5.61
retainer_1(ori) 38100 1.000 77.69 - 48 - - - 16595 13506 0.092 0.973 0.990 0.075 1.696 0 4.57
retainer_1(octree) - - - - - - - - 30329 25776 0.159 0.835 - 0.063 2.167 8431 -
retainer_1(polycut) - - 15.68 - - - - - 7314 6038 0.188 0.922 - 1.478 7.614 120 5.35
rkm012_1(cut) 37790 0.988 107.79 11221 42 105 37 128.91 15076 12999 0.379 0.942 1.055 0.271 10.645 77 4.41
rkm012_1(sp) 37790 0.988 107.79 - 42 - - - 19502 16846 0.037 0.963 0.959 0.167 10.970 70 22.96
rkm012_1(gp) 37790 0.988 107.79 - 42 - - - 22316 19669 0.122 0.956 0.920 0.167 9.232 105 5.74
rkm012_1(ori) 37790 0.988 107.79 - 42 - - - 17228 14583 0.004 0.977 1.006 0.163 9.459 0 4.78
rkm012_1(octree) - - - - - - - - 32701 28301 0.114 0.831 - 0.153 8.233 12604 -
rkm012_1(polycut) - - 18.03 - - - - - 4298 3536 0.105 0.935 - 1.338 13.654 85 2.46
sculpt(cut) 58695 1.000 75.16 4471 40 84 24 25.17 25562 21695 0.528 0.949 0.959 0.108 1.927 28 7.86
sculpt(sp) 58695 1.000 75.16 - 40 - - - 32440 27828 0.325 0.887 0.899 0.081 0.709 11 21.14
sculpt(gp) 58695 1.000 75.16 - 40 - - - 36595 32190 0.052 0.858 0.870 0.093 0.716 100 9.15
sculpt(ori) 58695 1.000 75.16 - 40 - - - 28095 23688 0.012 0.878 0.961 0.086 0.643 0 7.67
sculpt(octree) - - - - - - - - 19068 15202 0.104 0.759 - 0.148 2.374 11171 -
sculpt(polycut) - - 30.45 - - - - - 6671 5496 0.255 0.885 - 1.854 6.990 100 3.75
socket2-Part(cut) 67995 0.988 69.69 6210 120 89 21 82.40 34862 29592 0.421 0.954 0.969 0.087 6.513 24 10.08
socket2-Part(sp) 67995 0.988 69.69 - 120 - - - 35992 30645 0.244 0.932 0.961 0.086 6.017 20 10.43
socket2-Part(gp) 67995 0.988 69.69 - 120 - - - 45206 39951 0.058 0.904 0.899 0.089 6.280 300 11.09
socket2-Part(ori) 67995 0.988 69.69 - 120 - - - 34952 29685 0.011 0.945 0.975 0.080 6.198 0 9.08
socket2-Part(octree) - - - - - - - - 20033 16396 0.086 0.841 - 0.082 3.152 4791 -
socket2-Part(polycut) - - 18.16 - - - - - - - - - - - - - -
thin_wall_1(cut) 64749 0.979 97.67 18125 24 20 5 82.64 9252 6908 0.424 0.896 1.015 0.166 7.071 12 3.05
thin_wall_1(sp) 64749 0.979 97.67 - 24 - - - 10440 7401 0.098 0.899 0.959 0.052 3.362 20 5.35
thin_wall_1(gp) 64749 0.979 97.67 - 24 - - - 15628 12635 0.032 0.872 0.852 0.078 4.306 60 4.30
thin_wall_1(ori) 64749 0.979 97.67 - 24 - - - 9768 6777 0.078 0.925 0.987 0.050 4.187 0 3.20
thin_wall_1(octree) - - - - - - - - 15424 12645 0.194 0.824 - 0.151 15.232 4542 -
thin_wall_1(polycut) - - 14.23 - - - - - 5486 4250 0.185 0.914 - 2.120 8.185 60 98.01

ACM Trans. Graph., Vol. 39, No. 4, Article 106. Publication date: July 2020.
106:12 • Guo, et al.

Failure result

CE-PolyCubeMap Selective padding Global padding Without padding [Gao et al. 2019] [Livesu et al. 2013]
Fig. 10. Hex meshes computed by different methods. From left to right: CE-PolyCubeMap, our initial feature-aware PolyCube-Map with selective padding [Cher-
chi et al. 2019], our initial feature-aware PolyCube-Map with global padding [Livesu et al. 2013], our initial feature-aware PolyCube-Map without padding, the
octree method [Gao et al. 2019] and the PolyCut method [Livesu et al. 2013]. The hex cells are colorized with respect to their scaled Jacobian value where blue
color indicates better quality.

Mesh resolution in the re-tetrahedrization step. In our implementa- mesh. We found this choice is sufficient for most tested examples.
tion, we use TetGen [Si 2015] to perform the constrained Delaunay We also test other settings like vol/4, vol/2 and vol and found our
triangulation. To control the density of the resulting tetrahedral algorithm is able to generate similar-quality results for different
mesh, we set the minimal tetrahedral volume value as the twice settings. Table 3 shows a test on the Sculpt model.
of the average tetrahedral volume (vol) of the input volumetric

ACM Trans. Graph., Vol. 39, No. 4, Article 106. Publication date: July 2020.
Cut-enhanced PolyCube-Maps for Feature-aware All-Hex Meshing • 106:13

𝐽min : 0.421 𝐽min : 0.343 𝐽min : 0.350 𝐽min : 0.332


𝐽avg : 0.954 𝐽avg : 0.952 𝐽avg : 0.953 𝐽avg : 0.950
𝐽min : 0.756 𝐽min : 0.762 𝐽min : 0.711 𝐽min : 0.690
𝐽avg : 0.986 𝐽avg : 0.985 𝐽avg : 0.965 𝐽avg : 0.955
𝑟 avg : 1.009 𝑟 avg : 0.958 𝑟 avg : 1.059 𝑟 avg : 0.972

Fig. 12. Robustness test with respect to different expected hex edge lengths:
Fig. 11. CE-PolyCubeMap construction by using the distortion-ordered cut 𝑙, 2𝑙, 4𝑙, 6𝑙.
(left) and random-ordered cuts (the right three models). The cut-enhanced
PolyCubes and the corresponding all-hex meshes are illustrated.

Table 3. The effect of different mesh resolution to the cut-enhanced


PolyCube-Map construction. We report the tetrahedra number of the input
PolyCube and the final cut-enhanced PolyCube shape: #tet0 and #tet, the
hex number of the all-hex mesh and its minimal and average minimal scaled
Jacobian, and the computational time (in seconds).

vol𝑐 #tet0 #tet 𝑁𝑐 #hex 𝐽min 𝐽avg Time


vol/4 58695 53862 24 21441 0.505 0.947 60.16 Fig. 13. The hex meshes computed by CE-PolyCubeMap (left), Takayama’s
vol/2 58695 37281 24 22322 0.552 0.949 40.33 interactive design (middle), and the octree-based approach [Gao et al.
vol 58695 23312 24 23452 0.511 0.948 22.94
2019] (right). Their minimal and average scale Jacobians are 0.242/0.959,
2 vol 58695 4471 24 21695 0.528 0.949 25.17
0.217/0.905, 0.044/0.770, respectively.

Sensitive analysis of PolyLine deformation. Our 3D PolyLine defor- to PolyCube edges only. By relaxing this restriction, i.e. , allowing
mation is relatively robust to the initial values of 𝜇1 and 𝜇 2 . We tested feature lines to be mapped to integer isolines that do not correspond
25 different combinations, where 𝜇 1 ∈ {0.01, 0.03, 0.05, 0.07, 0.09}, to PolyCube edges, it is possible to preserve more feature lines.
𝜇 2 ∈ {0.1, 0.3, 0.5, 0.7, 0.9} on the Sculpt model. We found that the Furthermore, for preserving complicated features and achieving
PolyCube corner numbers of all the results are the same: 40, and all high quality simultaneously, the interactive hex layout design is
the features are preserved. quite useful as done by Takayama [2019]. In Figure 13 we compare
our algorithm with Takayama’s approach and the octree method
Expected hex edge length. We vary the expected hex edge length on the Fandisk model, and it is clear that the result of interactive
to test the robustness of our method. Figure 12 show the test results design is more preferred.
on model drill-trace1, where the expected hex edge length varies
from (𝑙, 2𝑙, 4𝑙, 6𝑙). Here 𝑙 is the average edge length of the input Restricted edge cutting. In our implementation, the PolyCube
surface. The results and their quality shows that our method can edges for cutting are selected from the initial PolyCube only. In
handle various hex edge lengths robustly and the generated hex fact, edge cutting can be performed on the cut-enhanced PolyCube
mesh matches the expected edge length well. at each intermediate step for introducing other kinds of interior
singularities. However, as the intermediate cut-enhanced PolyCube
8 CONCLUSION AND LIMITATION DISCUSSION can be self-intersected, the re-tetrahedrization of a self-intersected
We present cut-enhanced PolyCube-Maps for feature-aware all- PolyCube domain becomes a practical issue. Besides, our prelimi-
hexahedral meshing. Our CE-PolyCubeMap not only inherits the nary test shows that this non-restricted cut is often rejected because
automatic mechanism of PolyCube-Map based methods but also multiple cuts at the same place often yield large distortion to the
improves mapping quality significantly via the novel cutting and subsequent PolyCube deformation.
deformation operations that create interior singularities. Its efficacy Limited singularity types. The cutting operation in our method
is validated on a collection of CAD models and it achieves better only introduces interior singularities that connect with the bound-
mesh quality than existing automatic all-hex meshing methods. ary, and it cannot model the looped interior singular structure, like
A few limitations exist clearly and provide opportunities for fur- four circular singular lines embedded in a torus model. A promising
ther study. solution is to first use the closed-form induced PolyCube [Fang
et al. 2016] to break all tunnel loops of a shape and deform it under
Failure of PolyCube construction. As shown in the benchmark,
the guidance of a singularity-free frame field, then use our method
neither our CE-PolyCubeMap nor other existing PolyCube-Map
to insert interior singularities. Another possible way is to decom-
approaches can obtain a valid PolyCube-Map always for arbitrary
pose the domain using the generalized PolyCube [Li et al. 2013]
inputs. Currently, the theoretical analysis for predicting this failure
and combine our cutting. But from the mesh quality point of view,
is still lack and it can only be revealed via extensive computation.
our CE-PolyCubeMap is still capable of generating a high-quality
Feature preservation. Our algorithm has no guarantee to preserve all-hex mesh without looped singularities, like the torus shown in
all the input features. It also enforces shape features to be mapped Figure 9.

ACM Trans. Graph., Vol. 39, No. 4, Article 106. Publication date: July 2020.
106:14 • Guo, et al.

Sizing field. Using sizing fields to control the hex element density Bo Li, Xin Li, Kexiang Wang, and Hong Qin. 2013. Surface mesh to volumetric spline
is preferred by many applications. A possible and direct adaption to conversion with generalized Poly-cubes. IEEE. T. Vis. Comput. Gr. 19 (2013), 1539–
1551.
our method is to tetrahedralize the volume domain first with respect Minchen Li, Danny M. Kaufman, Vladimir G. Kim, Justin Solomon, and Alla Sheffer.
to the sizing field, then use an isometric PolyCube deformation to 2018. OptCuts: Joint optimization of surface cuts and parameterization. ACM Trans.
Graph. (SIGGRAPH ASIA) 37, 6 (2018), 247:1–247:13.
maintain mesh sizes and set the cutting depth with respect to the Yufei Li, Yang Liu, Weiwei Xu, Wenping Wang, and Baining Guo. 2012. All-hex meshing
sizing field as well. We leave this as future work. using singularity-restricted field. ACM Trans. Graph. (SIGGRAPH ASIA) 31, 6 (2012),
177:1–177:11.
D. C. Liu and J. Nocedal. 1989. On the limited memory method for large scale optimiza-
ACKNOWLEDGMENTS tion. Mathematical Programming B 45 (1989), 503–528.
Heng Liu, Paul Zhang, Edward Chien, Justin Solomon, and David Bommes. 2018.
We thank the authors of [Cherchi et al. 2019] for explaining their Singularity-constrained octahedral fields for hexahedral meshing. ACM Trans.
algorithm details, and the reviewers for valuable suggestions. Dong- Graph. 37, 4 (2018), 93:1–93:17.
Ming Yan was partially supported by the National Natural Science Marco Livesu, Alessandro Muntoni, Enrico Puppo, and Riccardo Scateni. 2016. Skeleton-
driven adaptive hexahedral meshing of tubular shapes. Comput. Graph. Forum 35, 7
Foundation of China (61772523), the National Key R&D Program of (2016), 237–246.
China (2019YFB2204104), and the Beijing Natural Science Founda- Marco Livesu, Nico Pietroni, Enrico Puppo, Alla Sheffer, and Paolo Cignoni. 2020.
tion (L182059). LoopyCuts: practical feature-preserving block decomposition for strongly hex-
dominant meshing. ACM Trans. Graph. (SIGGRAPH) 39, 4 (2020).
Marco Livesu, Alla Sheffer, Nicholas Vining, and Marco Tarini. 2015. Practical hex-
REFERENCES mesh optimization via edge-cone rectification. ACM Trans. Graph. (SIGGRAPH) 34,
4 (2015), 141:1–141:11.
MOSEK ApS. 2015. The MOSEK optimization toolbox. Marco Livesu, Nicholas Vining, Alla Sheffer, James Gregson, and Riccardo Scateni. 2013.
David Bommes, Bruno Lévy, Nico Pietroni, Enrico Puppo, Cláudio T. Silva, Marco Tarini, Polycut: monotone graph-cuts for PolyCube base-complex construction. ACM Trans.
and Denis Zorin. 2013. Quad-mesh generation and processing: A survey. Comput. Graph. (SIGGRAPH ASIA) 32, 6 (2013), 171:1–171:12.
Graph. Forum 32, 6 (2013), 51–76. Claudio Lobos. 2015. Towards a unified measurement of quality for mixed–elements.
David Bommes, Henrik Zimmer, and Leif Kobbelt. 2009. Mixed-integer quadrangulation. Technical Report. Universidad Tecnica Fedrericc Santa Maria.
ACM Trans. Graph. (SIGGRAPH) 28 (2009), 77:1–77:10. Max Lyon, David Bommes, and Leif Kobbelt. 2016. HexEx: robust hexahedral mesh
Matteo Bracci, Marco Tarini, Nico Pietroni, Marco Livesu, and Paolo Cignoni. 2019. extraction. ACM Trans. Graph. (SIGGRAPH) 35, 4 (2016), 123:1–123:11.
HexaLab.net: an online viewer for hexahedral meshes. Computer Aided Design 110 Loïc Maréchal. 2009. Advances in octree-based all-hexahedral mesh generation: han-
(2019), 24–36. dling sharp features. In Int. Meshing Roundtable. 65–84.
Michael Brewer, Lori Freitag Diachin, Patrick Knupp, Thomas Leurent, and Darryl M. Nieser, U. Reitebuch, and K. Polthier. 2011. CubeCover parameterization of 3D
Melander. 2003. The mesquite mesh quality improvement toolkit. In Int. Meshing volumes. Comput. Graph. Forum (SGP) 30, 5 (2011), 1397–1406.
Roundtable. 239–250. Roi Poranne, Marco Tarini, Sandro Huber, Daniele Panozzo, and Olga Sorkine-Hornung.
G. Cherchi, P. Alliez, R. Scateni, M. Lyon, and D. Bommes. 2019. Selective padding for 2017. Autocuts: simultaneous distortion and cut optimization for UV mapping. ACM
PolyCube-based hexahedral meshing. Comput. Graph. Forum 38, 1 (2019), 580–591. Trans. Graph. (SIGGRAPH) 36, 6 (2017), 215:1–215:11.
Etienne Corman and Keenan Crane. 2019. Symmetric moving frames. ACM Trans. E. Ruiz-Gironés, X. Roca, J. Sarrate, R. Montenegro, and J.M. Escobar. 2015. Simultaneous
Graph. (SIGGRAPH) 38, 4 (2019), 87:1–87:16. untangling and smoothing of quadrilateral and hexahedral meshes using an object-
David Eppstein and Elena Mumford. 2010. Steinitz Theorems for orthogonal polyhedra. oriented framework. Advances in Engineering Software 80 (2015), 12–24.
In Symp. on Comp. Geom. 429–438. R. Schneiders. 1996. A grid-based algorithm for the generation of hexahedral element
J.M. Escobar, E. Rodríguez, R. Montenegro, G. Montero, and J.M. González-Yuste. 2003. meshes. Eng. Comput. 12, 3 (1996), 168–177.
Simultaneous untangling and smoothing of tetrahedral meshes. Comput. Methods Nicholas Sharp and Keenan Crane. 2018. Variational surface cutting. ACM Trans. Graph.
Appl. Mech. Engrg. 192 (2003), 2775–2787. (SIGGRAPH) 37, 4 (2018).
Xianzhong Fang, Weiwei Xu, Hujun Bao, and Jin Huang. 2016. All-hex meshing using Alla Sheffer, Michal Etzion, Ari Rappoport, and Michel Bercovier. 1999. Hexahedral
closed-form induced Polycube. ACM Trans. Graph. (SIGGRAPH) 35, 4 (2016), 124:1– mesh generation using the embedded Voronoi graph. Eng. Comput. 15, 3 (1999),
124:9. 248–262.
Xiao-Ming Fu, Chong-Yang Bai, and Yang Liu. 2016. Efficient volumetric PolyCube-map Jason F Shepherd and Chris R Johnson. 2008. Hexahedral mesh generation constraints.
construction. Comput. Graph. Forum 35, 7 (2016), 97–106. Eng. Comput. 24, 3 (2008), 195–213.
Xifeng Gao, Zhigang Deng, and Guoning Chen. 2015. Hexahedral mesh re- Hang Si. 2015. TetGen, a Delaunay-Based quality tetrahedral mesh generator. ACM
parameterization from aligned base-complex. ACM Trans. Graph. (SIGGRAPH) Trans. Math. Softw. 41, 2 (2015), 11:1–11:36.
34, 4 (2015), 142:1–142:10. Justin Solomon, Amir Vaxman, and David Bommes. 2017. Boundary element octahedral
Xifeng Gao, Hanxiao Shen, and Daniele Panozzo. 2019. Feature preserving octree-based fields in volumes. ACM Trans. Graph. 36, 3 (2017), 28:1–28:16.
hexahedral meshing. Comput. Graph. Forum (SGP) 38, 5 (2019), 135–149. Olga Sorkine, Daniel Cohen-Or, Rony Goldenthal, and Dani Lischinski. 2002. Bounded-
James Gregson, Alla Sheffer, and Eugene Zhang. 2011. All-Hex mesh generation via distortion piecewise mesh parameterization. In Proceedings of the Conference on
volumetric PolyCube deformation. Comput. Graph. Forum (SGP) 30 (2011), 1407– Visualization ’02. 355–362.
1416. Matt Staten. 2007. Cubit Users’ Meeting.
Xianfeng Gu, Steven J. Gortler, and Hugues Hoppe. 2002. Geometry images. In SIG- Matthew L. Staten, Steven J. Owen, and Ted D. Blacker. 2005. Unconstrained paving and
GRAPH. 355–361. plastering: a new idea for all hexahedral mesh generation. In Int. Meshing Roundtable.
Shuchu Han, Jiazhi Xia, and Ying He. 2010. Hexahedral shell mesh construction via 399–416.
volumetric PolyCube map. In ACM Symp. on Solid and Physical Modeling. 127–136. Kenshi Takayama. 2019. Dual sheet meshing: An interactive approach to robust hexa-
Ying He, Hongyu Wang, Chi-Wing Fu, and Hong Qin. 2009. A divide-and-conquer hedralization. Comput. Graph. Forum (EG) 38, 2 (2019), 37–48.
approach for automatic PolyCube map construction. Computers & Graphics 33, 3 Marco Tarini, Kai Hormann, Paolo Cignoni, and Claudio Montani. 2004. PolyCube-Maps.
(2009), 369–380. ACM Trans. Graph. (SIGGRAPH) 23, 3 (2004), 853–860.
Jin Huang, Tengfei Jiang, Zeyun Shi, Yiying Tong, Hujun Bao, and Mathieu Desbrun. Rui Wang, Shuming Gao, Zhihao Zheng, and Jinming Chen. 2018. Hex mesh topological
2014. 𝑙 1 -based construction of PolyCube maps from complex shapes. ACM Trans. improvement based on frame field and sheet adjustment. Computer Aided Design
Graph. 33, 3 (2014), 25:1–25:11. 103 (2018), 103–117.
Tengfei Jiang, Jin Huang, Yuanzhen Wang, Yiying Tong, and Hujun Bao. 2014. Frame Rui Wang, Chun Shen, Jinming Chen, Haiyan Wu, and Shuming Gao. 2017. Sheet
field singularity correction for automatic hexahedralization. IEEE. T. Vis. Comput. operation based block decomposition of solid models for hex meshing. Computer
Gr. 20, 8 (2014), 1189–1199. Aided Design 85 (2017), 123–137.
Felix Kälberer, Nieser Matthias, and Konrad Polthier. 2007. QuadCover — surface Yang Yang, Xiao-Ming Fu, and Ligang Liu. 2019. Computing surface PolyCube-Maps
parameterization using branched coverings. Comput. Graph. Forum (SGP) 26 (2007), by constrained voxelization. Comput. Graph. Forum (PG) 38, 7 (2019), 37–48.
375–384. Wuyi Yu, Kang Zhang, Shenghua Wan, and Xin Li. 2014. Optimizing PolyCube domain
Patrick M. Knupp. 2001a. Algebraic mesh quality metrics. SIAM J. Sci. Comput. 23, 1 construction for hexahedral remeshing. Computer Aided Design 46 (2014), 58–68.
(2001), 193–218. Shangyou Zhang. 2005. Subtetrahedral test for the positive Jacobian of hexahedral
Patrick M Knupp. 2001b. Hexahedral and tetrahedral mesh untangling. Eng. Comput. elements. Technical Report. University of Delaware.
17, 3 (2001), 261–268.

ACM Trans. Graph., Vol. 39, No. 4, Article 106. Publication date: July 2020.

You might also like