ibfoamrig.io.read_stl#
- ibfoamrig.io.read_stl(path)[source]#
Reads the triangles of an STL file.
The format is detected from the file size. A file whose size matches the triangle count in a binary header is read as binary, anything else as ASCII.
- Parameters:
path (StrPath) – Path to the STL.
- Returns:
Vertex coordinates with shape
(n, 3, 3).ntriangles of three vertices withx, y, zeach.- Raises:
FileNotFoundError – If the file does not exist.
FoamParseError – If the file holds no triangles or a malformed vertex.
- Return type: