Examples Repository

Although using NURBS-Python is straight-forward, it is always confusing to do the initial start with a new library. To give you a headstart on working with NURBS-Python, an Examples repository over 50 example scripts which describe usage scenarios of the library and its modules is provided. You can run the scripts from the command line, inside from favorite IDE or copy them to a Jupyter notebook.

The Examples repository contains examples on

  • Bézier curves and surfaces
  • B-Spline & NURBS curves, surfaces and volumes
  • Spline algorithms, e.g. knot insertion and removal, degree elevation and reduction
  • Curve & surface splitting and Bézier decomposition (info)
  • Surface and curve fitting using interpolation and least squares approximation (docs)
  • Geometrical operations, e.g. tangent, normal, binormal (docs)
  • Importing & exporting spline geometries into supported formats (docs)
  • Compatibility module for control points conversion (docs)
  • Surface grid generators (info and docs)
  • Geometry containers (docs)
  • Automatic uniform knot vector generation via knotvector.generate()
  • Visualization components (info, Matplotlib, Plotly and VTK)
  • Ray operations (docs)
  • Voxelization (docs)

Matplotlib and Plotly visualization modules are compatible with Jupyter notebooks but VTK visualization module is not. Please refer to the NURBS-Python wiki for more details on using NURBS-Python Matplotlib and Plotly visualization modules with Jupyter notebooks.