Salome HOME
NRI : Merge BRANCH_V1_2c
[modules/geom.git] / src / GEOMGUI / GeometryGUI_Swig.cxx
index b38d9d15d1e08fb19a6257fed8c6036ccafb5a4e..55727f9099936b9f827d6860f72fb4a8ff02be84 100644 (file)
@@ -1,12 +1,32 @@
-using namespace std;
-//  File      : GeometryGUI_Swig.cxx
-//  Created   : Tue Mar 26 15:08:38 2002
-//  Author    : Nicolas REJNERI, Paul RASCLE
-//  Project   : SALOME
-//  Module    : GEOM
-//  Copyright : Open CASCADE, EDF 2002
+//  GEOM GEOMGUI : GUI for Geometry component
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+// 
+//  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. 
+// 
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : GeometryGUI_Swig.cxx
+//  Author : Nicolas REJNERI, Paul RASCLE
+//  Module : GEOM
 //  $Header$
 
+using namespace std;
 #include "GeometryGUI_Swig.hxx"
 #include "utilities.h"
 
@@ -18,15 +38,6 @@ using namespace std;
 #include "SALOMEGUI_ImportOperation.h"
 
 #include "OCCViewer_Viewer3d.h"
-#include "VTKViewer_RenderWindowInteractor.h"
-#include "VTKViewer_ViewFrame.h"
-
-#include "GEOM_Actor.h"
-#include "GEOM_Client.hxx"
-#include "GEOM_AISShape.hxx"
-#include "GEOM_AssemblyBuilder.h"
-#include "GEOM_InteractiveObject.hxx"
-
 #include <TopExp_Explorer.hxx>
 #include <TopTools_MapOfShape.hxx>
 #include <BRepAdaptor_Surface.hxx>
@@ -37,26 +48,35 @@ using namespace std;
 #include <TopoDS_Edge.hxx>
 #include <TopoDS_Face.hxx>
 
+#include "VTKViewer_RenderWindowInteractor.h"
+#include "VTKViewer_ViewFrame.h"
+
+#include "GEOM_Actor.h"
+#include "GEOM_Client.hxx"
+#include "GEOM_AISShape.hxx"
+#include "GEOM_AssemblyBuilder.h"
+#include "GEOM_InteractiveObject.hxx"
+
 static GEOM_Client ShapeReader;
 
-GeometryGUI_Swig::GeometryGUI_Swig()
+GEOM_Swig::GEOM_Swig()
 {
   // MESSAGE("Constructeur");
 }
 
-GeometryGUI_Swig::~GeometryGUI_Swig()
+GEOM_Swig::~GEOM_Swig()
 {
   // MESSAGE("Destructeur");
 }
 
-void GeometryGUI_Swig::createAndDisplayGO(const char* Entry)
+void GEOM_Swig::createAndDisplayGO(const char* Entry)
 {
   // MESSAGE("createAndDisplayGO");
   QAD_Study* ActiveStudy = QAD_Application::getDesktop()->getActiveStudy();
   SALOMEDS::Study_var aStudy = ActiveStudy->getStudyDocument();
   SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
 
-  Engines::Component_var comp = QAD_Application::getDesktop()->getEngine("FactoryServer", "Geometry");
+  Engines::Component_var comp = QAD_Application::getDesktop()->getEngine("FactoryServer", "GEOM");
   GEOM::GEOM_Gen_var Geom = GEOM::GEOM_Gen::_narrow(comp);
 
   Standard_CString Fatherior = "";
@@ -133,9 +153,9 @@ void GeometryGUI_Swig::createAndDisplayGO(const char* Entry)
   ActiveStudy->updateObjBrowser( true );
 }
 
-int  GeometryGUI_Swig::getIndexTopology(const char* SubIOR, const char* IOR)
+int  GEOM_Swig::getIndexTopology(const char* SubIOR, const char* IOR)
 {
-  Engines::Component_var comp = QAD_Application::getDesktop()->getEngine("FactoryServer", "Geometry");
+  Engines::Component_var comp = QAD_Application::getDesktop()->getEngine("FactoryServer", "GEOM");
   GEOM::GEOM_Gen_var  Geom = GEOM::GEOM_Gen::_narrow(comp);
  
   GEOM::GEOM_Shape_var aMainShape = Geom->GetIORFromString(IOR);
@@ -158,9 +178,9 @@ int  GeometryGUI_Swig::getIndexTopology(const char* SubIOR, const char* IOR)
   return -1;
 }
 
-const char* GeometryGUI_Swig::getShapeTypeString(const char* IOR)
+const char* GEOM_Swig::getShapeTypeString(const char* IOR)
 {
-  Engines::Component_var comp = QAD_Application::getDesktop()->getEngine("FactoryServer", "Geometry");
+  Engines::Component_var comp = QAD_Application::getDesktop()->getEngine("FactoryServer", "GEOM");
   GEOM::GEOM_Gen_var  Geom = GEOM::GEOM_Gen::_narrow(comp);
  
   GEOM::GEOM_Shape_var aShape = Geom->GetIORFromString(IOR);
@@ -225,9 +245,9 @@ const char* GeometryGUI_Swig::getShapeTypeString(const char* IOR)
 }
 
 
-const char* GeometryGUI_Swig::getShapeTypeIcon(const char* IOR)
+const char* GEOM_Swig::getShapeTypeIcon(const char* IOR)
 {
-  Engines::Component_var comp = QAD_Application::getDesktop()->getEngine("FactoryServer", "Geometry");
+  Engines::Component_var comp = QAD_Application::getDesktop()->getEngine("FactoryServer", "GEOM");
   GEOM::GEOM_Gen_var  Geom = GEOM::GEOM_Gen::_narrow(comp);
  
   GEOM::GEOM_Shape_var aShape = Geom->GetIORFromString(IOR);
@@ -258,7 +278,7 @@ const char* GeometryGUI_Swig::getShapeTypeIcon(const char* IOR)
   return "None";
 }
 
-void GeometryGUI_Swig::setDisplayMode(const char* Entry, int mode)
+void GEOM_Swig::setDisplayMode(const char* Entry, int mode)
 {
   QAD_Study* myStudy = QAD_Application::getDesktop()->getActiveStudy();
   Handle(SALOME_InteractiveObject) IO = 
@@ -278,7 +298,7 @@ void GeometryGUI_Swig::setDisplayMode(const char* Entry, int mode)
     }
 }
 
-void GeometryGUI_Swig::setColor(const char* Entry, int red, int green, int blue)
+void GEOM_Swig::setColor(const char* Entry, int red, int green, int blue)
 {
   QAD_Study* myStudy = QAD_Application::getDesktop()->getActiveStudy();
   QColor c = QColor (red, green, blue);
@@ -298,7 +318,7 @@ void GeometryGUI_Swig::setColor(const char* Entry, int red, int green, int blue)
     }
 }
 
-void GeometryGUI_Swig::setTransparency(const char* Entry, float transp)
+void GEOM_Swig::setTransparency(const char* Entry, float transp)
 {
   QAD_Study* myStudy = QAD_Application::getDesktop()->getActiveStudy();
   Handle(SALOME_InteractiveObject) IO =