pyvista.Rectangle#

Rectangle(points=None)[source]#

Create a rectangle defined by 3 points.

Deprecated since version 0.39.0: To deal with more than 3 points use pyvista.Quadrilateral() instead.

The 3 points must define an orthogonal set of vectors.

Parameters:
pointsarray_like[float], optional

Points of the rectangle. Defaults to a unit square in xy-plane.

Returns:
pyvista.PolyData

Rectangle mesh.

Examples

>>> import pyvista
>>> pointa = [1.0, 0.0, 0.0]
>>> pointb = [1.0, 1.0, 0.0]
>>> pointc = [0.0, 1.0, 0.0]
>>> rectangle = pyvista.Rectangle([pointa, pointb, pointc])
>>> rectangle.plot(show_edges=True, line_width=5)
https://d33wubrfki0l68.cloudfront.net/f238e7794e5eb5871096e001ad61218d9e4a1ebc/829dd/_images/pyvista-rectangle-1_00_00.png