Delaunay Meshing of Piecewise Smooth Complexes without Expensive Predicates ∗

Recently a Delaunay refinement algorithm has been proposed that can mesh piecewise smooth complexes which include polyhedra, smooth and piecewise smooth surfaces, and non-manifolds. However, this algorithm employs domain dependent numerical predicates, some of which could be computationally expensive and hard to implement. In this paper we develop a refinement strategy that eliminates these complicated domain dependent predicates. As a result we obtain a meshing algorithm that is practical and implementation-friendly.


Introduction
Delaunay mesh generation of non-smooth domains such as piecewise smooth surfaces and complexes is a difficult challenge.Aided by recent developments in sampling theory and computational topology, Chew's furthest point strategy [1,2] (Delaunay refinement) has been applied to generate Delaunay meshes for smooth surfaces with provable guarantees [3,4].The lack of global smoothness poses two main difficulties in extending these methods to non-smooth domains.First, the sampling theory developed for smooth surfaces breaks down for non-smooth surfaces.Secondly, small input angles possibly present at non-smooth regions pose problems for the termination of Delaunay refinement [5].be detected at the length scale the algorithm is asked to operate.However, a homeomorphic meshing is guaranteed when the supplied scale is sufficiently small.Actually, in practice, the disk condition usually suffices to provide a homeomorphism.
One of our main tasks is to prove that the refinement always terminates.To this end we use the following result.If the protecting balls are sufficiently small and satisfy some separation properties (conditions C1-C3 in Section 2.), then the disk condition holds if the restricted Delaunay triangles are sufficiently small.Therefore, the failure of the disk condition signals either balls do not satisfy separation properties, or are large, or triangles are large.The way we compute the protecting balls, failure of separation properties also implies that they are large.In essence, if the disk condition fails, either a ball or a triangle is too large.The algorithm refines the larger of the two and hence guarantees that neither a protecting ball nor a triangle gets arbitrarily small ensuring termination.One may observe that, this strategy does not allow adaptive mesh sizing.However, one may regulate the input scale to produce meshes at different levels of resolution.
Perhaps the most important ingredient in this approach is to maintain a set of protecting balls with the separation properties.It turns out that it is difficult to ensure one of these properties exactly (condition C3) when the balls are large.Instead we maintain a more relaxed condition which implies the desired property when the balls are sufficiently small.
We have implemented our algorithm in this paper.In an earlier attempt we tried to mesh with the disk condition but pre-computed the balls with a small radius chosen heuristically [15].The code failed in cases where the pre-selected size of the balls was wrong.The approach in this paper allows the refinement algorithm to determine the balls automatically instead of pre-computing them.We report experimental results for our protection algorithm and meshing in Section 5.The code and a video explaining the experimental results have been released [16].

Domain
Throughout this paper, we assume a generic intersection property that a k-manifold σ ⊂ R 3 , 0 k 2, and a j-manifold σ ′ ⊂ R 3 , 0 j 2, intersect (if at all) in a (k + j − 3)-manifold if σ ̸ ⊂ σ ′ and σ ′ ̸ ⊂ σ.We will use both geometric and topological versions of closed balls.A geometric closed ball centered at point x ∈ R 3 with radius r > 0, is denoted as B(x, r).We use int X and bd X to denote the interior and boundary of a topological space X, respectively.
The domain D is a piecewise smooth complex (PSC) where each element is a compact subset of a smooth (C 2 ) k-manifold, 0 k 2. Each element is closed and hence contains its boundaries.For simplicity we assume that each element has a non-empty boundary (used in Lemma 8, this restriction can be removed by some added complication in the initialization of the algorithm).We use D k to denote the subset of all k-dimensional elements, the kth stratum.D 0 is a set of vertices; D 1 is a set of curves called 1-faces; D 2 is a set of surface patches called 2-faces.For 1 k 2, we use D k to denote D 0 ∪ . . .∪ D k .
The domain D satisfies the usual proper requirements for being a complex: (i) interiors of the elements are pairwise disjoint and for any σ ∈ D, bd σ ⊂ D; (ii) for any σ, σ ′ ∈ D, either σ ∩ σ ′ = ∅ or σ ∩ σ ′ is a union of elements in D. We use |D| to denote the underlying space of D. For 0 k 2, we also use |D k | to denote the underlying space of D k .

Complexes
We will be dealing with weighted points and their Delaunay and Voronoi diagrams.A weighted point p with weight ω p is represented as a ball b = B(p, ω p ).The squared weighted distance of any two points p and q is d(p, q) 2 = d(p, q) 2 − ω 2 p − ω 2 q where ω p and ω q are the weights of p and q respectively.With this definition, an unweighted point x ∈ R 3 has a distance of d(x, p) = Let S be a point set sampled from |D|.For any sub-collection X ⊂ D we define Del S| X to be the Delaunay subcomplex restricted to X, i.e., each simplex ξ ∈ Del S| X , called a restricted simplex, is the dual of a Voronoi face V ξ where ∪ σ∈D Del S| σ .An i-face σ ∈ D i should be meshed with i-simplices.However, Del S| σ may have lower dimensional simplices not incident to any restricted i-simplex.Therefore, we compute special sub-complexes of restricted complexes.Define the following i-dimensional subcomplexes (see Figure 1):

Protection and Refinement
The meshing algorithm computes a set of balls protecting 1-faces.Unlike [8], the protecting balls are adjusted on the fly as refinement proceeds.It inserts points in 2-faces to refine the triangulation.The protecting balls and the triangulation are refined simultaneously either to satisfy a disk condition or to achieve a refinement level dictated by an input scale parameter.In what follows all skipped proofs appear in the appendix.

