mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-02-14 21:43:08 +05:00
0021672: [CEA 565] Dump Study from script
Standard_EXPORT Handle(GEOM_Function) AddFunction(const Standard_GUID& theGUID, int theFunctionType, + bool allowSubShape=false);
This commit is contained in:
parent
a211d6f8bd
commit
c83df1846e
@ -542,10 +542,12 @@ bool GEOM_Object::IsMainShape()
|
||||
* AddFunction
|
||||
*/
|
||||
//=============================================================================
|
||||
Handle(GEOM_Function) GEOM_Object::AddFunction(const Standard_GUID& theGUID, int theFunctionType)
|
||||
Handle(GEOM_Function) GEOM_Object::AddFunction(const Standard_GUID& theGUID,
|
||||
int theFunctionType,
|
||||
bool allowSubShape)
|
||||
{
|
||||
Standard_Integer nb = GetNbFunctions();
|
||||
if(nb == 1 && theGUID == GetSubShapeID()) return NULL; //It's impossible to add a function to sub-shape
|
||||
if(!allowSubShape && nb == 1 && theGUID == GetSubShapeID()) return NULL; //It's impossible to add a function to sub-shape
|
||||
nb++;
|
||||
TDF_Label aChild = FUNCTION_LABEL(nb);
|
||||
|
||||
|
@ -279,7 +279,9 @@ class GEOM_Object : public MMgt_TShared
|
||||
|
||||
//Adds a function with a driver GUID = theGUID and a type theFunctionType
|
||||
//to the function tree of this GEOM_Object
|
||||
Standard_EXPORT Handle(GEOM_Function) AddFunction(const Standard_GUID& theGUID, int theFunctionType);
|
||||
Standard_EXPORT Handle(GEOM_Function) AddFunction(const Standard_GUID& theGUID,
|
||||
int theFunctionType,
|
||||
bool allowSubShape=false);
|
||||
|
||||
//Returns a number of functions of this GEOM_Object
|
||||
Standard_EXPORT int GetNbFunctions();
|
||||
|
Loading…
Reference in New Issue
Block a user