return aNewGroup;
}
+void HYDROData_CalculationCase::SetContainerName( const QString& theContainerName )
+{
+#ifndef LIGHT_MODE
+ HYDROData_GeomTool::SetContainerName( theContainerName );
+#endif
+}
+
QString HYDROData_CalculationCase::Export() const
{
#ifdef LIGHT_MODE
HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetBoundaryPolygons() const;
+ /**
+ * \brief Set the Container Name to use when not default (FactoryServer).
+ * \param theContainerName the name of the container used for GEOM
+ * (to be used by scripts for distributed execution)
+ */
+ HYDRODATA_EXPORT virtual void SetContainerName( const QString& theContainerName );
+
/**
* Exports the calculation case data (shell and groups) to GEOM module.
* \return the entry of the GEOM object (empty string in the case of error)
static SALOME_LifeCycleCORBA _LCC( &_NS );
static SALOMEDS::Study_var _STUDY = SALOMEDS::Study::_nil();
+QString HYDROData_GeomTool::myContainerName = "FactoryServer";
+
+void HYDROData_GeomTool::SetContainerName( const QString& theContainerName )
+{
+ myContainerName = theContainerName;
+}
+
TopoDS_Shape HYDROData_GeomTool::GetShapeFromIOR( const QString& theIOR )
{
// Note that GEOMBase::GetShape() cause crash in batch mode
GEOM::GEOM_Object_var aGeomObj = GEOM::GEOM_Object::_narrow( aCorbaObj );
Engines::EngineComponent_var aComp =
- _LCC.FindOrLoad_Component( "FactoryServer", "GEOM" );
+ _LCC.FindOrLoad_Component( myContainerName.toStdString().c_str(), "GEOM" );
GEOM::GEOM_Gen_var aComponentGeom = GEOM::GEOM_Gen::_narrow( aComp );
aResShape = GEOM_Client::get_client().GetShape( aComponentGeom, aGeomObj );
GEOM::GEOM_Gen_var HYDROData_GeomTool::GetGeomGen()
{
- Engines::EngineComponent_var aComponent = _LCC.FindOrLoad_Component( "FactoryServer", "GEOM" );
+ Engines::EngineComponent_var aComponent = _LCC.FindOrLoad_Component( myContainerName.toStdString().c_str(), "GEOM" );
GEOM::GEOM_Gen_var aGEOMEngine = GEOM::GEOM_Gen::_narrow( aComponent );
return aGEOMEngine._retn();
public:
+ /**
+ * \brief Set the Container Name to use when not default (FactoryServer).
+ * \param theContainerName the name of the container used for GEOM
+ * (to be used by scripts for distributed execution)
+ */
+ static void SetContainerName( const QString& theContainerName );
+
/**
* \brief Get shape by the specified IOR.
* \param theIOR the GEOM object IOR
const QString& theName,
QString& theGeomObjEntry);
+protected:
+ static QString myContainerName;
};
#endif
*/
void RemoveSplitGroups();
+ /**
+ * \brief Set the Container Name to use when not default (FactoryServer).
+ * \param theContainerName the name of the container used for GEOM
+ * (to be used by scripts for distributed execution)
+ */
+ void SetContainerName( const QString& theContainerName );
/**
* Exports the calculation case data (shell and groups) to GEOM module.