Covering 1-faces
Let σ(x, y) denote the curve segment oriented from x to y on any 1-face σ.In this notation σ = σ(u, v) where σ is oriented from the end point u to the other end point v. Let b = B(c, r) be a ball with c ∈ σ(x, y).The intersection b ∩ σ is a set of curve segments.Among them the curve segment containing c is called the segment of b in σ, seg σ (b), see Notice that the choice of the constant 6  7 in C2 is a little arbitrary.We need only a factor of r ′ in the expression and a follow-up analysis with other constants are also possible.We will maintain a point set S ⊂ D with the following properties throughout the algorithm: all points in S except those in D 1 are unweighted and no unweighted point has a negative weighted distance to any other point.This means each unweighted point p ∈ S has V p non-empty.We call such a point set admissible.
It is worthwhile to note that one of the consequences of conditions C1-C3 would be the following result which would imply R2 in Lemma 2.
Lemma 1 Let S be an admissible point set satisfying conditions C1-C3.Let p and q be adjacent weighted vertices on a 1-face σ.V pq is the only Voronoi facet in Vor S that intersects σ(p, q).Let z be any point in σ(p, q).Let b p and b q be the balls centered at p and q respectively.The point z is contained in b p ∪ b q .Due to property C3, z being a point in σ(p, q) cannot lie inside any ball other than b p and b q .We remark that b p and b q may have a common intersection with another ball, but z cannot be contained in that ball.Therefore, z cannot lie on any Voronoi facet partly defined by a point other than p and q.However, σ(p, q) has to intersect at least one Voronoi facet since p and q lie in two different Voronoi cells.Therefore, the only Voronoi facet which intersects σ(p, q) is V pq .
For any σ ∈ D 2 and any triangle t ∈ Skl 2 S| σ , define size(t, σ) to be the maximum weighted distance between the vertices of t and points in V t | σ .This is the maximum weighted distance between vertices of t and the points where the dual Voronoi edge of t intersects σ. λ-property: We say S has the λ-weight property if each point in S has a weight at most λ 0. We say S has the λ-size property if size(t, σ) λ for each triangle t ∈ Skl 2 S| σ and S has the λ-weight property.
The following observation is at the heart of our refinement algorithm (see Section 7. in appendix for a proof sketch).
Lemma 2 Let S ⊂ D be an admissible point set and p ∈ S be a point on a 2-face σ.Let σ p ⊂ σ be the set of all connected components in V p | σ that intersect a Voronoi edge.There exists a constant λ > 0 so that hypotheses H1 and H2 imply results R1 and R2 where (H1) S satisfies λ-size property.(R2) If p ∈ bd σ, at least two Voronoi facets of V p intersect bd σ, each intersecting one of the curve segments between p and its adjacent weighted points (possibly two) in bd σ.
Interpreted in terms of the Delaunay triangulation, the conclusion of the above lemma implies that the triangles incident to p and restricted with respect to σ form a topological disk around p.This disk has p at the boundary if and only if p is in bd σ.Furthermore, if p is in bd σ, it is connected to its two adjacent weighted points in bd σ on this disk.We will formulate a disk condition with these properties.Our refinement algorithm is primarily driven by this disk condition.The conclusion of Lemma 2 fails only if either there is a protecting ball with radius more than λ, or there is a triangle t ∈ Skl 2 S| σ for which size(t, σ) > λ for some λ > 0. However, since we do not know which of the above two cases has happened, we take a conservative approach.We compute the maximum radius r max of all protecting balls and also compute the maximum d max = size(t, σ) over all t and σ.Let x be the point of intersection of a Voronoi edge with D which realizes d max .If r max > d max we refine the largest protecting ball.Otherwise, we insert x.In the first case we are ensured that we are refining balls of size larger than a fixed positive constant.In the second case, we are inserting a point in a compact domain with a positive lower bound on its distances to every other points.Termination by packing argument follows.
For the above algorithm to work, it is important that the balls satisfy C1-C3 when balls are sufficiently small.It turns out that it is difficult to maintain the condition C3 at early phases when the balls are relatively large.We replace C3 by the following two conditions that are maintained by the ball refinement algorithm.These conditions imply C3 when the balls are small enough.We show that seg σ (b) and seg σ (b ′ ) do not intersect for sufficiently small λ.It follows from the differentiability of σ that there exists a λ > 0 so that any ball of size smaller than λ intersects σ in a single segment.Assuming that b and b ′ have radii smaller than λ, we have b ∩ σ = seg σ (b) and b ′ ∩ σ = seg σ (b ′ ).We claim that no point in seg σ (b ′ ) can lie in seg σ (b) when λ is sufficiently small.If there were such a point, there would exists a ball b ′′ with one of the following properties: (i) either b ′′ is adjacent to b and its center c ′′ lies in seg σ (b), or (ii) b ′′ is adjacent to b ′ and c ′′ lies in seg σ (b ′ ).Without loss of generality, assume that (i) holds since the other case can be argued exactly the same way.
We know that the length d σ (c, c ′′ ) is at least 7 6 r by property C3.a.Making λ sufficiently small, d(c, c ′′ ) can be set arbitrarily close to d σ (c, c ′′ ) which would imply that d σ (c, c ′′ ) can be made arbitrarily close to r.This would contradict that d σ (c, c ′′ ) is at least 7  6 r.Therefore, we can claim that the curve segments of two non-adjacent balls cannot intersect if they are centered on a same 1-face σ.

