Metadata-Version: 2.4
Name: bsplyne
Version: 1.0.7
Summary: N-dimensional B-spline library for numerical mechanics and geometry
Author-email: Dorian Bichet <dbichet@insa-toulouse.fr>
License-Expression: CECILL-2.1
Project-URL: Homepage, https://github.com/Dorian210/bsplyne
Project-URL: Repository, https://github.com/Dorian210/bsplyne
Project-URL: Issues, https://github.com/Dorian210/bsplyne/issues
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Operating System :: OS Independent
Classifier: Topic :: Scientific/Engineering
Classifier: Intended Audience :: Science/Research
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: numpy>=1.20
Requires-Dist: numba>=0.55
Requires-Dist: scipy>=1.8
Requires-Dist: matplotlib>=3.5
Requires-Dist: meshio>=5.0
Requires-Dist: tqdm>=4.60
Requires-Dist: cloudpickle>=2.2
Provides-Extra: viz
Requires-Dist: pyvista>=0.41; extra == "viz"
Provides-Extra: dev
Requires-Dist: build; extra == "dev"
Requires-Dist: twine; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Provides-Extra: docs
Requires-Dist: wkhtmltopdf; extra == "docs"
Requires-Dist: pdoc>=12.0; extra == "docs"
Dynamic: license-file

# 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:

```bash
pip install bsplyne
```

Install the library **with recommended visualization features** (additionally install `pyvista`):

```bash
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:

```bash
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](LICENSE.txt) for details.
