SHAPER  9.12.0
FeaturesPlugin_ExtrusionBoolean Class Reference

Interface for the composite extrusion feature. More...

Inheritance diagram for FeaturesPlugin_ExtrusionBoolean:
Inheritance graph

Public Types

enum  OperationType { BOOL_CUT , BOOL_FUSE , BOOL_COMMON , BOOL_SMASH }
 

Public Member Functions

virtual void initAttributes ()
 Request for initialization of data model of the feature: adding all attributes. More...
 
virtual const std::string & getKind ()
 
virtual void execute ()
 Performs the algorithm and stores results it in the data structure. More...
 
virtual std::shared_ptr< ModelAPI_FeatureaddFeature (std::string theID)
 Appends a feature to the sketch sub-elements container. More...
 
virtual int numberOfSubs (bool forTree=false) const
 
virtual std::shared_ptr< ModelAPI_FeaturesubFeature (const int theIndex, bool forTree=false)
 
virtual int subFeatureId (const int theIndex) const
 
virtual bool isSub (ObjectPtr theObject) const
 
virtual void removeFeature (std::shared_ptr< ModelAPI_Feature > theFeature)
 This method to inform that sub-feature is removed and must be removed from the internal data structures of the owner (the remove from the document will be done outside just after). More...
 
virtual void erase ()
 in addition removes all subs More...
 
virtual std::shared_ptr< ModelAPI_Documentdocument () const
 Returns document this feature belongs to. More...
 
std::shared_ptr< ModelAPI_AttributeDocRefdocument (const std::string &theID)
 Returns the document reference attribute. More...
 
virtual std::string groupName ()
 Returns the group identifier of this result. More...
 
virtual bool compute (const std::string &)
 Computes the attribute value on the base of other attributes if the value can be computed. More...
 
virtual MODELAPI_EXPORT void setError (const std::string &theError, bool isSend=true, bool isTranslate=true)
 Registers error during the execution, causes the ExecutionFailed state. More...
 
virtual std::string error () const
 Returns error, arose during the execution. More...
 
MODELAPI_EXPORT const std::list< std::shared_ptr< ModelAPI_Result > > & results ()
 returns the current results of the feature More...
 
MODELAPI_EXPORT std::shared_ptr< ModelAPI_ResultfirstResult () const
 returns the first result in the list or NULL reference More...
 
MODELAPI_EXPORT std::shared_ptr< ModelAPI_ResultlastResult ()
 returns the last result in the list or NULL reference More...
 
MODELAPI_EXPORT void setResult (const std::shared_ptr< ModelAPI_Result > &theResult)
 sets the alone result More...
 
MODELAPI_EXPORT void setResult (const std::shared_ptr< ModelAPI_Result > &theResult, const int theIndex)
 sets the result by index (zero based), results before this must be set before More...
 
MODELAPI_EXPORT void removeResults (const int theSinceIndex, const bool theForever=true, const bool theFlush=true)
 removes all results starting from the given index (zero-based) More...
 
MODELAPI_EXPORT void eraseResults (const bool theForever=true)
 removes all results from the feature More...
 
MODELAPI_EXPORT void eraseResultFromList (const std::shared_ptr< ModelAPI_Result > &theResult)
 removes the result from the list of feature (not doing in disabled): normally this method is not used from features. More...
 
virtual bool isPersistentResult ()
 Returns true if result is persistent (stored in document) and on undo-redo, save-open it is not needed to recompute it. More...
 
virtual bool isAction ()
 Returns true if this feature must not be created: this is just an action that is not stored in the features history and data model (like "delete part"). More...
 
virtual MODELAPI_EXPORT bool isMacro () const
 Returns true if this feature is used as macro: creates other features and then removed. More...
 
virtual MODELAPI_EXPORT bool isPreviewNeeded () const
 Returns true if preview update during the edition needed. More...
 
virtual MODELAPI_EXPORT const std::string & documentToAdd ()
 Must return document where the new feature must be added to By default it is empty: it is added to the document this method is called to. More...
 