Ball refinement
The ball refinement routine simply removes a ball and covers the curve segment between the centers of its adjacent balls with balls of smaller radii.Therefore, we encounter the generic situation where a curve segment σ(x, y) needs to be covered by protecting balls whose radii are determined by a given parameter α > 0. The points x and y are the right and left end points of some segments, say seg σ (b 0 ) and seg σ (b k ) respectively, see Figure 3.We call this routine COVER(x, y, α).
We proceed from x toward y along the curve while computing the balls that satisfy conditions C1, C2, and C3.a.Condition C3.b is taken care of by another routine called SEPARATE.As we walk from x to y, each step places a new ball of radius α that intersects deeply with the previous ball while covering a new piece of the curve.When we reach y, we place a ball that intersects deeply with both the endpoint ball and the previous one in the walk.
More specifically, suppose that We compute a small ball β i+1 = B(y i , α/3) that aids the computation of b i+1 , see Figure 3.The aiding ball helps compute the next ball so that its center is not contained in the segment of the previous ball.Among the two end points of segment seg σ (β i+1 ), we use the one which is further from x.Let this end point be z i+1 .The center of the next ball b i+1 is placed at z i+1 .
π, this weighted distance is more than r ′ when r > −r ′ /2 cos θ which is satisfied for θ > 2π/3.The curve σ(c, c ′ ) can be assumed to lie within cones having apexes at c and c ′ and arbitrarily small aperture angles if r and hence d(c, c ′ ) is sufficiently small.Since seg σ (b) and seg σ (b ′ ) do not intersect if r is small enough (Proof of Lemma 3), the curve σ(c, c ′ ) needs to avoid the common intersection of b and b ′ .These two constraints force the angle θ to be close to π as r approaches zero.In other words, there is a fixed positive constant λ 1 so that if r λ 1 , the weighted distance between b and b ′ becomes larger than r ′ .Next, assume that b and b ′ have centers on different 1-faces.We need to consider the special case of vertex balls before we argue about this case.A vertex ball b can intersect a ball whose center lies on a different 1-face only if b's radius is more than a fixed positive constant.This is true because we always refine the larger of the two such intersecting balls and there is a positive distance between a vertex and any 1-faces that do not contain it.This observation with the argument in the previous paragraph imply that a vertex ball is refined by SEPARATE only if its size is more than a fixed positive constant.Since no vertex balls can be smaller than a fixed positive constant, two balls centered on two different 1-faces intersect only if the larger ball has a radius more than a fixed positive constant λ 2 > 0.

REFINEBALL(b)
If b covers σ ∈ D 1 , let r σ be the minimum of the radii of balls adjacent to b on σ and b itself.We observe that every internal node except the roots is refined by SEPARATE.The only way REFINEBALL can call itself is when a ball b σ is to be refined in step 1.But, then b σ becomes a root.All other calls to REFINEBALL are generated by SEPARATE.
By Lemma 5, SEPARATE calls REFINEBALL on a ball b only if the size of b is larger than a fixed positive constant δ > 0. The children of a node b are created by COVER which, by construction, creates only finitely many balls with radius at most (1/4 × 7/6) = 7/24th the radius of b.The height of any refinement tree is finite since any path from the root to a leaf has internal nodes with radius larger than δ > 0 and each level decreases the radius by a factor 7/24 or less.Also, each node has finitely many children.Therefore, each refinement tree is finite.Now we argue that the number of roots and hence the entire set of refinement trees is finite implying that REFINEBALL terminates.
Except for the first ball b, REFINEBALL(b) creates a root for each b σ in step 1.If such a root is created, the ball b must be a vertex ball.Later in recursion, a call to REFINEBALL on a vertex ball can only be given by SEPARATE.Therefore, each root except b can be associated with a call to REFINEBALL by SEPARATE on a vertex ball.Observe the following: only a fixed number of roots are created per vertex ball; a vertex ball is shrunk by a factor of two between two successive calls to refine it; SEPARATE calls for refining a vertex ball only if its size is larger than a fixed positive constant (Lemma 5).These observations mean that only finitely many roots are created.
(ii): Almost immediate: assume that C1, C2, and C3.a hold before calling REFINEBALL.It creates new balls by calling COVER which satisfies C1, C2, and C3.a (Lemma 4).If a ball does not satisfy C3.b (may happen only after a vertex ball is refined), it refines it by calling SEPARATE.The claim follows.

Meshing Algorithm
The algorithm for meshing D first protects the 1-faces with PROTECT(D,λ) where λ is a user defined parameter.It acts as an input scale parameter which becomes an upper limit for the radii of the protecting balls. PROTECT(D,λ)
Observe that at the end of step 2, PROTECT creates a set B of finitely many balls (most likely quite large).Each call to REFINEBALL on a ball b creates only finitely many balls as output (Lemma 6).Since a ball is refined only if its radius is more than λ > 0, and since each refine shrinks the radii by at least a factor of 2, there are only finitely many balls created in step 3. Termination of step 4 follows from Lemma 5. Hence PROTECT terminates.At termination it must satisfy C1, C2, C3.a, and C3.b since it refines balls with COVER and calls SEPARATE to enforce C3.b.
After the initial protection of D 1 , refinement of D 2 begins.In this phase Delaunay refinement is run with a disk condition which can be seen as a generalization of a similar condition used in [3,4].See Figure 4 for more explanations.Let p be a point on a 2-face σ and let Umb σ (p) be the set of triangles in Skl 2 S| σ that are incident to p. DiskCondition(p) : (D1) For each σ ∈ D 2 containing p, the underlying space of Umb σ (p) is a 2-disk, (D2) point p is in the interior of this 2-disk if and only if p ∈ int σ, (D3) in Umb σ (p), p is not connected to any other point on D 1 which is not adjacent to it, (D4) all vertices of Umb σ (p) are in σ.
Once the restricted Delaunay triangles are collected, the above checks are only combinatorial.One may notice that D1 and D2 are dual to R1 and R2 of Lemma 2. We assume that as we insert points, weighted or unweighted, Vor S and Del S get updated appropriately.3.If S has grown in the last execution of step 2, repeat step 2.

