Elsevier

Computer-Aided Design

Volume 127, October 2020, 102866
Computer-Aided Design

Surface–Surface-Intersection Computation Using a Bounding Volume Hierarchy with Osculating Toroidal Patches in the Leaf Nodes

https://doi.org/10.1016/j.cad.2020.102866Get rights and content

Highlights

  • A new BVH-based algorithm for computing the SSI curves for freeform surfaces

  • Highly efficient and robust in handling the degenerate case of tangential intersections.

  • Improvement based on the high approximation order and simplicity of osculating torus.

  • Compact data structures for bounding the positions and normals of freeform surfaces.

Abstract

We present an efficient and robust algorithm for computing the intersection curve of two freeform surfaces using a Bounding Volume Hierarchy (BVH), where the leaf nodes contain osculating toroidal patches. The covering of each surface by a union of tightly fitting toroidal patches greatly simplifies the geometric operations involved in the surface–surface-intersection computation, i.e., the bounding of surface normals, the detection of surface binormals, the point projection from one surface to the other surface, and the intersection of local surface patches. Moreover, the hierarchy of simple bounding volumes (such as rectangle-swept spheres) accelerates the geometric search for the potential pairs of surface patches that may generate some curve segments in the surface–surface-intersection. We demonstrate the effectiveness of our approach by using test examples of intersecting two freeform surfaces, including some highly non-trivial examples with tangential intersections. In particular, we test the intersection of two almost identical surfaces, where one surface is obtained from the same surface, using a rotation around a normal line by a smaller and smaller angle θ=10k degree, k=0,,5. The intersection results are often given as surface subpatches in some highly tangential areas, and even as the whole surface itself, when θ=0.00001.

Introduction

The problem of intersecting two freeform curves and surfaces in a reliable way is one of the main technical challenges in geometric and solid modeling [1], [2], [3], [4]. Unfortunately, in the last decade, there have been only a few publications in this fundamental research [5], [6]. On the other hand, the problem of intersecting two surfaces appears in many different forms as the solution of non-linear geometric constraints [7], [8], [9], where the constraints are often represented or automatically generated as rational freeform curves, surfaces, and multivariate volumes. Consequently, it is still extremely important to develop new techniques that can handle the surface–surface-intersection (SSI) problem in an efficient and reliable way.

Now, a natural question arises: what makes the revisiting of this problem worthwhile for some meaningful technical advancements? To answer this question in a positive perspective, we would like to mention the recent developments of spatial data structures (such as bounding volume hierarchy) for freeform curves and surfaces, which have made possible the acceleration of many important geometric algorithms, including collision detection, the minimum and Hausdorff distance computations, offset curve trimming, Minkowski sum computation, medial axis and Voronoi diagram construction, convex hull computation, etc [10], [11], [12], [13].

Planar freeform curves can be approximated by a hierarchy of G1-biarcs with cubic convergence, which can be used for the construction of arc trees (i.e., BVH structures where the internal nodes are fat arcs [14]). The arc trees are a very powerful tool for the acceleration of algorithms for planar freeform curves. A natural dimension–extension of arc trees seems to be torus trees. Nevertheless, different from the planar case, it is extremely difficult to approximate freeform surfaces with G1-continuous toroidal patches. As a compromise, we consider a union of osculating toroidal patches that tightly fits the given freeform surface. (We use the second order osculating torus patch of Liu et al. [15].) Thanks to the higher approximation order than triangular and bilinear approximations, the osculating toroidal patches provide good approximate solutions to the SSI problem even though they are not connected even with C0-continuity.

In this work, we consider the acceleration of the SSI problem using a BVH for freeform surfaces. There are certainly some costs we have to pay for the memory space and the preprocessing time for the BVH construction. Nevertheless, the majority of recent acceleration algorithms are based on spatial data structures (often precomputed) at some additional costs. For example, an alternative approach (to the SSI problem) using triangulated meshes of the freeform surfaces would also require the construction of BVH trees in a preprocessing stage, often taking considerably more time and space than our approach. As the memory cost becomes cheaper, we may even assume the pre-constructed BVH structure as a part of the surface representation by encoding the structure compactly as a 2D array, much like an image, which is the approach we take in the current work.

For the sake of simplicity in the presentation, we consider the intersection of two bicubic Bézier surfaces, though the basic approach can easily be extended to higher degree trimmed B-spline surfaces or even to triangular Bézier surfaces. Taking uniform samples along each parameter direction, Si2H,j2H, where i,j=0,,2H, the BVH structure for a bicubic Bézier surface S(u,v), (0u,v1), can be represented in about the same way as that for the quadtree (of height H) for regular quad meshes (Fig. 1). The main difference is in the internal nodes which contain bounding volumes slightly thicker than those for a regular quad mesh. The extra thickness is needed for bounding the difference between a surface S(u,v) and the quad mesh approximation (interpreted as a rectangular array of bilinear surface patches or pairs of triangles).

