SHAPER  9.12.0
ModelAPI_ResultPart Class Referenceabstract

The Part document, result of a creation of new part feature. More...

Inheritance diagram for ModelAPI_ResultPart:
Inheritance graph

Public Member Functions

virtual std::string groupName ()
 Returns the group identifier of this result. More...
 
virtual std::shared_ptr< ModelAPI_DocumentpartDoc ()=0
 Returns the part-document of this result. More...
 
virtual std::shared_ptr< ModelAPI_ResultPartoriginal ()=0
 Returns the original part result: for transformation features results this is the original Part feature result. More...
 
virtual void activate ()=0
 Sets this document as current and if it is not loaded yet, loads it. More...
 
virtual bool isActivated ()=0
 Returns true if document is activated (loaded into the memory) More...
 
virtual std::wstring nameInPart (const std::shared_ptr< GeomAPI_Shape > &theShape, int &theIndex)=0
 Returns the name of the shape inside of the part. More...
 
virtual bool updateInPart (const int theIndex)=0
 Updates the selection inside of the part by the selection index. More...
 
virtual void setTrsf (std::shared_ptr< ModelAPI_Result > theThis, const std::shared_ptr< GeomAPI_Trsf > &theTransformation)=0
 Applies the additional transformation of the part. More...
 
virtual std::shared_ptr< GeomAPI_TrsfsummaryTrsf ()=0
 Returns the summary transformations of all references to the origin. More...
 
virtual std::shared_ptr< GeomAPI_ShapeshapeInPart (const std::wstring &theName, const std::string &theType, int &theIndex)=0
 Returns the shape by the name in the part. More...
 
virtual bool combineGeometrical (const int theIndex, std::wstring &theNewName)=0
 Updates the selection inside of the part as a geometrical selection. More...
 
virtual std::shared_ptr< GeomAPI_ShapeselectionValue (const int theIndex)=0
 Returns the shape selected in the selection index. More...
 
virtual void updateShape ()=0
 Updates the shape-result of the part (called on Part feature execution) More...
 
virtual void loadPart ()=0
 Loading the part from file. 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 std::shared_ptr< GeomAPI_Shapeshape ()
 Returns the shape-result produced by this feature (or null if no shapes) 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_Datadata () 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_Documentdocument () 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 void setDisplayed (const bool theDisplay)
 Sets the displayed/hidden state of the object. More...
 
virtual bool hasTexture ()
 
virtual void emptyFunction () const
 Empty function which is added for virtualiation of the interface. More...
 

Static Public Member Functions

static std::string group ()
 Returns the group identifier of this result. More...
 
static const std::string & DOC_REF ()
 part document reference attribute More...
 
static const std::string & DEFAULT_COLOR ()
 default color 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

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

bool myIsDisabled
 the result is disabled: removed for the user, but keeps the general info More...
 

Detailed Description

The Part document, result of a creation of new part feature.

This result leaves without feature: no parametricity for this element, only add/remove, undo/redo.

Member Function Documentation

◆ groupName()

std::string ModelAPI_ResultPart::groupName ( )
virtual

Returns the group identifier of this result.

Implements ModelAPI_Object.

◆ group()

static std::string ModelAPI_ResultPart::group ( )
inlinestatic

Returns the group identifier of this result.

◆ DOC_REF()

static const std::string& ModelAPI_ResultPart::DOC_REF ( )
inlinestatic

part document reference attribute

◆ DEFAULT_COLOR()

static const std::string& ModelAPI_ResultPart::DEFAULT_COLOR ( )
inlinestatic

default color for a result body

◆ partDoc()

virtual std::shared_ptr<ModelAPI_Document> ModelAPI_ResultPart::partDoc ( )
pure virtual

Returns the part-document of this result.

Implemented in Model_ResultPart.

◆ original()

virtual std::shared_ptr<ModelAPI_ResultPart> ModelAPI_ResultPart::original ( )
pure virtual

Returns the original part result: for transformation features results this is the original Part feature result.

Implemented in Model_ResultPart.

◆ activate()

virtual void ModelAPI_ResultPart::activate ( )
pure virtual

