-// Copyright (C) 2011-2013 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
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
#include "SalomeApp_Study.h"
#include "SALOME_ListIO.hxx"
-#include "SALOME_ListIteratorOfListIO.hxx"
#include "SALOMEconfig.h"
#include "utilities.h"
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)