BasicTools.IO.StlWriter module
Stl file writer
- class BasicTools.IO.StlWriter.StlWriter[source]
Bases:
WriterBaseClass to write Unstructured surface mesh on disk in the stl format file
- SetFileName(fileName)[source]
Sets the name of the file to read
- Parameters:
fileName (str) – name of the file to read
- Write(meshObject, normals=None, Name=None, PointFieldsNames=None, PointFields=None, CellFieldsNames=None, CellFields=None, GridFieldsNames=None, GridFields=None)[source]
Write mesh to file in stl format
- Parameters:
meshObject (UnstructuredMesh) – 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 (None) – Not Used, by default None
PointFields (None) – Not Used, by default None
CellFieldsNames (None) – Not Used, by default None
CellFields (None) – Not Used, by default None
GridFieldsNames (None) – Not Used, by default None
GridFields (None) – Not Used, by default None
- BasicTools.IO.StlWriter.WriteMeshToStl(filename, mesh, normals=None)[source]
Function 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 (UnstructuredMesh) – the mesh to be exported
normals (np.ndarray, optional) – containing the normal at each element of the surface, by default None