Muscat.IO.StlWriter module

CheckIntegrity() str[source]
class StlWriter[source]

Bases: WriterBase

Class to write Unstructured surface mesh on disk in the stl format file

Close() None[source]

Close the output file

SetFileName(fileName: str | None) None[source]

Sets the name of the file to read

Parameters:

fileName (str) – name of the file to read

Write(mesh: Mesh, normals: ndarray | None = None, Name: str | None = None, PointFieldsNames: List[str] | None = None, PointFields: List[ndarray] | None = None, CellFieldsNames: List[str] | None = None, CellFields: List[ndarray] | None = None, GridFieldsNames: List[str] | None = None, GridFields: List[ndarray] | None = None) None[source]

Write mesh to file in stl format

Parameters:
  • mesh (Mesh) – the mesh to be written

  • normals (np.ndarray, optional) – containing the normal at each element of the surface, by default None

  • Name (str, optional) – name of the surface to write, by default None

  • PointFieldsNames (List[str]) – Not Used, by default None

  • PointFields (None) – Not Used, by default None

  • CellFieldsNames (List[str]) – Not Used, by default None

  • CellFields (List[np.ndarray]) – Not Used, by default None

  • GridFieldsNames (List[str]) – Not Used, by default None

  • GridFields (List[Number]) – Not Used, by default None

WriteMeshToStl(filename: str, mesh: Mesh, normals: ndarray | None = None) None[source]

Functional API for writing mesh in the stl format file.

Parameters:
  • filename (str) – name with path to the file to be created (relative or absolute)

  • mesh (Mesh) – the mesh to be exported

  • normals (np.ndarray, optional) – containing the normal at each element of the surface, by default None