Skip to content

pointsinside() winding-number test via natcpp; macOS CI on CRAN binaries (v1.11.1) - #528

Merged
jefferis merged 2 commits into
masterfrom
feature/pointsinside-natcpp-winding
Sep 26, 2026
Merged

jefferis merged 2 commits into
masterfrom
feature/pointsinside-natcpp-winding

Conversation

@jefferis

Copy link
Copy Markdown
Collaborator

Summary

Point release nat 1.11.1.

  • pointsinside() now uses natcpp's generalised winding-number test for logical results when natcpp (>= 0.3.2) is installed. The winding number (solid-angle) test does not depend on face normals, so it is robust to inconsistently oriented meshes that could previously give spurious inside/outside classifications with the normal-based Rvcg signed-distance test.

    • Runtime-conditional via an extended use_natcpp(version=); natcpp stays in Enhances: with no version floor, so users without natcpp 0.3.2 are unaffected.
    • Hooked into the single consistent_logical funnel, so the logical path keeps its bounding-box pre-filter and only in-box points hit the winding-number test.
    • Rvcg remains the fallback and still serves rval="distance" and rval="mesh3d". options(nat.use_natcpp=FALSE) forces the Rvcg path.
    • Verified locally: natcpp vs Rvcg agree 99.3% on kcs20 (the difference is near-boundary robustness); existing hxsurf tests pass.
  • CI: restrict use-public-rspm to Linux. P3M's macOS arm64 Rvcg 0.25 binary currently fails to load (symbol not found ___kmpc_dispatch_init_4u, a missing libomp symbol), breaking macOS vignette rebuilding on master. macOS/Windows now fall back to CRAN's cleanly-linked binaries; Linux keeps the P3M speed-up.

Depends on natcpp >= 0.3.2 (released; also on r-universe). CI installs natcpp from natverse/natcpp.

🤖 Generated with Claude Code

jefferis and others added 2 commits September 22, 2026 17:11
When natcpp (>= 0.3.2) is installed, pointsinside() logical results now use
its generalised (solid-angle) winding-number test (c_pointsinside, method=
"auto") instead of the normal-based Rvcg signed-distance test. The winding
number does not depend on face normals, so it is robust to inconsistently
oriented meshes that could previously give spurious inside/outside results.

The choice is conditional at runtime via use_natcpp(version=): Rvcg remains
the fallback when natcpp is absent and still serves rval="distance" and
rval="mesh3d". Set options(nat.use_natcpp=FALSE) to force the Rvcg path.

Bump version to 1.11.1 and update NEWS.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
P3M's macOS arm64 Rvcg 0.25 binary currently fails to load with a missing
libomp symbol (___kmpc_dispatch_init_4u), breaking vignette rebuilding on the
macOS check leg. Restrict use-public-rspm to Linux (where the binary speed-up
matters) so macOS and Windows fall back to CRAN's cleanly-linked binaries.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@jefferis
jefferis merged commit be4fa37 into master Sep 26, 2026
8 checks passed
@jefferis
jefferis deleted the feature/pointsinside-natcpp-winding branch September 26, 2026 06:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant