Skip to main content

RBFMeshGen — development moved to RBFLAB

RBFMeshGen has moved to RBFLAB. Geometry and node generation are now maintained in rbflab.geometry and rbflab.meshgen, alongside symbolic PDEs, interpolation and RBF methods. For new projects, install rbflab and start with the geometry cookbook.

This 1.1.4 maintenance release only updates the package description and release metadata. Its Python implementation and dependencies are unchanged from 1.1.3. Existing RBFMeshGen imports continue to work. RBFLAB requires Python 3.11+ and uses a different public API; it is not a drop-in import rename.

python -m pip install rbflab
from rbflab import geometry, meshgen
cloud = meshgen.generate(geometry.Annulus(), interior=240, boundary=144, seed=42)

RBFLAB documentation · Historical migration notes


Legacy RBFMeshGen documentation

2D point clouds from parametric boundaries.

Random · Halton · Sobol   |   Python ≥ 3.9   |   MIT License

Define a domain, choose a sampler, and generate points with labeled boundaries—including holes, overlapping regions, and internal interfaces.

Random, Halton, and Sobol sampling on the same domain

Quick start · Sampling · Examples · Development

Quick start

Install the published release from PyPI:

pip install RBFMeshGen

Create a circular domain with a hole:

import numpy as np
from RBFMeshGen import Border, RBFMesh, plot_mesh

outer = Border(lambda t: (np.cos(t), np.sin(t)),
               label="outer", t_start=0, t_end=2 * np.pi)
hole = Border(lambda t: (0.35 * np.cos(t), 0.35 * np.sin(t)),
              label="hole", t_start=0, t_end=2 * np.pi)

mesh = RBFMesh(outer(160), hole(-80))
mesh.generate_points(10000, method="halton", seed=42)
plot_mesh(mesh)

160 outer + 80 hole boundary points, plus 10,000 interior points.

Sampling

method Sampler Dependency
"random" Pseudorandom; default Base install
"halton" Scrambled Halton sequence Standard install
"sobol" Scrambled Sobol sequence Standard install
mesh.generate_points(10000, method="sobol", seed=42, append=False)
  • Exact counts: interior points are allocated by region area; boundary points are counted separately.
  • Repeatable results: use the same seed and environment. Calls append by default; append=False replaces interior points and avoids duplicates when reusing a seed.
  • Preserved boundaries: switching samplers keeps border counts and labels, including internal interfaces. Samples removed by holes are excluded.

These methods generate point clouds without enforcing minimum spacing. Clipping Sobol to a domain does not preserve its full power-of-two balance properties. See the SciPy docs for Halton and Sobol.

Boundaries & data

border(n) sets abs(n) segments; a negative count reverses traversal. Counterclockwise contours add regions; clockwise contours define holes. Contours must close within abs_tol (default 1e-4). Invalid or undersampled contours raise ValueError.

Attribute Contents
mesh.Points Interior points
mesh.Boundary_Points External and internal boundary points
mesh.region_polygons Disjoint Shapely regions

Each point exposes x, y, label, and is_border. Set Border(..., is_border=False) to exclude its samples from Boundary_Points.

Examples

python .\examples\example_6_sampling.py
Example Domain
01 · Annulus Circular boundary with a central hole
02 · Connected borders Straight edges and shared interfaces
03 · Airfoil Circular domain around an airfoil
04 · Overlapping circles Intersecting regions
05 · Concentric circles Internal interface and central hole
06 · Sampling comparison Random, Halton, and Sobol side by side

Replace the filename to run another example. Close its Matplotlib window to finish.

Development

The package has three core modules: geometry, generation, and visualization.

Run the test suite from an activated development environment:

python -m unittest discover -s tests -v

RBFMeshGen generates point clouds; it does not currently implement RBF interpolation or element connectivity. Contributions are welcome under the MIT License.

Metadata

Release files for RBFMeshGen 1.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for RBFMeshGen 1.1.4
File Size Uploaded Provenance Actions
rbfmeshgen-1.1.4.tar.gz 17.6 kB Without provenance Details for rbfmeshgen-1.1.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for RBFMeshGen 1.1.4
File Interpreter ABI Platform Actions
rbfmeshgen-1.1.4-py3-none-any.whl Python 3 none any Details for rbfmeshgen-1.1.4-py3-none-any.whl

Total release size: 30.8 kB

Release files / rbfmeshgen-1.1.4.tar.gz

Download URL rbfmeshgen-1.1.4.tar.gz
Size 17.6 kB
Tags Source
SHA-256 checksum
How to use checksums
1407e4d14f0ad153b515d74b41cdd02512cc29a11fb5cb4239730485ff8c4724
BLAKE2b-256 checksum
How to use checksums
ab6383f7da0844ddb8ed85701a527b6e53f2a6f6b6e991dac2536fadd325afd2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Release files / rbfmeshgen-1.1.4-py3-none-any.whl

Download URL rbfmeshgen-1.1.4-py3-none-any.whl
Size 13.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4131330381ae5fde64a0547984758e15ea8f6c28b9ffa6638ec99dbddb902b7a
BLAKE2b-256 checksum
How to use checksums
6a95797c94e1a20953c3265d84f314c31b69af827e267b073eb9d615bf9ce662
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Security for RBFMeshGen 1.1.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page