virtual MODELAPI_EXPORT bool setDisabled (const bool theFlag)
 Enables/disables the feature. More...
 
virtual MODELAPI_EXPORT bool isDisabled ()
 Returns the feature is disabled or not. More...
 
virtual MODELAPI_EXPORT bool setStable (const bool theFlag)
 Set the stable feature flag. More...
 
virtual MODELAPI_EXPORT bool isStable ()
 Returns the feature is stable or not. More...
 
virtual MODELAPI_EXPORT bool isEditable ()
 Returns the feature is editable or not. Most of features are editable. More...
 
virtual MODELAPI_EXPORT bool customAction (const std::string &theActionId)
 Performs some custom feature specific functionality (normally called by some GUI button) More...
 
std::wstring name ()
 Returns the name stored in the attribute. More...
 
std::shared_ptr< ModelAPI_AttributeBooleanboolean (const std::string &theID)
 Returns the Boolean attribute by the identifier. More...
 
std::shared_ptr< ModelAPI_AttributeDoublereal (const std::string &theID)
 Returns the real attribute by the identifier. More...
 
std::shared_ptr< ModelAPI_AttributeIntegerinteger (const std::string &theID)
 Returns the integer attribute by the identifier. More...
 
std::shared_ptr< ModelAPI_AttributeIntArrayintArray (const std::string &theID)
 Returns the integer array attribute by the identifier. More...
 
std::shared_ptr< ModelAPI_AttributeRefAttrrefattr (const std::string &theID)
 Returns the reference attribute by the identifier. More...
 
std::shared_ptr< ModelAPI_AttributeRefAttrListrefattrlist (const std::string &theID)
 Returns the refattrlist attribute by the identifier. More...
 
std::shared_ptr< ModelAPI_AttributeReferencereference (const std::string &theID)
 Returns the reference attribute by the identifier. More...
 
std::shared_ptr< ModelAPI_AttributeRefListreflist (const std::string &theID)
 Returns the list of references attribute by the identifier. More...
 
std::shared_ptr< ModelAPI_AttributeSelectionselection (const std::string &theID)
 Returns the shape selection attribute by the identifier. More...
 
std::shared_ptr< ModelAPI_AttributeSelectionListselectionList (const std::string &theID)
 Returns the list of shape selections attribute by the identifier. More...
 
std::shared_ptr< ModelAPI_AttributeStringstring (const std::string &theID)
 Returns the string attribute by the identifier. More...
 
std::shared_ptr< ModelAPI_AttributeStringArraystringArray (const std::string &theID)
 Returns the string array attribute by the identifier. More...
 
std::shared_ptr< ModelAPI_AttributeTablestables (const std::string &theID)
 Returns the tables attribute by the identifier. More...
 
std::shared_ptr< ModelAPI_Attributeattribute (const std::string &theID)
 Returns the attribute by the identifier. 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 void colorConfigInfo (std::string &, std::string &, std::string &)
 Returns the parameters of color definition in the resources config manager. More...
 
virtual void attributeChanged (const std::string &theID)
 Called on change of any argument-attribute of this object. 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...
 
virtual void executeCompositeBoolean ()
 Performs the algorithm and stores results it in the data structure. More...
 
const OperationType & operationType () const
 

Static Public Member Functions

static const std::string & ID ()
 Feature kind. More...
 
static const std::string & CREATION_METHOD ()
 Attribute name for creation method. More...
 
static const std::string & CREATION_METHOD_BY_SIZES ()
 Attribute name for creation method. More...
 
static const std::string & CREATION_METHOD_BY_PLANES ()
 Attribute name for creation method. More...
 
static const std::string & CREATION_METHOD_THROUGH_ALL ()
 Attribute name for creation method. More...
 
static const std::string & DIRECTION_OBJECT_ID ()
 Attribute name of an object to which the extrusion grows. More...
 
