Skip to content

Commit

Permalink
fix export field plot streamline + test displacement current
Browse files Browse the repository at this point in the history
  • Loading branch information
gmalinve committed Apr 23, 2024
1 parent 91289ce commit 847b499
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
1 change: 1 addition & 0 deletions _unittest/test_28_Maxwell3D.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ def test_05a_assign_coil(self):
def test_05_draw_region(self):
assert self.aedtapp.modeler.create_air_region(*[300] * 6)

@pytest.mark.skipif(desktop_version == "2024.2", reason="GetDisplacementCurrent not working in 2024.2")
def test_06_eddycurrent(self):
assert self.aedtapp.eddy_effects_on(["Plate"], enable_eddy_effects=True)
oModule = self.aedtapp.odesign.GetModule("BoundarySetup")
Expand Down
7 changes: 0 additions & 7 deletions examples/03-Maxwell/Maxwell2D_Electrostatic.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,13 +198,6 @@

M2D.post.export_field_plot(plot_name="LineTracesTest", output_dir=M2D.toolkit_directory, file_format="fldplt")

##########################################################
# Export a field plot to an image file
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Export the flux lines plot to an image file using PyVista Python package.

M2D.post.plot_field_from_fieldplot(plot.name, show=False)

##########################################################
# Export the mesh field plot
# ~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
4 changes: 2 additions & 2 deletions pyaedt/modules/AdvancedPostProcessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,8 @@ def plot_field_from_fieldplot(
):
"""Export a field plot to an image file (JPG or PNG) using Python PyVista.
This method does not support streamlines plot.
.. note::
The PyVista module rebuilds the mesh and the overlap fields on the mesh.
Expand Down Expand Up @@ -392,8 +394,6 @@ def plot_field_from_fieldplot(
else:
self.ofieldsreporter.UpdateQuantityFieldsPlots(plot_folder)

if self.field_plots[plot_name].field_type == "DC R/L Fields":
file_format = "fldplt"
file_to_add = self.export_field_plot(plot_name, self._app.working_directory, file_format=file_format)
model = self.get_model_plotter_geometries(
generate_mesh=False,
Expand Down

0 comments on commit 847b499

Please sign in to comment.