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_object
Any Object to add to the plotter.
- scope
prime.ScopeDefinition, default:None Scope to plot.
- name_filter
str, 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_options
dict, default:None Keyword arguments. For allowable keyword arguments, see the
Plotter.add_meshmethod. Options only applied to PyVista plottable objects.
- plottable_object
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
Mesh a mid-surfaced bracket for a structural analysis
Mesh a pipe T-section for structural thermal and fluid flow analysis
Morph a hexahedral mesh of a turbine blade to a new shape
Mesh a generic F1 car rear wing for external aero simulation
Mesh a generic PCB geometry with multiple hexa layers
Create a contact patch for wrapping between a wheel and ground interface