Module:
sdynpy.core.sdynpy_geometrySource: GitHub
Parent:
pyvistaqt.plotting.BackgroundPlotterParent:
pyvistaqt.plotting.QtInteractorParent:
pyvistaqt.rwi.QVTKRenderWindowInteractorParent:
PyQt5.QtWidgets.QWidgetParent:
PyQt5.QtCore.QObjectParent:
sip.wrapperParent:
PyQt5.QtGui.QPaintDeviceParent:
sip.simplewrapperParent:
pyvista.plotting.plotter.BasePlotterParent:
pyvista.core.utilities.misc._BoundsSizeMixinParent:
pyvista.plotting.picking.PickingHelperParent:
pyvista.plotting.picking.PickingMethodsParent:
pyvista.plotting.picking.PickingInterfaceParent:
pyvista.plotting.widgets.WidgetHelper
Signature¶
class sdynpy.core.sdynpy_geometry.TransientPlotter(geometry, displacement_data, displacement_scale=1.0, frames_per_second=20, undeformed_opacity=0.0, deformed_opacity=1.0, plot_kwargs={}, transformation_shapes=None, num_curves=50, show: bool = True, app=None, window_size=None, off_screen=None, allow_quit_keypress=True, toolbar=True, menu_bar=True, editor=False, update_app_icon=None, **kwargs)Class used to plot transient deformations
Methods¶
| Name | Summary |
|---|---|
__init__ | Create a TransientPlotter object to plot displacements over time |
add_menu_bar | Adds the menu bar to the BackgroundPlotter |
add_toolbars | Adds toolbars to the BackgroundPlotter |
go_to_first_step | |
go_to_last_step | |
go_to_next_step | |
go_to_previous_step | |
modify_abscissa | |
play_animation | |
play_animation_reverse | |
save_animation | Saves the current shape animation to a file |
select_scaling_0p25 | Adjusts the current shape scaling by 0.25x |
select_scaling_0p5 | Adjusts the current shape scaling by 0.5x |
select_scaling_0p8 | Adjusts the current shape scaling by 0.8x |
select_scaling_1 | Resets shape scaling to 1 |
select_scaling_1p25 | Adjusts the current shape scaling by 1.25x |
select_scaling_2p0 | Adjusts the current shape scaling by 2x |
select_scaling_4p0 | Adjusts the current shape scaling by 4x |
select_speed_0p8 | Adjusts the current animation speed by 0.8 |
select_speed_1 | Resets animation speed to default quantities |
select_speed_1p25 | Adjusts the current animation speed by 1.25 |
stop_animation | |
update_abscissa | |
update_abscissa_reverse | |
update_displacement |
__init__¶
Source: GitHub
def sdynpy.core.sdynpy_geometry.TransientPlotter.__init__(self, geometry, displacement_data, displacement_scale=1.0, frames_per_second=20, undeformed_opacity=0.0, deformed_opacity=1.0, plot_kwargs={}, transformation_shapes=None, num_curves=50, show: bool = True, app=None, window_size=None, off_screen=None, allow_quit_keypress=True, toolbar=True, menu_bar=True, editor=False, update_app_icon=None, **kwargs)Create a TransientPlotter object to plot displacements over time
Parameters¶
geometry : Geometry Geometry on which the displacements will be plotted
displacement_data : TimeHistoryArray Transient displacement data that will be applied
displacement_scale : float, optional Scale factor applied to displacements. The default is 1.0.
frames_per_second : float, optional Number of time steps to plot per second while the displacement is animating. Default is 20.
undeformed_opacity : float, optional Opacity of the undeformed geometry. The default is 0.0, or completely transparent.
deformed_opacity : float, optional Opacity of the deformed geometry. The default is 1.0, or completely opaque.
plot_kwargs : dict, optional Keyword arguments passed to the Geometry.plot function
transformation_shapes : ShapeArray Shape matrix that will be used to expand the data. Must be the same size as the
displacement_datanum_curves : int, optional Maximum number of curves to plot on the time selector. Default is 50
show : bool, optional Show the plotting window. If
False, show this window by runningshow(). The default is True.app : QApplication, optional Creates a
QApplicationif left asNone. The default is None.window_size : list of int, optional Window size in pixels. Defaults to
[1024, 768]off_screen : TYPE, optional Renders off screen when True. Useful for automated screenshots or debug testing. The default is None.
allow_quit_keypress : bool, optional Allow user to exit by pressing
"q". The default is True.toolbar : bool, optional If True, display the default camera toolbar. Defaults to True.
menu_bar : bool, optional If True, display the default main menu. Defaults to True.
editor : TYPE, optional If True, display the VTK object editor. Defaults to False.
update_app_icon : bool, optional If True, update_app_icon will be called automatically to update the Qt app icon based on the current rendering output. If None, the logo of PyVista will be used. If False, no icon will be set. Defaults to None. The default is None.
title : str, optional Title of plotting window.
multi_samples : int, optional The number of multi-samples used to mitigate aliasing. 4 is a good default but 8 will have better results with a potential impact on performance.
line_smoothing : bool, optional If True, enable line smothing
point_smoothing : bool, optional If True, enable point smothing
polygon_smoothing : bool, optional If True, enable polygon smothing
auto_update : float, bool, optional Automatic update rate in seconds. Useful for automatically updating the render window when actors are change without being automatically
Modified. If set toTrue, update rate will be 1 second.
Returns¶
None.
add_menu_bar¶
Source: GitHub
def sdynpy.core.sdynpy_geometry.TransientPlotter.add_menu_bar(self) -> NoneAdds the menu bar to the BackgroundPlotter
add_toolbars¶
Source: GitHub
def sdynpy.core.sdynpy_geometry.TransientPlotter.add_toolbars(self) -> NoneAdds toolbars to the BackgroundPlotter
go_to_first_step¶
Source: GitHub
def sdynpy.core.sdynpy_geometry.TransientPlotter.go_to_first_step(self)go_to_last_step¶
Source: GitHub
def sdynpy.core.sdynpy_geometry.TransientPlotter.go_to_last_step(self)go_to_next_step¶
Source: GitHub
def sdynpy.core.sdynpy_geometry.TransientPlotter.go_to_next_step(self)go_to_previous_step¶
Source: GitHub
def sdynpy.core.sdynpy_geometry.TransientPlotter.go_to_previous_step(self)modify_abscissa¶
Source: GitHub
def sdynpy.core.sdynpy_geometry.TransientPlotter.modify_abscissa(self)play_animation¶
Source: GitHub
def sdynpy.core.sdynpy_geometry.TransientPlotter.play_animation(self)play_animation_reverse¶
Source: GitHub
def sdynpy.core.sdynpy_geometry.TransientPlotter.play_animation_reverse(self)save_animation¶
Source: GitHub
def sdynpy.core.sdynpy_geometry.TransientPlotter.save_animation(self, filename=None, frame_rate=20, individual_images=False, start_time=None, stop_time=None, step=None)Saves the current shape animation to a file
Parameters¶
filename : str, optional Path to the file being saved. The default is None, which returns the images as an array rather than saves them to a file
frame_rate : float, optional Number of frames per second if the animation is saved to a GIF. The default is 20.
individual_images : bool, optional Boolean to specify whether the images are saved as individual PNG files or a single GIF. The default is False.
start_time : float, optional Time value at which the animation will start. Default is first time step
stop_time : float, optional Time value at which the animation will end. Default is last time step
step : int, optional Only render every
steptime steps. Default is to render all timesteps
Returns¶
imgs : np.ndarray or None Returns array of images if filename is None, otherwise returns None
select_scaling_0p25¶
Source: GitHub
def sdynpy.core.sdynpy_geometry.TransientPlotter.select_scaling_0p25(self)Adjusts the current shape scaling by 0.25x
select_scaling_0p5¶
Source: GitHub
def sdynpy.core.sdynpy_geometry.TransientPlotter.select_scaling_0p5(self)Adjusts the current shape scaling by 0.5x
select_scaling_0p8¶
Source: GitHub
def sdynpy.core.sdynpy_geometry.TransientPlotter.select_scaling_0p8(self)Adjusts the current shape scaling by 0.8x
select_scaling_1¶
Source: GitHub
def sdynpy.core.sdynpy_geometry.TransientPlotter.select_scaling_1(self)Resets shape scaling to 1
select_scaling_1p25¶
Source: GitHub
def sdynpy.core.sdynpy_geometry.TransientPlotter.select_scaling_1p25(self)Adjusts the current shape scaling by 1.25x
select_scaling_2p0¶
Source: GitHub
def sdynpy.core.sdynpy_geometry.TransientPlotter.select_scaling_2p0(self)Adjusts the current shape scaling by 2x
select_scaling_4p0¶
Source: GitHub
def sdynpy.core.sdynpy_geometry.TransientPlotter.select_scaling_4p0(self)Adjusts the current shape scaling by 4x
select_speed_0p8¶
Source: GitHub
def sdynpy.core.sdynpy_geometry.TransientPlotter.select_speed_0p8(self)Adjusts the current animation speed by 0.8
select_speed_1¶
Source: GitHub
def sdynpy.core.sdynpy_geometry.TransientPlotter.select_speed_1(self)Resets animation speed to default quantities
select_speed_1p25¶
Source: GitHub
def sdynpy.core.sdynpy_geometry.TransientPlotter.select_speed_1p25(self)Adjusts the current animation speed by 1.25
stop_animation¶
Source: GitHub
def sdynpy.core.sdynpy_geometry.TransientPlotter.stop_animation(self)update_abscissa¶
Source: GitHub
def sdynpy.core.sdynpy_geometry.TransientPlotter.update_abscissa(self)update_abscissa_reverse¶
Source: GitHub
def sdynpy.core.sdynpy_geometry.TransientPlotter.update_abscissa_reverse(self)update_displacement¶
Source: GitHub
def sdynpy.core.sdynpy_geometry.TransientPlotter.update_displacement(self, update_selector=True)