Top Banner
Finite Elements in Analysis and Design 41 (2005) 351 – 370 www.elsevier.com/locate/finel Finite element mesh generation over intersecting curved surfaces by tracing of neighbours S.H. Lo a , , W.X. Wang b a Department of Civil Engineering, the University of Hong Kong, Pokfulam Road, Hong Kong b Intelligence Engineering Lab, Institute of Software, Chinese Academy of Science, Beijing, China Received 15 January 2004; accepted 29 July 2004 Abstract The use of discrete data to represent engineering structures as derivatives from intersecting components requires algorithms to perform Boolean operations between groups of triangulated surfaces. In the intersection process, an accurate and efficient method for the determination of intersection lines is a crucial step for large scale and complex surface intersections. Given the node numbers at the vertices of the triangles, the neighbour relationship is first established. A background grid is employed to limit the scope of searching for candidate triangles that may intersect. This will drastically reduce the time of geometrical check for intersections between triangles, making the surface intersection and mesh generation a quasi-linear process with respect to the number of elements involved. The intersection lines are determined by the robust algorithm based on tracing the neighbours of intersecting triangles. In the determination of intersection between two triangles, four fundamental cases are identified and treated systematically to enhance robustness and reliability. In this paper, the consistent treatment of mesh generation along intersection lines is emphasized. The procedure ensures that all mesh generation operations are carried out on the surface concerned without leaving the surface so that elements generated will always be on the surface. Five examples on a great variety of surface and mesh characteristics are given to illustrate the efficiency and robustness of the algorithm. 2004 Elsevier B.V. All rights reserved. Keywords: Triangular surface intersection; Neighbour tracing; Local meshing Corresponding author. Tel.: +852-2859-1977; fax: +852-2559-5337. E-mail address: [email protected] (S.H. Lo). 0168-874X/$ - see front matter 2004 Elsevier B.V. All rights reserved. doi:10.1016/j.finel.2004.07.002
20
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 41-351

Finite Elements in Analysis and Design41 (2005) 351–370

www.elsevier.com/locate/finel

Finite element mesh generation over intersecting curved surfacesby tracing of neighbours

S.H. Loa,∗, W.X. Wangb

aDepartment of Civil Engineering, the University of Hong Kong, Pokfulam Road, Hong KongbIntelligence Engineering Lab, Institute of Software, Chinese Academy of Science, Beijing, China

Received 15 January 2004; accepted 29 July 2004

Abstract

The use of discrete data to represent engineering structures as derivatives from intersecting components requiresalgorithms to perform Boolean operations between groups of triangulated surfaces. In the intersection process,an accurate and efficient method for the determination of intersection lines is a crucial step for large scale andcomplex surface intersections. Given the node numbers at the vertices of the triangles, the neighbour relationshipis first established. A background grid is employed to limit the scope of searching for candidate triangles that mayintersect. This will drastically reduce the time of geometrical check for intersections between triangles, making thesurface intersection and mesh generation a quasi-linear process with respect to the number of elements involved.The intersection lines are determined by the robust algorithm based on tracing the neighbours of intersectingtriangles. In the determination of intersection between two triangles, four fundamental cases are identified andtreated systematically to enhance robustness and reliability.

In this paper, the consistent treatment of mesh generation along intersection lines is emphasized. The procedureensures that all mesh generation operations are carried out on the surface concerned without leaving the surfaceso that elements generated will always be on the surface. Five examples on a great variety of surface and meshcharacteristics are given to illustrate the efficiency and robustness of the algorithm.� 2004 Elsevier B.V. All rights reserved.

Keywords:Triangular surface intersection; Neighbour tracing; Local meshing

∗ Corresponding author. Tel.: +852-2859-1977; fax: +852-2559-5337.E-mail address:[email protected](S.H. Lo).

0168-874X/$ - see front matter� 2004 Elsevier B.V. All rights reserved.doi:10.1016/j.finel.2004.07.002

Page 2: 41-351

352 S.H. Lo, W.X. Wang / Finite Elements in Analysis and Design 41 (2005) 351–370

1. Introduction

