Skip to content

Commit

Permalink
remove _backend layer
Browse files Browse the repository at this point in the history
  • Loading branch information
j042 committed Jan 11, 2024
1 parent 91a99e2 commit 177b9d1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
4 changes: 1 addition & 3 deletions splinepy/helpme/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,9 +478,7 @@ def parametric_view(spline, axes=True, conform=False):

# take shallow copy
para_spline.spline_data._saved = spline.spline_data._saved.copy()
para_spline.show_options._options[
para_spline._show_options._backend
] = spline.show_options._options[spline._show_options._backend].copy()
para_spline.show_options._options = spline.show_options._options.copy()

if axes and "axes" in spline.show_options.valid_keys():
# configure axes
Expand Down
14 changes: 3 additions & 11 deletions splinepy/helpme/visualize.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"knot_lw",
"Line width of knots. Number of pixels. "
"Applicable to para_dim > 1.",
(int),
(int,),
),
_options.Option(
"vedo",
Expand Down Expand Up @@ -70,7 +70,7 @@
"vedo",
"control_mesh_lw",
"Line width of control mesh. Number of pixels",
(int),
(int,),
),
_options.Option(
"vedo",
Expand Down Expand Up @@ -123,8 +123,6 @@ def __init__(self, helpee):
f"Given helpee is {type(helpee)}.",
)
self._options = {}
self._backend = _gus.settings.VISUALIZATION_BACKEND
self._options[self._backend] = {}


class MultipatchShowOption(_options.ShowOption):
Expand Down Expand Up @@ -157,12 +155,6 @@ def __init__(self, helpee):
f"Given helpee is {type(helpee)}.",
)
self._options = {}
self._backend = _gus.settings.VISUALIZATION_BACKEND
self._options[self._backend] = {}


def make_showable(spline):
return eval(f"_{spline.show_options._backend}_showable(spline)")


def _sample_knots_1d(spline):
Expand Down Expand Up @@ -456,7 +448,7 @@ def _create_fitting_queries(spline):
return fqs


def _vedo_showable(spline):
def make_showable(spline):
"""
Goes through common procedures for preparing showable splines.
Expand Down

0 comments on commit 177b9d1

Please sign in to comment.