Skip to content

Commit

Permalink
Merge branch 'main' into refact_mesh-region-settings
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzovecchietti authored Apr 30, 2024
2 parents c69aea1 + 0235765 commit 073122c
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 3 deletions.
6 changes: 5 additions & 1 deletion pyaedt/modules/PostProcessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -5407,7 +5407,11 @@ def get_field_summary_data(self, setup=None, variation=None, intrinsics="", pand
if pandas_output:
if pd is None:
raise ImportError("pandas package is needed.")
return pd.DataFrame.from_dict(out_dict)
df = pd.DataFrame.from_dict(out_dict)
for col in ["Min", "Max", "Mean", "Stdev", "Total"]:
if col in df.columns:
df[col] = df[col].astype(float)
return df
return out_dict

@pyaedt_function_handler(filename="output_file", design_variation="variations", setup_name="setup")
Expand Down
36 changes: 34 additions & 2 deletions pyaedt/modules/solutions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3261,7 +3261,19 @@ def change_plot_scale(self, minimum_value, maximum_value, is_log=False, is_db=Fa
return True

@pyaedt_function_handler()
def export_image(self, full_path=None, width=1920, height=1080, orientation="isometric", display_wireframe=True):
def export_image(
self,
full_path=None,
width=1920,
height=1080,
orientation="isometric",
display_wireframe=True,
selections=None,
show_region=True,
show_axis=True,
show_grid=True,
show_ruler=True,
):
"""Export the active plot to an image file.
.. note::
Expand All @@ -3279,7 +3291,22 @@ def export_image(self, full_path=None, width=1920, height=1080, orientation="iso
``top``, ``bottom``, ``right``, ``left``, ``front``,
``back``, and any custom orientation.
display_wireframe : bool, optional
Set to ``True`` if the objects has to be put in wireframe mode.
Whether the objects has to be put in wireframe mode. Default is ``True``.
selections : str or List[str], optional
Objects to fit for the zoom on the exported image.
Default is None in which case all the objects in the design will be shown.
One important note is that, if the fieldplot extension is larger than the
selection extension, the fieldplot extension will be the one considered
for the zoom of the exported image.
show_region : bool, optional
Whether to include the air region in the exported image. Default is ``True``.
show_grid : bool, optional
Whether to display the background grid in the exported image.
Default is ``True``.
show_axis : bool, optional
Whether to display the axis triad in the exported image. Default is ``True``.
show_ruler : bool, optional
Whether to display the ruler in the exported image. Default is ``True``.
Returns
-------
Expand All @@ -3304,6 +3331,11 @@ def export_image(self, full_path=None, width=1920, height=1080, orientation="iso
width=width,
height=height,
display_wireframe=display_wireframe,
selections=selections,
show_region=show_region,
show_axis=show_axis,
show_grid=show_grid,
show_ruler=show_ruler,
)
full_path = check_and_download_file(full_path)
if status:
Expand Down

0 comments on commit 073122c

Please sign in to comment.