Salome HOME
Update copyright
[modules/smesh.git] / src / PluginUtils / GeomSelectionTools.cxx
index 45d5c42a3cd0690b0094650cfc2aef673fb096ed..4b1afa145146c48efc0f788f5a09853532f28539 100644 (file)
@@ -1,20 +1,20 @@
-//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
 //
-//  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.
+// 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.
 //
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
 //
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
-//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
 // ---
@@ -219,17 +219,17 @@ TopAbs_ShapeEnum GeomSelectionTools::entryToShapeType(std::string entry){
       SalomeApp_Application* anApp = GetSalomeApplication();
       if (anApp) {
 //         MESSAGE("Got Application");
-        Engines::Component_var component = anApp->lcc()->FindOrLoad_Component( "FactoryServer","GEOM" );
+        Engines::EngineComponent_var component = anApp->lcc()->FindOrLoad_Component( "FactoryServer","GEOM" );
         GEOM::GEOM_Gen_var _geomEngine = GEOM::GEOM_Gen::_narrow(component);
 //         MESSAGE("Got GEOM engine");
         // if the Geom Object is a group
         if (aShape->GetType() == GEOM_GROUP){
-//           MESSAGE("It's a group");  
+//           MESSAGE("It's a group");
           GEOM::GEOM_IGroupOperations_var aGroupOp = _geomEngine->GetIGroupOperations(myStudy->StudyId());
           ShapeType= (TopAbs_ShapeEnum)aGroupOp->GetType(aShape);
-        } 
+        }
         // if not
-        else { 
+        else {
           GEOM_Client* aClient = new GEOM_Client();
           if ( aClient && !_geomEngine->_is_nil() ) {
 //             MESSAGE("GEOM client is OK and GEOM engine is not null");
@@ -306,7 +306,7 @@ GeomAbs_SurfaceType GeomSelectionTools::getFaceInformation(TopoDS_Shape S)
 QString PluginUtils::PrintDoubleValue( double theValue, int thePrecision )
 {
   const double prec = 1e-12;
-  
+
   if ( qAbs(theValue) < prec )
     return "0";
 
@@ -325,7 +325,7 @@ QString PluginUtils::PrintDoubleValue( double theValue, int thePrecision )
 
   // remove trailing zeroes
 
-  QRegExp expre( QString( "(%1|%2)[+-]?[0-9]+$" ).arg( QLocale().exponential().toLower(), 
+  QRegExp expre( QString( "(%1|%2)[+-]?[0-9]+$" ).arg( QLocale().exponential().toLower(),
                                QLocale().exponential().toUpper() ) );
 
   int idx = aRes.indexOf( expre );
@@ -340,4 +340,3 @@ QString PluginUtils::PrintDoubleValue( double theValue, int thePrecision )
 
   return aRes == "-0" ? QString( "0" ) : aRes + aResExp;
 }
-