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
- Import Surface — Load STL/OBJ via GeoIO.jl into a
PointBoundary - Split & Label — Identify walls, inlets, outlets by normal angle
- Generate Volume — Fill the interior with well-spaced points
- Optimize Distribution — Node repulsion for solver accuracy
- Build Connectivity — k-nearest neighbor or radius-based stencils
- 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)
Generate volume points with discretize:
spacing = ConstantSpacing(1m)
cloud = discretize(boundary, spacing; alg=VanDerSandeFornberg(), max_points=100_000)visualize(cloud; markersize=0.15)
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
TriangleOctreefor O(1) point-in-volume queries on large meshes- Threaded operations throughout via OhMyThreads.jl
StructArraylayout 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