sgio.create_pyvista_plotter#
- sgio.create_pyvista_plotter(mesh: SGMesh, *, scalars: str | None = None, show_edges: bool = True, show_local_axes: bool = False, max_local_axes: int = 500, local_axis_scale: float | None = None) pyvista.Plotter#
Create an interactive PyVista scene for an
SGMesh.- Parameters:
mesh (SGMesh) – Mesh to render.
scalars (str, optional) – Point- or cell-data array used to color the mesh.
show_edges (bool, optional) – Show mesh edges. Default is
True.show_local_axes (bool, optional) – Overlay red
y1, greeny2, and bluey3element axes.max_local_axes (int, optional) – Maximum number of cells receiving local-axis glyphs. Sampling is deterministic and evenly distributed. Default is 500.
local_axis_scale (float, optional) – Glyph length in mesh coordinate units. If omitted, the length is 2.5% of the mesh bounding-box diagonal.
- Returns:
Scene ready for caller-controlled
show(), screenshots, or HTML export.- Return type:
pyvista.Plotter
- Raises:
ImportError – If the optional
pyvistadependency is not installed.TypeError – If
meshis not anSGMesh.ValueError – If
scalarsdoes not name a renderable array, or local-axis options are invalid.