pyvista.OBJReader#

class OBJReader(*args, **kwargs)[source]#

OBJ Reader for reading .obj files.

Examples

>>> import pyvista
>>> from pyvista import examples
>>> filename = examples.download_trumpet(load=False)
>>> filename.split("/")[-1]  # omit the path
'trumpet.obj'
>>> reader = pyvista.get_reader(filename)
>>> mesh = reader.read()
>>> mesh.plot(cpos='yz', show_scalar_bar=False)
../../../_images/pyvista-OBJReader-1_00_00.png

Methods

OBJReader.hide_progress()

Hide the progress bar when loading the file.

OBJReader.read()

Read data in file.

OBJReader.show_progress([msg])

Show a progress bar when loading the file.

Attributes

OBJReader.path

Return or set the filename or directory of the reader.

OBJReader.reader

Return the vtk Reader object.