Skip to content

Commit e45f51d

Browse files
authored
Enhance README with Python usage
Added Python usage instructions
1 parent a03ee19 commit e45f51d

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

‎README.md‎

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ A curve network is a collection of interconnected curves that define the structu
2323

2424
The __Gordon surface interpolation__ method was first published by W.J. Gordon in 1969. It allows for surface generation through the interpolation of an arbitrary number of guide and profile curves using B-splines. It extends the __Coons patch__ method to more complex curve networks, making it versatile tool for __surface modeling__ in __3D CAD applications__.
2525

26-
## Usage Example
26+
## Usage Example (C++)
2727

2828
To use the __occ_gordon__ library, include the header file `<occ_gordon/occ_gordon.h>`. The main function for curve network interpolation is `occ_gordon::interpolate_curve_network`.
2929

@@ -42,6 +42,23 @@ auto surface = occ_gordon::interpolate_curve_network(ucurves, vcurves, inters_to
4242

4343
This example demonstrates how to interpolate a curve network using a B-spline surface with a specified intersection tolerance.
4444

45+
## Use from Python
46+
47+
To install occ_gordon from python, just install it via conda/mamba from conda-forge
48+
49+
```sh
50+
conda install occ-gordon -c conda-forge
51+
```
52+
53+
To use it, just pass two curve arrays to the function
54+
55+
```python
56+
from occ_gordon import interpolate_curve_network
57+
58+
...
59+
surface = interpolate_curve_network(profile_curves, guide_curves, tolerance=1.e-5)
60+
```
61+
4562
## Building
4663

4764
To build occ_gordon, you'll need a recent version of __CMake__ (3.15 or higher) and a working installation of __OpenCASCADE__.

0 commit comments

Comments
 (0)