Skip to content

Commit d1a2049

Browse files
authored
fix export field plot streamline (#4579)
1 parent 91289ce commit d1a2049

File tree

3 files changed

+3
-9
lines changed

3 files changed

+3
-9
lines changed

_unittest/test_28_Maxwell3D.py

+1
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ def test_05a_assign_coil(self):
198198
def test_05_draw_region(self):
199199
assert self.aedtapp.modeler.create_air_region(*[300] * 6)
200200

201+
@pytest.mark.skipif(desktop_version == "2024.2", reason="GetDisplacementCurrent not working in 2024.2")
201202
def test_06_eddycurrent(self):
202203
assert self.aedtapp.eddy_effects_on(["Plate"], enable_eddy_effects=True)
203204
oModule = self.aedtapp.odesign.GetModule("BoundarySetup")

examples/03-Maxwell/Maxwell2D_Electrostatic.py

-7
Original file line numberDiff line numberDiff line change
@@ -198,13 +198,6 @@
198198

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

201-
##########################################################
202-
# Export a field plot to an image file
203-
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
204-
# Export the flux lines plot to an image file using PyVista Python package.
205-
206-
M2D.post.plot_field_from_fieldplot(plot.name, show=False)
207-
208201
##########################################################
209202
# Export the mesh field plot
210203
# ~~~~~~~~~~~~~~~~~~~~~~~~~~

pyaedt/modules/AdvancedPostProcessing.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,8 @@ def plot_field_from_fieldplot(
328328
):
329329
"""Export a field plot to an image file (JPG or PNG) using Python PyVista.
330330
331+
This method does not support streamlines plot.
332+
331333
.. note::
332334
The PyVista module rebuilds the mesh and the overlap fields on the mesh.
333335
@@ -392,8 +394,6 @@ def plot_field_from_fieldplot(
392394
else:
393395
self.ofieldsreporter.UpdateQuantityFieldsPlots(plot_folder)
394396

395-
if self.field_plots[plot_name].field_type == "DC R/L Fields":
396-
file_format = "fldplt"
397397
file_to_add = self.export_field_plot(plot_name, self._app.working_directory, file_format=file_format)
398398
model = self.get_model_plotter_geometries(
399399
generate_mesh=False,

0 commit comments

Comments
 (0)