There are, in general, two ways to represent a surface for the purpose of visualization and com-putation. One is to use analytical surface patches via functions such as Coon’s patches, B-Splinesor NURBS surfaces. Another is to use discrete data structure such as tessellate facets and triangularfacets[1]. For engineering applications, surfaces defined by discrete data are widely adopted, for in-stance, in the presentation of complex molecules[2–5], engineering design[6], visualization[7] andcomputational models for analysis by the finite element method[4–6,8], etc. There are at least threeways for the construction of complex surface models of triangulated facets. The first approach is toform triangles directly on the surface by well-known mesh generation techniques[9], such as the oc-tree method[10], the advancing-front method[11–14], the paving method[15,16] and so on. Thesecond is parametric mapping approach[17–20] which mesh the parametric domain followed by amapping process of the resulting mesh onto the surface. The third approach is to construct modelsby using Boolean operations such as intersection[6,8] and union between groups of surfaces com-posed of triangular facets. A great variety of objects can be easily created by selectively putting to-gether various surface parts derived from surface intersections. This approach has been explored andapplied in the field of finite element mesh generation[21,22], molecules model[6], engineering design[23,24], etc.

The intersection of triangulated surfaces consists of line segments from the intersection of triangles,which can be collected to form chains. These chains will help to define and will be part of the bound-aries of the surface parts as a result of surface intersection. For large scale and complex surfaces, anaccurate and efficient method for the determination of intersection chains is a crucial step in the in-tersection process. The problem we have at hand is to find out all the intersection segments whentwo or more surfaces of triangular facets come together. It would be very time consuming if we tryto detect intersections by examining all the triangular facets on two groups of surfaces a pair of tri-angles at a time. The process can be speeded up by using a bounding box technique[6,24] to filterout all triangles of the two groups of surfaces that are too far apart and cannot possibly have intersec-tion. Additional data structure can also be set up to further reduce searching for intersections[23,24].Moreover, the intersection line segments obtained, in general, do not follow any particular order. How-ever, in actual engineering applications, these line segments have to be re-ordered to form loops orchains before they could be included as boundaries of surface parts. In this process, undetermined andunresolved cases often arise when many line segments are very close to one other. A wrong connec-tion of line segments may result in forming incorrect chain/loop structures inconsistent with the actualintersection.

The algorithm based on the idea of tracing the neighbours of intersecting triangles (TNOIT)[25]is employed in the construction of chains/loops in a progressive and consistent manner. The construc-tion process can be initialized with any intersection segments. As the neighbouring elements of eachtriangular facet are known, the triangular facet to which the intersection line will extend can be eas-ily identified. This process will be continued until a complete loop is formed or the intersection lineterminates on surface boundaries to form a chain. In this paper, the emphasis is placed on how in-tersection lines from the TNOIT process are incorporated into the intersecting surfaces in a consis-tent manner in such a way that all meshing operations are carried out on the surfaceconcerned.

Page 3: 41-351

S.H. Lo, W.X. Wang / Finite Elements in Analysis and Design 41 (2005) 351–370 353

2. The algorithm

The types of surfaces under consideration are surfaces already discretized into triangular facets/elements.The intersection lines between surfaces are represented in terms of straight-line segment, which can bedetermined by considering a pair of triangular facets at a time. Intersection lines are represented in theform of loops and chains. This definition for surface intersection is broad enough to cover the intersectionof artificial surfaces that can be discretized into triangular facet and finite element meshes made up ofsurfaces of triangular elements. An intersection line will form progressively by connecting line segmentend to end. Two situations can be identified: (i) the line terminates on the boundary of the intersectionsurfaces to form a open chain and (ii) it goes back to the starting point to form a closed loop. An accurateand efficient process for the determination of intersection chains and loops is of utmost importance to theintersection of discretized surfaces. A trace by neighbours technique is adopted, which greatly enhancesreliability and efficiency as neighbours for each triangle are known and connection of segment is doneby means of continuity. The following are the steps for the construction of intersection chains/loops bythe neighbour tracing technique.

(1) Find out and record the neighbours of each triangle on the two surfaces.(2) Reduce the population of candidate triangles by means of background grid filter.(3) Identify an intersection segment from one of the partition cells.(4) Determine the associated chain/loop by continuity tracing neighbouring elements.

2.1. Determination of neighbours

The neighbours of each triangle are a useful topological information of the triangulated surfaces. Thesearching time can be much reduced by making use of the continuity as provided by the neighbourhoodrelationship. The following is a detailed description as how neighbours of the triangles can be identified.

2.1.1. Some concepts and thoughtsFor a given surface composed of triangular facets, generally each triangle in the surface has three

adjacent triangles. If two triangles have a common edge then they are neighbour to each other. InFig. 1, the edgemnis a common edge and the triangleI is a neighbour of triangleJ aboutmn. In case noneighbour can be found on one of the edges (see triangleK in Fig. 1), the related edge is a boundary edge of

