Papers
Topics
Authors
Recent
Search
2000 character limit reached

Spatially Accelerated Winding Numbers for Curved Geometry

Published 18 May 2026 in cs.GR and cs.CG | (2605.19200v1)

Abstract: The generalized winding number (GWN) is a scalar field that supports robust containment queries on curved geometry, including non-watertight, overlapping, and nested boundary representations. While queries can be easily parallelized over samples, direct evaluation on parametric curves and surfaces remains costly for large and complex models. Fast, state-of-the-art GWN approaches leverage a spatial index to approximate the GWN, typically coupled with a Taylor expansion which approximates the GWN contribution for far clusters of geometric primitives. However, such methods operate only on discrete inputs such as triangle meshes and point clouds, and would introduce containment errors near boundaries if applied to curved input. We extend support for fast GWN evaluation over arbitrary collections of NURBS curves in 2D and trimmed NURBS patches in 3D via a Bounding Volume Hierarchy that stores efficiently precomputed moment data in the hierarchy nodes. When querying the hierarchy, approximations for far clusters are used alongside direct evaluation for nearby NURBS primitives, achieving sub-linear complexity while preserving the geometric features in the vicinity of the query point. Central to our performance improvements is an adaptive subdivision strategy for NURBS primitives during a preprocessing phase, creating better spatial partitions while retaining the same accuracy for containment decisions as a direct evaluation. We demonstrate the performance and accuracy of our approach across a large collection of 2D and 3D datasets.

Summary

  • The paper presents a novel spatially accelerated GWN evaluation using hierarchical BVHs and Taylor expansions to achieve sub-linear query times for NURBS geometry.
  • It leverages adaptive subdivision, precise parametric moment computations, and parallel processing to overcome traditional discretization inaccuracies.
  • Experimental results show significant accuracy improvements and speedups, reducing misclassification errors compared to legacy polygonal methods.

Spatially Accelerated Generalized Winding Numbers for NURBS Geometry

Introduction

The paper "Spatially Accelerated Winding Numbers for Curved Geometry" (2605.19200) addresses the computational challenge of robust point containment queries for complex, non-watertight, and curved geometric representations in 2D and 3D. The work extends the fast evaluation of the generalized winding number (GWN)—a scalar field enabling robust inside/outside queries—to directly support non-uniform rational B-splines (NURBS) in both curve (2D) and surface (3D) form, circumventing the inaccuracy and inefficiency inherent in legacy schemes dependent on geometric discretization. The core innovation is a spatial acceleration structure that preserves the parametric fidelity of the input, achieving sub-linear runtime for GWN evaluation without triangulation, even for large, highly detailed CAD and SVG datasets.

Background

GWN generalizes the classical notion of winding number to accommodate non-watertight, overlapping, and nested B-Rep structures encountered in real-world modeling scenarios. Previous acceleration strategies relied almost exclusively on discrete representations, such as triangle soups or point clouds [Barill et al. 2018], approximating the GWN for far-field clusters via Taylor expansions and resorting to direct evaluation only in near-field regions. While effective for polygonal models, such approaches manifest containment artifacts near true curved boundaries or necessitate impractically dense discretization for accurate results.

The research leverages exact parametric definitions of curves and surfaces to enable moment-based Taylor approximations of the GWN for arbitrary parametric boundaries, surmounting the limitations of previous techniques. The integration of adaptive subdivision and parametric moment evaluation into a bounding volume hierarchy (BVH) for curved primitives is central to this contribution.

Methodology

Hierarchical Agglomeration and Taylor Approximation

The method constructs a BVH over the set of NURBS primitives, using their axis-aligned bounding boxes (AABB). Each BVH node represents a cluster of boundary elements: leaf nodes correspond to individual NURBS entities, while internal nodes aggregate geometric moments necessary for Taylor expansion–based GWN approximation. For a given query point, the BVH is traversed to apply direct evaluation to nearby primitives and employ far-field Taylor approximations for distant clusters. This hierarchy enables selective computational reuse and achieves sub-linear query times.

Taylor expansions of the GWN are parameterized by cluster moments computed via quadrature in 3D (utilizing the method of Gunderman et al. [2021]) and exact formulas in 2D for linearized curves. Importantly, the order of the Taylor expansion (typically up to second order) governs the trade-off between precision and cost.

Adaptive Subdivision

To maximize BVH effectiveness, the algorithm adaptively subdivides NURBS primitives such that the largest AABB diagonal per primitive is below a fixed fraction (10%) of the bounding box diagonal of the entire shape. This process, both in 2D and 3D, ensures well-balanced BVHs and minimizes the fraction of costly near-field queries.

Direct Evaluation Optimizations

