def NurbsCurveData(points, degree=1, form=om1.MFnNurbsCurve.kOpen):
    'Tuple of points to MObject suitable for nurbsCurve-typed data\n\n    Arguments:\n        points (tuple): (x, y, z) tuples per point\n        degree (int, optional): Defaults to 1 for linear\n        form (int, optional): Defaults to MFnNurbsCurve.kOpen,\n            also available kClosed\n\n    Example:\n        Create a new nurbs curve like this.\n\n        >>> data = NurbsCurveData(\n        ...     points=(\n        ...         (0, 0, 0),\n        ...         (0, 1, 0),\n        ...         (0, 2, 0),\n        ...     ))\n        ...\n        >>> parent = createNode("transform")\n        >>> shape = createNode("nurbsCurve", parent=parent)\n        >>> shape["cached"] = data\n\n    '
    degree = min(3, max(1, degree))
    cvs = om1.MPointArray()
    curveFn = om1.MFnNurbsCurve()
    data = om1.MFnNurbsCurveData()
    mobj = data.create()
    for point in points:
        cvs.append(om1.MPoint(*point))
    curveFn.createWithEditPoints(cvs, degree, form, False, False, True, mobj)
    return mobj
Tuple of points to MObject suitable for nurbsCurve-typed data

Arguments:
    points (tuple): (x, y, z) tuples per point
    degree (int, optional): Defaults to 1 for linear
    form (int, optional): Defaults to MFnNurbsCurve.kOpen,
        also available kClosed

Example:
    Create a new nurbs curve like this.

    >>> data = NurbsCurveData(
    ...     points=(
    ...         (0, 0, 0),
    ...         (0, 1, 0),
    ...         (0, 2, 0),
    ...     ))
    ...
    >>> parent = createNode("transform")
    >>> shape = createNode("nurbsCurve", parent=parent)
    >>> shape["cached"] = data
def NurbsCurveData(points, degree=1, form=om1.MFnNurbsCurve.kOpen):
    'Tuple of points to MObject suitable for nurbsCurve-typed data\n\n    Arguments:\n        points (tuple): (x, y, z) tuples per point\n        degree (int, optional): Defaults to 1 for linear\n        form (int, optional): Defaults to MFnNurbsCurve.kOpen,\n            also available kClosed\n\n    Example:\n        Create a new nurbs curve like this.\n\n        >>> data = NurbsCurveData(\n        ...     points=(\n        ...         (0, 0, 0),\n        ...         (0, 1, 0),\n        ...         (0, 2, 0),\n        ...     ))\n        ...\n        >>> parent = createNode("transform")\n        >>> shape = createNode("nurbsCurve", parent=parent)\n        >>> shape["cached"] = data\n\n    '
    degree = min(3, max(1, degree))
    cvs = om1.MPointArray()
    curveFn = om1.MFnNurbsCurve()
    data = om1.MFnNurbsCurveData()
    mobj = data.create()
    for point in points:
        cvs.append(om1.MPoint(*point))
    curveFn.createWithEditPoints(cvs, degree, form, False, False, True, mobj)
    return mobj