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

    Reading from stereolithography format. Reads STL file and creates a shape composed of triangular faces, one per facet. IMPORTANT: This approach is very inefficient, especially for large files. IMPORTANT: Consider reading STL file to Poly_Triangulation object instead (see class RWStl). More...

    #include <StlAPI_Reader.hxx>

    Public Member Functions

    bool Read (TopoDS_Shape &theShape, const char *const theFileName)
     Reads STL file to the TopoDS_Shape (each triangle is converted to the face).
    bool Read (TopoDS_Shape &theShape, Standard_IStream &theStream)
     Reads STL data from stream to the TopoDS_Shape (each triangle is converted to the face).

    Detailed Description

    Reading from stereolithography format. Reads STL file and creates a shape composed of triangular faces, one per facet. IMPORTANT: This approach is very inefficient, especially for large files. IMPORTANT: Consider reading STL file to Poly_Triangulation object instead (see class RWStl).

    Member Function Documentation

    ◆ Read() [1/2]

    bool StlAPI_Reader::Read ( TopoDS_Shape & theShape,
    const char *const theFileName )

    Reads STL file to the TopoDS_Shape (each triangle is converted to the face).

    Returns
    True if reading is successful

    ◆ Read() [2/2]

    bool StlAPI_Reader::Read ( TopoDS_Shape & theShape,
    Standard_IStream & theStream )

    Reads STL data from stream to the TopoDS_Shape (each triangle is converted to the face).

    Parameters
    theShaperesult shape
    theStreamstream to read from
    Returns
    True if reading is successful

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