-// Copyright (C) 2011-2015 CEA/DEN, EDF R&D
+// Copyright (C) 2011-2019 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
SALOME_ListIO HOMARD_UTILS::mySelected;
-//================================================================
-// Function : GetCStudy
-// Returne un pointeur sur l'etude courante
-//================================================================
- _PTR(Study) HOMARD_UTILS::GetCStudy(const SalomeApp_Study* theStudy)
-{
- return theStudy->studyDS();
-}
-
//================================================================
// Function : GetActiveStudy
// Returne un pointeur sur l'etude active
}
//================================================================
-// Function : GetActiveStudyDocument
+// Function : getStudy
// Returne un pointeur sur l'etude active
//================================================================
-_PTR(Study) HOMARD_UTILS::GetActiveStudyDocument()
+_PTR(Study) HOMARD_UTILS::getStudy()
{
- SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>(GetActiveStudy());
- if (aStudy){
- return aStudy->studyDS();
- }
- else
- return _PTR(Study)();
+ static _PTR(Study) _study;
+ if(!_study)
+ _study = SalomeApp_Application::getStudy();
+ return _study;
}
//================================================================
return bOK ;
}
//================================================================
+// Retourne vrai si l'objet est une frontiere CAO
+//================================================================
+bool HOMARD_UTILS::isBoundaryCAO(_PTR(SObject) MonObj)
+{
+ return isObject( MonObj, QString("BoundaryCAOHomard"), -1 ) ;
+}
+//================================================================
// Retourne vrai si l'objet est une frontiere analytique
//================================================================
bool HOMARD_UTILS::isBoundaryAn(_PTR(SObject) MonObj)