Rectangle#
- Rectangle(points=None)[source]#
Create a rectangle defined by 4 points.
- Parameters:
- pointssequence,
optional
Points of the rectangle. Defaults to a simple example.
- pointssequence,
- 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] >>> pointd = [0.0, 0.0, 0.0] >>> rectangle = pyvista.Rectangle([pointa, pointb, pointc, pointd]) >>> rectangle.plot(show_edges=True, line_width=5)