From 23536da10f4a03ea3f59011f195a977d76b3eb97 Mon Sep 17 00:00:00 2001 From: SteveDoyle2 Date: Sun, 3 Nov 2024 20:34:44 -0800 Subject: [PATCH] fixing test --- .../gui/menus/cutting_plane/shear_moment_torque_object.py | 6 ++++-- pyNastran/gui/qt_files/vtk_actor_actions.py | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pyNastran/gui/menus/cutting_plane/shear_moment_torque_object.py b/pyNastran/gui/menus/cutting_plane/shear_moment_torque_object.py index 5d40a02d9..a613e70dc 100644 --- a/pyNastran/gui/menus/cutting_plane/shear_moment_torque_object.py +++ b/pyNastran/gui/menus/cutting_plane/shear_moment_torque_object.py @@ -577,7 +577,8 @@ def plot_plane(self, plane_color = settings.shear_moment_torque_color plane_opacity = settings.shear_moment_torque_opacity point_size = settings.shear_moment_torque_point_size - line_width = settings.shear_moment_torque_line_width + line_width = int(settings.shear_moment_torque_line_width) + assert isinstance(line_width, int), line_width # the plane actor defines the plane of the output results, # not the plane of the march direction @@ -604,11 +605,12 @@ def _create_vector_points(self, xyz1: np.ndarray, color: ColorFloat, opacity: float, point_size: float, - line_width: float) -> None: + line_width: int) -> None: """ Creates additional actors to represent the location of the cutting planes """ + assert isinstance(line_width, int), line_width gui = self.gui nodes = xyz1[np.newaxis, :] + iaxis_march[np.newaxis, :] * stations[:, np.newaxis] irange = np.arange(len(stations)-1, dtype='int32') diff --git a/pyNastran/gui/qt_files/vtk_actor_actions.py b/pyNastran/gui/qt_files/vtk_actor_actions.py index 3eb757d48..db75ba874 100644 --- a/pyNastran/gui/qt_files/vtk_actor_actions.py +++ b/pyNastran/gui/qt_files/vtk_actor_actions.py @@ -43,6 +43,7 @@ def set_line_grid(self, name: str, visible_in_geometry_properties: bool=True, ) -> Optional[vtkUnstructuredGrid]: """Makes a line grid""" + assert isinstance(line_width, int), line_width etype = 3 # vtkLine().GetCellType() grid = self.create_grid_from_nodes_elements_etype( name, nodes, elements, etype, color,