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). n triangles of three vertices with x, y, z each.

Raises:
Return type:

ndarray[tuple[Any, …], dtype[float64]]