Return
Notice that in step 2(a) we refine either a ball or a triangle if either D1 or D2 is violated.However, for D3 or D4 violations in step 2(b), we only refine a triangle.This is important because D3 and D4 are not covered by Lemma 2 and may be violated no matter how small the balls are.We argue separately for D3 and D4 in the termination proof.In step 2(c) we refine triangles to reach the refinement level of the input scale.
We observe that DelPSC never inserts unweighted points inside any protecting ball.If the inserted point x in step 2(a) lies in a protecting ball b = B(q, r), its weighted distance to q would be non-positive.Its weighted distance to its nearest Voronoi neighbor in S would even be smaller.Since the largest ball has a positive radius, x would not be inserted (we would call REFINEBALL(b) instead).If x is inserted in step 2(b), the point p is connected to a point q where either q ̸ ∈ σ or p and q are non-adjacent weighted points on a 1-face.In both cases p and q have a positive weighted distance ensured by C3.b.Therefore, a restricted triangle t incident to pq has size(t, σ) positive.It follows that the point x which realizes the maximum of size(t, σ) over all t and σ has a positive weighted distance to its nearest Voronoi neighbor in S. Hence x cannot lie in a protecting ball.Finally, since λ > 0, any point x inserted in step 2(c) has a positive distance to its Voronoi neighbors, and thus outside of every protecting ball.Therefore, point x has a positive weighted distance from p and hence cannot be inside a ball.
Guarantees: The analysis of the algorithm establishes two main facts: (i) the algorithm terminates, and (ii) at termination the output mesh has guarantees G1 and G2: (G1) For each σ ∈ D 2 , Skl 2 S| σ is a 2-manifold with vertices only in σ.Further, bd (Skl 2 S| σ ) is homeomorphic to bd σ with vertices only in bd σ.
(G2) There exists a λ c > 0 so that if λ λ c , the output mesh of DelPSC(D,λ) is homeomorphic to |D|.Further, this homeomorphism respects stratification with vertex restrictions, that is, for 0 i 2, Skl i S| σ is homeomorphic to σ ∈ D i where bd Skl i S| σ = Skl i−1 S| bd σ and vertices of Skl i S| σ lie in σ.
First, we argue that if the algorithm refines a ball, its radius is larger than a fixed positive constant.Assume that d 1 and d 2 have been defined as in the algorithm.Consider a vertex p on a 2-face σ.The conclusion of Lemma 2 implies disk conditions D1 and D2.Therefore, if it does not hold for p, at least one of the premises of Lemma 2 does not hold.(H1) S does not satisfy the λ 1 -property for some λ 1 > 0. (H2) Protecting balls do not satisfy C1-C3.But, when the disk condition is checked, the protecting balls satisfy condition C1, C2, C3.a, and C3.b due to Lemma 6(ii).Therefore, if H2 has failed, at least one ball has a radius more than λ 2 where λ 2 satisfies Lemma 3. The argument implies max{d 1 , d 2 } δ = min{λ 1 , λ 2 }.Therefore, if a ball is refined its radius is more than δ.
The entire ball refinement can be represented with trees as in the proof of Lemma 7 where a ball is refined only if its radius is at least a fixed positive constant.The argument for Lemma 7 still holds to claim that only finitely many balls are refined altogether.Therefore, the algorithm cannot refine balls forever.This also implies that the minimum size of the balls remains larger than a fixed positive constant, say ξ > 0.
Now we argue that each point inserted by the algorithm maintains a lower bound on its distance to all other points.Then, a standard packing argument implies termination.In step 2(a), each inserted point x maintains a weighted distance at least δ > 0 if it is inserted because of violation of either D1 or D2.If D3 or D4 is violated in step 2(b), the weighted distance of x from p is at least half the weighted distance between p and a point q where either p and q are non-adjacent points in D 1 or q lies on a different 2-face.Since protecting balls have a minimum size ξ > 0 and any two intersecting non-adjacent balls maintain a weighted distance larger than the of the radius of the smaller ball, the weighted distance between p and q is larger than a fixed positive constant.Hence, x has a distance more than a fixed positive constant from all other points.The only remaining case is step 2(c) where a point is inserted only if its weighted distance is at least λ > 0 from all other points.

Proof of Guarantees
Let M denote the output mesh of DelPSC.
Theorem 2 M has guarantee G1.
At the end of Mesh2Complex the disk condition ensures that Skl 2 S| σ is a simplicial complex where each vertex v belongs to σ and has a 2-disk as its star.It follows from a result in PL topology that Skl 2 S| σ is a 2-manifold when DelPSC terminates.
The boundary of Skl 2 S| σ has all weighted vertices in bd σ.Each such point p is connected to its adjacent vertices in bd σ by the disk condition.Therefore, the boundary of Skl 2 S| σ consists of edges that connect adjacent vertices in bd σ and hence this boundary is homeomorphic to bd σ.
To prove G2 we use a result of Edelsbrunner and Shah [17] about the extended topological ball property (TBP).It can be shown that the following two properties P1 and P2 imply the extended TBP [8].Therefore, according to the Edelsbrunner-Shah [17] result, the underlying space of Del S| D is homeomorphic to the |D| if P1 and P2 hold.Let F be a k-face of Vor S where S is the output vertex set.
(P2) There is a unique lowest dimensional element σ F ∈ D so that F intersects σ F and only elements that are incident to σ F .
Lemma 2 almost provides condition P1 except for the case that V p may intersect a patch τ where p ̸ ∈ τ (Figure 7 (middle, right)).Lemma 8 establishes that this is not possible.Lemma 9 gives P2.Proofs of both of them appear in the appendix.
Lemma 8 There exists a constant λ c > 0 so that following holds.Let S be the point set output by DELPSC(D, λ) for some λ λ c .Then for each point p ∈ S, V p | D = ∪ σ∋p σ p .
Lemma 9 Let S be the point set as defined in Lemma 8. Let F be a k-face in Vor S.There is an element σ F ∈ D so that F intersects σ F and only elements in D that have σ F on their boundary.
For a sufficiently small λ > 0, DELPSC satisfies the conditions of Lemma 8 and Lemma 9.This means that properties P1 and P2 are satisfied when λ is sufficiently small.Also when P1 and P2 are satisfied It follows that the Edelsbrunner-Shah conditions are satisfied for the output M of DelPSC.Thus, M has an underlying space homeomorphic to |D|.The homeomorphism constructed by Edelsbrunner and Shah actually respects the stratification, that is, for each σ ∈ D i , Skl i S| σ is homeomorphic to σ.Also, Skl 1 S| σ consists of only edges that connect adjacent vertices on σ.Furthermore, property G1 holds for any output of DelPSC.This means, bd (Skl 2 S| σ ) = Skl 1 S| bd σ .Because of the vertex balls, we also have bd (Skl 1 S| σ ) = Skl 0 S| bd σ trivially.Therefore, for 0 i 2, bd (Skl i S| σ ) = Skl i−1 S| bd σ and Skl i S| σ has vertices only in σ.

