SHAPER  9.12.0
Selector_Selector Class Reference

Base class for all kinds of selection algorithms. More...

Public Member Functions

 Selector_Selector (TDF_Label theLab, TDF_Label theBaseDocLab=TDF_Label())
 Initializes selector on the label. More...
 
 ~Selector_Selector ()
 Destructor. More...
 
bool select (const TopoDS_Shape theContext, const TopoDS_Shape theValue, const bool theGeometricalNaming=false)
 Initializes the selector structure on the label. More...
 
bool store (const TopoDS_Shape theContext)
 Stores the name to the label and sub-labels tree. More...
 
bool restore (const TopoDS_Shape theContext)
 Restores the selected shape by the topological naming kept in the data structure Returns true if it can restore structure correctly. More...
 
TDF_Label restoreByName (std::wstring theName, const TopAbs_ShapeEnum theShapeType, Selector_NameGenerator *theNameGenerator, const bool theGeometricalNaming=false)
 Restores the selected shape by the topological name string. More...
 
TopoDS_Shape value ()
 Returns the current sub-shape value (null if can not resolve) More...
 
std::wstring name (Selector_NameGenerator *theNameGenerator)
 Returns the naming name of the selection. More...
 
void combineGeometrical (const TopoDS_Shape theContext)
 Makes the current local selection becomes all sub-shapes with same base geometry. More...
 
bool solve (const TopoDS_Shape theContext)
 Stores the selected shape in he tree and returns true if shape found correctly. More...
 

Detailed Description

Base class for all kinds of selection algorithms.

Main object for selection of the sub-shapes in the parametrically updated shapes using topological naming mechanism.

Constructor & Destructor Documentation

◆ Selector_Selector()

Selector_Selector::Selector_Selector ( TDF_Label  theLab,
TDF_Label  theBaseDocLab = TDF_Label() 
)

Initializes selector on the label.

◆ ~Selector_Selector()

Selector_Selector::~Selector_Selector ( )

Destructor.

Member Function Documentation

◆ select()

bool Selector_Selector::select ( const TopoDS_Shape  theContext,
const TopoDS_Shape  theValue,
const bool  theGeometricalNaming = false 
)

Initializes the selector structure on the label.

Stores the name data to restore after modification.

Parameters
theContextwhole shape that contains the selected sub-shape
theValueselected subshape
theGeometricalNamingtreats selection with equal surfaces as one
theUseNeighborsenables searching algorithm by neighbors
theUseIntersectionsenables searching algorithm by intersection of higher level shapes

◆ store()

bool Selector_Selector::store ( const TopoDS_Shape  theContext)

Stores the name to the label and sub-labels tree.

◆ restore()

bool Selector_Selector::restore ( const TopoDS_Shape  theContext)

Restores the selected shape by the topological naming kept in the data structure Returns true if it can restore structure correctly.

◆ restoreByName()

TDF_Label Selector_Selector::restoreByName ( std::wstring  theName,
const TopAbs_ShapeEnum  theShapeType,
Selector_NameGenerator theNameGenerator,
const bool  theGeometricalNaming = false 
)

Restores the selected shape by the topological name string.

Returns not empty label of the context.

◆ value()

TopoDS_Shape Selector_Selector::value ( )

Returns the current sub-shape value (null if can not resolve)

◆ name()

std::wstring Selector_Selector::name ( Selector_NameGenerator theNameGenerator)

Returns the naming name of the selection.

◆ combineGeometrical()

void Selector_Selector::combineGeometrical ( const TopoDS_Shape  theContext)

Makes the current local selection becomes all sub-shapes with same base geometry.

◆ solve()

bool Selector_Selector::solve ( const TopoDS_Shape  theContext)

Stores the selected shape in he tree and returns true if shape found correctly.