I J

m

nK

Fig. 1. A triangulated surface.

Page 4: 41-351

354 S.H. Lo, W.X. Wang / Finite Elements in Analysis and Design 41 (2005) 351–370

the surface. For a given triangular mesh, the average number of edges connected to a particular node isquite constant and is independent of the total number of elements present in the system. Based on thisidea, an efficient algorithm can be defined to determine the neighbourhood relationship by consideringelements and edges connected to a node.

2.1.2. The data structureA simple data structure is adopted to hold the topological information of the triangular facets, and only

the three vertices of each triangle are needed and stored. As for other connectivity information, it can bederived from this basic data structure.

Structure{Tk; //kth triangle on the listvk1; //the first vertex ofTk

vk2; //the second vertex ofTk

vk3; //the third vertex ofTk

nk1; //the neighbour about edgevk2vk3

nk2; //the neighbour about edgevk3vk1

nk3; //the neighbour about edgevk1vk2};

2.1.3. The algorithm of finding out neighboursLet Nt be the number of triangular facet on a given surfaceS andNv be the number of nodal points.

Let S[i] be the set of triangles inS connected to nodei (1�i�Nv).

(a) InitializeS[i] as null set.(b) For each triangular facetTk, 1�k�Nt.

Add the triangular facetTk to the setsS[vk1], S[vk2] andS[vk3] respectively. Wherevk1, vk2, v

k3 are the

three node numbers of triangular facetTk.End

(c) For each triangular facetTk from 1 toNt.Find out and record the neighbours of triangleTk.A neighbour of the triangleTk is another triangle present in both setsS[vk1] andS[vk2], in whichvk1andvk2 are vertices of triangleTk.End.

This is a linear process as the steps taken for the determination of neighbours for each triangle is moreor less constant.

2.2. Using a background grid to filter away those triangles that do not intersect

A direct computation of intersection between two groups of surfaces by considering all the triangleson one group against all the triangles on the other group is not an economical process. As intersectionsonly happen in a few parts of the two groups of surfaces, it is necessary to filter out triangles that do notpossibly have any intersection. A background grid is introduced for this purpose, in which the search forintersection of a triangular facet can be made localized to within a small volume as given by a typical cell

Page 5: 41-351

S.H. Lo, W.X. Wang / Finite Elements in Analysis and Design 41 (2005) 351–370 355

Fig. 2. Triangles intersected by a typical cell.

of the background grid. The time complexity of the process is linear for triangular facets of homogeneoussizes.

2.2.1. Some concepts and thoughts of the background gridA more sophisticated spatially subdivision with cells of variable sizes may be necessary for triangular

facets of great difference in sizes[10]. Here, we only discuss background grid with cells of equal size.Following the natural sequence of the cells in the background grid, the triangles having intersection withthe cells are recorded. Within the same cell, there may be intersection if there is at least one triangularfacet from each group of the surfaces. There will not be any intersection if triangular facet from eithergroup is missing. Hence, this condition will be used as a preliminary check for possible intersections.Fig. 2shows triangular facets cutting a typical cell, in which continuous lines represent the facets fromthe first group and dashed lines represent the facets from the second group.

The dimensions of a typical cell[26] are given by

dx = lx/Nx, dy = ly/Ny, dz = lz/Nz

in which lx, ly andlz represent the lengths on the three sides of the bounding box as shown inFig. 3.The number of divisionsN =Nx ×Ny ×Nz depends on the amount of computer memory available. Thesize of a cell can be set equal to the average length of the edges on the surfaces. However, the dimensionsof the cells can be adjusted so that the use of available computer memory can be optimized[26].

2.2.2. To determine the cells intersected by a triangular facetA typical triangular facet will intersect with more than one cells in the background grid. Considering

each triangular facet in turn, the cells cutting the triangular facet under consideration are recorded. At theend of the process, the triangular facets intersecting with each cell can be determined.

Page 6: 41-351

356 S.H. Lo, W.X. Wang / Finite Elements in Analysis and Design 41 (2005) 351–370

xdzd

yd

xl

zl

yl

surface

boundary box

z

y

x

Fig. 3. The background grid for triangulated surfaces.

The cells cutting the triangular facet can be found by the following procedure.

(a) Calculate the bounding boxB of the triangular facetT with verticesv1, v2, v3.xmin = min(a1, a2, a3), xmax = max(a1, a2, a3),

ymin = min(b1, b2, b3), ymax = max(b1, b2, b3),

zmin = min(c1, c2, c3), zmax = max(c1, c2, c3),where

v1 = (a1, b1, c1), v2 = (a2, b2, c2), v3 = (a3, b3, c3).

(b) Calculate the cells intersected by triangular facetT.Suppose the containing box of one group of surfaces isC.

[Xmin, Xmax] × [Ymin, Ymax] × [Zmin, Zmax].If B is outsideC, no cell inC will intersect with the triangular facetT;

otherwise, find out and record the intersecting cells with address (i, j , k) using the following formulas:

i =[Int

(xmin−Xmin

dx

)+ 1

]→

[Int

(xmax−Xmin

dx

)+ 1

],

j =[Int

(ymin−Ymin

dy

)+ 1

]→

[Int

(ymax−Ymin

dy

)+ 1

],

k =[Int

(zmin−Zmin

dz

)+ 1

]→

[Int

(zmax−Zmin

dz

)+ 1

].

2.2.3. To find out all the candidate triangles

(a) Define a background grid on the first group of surfacesS1Either group can be used here, but the smaller group is usually chosen for higher computationalefficiency.

(b) For all the triangular facets in the first group of surfacesS1Determine the cellsCi intersected by each triangular facetTk ∈ S1.Record the intersecting facetsTk in cellsCi .End

Page 7: 41-351

S.H. Lo, W.X. Wang / Finite Elements in Analysis and Design 41 (2005) 351–370 357

(a) (b)

(c) (d)

Fig. 4. Candidate triangles on two intersecting surfaces.

(c) For all the triangular facets in the second group of surfacesS2Determine the cellsCi intersected by each triangular facetF1 ∈ S2.Record the intersecting facetsFj in cellsCi .End

(d) For all the cellsCi from 1 toNEach cellCi will be examined in turn. CellCi will be ignored if eitherTk from S1 or Fj from S2 ismissing. Triangles that may have a possibility to intersect are recorded as candidate elements.End

2.2.4. ExampleTwo spherical surfaces are shown inFig. 4a, on each of which there are 672 triangular facets.Fig.

4b shows the candidate triangles determined by using a background grid. As shown inFigs. 4c and d,the number of the candidate triangles for the first surface is 88 and that for the second surface is 157.Obviously, the candidate triangles are only a small subset of the original surfaces.

Page 8: 41-351

358 S.H. Lo, W.X. Wang / Finite Elements in Analysis and Design 41 (2005) 351–370

C

G

D

E

A PQ

B B

Q

P

A

E

D

G

C

B

QPA

E

D

G

C

GC

D

B E

A

(d)(c)

(b)(a)

Fig. 5. Intersection between two triangular facets. (a) Type 1 (b) Type 2 (c) Type 3 and (d) Type 4.

2.3. Calculate the intersecting straight-line segment between a pair of triangles

The two given surfacesT = {AiBiCi, i = 1, NT } andF = {DjEjGj , j = 1, NF } are in fact two setsof triangular facets. The intersection between surfacesT andF can be determined by considering in turnthe intersection of a pair of triangles one taken from each of the two surfaces. The intersection between atypical triangular facetABCfrom surfaceT and a triangular facetDEG from surfaceF can be determinedas follows[8].

In order to find out where triangleDEGcuts triangleABC, we have to consider the intersection betweentriangleABCwith edgesDE, EG andGD of triangleDEG as shown inFig. 5a. Line segmentDE willhave intersection with triangleABC if

(i) pointsD andE are on the opposite sides of the plane containing triangleABC, and(ii) intersection pointP is inside triangleABC.

Condition (i) can be verified by checking if

(AD · −→N )(AE · −→

N )�0, (1)

where normal vector−→N of triangleABC is given by

−→N = AB × AC.

Page 9: 41-351

S.H. Lo, W.X. Wang / Finite Elements in Analysis and Design 41 (2005) 351–370 359

If Eq. (1) is satisfied, compute the point of intersectionP.

P = tE + (1 − t)D,

wheret = d/(d−e), with d = AD · −→N ande = AE · −→

N .Finally, P is inside triangleABC if

(AB × AP) · −→N �0, (BC × BP) · −→

N �0, (CA× CP) · −→N �0.

Similarly, the second point where triangleABCcuts triangleDEGcan be determined by considering theintersection between triangleDEG with the edgesAB, BC andCA of triangleABC. Let Q be the secondpoint where triangleABCcuts triangleDEG, then the line segmentPQ will be the intersection betweenthe two triangles (Fig. 5). An alternative method to calculate the intersection points and line segment isto use signed volumes[6,24].

For the intersection of a pair of triangular facet, four general cases can be identified as follows.

(i) The intersection pointP is inside triangleABCas shown inFig. 5a.(ii) The intersection pointP is on an edge of triangleABCas shown inFig. 5b

(iii) The intersection pointP is on an vertex of triangleABCas shown inFig. 5c(iv) The intersection is more than one point and is a common planar domain as shown inFig. 5d.

Intersections are first classified into one of these four types, and will be treated accordingly. Thisclassification enables a consistent treatment for the same intersection on the two surfaces.

2.4. Forming intersecting chains/loops by TNOIT

As explained before, the intersection between surfaces can be represented by chains or loops of linesegments. By continually, along each intersection line segment the intersecting triangles on each surfaceare neighbours to one another. Making use of this neighbouring relationship, an intersection line can beconstructed by tracing neighbouring triangles one after the other.

In the neighbour tracing process, the type of intersection will indicate to which neighbour the inter-section line will extend. The following gives the details how neighbouring triangles are traced whenthe intersection point is (i) inside the triangle, (ii) on an edge, (iii) at a vertex and (iv) a planer zone ofintersection.

(i) If the intersection point is inside a triangle then it is no need to trace its neighbour. As shown inFig.6a for intersection type 1, intersection pointP is inside triangleT1. In this case, there is no needto trace for neighbour ofT1, Instead,P is on the common edge ofF1 andF2, hence by neighbourtracing the intersection line continues intoF2.

(ii) As shown inFig. 6b, the intersection pointP is on an edge ofT1. The triangle having this commonedge withT1 is T2. Hence, intersection line grows fromT1 to neighbouring triangleT2.

(iii) If the intersection point is on a vertex of triangleT1 then all the triangles connected to this node haveto be considered. Consider the intersection between trianglesF1 andT1 as shown inFig. 6c. Theintersection pointP is on a vertex of triangleT1 then trianglesT2, T3, T4, T5 havingP as commonvertex will be examined for intersection with triangleF1.

Page 10: 41-351

360 S.H. Lo, W.X. Wang / Finite Elements in Analysis and Design 41 (2005) 351–370

T2

T1

F1

P

F2

P

F1

T1

(a) (b)

2T

T5

T4

T3

T1

F1

P

(c)

Fig. 6. Construction of intersection line by tracing of neighbours.

T1

F1P

Q

N

M

Fig. 7. Intersection line segment with boundary edge involved.

(iv) If the two intersecting triangles are on a common plane, there is no need to compute intersection. Inother words, intersection will only be calculated if the two triangles concerned are not on a commonplane, in which case they can be again classified into (i), (ii) or (iii) described above. However, ifboundary edge is involved, intersection has to be calculated along the boundary part as shown inFig. 7. Two triangles are on a common plane andMN is a boundary edge of one surface,PQ willbe the intersection line segment betweenT1 andF1. Fig. 8shows the intersection between a planersurface with an internal opening (Fig. 8a) and a cylindrical surface with a closed bottom (Fig. 8b).Two intersection loops are shown inFig. 8d. The outer loop is the result of the intersection betweenthe vertical cylindrical surface and the flat surface. The inner loop is the intersection between theinner boundary of the flat surface and the bottom plate of the cylinder (Fig. 8c).

Page 11: 41-351

S.H. Lo, W.X. Wang / Finite Elements in Analysis and Design 41 (2005) 351–370 361

(d) (c)

(b) (a)

Fig. 8. Intersection of planer surfaces.

(d) (c) (b) (a)

Fig. 9. Intersection loop and neighbouring triangle relationship.

Intersection lines can be constructed by linking up individual line segments to form open chains orclosed loops. In the tracing process, if the intersection line goes back to the starting point, a closedloop will be formed; otherwise a chain can be defined with end points on surface boundary.Fig. 9shows the loop of intersection between two spheres shown inFig. 4a. There are 114 line segmentsin the loop as shown inFig. 9b. Figs. 9cand d show the intersection loop and neighbouring triangleson the two surfaces.Fig. 10shows the intersection of two open surfaces. The intersection line in

Page 12: 41-351

362 S.H. Lo, W.X. Wang / Finite Elements in Analysis and Design 41 (2005) 351–370

P

(a) (b)

Fig. 10. Intersection chain from the intersection of open surfaces. (a) Surfaces and (b) Intersection.

(a) (b)

Fig. 11. Intersection of cylindrical surfaces. (a) Surfaces and (b) Intersection.

the form of open chain terminates on the boundary of the hemisphere. An intersection chain can bedefined in the neighbour tracing process when no neighbour can be found on a boundary edge.

When two groups of surfaces intersect, the intersection may contain more than one loops/chains asshown inFig. 11. In this case, intersection loop/chain can be traced out one by one. To improve efficiency,

Page 13: 41-351

S.H. Lo, W.X. Wang / Finite Elements in Analysis and Design 41 (2005) 351–370 363

(c)

(b)

(a)

Fig. 12. Inserting a node onto a surface mesh. (a) Inserted node found at the interior of an element, (b) Inserted node found onan edge and (c) Inserted node is close to a vertex.

pairs of candidate triangles already considered for intersections are flagged. In the construction of anew chain/loop, what we need is the first intersection segment, and the line of intersection can be easilydetermined by neighbour tracing. When all pairs of candidate triangles are flagged indicating there is nomore intersection and the entire process terminates.

2.5. Consistent surface meshing

As the intersection lines will in general cut across elements on the curved surfaces, the task of surfacemeshing is to incorporate the lines of intersection onto each of the intersecting surface in turn. Emphasisis placed in formulating an efficient consistent local meshing process in such a way that nodes and linesegments generated will always be on the surface concerned. Intersection line segments can be insertedonto a surface by the following steps.

(I) Nodes supporting the intersection line segments are first introduced: A node can be classified intothree cases according to its position within an element.

(i) The node is at the interior of an element, then the element is divided into three triangles as shownin Fig. 12a.

(ii) The node is on an edge shared by two elements, then the edge is divided at the position of the node,and two new elements are generated as shown inFig. 12b.

Page 14: 41-351

364 S.H. Lo, W.X. Wang / Finite Elements in Analysis and Design 41 (2005) 351–370

(a) (b)

Fig. 13. Recovery of line segment by swapping of edges on a surface mesh. (a) Line segment cut across surface mesh and (b)Segment recovered by edge swap.

(iii) The node is close to a vertex, then the vertex is shifted to the node and no new element is generatedas shown inFig. 12c. The threshold of shifting can be set in a relative scale to maintain surface features.

(II) Recovery of intersection line segments: In general, the intersection line segment is not intact afterthe insertion of the two ending nodes on a surface mesh by step (I) as shown inFig. 13a. By means of theneighbouring relationship, an efficient edge recovery scheme can be devised through a systematic use ofedge swaps. In fact, if we look at the problem more closely, we discover that the number of intersectionwill be decreased by one through each edge swap. We start the edge swap process from one end of theline segment, and edge swap will be performed if the number of intersection is reduced, otherwise thisedge will be ignored. Through the neighbouring relationship the next pair of elements are examined forpossible edge swap. This process continues until we arrive at the other end of the line segment. If thereis no more intersection, the process terminates and the boundary segment is recovered as shown inFig.13b; otherwise the whole process can be started again from one end of the line segment. This processwill converge and we could always recovery the line segment in a few passes[17].

(III) Local mesh modification: Mesh optimization along the intersection chains could be applied toimprove the element quality. Excessive nodes are removed or repositioned along the chain. Here again,the neighbouring relationship can be used to speed up many basic smoothing operations, such as edgeswapping, edge collapsing, node deleting and node re-positioning. However, for all the optimizationprocedures, due cares have to be exercised to maintain surface features and surface curvatures, and thiscan be achieved simply by verifying the geometry of the patch of elements involved in the process.

3. Examples

Five examples of various surface characteristics are given in this section to demonstrate how intersectionare determined by using the neighbour tracing technique on a relatively slow PC with a CPU speed of150 MHz and 128 RAM.

The first example consists of three spheres having 192, 672 and 3584 triangular facets, respectively,as shown inFig. 14a. The sizes of the triangles on the sphere are made different to test the proposedalgorithm. The intersection consists of three intersection loops in 422 line segments as shown inFig. 14b.It can be seen that the meshes on the three surfaces are not compatible as local mesh modifications havenot been done in this example.

Page 15: 41-351

S.H. Lo, W.X. Wang / Finite Elements in Analysis and Design 41 (2005) 351–370 365

(a) (b)

Fig. 14. Intersection of surfaces discretized into elements of different sizes. (a) Three surfaces of 4448 triangles and (b) Threeintersection loop of 422 segments.

Fig. 15shows a finite element mesh of a plant modeled by 49 235 triangular elements and 24 936 nodes.The model is constructed by placing tree branches arbitrarily in space. The algorithm determines all the4378 intersection segments and combined all individual surfaces into one single model. Similarly, a bloodvessel system can also be built by the same technique as shown inFig. 16. Individual blood vessels in theform of curved cylindrical tubes with variable diameter as determined in a X-ray or CT scan process areplaced in space. The algorithm automatically determined all the intersection segments and recorded themas intersection loops which joined separate components together to form the entire blood vessel system.

The fourth example is about the intersection of an airplane and a space shuttle. It is noted that ele-ments of quite a difference in size are used over the two intersecting surfaces to test the reliability ofthe algorithm as shown inFig. 17a. The airplane consists of 1879 nodes and 3762 triangles, and thespace shuttle consists of 6419 nodes and 12 834 triangles. When the two surfaces are put together, 914intersection nodes are recorded and 3656 triangular elements are generated in the local meshing pro-cess. The overall CPU time from intersection to local mesh optimization took about 0.5 s.Fig. 17bisa magnified view of the intersection of space vehicles. The last example is the intersection of a spaceshuttle and an analytical curved surface. The space shuttle was arbitrarily immerged into the curvedsurface to produce very irregular lines of intersection around the body of the space shuttle as shown inFig. 18a. There are 6419 nodes and 12 843 elements on the surface of the space shuttle, and the curvedsurface is represented by 13 999 nodes and 27 548 elements. The surface interaction produces 1573 nodesfrom intersection segments, and 9948 elements are generated in the surface merging process.Fig. 18b

Page 16: 41-351

366 S.H. Lo, W.X. Wang / Finite Elements in Analysis and Design 41 (2005) 351–370

Fig. 15. The intersection of triangulated surfaces of tree model.

Fig. 16. Blood vessel system modeled by triangular elements.

Page 17: 41-351

S.H. Lo, W.X. Wang / Finite Elements in Analysis and Design 41 (2005) 351–370 367

(b)

(a)

Fig. 17. Intersection of airplane and space shuttle. (a) overall intersection view and (b) a magnified view.

Page 18: 41-351

368 S.H. Lo, W.X. Wang / Finite Elements in Analysis and Design 41 (2005) 351–370

(b)

(a)

Fig. 18. Intersection of space shuttle and analytical curved surface. (a) Overall intersection view and (b) A magnified view.

shows a magnified view of intersection, and it can be seen that sharp elongated elements have beenused on the analytical curved surface to test the algorithm. The total CPU time taken for this example isabout 1 s.

Page 19: 41-351

S.H. Lo, W.X. Wang / Finite Elements in Analysis and Design 41 (2005) 351–370 369

4. Conclusions and discussions

An algorithm based on tracing by neighbours TNOIT for the determination of intersection lines has beendiscussed in this paper. The reliability of the process is greatly enhanced as intersections are classifiedinto four general types, based on which a clear direction as how the intersection line should progressfollowing a neighbouring relationship can be determined. While TNOIT ensures a consistent treatment ofintersection on the surfaces concerned, the determination of intersections is also tremendously speededup, as the search for intersection is kept to a minimum using the neighbourhood information.

In order to speed up the process of detecting intersections, the use of background grid is considered. Inthis way, the search for intersection is localized to within cells, each of which contains, in general, onlya few triangulate facets from each group of surfaces. The determination of triangular facets cutting thebackground cells is also a linear process, hence little overhead is added in the intersection procedure.

The intersection lines derived from the TNOIT can be systematically incorporated into a surface meshfollowing the steps of node insertion, segment recovery and local mesh optimization. The entire processof surface intersection and mesh generation can be made fully automatic. The efficiency and robustnessof the algorithm have been tested with large scale finite element meshes of rather poor quality with greatdifference in element size on the two intersecting surfaces.

Acknowledgements

The work described in this paper was supported by a grant from the Research Grants Council of theHong Kong SAR Project No: HKU 7011/01E “Coupling micromechanics of multiple inhomogeneitiesfor the design of smart composite materials” and National Key Research and Development Program No.2002CB312103.

References

[1] Rainald Löhner, Regridding surface triangulations, J. Comput. Phys. 126 (1) (1996) 1–10.[2] N. Akkiraju, H. Edelsbrunner, Triangulating the surface of a molecule, Discrete Appl. Math. 71 (1–3) (1996) 5–22.[3] W. Heiden, M. Schlenkrich, J. Brickmann, Triangulation algorithms for the representation of molecular surface properties,

J. Comput. Aid. Mol. Des. 4 (3) (1990) 255–269.[4] P. Laug, H. Borouchaki, Automatic generation of finite element meshes for molecular surfaces, European Congress on

Computational Methods in Applied Sciences and Engineering, ECCOMAS 2000, Barcelona, Spain, 2000.[5] Patrick Laug, Houman Borouchaki, Molecular surface modeling and meshing, Proceedings 10th International Meshing

Roundtable, Sandia National Lab, 2001, pp. 31–41.[6] Alexander A. Shostko, Rainald Löhner, William C. Sandberg, Surface triangulation over intersecting geometries, Int. J.

Numer. Meth. Eng. 44 (1999) 1359–1376.[7] Cynthia D. Bruyns, Steven Senger, Interactive cutting of 3D surface meshes, Comput. Graph. 25 (4) (2001) 635–642.[8] S.H. Lo, Automatic mesh generation over intersecting surfaces, Int. J. Numer. Meth. Eng. 38 (1995) 943–954.[9] Steven J. Owen,A survey of unstructured mesh generation technology, Proceedings 7th International Meshing Roundtable,

Sandia National Lab, 1998, pp. 239–267.[10] M.S. Shephard, M.K. Georges, Automatic 3-dimensional mesh generation by the finite octree technique, Int. J. Numer.

Meth. Eng. 32 (4) (1991) 709–749.[11] S.H. Lo, Finite element mesh generation over curved surfaces, Comput. Struct. 29 (1988) 731–742.[12] T.S. Lau, S.H. Lo, Finite element mesh generation over analytical surfaces, Comput. Struct. 59 (2) (1996) 301–309.

Page 20: 41-351

370 S.H. Lo, W.X. Wang / Finite Elements in Analysis and Design 41 (2005) 351–370

[13] K. Anastasiou, C.T. Chan, Automatic triangular mesh generation scheme for curved surfaces, Commun. Numer. Meth.Eng. 12 (1996) 197–208.

[14] Scott A. Canann, Yong-Cheng Liu, Antonn V. Mobley, Automatic 3D surface meshing to address today’s industrial needs,Finite Elem. Anal. Des. 25 (1997) 185–198.

[15] R.J. Cass, S.E. Benzley, R.J. Meyers, T.D. Blacker, Generalized 3-D Paving: an automated quadrilateral surface meshgeneration algorithm, Int. J. Numer. Meth. Eng. 39 (9) (1996) 1475–1489.

[16] E. Hartmann, A marching method for the triangulation of surfaces, Visual Comput. 14 (1998) 95–108.[17] Houman Borouchaki, Patrick Laug, Paul-Louis George, Parametric surface meshing using a combined advancing-front

generalized Delaunay approach, Int. J. Numer. Meth. Eng. 49 (2000) 233–259.[18] J.C. Cuillière, An adaptive method for the automatic triangulation of 3D parametric surfaces, Comput.-Aid. Des. 30 (2)

(1998) 95–161.[19] C.K. Lee, R.E. Hobbs, Automatic adaptive finite element mesh generation over rational B-spline surfaces, Comput. Struct.

69 (5) (1998) 577–608.[20] C.K. Lee, Automatic metric advancing front triangulation over curved surfaces, Eng. Comput. 16 (1999) 230–263.[21] J.R. Cebral, R. Löhner, P.L. Choyke, P.J. Yim, Merging of intersecting triangulations for finite element modeling, J.

Biomech. 34 (6) (2001) 815–819.[22] Luiz Cristovão, G. Coelho, Marcelo Gattass, Luiz Henrique de Figueiredo, Intersecting and trimming parametric meshes

on finite element shells, Int. J. Numer. Meth. Eng. 47 (2000) 777–800.[23] J. Bonet, J. Peraire, An alternating digital tree (ADT) algorithm for geometric searching and intersection problems, Int. J.

Numer. Meth. Eng. 31 (1991) 1–17.[24] M.J. Aftosmis, M.J. Berger, J.E. Melton, Robust and efficient Cartesian mesh generation for component-based geometry,

AIAA J. 36 (6) (1998) 952–960.[25] S.H. Lo, W.X. Wang, A fast robust algorithm for the intersection of triangulated surfaces, Eng. Comput. 20 (2004) 11–21.[26] S.H. Lo, Analysis and Verification of the Boundary Surfaces of Solid Objects, Eng. Comput. 14 (1998) 36–47.