Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.

Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.

Like this document? Why not share!

262 views

Published on

No Downloads

Total views

262

On SlideShare

0

From Embeds

0

Number of Embeds

3

Shares

0

Downloads

2

Comments

0

Likes

1

No embeds

No notes for slide

- 1. Converting Sets of Polygons to Manifold Surfaces by Cutting and Stitching Andrk Gukziec ’ Gabriel Taubin ’ Francis Lazarus 2 William Horn 1 IBM T. J. Watson Research Center Abstract Many real-world polygonal surfaces contain topological singu- Some concrete examples of algorithms that fail on input con-laries that represent a challenge for processes such as simplifica- taining topological singularities are: algorithms for surface subdi-tion, compression, smoothing, etc. We present an algorithm for vision [I]; algorithms that simplify surfaces ([2, 31); algorithmsremoving such singularities, thus converting non-manifold sets of for surface compression[4]; algorithms for progressive transmis-polygons to manifold polygonal surfaces (orientable if necessary). sion (Hoppe [5] relies on each triangle having no more than three We identify singular vertices and edges, multipry singular ver- neighbors); algorithms that (scan) convert a polygonal boundarytices, and cut through singular edges. In an optional stitching phase, representation of a potential solid for Rapid Prototyping [6]. Otherwe join surface boundary edges that were cut, or whose endpoints algorithms yield undesired results when executed on non-manifoldare sufficiently close, while guaranteeing that the surface is a mani- input, such as surface smoothing [7] (see Section 6).fold. We study two different stitching strategies called “edge pinch- Several approaches are possible:(l) modifying algorithms toing” and “edge snapping”; when snapping, special care is required handle non-manifold input; (2) trying to understand the source ofto avoid re-creating singularities. errors in modeling or CAD packages, and lobbying (and hoping) The algorithm manipulates the polygon vertex indices (surface for such errors to be corrected; (3) developing methods to correcttopology) and essentially ignores vertex coordinates (surface geom- the input. Following the first approach is application-dependent,etry). Except for the optional stitching, the algorithm has a linear and probably requires re-defining objectives (beyond just accept-complexity in the number of vertices edges and faces, and require ing non-manifold input). For instance, a number of surface sim-no floating point operation. plification methods accept non-manifolds, but often they introduceKey-words : Polygonal Surface, Manifold, Cutting, Stitching. many more degeneracies than those originally present. The second1 Introduction approach has little short term impact and may not be a complete solution in the long term as well (there will always be softwarePolygonal surfaces are a common choice for representing three di- bugs).mensional geometric models. Such models are used for generat- We have chosen the third approach. In this paper, we provideing pictures and animations, and are also used in CAD systems, in the complete description of a novel and efficient method for au-Scientific Visualization and Medical Imaging. Many such polyg- tomatically converting a non-manifold surface to a manifold SUT-onal surfaces contain topological singularities, (e.g., edges shared face. Although our ideas are conceptually simple, our experienceby more than two triangles, several triangle fans incident to a sin- showed that implementing such algorithms without omitting anygle vertex) that represent a challenge for various algorithms that special case can be complicated and error prone. We assume thatoperate exclusively on a manzjbld surface. A manifold polygonal the topology of the surface is already built for the most part, andsurface is such that the neighborhood of every vertex can be con- concentrate on removing the singularities. However, we have de-tinuously deformed to a disk (to a half disk at the boundary: see veloped a stitching method (edge snapping) to help build the topol-Section 2). In fact, this corresponds to an intuitive definition of ogy. In general, we assume that the corrections will involve a rela-what a “surface” is, as opposed to an arbitrary collection of poly- tively small number of surface elements.gons. The algorithm is decomposed into two main parts: cutting and In this paper, we essentially ignore the coordinates associated stitching. Cutting is a general method for disconnecting the SUT-with the surface elements, and we look at the property of being a face topology along a set of marked edges or vertices. We markmanifold as a purely topological one. Topological degeneracies can singular edges and vertices; an edge is singular if more that twooccur by design choice (e.g., vertex merging to avoid duplicating faces are incident to it; a singular vertex is defined in Section 2. Incoordinates, or polygon reduction tools), or they can be produced Section 4 we describe two different methods for cutting: a globalby incorrect algorithms for building surfaces (e.g., iso-surfaces, tri- method and a local method. The global method operates on all theangulation of scattered points), or by correct algorithms containing faces and vertices of the surface at once, by first breaking all con-software bugs, etc. nections between faces and later joining adjacent faces that share a unmarked edge. The local method operates only on marked ver- ‘IBM T.J.Watson Research Center, P.O.Box 704. Yorktown Heights, NY 10598. tices and endpoints of marked edges, by counting the number of{taubin,gueziec,hornwp}@watson.ibm.com (unmarked) edge-connected sets of faces incident to a vertex, by ‘IRCOM-SIC (UMR CNRS 6615), SPZMI, Bvd. 3, T&port 2, B.P. 179, 86960Futuroscope Cedex, France, lazarus@sic .univ-poitiers. fr multiplying the vertex, and by assigning a different copy of that vertex to each connected set. The global method is more appro- priate when there is a large number of topological singularities toO-8186-9176-x/98/$10.00 Copyright 1998 IEEE correct. The local method is more efficient when there are only few singular elements in a generally correct topology. As illustrated in Fig. I, several manifolds can be mapped to the original non-manifold by identifying vertices. To reduce the number of vertices, holes, or components, the cutting operation is followed by stitching. As defined in Section 5, stitching consists of 383
- 2. @<1~8::B A B C D Figure 2: A: the star vX of a regular vertex v of valence seven, B: the link of v. C: the star w* of a singular vertex w. D: the link of E w, composed of two disconnected polygonal curves. E: the star u* of a boundary vertex. circular permutation, resulting in two orientations for that face. In this paper, we call topology of a surface, the set of ordered sub- sets of indices provided by the set of faces (fj}, modulo circular permutation. We use the word geometry to mean the set of vertex coordinates {vi}. There are no particular constraints on the ge- ometry for our methods to apply: polygons can be warped. Cutting and stitching operate on the topology only. Additionally, vertices or faces may have a number of continuous or discrete properties, such as colors, normals, and texture coordinates. Properties can also be associated with comers. The data structures we use are described in the Appendix. El E2 E3 We call the subset of faces of {fj } that share a vertex v the starFigure 1: Converting to a manifold surface: A,B,C: cutting through of v, noted v*. The number of faces in v* is called the valence ofsingular edges; For illustrative purposes, topologically discon- the vertex v. To form the link of a vertex, we first take all edgesnected vertices are shown apart. We implement two stitching strate- belonging to faces in v*, and then remove the edges incident ongies: “pinching” edges along the same boundary (D) or “snapping” v. The link is a graph made by linking up the ,remaining edges.together edges belonging to different boundaries (E). See Figure 2. A regular vertex has a link formed of one polygonal curve; if the link is closed, then it must be of length at least three;taking two boundary edges and identifying them, while guarantee- otherwise the vertex is a singulur vertex. We call an edge incidenting that the surface is a manifold. We have: observed that stitching is on one single face a boundary edge. A regular vertex incident to aa delicate operation: for instance, when using the “zipping” method boundary edge is called a boundary vertex. These cases are illus-reported in [S], singular edges can be created when stitched mul- trated in Fig. 2. A surface is a manifold if each vertex is a regulartiple times. We show examples in Section 6 and provide sample vertex; otherwise it is a non-manifold surface.timings. Two adjacent faces sharing an edge e have a compatible orien- Fig. I is a diagram illustrating our method. We consider two tation if the two vertices of e listed in one face appear in oppositetetrahedra sharing an edge: we subdivide the surface of the tetra- order in the other face. The surface is orientable if each face can behedra into smaller triangles, resulting in the surface of Fig. IA. We oriented such that any two adjacent triangles have a compatible ori-label singular edges and vertices and color them in red in Fig. 1B entation. An orientable manifold surface such that its faces are all(regular edges are orange). After multiplying singular vertices, we oriented in a compatible way is said to be orien&d. An orientablehave created two disconnected surface components in Fig. 1C, each manifold surface can be oriented in only two possible ways.of which has a boundary of length eight (in green); as explained inSection 4, the three singular vertices in Fig. 1B that are shared bytwo singular edges are multiplied four times each. The two singu- 3 Conversion of Non-Manifold Surfaceslar vertices shared by one singular edge only are multiplied twice.After stitching along the same boundaries (or “pinching”), we have To remove topological singularities, our method begins by cutting,created in Fig. 1D two disconnected solids. Instead, when stiching or disconnecting, the surface along singular edges and at singularalong different boundaries (or “snapping”), we create Fig. I E a sin- vertices. After this operation, which is described in more detail ingle surface without boundaries. All three surfaces C, D, and E are Section 4, by construction each vertex has a star formed of a sin-manifolds with the same geometrical realization as A. gle component of faces connected through regular edges, meaning that the surface is a manifold according to our definition. A num- ber of pre-processing steps may be necessary in the presence of2 Polygonal Surfaces invalid faces, and to accomodate our two different methods of cut- ting (locally or globally). Also, as mentioned above, stitching mayFor our purposes, a (polygonal) surface S({v; }, { fj }) is defined be useful to reduce the number of duplicated vertices, or to buildwith a set of vertices {vi} and a set of faces {fj}. Each vertex has the topology from an input consisting of disconnected polygons.coordinates in R3. Each face is specified with a tuple of at least The details of the conversion steps are as follows:three vertex indices. The face is said to be incident on such ver- Step I: Processing Invalid Faces Faces of length three (triangles)tices. A pair (vertex, incident face) is called a coyney. Each vertex can only be invalid if they are geometrically degenerate, with twomust have at least one incident face. The vertex indices in a face or more coincident vertices; there are more cases for faces of lengthmust all be different. Otherwise the face is considered invalid. An four or higher as illustrated in Fig. 3: faces can ‘be invalid becauseedgeof a face is defined as a pair (vi, vj) of consecutive vertices of vertices are duplicated (Fig. 3A). In this case, the global cuttingthat face, modulo circular permutation. ‘The face is said to be inci- method automatically produces the polygon marked in green indent on the edge, and the edge incident on the vertices vi and uj . vi Fig. 3A. Another possibility for an invalid face is to be incidentand ~j are also said to be adjacent vertices. Edges sharing a vertex on the same edge multiple times (Fig. 3B). In this case, we markand faces sharing an edge are said to be adjacent edges and faces. the edge and for each endpoint, we inquire whether there is anotherThere are two possible orderings for the vertices of a face module marked edge of the invalid face incident on that endpoint; if this is 384
- 3. Figure 3: Invalid faces. A: duplicate vertex; the global methodautomatically produces the correction shown in green. B: face in-cident on the same edge e multiple times.not the case, we mark an incident edge; marked edges are shown in Figure 4: Local cutting. A: star of Vertex tag with marked edges inred in Fig. 3B; the global method produces the solution marked ingreen in Fig. 3B. These methods do not apply when using the local method: inpractice in this case we have simply eliminated invalid faces.Step II Singular edges are marked when building the edge datastructure, as the edges that are shared by at least three differentfaces.Step III: Pre-Processing for the Local Method We label stan-dalone vertices when looping through the face list by counting the Figure 5: A: It is not possible to cut through any collection ofnumber of face incidences (valence) for each vertex. If the num- marked edges: we need at least two adjacent edges if none of thember of faces is less than the valence, then at least one additional is incident to the boundary. B: an isolated singular vertex v.connected component exists, so the vertex is an isolated singularvertex. We eliminate the standalone vertices, renumber the remain- be marked as described below. We visit each marked vertex in turn;ing vertices, and update the vertex indices in faces in a second loop for each marked vertex w, we determine its star v*, which can bethrough the face list. obtained for each vertex by looping on the face array. We decom- Isolated singular vertices must be marked. To determine whether pose v* in subsets that are connected by unmarked edges. Thisa vertex w is singular, if it is not an endpoint of a singular edge, we can be performed using standard methods: we collect all unmarkedattempt to build its star n* by pivoting about v, starting with any edges incident on 21,and maintain a partition on the faces of w*,“first” face f incident on v. To pivot about 21,we locate in f an considering two faces adjacent if and only if they share a unmarkededge e incident on v. From the edge data structure, we infer a face edge. Here we assume that all faces are valid. Invalid faces areg that together with f shares e; we then locate in g an edge incident treated in Section 3.on u different from e. We continue until we encounter a bound- Once the number of connected components nC is known, weary edge or the first face f. We then count the number of faces that create n, - 1 additional copies of the vertex TV with the same coor-were visited and compare this number to the valence of o. Note that dinates and same properties. Each instance of v is labeled from 0this method also works if the faces are not consistently oriented. to n, - 1. In v*, we revisit each face in turn and for each face f, weStep IV We apply either the global cutting method on the marked locate the index of v, and we replace it with the instance of TV cor-edges or the local cutting method on the marked edges and vertices. responding to the component number off. We call this operationStep V (Optional): Building an Oriented Manifold We must ver- multiplying the vertex 21.Every time a vertex is multiplied, we cre-ify that faces incident on each edge are consistently oriented. Af- ate n, - 1 new entries in a look up table of vertices; in this look-upter cutting through singular edges, we propagate the orientation of table we record that the ancestor of all copies of ZIis precisely v.faces of the resulting manifold using a spanning tree of faces. The We illustrate the local cutting method on the star of a vertex 215number of required operations is proportional to the total number with six incident faces fc . . . fs in Fig. 4. In Fig. 4A, marked edgesof faces. After propagating the orientation, some edges may have are drawn bold. The unmarked edges incident on w5 are (wq, 2)s)inconsistently oriented incident faces. In a second step, we mark and (~5, VT). Four connected components of faces go . . ga arethese edges and cut along them ( fewer edges are cut in this way identified in Fig. 4B. Accordingly, four copies of the original u5as opposed to marking and cutting edges before propagating face are used: ~5, via, WI], ~12. Again, no vertex coordinate is actuallyorientations). modified. We draw topologically disconnected faces as geometri-Step VI (Optional) We perform some stitching as described in Sec- cally disconnected for illustrative purposes. The cut is completedtion 5. once all marked vertices have been multiplied. Any two surface portions that share a collection of marked edges and no other edge4 Cutting or vertex will be disconnected by the cut. It is not possible to cut through any collection of edges: see Fig. .5A, we need at least twoAs illustrated in Figs. 4 and 6 cutting consists of disconnecting the adjacent edges if none of the edges is incident to the boundary.surface along a collection of marked edges or vertices: multiple The cost to compute the number of connected components ofcopies of vertices are created and assigned new indices; vertex in- faces incident on every marked vertex is less than the number ofdices in faces are modified to refer to the proper copy ‘. We de- marked vertices times the largest valence of a marked vertex. Then,scribe a “local” and a “global” methods for cutting; we mark sin- for each vertex v, we need to know the relative position of thegular edges and vertices and cut through them to obtain a manifold. corresponding corner in incident faces, in order to change the cor- responding vertex index. The worst case complexity of the local cutting is proportional to the number of marked vertices multiplied4.1 Local Method for Cutting by the largest valence of a vertex.We call this method local because it only operates on selected ver-tices and faces. Starting with a list of marked edges, we mark ver- 4.2 Global Method for Cuttingtices that are endpoints of marked edges. Additional vertices may The global method for cutting requires the specification of a set of ‘A rigourous definition of cutting (and stitching) can be found in Agoston [9] marked edges. We call it a global method because it operates on all 385
- 4. Figure 6: Global cutting. A: corner groups are shown using circulararcs. B: result of global cutting.the faces and vertices of the surface. The result is a cut through themarked edges as well as a cut through the isolated singular vertices. This method first creates a new surf;ice C from the original sur-face S by breaking all adjacencies between faces. There are asmany vertices in C as corners in S. In Fig. 6A, we show the cor-ners wa . , , ~2~ obtained by completely disconnecting vg*. We then define a partition of the face corners as follows: wevisit the unmarked edges in S one after the other. For each un- Figure 7: A: a non-manifold surface; after cutting through singularmarked edge, we retrieve the faces sharing that edge in S, and the edges, we obtain the surfaces of B. B: an incompatible sequence offace corners corresponding to the edge: endpoints in C. For each edge stitches (labeled 1,2 3 and 4), resulting in a non-manifold inedge endpoint, we express that the corners corresponding to that C. C: spirals indicate which comers are identihed (grouped) afterendpoint belong to the same group of corners. Once all the un- stitching.marked edges are visited, the corner groups correspond to the ver-tices in the surface resulting from the cut. In a look-up table, we cept that the red as well and green edges are not identified). Werecord the mapping from comer groups to the vertices of 5’ before address this problem specifically in Sections 5. I and 5.2. An edgethe cut. stitch is called valid if it creates no singularity. Since the vertex We illustrate the result of the global cutting ‘method on w; in identifications are induced by edge stitching, the link of every ver-Fig. 6B, where the comer groups go . . gie are shown. The exam- tex cannot be disconnected. Accordingly, no isolated singular ver-ple configuration that we use is the same as in Fig. 4; however, as tex can appear; we must only test for the creation of singular edges.the method is global, all vertices in the configuration are affected, We propose two different greedy strategies for stitching. Aand not only ~5. The worst case complexity of the method is linear Pinching Strategy consists of keeping the components that werein the total number of comers (to disconnect the surface entirely) created after cutting, and of stitching some of the boundary edgesand in the number of unmarked edges. created when cutting. We prove that it is impossible to create anon-Comparison of the two methods The labeling of vertices after the manifold using the Pinching Strategy. A Snapping Strategy consistscut is different in both methods, but this does not affect the surface of stitching along different boundaries, whereby a test needs to betopology. Unlike the local method, the global method implicitly developed to avoid creating singular edges, as illustrated in Figs. 7cuts through isolated singular vertices, which are singular vertices and 10.that are not endpoints of singular edges (see Fig. 5B). The globalmethod eliminates “standalone” vertices, which are vertices with-out incident faces. 5.1 Pinching Strategy: Pinching Adjacent Bound- There are cases when one method will be preferred against the ary Edges Created by Cuttingother: when the cut covers a large portion of the surface, the global Edges are determined to be “stitchable” if we did cut through suchmethod has a lower cost. The global method is more effective in the edges in the previous stage. We compute connected componentspresence of invalid faces (as discussed below), standalone or iso- of adjacent boundary edges (i.e, boundaries). For each boundary,lated singular vertices. Alternatively, when the number of marked we choose a pair of adjacent stitchable edges and pinch them alongedges or singular vertices is small with respect to the total num- their common boundary vertex: we diminish by two the length ofbers of surface edges and vertices, the: local method is less costly the boundary. Starting from the first edge stitch, we then verifybecause it visits only marked edges and vertices. whether the adjacent pair of edges on the boundary are stitchable and if so, we stitch them. We continue until the next pair of edges is5 Stitching not stitchable. We repeat the operation of searching for an adjacent pair of stitchable edges.Stitching corresponds to “identifying” boundary edges. The basic One advantage of this strategy is that we always obtain a mani-stitching operation is called an edge stitch. As explained in Sec- fold, assuming that all singular edges and vertices were cut before.tion 4.2, the global cutting method operates by grouping comers. Firstly, as we stitch adjacent edges, we only identify one pair ofAt the end of this process, a surface is defined by identifying every vertices vi and va. Secondly, let us suppose that when trying tocomer group with a new vertex. An edge stitch can be viewed as identify ~1 and va we observe that they are both adjacent to 2ro,sucha continuation of the grouping proces,s. After each stitch, a new that (we, ~1) and (210, are not both boundary edges. Assuming ‘~2)surface can be defined by identifying each comer group with a new that we stitch only edges that were cut, we know that before cutting,vertex. vi and 2)~were identified, meaning that (ZJO, and (~0, we) were ~1) When applying our conversion algorithm to the surface in Fig 7A, the same singular edge. Accordingly, a cut was made through thatwe would obtain the surface in B after cutting using either method singular edge. Without loss of generality, we assume that (~0, ~1)of Section 4, and unfortunate stitching choices (labeled I, 2, 3 and is not a boundary edge, meaning that some edge was stitched to it4) would create in C a non-manifold surface very similar to A (ex- after cutting. Using the Pinching Strategy, whe:n stitching an edge, 386
- 5. Figure 8: This configuration cannot be obtainedby following Strat-egy I of pinching adjacentboundary edges.at least one endpoint must be an interior vertex. ‘ur is a boundaryvertex so 2rcmust be an interior vertex. uc is an interior vertex that Figure 9: Stitchable edgepairs fall inside the samebox.is adjacent to WI and VZ, which are both boundary vertices. Af-ter cutting, ZIO a boundary vertex; now it is an interior vertex wasadjacentto two boundary vertices WI and ~2: this configuration isimpossible using the Pinching Strategy(seeFig. 8). More generally, applying the Pinching Strategy to a loop ofboundary edges(to a boundary), resultsin a loop of boundaryedgesto which trees of stitched (formerly singular) edgesare attached.If the original surface before cutting representsa solid, this strat-egy for stitching has the effect of breaking all connections of zerowidth, and regularizing the solid by computing its interior (seeFig. 1D.) This is not true if singular edges form a graph on thesurfacethat is not a forest: eachloop of singular edgeswould yieldtwo disconnectedboundariesafter cutting. Having many componentsmay be useful for the following situ-ations: in somecases(e.g., the iso-surfaceof Fig. 13),mostcompo-nentsexcepta few can be rejectedbecause they correspondto noiseor have no impact on a visualization. Also, somealgorithms per-form better with many components,e.g., the surfacesimplificationof Rossignacand Borrel [lo]. D F Figure 10: Different configurations for a proposedstitch between5.2 Snapping Strategy : Stitching Edges Belong- (vo,~) and (w;,t&). ing to Different Boundaries only try to stitch edgesfrom different connectedcomponents;after It may be useful to allow stitching between edgesthat were not this passall the stitchable edgepairs must belong to the samecon-previously identified, but which are geometrically close to one an- nectedcomponent;in the secondpasswe attemptto stitch any pairother: for instance if the surface is specified by a set of discon- of edges.nectedfacesand if the coordinatesof verticesof such facescontain Tests for Determining Valid Stitches At each step of the stitch-small, unintendeddiscrepancies.Also, to provide suitable input for ing process,each vertex of the surface correspondsto a group ofmethodssuch as Taubin and Rossignac’s[4], that have an overhead corners and each edge correspondsto two groups of corners. Tocost for every connectedcomponent,we wish to join disconnected avoid any confusion with the edgesof the original cut surface wesurfacesand minimize the number of connectedcomponents. We call such edgescurrent edges. A stitch is performed by stitchingnext presentthe strategythat was implemented; we,describetests two current edges;this in turn is performedby merging eachof theto insure that the stitches are valid. Our methods were success- two pairs of corner groups that define the endpoints of two currentfully applied for pre-processing332 VRML modelsbeforegeomet- edges.Since the surfaceis a manifold before the stitch, every cur-ric compression:we report statisticspertinent to this application in rent edgeis incident to one or two faces. This condition must alsoTable 1. hold after the stitch. Only current edgesincident to one of the fourStrategy We start by deciding when a pair of boundary edgesis vertices involved in the stitch may be affected by the stitch. Thesestitchable and the order in which such pairs will be stitched. We edgesmust, by definition, belong to one of the starsof the four ver-consider two edgesto be stitchable if each of their corresponding tices. Supposethat we wish to stitch the two current edges(~0, 2rr)endpointsare locatedwithin an e distance.Wechoosee to be a frac- and (vi, vh) by merging wc with vi and 211 with wb. As showntion of the length of the shortestedge. To avoid a quadratic num- in Fig. 10, severalconfigurations may occur. In this figure circlesber of comparisonsbetween boundary edges,we cluster the edges representgroups of comers (vertices) and lines representbound-in an octree-like structure constructedusing the distance between ary edgesof the cut surface. A current edge is representedby twoedgecenters. To build the structure, we first compute a bounding circles connectedby at least one edge. The manifold property re-box containing all the edgecentersand then recursively subdivide quires that no more than two edgesconnect the samecircles. Theit into two parts on the longest side. The boxesare enlargedby e/2, configurations can be partitioned into three classes:such that neighboring boxes neednot be visited when looking for a Class I The starsof vo and vr do not intersect the stars of wh andstitching candidateas shown in Fig. 9. The subdivision stopswhen vi. This case is illustrated Fig. 10A; the stitch is valid; it can beeither the side of a box becomessmaller than E or the number of performed.edgesin a box is less than a fixed number p. In practice, we use Class II Either (~0, vi) or (VI, ~6) is a current edge. Fig. IOBp = 20. shows this configuration. The stitch cannot be performed since it We consider in turn each pair of edgesin each leaf box of the createsa self-loop edgewhich is prohibited in our surfacemodel.octree. When we encounter a pair of edgeswhose endpoints meet Class III Therearetwo current edgesof the form (w, ‘~0)and (v, vi)the e distance criterion we verify whether the edge stitch is valid, or of the form (v, ~1) and (v, ub). Severalsuch configurations areand if so, we perform the stitch. To minimize the number of con- shown in Figs. IOC,D,E and F. Fig. 1OCillustrates the casewherenected componentswe visit the octree twice: in the first passwe v = 211.Here the stitch is invalid, since the stitched edge would 387
- 6. be incident to three faces. For similar reasons, stitches cannot be performed for the configurations of Fig. IOD and Fig. 10E. HOW- ever, the configuration of Fig. IOF yields ‘no singular edge. In this last case, stitching (210, ~1) and (vi, 1~;))implies stitching (v, ~0) and (v, vi). We call this last stitch an implicit stitch. In contrast, we refer to the stitch between (VO,OI) and (vi, vh) as an explicit stitch, Explicit stitches that yield a non-manifold surface are re- jected. However, in the process of rejecting a proposed explicit stitch we may encounter a valid implicit stitch, in which case we merge the corresponding corner groups. This is the case for the configurations shown in Figs. IOC and IOE. A procedure called ClassifyMerging(v, v’) evaluates the effect of merging two corner groups, v and v’ and classifies the merging as one of three types: (1) creates at least one singular edge, (2) creates no singular edge and creates no implicit stitch, (3) or crea’tes no singular edge and creates one or two implicit stitches. Given two stitchable edges (~0, ~1) and (vi, vh) we perform the following steps: Step I We evaluate ClassifyMerging(vo, vi) and perform the merg- @ia[ 1 ing if there is an implicit stitch (3). Step II We evaluate ClassifyMerging(vl, 11;)and perform the merg- ing if there is an implicit stitch (3). Step III If one of the two mergings was performed (3) and if the other does not create a singular edge and no implicit stitch (2) thenperform the merging. Step IV If neither merging was performed and if both mergingswould not create any singular edges (2) then perform both merg- E F G ings. It is important to perform the first two steps sequentially. In Figure I I: Lamp model. A: general view. B, C, D: successive de-the case of Fig. lOC, the above procedure will merge vo with vi in tails showing edges shared by more than two faces. E,F,G: Singular Step 1. However, ClassifyMerging(v1, vb) will prevent the second edges are shown in red and singular vertices in b1ac.kin increasinglymerging in Step II. Figure IOD shows another case where order is detailed views.important. ClassifyMerging works by maintaining a list of cur-rent edges incident to the corners of a group. ClassifyMerging() the various steps of our methods: we use different colors for bound-verifies whether any edge is repeated in two lists. for each repe- ary edges, regular edges and singular edges; we highlight singulartition, if both edges are boundary edges, then there is an implicit vertices; in certain illustrations, we may disconnect geometricallystitch, otherwise, a singular edge would be created when merging. adjoining boundary edges; we may also use different colors forOrientability If we wish to have an oriented surface, firstly, we en- painting the faces belonging to different connected components;force the orientability of the input surface using the cutting methods The first example is a polygonal CAD model of a desk lamp inof Section 4. Secondly, we orient consistently the faces of the dif- Fig. 1IA. The original model had 5054 triangles and 28 IO vertices;ferent surface connected components: we maintain a partition on we discovered 125 singular edges and 128 singular vertices. Afterthe faces into connected components; each face also carries an ori- conversion by cutting through singular edges and vertices, thereentation bit indicating whether the ordering of its vertices (its orien- were 5052 triangles and 3058 vertices. Fig. 11A shows the varioustation) should be kept or reversed. The arientations of the various connected components after conversion using different colors. Thecomponents are subject to change when stitching. The orientation conversion took less than one second with an IBM RS6000 580.bit of a face composed with the orientation bit of the component The second example is a polygonal model of the space ship En-representative provide the current orientation of a connected com- terprise with 12539 triangles and 1501 I vertices. Fig. 13A (on theponent, When stitching two disconnected components, we update color page) is a global view of the model, where disconnected sur-the current orientations to make them consistent across the stitched face components are painted with different colors. We discoverededges: we update the orientation bit of the representative of one 594 singular edges and 1878 singular vertices. After removing in-of the components. When stitching edges of the same component, valid triangles, there were 435 remaining singular edges and I689implicit stitches do not affect the orientability, but explicit stitches remaining singular vertices. After conversion and stitching usingmay affect the orientability: In Step IV, we retrieve the current ori- the Snapping Strategy, there were 12552 triangl’es and 7429 ver-entations of the faces incident on the (bou.ndary) edges (~0, ~1) and tices. The conversion took 21 seconds using an IBM Power PC 42T.(vi, &) and we make sure that they are consistent. Otherwise, we This example is a good advocate for automated correction methods:do not perform the stitch. asking a user to decide on how to locally connect the surface 1800 times seems impractical. The third example is a polygonal approximation of an iso-surface6 Examples extracted from a CT-scan of a fossil monkey jaw, illustrated in Fig. 13A. The original model had 75842 triangles and 37624 ver-Conversion of Non-Manifold Surfaces Invalid faces and singular tices. We discovered 462 singular edges and 563 singular ver-vertices and edges are frequent in real world geometric data. The tices; singular edges are shown in Fig. 13B and singular verticesfollowing examples illustrate some of these singularities and the in Fig. 13C. Although non-manifold iso-surfaces are justifiable inbenefits of using our methods. We show three examples of conver- the general case, in this case singularities came from an incorrectsions, performed using the cutting algorithm followed with either algorithm. Invalid triangles with duplicate vertex indices contributethe Pinching or Snapping Strategies for stitching. As the effect of to the singular edge and vertex count: they are incident to the samethe conversion is of pure topological nature, it is essentially “invis- edge (consecutive vertex index pair) twice, and provided the trian-ible” in a display; however, we use the following artifices to show gle shares that edge with neighboring triangles, the edge is singu- 388
- 7. of Section 4.2, they first stitch through regular edges, but they can subsequently create a non-manifold after stitching additional edges. Murali and Funkhouser [18] start from polygon faces to partition the volume in cells, and determine if each cell is solid. From the solid cells, they produce a manifold boundary representation. The second category consists of tools to create and manipulate surface models. The technique of Szeliski et al. [19] builds a new polygonal surface from an existing surface by defining a collection of point samples, using point repulsion methods to distribute the points evenly. Subsequently, a manifold surface triangulation of the remaining points is found. The technique of Welch et al. [20] builds a polygonal surface starting from a simple surface, by apply- ing a series of surface operations, that consist of adding, deleting or morphing a portion of surface. They use mesh cutting techniques, but cut only along simple curves. Both methods build new lists of vertices and faces, while we manipulate an existing list of face vertex indices. Veron and Leon [21] detect automatically singular vertices and edges but they require user assistance for correcting the singularities. The last category of related work is in Solid Modeling, to de- velop data structures and tools for building boundary representa- tions of solids. It is related because conversions between mani- fold and non manifold representations are discussed, for instancelar. After removing invalid triangles, we discovered 2 remaining in Hoffman [22] (see also [23, 24, 25]). Heisserman [26] devel-non adjacent singular edges and 10 singular vertices. After cutting oped a method for extracting a manifold boundary representationthrough singular edges and vertices, we obtained 75371 triangles from a set of intersecting solids. Our approach is different becauseand 37636 vertices. The conversion took 6 seconds with an IBM we do not assume to work with solids, and do not use the notionsRS6000 580 workstation, including the removal of invalid faces. of interior or complement.For this example, it is preferable to use the local cutting methodrather than the global cutting method, since the number of singularedges and vertices is very small after removing invalid faces. 8 ConclusionDigression: Surface Smoothing and Singularities We now de-scribe another application for our methods: an algorithm can ter- We have used cutting and stitching for the automatic conversion ofminate normally in the presence of singular edges and vertices but a set of polygons to a manifold polygonal surface, that can poten-deliver unintended results. We consider the surface subdivision and tially exhibit self-intersections (which are not treated). All proper-smoothing algorithm of Taubin [7]: designed for use on a manifold ties are passed on to the output surface. Face and corner propertiessurface, it operates on a non-manifold as well; however, the result- are unchanged, as our method preserves corners. When a vertex ising surface is not smooth in the vicinity of the singular edges and multiplied, the same properties are assigned to all copies.vertices. We use the example of two spheres sharing two edges, We have successfully applied this conversion to extend algo-providing a non-manifold model in Fig. 12G. In Fig. 12H we at- rithms for surface simplification [3] and compression [4], to enabletempt to subdivide and smooth G, and notice the non-smooth be- processing of non-manifold surfaces. This method was success-havior in the vicinity of the singular edges. In Fig. 121, we first fully applied to pre-process non-manifold polygonal surfaces be-cut through the singular edges using the methods of Section 4 and fore simplification in IBM Data Explorer [27]. This method maythen subdivide and smooth. In Fig. 12J, we smooth after cutting not be suitable if the original surface was intended to be a non-and stitching using the Pinching strategy. In Fig. 12K, we smooth manifold, i.e, if topological singularities (singular edges and ver-after cutting and stitching the Snapping Strategy. Fig. 12L illus- tices) are an integral part of the model. Otherwise, it is general andtrates another outcome when stitching using the Snapping strategy handles any type of topological singularity without user interven-as well. tion. Aside from reducing the number of boundary edges after con- verting to a manifold, another application of stitching is to join7 Related Work topologically disconnected but geometrically adjoining surface com- ponents, which we found useful for optimizing surfaces before com-Our method is very different from most of the previous work as it pressing them using Taubin and Rossignac’s method. Other strate-operates solely on the surface topology. The first category of prior gies can be developed for stitching, depending upon the applica-art methods operate both on the geometry and topology to modify tion.surfaces so that they can represent the boundary of solids [11]. Thisis an important issue for Rapid Prototyping of models representedusing the .STL format consisting of topologically disconnected tri- A Data Structuresangles (see [12, 13, 6, 14]). As was duly noted, converting a non-manifold surface to a solid is a difficult task with floating point Our methods take as an input a surface represented with a list ofprecision problems, computationally demanding tasks (e.g., poly- n, vertices and with a list of nf faces. Internally, the vertices andgon intersections), and a number of open problems, as the problem faces are preferably represented using a “vertex array” and a “faceof filling a polygonal hole (boundary) with a “reasonable” polyg- array”. The vertex array contains the vertex coordinates (three peronal surface without creating intersections [15]. Relatedly, Butlin vertex). The face array contains the vertex indices for each faceet al. [16] attempt to “repair” CAD data in order to use it for engi- stored contiguously. We also use a “face start array” to provide theneering analyses or to simplify data exchange. Barequet and Ku- starting index of each face in the face array.mar [17] operate on STL files; as with the global cutting method By looping through the face array, we build a structure of ne surface edges, recording the number of incident faces. For effi- 389
- 8. Sourceof wwwmicrosoft. WWWWUiS. www.3dcafe. r VRML data COdV~l COIlI COIlI [91 M. K. Agoston. Algebraic Topology. A First Course. Pure and Statistics Applied Mathematics.Marcel Dekker, Inc., New York, 1976. Models 200 23 109 J. Rossignacand I? Barrel. Multi-resolution 3d approxima- Indexed Face Sets 665 128 421 PO1 ConnectedComponents 2146 29461 4525 tions for rendering. In B. Falcidieno and T.L. Kunii, editors, Vertices 2862I 51015 59119 Modeling in Computer Graphics, pages4:%465. Springer- Singular Vertices 708 22960 4691 Verlag, 1993. Edges 52610 31113 149690 Singular Edges 601 0 1916 u 11M. Segal and C.H. Sequin. Partitioning polyhedral objects Changein Components -1106 -29033 -2709 into non-intersecting parts. iEEE Computer Graphics & Ap- Changein Vertices -3656 -40078 -1663 plications, 8( 1):53-67, January 1988. Changein Edges -2167 - 10968 1191 Total CPU Time 41s 37s lm5ls WI 1.Makela and A. Dolenc. Someefficient proceduresfor cor- recting triangulated models. In Proc. Symp. on Solid FEeformTable 1: Statistics on conversion and stitching using the Snapping Fabrication, pages 126-34, July 1993. Dept. of Mech Eng.,Strategy applied to VRML 2.0 data available on the World Wide Univ of Texasat Austin.Web. Timings were measuredin minutes and secondson an IBMRS6000 590 in debug mode; they include parsing of VRML files iI31 MC. Bailey. Tele-manufacturing:rapidproi.otyping on the in-and scenegraph operations. temet. IEEE Computer Graphics & Applications, 15(6):2& 26, November 1995.ciency, the algorithm requires constant time accessin averagetothe edgesindexed by the two endpoint indices. The edgedatastruc- [I41 V. Chandru, S. Manohar, and C.E. Prakash.Voxel-basedmod- eling for layered manufacturing. IEEE Computer Graphics &ture should also provide constant time accessto the incident faces. Applications, 15(6):42-47, November 1995.In our implementation, the edgesare organizedas a hash table in-dexed by the sorted pair of endpoint indices (smaller vertex index [I51 G. Barequetand M. Sharir. Filling gaps in the boundary of afollowed by larger vertex index). This hash table, and the list of polyhedron. Computer Aided Geometric Design, 12(2):207-face incidences for each edge are constructed in O(nr) time by 229, 1995.visiting eachface, and for eachpair of consecutiveverticesmodulo [If51 G. Butlin and C. Stops. CAD datarepair. In 5th Internationalcircular permutation, by retrieving the edge in the hash table and Meshing Roundtable, pages7-l 2, 1996.updating its incidence list or inserting the edge in the hash table ifit was not present. [I71 G. Barequetand S. Kumar. Repairing cad models. In Visual- ization 97, Phoenix, AZ., act 1997.IEEE. When cutting and stitching, we need to maintain a partition onthe faces of a vertex star or equivalently on all the comers associ- Ll81 T.M. Murali and T.A. Funkhouser. Consistent solid andated to a vertex. We use the Union-Find algorithm for this purpose, boundary representationsfrom arbitrary polygonal data. Inwhose running time is essentially O(n), when 7~ elementsare in the Symposium on Interactive 3D Graphics, pages 155-l 61,partition [28]; once the partition is determined,accessto represen- Providence,RI., apr 1997.ACM.tatives of faces or comers takes constant time. Partitions are also [I91 R. Szeliski, D. Tonnesen, and D. Terzopoulos. Curvatureused for orienting facesconsistently when stitching in Section 5.2. and continuity control in particle-based surface models. In Geometric Methods in Computer Vision II,.,volume 2031- 15,REFERENCES pages172-l 81. SPIE, July 1993. WI W. Welch and A. Witkin. Free-form shapedesign using tri- [II S. Doo and M. Sabin. Analysis of the behaviour of recursive angulatedsurfaces. In Siggraph ‘94 Conference Proceedings, division surfacesnear extraordinary points. Computer Aided pages247-256, Orlando, July 1994.ACM. Design, 10(6):356-360, 1978. v-11 P. Veron and J.C. Leon. Static polyhedron simplification us- PI A. Varshney. Hierarchical Geometric Approximations. PhD ing error measurements. Computer Aided Design, 29(4):287- thesis, University of North Carolina at Chapel Hill, 1994. 298, April 1997. [31 A. GuCziec.Surfacesimplification inside a tolerancevolume. PI CM. Hoffmann. Geometn’c and Solid Modeling: An Intro- Technical report, IBM T.J. Watson ResearchCenter, York- duction. Morgan Kaufmann, San Mateo, California, 1989. town Heights, New York, March 1997. revised version of RC 20440. [231 A.A.G. Requicha. Representationsfor rigid solids: Theory, methodsand systems.ACM Computing Surveys, 12(4):437- [41 G. Taubin and J. Rossignac. Geometry Compressionthrough 464, December1980. Topological Surgery. Technical Report RC-20340, IBM Re- searchDivision, January 1996. 1241C.M. Hoffmann, J.E. Hopcroft, and MS. Karasick. Robustset operationson polyhedral solids. IEEE Computer Graphics & PI H. Hoppe. Efficient implementation of progressivemeshes. Applications, 9(6):50-59, November 1989. Technical Report MSR-TR-98-02, Microsoft Research,Red- mond, Washington,January 1998. r251 H. Desaulniers and N.F. Stewart. An extension of manifold boundary representationsto the r-sets. ACM Transactions on 161J.H. Bohn. Removing zero-volume parts from cad modelsfor Graphics, 11(1):40-60, January 1992. layered manufacturing. IEEE Computer Graphics & Applica- J.A. Heisserman. Generative Geometric Design and Bound- tions, 15(6):27-34, November 1995. P61 ary Solid Grammars. PhD thesis, Carnegie‘Mellon University, [71 G. Taubin. A signal processingapproachto fair surfacede- may 1991. sign. In Siggruph, pages351-358, Los Angeles, August 1995. ACM. l271 G. Abram and L. Treinish. An extendeddata-flow architecture for data analysis and visualization. In Visualization 95, pages PI X. Sheng and I.R. Meier. Generating topological structures 263-270, Atlanta, GA., act 1995. IEEE. For surface models. IEEE Computer Graphics & Applica- tions, 15(6):35-41, November 1995. PI Thomas H. Cormen, Charles E. Leiserson, and Ronald L. Rivest. Introduction to Algorithms. Mac Graw Hill, 1989. 390
- 9. 553

No public clipboards found for this slide

×
### Save the most important slides with Clipping

Clipping is a handy way to collect and organize the most important slides from a presentation. You can keep your great finds in clipboards organized around topics.

Be the first to comment