SHAPER
9.12.0
|
The body (shape) result of a feature. More...
Public Types | |
enum | ConnectedTopologyFlag { ConnectionNotComputed , IsConnected , IsNotConnected } |
Internal enumeration for storage the information of connected topology flag. More... | |
Public Member Functions | |
virtual std::string | groupName () |
Returns the group identifier of this result. More... | |
virtual int | numberOfSubs (bool forTree=false) const =0 |
Returns the number of sub-elements. More... | |
virtual std::shared_ptr< ModelAPI_ResultBody > | subResult (const int theIndex, bool forTree=false) const =0 |
Returns the sub-result by zero-base index. More... | |
virtual bool | isSub (ObjectPtr theResult, int &theIndex) const =0 |
Returns true if theResult belong to this composite result as sub. More... | |
virtual void | store (const GeomShapePtr &theShape, const bool theIsStoreSameShapes=true) |
Stores the shape (called by the execution method). More... | |
virtual void | storeGenerated (const GeomShapePtr &theFromShape, const GeomShapePtr &theToShape) |
Stores the generated shape (called by the execution method). More... | |
virtual void | storeGenerated (const std::list< GeomShapePtr > &theFromShapes, const GeomShapePtr &theToShape, const std::shared_ptr< GeomAlgoAPI_MakeShape > theMakeShape) |
Stores the root modified shapes (called by the execution method). More... | |
virtual void | storeModified (const GeomShapePtr &theOldShape, const GeomShapePtr &theNewShape, const bool theIsCleanStored=true) |
Stores the modified shape (called by the execution method). More... | |
virtual void | storeModified (const std::list< GeomShapePtr > &theOldShapes, const GeomShapePtr &theNewShape, const std::shared_ptr< GeomAlgoAPI_MakeShape > theMakeShape) |
Stores the root modified shapes (called by the execution method). More... | |
virtual GeomShapePtr | shape () |
Returns the shape-result produced by this feature. More... | |
virtual bool | generated (const GeomShapePtr &theNewShape, const std::string &theName, const bool theCheckIsInResult=true)=0 |
Records the subshape newShape which was generated during a topological construction. More... | |
virtual void | generated (const GeomShapePtr &theOldShape, const GeomShapePtr &theNewShape, const std::string &theName="") |
Records the shape newShape which was generated from the shape oldShape during a topological construction. More... | |
virtual void | modified (const GeomShapePtr &theOldShape, const GeomShapePtr &theNewShape, const std::string &theName="") |
Records the shape newShape which is a modification of the shape oldShape. More... | |
virtual void | loadDeletedShapes (const std::shared_ptr< GeomAlgoAPI_MakeShape > &theAlgo, const GeomShapePtr &theOldShape, const GeomAPI_Shape::ShapeType theShapeTypeToExplore, const GeomShapePtr &theShapesToExclude=GeomShapePtr()) |
load deleted shapes More... | |
virtual void | loadModifiedShapes (const std::shared_ptr< GeomAlgoAPI_MakeShape > &theAlgo, const GeomShapePtr &theOldShape, const GeomAPI_Shape::ShapeType theShapeTypeToExplore, const std::string &theName="")=0 |
load and orient modified shapes More... | |
virtual void | loadGeneratedShapes (const std::shared_ptr< GeomAlgoAPI_MakeShape > &theAlgo, const GeomShapePtr &theOldShape, const GeomAPI_Shape::ShapeType theShapeTypeToExplore, const std::string &theName="", const bool theSaveOldIfNotInTree=false)=0 |
load and orient generated shapes More... | |
virtual void | loadFirstLevel (GeomShapePtr theShape, const std::string &theName)=0 |
load shapes of the first level (to be used during shape import) More... | |
virtual bool | isConnectedTopology ()=0 |
Returns true is the topology is connected. More... | |
virtual void | setDisplayed (const bool theDisplay) |
Set displayed flag to the result and all sub results. More... | |
virtual void | updateSubs (const GeomShapePtr &theThisShape, const bool theShapeChanged=true)=0 |
Updates the sub-bodies if shape of this object is compsolid or compound. More... | |
virtual void | updateSubs (const GeomShapePtr &theThisShape, const std::list< GeomShapePtr > &theOlds, const std::shared_ptr< GeomAlgoAPI_MakeShape > theMakeShape, const bool isGenerated)=0 |
Updates the sub-bodies in accordance to the algorithm history information. More... | |
virtual void | cleanCash ()=0 |
Cleans cash related to the already stored elements. More... | |
virtual std::wstring | addShapeName (std::shared_ptr< GeomAPI_Shape >, const std::wstring &theName)=0 |
Add shape Name for read shape in step file. More... | |
virtual void | addShapeColor (const std::wstring &theName, std::vector< int > &theColor)=0 |
Add color for shape Name read shape in step file. More... | |
virtual void | setShapeName (std::map< std::wstring, std::shared_ptr< GeomAPI_Shape > > &theShapeName, std::map< std::wstring, std::vector< int >> &theColorsShape)=0 |
Set the map of name and color read shape in step file. More... | |
virtual void | clearShapeNameAndColor ()=0 |
Clear the map of name and color read shape in step file. More... | |
virtual std::wstring | findShapeName (std::shared_ptr< GeomAPI_Shape > theShape)=0 |
Find the name of shape read in step file. More... | |
virtual const std::vector< int > & | findShapeColor (const std::wstring &theShapeName)=0 |
Find the imported color by the construction name of a shape. More... | |
virtual bool | isConcealed () |
Returns true if the result is concealed from the data tree (referenced by other objects) More... | |
virtual void | setIsConcealed (const bool theValue, const bool theForced=false) |
Sets the result as concealed in the data tree (referenced by other objects) More... | |
virtual bool | setDisabled (std::shared_ptr< ModelAPI_Result > theThis, const bool theFlag) |
Enables/disables the result. More... | |
virtual bool | isDisabled () |
Returns the result is disabled or not. More... | |
virtual void | initAttributes () |
Request for initialization of data model of the result: adding all attributes. More... | |
virtual void | attributeChanged (const std::string &theID) |
On change of attribute of the result update presentation of this result: for the current moment there are only presentation attributes assigned to results. More... | |
virtual bool | isInHistory () |
By default object is displayed in the object browser. More... | |
virtual void | setInHistory (const std::shared_ptr< ModelAPI_Object > theObject, const bool theFlag) |
Makes object presented or not in the history of the created objects. More... | |
virtual std::shared_ptr< ModelAPI_Data > | data () const |
Returns the data manager of this object: attributes. More... | |
virtual bool | isSame (const std::shared_ptr< ModelAPI_Object > &theObject) |
Returns true if object refers to the same data model instance. More... | |
virtual std::shared_ptr< ModelAPI_Document > | document () const |
Returns document this feature belongs to. More... | |
virtual void | colorConfigInfo (std::string &, std::string &, std::string &) |
Returns the parameters of color definition in the resources config manager. More... | |
virtual bool | isDisplayed () |
Returns true if object must be displayed in the viewer: flag is stored in the data model, so on undo/redo, open/save or recreation of object by history-playing it keeps the original state in the current transaction. More... | |
virtual bool | hasTexture () |
virtual void | emptyFunction () const |
Empty function which is added for virtualiation of the interface. More... | |
Static Public Member Functions | |
static const std::string & | IMAGE_ID () |
Reference to the image attribute of the result body. More... | |
static std::string | group () |
Returns the group identifier of this result. More... | |
static const std::string & | DEFAULT_COLOR () |
default color for a result body More... | |
static const std::string | DEFAULT_DEFLECTION () |
default deflection for a result body More... | |
static const std::string & | COLOR_ID () |
Reference to the color of the result. More... | |
static const std::string & | DEFLECTION_ID () |
Reference to the deflection of the result. More... | |
static const std::string & | TRANSPARENCY_ID () |
Reference to the transparency of the result. More... | |
static const std::string & | ISO_LINES_ID () |
Reference to the transparency of the result. More... | |
static const std::string & | SHOW_ISO_LINES_ID () |
Reference to the transparency of the result. More... | |
static const std::string & | SHOW_EDGES_DIRECTION_ID () |
Reference to the transparency of the result. More... | |
static const std::string & | BRING_TO_FRONT_ID () |
Reference to the BringToFront flag of the result. More... | |
Protected Member Functions | |
ModelAPI_ResultBody () | |
Default constructor accessible only from Model_Objects. More... | |
virtual void | init () |
This method is called just after creation of the object: it must initialize all fields, normally initialized in the constructor. More... | |
virtual void | setData (std::shared_ptr< ModelAPI_Data > theData) |
Sets the data manager of an object (document does) More... | |
virtual void | setDoc (std::shared_ptr< ModelAPI_Document > theDoc) |
Sets the data manager of an object (document does) More... | |
virtual void | erase () |
removes all fields from this feature More... | |
Protected Attributes | |
ConnectedTopologyFlag | myConnect |
Keeps (not persistently) the connected topology flag. More... | |
ModelAPI_BodyBuilder * | myBuilder |
provides the body processing in naming shape More... | |
bool | myIsDisabled |
the result is disabled: removed for the user, but keeps the general info More... | |
The body (shape) result of a feature.
Provides a shape that may be displayed in the viewer. May provide really huge results, so, working with this kind of result must be optimized. Also provides a container of sub-body result in case it is compound or compsolid.
|
protected |
Default constructor accessible only from Model_Objects.
|
inlinestatic |
Reference to the image attribute of the result body.
|
virtual |
Returns the group identifier of this result.
Implements ModelAPI_Object.
|
inlinestatic |
Returns the group identifier of this result.
|
inlinestatic |
default color for a result body
|
inlinestatic |
default deflection for a result body
|
pure virtual |
Returns the number of sub-elements.
Implemented in Model_ResultBody.
|
pure virtual |
Returns the sub-result by zero-base index.
Implemented in Model_ResultBody.
|
pure virtual |
Returns true if theResult belong to this composite result as sub.
Returns theIndex - zero based index of sub if found
Implemented in Model_ResultBody.
|
virtual |
Stores the shape (called by the execution method).
param[in] theShape shape to store. param[in] theIsStoreSameShapes if false stores reference to the same shape if it is already in document.
|
virtual |
Stores the generated shape (called by the execution method).
|
virtual |
Stores the root modified shapes (called by the execution method).
|
virtual |
Stores the modified shape (called by the execution method).
|
virtual |
Stores the root modified shapes (called by the execution method).
|
virtual |
Returns the shape-result produced by this feature.
Reimplemented from ModelAPI_Result.
|
pure virtual |
Records the subshape newShape which was generated during a topological construction.
As an example, consider the case of a face generated in construction of a box. Returns true if it is stored correctly (the final shape contains this new sub-shape)
Implemented in Model_ResultBody.
|
virtual |
Records the shape newShape which was generated from the shape oldShape during a topological construction.
As an example, consider the case of a face generated from an edge in construction of a prism.
|
virtual |
Records the shape newShape which is a modification of the shape oldShape.
As an example, consider the case of a face split or merged in a Boolean operation.
|
virtual |
load deleted shapes
|
pure virtual |
load and orient modified shapes
Implemented in Model_ResultBody.
|
pure virtual |
load and orient generated shapes
Implemented in Model_ResultBody.
|
pure virtual |
load shapes of the first level (to be used during shape import)
Implemented in Model_ResultBody.
|
pure virtual |
Returns true is the topology is connected.
Implemented in Model_ResultBody.
|
virtual |
Set displayed flag to the result and all sub results.
theDisplay | a boolean value |
Reimplemented from ModelAPI_Object.
|
pure virtual |
Updates the sub-bodies if shape of this object is compsolid or compound.
Implemented in Model_ResultBody.
|
pure virtual |
Updates the sub-bodies in accordance to the algorithm history information.
Implemented in Model_ResultBody.
|
pure virtual |
Cleans cash related to the already stored elements.
Implemented in Model_ResultBody.
|
pure virtual |
Add shape Name for read shape in step file.
Implemented in Model_ResultBody.
|
pure virtual |
Add color for shape Name read shape in step file.
Implemented in Model_ResultBody.
|
pure virtual |
Set the map of name and color read shape in step file.
|
pure virtual |
Clear the map of name and color read shape in step file.
Implemented in Model_ResultBody.
|
pure virtual |
Find the name of shape read in step file.
Implemented in Model_ResultBody.
|
pure virtual |
Find the imported color by the construction name of a shape.
Returns empty vector if not found.
Implemented in Model_ResultBody.
|
inlinestaticinherited |
Reference to the color of the result.
The integer array is used. It contains three values for red, green and blue values. The values are in [0, 255] range
|
inlinestaticinherited |
Reference to the deflection of the result.
The double value is used. The value is in [0, 1] range
|
inlinestaticinherited |
Reference to the transparency of the result.
The double value is used. The value is in [0, 1] range
|
inlinestaticinherited |
Reference to the transparency of the result.
The double value is used. The value is in [0, 1] range
|
inlinestaticinherited |
Reference to the transparency of the result.
The double value is used. The value is in [0, 1] range
|
inlinestaticinherited |
Reference to the transparency of the result.
The double value is used. The value is in [0, 1] range
|
inlinestaticinherited |
Reference to the BringToFront flag of the result.
The bool value is used.
|
virtualinherited |
Returns true if the result is concealed from the data tree (referenced by other objects)
Reimplemented in Model_ResultBody.
|
virtualinherited |
Sets the result as concealed in the data tree (referenced by other objects)
Reimplemented in Model_ResultConstruction, and Model_ResultBody.
|
virtualinherited |
Enables/disables the result.
The disabled result does not participate in any calculation and visualization: like it was removed. But it keeps the general parameters: colors, visibility, etc.
theThis | pointer to this object, needed to generate all events if it is necessary |
theFlag | makes disabled if it is true |
Reimplemented in Model_ResultPart, and Model_ResultBody.
|
virtualinherited |
Returns the result is disabled or not.
Implements ModelAPI_Object.
|
virtualinherited |
Request for initialization of data model of the result: adding all attributes.
Implements ModelAPI_Object.
Reimplemented in ModelAPI_ResultParameter, Model_ResultPart, Model_ResultParameter, and Model_ResultBody.
|
virtualinherited |
On change of attribute of the result update presentation of this result: for the current moment there are only presentation attributes assigned to results.
Reimplemented from ModelAPI_Object.
|
protectedvirtualinherited |
This method is called just after creation of the object: it must initialize all fields, normally initialized in the constructor.
Implements ModelAPI_Object.
|
virtualinherited |
By default object is displayed in the object browser.
Reimplemented in SketchPlugin_Sketch, SketchPlugin_Feature, ParametersPlugin_ParametersMgr, ParametersPlugin_Parameter, Model_ResultConstruction, FiltersPlugin_Selection, FeaturesPlugin_RemoveResults, ExchangePlugin_ExportPart, and ExchangePlugin_ExportFeature.
|
virtualinherited |
Makes object presented or not in the history of the created objects.
theObject | is shared pointer to "this" |
theFlag | is boolean value: to add or remove from the history |
|
virtualinherited |
Returns the data manager of this object: attributes.
|
virtualinherited |
Returns true if object refers to the same data model instance.
|
virtualinherited |
Returns document this feature belongs to.
Reimplemented in ModelAPI_Feature, and Model_ResultField::Model_FieldStep.
|
inlinevirtualinherited |
Returns the parameters of color definition in the resources config manager.
Reimplemented in SketchPlugin_ConstraintRadius, SketchPlugin_ConstraintLength, SketchPlugin_ConstraintDistance, SketchPlugin_ConstraintAngle, Model_ResultPart, Model_ResultGroup, Model_ResultField, Model_ResultConstruction, and Model_ResultBody.
|
virtualinherited |
Returns true if object must be displayed in the viewer: flag is stored in the data model, so on undo/redo, open/save or recreation of object by history-playing it keeps the original state in the current transaction.
Reimplemented in ModelAPI_ResultField::ModelAPI_FieldStep.
|
protectedvirtualinherited |
Sets the data manager of an object (document does)
|
protectedvirtualinherited |
Sets the data manager of an object (document does)
|
protectedvirtualinherited |
removes all fields from this feature
Reimplemented in SketchPlugin_MultiTranslation, SketchPlugin_MultiRotation, SketchPlugin_ConstraintMirror, PartSetPlugin_Part, ModelAPI_Feature, and ModelAPI_CompositeFeature.
|
inlinevirtualinherited |
Empty function which is added for virtualiation of the interface.
|
protected |
Keeps (not persistently) the connected topology flag.
|
protected |
provides the body processing in naming shape
|
protectedinherited |
the result is disabled: removed for the user, but keeps the general info