m3sh.hds.Mesh.

read#

classmethod Mesh.read(filename, *args, quiet=False)#

Read mesh from file.

Changed in version 1.1.0: Added support for OFF files.

Read mesh combinatorics and vertex coordinates from file.

Parameters:
filenamestr

File to read from. Currently supports OBJ and OFF file formats.

*args

Variable number of arguments of type str. Not all file formats support additional arguments.

quietbool, optional

Suppress console output if True.

Returns:
meshMesh

Mesh instance. Reading fails if mesh combinatorics do not represent an orientable manifold surface mesh.

data

Data blocks of type ndarray as requested via args. If a data block could not be read, None is returned in its place.

See also

from_OBJ

read from OBJ file

from_OFF

read from OFF file