Experimental Results
The input to our software is a polygonal model which we assume approximates a PSC.A user specified threshold for dihedral angles is used to select edges of the input as sharp features (elements of D 1 ) which we protect.Non-manifold and boundary edges are also included as elements of D 1 .In Figure 5 we show how our protection algorithm works on four different sets of curves.In Table 1 we show both the time to protect curves as well as the time to generate the surface mesh for twelve different datasets.All experiments were run on a PC with a 2.8 GHz CPU and 2 GB RAM.We set the parameter λ to 5% of the minimum dimension of the bounding box for each model.Those datasets which took no time for protection had no sharp features in their input; the PSC they approximate was assumed to be a single smooth patch.The majority of the datasets were meshed in under one minute, only those with complicated topologies took longer.In Figure 6 we show output meshes for various input shapes.These meshes include four smooth shapes (9 HOLES, HORN, OCTO, and SWIRL), two non-manifolds (HORN and WEDGE), and eight piecewise-smooth shapes (PART, GUIDE, WEDGE, COG, ARM, LOCK, PUMP, and PLATE).DelPSC has been used to mesh dozens of other models; further experimentation was presented in a recent multimedia presentation [16].

Conclusions
We have presented a new practical algorithm to mesh a wide variety of geometric domains with the Delaunay refinement technique.Unlike previous approaches, this algorithm computes the protecting balls on the fly and thus gets rid of expensive computations to fix them a priori.The only domain dependent numerical computations are: (i) computing intersection points of the input curves with spheres (to determine the end points of seg σ (b)) and (ii) computing intersection of Voronoi edges with surface patches (to determine restricted triangles and their sizes; these computations are always necessary for the restricted Delaunay mesh [3,8]).These computations are much easier than normal variation and gap size computations as proposed in [8].
The output mesh maintains a manifold property and with increasing level of refinement captures the topology of the input.In practice, most of the time this level is achieved fast with only the disk condition.An interesting aspect of the algorithm is that the input 'non-smooth features' are preserved in the output.However, one requirement is that an explicit representation of these features must be available so that we can sample them as a bootstrap step.For polygonal inputs, it is relatively easy to partition the space into a PSC using the thresholding approach described for the experiments, but for implicitly represented PSCs this may be more challenging.
Our experimental results, implemented in CGAL [18], further validate our claims of practicality and implementability.Some additional implementation details were reported a recent video presentation [16].We note that this implementation of the algorithm uses a variation on the disk condition.Condition D3 has been changed to only require that each point p sampled from a curve σ ∈ D 1 is not connected to any non-adjacent points on σ (as opposed to requiring global disconnection from all non-adjacent samples in D 1 ).
In applications, sometimes it is desired that the mesh elements have good aspect ratios and their size adapts to the input feature size.Our algorithm can be easily extended to guarantee bounded aspect ratio for most triangles except for the ones near non-smooth regions.However, it cannot produce meshes with true adaptive sizing.Insertions to satisfy the disk condition can cause some varied sizing in the output meshes creating a non-uniform appearance.Many of our output meshes exhibit this property; it is caused by λ (which controls only the maximum triangle size) having a value larger than the triangle size needed to fulfill the disk condition.We note that since adaptive meshing ultimately requires an estimate of the input feature size, it may not be possible to produce such meshes without expensive computations.We also note that it should be possible to extend our algorithm to volumes using an approach similar to [19].

