BugID IPAL9186: Added a static method InitGeomGen for initialization of myComponentGeom static variable from geompy.py Python script.

This commit is contained in:
srn 2005-06-15 11:50:44 +00:00
parent 9db65c69e0
commit 79263e107d
5 changed files with 21 additions and 1 deletions

View File

@ -74,6 +74,13 @@ extern "C" {
GEOM::GEOM_Gen_var GeometryGUI::myComponentGeom = GEOM::GEOM_Gen::_nil();
bool GeometryGUI::InitGeomGen()
{
GeometryGUI aGG;
if( CORBA::is_nil( myComponentGeom ) ) return false;
return true;
}
//=================================================================================
// class : CustomItem
// purpose : Set Font to a text.
@ -122,7 +129,7 @@ GeometryGUI::GeometryGUI() :
Engines::Component_var comp = ls->FindOrLoad_Component( "FactoryServer", "GEOM" );
myComponentGeom = GEOM::GEOM_Gen::_narrow( comp );
}
myState = -1;
myActiveDialogBox = 0;
myFatherior = "";

View File

@ -65,6 +65,8 @@ public:
virtual void initialize( CAM_Application* );
virtual QString engineIOR() const;
static bool InitGeomGen(); //BugID IPAL9186: SRN: To be called by Python scripts
static GEOM::GEOM_Gen_var GetGeomGen() { return myComponentGeom; }
GEOM_Client& GetShapeReader() { return myShapeReader; }

View File

@ -261,6 +261,7 @@ int GEOM_Swig::getIndexTopology(const char* SubIOR, const char* IOR)
Exp.Next();
}
}
return -1;
}
@ -480,3 +481,9 @@ void GEOM_Swig::setTransparency(const char* theEntry, float transp)
ProcessVoidEvent(new TEvent(app,anIO,transp));
}
bool GEOM_Swig::initGeomGen()
{
return GeometryGUI::InitGeomGen();
}

View File

@ -51,6 +51,8 @@ public:
int getIndexTopology(const char *SubEntry, const char *Entry);
const char* getShapeTypeString(const char *Entry);
const char* getShapeTypeIcon(const char *Ior);
bool initGeomGen();
};

View File

@ -44,4 +44,6 @@ class GEOM_Swig
void setColor(const char* Entry, int red, int green, int blue);
void setTransparency(const char* Entry, float transp);
const char* getShapeTypeIcon(const char *Ior);
bool initGeomGen();
};