pyvista_wasm.Plane

Contents

pyvista_wasm.Plane#

pyvista_wasm.Plane(center: tuple[float, float, float] = (0.0, 0.0, 0.0), direction: tuple[float, float, float] = (0.0, 0.0, 1.0), i_size: float = 1.0, j_size: float = 1.0, i_resolution: int = 10, j_resolution: int = 10) PolyData#

Create a plane mesh.

This mirrors the pyvista.Plane() API, producing a flat rectangular mesh oriented according to the given normal direction.

Parameters:
  • center (tuple, optional) – Center of the plane (x, y, z). Default is (0, 0, 0).

  • direction (tuple, optional) – Normal direction of the plane (x, y, z). Default is (0, 0, 1).

  • i_size (float, optional) – Size in the i (first) direction. Default is 1.0.

  • j_size (float, optional) – Size in the j (second) direction. Default is 1.0.

  • i_resolution (int, optional) – Number of subdivisions in the i direction. Default is 10.

  • j_resolution (int, optional) – Number of subdivisions in the j direction. Default is 10.

Returns:

A plane mesh.

Return type:

PolyData

Examples

>>> import pyvista_wasm as pv
>>> plane = pv.Plane()
>>> plane.n_points
121
>>> plane.plot()