Splitting and Decomposition

NURBS-Python is also capable of splitting the curves and the surfaces, as well as applying Bézier decomposition.

Splitting of curves can be achieved via operations.split_curve() method. For the surfaces, there are 2 different splitting methods, operations.split_surface_u() for splitting the surface on the u-direction and operations.split_surface_v() for splitting on the v-direction.

Bézier decomposition can be applied via operations.decompose_curve() and operations.decompose_surface() methods for curves and surfaces, respectively.

The following figures are generated from the examples provided in the Examples repository.

Splitting

The following 2D curve is split at u = 0.6 and applied translation by the tangent vector using operations.translate() method.

3D curve splitting example with translation

Splitting can also be applied to 3D curves (split at u = 0.3) without any translation.

3D curve splitting example

Surface splitting is also possible. The following figure compares splitting at u = 0.5 and v = 0.5.

Surface split combined

Surfaces can also be translated too before or after splitting operation. The following figure illustrates translation after splitting the surface at u = 0.5.

Surface split and translation

Multiple splitting is also possible for all curves and surfaces. The following figure describes multi splitting in surfaces. The initial surface is split at u = 0.25 and then, one of the resultant surfaces is split at v = 0.75, finally resulting 3 surfaces.

Surface multi split

Bézier Decomposition

The following figures illustrate Bézier cecomposition capabilities of NURBS-Python. Let’s start with the most obvious one, a full circle with 9 control points. It also is possible to directly generate this shape via geomdl.shapes module.

2D curve decomposition 1

The following is a circular curve generated with 7 control points as illustrated on page 301 of The NURBS Book (2nd Edition) by Piegl and Tiller. There is also an option to generate this shape via geomdl.shapes module.

2D curve decomposition 2

The following figures illustrate the possibility of Bézier decomposition in B-Spline and NURBS surfaces.

B-Spline surface decomposition NURBS surface decomposition

The colors are randomly generated via utilities.color_generator() function.