N-dimensional B-spline library for numerical mechanics and geometry
Project description
bsplyne
bsplyne is a Python library for working with N-dimensional B-splines, with a focus on numerical mechanics and geometry. It implements the Cox–de Boor algorithm for basis evaluation, order elevation, knot insertion, and provides tools for handling multi-patch B-spline structures. Visualization and export utilities (e.g. Paraview) are also included.
Installation
From PyPI (recommended method)
Install the core library:
pip install bsplyne
Install the library with recommended visualization features (additionally install pyvista):
pip install bsplyne[viz]
Note: choose either the core (
bsplyne) or the visualization (bsplyne[viz]) installation.
From source (development mode)
Clone the repository and install:
git clone https://github.com/Dorian210/bsplyne
cd bsplyne
pip install -e . # core
pip install -e .[viz] # with visualization
Dependencies
Core dependencies are handled automatically by pip:
- numpy
- numba
- scipy
- matplotlib
- meshio
- tqdm
Optional visualization:
- pyvista (for 3D visualization)
Main Modules
-
BSplineBasis
Evaluation of B-spline basis functions using the Cox–de Boor recursion formula. -
BSpline
Construction and manipulation of N-dimensional B-splines, including order elevation and knot insertion. -
MultiPatchBSplineConnectivity
Management of connectivity between multiple B-spline patches. -
CouplesBSplineBorder
Utilities for coupling B-spline borders (experimental / less documented).
Tutorials
A step-by-step introduction to bsplyne is provided in:
examples/tutorial/
These scripts are designed as a progressive entry point to the library and cover:
- B-spline basis functions
- Curve construction
- Surface generation
- Least-squares fitting
- Multi-patch geometries
- Export to Paraview
In addition, a comprehensive PDF guide (tp_bsplyne.pdf) is included in the tutorials directory, providing a hands-on introduction to the library for new users.
It explains the workflow, the main modules, and practical usage examples.
Examples
Additional standalone examples are available in the examples/ directory, including:
- Curves and surfaces
- Order elevation and knot insertion
- Visualization with Matplotlib
- Export to Paraview
Documentation
The full API documentation is available online:
https://dorian210.github.io/bsplyne/
The documentation is generated from the source code docstrings and reflects the latest published version.
Contributions
This project is primarily developed for research purposes. While I am not actively reviewing external contributions, bug reports and suggestions are welcome via the issue tracker.
License
This project is licensed under the CeCILL License.
See LICENSE.txt for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bsplyne-1.0.9.tar.gz.
File metadata
- Download URL: bsplyne-1.0.9.tar.gz
- Upload date:
- Size: 60.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b3f2b9625ef3ddf9645761b12ec02cdbb2c298cb753c9dae78e73b5fde4ca12
|
|
| MD5 |
ac8fa421cb83c35a1f10fba71d826014
|
|
| BLAKE2b-256 |
da0744476bf9383927be6e4da11a3e123822fb6ea3da56c98ed4d3120c31af87
|
File details
Details for the file bsplyne-1.0.9-py3-none-any.whl.
File metadata
- Download URL: bsplyne-1.0.9-py3-none-any.whl
- Upload date:
- Size: 56.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b3773a85092e29fd455fec5f766c84fe4ad74128622f99ed40629c40db56c85
|
|
| MD5 |
a640d83dcd1010077158b979c66d6010
|
|
| BLAKE2b-256 |
4cca9285d674f2cc7e4efcb2d5b36755643b3ec1cf6ae7ecdbd00d941a8ba98d
|