The surface approximation error can be bounded using a simple formula developed by Filip et al. [16]. (Krishnamurthy et al. [13], [17] also use this formula for the construction of various BVH trees for freeform surfaces.) Using a 2D array of size (1+2H)×(1+2H), where the x,y,z coordinates of Si2H,j2H are stored in each element, we can encode the BVH structure of the surface S(u,v) in a compact way, where the thickness of the internal nodes at a level h (H) can be estimated by the formula of Filip et al. [16]. (This is because the higher level h approximates the surface S(u,v) using a coarser quad mesh with vertices taken at Si2h,j2h, where i,j=0,,2h.

The BVH-based intersection algorithm for freeform surfaces is about the same as other conventional algorithms for meshes. The main difference is in the intersection of two primitives stored in the leaf nodes. Instead of intersecting two triangles, we intersect two osculating toroidal patches, which may produce intersection curve segments of more complex shapes such as those with multiple branches and even X-junctions. The first row of Fig. 2 shows two examples of the tangential intersection, each with an X-junction. As we move the blue patch up and down along the normal direction, the X-junction disappears and the intersection curve splits to two branches as shown in the second and third rows of the figure.

When two surfaces intersect tangentially at a point, they share the same normal line (i.e., their binormal line) at the point. The location of an X-junction or a near X-junction can be detected by computing the binormal lines to the two surfaces and checking the signed distance between the corresponding binormal-surface intersection points. Depending on the sign, we can decide which type of (almost) tangential intersection curve the two surfaces have. For example, in Fig. 2, when measured along the normal direction of the blue torus, the binormal-surface intersection point of the red torus is located at a signed distance of zero, negative, and positive, respectively, in each of the three rows. Osculating toroidal patches greatly simplify this test by converting the distance computation to a much simpler problem of solving a polynomial equation of degree 8 [18], [19]. The polynomial equation can be solved considerably faster than the general case of computing binormal lines for two bivariate surfaces, where we need to deal with a system of four equations in four variables.

For toroidal patches, their Gauss maps are easy to compute. When there is no overlap in the Gauss maps of the toroidal patches, the intersection curve may have at most one connected branch, which can be traced very efficiently using numerical techniques. Otherwise, we take further steps (such as subdivision or resampling of osculating tori) for detecting the correct topology of SSI curves. Though this is quite a complex task in general due to tangential surface intersections, the binormal construction algorithm for toroidal patches greatly simplifies this process. We subdivide the surfaces at the binormal-surface intersection points, which can remove an X-junction or reduce the number of branches in the intersection curve. In other words, we can make (almost) X-junctions appear only at (or around) the corner points of surface patches, after the subdivision.

The numerical curve tracing can be carried out either on the original surfaces or on the osculating toroidal patches. According to the experimental results reported in Section 5, the difference is insignificant as we cover the entire surface using a union of tightly fitting osculating toroidal patches within a small Hausdorff distance bound, such as ϵ=105.

The main contributions of this work can be summarized as follows:

  • We propose a new BVH-based algorithm for computing the SSI curves for freeform surfaces, which outperforms other conventional algorithms in computing speed and robustness by computing the BVH structure in a preprocessing time.

  • The improvement is based on the high approximation order of osculating toroidal patches to the freeform surfaces and the geometric simplicity of toroidal patches in supporting primitive operations (needed for the SSI computation) such as the Gauss map computation, the overlap test between two Gauss maps, the binormal line construction, the projection of points onto a surface, etc.

  • The BVH of freeform surfaces can be represented in a compact way using a rectangular array of uniform sampling points and other simple spatial data structures which resemble the mipmap structure for texture mapping [20].

  • The main advantage of our SSI algorithm is in handling the degenerate case of (almost) tangential surface intersections, where the conventional subdivision methods have difficulty pruning a large number of potentially overlapping pairs of small surface patches.

  • The osculating toroidal patches in the leaf nodes not only bound the small surface patches corresponding to the leaf nodes, but they also bound their surface normals. This will be discussed in Section 3.3.

  • Further trimming the toroidal patches into a shape similar to the surface patches (using a surface matching technique to be discussed briefly at the end of Section 3.3), we can bound their Hausdorff distance within a small tolerance ϵ=105 (by repeating the local subdivisions recursively if necessary).

  • The 1–1 matching between each local surface patch and the corresponding trimmed toroidal patch (within a Hausdorff distance ϵ=105) makes the SSI curve constructed in the uv-parameter space of one surface S1(u,v) also 1–1 matched with its counterpart SSI curve in the st-space of the other surface S2(s,t). (The Hausdorff distance between the two matching SSI curves is then bounded by kϵ=k105, where k is a small constant.) More details will be discussed in Section 4

Section snippets

Related work

A comprehensive introduction to the problem of intersecting freeform curves and surfaces can be found in the Chapter 12 of Hoschek and Lasser [2], where early methods are explained in great detail, including algebraic, subdivision, embedding, discretization, and tracing methods. In a survey article (published in 1993), Patrikalakis [21] reviews the SSI algorithms developed in the period of 1988–1992, which are then classified into four main categories: analytic, lattice evaluation, marching,

BVH construction

In this section, we show how to construct a BVH for a bicubic Bézier surface S(u,v), (0u,v1). The surface S(u,v) is first approximated by a rectangular array of bilinear surfaces Lij(u,v), (u,v)[ui1,ui]×[vj1,vj], for i,j=1,,2H, where ui=i2H and vj=j2H. Each bilinear surface Lij(u,v) is then approximated by a planar quadrangle Qij(u,v). The approximation error between Qij(u,v) and the subpatch Sij(u,v)=S(u,v), on the subdomain [ui1,ui]×[vj1,vj], is bounded by ϵij>0. Expanding the

SSI algorithm

The BVH-based SSI algorithm proceeds by traversing the BVHs for the two freeform surfaces and detecting all pairs of leaf nodes whose bounding volumes overlap. For each pair of overlapping leaf nodes, we first intersect their osculating toroidal patches. When the two toroidal patches have no overlap in their Gauss maps, their SSI curve may have at most one branch with no bifurcation. Otherwise, the two surfaces may have tangential intersections, and we need further steps to determine the

Experimental results

We have implemented the proposed SSI construction algorithm in C++, on an Intel Core i9-9900KF 3.6 GHz Windows PC with a 64GB main memory. To demonstrate the effectiveness of the BVH-based approach, we have tested the SSI algorithm on a large set of examples, including those of intersecting two almost identical surfaces.

The BVH construction on a bicubic Bézier surface typically takes less than one second in the preprocessing step, when the resolution of 64 × 64 is used for sampling the uv

Conclusions

In this paper, we have presented a new approach to the well-known SSI problem for freeform surfaces, which is based on a pre-built RSS tree with osculating toroidal patches stored in the leaf nodes. The high approximation order of osculating torus was shown to be an effective geometric tool for handling non-trivial cases of two freeform surfaces tangentially intersecting almost everywhere. In future work, we plan to develop a new technique that can bound the tangential intersection areas more

Declaration of Competing Interest

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

Acknowledgments

We would like to thank our anonymous reviewers for their comments. This work was funded in part by the National Research Foundation of Korea (No. NRF-2019R1A2C1003490, NRF-2019K1A3A1A78112596), and in part by the Israel Science Foundation (grant No. 597/18).

References (44)

Cited by (11)

  • A new spatial data structure for triangular mesh with toroidal patches

    2024, Journal of King Saud University - Computer and Information Sciences
  • Topological Classification and Determination of Non-Degenerate Intersections of Two Dupin Cyclides

    2022, CAD Computer Aided Design
    Citation Excerpt :

    It is worth mentioning that this paper is targeted at the classification and the fast determination of the topology of the intersection curve of the two Dupin cyclides. This helps to quickly decide the intersection topology of two Dupin cyclides before computing their real intersection locus such as in [6], since general intersection algorithms can sometimes miss the true topology due to numerical problems, for example, there can be branch jump or branch loops, and small loops can be missed. Using our method, one can decide the topology in a more accurate way, since we mainly use symbolic computations in the process, and only apply the numerical computations at the end.

  • Precise Hausdorff distance computation for freeform surfaces based on computations with osculating toroidal patches

    2021, Computer Aided Geometric Design
    Citation Excerpt :

    The acceleration technique is based on osculating toroidal patches to the freeform surfaces under consideration. The osculating torus has been shown to be quite effective in accelerating geometric problems related to the minimum distance of freeform surfaces (Liu et al., 2009; Park et al., 2020; Son et al., 2020). This paper demonstrates the effectiveness even in the maximum distance computation.

  • Self-intersection computation for freeform surfaces based on a regional representation scheme for miter points

    2021, Computer Aided Geometric Design
    Citation Excerpt :

    The GPU-based SSI algorithm of Krishnamurthy et al. (2009) used the AABB (Axis-Aligned Bounding Box) tree, which is the most suitable for GPU implementations. Based on the surface approximation techniques of Filip et al. (1986) and Liu et al. (2009), Park et al. (2020) developed a hybrid BVH using rectangle swept spheres (RSS) for internal nodes and osculating toroidal patches for leaf nodes. In the current work, we follow the basic guideline of Park et al. (2020) and make some changes to the BVH structure.

  • GPU Parallel Inverse Evaluation of NURBS Surfaces Based on Matrix Representation

    2023, Jisuanji Fuzhu Sheji Yu Tuxingxue Xuebao/Journal of Computer-Aided Design and Computer Graphics
View all citing articles on Scopus
View full text