Open CASCADE Technology 7.8.2.dev
StlAPI_Writer Class Reference

This class creates and writes STL files from Open CASCADE shapes. An STL file can be written to an existing STL file or to a new one. More...

#include <StlAPI_Writer.hxx>

Public Member Functions

 StlAPI_Writer ()
 Creates a writer object with default parameters: ASCIIMode.
 
Standard_BooleanASCIIMode ()
 Returns the address to the flag defining the mode for writing the file. This address may be used to either read or change the flag. If the mode returns True (default value) the generated file is an ASCII file. If the mode returns False, the generated file is a binary file.
 
Standard_Boolean Write (const TopoDS_Shape &theShape, const Standard_CString theFileName, const Message_ProgressRange &theProgress=Message_ProgressRange())
 Converts a given shape to STL format and writes it to file with a given filename.
 

Detailed Description

This class creates and writes STL files from Open CASCADE shapes. An STL file can be written to an existing STL file or to a new one.

Constructor & Destructor Documentation

◆ StlAPI_Writer()

StlAPI_Writer::StlAPI_Writer ( )

Creates a writer object with default parameters: ASCIIMode.

Member Function Documentation

◆ ASCIIMode()

Standard_Boolean & StlAPI_Writer::ASCIIMode ( )
inline

Returns the address to the flag defining the mode for writing the file. This address may be used to either read or change the flag. If the mode returns True (default value) the generated file is an ASCII file. If the mode returns False, the generated file is a binary file.

◆ Write()

Standard_Boolean StlAPI_Writer::Write ( const TopoDS_Shape & theShape,
const Standard_CString theFileName,
const Message_ProgressRange & theProgress = Message_ProgressRange() )

Converts a given shape to STL format and writes it to file with a given filename.

Returns
the error state.

The documentation for this class was generated from the following file: