Skip to main content

RBFMeshGen

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.3

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.3
File Size Uploaded Provenance Actions
rbfmeshgen-1.1.3.tar.gz 16.7 kB Without provenance Details for rbfmeshgen-1.1.3.tar.gz

Built distribution (wheel)

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

Total release size: 29.4 kB

Release files / rbfmeshgen-1.1.3.tar.gz

Download URL rbfmeshgen-1.1.3.tar.gz
Size 16.7 kB
Tags Source
SHA-256 checksum
How to use checksums
9f5e8663cdea70fc6545ffc6f6a7b89e64f6dcce44e2675c995b08c2bfba4d53
BLAKE2b-256 checksum
How to use checksums
161b39e05f6ea7dd840ca57d24bce38a8e8365798eb7574109ae8c40f22d55ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

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

Download URL rbfmeshgen-1.1.3-py3-none-any.whl
Size 12.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
63b63e1172674da9fc8d51f951076071d9ed4cc1f73a3038e6caf1c18b7641a7
BLAKE2b-256 checksum
How to use checksums
3e7affc6fbed8d474892086e6788eedaa171fae0060e270e67d1c6fa3e4e2c20
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Security for RBFMeshGen 1.1.3

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