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
    RWStl Class Reference

    This class provides methods to read and write triangulation from / to the STL files. More...

    #include <RWStl.hxx>

    Static Public Member Functions

    static bool WriteBinary (const occ::handle< Poly_Triangulation > &theMesh, const OSD_Path &thePath, const Message_ProgressRange &theProgress=Message_ProgressRange())
     Write triangulation to binary STL file. binary format of an STL file. Returns false if the cannot be opened;.
    static bool WriteBinary (const occ::handle< Poly_Triangulation > &theMesh, Standard_OStream &theStream, const Message_ProgressRange &theProgress=Message_ProgressRange())
     Write triangulation to binary STL stream.
    static bool WriteAscii (const occ::handle< Poly_Triangulation > &theMesh, const OSD_Path &thePath, const Message_ProgressRange &theProgress=Message_ProgressRange())
     write the meshing in a file following the Ascii format of an STL file. Returns false if the cannot be opened;
    static bool WriteAscii (const occ::handle< Poly_Triangulation > &theMesh, Standard_OStream &theStream, const Message_ProgressRange &theProgress=Message_ProgressRange())
     Write triangulation to ASCII STL stream.
    static occ::handle< Poly_TriangulationReadFile (const OSD_Path &theFile, const Message_ProgressRange &theProgress=Message_ProgressRange())
     Read specified STL file and returns its content as triangulation. In case of error, returns Null handle.
    static occ::handle< Poly_TriangulationReadFile (const char *const theFile, const Message_ProgressRange &theProgress=Message_ProgressRange())
     Read specified STL file and returns its content as triangulation. In case of error, returns Null handle.
    static occ::handle< Poly_TriangulationReadFile (const char *const theFile, const double theMergeAngle, const Message_ProgressRange &theProgress=Message_ProgressRange())
     Read specified STL file and returns its content as triangulation.
    static void ReadFile (const char *const theFile, const double theMergeAngle, NCollection_Sequence< occ::handle< Poly_Triangulation > > &theTriangList, const Message_ProgressRange &theProgress=Message_ProgressRange())
     Read specified STL file and fills triangulation list for multi-domain case.
    static occ::handle< Poly_TriangulationReadBinary (const OSD_Path &thePath, const Message_ProgressRange &theProgress=Message_ProgressRange())
     Read triangulation from a binary STL file In case of error, returns Null handle.
    static occ::handle< Poly_TriangulationReadAscii (const OSD_Path &thePath, const Message_ProgressRange &theProgress=Message_ProgressRange())
     Read triangulation from an Ascii STL file In case of error, returns Null handle.
    static occ::handle< Poly_TriangulationReadBinaryStream (Standard_IStream &theStream, const double theMergeAngle=M_PI/2.0, const Message_ProgressRange &theProgress=Message_ProgressRange())
     Read triangulation from binary STL stream In case of error, returns Null handle.
    static occ::handle< Poly_TriangulationReadAsciiStream (Standard_IStream &theStream, const double theMergeAngle=M_PI/2.0, const Message_ProgressRange &theProgress=Message_ProgressRange())
     Read triangulation from ASCII STL stream In case of error, returns Null handle.
    static occ::handle< Poly_TriangulationReadStream (Standard_IStream &theStream, const double theMergeAngle=M_PI/2.0, const Message_ProgressRange &theProgress=Message_ProgressRange())
     Read STL data from stream (auto-detects ASCII vs Binary) In case of error, returns Null handle.

    Detailed Description

    This class provides methods to read and write triangulation from / to the STL files.

    Member Function Documentation

    ◆ ReadAscii()

    occ::handle< Poly_Triangulation > RWStl::ReadAscii ( const OSD_Path & thePath,
    const Message_ProgressRange & theProgress = Message_ProgressRange() )
    static

    Read triangulation from an Ascii STL file In case of error, returns Null handle.

    ◆ ReadAsciiStream()

    occ::handle< Poly_Triangulation > RWStl::ReadAsciiStream ( Standard_IStream & theStream,
    const double theMergeAngle = M_PI/2.0,
    const Message_ProgressRange & theProgress = Message_ProgressRange() )
    static

    Read triangulation from ASCII STL stream In case of error, returns Null handle.

    ◆ ReadBinary()

    occ::handle< Poly_Triangulation > RWStl::ReadBinary ( const OSD_Path & thePath,
    const Message_ProgressRange & theProgress = Message_ProgressRange() )
    static

    Read triangulation from a binary STL file In case of error, returns Null handle.

    ◆ ReadBinaryStream()

    occ::handle< Poly_Triangulation > RWStl::ReadBinaryStream ( Standard_IStream & theStream,
    const double theMergeAngle = M_PI/2.0,
    const Message_ProgressRange & theProgress = Message_ProgressRange() )
    static

    Read triangulation from binary STL stream In case of error, returns Null handle.

    ◆ ReadFile() [1/4]

    occ::handle< Poly_Triangulation > RWStl::ReadFile ( const char *const theFile,
    const double theMergeAngle,
    const Message_ProgressRange & theProgress = Message_ProgressRange() )
    static

    Read specified STL file and returns its content as triangulation.

    Parameters
    [in]theFilefile path to read
    [in]theMergeAnglemaximum angle in radians between triangles to merge equal nodes; M_PI/2 means ignore angle
    [in]theProgressprogress indicator
    Returns
    result triangulation or NULL in case of error

    ◆ ReadFile() [2/4]

    void RWStl::ReadFile ( const char *const theFile,
    const double theMergeAngle,
    NCollection_Sequence< occ::handle< Poly_Triangulation > > & theTriangList,
    const Message_ProgressRange & theProgress = Message_ProgressRange() )
    static

    Read specified STL file and fills triangulation list for multi-domain case.

    Parameters
    [in]theFilefile path to read
    [in]theMergeAnglemaximum angle in radians between triangles to merge equal nodes; M_PI/2 means ignore angle
    [out]theTriangListtriangulation list for multi-domain case
    [in]theProgressprogress indicator

    ◆ ReadFile() [3/4]

    occ::handle< Poly_Triangulation > RWStl::ReadFile ( const char *const theFile,
    const Message_ProgressRange & theProgress = Message_ProgressRange() )
    inlinestatic

    Read specified STL file and returns its content as triangulation. In case of error, returns Null handle.

    ◆ ReadFile() [4/4]

    occ::handle< Poly_Triangulation > RWStl::ReadFile ( const OSD_Path & theFile,
    const Message_ProgressRange & theProgress = Message_ProgressRange() )
    static

    Read specified STL file and returns its content as triangulation. In case of error, returns Null handle.

    ◆ ReadStream()

    occ::handle< Poly_Triangulation > RWStl::ReadStream ( Standard_IStream & theStream,
    const double theMergeAngle = M_PI/2.0,
    const Message_ProgressRange & theProgress = Message_ProgressRange() )
    static

    Read STL data from stream (auto-detects ASCII vs Binary) In case of error, returns Null handle.

    ◆ WriteAscii() [1/2]

    bool RWStl::WriteAscii ( const occ::handle< Poly_Triangulation > & theMesh,
    const OSD_Path & thePath,
    const Message_ProgressRange & theProgress = Message_ProgressRange() )
    static

    write the meshing in a file following the Ascii format of an STL file. Returns false if the cannot be opened;

    ◆ WriteAscii() [2/2]

    bool RWStl::WriteAscii ( const occ::handle< Poly_Triangulation > & theMesh,
    Standard_OStream & theStream,
    const Message_ProgressRange & theProgress = Message_ProgressRange() )
    static

    Write triangulation to ASCII STL stream.

    ◆ WriteBinary() [1/2]

    bool RWStl::WriteBinary ( const occ::handle< Poly_Triangulation > & theMesh,
    const OSD_Path & thePath,
    const Message_ProgressRange & theProgress = Message_ProgressRange() )
    static

    Write triangulation to binary STL file. binary format of an STL file. Returns false if the cannot be opened;.

    ◆ WriteBinary() [2/2]

    bool RWStl::WriteBinary ( const occ::handle< Poly_Triangulation > & theMesh,
    Standard_OStream & theStream,
    const Message_ProgressRange & theProgress = Message_ProgressRange() )
    static

    Write triangulation to binary STL stream.


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