OCCT3D OCCT 8.0.1
OCCT documentation

Search guides and API reference

Enter at least two characters.

    Open CASCADE Technology Reference Manual 8.0.1
    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.
    bool & ASCIIMode ()
     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.
    bool Write (const TopoDS_Shape &theShape, const char *const theFileName, const Message_ProgressRange &theProgress=Message_ProgressRange())
     Converts a given shape to STL format and writes it to file with a given filename.
    bool Write (const TopoDS_Shape &theShape, Standard_OStream &theStream, const Message_ProgressRange &theProgress=Message_ProgressRange())
     Converts a given shape to STL format and writes it to the specified stream.

    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()

    bool & 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() [1/2]

    bool StlAPI_Writer::Write ( const TopoDS_Shape & theShape,
    const char *const 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.

    ◆ Write() [2/2]

    bool StlAPI_Writer::Write ( const TopoDS_Shape & theShape,
    Standard_OStream & theStream,
    const Message_ProgressRange & theProgress = Message_ProgressRange() )

    Converts a given shape to STL format and writes it to the specified stream.

    Returns
    the error state.

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