Skip to main content

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:

  1. B-spline basis functions
  2. Curve construction
  3. Surface generation
  4. Least-squares fitting
  5. Multi-patch geometries
  6. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bsplyne-1.0.4.tar.gz (59.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bsplyne-1.0.4-py3-none-any.whl (56.4 kB view details)

Uploaded Python 3

File details

Details for the file bsplyne-1.0.4.tar.gz.

File metadata

  • Download URL: bsplyne-1.0.4.tar.gz
  • Upload date:
  • Size: 59.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.23

File hashes

Hashes for bsplyne-1.0.4.tar.gz
Algorithm Hash digest
SHA256 a93dccb0948d3bd476fc89c1a07ba24253b2a037b58e9dcff17f3254c3b7ce47
MD5 c7557dada14357ddf31fd529f8df34fa
BLAKE2b-256 1b39df275d869d9adcbc58eca132c372607db53155e6ba2b6086d119253a20d0

See more details on using hashes here.

File details

Details for the file bsplyne-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: bsplyne-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 56.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.23

File hashes

Hashes for bsplyne-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ffb55f4aa2f5d0334cf3d2416a4f1186840d924d9bfef3e571520ab6e820b6b7
MD5 eee9fa6c18ff6ec771683249037f0eca
BLAKE2b-256 b8801b2665a0f3c79beedde2d004b5a25e5afe12b983c6b656fb462e2e912cf6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page