static const std::string & TO_SIZE_ID ()
 Attribute name of extrusion to size. More...
 
static const std::string & FROM_SIZE_ID ()
 Attribute name of extrusion from size. More...
 
static const std::string & TO_OBJECT_ID ()
 Attribute name of an object to which the extrusion grows. More...
 
static const std::string & TO_OFFSET_ID ()
 Attribute name of extrusion offset. More...
 
static const std::string & FROM_OBJECT_ID ()
 Attribute name of an object from which the extrusion grows. More...
 
static const std::string & FROM_OFFSET_ID ()
 Attribute name of extrusion offset. More...
 
static const std::string & SKETCH_ID ()
 Attribute name of sketch feature. More...
 
static const std::string & BASE_OBJECTS_ID ()
 Attribute name of base objects. More...
 
static std::string group ()
 Returns the group identifier of all features. More...
 
static MODELAPI_EXPORT std::shared_ptr< ModelAPI_Featurefeature (ObjectPtr theObject)
 Returns the feature by the object (result). More...
 
static const std::string & OBJECTS_ID ()
 Attribute name of main objects. More...
 

Protected Types

enum  InitFlags { InitSketchLauncher = 1 << 0 , InitBaseObjectsList = 1 << 1 }
 

Protected Member Functions

bool makeGeneration (ListOfShape &theBaseShapes, ListOfMakeShape &theMakeShapes)
 This function need to be defined for extrusion/revolution generation. More...
 
void storeGenerationHistory (ResultBodyPtr theResultBody, const GeomShapePtr theBaseShape, const std::shared_ptr< GeomAlgoAPI_MakeShape > theMakeShape)
 Stores generation history. More...
 
virtual void getSizes (double &theToSize, double &theFromSize)
 Calculate prism sizes to ensure that it passes through all objects Redefined from FeaturesPlugin_Extrusion. More...
 
bool makeExtrusions (ListOfShape &theBaseShapes, ListOfShape &theBoundaryShapes, ListOfMakeShape &theMakeShapes)
 Generates extrusions. More...
 
void storeResultWithBoundaries (const GeomShapePtr theBaseShape, const ListOfShape &theBoundaryShapes, const std::shared_ptr< GeomAlgoAPI_MakeShape > theMakeShape, const int theIndex=0)
 Stores result of generation. More...
 
void getDirection (std::shared_ptr< GeomAPI_Dir > &theDir)
 Retrieve direction argument. More...
 
void initCompositeSketchAttribtues (const int theInitFlags)
 Initializes composite sketch attributes. More...
 
void getBaseShapes (ListOfShape &theBaseShapesList, const bool theIsMakeShells=true)
 Returns list of base shapes. More...
 
void storeResult (const GeomShapePtr theBaseShape, const std::shared_ptr< GeomAlgoAPI_MakeShape > theMakeShape, const int theIndex=0)
 Stores result of generation. More...
 
void storeShapes (const std::shared_ptr< GeomAlgoAPI_MakeShape > theMakeShape, ResultBodyPtr theResultBody, const GeomAPI_Shape::ShapeType theBaseShapeType, const ListOfShape &theShapes, const std::string theName)
 Used to store from and to shapes: generated, or in common modified tag. More...
 
virtual MODELAPI_EXPORT 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...
 
void initBooleanAttributes ()
 Initializes boolean attributes. More...
 
bool makeBoolean (const ListOfShape &theTools, ListOfShape &theObjects, ListOfMakeShape &theMakeShapes)
 Makes boolean operation. More...
 
void storeModificationHistory (ResultBodyPtr theResultBody, const GeomShapePtr theObject, const ListOfShape &theTools, const std::shared_ptr< GeomAlgoAPI_MakeShape > theMakeShape)
 Stores modification history. More...
 
void storeDeletedShapes (std::vector< ResultBaseAlgo > &theResultBaseAlgoList, const ListOfShape &theTools, const GeomShapePtr theResultShapesCompound)
 Stores deleted shapes. More...
 

