Skip to main content

Python bindings for the GBS library

Project description

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

Example of points surface interpolation: Screencast

Example of curve-surface intersection: Screencast

Example of loft-surface creation: Screencast

Example of surface approximation of points: Screencast

Example of curve 2d variable offset: Screencast Screencast

Example of curve on surface: Screencast

Example of python code to interpolate points

    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

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.

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

pygbs-0.4.0a2.tar.gz (5.9 MB view details)

Uploaded Source

Built Distribution

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

pygbs-0.4.0a2-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file pygbs-0.4.0a2.tar.gz.

File metadata

  • Download URL: pygbs-0.4.0a2.tar.gz
  • Upload date:
  • Size: 5.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.11

File hashes

Hashes for pygbs-0.4.0a2.tar.gz
Algorithm Hash digest
SHA256 f81d07f95d102cc4b2791994676f6dc1490406479de3c4908bbeec5b2e03ac3c
MD5 95352f5a25ebb32ac488bdee98b3ce3a
BLAKE2b-256 1cf87c91596969ab36a87dca88db60c0e7fbbc3a8c05bb57bde9caf1b399a481

See more details on using hashes here.

File details

Details for the file pygbs-0.4.0a2-py3-none-any.whl.

File metadata

  • Download URL: pygbs-0.4.0a2-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.11

File hashes

Hashes for pygbs-0.4.0a2-py3-none-any.whl
Algorithm Hash digest
SHA256 14c59496d1df3c8a3d525360d3d2f7a59c1187e7e5cc55bff4f4a5b26fc97869
MD5 7f91f77003261d533b1bc822f79fdd9e
BLAKE2b-256 0db9aa2d6b087f6eafc7ee2a3381b0a82f1a9f2ea3ccb736925e215735255682

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