Sets this document as current and if it is not loaded yet, loads it.

Implemented in Model_ResultPart.

◆ isActivated()

virtual bool ModelAPI_ResultPart::isActivated ( )
pure virtual

Returns true if document is activated (loaded into the memory)

Implemented in Model_ResultPart.

◆ nameInPart()

virtual std::wstring ModelAPI_ResultPart::nameInPart ( const std::shared_ptr< GeomAPI_Shape > &  theShape,
int &  theIndex 
)
pure virtual

Returns the name of the shape inside of the part.

Implemented in Model_ResultPart.

◆ updateInPart()

virtual bool ModelAPI_ResultPart::updateInPart ( const int  theIndex)
pure virtual

Updates the selection inside of the part by the selection index.

Implemented in Model_ResultPart.

◆ setTrsf()

virtual void ModelAPI_ResultPart::setTrsf ( std::shared_ptr< ModelAPI_Result theThis,
const std::shared_ptr< GeomAPI_Trsf > &  theTransformation 
)
pure virtual

Applies the additional transformation of the part.

Implemented in Model_ResultPart.

◆ summaryTrsf()

virtual std::shared_ptr<GeomAPI_Trsf> ModelAPI_ResultPart::summaryTrsf ( )
pure virtual

Returns the summary transformations of all references to the origin.

Implemented in Model_ResultPart.

◆ shapeInPart()

virtual std::shared_ptr<GeomAPI_Shape> ModelAPI_ResultPart::shapeInPart ( const std::wstring &  theName,
const std::string &  theType,
int &  theIndex 
)
pure virtual

Returns the shape by the name in the part.

Implemented in Model_ResultPart.

◆ combineGeometrical()

virtual bool ModelAPI_ResultPart::combineGeometrical ( const int  theIndex,
std::wstring &  theNewName 
)
pure virtual

Updates the selection inside of the part as a geometrical selection.

Implemented in Model_ResultPart.

◆ selectionValue()

virtual std::shared_ptr<GeomAPI_Shape> ModelAPI_ResultPart::selectionValue ( const int  theIndex)
pure virtual

Returns the shape selected in the selection index.

Implemented in Model_ResultPart.

◆ updateShape()

virtual void ModelAPI_ResultPart::updateShape ( )
pure virtual

Updates the shape-result of the part (called on Part feature execution)

Implemented in Model_ResultPart.

◆ loadPart()

virtual void ModelAPI_ResultPart::loadPart ( )
pure virtual

Loading the part from file.

Implemented in Model_ResultPart.

◆ COLOR_ID()

static const std::string& ModelAPI_Result::COLOR_ID ( )
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

◆ DEFLECTION_ID()

static const std::string& ModelAPI_Result::DEFLECTION_ID ( )
inlinestaticinherited

Reference to the deflection of the result.

The double value is used. The value is in [0, 1] range

◆ TRANSPARENCY_ID()

static const std::string& ModelAPI_Result::TRANSPARENCY_ID ( )
inlinestaticinherited

Reference to the transparency of the result.

The double value is used. The value is in [0, 1] range

◆ ISO_LINES_ID()

static const std::string& ModelAPI_Result::ISO_LINES_ID ( )
inlinestaticinherited

Reference to the transparency of the result.

The double value is used. The value is in [0, 1] range

◆ SHOW_ISO_LINES_ID()

static const std::string& ModelAPI_Result::SHOW_ISO_LINES_ID ( )
inlinestaticinherited

Reference to the transparency of the result.

The double value is used. The value is in [0, 1] range

◆ SHOW_EDGES_DIRECTION_ID()

static const std::string& ModelAPI_Result::SHOW_EDGES_DIRECTION_ID ( )
inlinestaticinherited

Reference to the transparency of the result.

The double value is used. The value is in [0, 1] range

◆ BRING_TO_FRONT_ID()

static const std::string& ModelAPI_Result::BRING_TO_FRONT_ID ( )
inlinestaticinherited

Reference to the BringToFront flag of the result.

The bool value is used.

◆ isConcealed()

bool ModelAPI_Result::isConcealed ( )
virtualinherited