Protected Attributes

ModelAPI_FeaturemyFeature
 
OperationType myOperationType
 

Detailed Description

Interface for the composite extrusion feature.

Member Function Documentation

◆ initAttributes()

void FeaturesPlugin_ExtrusionBoolean::initAttributes ( )
virtual

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

Reimplemented from FeaturesPlugin_Extrusion.

◆ makeGeneration()

bool FeaturesPlugin_ExtrusionBoolean::makeGeneration ( ListOfShape &  theBaseShapes,
ListOfMakeShape &  theMakeShapes 
)
protectedvirtual

This function need to be defined for extrusion/revolution generation.

Implements FeaturesPlugin_CompositeBoolean.

◆ storeGenerationHistory()

void FeaturesPlugin_ExtrusionBoolean::storeGenerationHistory ( ResultBodyPtr  theResultBody,
const GeomShapePtr  theBaseShape,
const std::shared_ptr< GeomAlgoAPI_MakeShape theMakeShape 
)
protectedvirtual

Stores generation history.

Implements FeaturesPlugin_CompositeBoolean.

◆ getSizes()

void FeaturesPlugin_ExtrusionBoolean::getSizes ( double &  theToSize,
double &  theFromSize 
)
protectedvirtual

Calculate prism sizes to ensure that it passes through all objects Redefined from FeaturesPlugin_Extrusion.

Reimplemented from FeaturesPlugin_Extrusion.

◆ ID()

static const std::string& FeaturesPlugin_Extrusion::ID ( )
inlinestaticinherited

Feature kind.

◆ CREATION_METHOD()

static const std::string& FeaturesPlugin_Extrusion::CREATION_METHOD ( )
inlinestaticinherited

Attribute name for creation method.

◆ CREATION_METHOD_BY_SIZES()

static const std::string& FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES ( )
inlinestaticinherited

Attribute name for creation method.

◆ CREATION_METHOD_BY_PLANES()

static const std::string& FeaturesPlugin_Extrusion::CREATION_METHOD_BY_PLANES ( )
inlinestaticinherited

Attribute name for creation method.

◆ CREATION_METHOD_THROUGH_ALL()

static const std::string& FeaturesPlugin_Extrusion::CREATION_METHOD_THROUGH_ALL ( )
inlinestaticinherited

Attribute name for creation method.

◆ DIRECTION_OBJECT_ID()

static const std::string& FeaturesPlugin_Extrusion::DIRECTION_OBJECT_ID ( )
inlinestaticinherited

Attribute name of an object to which the extrusion grows.

◆ TO_SIZE_ID()

static const std::string& FeaturesPlugin_Extrusion::TO_SIZE_ID ( )
inlinestaticinherited

Attribute name of extrusion to size.

◆ FROM_SIZE_ID()

static const std::string& FeaturesPlugin_Extrusion::FROM_SIZE_ID ( )
inlinestaticinherited

Attribute name of extrusion from size.

◆ TO_OBJECT_ID()

static const std::string& FeaturesPlugin_Extrusion::TO_OBJECT_ID ( )
inlinestaticinherited

Attribute name of an object to which the extrusion grows.

◆ TO_OFFSET_ID()

static const std::string& FeaturesPlugin_Extrusion::TO_OFFSET_ID ( )
inlinestaticinherited

Attribute name of extrusion offset.

◆ FROM_OBJECT_ID()

static const std::string& FeaturesPlugin_Extrusion::FROM_OBJECT_ID ( )
inlinestaticinherited

Attribute name of an object from which the extrusion grows.

◆ FROM_OFFSET_ID()

static const std::string& FeaturesPlugin_Extrusion::FROM_OFFSET_ID ( )
inlinestaticinherited

Attribute name of extrusion offset.

◆ getKind()

virtual const std::string& FeaturesPlugin_Extrusion::getKind ( )
inlinevirtualinherited
Returns
the kind of a feature.

