SHAPER
9.12.0
|
Kind of selection algorithm: generic algorithm that contains sub-algorithms inside. More...
Public Types | |
enum | Selector_Type { SELTYPE_CONTAINER , SELTYPE_INTERSECT , SELTYPE_PRIMITIVE , SELTYPE_MODIFICATION , SELTYPE_FILTER_BY_NEIGHBOR , SELTYPE_WEAK_NAMING } |
Type of a selector algorithm: on this type depends what is stored in this label and how to restore it on update. More... | |
Public Member Functions | |
Selector_AlgoWithSubs () | |
Initializes selector. More... | |
virtual | ~Selector_AlgoWithSubs () |
Destructor. More... | |
void | clearSubAlgos () |
Erases the sub-algorithms stored. More... | |
TDF_Label | newSubLabel () |
Returns the next label for a new sub-selector created. More... | |
bool | append (Selector_Algo *theAlgo, const bool theEraseIfNull=true) |
Appends a new algorithm to the list, erases list if it is null (failed) More... | |
std::list< Selector_Algo * > & | list () |
Returns the stored list of sub-algorithms. More... | |
virtual void | store ()=0 |
Stores the name to the label and sub-labels tree. More... | |
virtual bool | restore ()=0 |
Restores the selected shape by the topological naming kept in the data structure Returns true if it can restore structure correctly. More... | |
virtual TDF_Label | restoreByName (std::wstring theName, const TopAbs_ShapeEnum theShapeType, Selector_NameGenerator *theNameGenerator)=0 |
Restores the selected shape by the topological name string. More... | |
virtual bool | solve (const TopoDS_Shape &theContext)=0 |
Updates the current shape by the stored topological name. More... | |
virtual std::wstring | name (Selector_NameGenerator *theNameGenerator)=0 |
Returns the naming name of the selection. More... | |
TopoDS_Shape | value () |
Returns the current sub-shape value (null if can not resolve) More... | |
void | setGeometricalNaming () |
Sets geometrical naming flag to true. More... | |
Static Public Member Functions | |
static Selector_Algo * | select (const TopoDS_Shape theContext, const TopoDS_Shape theValue, const TDF_Label theAccess, const TDF_Label theBaseDocument, const bool theGeometricalNaming=false, const bool theUseNeighbors=true, const bool theUseIntersections=true, const bool theAlwaysGeometricalNaming=false) |
Initializes the selector structure on the label. More... | |
static Selector_Algo * | restoreByName (TDF_Label theLab, TDF_Label theBaseDocLab, std::wstring theName, const TopAbs_ShapeEnum theShapeType, const bool theGeomNaming, Selector_NameGenerator *theNameGenerator, TDF_Label &theContextLab) |
Restores the selected sub-algorithm by the naming name. More... | |
static Selector_Algo * | restoreByLab (TDF_Label theLab, TDF_Label theBaseDocLab) |
Restores sub-algorithm of a given type by the storage-label. More... | |
static bool | sameGeometry (const TopoDS_Shape theShape1, const TopoDS_Shape theShape2) |
Returns true if the given shapes are based on the same geometry. More... | |
static Selector_Algo * | relesectWithAllGeometry (Selector_Algo *theOldAlgo, const TopoDS_Shape theContext) |
Creates a new selection algorithm for selection of all topology based on the same geometry. More... | |
Protected Member Functions | |
void | store (const TopoDS_Shape theShape) |
Stores result of selection at the given label. More... | |
const TDF_Label & | label () const |
Returns label where this algorithm is attached to, or just an access label to the document. More... | |
void | storeBaseArray (const TDF_LabelList &theRef, const TDF_Label &theLast) |
Stores the array of references to theLab: references to elements of ref-list, then the last. More... | |
bool | restoreBaseArray (TDF_LabelList &theRef, TDF_Label &theLast) |
Restores references to the labels: references to elements of ref-list, then the last. More... | |
const TDF_Label & | baseDocument () const |
Returns an access-label of the document that may contain initial shapes. More... | |
bool | geometricalNaming () const |
Returns the geometrical naming flag. More... | |
bool | alwaysGeometricalNaming () const |
Returns always geometrical naming flag. More... | |
bool | useNeighbors () const |
Returns use neighbors flag. More... | |
bool | useIntersections () const |
Returns use intersections flag. More... | |
void | storeType (const Selector_Type theType) |
Stores the type of an algorithm in the data tree (in myLab) More... | |
bool | findNewVersion (const TopoDS_Shape &theContext, TopoDS_Shape &theResult) const |
Searches the newer version of the shape in the document if the base shape does not belong to context. More... | |
Static Protected Member Functions | |
static const Standard_GUID & | weakID () |
Returns GUID for the weak index (integer attribute) of the sub-shape. More... | |
static const Standard_GUID & | shapeTypeID () |
Returns GUID for the type of the shape, stored in case it is intersection or container. More... | |
static const std::wstring & | oldWeakNameID () |
old string identifier of the weak name in modification or intersection types of algorithm More... | |
static const std::wstring & | oldPureWeakNameID () |
old string identifier of the pure weak name More... | |
static const std::wstring & | weakNameID () |
string identifier of the weak name in modification or intersection types of algorithm More... | |
static const std::wstring & | pureWeakNameID () |
string identifier of the pure weak name More... | |
Kind of selection algorithm: generic algorithm that contains sub-algorithms inside.
It is base for Container, Intersection and FilterByNeighbours algorithms.
|
inherited |
Type of a selector algorithm: on this type depends what is stored in this label and how to restore it on update.
Selector_AlgoWithSubs::Selector_AlgoWithSubs | ( | ) |
Initializes selector.
|
virtual |
Destructor.
void Selector_AlgoWithSubs::clearSubAlgos | ( | ) |
Erases the sub-algorithms stored.
TDF_Label Selector_AlgoWithSubs::newSubLabel | ( | ) |
Returns the next label for a new sub-selector created.
bool Selector_AlgoWithSubs::append | ( | Selector_Algo * | theAlgo, |
const bool | theEraseIfNull = true |
||
) |
Appends a new algorithm to the list, erases list if it is null (failed)
std::list< Selector_Algo * > & Selector_AlgoWithSubs::list | ( | ) |
Returns the stored list of sub-algorithms.
|
staticinherited |
Initializes the selector structure on the label.
Stores the name data to restore after modification.
theContext | whole shape that contains the selected sub-shape |
theValue | selected subshape |
theGeometricalNaming | treats selection with equal surfaces as one |
theUseNeighbors | enables searching algorithm by neighbors |
theUseIntersections | enables searching algorithm by intersection of higher level shapes |
|
pure virtualinherited |
Stores the name to the label and sub-labels tree.
Implemented in Selector_WeakName, Selector_Primitive, Selector_Modify, Selector_Intersect, Selector_FilterByNeighbors, and Selector_Container.
|
protectedinherited |
Stores result of selection at the given label.
|
pure virtualinherited |
Restores the selected shape by the topological naming kept in the data structure Returns true if it can restore structure correctly.
Implemented in Selector_WeakName, Selector_Primitive, Selector_Modify, Selector_Intersect, Selector_FilterByNeighbors, and Selector_Container.
|
pure virtualinherited |
Restores the selected shape by the topological name string.
Returns not empty label of the context.
Implemented in Selector_WeakName, Selector_Primitive, Selector_Modify, Selector_Intersect, Selector_FilterByNeighbors, and Selector_Container.
|
staticinherited |
Restores the selected sub-algorithm by the naming name.
Returns not empty label of the context.
|
pure virtualinherited |
Updates the current shape by the stored topological name.
Implemented in Selector_WeakName, Selector_Primitive, Selector_Modify, Selector_Intersect, Selector_FilterByNeighbors, and Selector_Container.
|
pure virtualinherited |
Returns the naming name of the selection.
Implemented in Selector_WeakName, Selector_Primitive, Selector_Modify, Selector_Intersect, Selector_FilterByNeighbors, and Selector_Container.
|
inherited |
Returns the current sub-shape value (null if can not resolve)
|
staticinherited |
Restores sub-algorithm of a given type by the storage-label.
|
staticinherited |
Returns true if the given shapes are based on the same geometry.
|
staticinherited |
Creates a new selection algorithm for selection of all topology based on the same geometry.
|
inlineinherited |
Sets geometrical naming flag to true.
|
inlineprotectedinherited |
Returns label where this algorithm is attached to, or just an access label to the document.
|
protectedinherited |
Stores the array of references to theLab: references to elements of ref-list, then the last.
|
protectedinherited |
Restores references to the labels: references to elements of ref-list, then the last.
|
inlineprotectedinherited |
Returns an access-label of the document that may contain initial shapes.
|
inlineprotectedinherited |
Returns the geometrical naming flag.
|
inlineprotectedinherited |
Returns always geometrical naming flag.
|
inlineprotectedinherited |
Returns use neighbors flag.
|
inlineprotectedinherited |
Returns use intersections flag.
|
inlinestaticprotectedinherited |
Returns GUID for the weak index (integer attribute) of the sub-shape.
|
inlinestaticprotectedinherited |
Returns GUID for the type of the shape, stored in case it is intersection or container.
|
inlinestaticprotectedinherited |
old string identifier of the weak name in modification or intersection types of algorithm
|
inlinestaticprotectedinherited |
old string identifier of the pure weak name
|
inlinestaticprotectedinherited |
string identifier of the weak name in modification or intersection types of algorithm
|
inlinestaticprotectedinherited |
string identifier of the pure weak name
|
protectedinherited |
Stores the type of an algorithm in the data tree (in myLab)
|
protectedinherited |
Searches the newer version of the shape in the document if the base shape does not belong to context.
Returns it in theResult (if any). Returns true is theResult is changed.