Returns true if the result is concealed from the data tree (referenced by other objects)

Reimplemented in Model_ResultBody.

◆ setIsConcealed()

void ModelAPI_Result::setIsConcealed ( const bool  theValue,
const bool  theForced = false 
)
virtualinherited

Sets the result as concealed in the data tree (referenced by other objects)

Reimplemented in Model_ResultConstruction, and Model_ResultBody.

◆ setDisabled()

bool ModelAPI_Result::setDisabled ( std::shared_ptr< ModelAPI_Result theThis,
const bool  theFlag 
)
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.

Parameters
theThispointer to this object, needed to generate all events if it is necessary
theFlagmakes disabled if it is true
Returns
true if state is really changed

Reimplemented in Model_ResultPart, and Model_ResultBody.

◆ isDisabled()

bool ModelAPI_Result::isDisabled ( )
virtualinherited

Returns the result is disabled or not.

Implements ModelAPI_Object.

◆ initAttributes()

void ModelAPI_Result::initAttributes ( )
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.

◆ shape()

std::shared_ptr< GeomAPI_Shape > ModelAPI_Result::shape ( )
virtualinherited

Returns the shape-result produced by this feature (or null if no shapes)

Reimplemented in ModelAPI_ResultBody, Model_ResultPart, Model_ResultGroup, Model_ResultField, and Model_ResultConstruction.

◆ attributeChanged()

void ModelAPI_Result::attributeChanged ( const std::string &  theID)
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.

◆ init()

void ModelAPI_Result::init ( )
protectedvirtualinherited

This method is called just after creation of the object: it must initialize all fields, normally initialized in the constructor.

Implements ModelAPI_Object.

◆ isInHistory()

bool ModelAPI_Object::isInHistory ( )
virtualinherited

◆ setInHistory()

void ModelAPI_Object::setInHistory ( const std::shared_ptr< ModelAPI_Object theObject,
const bool  theFlag 
)
virtualinherited

Makes object presented or not in the history of the created objects.

Parameters
theObjectis shared pointer to "this"
theFlagis boolean value: to add or remove from the history

◆ data()

std::shared_ptr< ModelAPI_Data > ModelAPI_Object::data ( ) const
virtualinherited

Returns the data manager of this object: attributes.

◆ isSame()

bool ModelAPI_Object::isSame ( const std::shared_ptr< ModelAPI_Object > &  theObject)
virtualinherited

Returns true if object refers to the same data model instance.

◆ document()

std::shared_ptr< ModelAPI_Document > ModelAPI_Object::document ( ) const
virtualinherited

Returns document this feature belongs to.

Reimplemented in ModelAPI_Feature, and Model_ResultField::Model_FieldStep.

◆ colorConfigInfo()

virtual void ModelAPI_Object::colorConfigInfo ( std::string &  ,
std::string &  ,
std::string &   
)
inlinevirtualinherited

◆ isDisplayed()

bool ModelAPI_Object::isDisplayed ( )
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.

◆ setDisplayed()

void ModelAPI_Object::setDisplayed ( const bool  theDisplay)
virtualinherited

Sets the displayed/hidden state of the object.

If it is changed, sends the "redisplay" signal.

Reimplemented in ModelAPI_ResultField, ModelAPI_ResultField::ModelAPI_FieldStep, and ModelAPI_ResultBody.

◆ setData()

void ModelAPI_Object::setData ( std::shared_ptr< ModelAPI_Data theData)
protectedvirtualinherited

Sets the data manager of an object (document does)

◆ setDoc()

void ModelAPI_Object::setDoc ( std::shared_ptr< ModelAPI_Document theDoc)
protectedvirtualinherited

Sets the data manager of an object (document does)

◆ erase()

void ModelAPI_Object::erase ( )
protectedvirtualinherited

◆ emptyFunction()

virtual void ModelAPI_Entity::emptyFunction ( ) const
inlinevirtualinherited

Empty function which is added for virtualiation of the interface.

Field Documentation

◆ myIsDisabled

bool ModelAPI_Result::myIsDisabled
protectedinherited

the result is disabled: removed for the user, but keeps the general info