# Path: geomdl/BSpline.py
# class Curve(abstract.Curve):
# class Surface(abstract.Surface):
# class Volume(abstract.Volume):
#     def __init__(self, **kwargs):
#     def save(self, file_name):
#     def load(self, file_name):
#     def evaluate(self, **kwargs):
#     def evaluate_single(self, param):
#     def evaluate_list(self, param_list):
#     def derivatives(self, u, order=0, **kwargs):
#     def insert_knot(self, param, **kwargs):
#     def remove_knot(self, param, **kwargs):
#     def tangent(self, parpos, **kwargs):
#     def normal(self, parpos, **kwargs):
#     def binormal(self, parpos, **kwargs):
#     def __init__(self, **kwargs):
#     def ctrlpts2d(self):
#     def ctrlpts2d(self, value):
#     def set_ctrlpts(self, ctrlpts, *args, **kwargs):
#     def reset(self, **kwargs):
#     def save(self, file_name):
#     def load(self, file_name):
#     def transpose(self):
#     def evaluate(self, **kwargs):
#     def evaluate_single(self, param):
#     def evaluate_list(self, param_list):
#     def derivatives(self, u, v, order=0, **kwargs):
#     def insert_knot(self, u=None, v=None, **kwargs):
#     def remove_knot(self, u=None, v=None, **kwargs):
#     def tangent(self, parpos, **kwargs):
#     def normal(self, parpos, **kwargs):
#     def __init__(self, **kwargs):
#     def save(self, file_name):
#     def load(self, file_name):
#     def evaluate(self, **kwargs):
#     def evaluate_single(self, param):
#     def evaluate_list(self, param_list):
#     def insert_knot(self, u=None, v=None, w=None, **kwargs):
#     def remove_knot(self, u=None, v=None, w=None, **kwargs):


from geomdl import BSpline
S_KV_V = [0, 0, 0, 1, 1, 1]


def test_bspline_curve2d_evaluate():
    curve = BSpline.Curve()
    curve.degree = C_DEGREE
    curve.ctrlpts = C_CTRLPTS2D
    curve.knotvector = C_KV
    curve.sample_size = SAMPLE_SIZE

    # Expected output
    res = [[1.0, 1.0], [1.4375, 1.0625], [1.75, 1.25], [1.9375, 1.5625], [2.0, 2.0]]

    assert curve.evalpts == res


def test_bspline_curve3d_evaluate():
    curve = BSpline.Curve()
    curve.degree = C_DEGREE
    curve.ctrlpts = C_CTRLPTS3D
    curve.knotvector = C_KV
    curve.sample_size = SAMPLE_SIZE

    # Expected output
    res = [[1.0, 1.0, 0.0], [1.4375, 1.0625, -0.375], [1.75, 1.25, -0.5], [1.9375, 1.5625, -0.375], [2.0, 2.0, 0.0]]

    assert curve.evalpts == res


def test_bspline_surface_evaluate():

# Path: geomdl/BSpline.py
# class Curve(abstract.Curve):
# class Surface(abstract.Surface):
# class Volume(abstract.Volume):
#     def __init__(self, **kwargs):
#     def save(self, file_name):
#     def load(self, file_name):
#     def evaluate(self, **kwargs):
#     def evaluate_single(self, param):
#     def evaluate_list(self, param_list):
#     def derivatives(self, u, order=0, **kwargs):
#     def insert_knot(self, param, **kwargs):
#     def remove_knot(self, param, **kwargs):
#     def tangent(self, parpos, **kwargs):
#     def normal(self, parpos, **kwargs):
#     def binormal(self, parpos, **kwargs):
#     def __init__(self, **kwargs):
#     def ctrlpts2d(self):
#     def ctrlpts2d(self, value):
#     def set_ctrlpts(self, ctrlpts, *args, **kwargs):
#     def reset(self, **kwargs):
#     def save(self, file_name):
#     def load(self, file_name):
#     def transpose(self):
#     def evaluate(self, **kwargs):
#     def evaluate_single(self, param):
#     def evaluate_list(self, param_list):
#     def derivatives(self, u, v, order=0, **kwargs):
#     def insert_knot(self, u=None, v=None, **kwargs):
#     def remove_knot(self, u=None, v=None, **kwargs):
#     def tangent(self, parpos, **kwargs):
#     def normal(self, parpos, **kwargs):
#     def __init__(self, **kwargs):
#     def save(self, file_name):
#     def load(self, file_name):
#     def evaluate(self, **kwargs):
#     def evaluate_single(self, param):
#     def evaluate_list(self, param_list):
#     def insert_knot(self, u=None, v=None, w=None, **kwargs):
#     def remove_knot(self, u=None, v=None, w=None, **kwargs):


# Path: tests/test_evaluate.py
from geomdl import BSpline

S_KV_V = [0, 0, 0, 1, 1, 1]


def test_bspline_curve2d_evaluate():
    curve = BSpline.Curve()
    curve.degree = C_DEGREE
    curve.ctrlpts = C_CTRLPTS2D
    curve.knotvector = C_KV
    curve.sample_size = SAMPLE_SIZE

    # Expected output
    res = [[1.0, 1.0], [1.4375, 1.0625], [1.75, 1.25], [1.9375, 1.5625], [2.0, 2.0]]

    assert curve.evalpts == res


def test_bspline_curve3d_evaluate():
    curve = BSpline.Curve()
    curve.degree = C_DEGREE
    curve.ctrlpts = C_CTRLPTS3D
    curve.knotvector = C_KV
    curve.sample_size = SAMPLE_SIZE

    # Expected output
    res = [[1.0, 1.0, 0.0], [1.4375, 1.0625, -0.375], [1.75, 1.25, -0.5], [1.9375, 1.5625, -0.375], [2.0, 2.0, 0.0]]

    assert curve.evalpts == res


def test_bspline_surface_evaluate():

    surf = BSpline.Surface()