- 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 atan2 for subtended angle calculations, faster than conventional acos-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 β (distance scaling for far-field cluster approximation) is empirically tuned to strike a balance between runtime and precision, with higher values (e.g., β=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.
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 NURBS surfaces), speedups of 10×–30× over optimized direct evaluation are common, with the upper quantiles reaching >30× 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 β 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.