plot#

PrimePlotter.plot(plottable_object, scope=None, name_filter=None, update=False, **plotting_options)#

Add an object to the plotter.

Allowed types are PyPrime models or any PyVista plottable object.

Parameters:
plottable_objectAny

Object to add to the plotter.

scopeprime.ScopeDefinition, default: None

Scope to plot.

name_filterstr, default: None

Regular expression with the desired name or names to include in the plotter.

update: bool, default: False

Whether to update the display. Required when any mesh is updated.

**plotting_optionsdict, default: None

Keyword arguments. For allowable keyword arguments, see the Plotter.add_mesh method. Options only applied to PyVista plottable objects.

Examples

>>> import pyvista as pv
>>> from ansys.meshing.prime.graphics import PrimePlotter
>>> import ansys.meshing.prime as prime
>>> model = prime.launch_prime().model
>>> prime.lucid.Mesh(model).read(prime.examples.download_block_model_fmd())
>>> scope = prime.ScopeDefinition(model, label_expression="my_group")
>>> plotter = PrimePlotter()
>>> # pyvista sphere with plotting options added for opacity and color
>>> plotter.plot(plottable_object=pv.Sphere(radius=2.0), opacity=0.5, color="red")
>>> plotter.plot(plottable_object=model, scope=scope)
>>> plotter.show()

Examples using PrimePlotter.plot#

Convert data when importing and exporting mesh and CAD formats

Convert data when importing and exporting mesh and CAD formats

Mesh a mid-surfaced bracket for a structural analysis

Mesh a mid-surfaced bracket for a structural analysis

Mesh a mixing elbow for a flow analysis

Mesh a mixing elbow for a flow analysis

Mesh a pipe T-section for structural thermal and fluid flow analysis

Mesh a pipe T-section for structural thermal and fluid flow analysis

Wrap a toy car for a flow analysis

Wrap a toy car for a flow analysis

Mesh a PCB for structural thermal analysis

Mesh a PCB for structural thermal analysis

Morph a hexahedral mesh of a turbine blade to a new shape

Morph a hexahedral mesh of a turbine blade to a new shape

Mesh a saddle bracket for a structural analysis

Mesh a saddle bracket for a structural analysis

Mesh a generic F1 car rear wing for external aero simulation

Mesh a generic F1 car rear wing for external aero simulation

Mesh a generic PCB geometry with multiple hexa layers

Mesh a generic PCB geometry with multiple hexa layers

Create a contact patch for wrapping between a wheel and ground interface

Create a contact patch for wrapping between a wheel and ground interface

Mesh a set of solder balls (beta)

Mesh a set of solder balls (beta)

Add a new example

Add a new example