Implements ModelAPI_Feature.

Reimplemented in FeaturesPlugin_ExtrusionFuse, and FeaturesPlugin_ExtrusionCut.

◆ execute()

void FeaturesPlugin_Extrusion::execute ( )
virtualinherited

Performs the algorithm and stores results it in the data structure.

Implements ModelAPI_Feature.

Reimplemented in FeaturesPlugin_ExtrusionFuse, and FeaturesPlugin_ExtrusionCut.

◆ makeExtrusions()

bool FeaturesPlugin_Extrusion::makeExtrusions ( ListOfShape &  theBaseShapes,
ListOfShape &  theBoundaryShapes,
ListOfMakeShape &  theMakeShapes 
)
protectedinherited

Generates extrusions.

Parameters
[out]theBaseShapeslist of base shapes.
[out]theBoundaryShapeslist of faces limiting the extrusion
[out]theMakeShapeslist of according algos.
Returns
false in case one of algo failed.

◆ storeResultWithBoundaries()

void FeaturesPlugin_Extrusion::storeResultWithBoundaries ( const GeomShapePtr  theBaseShape,
const ListOfShape &  theBoundaryShapes,
const std::shared_ptr< GeomAlgoAPI_MakeShape theMakeShape,
const int  theIndex = 0 
)
protectedinherited

Stores result of generation.

◆ getDirection()

void FeaturesPlugin_Extrusion::getDirection ( std::shared_ptr< GeomAPI_Dir > &  theDir)
protectedinherited

Retrieve direction argument.

◆ SKETCH_ID()

static const std::string& FeaturesPlugin_CompositeSketch::SKETCH_ID ( )
inlinestaticinherited

Attribute name of sketch feature.

◆ BASE_OBJECTS_ID()

static const std::string& FeaturesPlugin_CompositeSketch::BASE_OBJECTS_ID ( )
inlinestaticinherited

Attribute name of base objects.

◆ addFeature()

std::shared_ptr< ModelAPI_Feature > FeaturesPlugin_CompositeSketch::addFeature ( std::string  theID)
virtualinherited

Appends a feature to the sketch sub-elements container.

Implements ModelAPI_CompositeFeature.

◆ numberOfSubs()

int FeaturesPlugin_CompositeSketch::numberOfSubs ( bool  forTree = false) const
virtualinherited
Returns
the number of sub-elements.

Implements ModelAPI_CompositeFeature.

◆ subFeature()

std::shared_ptr< ModelAPI_Feature > FeaturesPlugin_CompositeSketch::subFeature ( const int  theIndex,
bool  forTree = false 
)
virtualinherited
Returns
the sub-feature by zero-base index.

Implements ModelAPI_CompositeFeature.

◆ subFeatureId()

int FeaturesPlugin_CompositeSketch::subFeatureId ( const int  theIndex) const
virtualinherited
Returns
the sub-feature unique identifier in this composite feature by zero-base index.

Implements ModelAPI_CompositeFeature.

◆ isSub()

bool FeaturesPlugin_CompositeSketch::isSub ( ObjectPtr  theObject) const
virtualinherited
Returns
true if feature or result belong to this composite feature as subs.

Implements ModelAPI_CompositeFeature.

◆ removeFeature()

void FeaturesPlugin_CompositeSketch::removeFeature ( std::shared_ptr< ModelAPI_Feature theFeature)
virtualinherited

This method to inform that sub-feature is removed and must be removed from the internal data structures of the owner (the remove from the document will be done outside just after).

Implements ModelAPI_CompositeFeature.

◆ initCompositeSketchAttribtues()

void FeaturesPlugin_CompositeSketch::initCompositeSketchAttribtues ( const int  theInitFlags)
protectedinherited

Initializes composite sketch attributes.

◆ getBaseShapes()

void FeaturesPlugin_CompositeSketch::getBaseShapes ( ListOfShape &  theBaseShapesList,
const bool  theIsMakeShells = true 
)
protectedinherited

