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

    Document iterator through shape nodes. More...

    #include <XCAFPrs_DocumentExplorer.hxx>

    string identification tools

    Construct a unique string identifier for the given label. The identifier is a concatenation of label entries (TDF_Tool::Entry() with tailing '.') of hierarchy from parent to child joined via '/' and looking like this:

    0:1:1:1./0:1:1:1:9./0:1:1:5:7.

    This generation scheme also allows finding originating labels using TDF_Tool::Label(). The tailing dot simplifies parent equality check.

    Parameters
    theLabelchild label to define id
    theParentIdparent string identifier defined by this method
    occ::handle< XCAFDoc_ColorToolmyColorTool
     color tool
    occ::handle< XCAFDoc_VisMaterialToolmyVisMatTool
     visual material tool
    NCollection_Sequence< TDF_LabelmyRoots
     sequence of root labels
    NCollection_Sequence< TDF_Label >::Iterator myRootIter
     current root label
    NCollection_DynamicArray< XCAFPrs_DocumentNodemyNodeStack
     node stack
    int myTop
     top position in the node stack
    bool myHasMore
     global flag indicating that iterator points to the label
    XCAFPrs_Style myDefStyle
     default style
    XCAFPrs_DocumentNode myCurrent
     current label info
    XCAFPrs_DocumentExplorerFlags myFlags
     iteration flags
    static TCollection_AsciiString DefineChildId (const TDF_Label &theLabel, const TCollection_AsciiString &theParentId)
     color tool
    static TDF_Label FindLabelFromPathId (const occ::handle< TDocStd_Document > &theDocument, const TCollection_AsciiString &theId, TopLoc_Location &theParentLocation, TopLoc_Location &theLocation)
     Find a shape entity based on a text identifier constructed from OCAF labels defining full path.
    static TDF_Label FindLabelFromPathId (const occ::handle< TDocStd_Document > &theDocument, const TCollection_AsciiString &theId, TopLoc_Location &theLocation)
     Find a shape entity based on a text identifier constructed from OCAF labels defining full path.
    static TopoDS_Shape FindShapeFromPathId (const occ::handle< TDocStd_Document > &theDocument, const TCollection_AsciiString &theId)
     Find a shape entity based on a text identifier constructed from OCAF labels defining full path.
     XCAFPrs_DocumentExplorer ()
     Empty constructor.
     XCAFPrs_DocumentExplorer (const occ::handle< TDocStd_Document > &theDocument, const XCAFPrs_DocumentExplorerFlags theFlags, const XCAFPrs_Style &theDefStyle=XCAFPrs_Style())
     Constructor for exploring the whole document.
     XCAFPrs_DocumentExplorer (const occ::handle< TDocStd_Document > &theDocument, const NCollection_Sequence< TDF_Label > &theRoots, const XCAFPrs_DocumentExplorerFlags theFlags, const XCAFPrs_Style &theDefStyle=XCAFPrs_Style())
     Constructor for exploring specified list of root shapes in the document.
    void Init (const occ::handle< TDocStd_Document > &theDocument, const TDF_Label &theRoot, const XCAFPrs_DocumentExplorerFlags theFlags, const XCAFPrs_Style &theDefStyle=XCAFPrs_Style())
     Initialize the iterator from a single root shape in the document.
    void Init (const occ::handle< TDocStd_Document > &theDocument, const NCollection_Sequence< TDF_Label > &theRoots, const XCAFPrs_DocumentExplorerFlags theFlags, const XCAFPrs_Style &theDefStyle=XCAFPrs_Style())
     Initialize the iterator from the list of root shapes in the document.
    bool More () const
     Return TRUE if iterator points to the valid node.
    const XCAFPrs_DocumentNodeCurrent () const
     Return current position.
    XCAFPrs_DocumentNodeChangeCurrent ()
     Return current position.
    const XCAFPrs_DocumentNodeCurrent (int theDepth) const
     Return current position within specified assembly depth.
    int CurrentDepth () const
     Return depth of the current node in hierarchy, starting from 0. Zero means Root label.
    void Next ()
     Go to the next node.
    const occ::handle< XCAFDoc_ColorTool > & ColorTool () const
     Return color tool.
    const occ::handle< XCAFDoc_VisMaterialTool > & VisMaterialTool () const
     Return material tool.
    void initRoot ()
     Initialize root label.
    void initCurrent (bool theIsAssembly)
     Initialize properties for a current label.

    Detailed Description

    Document iterator through shape nodes.

    Constructor & Destructor Documentation

    ◆ XCAFPrs_DocumentExplorer() [1/3]

    XCAFPrs_DocumentExplorer::XCAFPrs_DocumentExplorer ( )

    Empty constructor.

    ◆ XCAFPrs_DocumentExplorer() [2/3]

    XCAFPrs_DocumentExplorer::XCAFPrs_DocumentExplorer ( const occ::handle< TDocStd_Document > & theDocument,
    const XCAFPrs_DocumentExplorerFlags theFlags,
    const XCAFPrs_Style & theDefStyle = XCAFPrs_Style() )

    Constructor for exploring the whole document.

    Parameters
    theDocumentdocument to explore
    theFlagsiteration flags
    theDefStyledefault style for nodes with undefined style

    ◆ XCAFPrs_DocumentExplorer() [3/3]

    XCAFPrs_DocumentExplorer::XCAFPrs_DocumentExplorer ( const occ::handle< TDocStd_Document > & theDocument,
    const NCollection_Sequence< TDF_Label > & theRoots,
    const XCAFPrs_DocumentExplorerFlags theFlags,
    const XCAFPrs_Style & theDefStyle = XCAFPrs_Style() )

    Constructor for exploring specified list of root shapes in the document.

    Parameters
    theDocumentdocument to explore
    theRootsroot labels to explore within specified document
    theFlagsiteration flags
    theDefStyledefault style for nodes with undefined style

    Member Function Documentation

    ◆ ChangeCurrent()

    XCAFPrs_DocumentNode & XCAFPrs_DocumentExplorer::ChangeCurrent ( )
    inline

    Return current position.

    ◆ ColorTool()

    const occ::handle< XCAFDoc_ColorTool > & XCAFPrs_DocumentExplorer::ColorTool ( ) const
    inline

    Return color tool.

    ◆ Current() [1/2]

    const XCAFPrs_DocumentNode & XCAFPrs_DocumentExplorer::Current ( ) const
    inline

    Return current position.

    ◆ Current() [2/2]

    const XCAFPrs_DocumentNode & XCAFPrs_DocumentExplorer::Current ( int theDepth) const
    inline

    Return current position within specified assembly depth.

    ◆ CurrentDepth()

    int XCAFPrs_DocumentExplorer::CurrentDepth ( ) const
    inline

    Return depth of the current node in hierarchy, starting from 0. Zero means Root label.

    ◆ DefineChildId()

    TCollection_AsciiString XCAFPrs_DocumentExplorer::DefineChildId ( const TDF_Label & theLabel,
    const TCollection_AsciiString & theParentId )
    static

    color tool

    ◆ FindLabelFromPathId() [1/2]

    TDF_Label XCAFPrs_DocumentExplorer::FindLabelFromPathId ( const occ::handle< TDocStd_Document > & theDocument,
    const TCollection_AsciiString & theId,
    TopLoc_Location & theLocation )
    inlinestatic

    Find a shape entity based on a text identifier constructed from OCAF labels defining full path.

    See also
    DefineChildId()

    ◆ FindLabelFromPathId() [2/2]

    TDF_Label XCAFPrs_DocumentExplorer::FindLabelFromPathId ( const occ::handle< TDocStd_Document > & theDocument,
    const TCollection_AsciiString & theId,
    TopLoc_Location & theParentLocation,
    TopLoc_Location & theLocation )
    static

    Find a shape entity based on a text identifier constructed from OCAF labels defining full path.

    See also
    DefineChildId()

    ◆ FindShapeFromPathId()

    TopoDS_Shape XCAFPrs_DocumentExplorer::FindShapeFromPathId ( const occ::handle< TDocStd_Document > & theDocument,
    const TCollection_AsciiString & theId )
    static

    Find a shape entity based on a text identifier constructed from OCAF labels defining full path.

    See also
    DefineChildId()

    ◆ Init() [1/2]

    void XCAFPrs_DocumentExplorer::Init ( const occ::handle< TDocStd_Document > & theDocument,
    const NCollection_Sequence< TDF_Label > & theRoots,
    const XCAFPrs_DocumentExplorerFlags theFlags,
    const XCAFPrs_Style & theDefStyle = XCAFPrs_Style() )

    Initialize the iterator from the list of root shapes in the document.

    Parameters
    theDocumentdocument to explore
    theRootsroot labels to explore within specified document
    theFlagsiteration flags
    theDefStyledefault style for nodes with undefined style

    ◆ Init() [2/2]

    void XCAFPrs_DocumentExplorer::Init ( const occ::handle< TDocStd_Document > & theDocument,
    const TDF_Label & theRoot,
    const XCAFPrs_DocumentExplorerFlags theFlags,
    const XCAFPrs_Style & theDefStyle = XCAFPrs_Style() )

    Initialize the iterator from a single root shape in the document.

    Parameters
    theDocumentdocument to explore
    theRootsingle root label to explore within specified document
    theFlagsiteration flags
    theDefStyledefault style for nodes with undefined style

    ◆ initCurrent()

    void XCAFPrs_DocumentExplorer::initCurrent ( bool theIsAssembly)
    protected

    Initialize properties for a current label.

    ◆ initRoot()

    void XCAFPrs_DocumentExplorer::initRoot ( )
    protected

    Initialize root label.

    ◆ More()

    bool XCAFPrs_DocumentExplorer::More ( ) const
    inline

    Return TRUE if iterator points to the valid node.

    ◆ Next()

    void XCAFPrs_DocumentExplorer::Next ( )

    Go to the next node.

    ◆ VisMaterialTool()

    const occ::handle< XCAFDoc_VisMaterialTool > & XCAFPrs_DocumentExplorer::VisMaterialTool ( ) const
    inline

    Return material tool.

    Field Documentation

    ◆ myColorTool

    occ::handle<XCAFDoc_ColorTool> XCAFPrs_DocumentExplorer::myColorTool
    protected

    color tool

    ◆ myCurrent

    XCAFPrs_DocumentNode XCAFPrs_DocumentExplorer::myCurrent
    protected

    current label info

    ◆ myDefStyle

    XCAFPrs_Style XCAFPrs_DocumentExplorer::myDefStyle
    protected

    default style

    ◆ myFlags

    XCAFPrs_DocumentExplorerFlags XCAFPrs_DocumentExplorer::myFlags
    protected

    iteration flags

    ◆ myHasMore

    bool XCAFPrs_DocumentExplorer::myHasMore
    protected

    global flag indicating that iterator points to the label

    ◆ myNodeStack

    NCollection_DynamicArray<XCAFPrs_DocumentNode> XCAFPrs_DocumentExplorer::myNodeStack
    protected

    node stack

    ◆ myRootIter

    NCollection_Sequence<TDF_Label>::Iterator XCAFPrs_DocumentExplorer::myRootIter
    protected

    current root label

    ◆ myRoots

    NCollection_Sequence<TDF_Label> XCAFPrs_DocumentExplorer::myRoots
    protected

    sequence of root labels

    ◆ myTop

    int XCAFPrs_DocumentExplorer::myTop
    protected

    top position in the node stack

    ◆ myVisMatTool

    occ::handle<XCAFDoc_VisMaterialTool> XCAFPrs_DocumentExplorer::myVisMatTool
    protected

    visual material tool


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