pyvista.Cone

Contents

pyvista.Cone#

Cone(
center=(0.0, 0.0, 0.0),
direction=(1.0, 0.0, 0.0),
height=1.0,
radius=None,
capping=True,
angle=None,
resolution=6,
)[source]#

Create a cone.

Parameters:
centersequence[float], default: (0.0, 0.0, 0.0)

Center in [x, y, z]. Axis of the cone passes through this point.

directionsequence[float], default: (1.0, 0.0, 0.0)

Direction vector in [x, y, z]. Orientation vector of the cone.

heightfloat, default: 1.0

Height along the cone in its specified direction.

radiusfloat, optional

Base radius of the cone.

cappingbool, optional

Enable or disable the capping the base of the cone with a polygon.

anglefloat, optional

The angle in degrees between the axis of the cone and a generatrix.

resolutionint, default: 6

Number of facets used to represent the cone.

Returns:
pyvista.PolyData

Cone mesh.

Examples

Create a default Cone.

>>> import pyvista as pv
>>> mesh = pv.Cone()
>>> mesh.plot(show_edges=True, line_width=5)
../../../_images/pyvista-Cone-1_00_00.png