Skip to content

read_mesh builtin

read_mesh(path, *, length_unit=None)

Reads a .obj, .stl, .dxf, .ply, .off or .msh mesh.

Parameters:

Name Type Description Default
path str or Path

The file. OBJ g groups become a face column group when the file has any. PLY (ASCII or binary) vertex and face properties other than positions and vertex indices become float columns, NaN as null. Gmsh MSH (4.1 ASCII or binary, 2.2 ASCII) reads triangles and quadrangles, physical groups as a face column physical and node and element data as float columns, one per component, null where the data has no value. DXF reads 3DFACE, polyface POLYLINE and MESH (level-0 cage, ASCII files only) entities as triangles with a face column layer; MESH faces come last.

required

Returns:

Type Description
Mesh

Used in