pyaedt.modules.AdvancedPostProcessing.ModelPlotter

class pyaedt.modules.AdvancedPostProcessing.ModelPlotter[source]

Class that manage the plot data.

Examples

This Class can be instantiated within Pyaedt (with plot_model_object or different field plots and standalone. Here an example of standalone project

>>> model = ModelPlotter()
>>> model.add_object(r'D:\Simulationntenna.obj', (200,20,255), 0.6, "in")
>>> model.add_object(r'D:\Simulation\helix.obj', (0,255,0), 0.5, "in")
>>> model.add_field_from_file(r'D:\Simulation\helic_antenna.csv', True, "meter", 1)
>>> model.background_color = (0,0,0)
>>> model.plot()

And here an example of animation:

>>> model = ModelPlotter()
>>> model.add_object(r'D:\Simulationntenna.obj', (200,20,255), 0.6, "in")
>>> model.add_object(r'D:\Simulation\helix.obj', (0,255,0), 0.5, "in")
>>> frames = [r'D:\Simulation\helic_antenna.csv', r'D:\Simulation\helic_antenna_10.fld',
...           r'D:\Simulation\helic_antenna_20.fld', r'D:\Simulation\helic_antenna_30.fld',
...           r'D:\Simulation\helic_antenna_40.fld']
>>> model.gif_file = r"D:\Simulationnimation.gif"
>>> model.animate()

Methods

ModelPlotter.add_field_from_data(...[, ...])

Add field data to the scenario.

ModelPlotter.add_field_from_file(field_path)

Add a field file to the scenario.

ModelPlotter.add_frames_from_file(field_files)

Add a field file to the scenario.

ModelPlotter.add_object(cad_path[, ...])

Add an mesh file to the scenario.

ModelPlotter.animate()

Animate the current field plot.

ModelPlotter.clean_cache_and_files([...])

Clean downloaded files, and, on demand, also the cached meshes.

ModelPlotter.plot([export_image_path])

Plot the current available Data.

ModelPlotter.set_orientation([...])

Change the plot default orientation.

Attributes

ModelPlotter.azimuth_angle

Get/Set the azimuth angle value.

ModelPlotter.background_color

Get/Set Backgroun Color.

ModelPlotter.camera_position

Get/Set the camera position value.

ModelPlotter.elevation_angle

Get/Set the elevation angle value.

ModelPlotter.fields

List of fields object.

ModelPlotter.focal_point

Get/Set the camera focal point value.

ModelPlotter.frames

Frames list for animation.

ModelPlotter.isometric_view

Enable or disable the default iso view.

ModelPlotter.objects

List of class objects.

ModelPlotter.roll_angle

Get/Set the roll angle value.

ModelPlotter.view_up

Get/Set the camera view axis.

ModelPlotter.zoom

Get/Set the zoom value.