pyvista.PlatonicSolidSource

pyvista.PlatonicSolidSource#

class PlatonicSolidSource(kind='tetrahedron')[source]#

Platonic solid source algorithm class.

Added in version 0.44.0.

Parameters:
kindstr | int, default: ‘tetrahedron’

The kind of Platonic solid to create. Either the name of the polyhedron or an integer index:

  • 'tetrahedron' or 0

  • 'cube' or 1

  • 'octahedron' or 2

  • 'icosahedron' or 3

  • 'dodecahedron' or 4

Examples

Create and plot a dodecahedron.

>>> import pyvista as pv
>>> dodeca = pv.PlatonicSolidSource('dodecahedron')
>>> dodeca.output.plot(categories=True)
../../../_images/pyvista-PlatonicSolidSource-1_00_00.png

See Platonic Solids for more examples using this filter.

Methods

Attributes

PlatonicSolidSource.kind

Get the kind of Platonic solid to create.

PlatonicSolidSource.output

Get the output data object for a port on this algorithm.