Salome HOME
unified access to shapes
[modules/hydro.git] / src / HYDROData / HYDROData_Obstacle.cxx
index f9e53b44a4060f48cce2d0fbb5f68d48624dff25..43f468e595139339c7739c453e768cc686760f47 100644 (file)
@@ -1,8 +1,4 @@
-// Copyright (C) 2007-2015  CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
+// Copyright (C) 2014-2015  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
@@ -28,7 +24,9 @@
 #include "HYDROData_Tool.h"
 #include "HYDROData_GeomTool.h"
 
+#ifndef LIGHT_MODE
 #include <Basics_Utils.hxx>
+#endif
 
 #include <BRepTools.hxx>
 #include <BRep_Builder.hxx>
@@ -125,7 +123,7 @@ QStringList HYDROData_Obstacle::DumpToPython( MapOfTreatedObjects& theTreatedObj
 
 void HYDROData_Obstacle::Update()
 {
-  removeGroupObjects();
+  RemoveGroupObjects();
   createGroupObjects();
   checkAndSetAltitudeObject();
 
@@ -137,16 +135,6 @@ bool HYDROData_Obstacle::IsHas2dPrs() const
   return true;
 }
 
-TopoDS_Shape HYDROData_Obstacle::GetTopShape() const
-{
-  return getTopShape();
-}
-
-TopoDS_Shape HYDROData_Obstacle::GetShape3D() const
-{
-  return getShape3D();
-}
-
 void HYDROData_Obstacle::SetShape3D( const TopoDS_Shape& theShape )
 {
   TopoDS_Face aShape2d = HYDROData_Projection::MakeProjection( theShape );
@@ -222,6 +210,7 @@ bool HYDROData_Obstacle::ImportFromGeomIOR( const TCollection_AsciiString& theIO
 {
   bool aRes = false;
 
+#ifndef LIGHT_MODE
   if ( theIOR.IsEmpty() ) {
     return aRes;
   }
@@ -238,7 +227,8 @@ bool HYDROData_Obstacle::ImportFromGeomIOR( const TCollection_AsciiString& theIO
     SetShape3D( aShape );
     aRes = true;
   }
-  
+#endif
+
   return aRes;
 }
 
@@ -271,6 +261,7 @@ TCollection_AsciiString HYDROData_Obstacle::GetGeomObjectName() const
     return aRes;
   }
 
+#ifndef LIGHT_MODE
   SALOMEDS::Study_var aDSStudy = HYDROData_GeomTool::GetStudyByID( aDocId );
 
   if ( !aDSStudy->_is_nil() ) {
@@ -280,7 +271,7 @@ TCollection_AsciiString HYDROData_Obstacle::GetGeomObjectName() const
       aRes = TCollection_AsciiString( aSObject->GetName() );
     }
   }
-
+#endif
   return aRes;
 }
 
@@ -313,6 +304,7 @@ TopoDS_Shape HYDROData_Obstacle::ImportIGES( const QString& theFilePath ) const
 {
   TopoDS_Shape aResShape;
 
+#ifndef LIGHT_MODE
   // Set "C" numeric locale to save numbers correctly
   Kernel_Utils::Localizer loc;
 
@@ -347,6 +339,7 @@ TopoDS_Shape HYDROData_Obstacle::ImportIGES( const QString& theFilePath ) const
   catch(Standard_Failure) {
     aResShape.Nullify();
   }
+#endif
 
   return aResShape;
 }
@@ -355,6 +348,7 @@ TopoDS_Shape HYDROData_Obstacle::ImportSTEP( const QString& theFilePath ) const
 {
   TopoDS_Shape aResShape;
 
+#ifndef LIGHT_MODE
   // Set "C" numeric locale to save numbers correctly
   Kernel_Utils::Localizer loc;
 
@@ -458,6 +452,7 @@ TopoDS_Shape HYDROData_Obstacle::ImportSTEP( const QString& theFilePath ) const
   catch (Standard_Failure) {
     aResShape.Nullify();
   }
+#endif
 
   return aResShape;
 }