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

    Auxiliary class to iterate through triangulated faces. Class is designed to provide an interface for iterating over the faces of a shape, specifically focusing on triangulated faces. It inherits from the RWMesh_ShapeIterator base class and extends its functionality to handle faces with triangulation data. More...

    #include <RWMesh_FaceIterator.hxx>

    Inheritance diagram for RWMesh_FaceIterator:

    Public Member Functions

     RWMesh_FaceIterator (const TDF_Label &theLabel, const TopLoc_Location &theLocation, const bool theToMapColors=false, const XCAFPrs_Style &theStyle=XCAFPrs_Style())
     Main constructor.
     RWMesh_FaceIterator (const TopoDS_Shape &theShape, const XCAFPrs_Style &theStyle=XCAFPrs_Style())
     Auxiliary constructor.
    bool More () const override
     Return true if iterator points to the valid triangulation.
    void Next () override
     Find next value.
    const TopoDS_FaceFace () const
     Return current face.
    const TopoDS_ShapeShape () const override
     Return current face.
    const occ::handle< Poly_Triangulation > & Triangulation () const
     Return current face triangulation.
    bool IsEmptyMesh () const
     Return true if mesh data is defined.
    bool IsEmpty () const override
     Return true if mesh data is defined.
    const XCAFPrs_StyleFaceStyle () const
     Return face material.
    bool HasFaceColor () const
     Return TRUE if face color is set.
    const Quantity_ColorRGBAFaceColor () const
     Return face color.
    int NbTriangles () const
     Return number of elements of specific type for the current face.
    int ElemLower () const override
     Lower element index in current triangulation.
    int ElemUpper () const override
     Upper element index in current triangulation.
    Poly_Triangle TriangleOriented (int theElemIndex) const
     Return triangle with specified index with applied Face orientation.
    bool HasNormals () const
     Return true if triangulation has defined normals.
    bool HasTexCoords () const
     Return true if triangulation has defined normals.
    gp_Dir NormalTransformed (int theNode) const
     Return normal at specified node index with face transformation applied and face orientation applied.
    int NbNodes () const override
     Return number of nodes for the current face.
    int NodeLower () const override
     Lower node index in current triangulation.
    int NodeUpper () const override
     Upper node index in current triangulation.
    gp_Pnt2d NodeTexCoord (const int theNode) const
     Return texture coordinates for the node.
    gp_Pnt node (const int theNode) const override
     Return the node with specified index with applied transformation.
    gp_Dir normal (int theNode) const
     Return normal at specified node index without face transformation applied.
    Poly_Triangle triangle (int theElemIndex) const
     Return triangle with specified index.
    Public Member Functions inherited from RWMesh_ShapeIterator
    const TopoDS_ShapeExploredShape () const
     Return explored shape.
    const XCAFPrs_StyleStyle () const
     Return shape material.
    bool HasColor () const
     Return TRUE if shape color is set.
    const Quantity_ColorRGBAColor () const
     Return shape color.
    gp_Pnt NodeTransformed (const int theNode) const
     Return the node with specified index with applied transformation.

    Additional Inherited Members

    Protected Member Functions inherited from RWMesh_ShapeIterator
     RWMesh_ShapeIterator (const TDF_Label &theLabel, const TopLoc_Location &theLocation, const TopAbs_ShapeEnum theShapeTypeFind, const TopAbs_ShapeEnum theShapeTypeAvoid, const bool theToMapColors=false, const XCAFPrs_Style &theStyle=XCAFPrs_Style())
     Main constructor.
     RWMesh_ShapeIterator (const TopoDS_Shape &theShape, const TopAbs_ShapeEnum theShapeTypeFind, const TopAbs_ShapeEnum theShapeTypeAvoid, const XCAFPrs_Style &theStyle=XCAFPrs_Style())
     Auxiliary constructor.
    void dispatchStyles (const TDF_Label &theLabel, const TopLoc_Location &theLocation, const XCAFPrs_Style &theStyle)
     Dispatch shape styles.
    void resetShape ()
     Reset information for current shape.
    void initShape ()
     Initialize shape properties.
    Protected Attributes inherited from RWMesh_ShapeIterator
    NCollection_DataMap< TopoDS_Shape, XCAFPrs_Style, TopTools_ShapeMapHashermyStyles
     Shape -> Style map.
    XCAFPrs_Style myDefStyle
     default style for shapes without dedicated style
    bool myToMapColors
     flag to dispatch styles
    TopExp_Explorer myIter
     shape explorer
    TopLoc_Location myLocation
     current shape location
    gp_Trsf myTrsf
     current shape transformation
    XCAFPrs_Style myStyle
     current shape style
    Quantity_ColorRGBA myColor
     current shape color
    TopAbs_ShapeEnum myShapeType
     type of shape
    bool myHasColor
     flag indicating that current shape has assigned color

    Detailed Description

    Auxiliary class to iterate through triangulated faces. Class is designed to provide an interface for iterating over the faces of a shape, specifically focusing on triangulated faces. It inherits from the RWMesh_ShapeIterator base class and extends its functionality to handle faces with triangulation data.

    Constructor & Destructor Documentation

    ◆ RWMesh_FaceIterator() [1/2]

    RWMesh_FaceIterator::RWMesh_FaceIterator ( const TDF_Label & theLabel,
    const TopLoc_Location & theLocation,
    const bool theToMapColors = false,
    const XCAFPrs_Style & theStyle = XCAFPrs_Style() )

    Main constructor.

    Parameters
    [in]theLabelLabel containing the face data
    [in]theLocationLocation of the face
    [in]theToMapColorsFlag to indicate if colors should be mapped
    [in]theStyleStyle information for the face

    ◆ RWMesh_FaceIterator() [2/2]

    RWMesh_FaceIterator::RWMesh_FaceIterator ( const TopoDS_Shape & theShape,
    const XCAFPrs_Style & theStyle = XCAFPrs_Style() )

    Auxiliary constructor.

    Parameters
    [in]theShapeShape containing the face data
    [in]theStyleStyle information for the face

    Member Function Documentation

    ◆ ElemLower()

    int RWMesh_FaceIterator::ElemLower ( ) const
    inlineoverridevirtual

    Lower element index in current triangulation.

    Implements RWMesh_ShapeIterator.

    ◆ ElemUpper()

    int RWMesh_FaceIterator::ElemUpper ( ) const
    inlineoverridevirtual

    Upper element index in current triangulation.

    Implements RWMesh_ShapeIterator.

    ◆ Face()

    const TopoDS_Face & RWMesh_FaceIterator::Face ( ) const
    inline

    Return current face.

    ◆ FaceColor()

    const Quantity_ColorRGBA & RWMesh_FaceIterator::FaceColor ( ) const
    inline

    Return face color.

    ◆ FaceStyle()

    const XCAFPrs_Style & RWMesh_FaceIterator::FaceStyle ( ) const
    inline

    Return face material.

    ◆ HasFaceColor()

    bool RWMesh_FaceIterator::HasFaceColor ( ) const
    inline

    Return TRUE if face color is set.

    ◆ HasNormals()

    bool RWMesh_FaceIterator::HasNormals ( ) const
    inline

    Return true if triangulation has defined normals.

    ◆ HasTexCoords()

    bool RWMesh_FaceIterator::HasTexCoords ( ) const
    inline

    Return true if triangulation has defined normals.

    ◆ IsEmpty()

    bool RWMesh_FaceIterator::IsEmpty ( ) const
    inlineoverridevirtual

    Return true if mesh data is defined.

    Implements RWMesh_ShapeIterator.

    ◆ IsEmptyMesh()

    bool RWMesh_FaceIterator::IsEmptyMesh ( ) const
    inline

    Return true if mesh data is defined.

    ◆ More()

    bool RWMesh_FaceIterator::More ( ) const
    inlineoverridevirtual

    Return true if iterator points to the valid triangulation.

    Implements RWMesh_ShapeIterator.

    ◆ NbNodes()

    int RWMesh_FaceIterator::NbNodes ( ) const
    inlineoverridevirtual

    Return number of nodes for the current face.

    Implements RWMesh_ShapeIterator.

    ◆ NbTriangles()

    int RWMesh_FaceIterator::NbTriangles ( ) const
    inline

    Return number of elements of specific type for the current face.

    ◆ Next()

    void RWMesh_FaceIterator::Next ( )
    overridevirtual

    Find next value.

    Implements RWMesh_ShapeIterator.

    ◆ node()

    gp_Pnt RWMesh_FaceIterator::node ( const int theNode) const
    inlineoverridevirtual

    Return the node with specified index with applied transformation.

    Implements RWMesh_ShapeIterator.

    ◆ NodeLower()

    int RWMesh_FaceIterator::NodeLower ( ) const
    inlineoverridevirtual

    Lower node index in current triangulation.

    Implements RWMesh_ShapeIterator.

    ◆ NodeTexCoord()

    gp_Pnt2d RWMesh_FaceIterator::NodeTexCoord ( const int theNode) const
    inline

    Return texture coordinates for the node.

    ◆ NodeUpper()

    int RWMesh_FaceIterator::NodeUpper ( ) const
    inlineoverridevirtual

    Upper node index in current triangulation.

    Implements RWMesh_ShapeIterator.

    ◆ normal()

    gp_Dir RWMesh_FaceIterator::normal ( int theNode) const

    Return normal at specified node index without face transformation applied.

    ◆ NormalTransformed()

    gp_Dir RWMesh_FaceIterator::NormalTransformed ( int theNode) const
    inline

    Return normal at specified node index with face transformation applied and face orientation applied.

    ◆ Shape()

    const TopoDS_Shape & RWMesh_FaceIterator::Shape ( ) const
    inlineoverridevirtual

    Return current face.

    Implements RWMesh_ShapeIterator.

    ◆ triangle()

    Poly_Triangle RWMesh_FaceIterator::triangle ( int theElemIndex) const
    inline

    Return triangle with specified index.

    ◆ TriangleOriented()

    Poly_Triangle RWMesh_FaceIterator::TriangleOriented ( int theElemIndex) const
    inline

    Return triangle with specified index with applied Face orientation.

    ◆ Triangulation()

    const occ::handle< Poly_Triangulation > & RWMesh_FaceIterator::Triangulation ( ) const
    inline

    Return current face triangulation.


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