https://github.com/ssg-aero/gbs
gbs is a c++ header library to build and manage NURBS, some optional module are used for visualization and export. This library is compatible with OpenCASACADE and has a python biding.
https://github.com/ssg-aero/gbs
bspline bspline-surface cad curve-surface-intersection gbs geometric-shapes loft nurbs opencascade
Last synced: 2 months ago
JSON representation
gbs is a c++ header library to build and manage NURBS, some optional module are used for visualization and export. This library is compatible with OpenCASACADE and has a python biding.
- Host: GitHub
- URL: https://github.com/ssg-aero/gbs
- Owner: ssg-aero
- License: other
- Created: 2020-09-30T11:10:47.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2026-03-25T07:53:16.000Z (2 months ago)
- Last Synced: 2026-03-25T13:31:25.370Z (2 months ago)
- Topics: bspline, bspline-surface, cad, curve-surface-intersection, gbs, geometric-shapes, loft, nurbs, opencascade
- Language: C++
- Homepage: http://www.ssg-aero.com
- Size: 5.34 MB
- Stars: 45
- Watchers: 9
- Forks: 16
- Open Issues: 1
-
Metadata Files:
- Readme: ReadMe.md
- Changelog: News.md
- License: LICENSE.LGPLv3
Awesome Lists containing this project
README
GBS is header library for computing bspline curves and surfaces.
GBS is compatible with OpenCASCADE, curves and surfaces can be converted to OpenCASCADE's objects.
__Example of point cloud approximation:__

__Example of points surface interpolation:__

__Example of curve-surface intersection:__

__Example of loft-surface creation:__

__Example of surface approximation of points:__

__Example of curve 2d variable offset:__


__Example of curve on surface:__

__Example of python code to interpolate points__
```python
pts = [
[0.,0.,0],
[0.,0.,1],
[1.,0.,0.5],
[1.,1.,1]
]
constraints = []
for p in pts:
constraints.append([p])
degree = 2
crv = gbs.interpolate_cn_3d_d(
constraints,
degree,
gbs.KnotsCalcMode.CHORD_LENGTH
)
```
For now, this lib is to be used inside a conda environment with the following package installed:
* nlopt
* eigen3
* boost >= 1.74
The optional module gbs-occt requires the additional package:
* occt >=7.4.0
The optional module render requires the additional package:
* vtk >=9.0
The python bindings requires the additional package:
* pybind11
The test library needs:
* gtest
* occt>=7.4.0
* sundials
For efficient buid use:
``` bash
rattler-build build --recipe .\gbs\recipe\recipe.yaml -c ssg-aero -c conda-forge
```
**Warning tests relative to performances evaluation should be run in release mode**
As GBS base is a header library it doesn’t need compilation.
If one needs to compile the optional module gbs-occt, -DUSE_OCCT_UTILS:BOOL=TRUE shall be added to cmake command.
If one needs to compile the optional module render, -DUSE_RENDER:BOOL=TRUE shall be added to cmake command.
If one needs to compile the optional module python-bindings, -DUSE_PYTHON_BINDINGS=TRUE shall be added to cmake command.
The full test suite, which require the optional module gbs-occt, please add -DGBS_BUILD_TESTS:BOOL=TRUE to the cmake command.