WhatsThePoint.jl

Generate, optimize, and connect point clouds for meshless PDE methods.

Meshless methods need well-distributed point clouds with neighbor connectivity, but getting from a CAD surface to solver-ready points is tedious. WhatsThePoint.jl handles the complete pipeline — from surface mesh import through volume discretization, point distribution optimization, and connectivity computation — in a few lines of Julia.

Pipeline at a Glance

  1. Import Surface — Load STL/OBJ via GeoIO.jl into a PointBoundary
  2. Split & Label — Identify walls, inlets, outlets by normal angle
  3. Generate Volume — Fill the interior with well-spaced points
  4. Optimize Distribution — Node repulsion for solver accuracy
  5. Build Connectivity — k-nearest neighbor or radius-based stencils
  6. Ready for Solver — Export to VTK or pass directly to your meshless code

Quick Example

Load a surface mesh and inspect the boundary structure:

using WhatsThePoint
boundary = PointBoundary(joinpath(@__DIR__, "assets/bunny.stl"))
PointBoundary{Meshes.𝔼{3}, CoordRefSystems.Cartesian3D{CoordRefSystems.NoDatum, Unitful.Quantity{Float64, 𝐋, Unitful.FreeUnits{(m,), 𝐋, nothing}}}}
├─69664 points
└─Surfaces
  └─surface1
using GLMakie
visualize(boundary; markersize=0.15)

bunny boundary

Generate volume points with discretize:

spacing = ConstantSpacing(1m)
cloud = discretize(boundary, spacing; alg=VanDerSandeFornberg(), max_points=100_000)
visualize(cloud; markersize=0.15)

bunny discretized

Installation

using Pkg
Pkg.add(url="https://github.com/JuliaMeshless/WhatsThePoint.jl")

Key Features

Pipeline

  • Import surface meshes (STL, OBJ, any GeoIO.jl format)
  • Multiple discretization algorithms: SlakKosec, VanDerSandeFornberg (3D), FornbergFlyer (2D), OctreeRandom
  • Node repulsion for distribution optimization (Miotti 2023)
  • k-nearest neighbor and radius-based topology for meshless stencils
  • Export to VTK

Performance

  • TriangleOctree for O(1) point-in-volume queries on large meshes
  • Threaded operations throughout via OhMyThreads.jl
  • StructArray layout for cache-friendly surface element access

Correctness

  • Full Unitful.jl integration — mm, m, ° work directly
  • Type-safe geometry built on Meshes.jl with coordinate system support
  • Immutable, AD-compatible design — operations return new objects

Build Status Stable Dev License File