Returns list of base shapes.

Parameters
[out]theBaseShapesListlist of base shapes (warning: list not cleared).
[in]theIsMakeShellsif true make shells from faces with shared edges.

◆ storeResult()

void FeaturesPlugin_CompositeSketch::storeResult ( const GeomShapePtr  theBaseShape,
const std::shared_ptr< GeomAlgoAPI_MakeShape theMakeShape,
const int  theIndex = 0 
)
protectedinherited

Stores result of generation.

◆ storeShapes()

void FeaturesPlugin_CompositeSketch::storeShapes ( const std::shared_ptr< GeomAlgoAPI_MakeShape theMakeShape,
ResultBodyPtr  theResultBody,
const GeomAPI_Shape::ShapeType  theBaseShapeType,
const ListOfShape &  theShapes,
const std::string  theName 
)
protectedinherited

Used to store from and to shapes: generated, or in common modified tag.

◆ erase()

void ModelAPI_CompositeFeature::erase ( )
virtualinherited

in addition removes all subs

Reimplemented from ModelAPI_Feature.

Reimplemented in PartSetPlugin_Part.

◆ group()

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

Returns the group identifier of all features.

◆ document() [1/2]

virtual std::shared_ptr<ModelAPI_Document> ModelAPI_Feature::document ( ) const
inlinevirtualinherited

Returns document this feature belongs to.

Reimplemented from ModelAPI_Object.

◆ document() [2/2]

std::shared_ptr<ModelAPI_AttributeDocRef> ModelAPI_Feature::document ( const std::string &  theID)
inlineinherited

Returns the document reference attribute.

◆ groupName()

virtual std::string ModelAPI_Feature::groupName ( )
inlinevirtualinherited

Returns the group identifier of this result.

Implements ModelAPI_Object.

◆ compute()

virtual bool ModelAPI_Feature::compute ( const std::string &  )
inlinevirtualinherited

Computes the attribute value on the base of other attributes if the value can be computed.

Parameters
theAttributeIdan attribute index to be computed
Returns
a boolean value about it is computed

Reimplemented in SketchPlugin_ConstraintRadius, SketchPlugin_ConstraintLength, and SketchPlugin_ConstraintAngle.

◆ setError()

void ModelAPI_Feature::setError ( const std::string &  theError,
bool  isSend = true,
bool  isTranslate = true 
)
virtualinherited

Registers error during the execution, causes the ExecutionFailed state.

◆ error()

virtual std::string ModelAPI_Feature::error ( ) const
inlinevirtualinherited

Returns error, arose during the execution.

◆ results()

const std::list< std::shared_ptr< ModelAPI_Result > > & ModelAPI_Feature::results ( )
inherited

returns the current results of the feature

◆ firstResult()

std::shared_ptr< ModelAPI_Result > ModelAPI_Feature::firstResult ( ) const
inherited

returns the first result in the list or NULL reference

◆ lastResult()

std::shared_ptr< ModelAPI_Result > ModelAPI_Feature::lastResult ( )
inherited

returns the last result in the list or NULL reference

◆ setResult() [1/2]

void ModelAPI_Feature::setResult ( const std::shared_ptr< ModelAPI_Result > &  theResult)
inherited

sets the alone result

◆ setResult() [2/2]

void ModelAPI_Feature::setResult ( const std::shared_ptr< ModelAPI_Result > &  theResult,
const int  theIndex 
)
inherited

sets the result by index (zero based), results before this must be set before

◆ removeResults()

void ModelAPI_Feature::removeResults ( const int  theSinceIndex,
const bool  theForever = true,
const bool  theFlush = true 
)
inherited

removes all results starting from the given index (zero-based)

Parameters
theSinceIndex- index of the deleted result and all after also will be deleted
theForever- removes results for long period (not just because of feature disabling)
theFlush- if it is false, REDISPLAY message is not flushed

◆ eraseResults()

void ModelAPI_Feature::eraseResults ( const bool  theForever = true)
inherited

