OCCT 8.0.1
OCCT documentation

Search guides and API reference

Enter at least two characters.

    Open CASCADE Technology Reference Manual 8.0.1
    TNaming_Selector Class Reference

    This class provides a single API for selection of shapes. This involves both identification and selection of shapes in the data framework. If the selected shape is modified, this selector will solve its identifications. This class is the user interface for topological naming resources. More...

    #include <TNaming_Selector.hxx>

    Public Member Functions

     TNaming_Selector (const TDF_Label &aLabel)
     Create a selector on this label.
    bool Select (const TopoDS_Shape &Selection, const TopoDS_Shape &Context, const bool Geometry=false, const bool KeepOrientatation=false) const
     Creates a topological naming on the label aLabel given as an argument at construction time. If successful, the shape Selection - found in the shape Context - is now identified in the named shape returned in NamedShape. If Geometry is true, NamedShape contains the first appearance of Selection. This syntax is more robust than the previous syntax for this method.
    bool Select (const TopoDS_Shape &Selection, const bool Geometry=false, const bool KeepOrientatation=false) const
     Creates a topological naming on the label aLabel given as an argument at construction time. If successful, the shape Selection is now identified in the named shape returned in NamedShape. If Geometry is true, NamedShape contains the first appearance of Selection.
    bool Solve (NCollection_Map< TDF_Label > &Valid) const
     Updates the topological naming on the label aLabel given as an argument at construction time. The underlying shape returned in the method NamedShape is updated. To read this shape, use the method TNaming_Tool::GetShape.
    void Arguments (NCollection_Map< occ::handle< TDF_Attribute > > &args) const
     Returns the attribute list args. This list contains the named shape on which the topological naming was built.
    occ::handle< TNaming_NamedShape > NamedShape () const
     Returns the NamedShape build or under construction, which contains the topological naming..

    Static Public Member Functions

    static bool IsIdentified (const TDF_Label &accessaccess, const TopoDS_Shape &selection, occ::handle< TNaming_NamedShape > &NS, const bool Geometry=false)

    Detailed Description

    This class provides a single API for selection of shapes. This involves both identification and selection of shapes in the data framework. If the selected shape is modified, this selector will solve its identifications. This class is the user interface for topological naming resources.

    • The <IsIdentified> method returns (if exists) the NamedShape which contains a given shape. The definition of an identified shape is: a Shape handled by a NamedShape (this shape is the only one stored), which has the TNaming_PRImITIVE evolution
    • The <Select> method returns ALWAYS a new NamedShape at the given label, which contains the argument selected shape. When calling this method, the sub-hierarchy of <label> is first cleared, then a TNaming_NamedShape is ALWAYS created at this <label>, with the TNaming_SELECTED evolution. The <Naming attribute> is associated to the selected shape which store the arguments of the selection. If the given selected shape was already identified (method IsIdentified), this Naming attribute contains the reference (Identity code) to the argument shape.
    • The <Solve> method update the current value of the NamedShape, according to the <Naming> attribute. A boolean status is returned to say if the algorithm succeed or not. To read the current value of the selected Named Shape use the TNaming_Tool::GetShape method, as for any NamedShape attribute.

    Constructor & Destructor Documentation

    ◆ TNaming_Selector()

    TNaming_Selector::TNaming_Selector ( const TDF_Label & aLabel)

    Create a selector on this label.

    to select a shape.

    Member Function Documentation

    ◆ Arguments()

    void TNaming_Selector::Arguments ( NCollection_Map< occ::handle< TDF_Attribute > > & args) const

    Returns the attribute list args. This list contains the named shape on which the topological naming was built.

    ◆ IsIdentified()

    bool TNaming_Selector::IsIdentified ( const TDF_Label & access,
    const TopoDS_Shape & selection,
    occ::handle< TNaming_NamedShape > & NS,
    const bool Geometry = false )
    static

    To know if a shape is already identified (not selected)

    The label access defines the point of access to the data framework. selection is the shape for which we want to know whether it is identified or not. If true, NS is returned as the identity of selection. If Geometry is true, NS will be the named shape containing the first appearance of selection and not any other shape. In other words, selection must be the only shape stored in NS.

    ◆ NamedShape()

    occ::handle< TNaming_NamedShape > TNaming_Selector::NamedShape ( ) const

    Returns the NamedShape build or under construction, which contains the topological naming..

    ◆ Select() [1/2]

    bool TNaming_Selector::Select ( const TopoDS_Shape & Selection,
    const bool Geometry = false,
    const bool KeepOrientatation = false ) const

    Creates a topological naming on the label aLabel given as an argument at construction time. If successful, the shape Selection is now identified in the named shape returned in NamedShape. If Geometry is true, NamedShape contains the first appearance of Selection.

    ◆ Select() [2/2]

    bool TNaming_Selector::Select ( const TopoDS_Shape & Selection,
    const TopoDS_Shape & Context,
    const bool Geometry = false,
    const bool KeepOrientatation = false ) const

    Creates a topological naming on the label aLabel given as an argument at construction time. If successful, the shape Selection - found in the shape Context - is now identified in the named shape returned in NamedShape. If Geometry is true, NamedShape contains the first appearance of Selection. This syntax is more robust than the previous syntax for this method.

    ◆ Solve()

    bool TNaming_Selector::Solve ( NCollection_Map< TDF_Label > & Valid) const

    Updates the topological naming on the label aLabel given as an argument at construction time. The underlying shape returned in the method NamedShape is updated. To read this shape, use the method TNaming_Tool::GetShape.


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