SHAPER  9.12.0
Model_ResultPart Class Reference

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

Inheritance diagram for Model_ResultPart:
Inheritance graph

Public Member Functions

virtual void initAttributes ()
 Request for initialization of data model of the result: adding all attributes. More...
 
virtual std::shared_ptr< ModelAPI_DocumentpartDoc ()
 Returns the part-document of this result. More...
 
virtual std::shared_ptr< ModelAPI_ResultPartoriginal ()
 Returns the original part result: for transformation features results this is the original Part feature result. More...
 
virtual void activate ()
 Sets this document as current and if it is not loaded yet, loads it. More...
 
virtual bool setDisabled (std::shared_ptr< ModelAPI_Result > theThis, const bool theFlag)
 disable all feature of the part on disable of the part result More...
 
virtual std::shared_ptr< GeomAPI_Shapeshape ()
 Result shape of part document is compound of bodies inside of this part. More...
 
virtual std::wstring nameInPart (const std::shared_ptr< GeomAPI_Shape > &theShape, int &theIndex)
 Returns the name of the shape inside of the part. More...
 
virtual bool updateInPart (const int theIndex)
 Updates the selection inside of the part by the selection index. More...
 
virtual std::shared_ptr< GeomAPI_ShapeshapeInPart (const std::wstring &theName, const std::string &theType, int &theIndex)
 Returns the shape by the name in the part. More...
 
virtual bool combineGeometrical (const int theIndex, std::wstring &theNewName)
 Updates the selection inside of the part as a geometrical selection. More...
 
virtual void updateShape ()
 Updates the shape-result of the part (called on Part feature execution) More...
 
virtual void setTrsf (std::shared_ptr< ModelAPI_Result > theThis, const std::shared_ptr< GeomAPI_Trsf > &theTransformation)
 Applies the additional transformation of the part. More...
 
virtual std::shared_ptr< GeomAPI_TrsfsummaryTrsf ()
 Returns the summary transformations of all references to the origin. More...
 
virtual void colorConfigInfo (std::string &theSection, std::string &theName, std::string &theDefault)
 Returns the parameters of color definition in the resources config manager. More...
 
virtual std::shared_ptr< GeomAPI_ShapeselectionValue (const int theIndex)
 Returns the shape selected in the selection index. More...
 
virtual void loadPart ()
 Loading the part from file. More...
 
virtual std::string groupName ()
 Returns the group identifier of this result. 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 isDisabled ()
 Returns the result is disabled or not. 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 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 const std::string & BASE_REF_ID ()
 the reference to the base result document, may be null if this is the root, others make sequence of references More...
 
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

 Model_ResultPart ()
 makes a result on a temporary feature (an action) More...
 
gp_Trsf sumTrsf ()
 returns sum of transformations of the whole sequence of transformation-parts More...
 
virtual bool isActivated ()
 Returns true if document is activated (loaded into the memory) 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

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

Friends

class Model_Objects
 

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.

Constructor & Destructor Documentation

◆ Model_ResultPart()

Model_ResultPart::Model_ResultPart ( )
protected

makes a result on a temporary feature (an action)

Member Function Documentation

◆ BASE_REF_ID()

static const std::string& Model_ResultPart::BASE_REF_ID ( )
inlinestatic

the reference to the base result document, may be null if this is the root, others make sequence of references

◆ initAttributes()

void Model_ResultPart::initAttributes ( )
virtual

Request for initialization of data model of the result: adding all attributes.

Reimplemented from ModelAPI_Result.

◆ partDoc()

std::shared_ptr< ModelAPI_Document > Model_ResultPart::partDoc ( )
virtual

Returns the part-document of this result.

Implements ModelAPI_ResultPart.

◆ original()

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

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

Implements ModelAPI_ResultPart.

◆ activate()

void Model_ResultPart::activate ( )
virtual

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

Implements ModelAPI_ResultPart.

◆ setDisabled()

bool Model_ResultPart::setDisabled ( std::shared_ptr< ModelAPI_Result theThis,
const bool  theFlag 
)
virtual

disable all feature of the part on disable of the part result

Reimplemented from ModelAPI_Result.

◆ shape()

std::shared_ptr< GeomAPI_Shape > Model_ResultPart::shape ( )
virtual

Result shape of part document is compound of bodies inside of this part.

Reimplemented from ModelAPI_Result.

◆ nameInPart()

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

Returns the name of the shape inside of the part.

Parameters
theShapeselected shape in this document
theIndexis returned as one-based index if selection was required, "0" otherwise
Returns
empty name is selection is not correct

Implements ModelAPI_ResultPart.

◆ updateInPart()

bool Model_ResultPart::updateInPart ( const int  theIndex)
virtual

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

Implements ModelAPI_ResultPart.

◆ shapeInPart()

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

Returns the shape by the name in the part.

Implements ModelAPI_ResultPart.

◆ combineGeometrical()

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

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

Implements ModelAPI_ResultPart.

◆ updateShape()

void Model_ResultPart::updateShape ( )
virtual

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

Implements ModelAPI_ResultPart.

◆ setTrsf()

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

Applies the additional transformation of the part.

Implements ModelAPI_ResultPart.

◆ summaryTrsf()

std::shared_ptr< GeomAPI_Trsf > Model_ResultPart::summaryTrsf ( )
virtual

Returns the summary transformations of all references to the origin.

Implements ModelAPI_ResultPart.

◆ colorConfigInfo()

void Model_ResultPart::colorConfigInfo ( std::string &  theSection,
std::string &  theName,
std::string &  theDefault 
)
virtual

Returns the parameters of color definition in the resources config manager.

Reimplemented from ModelAPI_Object.

◆ selectionValue()

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

Returns the shape selected in the selection index.

Implements ModelAPI_ResultPart.

◆ loadPart()

void Model_ResultPart::loadPart ( )
virtual

Loading the part from file.

Implements ModelAPI_ResultPart.

◆ sumTrsf()

gp_Trsf Model_ResultPart::sumTrsf ( )
protected

returns sum of transformations of the whole sequence of transformation-parts

◆ isActivated()

bool Model_ResultPart::isActivated ( )
protectedvirtual

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

Implements ModelAPI_ResultPart.

◆ groupName()

std::string ModelAPI_ResultPart::groupName ( )
virtualinherited

Returns the group identifier of this result.

Implements ModelAPI_Object.

◆ group()

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

Returns the group identifier of this result.

◆ DOC_REF()

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

part document reference attribute

◆ DEFAULT_COLOR()

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

default color for a result body

◆ 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.

◆ isDisabled()

bool ModelAPI_Result::isDisabled ( )
virtualinherited

Returns the result is disabled or not.

Implements ModelAPI_Object.

◆ 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.

◆ 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