Proofs of lemmas in Section 2.
For proving Lemma 2 we need some standard results from sampling theory [20,21].Recall that we have assumed each 2-face in the domain to be a compact subset of a smooth (C 2 ) 2-manifold without boundary.This helps us to carry forward a result on normal variation from smooth surfaces straightforwardly to the surface patches with boundaries.If surface elements are not assumed to be a subset of smooth surfaces without boundary, normal variation proof becomes more complicated with a worse error bound.
Let σ be any 2-face which by assumption is a subset of a smooth 2-manifold σ * without boundary.The surface normal n x to σ at x is the surface normal of σ * at x. Let M denote the medial axis of σ * , that is, M is the closure of all points in R 3 which have two or more closest points in σ * .Borrowing from [20], we define the local feature size lfs x = d(x, M ).In the analysis, we use a global lower bound on the lfs function.We define: Recall that d(x, y) denotes the weighted distance between two weighted points x and y, that is, x − ω 2 y where ω x and ω y are the weights of x and y respectively.For a triangle t, consider the disk whose weighted distance to all of t's vertices (possibly weighted) is zero.The radius of this disk is called the orthoradius of t.
(i) For any two points x and y in σ such that d(x, y) ερ σ , (a) the angle between the surface normals n x at x and n y at y is at most 2ε; (b) the angle between xy and the surface normal at x is at least arccos(ε/2).
(ii) Let pqr be a triangle with vertices on σ which are possibly weighted with a weight ωρ σ for ω < 1.
Furthermore, let the orthoradius of pqr be no more than ερ σ .Then, ∠ a (n pqr , n p ) 5 (i.a) Follows from the normal variation result in [22].
(ii) Let R and R be the circumradius and orthoradius of pqr respectively.For a sufficiently small ω, the circumcenter x lies inside the orthocircle of pqr.Then, minimum weighted distance of x to any of three vertices of pqr, is a lower bound on R, that is, Without loss of generality, assume that p subtends the largest angle in pqr.Plugging R pqr = R √ ε 2 + ω 2 ρ σ and using lfs ( p) ρ σ in the Triangle Normal Lemma (Lemma 3.5 in [21]), we get that ) ) Consider a weighted vertex p ∈ S on a 2-face σ.For any facet F of V p , we use H F to denote the plane of F .Let λ and let s and t be these end points.We observe that the line segment st cannot make an angle with L less than the least angle made between L and a tangent to A. This least angle is made by the tangent to A at any of its end points.Since the width of L * is 0.07λ and the radius of Recall that σ p denote the components of V p | σ that intersect a Voronoi edge of V p .We show that σ p intersect V p and its faces in topological balls if S has the λ-size property for a sufficiently small λ.We need the following result which says that when λ is sufficiently small, each Voronoi cell V p contains at least one Voronoi edge intersecting σ if p ∈ σ ∈ D 2 .
Lemma 13 There exists a λ > 0 so that if S satisfies the λ-size property, then σ p is non-empty for any p ∈ σ Suppose that σ p is empty, that is, no Voronoi edge of V p intersects σ.By our assumption bd σ is non-empty and let q ∈ σ be a weighted point in bd σ.Because of Lemma 1, an edge of V q has to intersect σ.Consider walking on a path in σ from p to q.Let p = p 0 , p 1 , .., p k = q be sequence of vertices whose Voronoi cells are encountered along this walk.Since no edge of V p intersects σ and some edge of V q intersects σ, there exists two consecutive vertices p i and p i+1 in this sequence so that no edge of V p i intersects σ whereas some edge of V p i+1 does intersect σ.By Lemma 2 we can claim that σ p i+1 is a disk.A boundary cycle of σ p i overlaps with the boundary of σ p i+1 .This is impossible as the curves on the boundary of σ p i+1 intersect Voronoi edges whereas those on the boundary of σ p i do not.Now we are ready to prove the main claim of Lemma 2. Figure 7 explains more about its implications.We show that the argument of Lemma 4.12 in [4] can be used here to establish that σ p is a topological disk.Following the notation in the proof of this lemma, let us call a cycle in σ p that intersects a Voronoi edge a type 1 cycle.Let X denote the set of type 1 cycles.Each Voronoi facet containing a point in X has a Voronoi edge intersecting σ p .By H1, this intersection point is within λ distance of p.Therefore, B intersects all Voronoi facets that contain a point in X.These Voronoi facets intersect B ∩ σ in a single open curve which is in B. Also, if V p intersects bd σ, the entire curve segment V p ∩ bd σ is contained in the protecting ball of p.This means each point of X is within λ distance of p. Since each cycle in X is a piecewise smooth closed curve where each piece is either an open curve contained in a Voronoi facet or a segment of V p ∩ bd σ, it is contained completely in B. Therefore, each boundary of σ p which intersects a Voronoi edge lies in B.
Consider the arrangement of closed curves in X on B ∩ σ which is a topological disk according to the Feature Ball Lemma [21].Let C ∈ X be a closed curve which does not contain any other curve of X inside.At least one such curve exists since X is not empty by Lemma 13.The closed curve C must bound a disk, say D in σ.At this point we can invoke the proof of Lemma 4.12 in [4] to prove that D = σ p establishing our first claim.The boundary bd σ p lies in X which has at most a single interval in any Voronoi facet as we argued above.This establishes our second claim.
[Proof of Lemma 2.] Proof of R1: Follows from Lemma 14. that contain p.
Case 2: F is a Voronoi facet V pq .Let σ F be a lowest dimensional element that F intersects.Assume there is another σ ′ intersecting F where σ F ̸ ⊂ bd σ ′ .We go over different dimensions of σ ′ each time reaching a contradiction.
Assume σ ′ ∈ D 2 ; σ ′ intersects F and does not contain σ F on its boundary.Two cases can arise.Either (i) σ F and σ ′ are disjoint within V p or V q , or (ii) σ F and σ ′ have a common boundary in V p and V q .Case (i) cannot happen due to the claim in Case 1.For (ii) to happen, both p and q have to be on the common boundaries of σ F and σ ′ , which means that p and q have to be on some element in D 1 .Observe that p and q are non-adjacent since otherwise V pq has to intersect the common boundary of σ F and σ ′ whose dimension is lower than that of σ F .But this would contradict the disk condition that no two non-adjacent vertices in D 1 are connected by a restricted edge.
The above argument implies that all elements intersecting F have σ F as a subset.Case 3: F is a Voronoi edge.Certainly F cannot intersect a 2-face σ F more than once due to Lemma 2 (R1).The other possibility is that F = V t , t ∈ Skl 2 S| σ F , and F intersects σ ′ ̸ = σ F .But then a Voronoi cell adjacent to F would intersect two 2-faces σ F and σ ′ and t is in both Skl 2 S| σ F and Skl 2 S| σ ′ violating the disk condition.

√
d(x, p) 2 − ω 2 p from p.Under the distance metric d(•, •), one can define weighted versions of Delaunay and Voronoi diagrams.For a weighted point set S ⊂ R 3 , let Vor S and Del S denote the weighted Voronoi and Delaunay diagrams of S respectively.Each diagram is a cell complex where each k-face is a k-polytope in Vor S and is a k-simplex in Del S. Each k-simplex ξ in Del S is dual to a (3 − k)-face V ξ in Vor S and vice versa.

Figure 1 .
Figure 1.(left) Del S| σ and (right) Skl 2 S| σ There is one extra edge in Del S| σ which is not in Skl 2 S| σ .

