pysdic.Plotter3D#

The pysdic.Plotter3D displays the geometrical objects of pysdic (pysdic.PointCloud, pysdic.Mesh and pysdic.IntegrationPoints) with pyvista.

Important

Requires the optional package pyvista (pip install pyvista). Use Plotter3D.is_available() to check it.

Plotter3D class#

class Plotter3D(*args, **kwargs)[source]#

Bases: RequiresOptionalMixin

A plotter for the geometrical objects of pysdic (pysdic.PointCloud, pysdic.Mesh and pysdic.IntegrationPoints), based on pyvista.

Important

Requires the optional package pyvista (pip install pyvista): an ImportError is raised when the class is instantiated without it. Use Plotter3D.is_available() to check it.

Instantiation#

The Plotter3D class takes no argument: plotter = Plotter3D(). The objects are added with the add_* methods and displayed with show().

Implemented methods and attributes#

The following sections provide an overview of the attributes and methods defined in the pysdic.Plotter3D class.

Attributes#

Plotter3D.plotter

[Get] the internal pyvista.Plotter object used for plotting.

Adding objects#

Plotter3D.add_point_cloud(point_cloud, *[, ...])

Add a point cloud to the plotter (only for \(E \leq 3\), the missing coordinates are set to 0).

Plotter3D.add_mesh(mesh, *[, warp_by, ...])

Add a mesh to the plotter (only for \(E \leq 3\), the missing coordinates are set to 0).

Plotter3D.add_integration_points(...[, ...])

Add integration points to the plotter, at their global coordinates in a mesh (see pysdic.Mesh.compute_integration_points_coordinates()).

Plotter3D.add_scalar_bar(*[, title, width, ...])

Add a scalar bar to the plotter for visualizing scalar properties.

Plotter3D.add_axes(*[, size, line_width, ...])

Add an orientation widget showing the X, Y and Z axes in the bottom left corner of the plotter.

Scene settings and display#

Plotter3D.set_title(title, *[, font_size, ...])

Add a title to the plotter.

Plotter3D.set_bounds([bounds, grid, ticks, ...])

Show bounds on the plotter for visualizing the axes and grid.

Plotter3D.set_camera([position, ...])

Set the camera position for the plotter.

Plotter3D.clear()

Clear the plotter of all geometrical objects and reset the view.

Plotter3D.show(*[, screenshot])

Show the plotter with the added geometrical objects.