Triangular Mesh Intersection Fix
Triangular Mesh Intersection Fix
net/publication/226683830
CITATIONS READS
12 957
2 authors:
Some of the authors of this publication are also working on these related projects:
Architectural applications of my framework for anisotropic general patterns on building envelopes: roofs and facades. View project
All content following this page was uploaded by Kenji Shimada on 11 June 2014.
Abstract.
This paper describes a computational method for removing self intersections
of a triangular mesh. A self intersection is a situation where a part of a surface
mesh collides with another part of itself, i.e., two mesh elements intersect each
other. It destroys the integrity of the mesh and makes the mesh unusable for
certain applications. A mesh generator often creates a self intersection when a
relatively large element size is specified over a region with a narrow clear-
ance. There has been no automated method that automatically removes self
intersections, and such self intersections needed to be corrected by manually
editing the mesh. The proposed method automatically resolves a self intersec-
tion by re-connecting edges and adjusting node locations. This technique re-
moves a typical self intersection and recovers the integrity of the triangular
mesh. Experimental results show the effectiveness of the proposed method.
1. Introduction
This paper describes a computational method for removing self intersections
of a triangular mesh. A self intersection is a situation where a part of a surface
mesh collides with another part of itself, i.e., at least two mesh elements inter-
sect each other. A self intersection destroys the integrity of the surface mesh
and makes the surface mesh unusable for certain applications. The proposed
method removes such self intersections and recovers the integrity of the mesh.
A triangular mesh is used for many applications such as finite element
analysis, visualization, and so on. Many of those applications require the
mesh to be free of self intersections. A self intersection in a triangular mesh
could cause failure of the finite element analysis or make unwanted artifacts in
the visualization.
A triangular mesh is also used as a boundary of a tetrahedral mesh, and
such a triangular mesh must not include a self intersection. A tetrahedral
2 Soji Yamakawa and Kenji Shimada
2. Previous Work
The proposed method pertains to facet-repair techniques, which repair defects
included in a surface mesh. A surface mesh may include two types of defects,
geometric defects and topological defects. A self intersection is one of the
common geometric defects, and a common topological defect is a gap or a
hole located where the mesh needs to be closed.
Since facet-repair techniques have been of great interest in the industry,
substantial research has been done. Nonetheless, most of the attention has
been paid to the topological aspect of the problem.
The majority of the published facet-repair techniques are gap-closure and
hole-filling techniques. If a triangular mesh has a gap or hole located where
the mesh needs to be closed, such a gap or hole needs to be closed. Barequet
and Sharir have presented a method for closing gaps and holes of a polyhedral
surface [1]. Barequet and Kumar have presented a method for repairing a
geometric model defined by a triangular mesh [2]. Gueziec et al. have pre-
sented a method for converting a polygonal surface to a manifold surface [3].
Branch et al. have presented a method for filling holes of a triangular mesh
[4]. Li et al. have presented a method for repairing holes of a triangular mesh
[5]. Those gap-closure and hole-filling techniques identify gaps and holes that
need to be closed and then insert triangular elements and/or stitch the edges
together so that gaps and holes are filled by triangular elements.
Gap closure and hole filling are important to recover the topological integ-
rity of a triangular mesh. However, it is also necessary to remove self inter-
sections and recover the geometric integrity. Self-intersection avoidance has
been relying mainly on a priori methods. In other words, adequate pre-
conditioning needed to be performed before a triangular mesh was created so
that the mesh generator would not yield a self intersection.
One of the common sources of a self intersection is a very small feature,
which is usually irrelevant to the purpose of the mesh. Ribelles et al. have
presented a method that automatically removes features of a geometric model
[6]. Lee et al. also have presented another approach for small-feature suppres-
sion [7].
A self-intersection can also be avoided by identifying features and appro-
priately adding geometric constraints near the features. Numerous researches
have been done for feature-line identification [8-12]. Jiao has presented a
method for identifying features of a geometric model and preserves them dur-
ing the mesh-generation process [13].
Alternatively, a self-intersection can be avoided by creating smaller ele-
ments near small features. Quadros et al. have presented a method for auto-
matically creating an element-sizing function based on the input geometry
[14].
4 Soji Yamakawa and Kenji Shimada
⎛h ⎞
Z ⎜ , y, 3 h ⎟
⎜2 6 ⎟
⎝ ⎠
1 ⎛h ⎞
r= ⎜ , y, 3 h ⎟
κ ⎜2 ⎟
h e ⎝ 2 ⎠
⎛ ⎞
⎜ h ,0, 3 h ⎟
⎜2 6 ⎟
⎝ ⎠
Y e=r − y
(1/κ ) 2 − (h / 2) 2
1/κ (h,0,0)
X
Figure 1 Expected error between a Figure 2 Expected error between a curved sur-
curve and its discretization face and its discretization
It can be solved for y as:
h2
y= r2 − .
3
Since the expected error can be calculated as the difference between the ra-
dius and the distance between the element to the center of the sphere, the ex-
pected error becomes:
1
e = − (1/κ ) 2 − (h 2 / 3) . (1)
κ
Therefore, when two surfaces are separated with a small clearance d, the edge
length h should be small enough so that the expected error is smaller than d.
However, in practice, element size is often decided based on the application
in which the mesh is used, and it can be way too large for the surface clear-
ance of the original geometric model. Such a large element size yields self in-
tersections in the mesh. For example, Figure 3 (a) shows a CAD model that
includes two co-axial cylindrical surfaces. The radii of the outer and inner cy-
lindrical surfaces are 5.0 and 4.8, respectively. Therefore, the clearance be-
tween the two surfaces is 0.2. The curvature of the outer surface is
1.0/5.0=0.2. From equation (1), the edge length of the mesh needs to be less
than 2.42. Figure 3 (b) shows a triangular mesh created from this CAD model
with an average edge length of 2.42, and it does not include a self intersection.
However, if the same geometry is meshed with average edge length of 3, some
self intersections are clearly visible as shown in Figure 3 (c). In this particular
case, self intersections can be avoided by identifying cylindrical surfaces and
adding some mesh constraints on the surface. Figure 3 (d) shows some new
constrained edges added by the polygon-crawling method [12]. The mesh
6 Soji Yamakawa and Kenji Shimada
generator preserves those constrained edges, and the output triangular mesh
does not include a self intersection as shown in Figure 3 (e).
Ideally, a sufficiently small element size needs to be chosen or appropriate
mesh constraints need to be added for the regions of small clearance. How-
ever, some of such ill conditions are often overlooked. Particularly, such ill
conditions tend to be left untreated if they are:
1. contained within a very small feature, or
2. away from the point of interest for the application in which the mesh is
used.
Such less-visible ill conditions are most likely left untreated before the
model is given to the mesh generator. Even if all of those ill conditions are
detected, a complex model could have hundreds of them and could take sub-
stantial manual operations to correct or add constraints to all of them. As dis-
cussed in Section 2, if such an ill condition was overlooked and the mesh gen-
erator created self intersections, the user needed to manually correct those self
intersections.
The next section explains an automated method for removing self intersec-
tions included in a triangular mesh. The method substantially reduces the
manual operations required to eliminate self intersections to recover the integ-
rity of the mesh.
Intersecting elements
(a) Original CAD model (b) Triangular mesh with av- (c) Triangular mesh with
erage edge length of 2.42 average edge length of 3.
New constrained edges
(d) Additional constrained (e) Triangular mesh with average edge length of
edges added by the polygon- 3. Additional constrained edges have successfully
crawling method prevented self intersections
Figure 3 A narrow clearance causing self intersections
Removing Self Intersections of a Triangular Mesh by Edge Swapping, Edge
Hammering, and Face Lifting 7
a a
d d
T2 T1
T2
b T1
c b
c
(a) Five triangles are intersecting with another (b) Intersections are removed
triangle. Dashed lines are behind the outside by Edge Hammering
layer of the triangular mesh.
Figure 5 An Example of edge hammering
a new intersection x5 will be created as shown in Figure 6 (d). From this ob-
servation, if an edge intersects with other triangles at more than one point, one
of the edge nodes should be moved toward the other node beyond the first in-
tersection to reduce the number of intersections. However, moving the node
beyond the second intersection will create a new intersection. Node a can be
moved to anywhere between the first and second closest intersections. The
simplest choice of the point is the mid point of the first two intersections.
Since a node can be connected to more than one intersecting edge, the node
can have multiple candidate points. If edge abn is the nth intersecting edge
connected to node a, the nth candidate point a'n is calculated as:
(a) If edge abn is intersecting with another triangle at a single point x,
candidate point a'n is calculated as a'n=(x+bn)/2, and
(b) If edge abn is intersecting with other triangles at multiple points x1,
x2, …, and xk, and x1 and x2 are the first and second closest intersec-
tion to node a, candidate point a'n is calculated as a'n=(x1+x2)/2.
The proposed method moves node a to the average of the candidate points:
a'= ∑ a'n / n ,
a T1 T2 T3
T2 b n1
c T3 dmax
a b a b
e
d c c
f
T1 T1 dmin
d e f d e f
(Schematic drawing) (b) Computing the minimum
(a) Triangle T1 intersecting with six edges, ad, ae, and maximum of the signed
be, bf, cd,and cf. heights of nodes a, b, c, d, e,
and f based upon T1.
n1(d min −ε )
n1(d max + ε )
T1 T1
T2 T3
(c) Moving T1 by n1(d max + ε ) re- (d) Moving T1 by n1(d min − ε ) makes T1
moves all the intersections free of intersections. However, it makes
new intersecting triangles, T2 and T3.
Figure 8 Calculating possible new locations of an intersecting triangle
If only one of the two new locations satisfies the improvement criteria, tri-
angle T1 is moved to the new location that satisfies the improvement criteria.
If both moves satisfy the improvement criteria (implies that the intersecting
edges are disconnected from the other part of the mesh that T1 belongs to,) T1
is moved to the new location that makes the move smaller.
For example, in Figure 8 (a), triangle T1 intersects with six edges, ad, ae,
be, bf, cd, and cf. The minimum and maximum of the signed heights of the
nodes of the intersecting edges are calculated as shown in Figure 8 (b). If the
triangle T1 is moved by n1(d + ε ) , triangle T1 becomes free of intersection
max
which were intersection free before the move, intersect with some of the
edges. Therefore, it violates the improvement criterion. In this case, triangle
T1 is thus moved by n1(d + ε ) from the original location.
max
sections. However, it is virtually impossible to find the ideal order of the op-
erations.
In this research, we have tested several different measures in an attempt to
reduce the adverse effect caused by the order dependency. In the first ap-
proach, we have applied edge swapping first, edge hammering second, and
face lifting last. Since edge swapping does not move nodes, it seemed to have
the least impact on the geometry. Edge hammering moves one node at a time
while face lifting moves three nodes at a time. Edge hammering thus seems to
have less impact on the geometry compared to face lifting. Although this ap-
proach gave somewhat good results, it often gave less than satisfactory results.
That led to the two-phase approach described below.
To reduce the adverse effect caused by the order-dependency, the proposed
method applies a sequence of edge-swapping, edge-hammering, and face-
lifting operations in two phases: (1) cost-calculation phase and (2) implemen-
tation phase.
In the cost-calculation phase, a sequence of edge-swapping, edge-
hammering, and face-lifting operations are applied to all applicable edges,
nodes, and elements. After each operation, the cost of the operation is calcu-
lated, and then the modifications made to the mesh by the operation are re-
tracted back to the original state of the mesh. Therefore, the mesh does not
change before and after the cost-calculation phase.
self intersections may not be detected after the tessellation. Or, even if the
triangular mesh is made self-intersection free by the proposed method, it
does not guarantee that the quadrilateral mesh is also self-intersection free
after quadrilateral elements are re-constructed.
Further research is needed for addressing these issues.
n p3
n
t3 p1 T1
p2
p1 T1
t1 p2 t2
t1
t2
6. Examples
This section presents some examples to demonstrate the effectiveness of the
proposed method. Figure 11 (a) shows a thin-walled solid with ribs and a
screw hole. Such a shape frequently appears in a geometric model of a plas-
tic-casing. Figure 11 shows a triangular mesh with an average edge length of
1.5. This mesh does not include self intersections. However, the number of
elements can be too many for the application in which the mesh is used. The
number of elements can be reduced by specifying larger element size. Figure
11 (c) shows a triangular mesh with an average edge length of 3mm. The
middle section of the outer surface of the screw hole is collapsed to a single
edge, and it intersects with the inside wall. Some inside-wall elements also
collide with the outer-wall of the fillet. The proposed method successfully
removes all self intersections as shown in Figure 11 (d). Figure 11 (e) shows a
16 Soji Yamakawa and Kenji Shimada
tetrahedral mesh created from the triangular mesh shown in Figure 11 (c).
Due to the self intersections in the input triangular mesh, the output tetrahedral
mesh has some exterior edges that are shared by more than two exterior trian-
gular elements. Figure 11 (f) shows a tetrahedral mesh created from the trian-
gular mesh shown in Figure 11 (d). Since no self intersection is included in
the triangular mesh, the output tetrahedral mesh is a valid and usable in the fi-
nite element analysis.
Figure 12 (a) shows a CAD model of a plastic casing of a telephone. Figure
12 (b) is a triangular mesh of the model meshed with an average edge length
of 4mm. With this edge length, the mesh generator does not create a self in-
tersection. Figure 12 (c) is a triangular mesh with 10mm average edge length.
This edge length yields numerous self intersections as shown in Figure 12 (d).
Note that the majority of the elements are intersection free. Only a small frac-
tion of the elements are intersecting. Despite the small percentage of inter-
secting elements, these self intersections could make the mesh utterly unusable
for the application. The proposed method successfully removes all the inter-
sections. The changes made by the proposed method are hardly visible with-
out zooming into the specific locations. Figure 12 (e) shows a close up look
of two of the self intersections included in the 10mm mesh, and the proposed
method removes them as shown in Figure 12 (f).
7. Conclusions
This paper has presented a computational method for removing self intersec-
tions included in a triangular mesh. The method systematically applies edge-
swapping, edge-hammering, and face-lifting operations to the input triangular
mesh. The proposed method has been applied to many test cases, and the re-
sults showed the effectiveness of the proposed method.
Removing Self Intersections of a Triangular Mesh by Edge Swapping, Edge
Hammering, and Face Lifting 17
(a) Original geometric model (b) Triangular mesh with 1.5mm average edge
length does not include a self intersection
(c) Triangular mesh with 3mm average (d) Triangular mesh with 3mm average edge
edge length including numerous self inter- length repaired with the proposed method. The
sections. mesh includes no self intersection.
(e) Tet mesh created from a triangular mesh (f) Tet mesh created from a triangular mesh
with self intersections repaired by the proposed method
Figure 11 Sample model with ribs and a screw hole
(a) Input geometric model (b)Triangular mesh with (c) 10mm average edge
4mm average edge length does length yields numerous
not include a self intersection. self intersections.
References
[1] G. Barequet and M. Sharir, "Filling Gaps in the Boundary of a Polyhedron",
Computer Aided Geometric Design, vol. 12, pp. 207-229, 1995.
[2] G. Barequet and S. Kumar, "Repairing CAD Models," Proceedings of IEEE
Visualization '97, pp. 363-370, 1997.
[3] A. Gueziec, G. Taubin, F. Lazarus, and B. Horn, "Cutting and Stitching:
Converting Sets of Polygons to Manifold Surface", IEEE Transactions on
Visualization and Computer Graphics, vol. 7, pp. 136-151, 2001.
[4] J. Branch, F. Prieto, and P. Boulanger, "A Hole-Filling Algorithm for Trian-
gular Meshes Using Local Radial Basis Function," Proceedings of 15th In-
ternational Meshing Roundtable, pp. 411-431, 2006.
[5] F. Li, B. Chen, and W.-h. Leng, "A Hole Repairing Method for Triangle
Mesh Surfaces," Proceedings of International Conference on Computational
Intelligence and Security, pp. 972-975, 2006.
[6] J. Ribelles, P. Heckbert, M. Garland, T. Stahovich, and V. Srivastava, "Find-
ing and Removing Features from Polyhedra," Proceedings of ASME Design
Automation Conference, pp., 2001.
[7] K. Y. Lee, C. G. Armstrong, M. A. Price, and J. H. Lamont, "A Small Fea-
ture Suppression/Unsuppression System for Preparing B-Rep Models for
Analysis," Proceedings of ACM Symposium on Solid and Physical Model-
ing, pp. 113-124, 2005.
[8] M. Nomura and N. Hamada, "Feature Edge Extraction from 3D Triangular
Meshes Using a Thinning Algorithm," Proceedings of SPIE - Vision Geome-
try X, pp. 34-41, 2001.
[9] X. Jiao and M. T. Heath, "Feature Detection for Surface Meshes," Proceed-
ings of 8th International Conference on Numerical Grid Generation in Com-
putational Field Simulations, pp. 705-714, 2002.
[10] T. J. Baker, "Identification and Preservation of Surface Features," Proceed-
ings of 13th International Meshing Roundtable, pp. 299-309, 2004.
[11] S. Yoshizawa, A. Belyaev, and H.-P. Seidel, "Fast and Robust Detection of
Crest Lines on Meshes," Proceedings of ACM Symposium on Solid and
Physical Modeling, pp. 227-232, 2005.
[12] S. Yamakawa and K. Shimada, "Polygon Crawling: Feature-Edge Extraction
from a General Polygonal Surface for Mesh Generation," Proceedings of
14th International Meshing Roundtable, pp. 257-275, 2005.
[13] X. Jiao, "Volume and Feature Preservation in Surface Mesh Optimization,"
Proceedings of 15th International Meshing Roundtable, pp. 359-373, 2006.
[14] W. R. Quadros, V. Vyas, M. Brewer, S. J. Owen, and K. Shimada, "A Com-
putational Framework for Generating Sizing Function in Assembly Mesh-
ing," Proceedings of 14th International Meshing Roundtable, pp. 55-72,
2005.
[15] J. Glimm, S. R. Simanca, D. Tan, F. M. Tangerman, and G. Vanderwoude,
"Front Tracking Simulations of Ion Deposition and Resputtering", SIAM
Journal on Scientific Computing, vol. 20, pp. 1905-1920, 1999.