Figure 2 .
Two balls b and b ′ with their centers c and c ′ respectively on a 1-face σ are adjacent if σ(c, c ′ ) does not contain any other ball center.In this case the corresponding weighted vertices of b and b ′ are also called adjacent.Any two balls or weighted vertices that are not adjacent are called non-adjacent.We use d(x, y) to denote the Euclidean distance between two points x, y and use d σ (x, y) to denote the length of a curve segment σ(x, y).Let b 0 , b 1 , ..., b k be a set of balls that protect σ where b i = B(c i , r i ) with c i ∈ σ.We require that the balls satisfy the following conditions: (C1) b 0 and b k are centered at u and v respectively.These will be called the vertex balls.(C2) σ is covered by the balls, that is, σ ⊆ ∪ i seg σ (b i ) and any two adjacent balls b = B(c, r) and b

Figure 2 .
Figure 2. Covering 1-faces : (left) A 1-face σ between u and v is being protected.The ball b shown with solid boundary has seg σ (b) as the curve segment between x 1 and x 2 .The balls satisfy C1 and C2 but intersect arbitrarily.(right) Balls are refined and they start satisfying separation properties C1-C3.

( H2 )
Weighted points in S satisfy C1-C3.(R1) σ p is a 2-disk where any edge of V p intersects σ p at most once and any facet of V p intersects σ p in an empty set or an open curve.

For a 1 -Lemma 3
face σ(u, v) covered by balls b 0 , b 1 , .., b k these conditions are: (C3.a)Let b = B(c, r) be any ball in {b 0 , b 1 , ..., b k }.For an adjacent ball b ′ = B(c ′ , r ′ ), if c ′ is contained in seg σ (b), then d σ (c, c ′ ) 7 6 r. (C3.b)Any two balls centered in different 1-faces do not intersect and any two non-adjacent balls centered on a common 1-face have a weighted distance larger than the radius of the smaller ball.There exists a λ > 0 so that, if all protecting balls are smaller than λ, C3.a and C3.b imply C3.Consider any two non-adjacent balls b = B(c, r) and b ′ = B(c ′ , r ′ ).If c and c ′ are on different 1-faces, b and b ′ do not intersect by C3.b.Then C3 is satisfied trivially.So, assume that c and c ′ belong to a common 1-face σ.

Figure 3 .
Figure 3. Curve segment between x and y is being covered.Aiding balls are shown with solid boundaries.Notice how the centers of b 1 and b 2 are placed with the aiding balls.The end game with enlarged aiding ball is shown on left, the other case is shown on right.

Lemma 4
encounter one of two situations near the end: either z i+1 extends past σ(x, y) or seg σ (b i+1 ) contains y.These situations are shown in the left and right images of Figure 3, respectively.In the first case b k may violate C3.a and in the second case b i+1 may not intersect b k deeply violating C2.In these cases we conduct an end game.If z i+1 ∈ seg σ (b k ), we throw away z i+1 and take b i+1 as β i+1 enlarged concentrically to a radius 2α 3 .In the other case when seg σ (b i+1 ) contains y, we enlarge b i+1 to a radius of 7α 6 .COVER terminates after the end game.Lemma 4 is proved in the appendix.Let b be a ball adjacent to b ′ and b ′′ in a set of balls that satisfy C1, C2, and C3.a.Suppose we replace b with COVER(x, y, α) where σ(x, y) is the segment between seg σ (b) and seg σ (b ′′ ).Then, for α less than the radii of the balls b, b ′ , and b ′′ , C1, C2, and C3.a remain satisfied after COVER(x, y, α) terminates.COVER does not necessarily satisfy C3.b.We use the routine SEPARATE to enforce C3.b on a set of balls B. This routine calls REFINEBALL(b) which removes the ball b and replaces it with smaller balls.SEPARATE(B) 1. while (∃ balls b, b ′ ∈ B with r r ′ violating C3.b) B := (B \ b) ∪ REFINEBALL(b) endwhile.2. return B. Lemma 5 If SEPARATE issues a call to refine a ball b, its radius must be more than a fixed positive constant δ > 0. First assume that the two balls b = B(c, r) and b ′ = B(c ′ , r ′ ) considered by SEPARATE belong to the same 1-face σ.By assumption r r ′ .Let x be any point where the boundary spheres of b and b ′ meet.If θ is the angle between the normals to b and b ′ at x, the squared weighted distance between b and b For each σ covered by b let b σ be the adjacent ball to b on σ.Compute B σ := REFINEBALL(b σ ).Return SEPARATE(∪ σ B σ ). 2. If b is not a vertex ball, let σ(x, y) be the segment between seg σ (b 1 ) and seg σ (b 2 ) where b 1 and b 2 are adjacent to b. Remove b and return COVER(x, y, α) where α = r σ /4.Lemma 6 (i) REFINEBALL terminates and (ii) maintains C1, C2, C3.a, and C3.b. (i) : Observe that REFINEBALL makes recursive calls to itself and through SEPARATE.Consider the trees of ball refinements made by these recursive calls.An internal node b in the trees represents a ball b that is refined into smaller balls (children).

2 . 3 .
any other vertex in D 0 .Let B be the set of vertex balls.For each σ ∈ D 1 do the following.Let u and v be the end points of σ where seg σ (B u ) = ux and seg σ (B v ) = yv.Let α = min{r u , r v }.B := B ∪ COVER(x, y, α).Find a ball b ∈ B with radius larger than λ.If found, compute B := {B \ b} ∪ REFINEBALL(b) and repeat step 3.

Figure 4 . 1 .
Figure 4. Disk condition: (left) Triangles incident to point p ∈ σ are assumed to be restricted to σ; they do not form a disk since they form two disks pinched at p violating condition D1. (middle) The point p ∈ σ has a topological disk but some of its vertices (lightly shaded) belong to τ violating condition D4. (right) Points p and q satisfy the disk condition.Point p, an interior point in σ, lies in the interior of its disk in σ.The point q, a boundary point, has three disks for each of the three 2-faces.