removes all results from the feature

◆ eraseResultFromList()

void ModelAPI_Feature::eraseResultFromList ( const std::shared_ptr< ModelAPI_Result > &  theResult)
inherited

removes the result from the list of feature (not doing in disabled): normally this method is not used from features.

only internally

◆ isPersistentResult()

virtual bool ModelAPI_Feature::isPersistentResult ( )
inlinevirtualinherited

Returns true if result is persistent (stored in document) and on undo-redo, save-open it is not needed to recompute it.

Reimplemented in ParametersPlugin_ParametersMgr, CollectionPlugin_GroupOperation, CollectionPlugin_Group, and CollectionPlugin_Field.

◆ isAction()

virtual bool ModelAPI_Feature::isAction ( )
inlinevirtualinherited

Returns true if this feature must not be created: this is just an action that is not stored in the features history and data model (like "delete part").

Reimplemented in PartSetPlugin_Remove, and PartSetPlugin_Duplicate.

◆ isMacro()

◆ isPreviewNeeded()

◆ documentToAdd()

const std::string & ModelAPI_Feature::documentToAdd ( )
virtualinherited

Must return document where the new feature must be added to By default it is empty: it is added to the document this method is called to.

Reimplemented in PartSetPlugin_Part.

◆ setDisabled()

bool ModelAPI_Feature::setDisabled ( const bool  theFlag)
virtualinherited

Enables/disables the feature.

The disabled feature has no results and does not participate in any calculation.

Returns
true if state is really changed

◆ isDisabled()

bool ModelAPI_Feature::isDisabled ( )
virtualinherited

Returns the feature is disabled or not.

Implements ModelAPI_Object.

◆ feature()

FeaturePtr ModelAPI_Feature::feature ( ObjectPtr  theObject)
staticinherited

Returns the feature by the object (result).

◆ setStable()

bool ModelAPI_Feature::setStable ( const bool  theFlag)
virtualinherited

Set the stable feature flag.

If feature is currently editing then it is not stable.

Returns
true if state is really changed

◆ isStable()

bool ModelAPI_Feature::isStable ( )
virtualinherited

Returns the feature is stable or not.

◆ isEditable()

bool ModelAPI_Feature::isEditable ( )
virtualinherited

Returns the feature is editable or not. Most of features are editable.

Reimplemented in ExchangePlugin_ImportFeature.

◆ customAction()

bool ModelAPI_Feature::customAction ( const std::string &  theActionId)
virtualinherited

Performs some custom feature specific functionality (normally called by some GUI button)

Parameters
theActionIdan action key
Returns
a boolean value about it is performed

Reimplemented in SketchPlugin_Sketch, SketchPlugin_Offset, SketchPlugin_CurveFitting, SketchPlugin_BSplineBase, CollectionPlugin_Group, and BuildPlugin_Wire.

◆ name()

std::wstring ModelAPI_Feature::name ( )
inlineinherited

Returns the name stored in the attribute.

◆ boolean()

std::shared_ptr<ModelAPI_AttributeBoolean> ModelAPI_Feature::boolean ( const std::string &  theID)
inlineinherited

Returns the Boolean attribute by the identifier.

◆ real()

std::shared_ptr<ModelAPI_AttributeDouble> ModelAPI_Feature::real ( const std::string &  theID)
inlineinherited

Returns the real attribute by the identifier.

◆ integer()

std::shared_ptr<ModelAPI_AttributeInteger> ModelAPI_Feature::integer ( const std::string &  theID)
inlineinherited

Returns the integer attribute by the identifier.

◆ intArray()

std::shared_ptr<ModelAPI_AttributeIntArray> ModelAPI_Feature::intArray ( const std::string &  theID)
inlineinherited

Returns the integer array attribute by the identifier.

◆ refattr()

std::shared_ptr<ModelAPI_AttributeRefAttr> ModelAPI_Feature::refattr ( const std::string &  theID)
inlineinherited

