@@ -425,16 +425,19 @@ def update(self, reset_camera: bool = True) -> None:
425425 if self .show_labels and vis_nodes :
426426 label_points = [vis_node .label_point for vis_node in vis_nodes ]
427427 labels = [vis_node .label for vis_node in vis_nodes ]
428+ label_points = np .asarray (label_points , dtype = float )
428429 self .plotter .add_point_labels (label_points , labels , bold = False , text_color = 'black' , show_points = True , point_color = 'grey' , point_size = 5 , shape = None , render_points_as_spheres = True )
429430
430431 if self .show_labels and vis_springs :
431432 self ._spring_label_points = [vis_spring .label_point for vis_spring in vis_springs ]
432433 self ._spring_labels = [vis_spring .label for vis_spring in vis_springs ]
433- self .plotter .add_point_labels (self ._spring_label_points , self ._spring_labels , text_color = 'black' , bold = False , shape = None , render_points_as_spheres = False )
434+ spring_label_points = np .asarray (self ._spring_label_points , dtype = float )
435+ self .plotter .add_point_labels (spring_label_points , self ._spring_labels , text_color = 'black' , bold = False , shape = None , render_points_as_spheres = False )
434436
435437 if self .show_labels and vis_members :
436438 label_points = [vis_member .label_point for vis_member in vis_members ]
437439 labels = [vis_member .label for vis_member in vis_members ]
440+ label_points = np .asarray (label_points , dtype = float )
438441 self .plotter .add_point_labels (label_points , labels , bold = False , text_color = 'black' , show_points = False , shape = None , render_points_as_spheres = False )
439442
440443 # Render the loads if requested
@@ -444,7 +447,8 @@ def update(self, reset_camera: bool = True) -> None:
444447 self .plot_loads ()
445448
446449 # Plot the load labels
447- self .plotter .add_point_labels (self ._load_label_points , self ._load_labels , bold = False , text_color = 'green' , show_points = False , shape = None , render_points_as_spheres = False )
450+ load_label_points = np .asarray (self ._load_label_points , dtype = float )
451+ self .plotter .add_point_labels (load_label_points , self ._load_labels , bold = False , text_color = 'green' , show_points = False , shape = None , render_points_as_spheres = False )
448452
449453 # Render the plates and quads, if present
450454 if self .model .quads or self .model .plates :
@@ -829,7 +833,7 @@ def plot_plates(self, deformed_shape: bool, deformed_scale: float, color_map: Op
829833 i += 1
830834
831835 # Add the vertices and the faces to our lists
832- plate_vertices = np .array (plate_vertices )
836+ plate_vertices = np .array (plate_vertices , dtype = float )
833837 plate_faces = np .array (plate_faces )
834838
835839 # Create a new PyVista dataset to store plate data
0 commit comments