SHAPER
9.12.0
|
Attribute that contains reference to the sub-shape of some result, the selected shape. More...
Public Types | |
enum | CenterType { NOT_CENTER , CIRCLE_CENTER , ELLIPSE_FIRST_FOCUS , ELLIPSE_SECOND_FOCUS } |
Type of the center of the circular of elliptic edge. More... | |
Public Member Functions | |
virtual bool | setValue (const ObjectPtr &theContext, const std::shared_ptr< GeomAPI_Shape > &theSubShape, const bool theTemporarily=false) |
Defines the result and its selected sub-shape. More... | |
virtual void | setValueCenter (const ObjectPtr &theContext, const std::shared_ptr< GeomAPI_Edge > &theEdge, const CenterType theCenterType, const bool theTemporarily=false) |
Same as SetValue, but it takes an edge (on circular or elliptic curve) and stores the vertex of the central point (for ellipse the first or the second focus point) More... | |
virtual void | selectValue (const std::shared_ptr< ModelAPI_AttributeSelection > &theSource) |
Makes this selection attribute selects the same as in theSource selection. More... | |
virtual void | removeTemporaryValues () |
Reset temporary stored values. More... | |
virtual std::shared_ptr< GeomAPI_Shape > | value () |
Returns the selected subshape. More... | |
virtual ResultPtr | context () |
Returns the context of the selection (the whole shape owner) More... | |
virtual FeaturePtr | contextFeature () |
Returns the context of the selection if the whole feature was selected. More... | |
virtual std::shared_ptr< ModelAPI_Object > | contextObject () |
Returns the context of the selection : result or feature. More... | |
virtual void | setObject (const std::shared_ptr< ModelAPI_Object > &theObject) |
Sets the feature object. More... | |
virtual bool | update () |
Updates the selection due to the changes in the referenced objects. More... | |
virtual std::wstring | namingName (const std::wstring &theDefaultValue=L"") |
Returns a textual string of the selection. More... | |
virtual void | setId (int theID) |
Defines the sub-shape by Id. More... | |
virtual void | selectSubShape (const std::string &theType, const std::wstring &theSubShapeName) |
Selects (i.e. creates Naming data structure) of sub-shape specified by textual name. More... | |
virtual void | selectSubShape (const std::string &theType, const std::shared_ptr< GeomAPI_Pnt > &thePoint) |
Selects sub-shape by its inner point. More... | |
virtual void | selectSubShape (const std::string &theType, const std::wstring &theContextName, const int theIndex) |
Selects sub-shape by weak naming index. More... | |
virtual bool | isInitialized () |
Returns true if attribute was initialized by some value. More... | |
virtual bool | isInvalid () |
Returns true if recompute of selection become impossible. More... | |
virtual void | updateInHistory (bool &theRemove) override |
Updates the arguments of selection if something was affected by creation or reorder of features upper in the history line (issue #1757) Returns theRemove true if this attribute must be removed (become deleted) More... | |
virtual std::wstring | contextName (const TDF_Label theSelectionLab) override |
This method returns the context name by the label of the sub-selected shape. More... | |
virtual bool | restoreContext (std::wstring theName, TDF_Label &theContext, TDF_Label &theValue) override |
This method restores by the context and value name the context label and sub-label where the value is. More... | |
virtual bool | isLater (const TDF_Label theResult1, const TDF_Label theResult2) const override |
Returns true if the first result is newer than the second one in the tree of features. More... | |
virtual std::wstring | contextName (const ResultPtr &theContext) const |
Returns the name by context. Adds the part name if the context is located in other document. More... | |
virtual void | combineGeometrical () |
Makes the current local selection becomes all sub-shapes with same base geometry. More... | |
virtual void | reset () |
Resets attribute to deafult state. More... | |
virtual std::string | attributeType () |
Returns the type of this class of attributes, not static method. More... | |
const std::shared_ptr< ModelAPI_Object > & | owner () const |
Returns the owner of this attribute. More... | |
void | setInitialized () |
Makes attribute initialized. More... | |
bool | blockSetInitialized (const bool theBlock) |
Blocks sending "attribute updated" if theBlock is true. More... | |
void | setIsArgument (const bool theFlag) |
Set this attribute is argument for result (change of this attribute requires update of result). More... | |
bool | isArgument () |
Returns true if attribute causes the result change. More... | |
bool | setImmutable (const bool theFlag) |
Immutable argument can not be changed programmatically (e.g. More... | |
bool | isImmutable () |
Returns true if can not be changed programmatically. More... | |
const std::string & | id () const |
ID of the attribute in Data. More... | |
Static Public Member Functions | |
static std::string | typeId () |
Returns the type of this class of attributes. More... | |
Protected Member Functions | |
Model_AttributeSelection (TDF_Label &theLabel) | |
Objects are created for features automatically. More... | |
std::shared_ptr< GeomAPI_Shape > | internalValue (CenterType &theType) |
Returns the selected subshape, internal method that works without knowledge about special selection of circle and ellipse focuses (for that the public value method calls this and makes additional processing). More... | |
virtual void | selectBody (const ResultPtr &theContext, const std::shared_ptr< GeomAPI_Shape > &theSubShape) |
Performs the selection for the body result (TNaming selection) More... | |
virtual bool | selectPart (const ResultPtr &theContext, const std::shared_ptr< GeomAPI_Shape > &theSubShape, const bool theUpdate=false) |
Performs the selection for the part result (selection by name of body result inside of part) More... | |
TDF_Label | selectionLabel () |
Returns the label where TNaming_Selection results are stored Note: there must be no attributes stored at the same label because Selector clears this lab. More... | |
virtual void | setID (const std::string theID) |
Sets the ID of the attribute in Data (called from Data): here it is used for myRef ID setting. More... | |
void | setParent (Model_AttributeSelectionList *theParent) |
Sets the parent attribute. More... | |
void | split (ResultPtr theContext, TopoDS_Shape theNewShape, TopAbs_ShapeEnum theType) |
Splits theNewShape into sub-shapes of theType type (for the list parent of this attribute) More... | |
bool | searchNewContext (std::shared_ptr< Model_Document > theDoc, const TopoDS_Shape theContShape, ResultPtr theContext, TopoDS_Shape theValShape, TDF_Label theAccessLabel, std::list< ResultPtr > &theResults, TopTools_ListOfShape &theValShapes) |
When group position is updated, searches the new context and new values. More... | |
ResultPtr | newestContext (const ResultPtr theCurrent, const std::shared_ptr< GeomAPI_Shape > theValue) |
Searches for the newest context, modification of the current, that contains theValue. More... | |
void | computeValues (ResultPtr theOldContext, ResultPtr theNewContext, TopoDS_Shape theValShape, TopTools_ListOfShape &theShapes) |
computes theShapes list - shapes that were generated/modified/deleted the theValShape during creation from new to old context More... | |
virtual bool | isGeometricalSelection () const |
Returns true if is geometrical selection. More... | |
TDF_Label | baseDocumentLab () |
Returns the module document label if this selection attribute is not in this document. More... | |
void | concealedFeature (const FeaturePtr theFeature, const FeaturePtr theStop, const bool theCheckCopy, std::list< FeaturePtr > &theConcealers, const ResultPtr theResultOfFeature, const bool theCheckWholeFeature=false) |
Returns features that conceals theFeature and located in history before theStop theResultOfFeature if not null defines exact referenced result of a feature. More... | |
virtual void | reinit () |
Reinitializes the internal state of the attribute (may be needed on undo/redo, abort, etc) More... | |
Protected Attributes | |
bool | myIsInitialized |
is some value assigned to this attribute More... | |
bool | mySetInitializedBlocked |
is initialized blocked More... | |
bool | myIsArgument |
is this attribute used as an argument for execution More... | |
bool | myIsImmutable |
is this attribute can be changed programmatically (e.g. by constraint) More... | |
Friends | |
class | Model_Data |
class | Model_AttributeSelectionList |
Attribute that contains reference to the sub-shape of some result, the selected shape.
|
inherited |
|
protected |
Objects are created for features automatically.
|
virtual |
Defines the result and its selected sub-shape.
theContext | object where the sub-shape was selected |
theSubShape | selected sub-shape (if null, the whole context is selected) |
theTemporarily | if it is true, do not store and name the added in the data framework (used to remove immediately, without the following updates) |
Implements ModelAPI_AttributeSelection.
|
virtual |
Same as SetValue, but it takes an edge (on circular or elliptic curve) and stores the vertex of the central point (for ellipse the first or the second focus point)
Implements ModelAPI_AttributeSelection.
|
virtual |
Makes this selection attribute selects the same as in theSource selection.
Implements ModelAPI_AttributeSelection.
|
virtual |
Reset temporary stored values.
Implements ModelAPI_AttributeSelection.
|
virtual |
Returns the selected subshape.
Implements ModelAPI_AttributeSelection.
|
virtual |
Returns the context of the selection (the whole shape owner)
Implements ModelAPI_AttributeSelection.
|
virtual |
Returns the context of the selection if the whole feature was selected.
Implements ModelAPI_AttributeSelection.
|
virtual |
Returns the context of the selection : result or feature.
Implements ModelAPI_AttributeSelection.
|
virtual |
Sets the feature object.
Reimplemented from ModelAPI_Attribute.
|
virtual |
Updates the selection due to the changes in the referenced objects.
Implements ModelAPI_AttributeSelection.
|
virtual |
Returns a textual string of the selection.
theDefaultValue | a name, which is returned if the naming name can not be obtained |
Implements ModelAPI_AttributeSelection.
|
virtual |
Defines the sub-shape by Id.
Implements ModelAPI_AttributeSelection.
|
virtual |
Selects (i.e. creates Naming data structure) of sub-shape specified by textual name.
Implements ModelAPI_AttributeSelection.
|
virtual |
Selects sub-shape by its inner point.
Implements ModelAPI_AttributeSelection.
|
virtual |
Selects sub-shape by weak naming index.
Implements ModelAPI_AttributeSelection.
|
virtual |
Returns true if attribute was initialized by some value.
Reimplemented from ModelAPI_Attribute.
|
virtual |
Returns true if recompute of selection become impossible.
Implements ModelAPI_AttributeSelection.
|
overridevirtual |
Updates the arguments of selection if something was affected by creation or reorder of features upper in the history line (issue #1757) Returns theRemove true if this attribute must be removed (become deleted)
Implements ModelAPI_AttributeSelection.
|
overridevirtual |
This method returns the context name by the label of the sub-selected shape.
Implements Selector_NameGenerator.
|
overridevirtual |
This method restores by the context and value name the context label and sub-label where the value is.
Returns true if it is valid.
Implements Selector_NameGenerator.
|
overridevirtual |
Returns true if the first result is newer than the second one in the tree of features.
Implements Selector_NameGenerator.
|
virtual |
Returns the name by context. Adds the part name if the context is located in other document.
Implements ModelAPI_AttributeSelection.
|
virtual |
Makes the current local selection becomes all sub-shapes with same base geometry.
Implements ModelAPI_AttributeSelection.
|
virtual |
Resets attribute to deafult state.
Reimplemented from ModelAPI_Attribute.
|
protected |
Returns the selected subshape, internal method that works without knowledge about special selection of circle and ellipse focuses (for that the public value method calls this and makes additional processing).
Returns theType type of the center, or NOT_CENTER if it is not.
|
protectedvirtual |
Performs the selection for the body result (TNaming selection)
|
protectedvirtual |
Performs the selection for the part result (selection by name of body result inside of part)
theContext | the result - owner of the selection |
theSubShape | selected shape |
theUpdate | flag that shows that it must be just update, theShape is null |
|
protected |
Returns the label where TNaming_Selection results are stored Note: there must be no attributes stored at the same label because Selector clears this lab.
|
protectedvirtual |
Sets the ID of the attribute in Data (called from Data): here it is used for myRef ID setting.
Reimplemented from ModelAPI_Attribute.
|
protected |
Sets the parent attribute.
|
protected |
Splits theNewShape into sub-shapes of theType type (for the list parent of this attribute)
|
protected |
When group position is updated, searches the new context and new values.
|
protected |
Searches for the newest context, modification of the current, that contains theValue.
|
protected |
computes theShapes list - shapes that were generated/modified/deleted the theValShape during creation from new to old context
|
inlineprotectedvirtual |
Returns true if is geometrical selection.
Implements ModelAPI_AttributeSelection.
|
protected |
Returns the module document label if this selection attribute is not in this document.
Returns null label otherwise.
|
protected |
Returns features that conceals theFeature and located in history before theStop theResultOfFeature if not null defines exact referenced result of a feature.
iterate all results to find the concealment-attribute
|
inlinestaticinherited |
Returns the type of this class of attributes.
|
virtualinherited |
Returns the type of this class of attributes, not static method.
Implements ModelAPI_Attribute.
|
inherited |
Returns the owner of this attribute.
|
inherited |
Makes attribute initialized.
|
inherited |
Blocks sending "attribute updated" if theBlock is true.
theBlock | a block value |
|
inherited |
Set this attribute is argument for result (change of this attribute requires update of result).
By default it is true.
|
inherited |
Returns true if attribute causes the result change.
|
inherited |
Immutable argument can not be changed programmatically (e.g.
by constraint) By default it is false. Returns the previous state of the attribute's immutability.
|
inherited |
Returns true if can not be changed programmatically.
|
inherited |
ID of the attribute in Data.
|
protectedvirtualinherited |
Reinitializes the internal state of the attribute (may be needed on undo/redo, abort, etc)
Reimplemented in Model_AttributeTables, Model_AttributeString, Model_AttributeSelectionList, Model_AttributeRefList, Model_AttributeReference, Model_AttributeRefAttrList, Model_AttributeRefAttr, Model_AttributeInteger, Model_AttributeIntArray, Model_AttributeImage, Model_AttributeDoubleArray, Model_AttributeDouble, Model_AttributeDocRef, Model_AttributeBoolean, GeomData_Point2DArray, GeomData_Point2D, GeomData_Point, and GeomData_Dir.
|
protectedinherited |
is some value assigned to this attribute
|
protectedinherited |
is initialized blocked
|
protectedinherited |
is this attribute used as an argument for execution
|
protectedinherited |
is this attribute can be changed programmatically (e.g. by constraint)