Figure 5 .
Figure 5. Protection: (left) A 2d example of curve protection.(middle) 2 different 3d examples of curve complexes where we have run PROTECT.(right) The final set of protecting balls returned by Mesh2Complex on the WEDGE model.

Figure 7 .Lemma 14
Figure 7. (left) A 2-face σ has intersected V p where σ p is not topological disk, this is not possible by R1. (middle) σ p is a disk but another face τ where p ̸ ∈ τ intersects some edge of V p .It does not violate R1 but violates Lemma 8. (right) Within B, σ intersects V p in a topological disk.There is a different component (τ ) which does not intersect any Voronoi edge and hence does not contribute any dual restricted triangle incident to p. R1 does not prevent it though Lemma 8 does.
By this definition, for any σ ∈ D, Del S| σ denotes the Delaunay subcomplex restricted to σ, and Del S| D i = ∪ σ∈D i Del S| σ and Del S| D =

Table 1 .
Protection and Meshing times for our datasets.
1 32 ρ σ .Let B = B(p, 2λ).By the Feature Ball Lemma in [21] B ∩ σ is a 2-disk.Lemma 11 For any facet F of V p , if H F intersects B ∩ σ, then ∠(n p , H F ) arcsin(1/16) and both H F ∩ B ∩ σ and F ∩ B ∩ σ contain no closed curve.Let pq be the dual Delaunay edge of F where H F intersects pq at x.We have d(p, x) = d(q, x) There is no closed curve in H F ∩ B ∩ σ because such a closed curve would bound a 2-disk in B ∩ σ, which would contain a point x such that ∠(n x , H F ) = π/2.This is a contradiction because ∠(n x , H F ) ∠(n x , n p ) + ∠(n p , H F ) 1/8 + arcsin(1/16) < π/2 by Lemma 10(i.a).Since H F ∩ B ∩ σ contains no closed curve, neither does F ∩ B ∩ σ.This proves the claim.Lemma 12 For any facet F of V p , if d(p, F ) λ and conditions C1-C3 hold, then F ∩ B ∩ σ is either empty or a single open curve.We assume that H F intersects B ∩ σ since otherwise F ∩ B ∩ σ is empty and there is nothing to prove.First, we show that ifH F is within a distance of λ from p, H F ∩ B ∩ σ is a single open curve.Consider the disk H F ∩ B. Let ⃗ d be the projection of n p onto H F .Let L ⊂ H F be the line through the center of H F ∩ B orthogonal to ⃗ d.Let x be any point in H F ∩ B ∩ σ.The angle between px and the tangent plane at p is at most arcsin(1/32) by Lemma 10(i.b).We already proved that ∠(n p , H F ) arcsin(1/16).We are interested in an upper bound on the distance d(x, L).Let x * be the orthogonal projection of x onto L. Consider the triangle pxx * .Observe that ∠xpx * is the angle between px and the tangent plane at p and ∠px * x is at least π/2 − ∠(n p , H F ).Let L * ⊂ H F be the strip of points at distance 0.07λ or less from L. Since the radius of B is 2λ and H F is at most λ distance from p, the radius of H F ∩ B is at least √ 3λ.It follows that the boundary of H F ∩ B intersects L * in two disjoint circular arcs, say A and A ′ .We already proved that there is no closed curve in H F ∩ B ∩ σ (Lemma 11).Now we show thatH F ∩ B ∩ σ cannotcontain two open curves.First, we eliminate the case where H F ∩ B ∩ σ are two open curves each having an end point on bd σ.For this to happen, F has to intersect bd σ in more than one point, which is impossible by Lemma 1 if the protecting balls satisfy condition C1-C3.Therefore, we can assume that if H F ∩ B ∩ σ has two open curves, at least one, say C, has both end points on the circular arcs A and/or A ′ .Consider the case where C has end points both in A and A ′ .The other curve, say C ′ , in H F ∩ B ∩ σ must have an end point in at least one of A and A ′ .It follows that either A or A ′ should have an end point of both C and C ′ .Without loss of generality, assume that A has end points of both C and C ′ [21] p , n s arcsin(1/16) + (1/8) 0.2, st makes an angle of at most 0.23 radians with n s .The line of st intersects σ at two points, namely at s and t, where ∠st, n s 0.23.Here we can use the Long Distance Lemma in[21]to obtain d(s, t) 2ρ σ cos 0.23 62λ which contradicts d(s, t) 2 × 0.07λ = 0.14λ.Next, consider the case where C has both endpoints on a single arc, say A. Taking these end points as s and t we can argue as in the previous paragraph to reach a contradiction.Third, we claim that for any facetF of V p , if F intersects B ∩ σ, F ∩ B ∩ σ isa single open curve with endpoints in bd F or in bd σ.We already proved that there is no closed curve in F ∩ B ∩ σ.Since F does not have any tangential contact with σ, F ∩ B ∩ σ is a set of open curves and the endpoints of any open curve in F ∩ σ thus lie in bd F or in bd σ.Assume to the contrary that F ∩ B ∩ σ contains two open curves, say ξ and ξ ′ .By our assumption, H F is within a distance of λ from p.We have shown before thatH F ∩ B ∩ σ is a single open curve.Follow H F ∩ B ∩ σ from ξ to ξ ′ .When we leave ξ, we must leave F at a Voronoi edge e ⊂ bd F .Afterwards, we stay in the plane H F and we must cross the support line of e again in order to reach ξ ′ .Therefore, some tangent to H F ∩ B ∩ σ is parallel to e.However, the angle between the surface normal at some point on H F ∩ B ∩ σ and n p would then be at least π/2 − ∠n p , e π/2 − 5 √ 2(λ/ρ σ ) 2 by Lemma 10(ii) since ε, ω λ/ρ σ .This contradicts Lemma 10(i.a)proving the claim.