def parse_nurbs_data(obj, i=0):
    """
    Given a blender object, read it's handles out as a (n,m,3) vertex array

    TODO: Read out knotvector. Function should yield all data necessary to define that NURBS
    """

    assert obj.type == "SURFACE"

    spline = obj.data.splines[i]
    m, n = spline.point_count_u, spline.point_count_v

    points = np.array([p.co for p in spline.points])
    points = points.reshape(n, m, -1)

    return points

    Given a blender object, read it's handles out as a (n,m,3) vertex array

    TODO: Read out knotvector. Function should yield all data necessary to define that NURBS
    
infinigen/assets/objects/creatures/util/creature_parser.py