|
SHAPER
9.15.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 | ~Model_ResultBody () |
| Removes the stored builders. More... | |
| virtual void | initAttributes () |
| Request for initialization of data model of the result body: adding all attributes. More... | |
| virtual bool | generated (const GeomShapePtr &theNewShape, const std::string &theName, const bool theCheckIsInResult=true) override |
| Records the subshape newShape which was generated during a topological construction. 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) override |
| load generated shapes More... | |
| virtual void | loadModifiedShapes (const std::shared_ptr< GeomAlgoAPI_MakeShape > &theAlgo, const GeomShapePtr &theOldShape, const GeomAPI_Shape::ShapeType theShapeTypeToExplore, const std::string &theName="") override |
| load modified shapes for sub-objects More... | |
| virtual void | loadFirstLevel (GeomShapePtr theShape, const std::string &theName) |
| load shapes of the first level (to be used during shape import) More... | |
| virtual int | numberOfSubs (bool forTree=false) const |
| Returns the number of sub-elements. More... | |
| virtual ResultBodyPtr | subResult (const int theIndex, bool forTree=false) const |
| Returns the sub-result by zero-base index. More... | |
| virtual bool | isSub (ObjectPtr theObject, int &theIndex) const |
| Returns true if feature or result belong to this composite feature as subs Returns theIndex - zero based index of sub if found. More... | |
| virtual void | colorConfigInfo (std::string &theSection, std::string &theName, std::string &theDefault) |
| Returns the parameters of color definition in the resources configuration manager. More... | |
| virtual bool | setDisabled (std::shared_ptr< ModelAPI_Result > theThis, const bool theFlag) |
| Disables the result body: keeps the resulting shape as selection, but erases the underlying naming data structure if theFlag if false. More... | |
| virtual bool | isConcealed () |
| The compsolid is concealed if at least one of the sub is concealed. More... | |
| virtual void | setIsConcealed (const bool theValue, const bool theForced=false) |
| Sets all subs as concealed in the data tree (referenced by other objects) More... | |
| virtual bool | isConnectedTopology () |
| Returns true is the topology is connected. More... | |
| virtual void | cleanCash () override |
| Cleans cash related to the already stored elements. More... | |
| virtual bool | hasTexture () override |
| sets the texture file More... | |
| virtual const std::vector< int > & | findShapeColor (const std::wstring &theShapeName) |
| Find the imported color by the construction name of a shape. More... | |
| virtual void | setSubShapeColorIfAny (const std::shared_ptr< ModelAPI_Result > theResult, const std::shared_ptr< GeomAPI_Shape > theShape) |
| Add color to sub shape. More... | |
| virtual std::string | groupName () |
| Returns the group identifier of this result. 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 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 | setDisplayed (const bool theDisplay) |
| Set displayed flag to the result and all sub results. 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 bool | isDisabled () |
| Returns the result is disabled or not. More... | |
| virtual ListOfShape | vertices (const bool theOnlyUnique=false) |
| Returns all the vertices of this result. More... | |
| virtual ListOfShape | edges (const bool theOnlyUnique=false) |
| Returns all the edges of this result. More... | |
| virtual ListOfShape | wires (const bool theOnlyUnique=false) |
| Returns all the wires of this result. More... | |
| virtual ListOfShape | faces (const bool theOnlyUnique=false) |
| Returns all the faces of this result. More... | |
| virtual ListOfShape | shells (const bool theOnlyUnique=false) |
| Returns all the shells of this result. More... | |
| virtual ListOfShape | solids (const bool theOnlyUnique=false) |
| Returns all the solids of this result. 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 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 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 | |
| Model_ResultBody () | |
| Makes a body on the given feature. More... | |
| void | updateSubs (const std::shared_ptr< GeomAPI_Shape > &theThisShape, const bool theShapeChanged=true) |
| Updates the sub-bodies if shape of this object is composite-solid. More... | |
| void | updateSubs (const GeomShapePtr &theThisShape, const std::list< GeomShapePtr > &theOlds, const std::shared_ptr< GeomAlgoAPI_MakeShape > theMakeShape, const bool isGenerated) |
| Updates the sub-bodies in accordance to the algorithm history information. More... | |
| void | updateConcealment () |
| Checks the state of children and parents to send events of creation/erase when needed. More... | |
| void | computeOldForSub (const GeomShapePtr &theSub, const std::list< GeomShapePtr > &theAllOlds, std::list< GeomShapePtr > &theOldForSub) |
| Adds to theOldForSub only old shapes that where used for theSub creation. More... | |
| std::wstring | addShapeName (std::shared_ptr< GeomAPI_Shape > theShape, const std::wstring &theName) override |
| Add shape Name for read shape in step file. More... | |
| void | addShapeColor (const std::wstring &theName, std::vector< int > &theColor) override |
| Add color for shape Name read shape in step file. More... | |
| void | setSubShapeColor (const std::shared_ptr< ModelAPI_Result > theResult, const std::shared_ptr< GeomAPI_Shape > theShape, const std::vector< int > &theColor) |
| Add color to sub shape. More... | |
| void | getSubShapeColor (const std::shared_ptr< ModelAPI_Result > theResult, const std::shared_ptr< GeomAPI_Shape > theShape, std::vector< int > &theColor) |
| Get color from sub shape. More... | |
| void | getColoredSubShapes (const std::shared_ptr< ModelAPI_Result > theResult, std::map< std::shared_ptr< GeomAPI_Shape >, std::vector< int >> &theColoredShapes) |
| Get colored shapes from result. More... | |
| void | removeSubShapeColors (const std::shared_ptr< ModelAPI_Result > theResult) |
| Forget subshape colors. More... | |
| void | setShapeName (std::map< std::wstring, std::shared_ptr< GeomAPI_Shape >> &theShapeName, std::map< std::wstring, std::vector< int >> &theColorsShape) override |
| Set the map of name and color read shape in step file. More... | |
| virtual MODELAPI_EXPORT std::shared_ptr< ModelAPI_AttributeSelection > | selection () |
| Return Attribute selection. More... | |
| std::wstring | findShapeName (std::shared_ptr< GeomAPI_Shape > theShape) override |
| Find the name of shape read in step file. More... | |
| void | clearShapeNameAndColor () override |
| Clear the map of name and color read shape in step file. 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 | |
| std::map< std::wstring, std::shared_ptr< GeomAPI_Shape > > | myNamesOfShapes |
| map with the name read in step file and shape More... | |
| int | myLastEmptyNameIndex |
| std::map< std::wstring, std::vector< int > > | myColorsShape |
| map from the construction name to the imported color More... | |
| 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... | |
Friends | |
| class | Model_Objects |
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.
|
inherited |
|
virtual |
Removes the stored builders.
|
protected |
Makes a body on the given feature.
|
virtual |
Request for initialization of data model of the result body: adding all attributes.
Reimplemented from ModelAPI_Result.
|
overridevirtual |
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.
Implements ModelAPI_ResultBody.
|
overridevirtual |
load generated shapes
Implements ModelAPI_ResultBody.
|
overridevirtual |
load modified shapes for sub-objects
Implements ModelAPI_ResultBody.
|
virtual |
load shapes of the first level (to be used during shape import)
Implements ModelAPI_ResultBody.
|
virtual |
Returns the number of sub-elements.
Implements ModelAPI_ResultBody.
|
virtual |
Returns the sub-result by zero-base index.
Implements ModelAPI_ResultBody.
|
virtual |
Returns true if feature or result belong to this composite feature as subs Returns theIndex - zero based index of sub if found.
Implements ModelAPI_ResultBody.
|
virtual |
Returns the parameters of color definition in the resources configuration manager.
Reimplemented from ModelAPI_Object.
|
virtual |
Disables the result body: keeps the resulting shape as selection, but erases the underlying naming data structure if theFlag if false.
Or restores every thing on theFlag is true.
Reimplemented from ModelAPI_Result.
|
virtual |
The compsolid is concealed if at least one of the sub is concealed.
Reimplemented from ModelAPI_Result.
|
virtual |
Sets all subs as concealed in the data tree (referenced by other objects)
Reimplemented from ModelAPI_Result.
|
virtual |
Returns true is the topology is connected.
Implements ModelAPI_ResultBody.
|
overridevirtual |
Cleans cash related to the already stored elements.
Implements ModelAPI_ResultBody.
|
overridevirtual |
sets the texture file
Reimplemented from ModelAPI_Object.
|
virtual |
Find the imported color by the construction name of a shape.
Returns empty vector if not found.
Implements ModelAPI_ResultBody.
|
virtual |
Add color to sub shape.
Implements ModelAPI_ResultBody.
|
protectedvirtual |
Updates the sub-bodies if shape of this object is composite-solid.
Implements ModelAPI_ResultBody.
|
protectedvirtual |
Updates the sub-bodies in accordance to the algorithm history information.
Implements ModelAPI_ResultBody.
|
protected |
Checks the state of children and parents to send events of creation/erase when needed.
|
protected |
Adds to theOldForSub only old shapes that where used for theSub creation.
|
overrideprotectedvirtual |
Add shape Name for read shape in step file.
Implements ModelAPI_ResultBody.
|
overrideprotectedvirtual |
Add color for shape Name read shape in step file.
Implements ModelAPI_ResultBody.
|
protectedvirtual |
Add color to sub shape.
Implements ModelAPI_ResultBody.
|
protectedvirtual |
Get color from sub shape.
Implements ModelAPI_ResultBody.
|
protectedvirtual |
Get colored shapes from result.
Implements ModelAPI_ResultBody.
|
protectedvirtual |
Forget subshape colors.
Implements ModelAPI_ResultBody.
|
overrideprotected |
Set the map of name and color read shape in step file.
|
protectedvirtual |
Return Attribute selection.
Implements ModelAPI_ResultBody.
|
overrideprotectedvirtual |
Find the name of shape read in step file.
Implements ModelAPI_ResultBody.
|
overrideprotectedvirtual |
Clear the map of name and color read shape in step file.
Implements ModelAPI_ResultBody.
|
inlinestaticinherited |
Reference to the image attribute of the result body.
|
virtualinherited |
Returns the group identifier of this result.
Implements ModelAPI_Object.
|
inlinestaticinherited |
Returns the group identifier of this result.
|
inlinestaticinherited |
default color for a result body
|
inlinestaticinherited |
default deflection for a result body
|
virtualinherited |
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.
|
virtualinherited |
Stores the generated shape (called by the execution method).
|
virtualinherited |
Stores the root modified shapes (called by the execution method).
|
virtualinherited |
Stores the modified shape (called by the execution method).
|
virtualinherited |
Stores the root modified shapes (called by the execution method).
|
virtualinherited |
Returns the shape-result produced by this feature.
Reimplemented from ModelAPI_Result.
|
virtualinherited |
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.
|
virtualinherited |
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.
|
virtualinherited |
load deleted shapes
|
virtualinherited |
Set displayed flag to the result and all sub results.
| theDisplay | a boolean value |
Reimplemented from ModelAPI_Object.
|
pure virtualinherited |
Set the map of name and color read shape in step file.
|
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 the result is disabled or not.
Implements ModelAPI_Object.
|
virtualinherited |
Returns all the vertices of this result.
|
virtualinherited |
Returns all the edges of this result.
|
virtualinherited |
Returns all the wires of this result.
|
virtualinherited |
Returns all the faces of this result.
|
virtualinherited |
Returns all the shells of this result.
|
virtualinherited |
Returns all the solids of this result.
|
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.
|
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 |
map with the name read in step file and shape
|
protected |
map from the construction name to the imported color
|
protectedinherited |
Keeps (not persistently) the connected topology flag.
|
protectedinherited |
provides the body processing in naming shape
|
protectedinherited |
the result is disabled: removed for the user, but keeps the general info