releso.spline.BSplineDefinition

class releso.spline.BSplineDefinition(*, save_location: Path, logger_name: str | None = None, control_points: List[List[VariableLocation]] | None = None, space_dimensions: List[SplineSpaceDimension])

Bases: SplineDefinition

Definition of the BSpline implementation of the ReLeSO Toolbox.

__init__(**data: Any) None

Constructor for the ReLeSO basemodel object.

Methods

convert_all_control_point_locations_to_variable_locations(v, ...)

Validator control_points.

convert_to_pathlib_add_datetime(v)

Add timestamp to save_location, of applicable.

draw_action_space([save_location, no_axis, ...])

Draw the action space of the defined shape as a matplotlib figure.

get_actions()

Returns the action defined.

get_logger()

Gets the currently defined environment logger.

get_number_of_points()

Returns the number of points in the Spline.

get_parameter_values()

Returns the current positions of all control points.

get_shape()

Creates the BSpline from the definition given by the json file.

make_default_control_point_grid(values)

Validator for control_point_variables.

reset()

Resets the shape to the original values.

set_logger_name_recursively(logger_name)

Set the logger_name variable for all child elements.

Attributes

space_dimensions

Definition of the space dimensions of the spline

control_points

control points of the spline.

save_location

Definition of the save location of the logs and validation results.

logger_name

name of the logger.

get_shape() splinepy.BSpline

Creates the BSpline from the definition given by the json file.

Returns:

given by the #degrees and knot_vector in each space_dimension and the current control points.

Return type:

BSpline