Converters

convert module provides functions for converting B-spline shapes and NURBS shapes to each other.

Function Reference

geomdl.convert.bspline_to_nurbs(obj)

Converts non-rational parametric shapes to rational ones.

Parameters:obj (BSpline.Curve, BSpline.Surface or BSpline.Volume) – B-Spline shape
Returns:NURBS shape
Return type:NURBS.Curve, NURBS.Surface or NURBS.Volume
Raises:TypeError
geomdl.convert.nurbs_to_bspline(obj, **kwargs)

Extracts the non-rational components from rational parametric shapes, if possible.

The possibility of converting a rational shape to a non-rational one depends on the weights vector.

Parameters:obj (NURBS.Curve, NURBS.Surface or NURBS.Volume) – NURBS shape
Returns:B-Spline shape
Return type:BSpline.Curve, BSpline.Surface or BSpline.Volume
Raises:TypeError