Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/plot animated field #4408

Merged
merged 5 commits into from
Mar 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions pyaedt/modules/AdvancedPostProcessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,6 @@ def plot_animated_field(
variation_variable="Phi",
variation_list=["0deg"],
view="isometric",
plot_label=None,
show=True,
scale_min=None,
scale_max=None,
Expand All @@ -594,7 +593,7 @@ def plot_animated_field(
show_grid=False,
show_bounding=False,
show_legend=True,
filter_objects=[],
filter_objects=None,
):
"""Create an animated field plot using Python PyVista and export to a gif file.

Expand Down Expand Up @@ -650,6 +649,7 @@ def plot_animated_field(
Whether to display the legend or not. The default is ``True``.
filter_objects : list, optional
Objects list for filtering the ``CutPlane`` plots.
The default is ``None`` in which case an empty list is passed.

Returns
-------
Expand All @@ -662,6 +662,8 @@ def plot_animated_field(
intrinsics = {}
if not export_path:
export_path = self._app.working_directory
if not filter_objects:
filter_objects = []

v = 0
fields_to_add = []
Expand All @@ -682,7 +684,7 @@ def plot_animated_field(
object_list, quantity, setup_name, intrinsics, filter_objects=filter_objects
)
if plotf:
file_to_add = self.export_field_plot(plotf.name, export_path, plotf.name + str(v), file_format="case")
file_to_add = self.export_field_plot(plotf.name, export_path, plotf.name + str(v))
if file_to_add:
fields_to_add.append(file_to_add)
plotf.delete()
Expand Down
Loading