For direct GWN evaluation at BVH leaves, the implementation builds upon and optimizes recent specialized algorithms [Spainhour et al. 2024; Spainhour and Weiss 2026]. In 2D, it employs atan2atan2 for subtended angle calculations, faster than conventional acosacos-based methods. The algorithm eschews traditional point-in-polygon or convex hull checks by using fast AABB containment. The 3D case also enhances memoization strategies for quadrature results and trimming curve access. These optimizations yield serial speedups of 2–5× over earlier high-accuracy direct methods.

Parallelization

All preprocessing and query evaluation routines are parallelized via OpenMP. Thread-local caches ensure that per-thread evaluation of geometric properties and quadrature data avoid contention, further contributing to scalability for high-throughput applications.

Experimental Results

Datasets and Evaluation Protocol

Benchmarks are conducted on a large and diverse sample of 2D and 3D datasets: 20,000 SVG shapes from OpenClipArt20k (2D) and 10,000 STEP files from the ABC-Dataset (3D), with systematic stratification across complexity levels. Profiles include variations in curve and patch counts, matching relevant practical workloads in CAD, manufacturing, and visualization.

Numerical Accuracy

The method demonstrates robust absolute precision in the GWN field, with Taylor expansion order controlling the error. Empirically, even zeroth-order approximations maintain GWN errors well below critical 0.5 thresholds needed to ensure correct inside/outside (rounded) containment decisions for watertight and near-watertight domains. Higher Taylor orders systematically reduce both average and maximal errors, as measured against direct evaluation. Parameter β\beta (distance scaling for far-field cluster approximation) is empirically tuned to strike a balance between runtime and precision, with higher values (e.g., β=4\beta=4 in dense, overlapping 2D cases) ensuring reliability for ambiguous or highly overlapping input.

Containment and Misclassification Analysis

Disagreements between agglomerated and direct GWN (after rounding) are shown to be tightly localized near half-integer GWN values, especially in ambiguous regions typical of non-watertight or heavily nested boundaries. The method’s rounding-based containment queries agree with the ground-truth almost everywhere except precisely those regions where the true GWN is ambiguous.

Tests comparing this method with point-cloud and polygonal tessellation–based GWN schemes indicate orders-of-magnitude reductions in containment misclassifications, particularly proximate to the true curved boundaries. Even at high-resolution triangular meshes, artifact-induced errors are substantial compared to the direct parametric approach.

Performance and Scaling

Substantial performance gains are observed. Query evaluation times for both 2D and 3D scale sub-linearly with the number of input primitives, with the preprocessing cost (BVH construction and moment calculation) remaining negligible relative to query evaluation for practical workloads. For large models (e.g., >1,000>1,000 NURBS surfaces), speedups of 10×10\times–30×30\times over optimized direct evaluation are common, with the upper quantiles reaching >30×>30\times in several scenarios.

Against previous direct and agglomerated GWN methods limited to discrete models, the proposed approach provides superior scaling and accuracy for curved input without sacrificing precision or incurring discretization artifacts.

Implications and Future Directions

Practical Impacts

The introduced spatially accelerated GWN technique enables fast, accurate, and memory-efficient containment queries on large-scale, highly detailed geometric models prevalent in CAD/CAM, mesh generation, simulation, and shape analysis pipelines. The open-source implementation and release of benchmarks promote reproducibility and comparability of future work.

Theoretical Advances

By bridging spatial agglomeration strategies with exact parametric curve and surface evaluation, the work extends hierarchical acceleration techniques to a richer function space (NURBS, trimmed surfaces), highlighting the advantages of combining analytic moment computations and hierarchical approximation in geometry processing.

Extensions

Potential directions for further research include geometry- and topology-aware adaptation of the β\beta parameter for more context-sensitive error control and further parallelization, including GPU implementations. Improving robustness to malformed or degenerate input in industrial CAD datasets also remains an area for expanded investigation. The methodology could be generalized to support additional non-Euclidean metrics or implicit geometries, and may contribute to efficient, differentiable geometric operators for emerging data-driven or PDE-based numerical methods.

Conclusion

This paper introduces a high-performance, spatially accelerated GWN evaluation framework tailored for general parametric B-Rep (NURBS) input, achieving robust, accurate containment queries for large and complex 2D/3D geometry with sub-linear evaluation complexity. The synthesis of hierarchical agglomeration, parametric moment computation, and adaptive subdivision constitutes a substantial technical advance over discrete-only strategies. The approach is validated on challenging datasets with statistically rigorous experimental protocols, marking a significant step forward for robust geometric querying in computational geometry and CAD/CAM workflows.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Collections

Sign up for free to add this paper to one or more collections.

Tweets

Sign up for free to view the 2 tweets with 27 likes about this paper.