Returns the reference attribute by the identifier.

◆ refattrlist()

std::shared_ptr<ModelAPI_AttributeRefAttrList> ModelAPI_Feature::refattrlist ( const std::string &  theID)
inlineinherited

Returns the refattrlist attribute by the identifier.

◆ reference()

std::shared_ptr<ModelAPI_AttributeReference> ModelAPI_Feature::reference ( const std::string &  theID)
inlineinherited

Returns the reference attribute by the identifier.

◆ reflist()

std::shared_ptr<ModelAPI_AttributeRefList> ModelAPI_Feature::reflist ( const std::string &  theID)
inlineinherited

Returns the list of references attribute by the identifier.

◆ selection()

std::shared_ptr<ModelAPI_AttributeSelection> ModelAPI_Feature::selection ( const std::string &  theID)
inlineinherited

Returns the shape selection attribute by the identifier.

◆ selectionList()

std::shared_ptr<ModelAPI_AttributeSelectionList> ModelAPI_Feature::selectionList ( const std::string &  theID)
inlineinherited

Returns the list of shape selections attribute by the identifier.

◆ string()

std::shared_ptr<ModelAPI_AttributeString> ModelAPI_Feature::string ( const std::string &  theID)
inlineinherited

Returns the string attribute by the identifier.

◆ stringArray()

std::shared_ptr<ModelAPI_AttributeStringArray> ModelAPI_Feature::stringArray ( const std::string &  theID)
inlineinherited

Returns the string array attribute by the identifier.

◆ tables()

std::shared_ptr<ModelAPI_AttributeTables> ModelAPI_Feature::tables ( const std::string &  theID)
inlineinherited

Returns the tables attribute by the identifier.

◆ attribute()

std::shared_ptr<ModelAPI_Attribute> ModelAPI_Feature::attribute ( const std::string &  theID)
inlineinherited

Returns the attribute by the identifier.

◆ init()

void ModelAPI_Feature::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.

◆ colorConfigInfo()

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

◆ attributeChanged()

void ModelAPI_Object::attributeChanged ( const std::string &  theID)
virtualinherited

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

◆ emptyFunction()

virtual void ModelAPI_Entity::emptyFunction ( ) const
inlinevirtualinherited

Empty function which is added for virtualiation of the interface.

◆ OBJECTS_ID()

static const std::string& FeaturesPlugin_CompositeBoolean::OBJECTS_ID ( )
inlinestaticinherited

Attribute name of main objects.

◆ executeCompositeBoolean()

void FeaturesPlugin_CompositeBoolean::executeCompositeBoolean ( )
virtualinherited

Performs the algorithm and stores results it in the data structure.

◆ initBooleanAttributes()

void FeaturesPlugin_CompositeBoolean::initBooleanAttributes ( )
protectedinherited

Initializes boolean attributes.

◆ makeBoolean()

bool FeaturesPlugin_CompositeBoolean::makeBoolean ( const ListOfShape &  theTools,
ListOfShape &  theObjects,
ListOfMakeShape &  theMakeShapes 
)
protectedinherited

Makes boolean operation.

Parameters
[in]theToolslist of tools.
[out]theObjectslist of objects.
[out]theMakeShapeslist of according algos.
Returns
false if failed.

◆ storeModificationHistory()

void FeaturesPlugin_CompositeBoolean::storeModificationHistory ( ResultBodyPtr  theResultBody,
const GeomShapePtr  theObject,
const ListOfShape &  theTools,
const std::shared_ptr< GeomAlgoAPI_MakeShape theMakeShape 
)
protectedinherited

Stores modification history.

◆ storeDeletedShapes()

void FeaturesPlugin_CompositeBoolean::storeDeletedShapes ( std::vector< ResultBaseAlgo > &  theResultBaseAlgoList,
const ListOfShape &  theTools,
const GeomShapePtr  theResultShapesCompound 
)
protectedinherited

Stores deleted shapes.