Salome HOME
Fix compilation error (conflict of OK name between OCCT Plate_Plate.hxx and GEOM...
[modules/geom.git] / src / GEOM_I_Superv / GEOM_Superv_i.cc
index 71e38f9d2e7f4ac41ea3feb34afc505033eff666..c510ec9a376665ab309dcbb48508140e2a27aa82 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2024  CEA, EDF, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -22,6 +22,9 @@
 
 #include "GEOM_Superv_i.hh"
 #include "SALOME_LifeCycleCORBA.hxx"
+#include "Utils_CorbaException.hxx"
+#include "SALOME_Fake_NamingService.hxx"
+#include "SALOME_Container_i.hxx"
 
 #include CORBA_SERVER_HEADER(SALOME_Session)
 #include "SALOMEDSClient_ClientFactory.hxx"
@@ -35,14 +38,13 @@ GEOM_Superv_i::GEOM_Superv_i(CORBA::ORB_ptr orb,
                              PortableServer::POA_ptr poa,
                              PortableServer::ObjectId * contId,
                              const char *instanceName,
-                             const char *interfaceName) :
-  Engines_Component_i(orb, poa, contId, instanceName, interfaceName)
+                             const char *interfaceName, bool withRegistry,
+                             SALOME_NamingService_Abstract *my_name_service):name_service(my_name_service),Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, withRegistry)
 {
   MESSAGE("GEOM_Superv_i::GEOM_Superv_i");
 
   _thisObj = this ;
   _id = _poa->activate_object(_thisObj);
-  name_service = new SALOME_NamingService(_orb);
   //get RootPOA (the default)
   //myPOA = PortableServer::RefCountServantBase::_default_POA();
   CORBA::Object_var anObj = _orb->resolve_initial_references("RootPOA");
@@ -50,9 +52,6 @@ GEOM_Superv_i::GEOM_Superv_i(CORBA::ORB_ptr orb,
 
   setGeomEngine();
 
-  myStudyID = -1;
-  myLastStudyID = -1;
-
   myBasicOp = GEOM::GEOM_IBasicOperations::_nil();
   my3DPrimOp = GEOM::GEOM_I3DPrimOperations::_nil();
   myBoolOp = GEOM::GEOM_IBooleanOperations::_nil();
@@ -62,6 +61,7 @@ GEOM_Superv_i::GEOM_Superv_i(CORBA::ORB_ptr orb,
   myBlocksOp = GEOM::GEOM_IBlocksOperations::_nil();
   myCurvesOp = GEOM::GEOM_ICurvesOperations::_nil();
   myLocalOp = GEOM::GEOM_ILocalOperations::_nil();
+  myMeasureOp = GEOM::GEOM_IMeasureOperations::_nil();
   myGroupOp = GEOM::GEOM_IGroupOperations::_nil();
 }
 
@@ -110,50 +110,6 @@ void GEOM_Superv_i::setGeomEngine()
   myGeomEngine = GEOM::GEOM_Gen::_narrow(comp);
 }
 
-//=============================================================================
-//  SetStudyID:
-//=============================================================================
-void GEOM_Superv_i::SetStudyID( CORBA::Long theId )
-{
-  // mkr : PAL10770 -->
-  myLastStudyID = myStudyID;
-
-  CORBA::Object_ptr anObject = name_service->Resolve("/Kernel/Session");
-  if ( !CORBA::is_nil(anObject) ) {
-    SALOME::Session_var aSession = SALOME::Session::_narrow(anObject);
-    if ( !CORBA::is_nil(aSession) ) {
-      int aStudyID = aSession->GetActiveStudyId();
-      if ( theId != aStudyID && aStudyID > 0) { // mkr : IPAL12128
-        MESSAGE("Warning : given study ID theId="<<theId<<" is wrong and will be replaced by the value "<<aStudyID);
-        myStudyID = aStudyID;
-      }
-      else
-        myStudyID = theId; // mkr : IPAL12128
-    }
-  }
-
-  if ( isNewStudy(myLastStudyID,myStudyID) ) {
-    if (CORBA::is_nil(myGeomEngine)) setGeomEngine();
-    std::string anEngine = _orb->object_to_string( myGeomEngine );
-
-    CORBA::Object_var anObj = name_service->Resolve("/myStudyManager");
-    if ( !CORBA::is_nil(anObj) ) {
-      SALOMEDS::StudyManager_var aStudyManager = SALOMEDS::StudyManager::_narrow(anObj);
-      if ( !CORBA::is_nil(aStudyManager) ) {
-        _PTR(Study) aDSStudy = ClientFactory::Study(aStudyManager->GetStudyByID(myStudyID));
-        if ( aDSStudy ) {
-          _PTR(SComponent) aSCO = aDSStudy->FindComponent(myGeomEngine->ComponentDataType());
-          if ( aSCO ) {
-            _PTR(StudyBuilder) aBuilder = aDSStudy->NewBuilder();
-            if ( aBuilder ) aBuilder->LoadWith( aSCO, anEngine );
-          }
-        }
-      }
-    }
-  }
-  // mkr : PAL10770 <--
-}
-
 //=============================================================================
 //  CreateListOfGO:
 //=============================================================================
@@ -235,11 +191,8 @@ void GEOM_Superv_i::getBasicOp()
   if (CORBA::is_nil(myGeomEngine))
     setGeomEngine();
   // get GEOM_IBasicOperations interface
-  if (CORBA::is_nil(myBasicOp) || isNewStudy(myLastStudyID,myStudyID)) {
-    //rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
-    //     Try to get id of the study from the SALOME Session
-    if(myStudyID < 0 ) SetStudyID(-1);
-    myBasicOp = myGeomEngine->GetIBasicOperations(myStudyID);
+  if (CORBA::is_nil(myBasicOp)) {
+    myBasicOp = myGeomEngine->GetIBasicOperations();
   }
 }
 
@@ -251,11 +204,8 @@ void GEOM_Superv_i::get3DPrimOp()
   if (CORBA::is_nil(myGeomEngine))
     setGeomEngine();
   // get GEOM_I3DPrimOperations interface
-  if (CORBA::is_nil(my3DPrimOp) || isNewStudy(myLastStudyID,myStudyID)) {
-    //rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
-    //     Try to get id of the study from the SALOME Session
-    if(myStudyID < 0 ) SetStudyID(-1);
-    my3DPrimOp = myGeomEngine->GetI3DPrimOperations(myStudyID);
+  if (CORBA::is_nil(my3DPrimOp)) {
+    my3DPrimOp = myGeomEngine->GetI3DPrimOperations();
   }
 }
 
@@ -267,11 +217,8 @@ void GEOM_Superv_i::getBoolOp()
   if (CORBA::is_nil(myGeomEngine))
     setGeomEngine();
   // get GEOM_IBooleanOperations interface
-  if (CORBA::is_nil(myBoolOp) || isNewStudy(myLastStudyID,myStudyID)) {
-    //rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
-    //     Try to get id of the study from the SALOME Session
-    if(myStudyID < 0 ) SetStudyID(-1);
-    myBoolOp = myGeomEngine->GetIBooleanOperations(myStudyID);
+  if (CORBA::is_nil(myBoolOp)) {
+    myBoolOp = myGeomEngine->GetIBooleanOperations();
   }
 }
 
@@ -283,11 +230,8 @@ void GEOM_Superv_i::getInsOp()
   if (CORBA::is_nil(myGeomEngine))
     setGeomEngine();
   // get GEOM_IInsertOperations interface
-  if (CORBA::is_nil(myInsOp) || isNewStudy(myLastStudyID,myStudyID)) {
-    //rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
-    //     Try to get id of the study from the SALOME Session
-    if(myStudyID < 0 ) SetStudyID(-1);
-    myInsOp = myGeomEngine->GetIInsertOperations(myStudyID);
+  if (CORBA::is_nil(myInsOp)) {
+    myInsOp = myGeomEngine->GetIInsertOperations();
   }
 }
 
@@ -299,11 +243,8 @@ void GEOM_Superv_i::getTransfOp()
   if (CORBA::is_nil(myGeomEngine))
     setGeomEngine();
   // get GEOM_ITransformOperations interface
-  if (CORBA::is_nil(myTransfOp) || isNewStudy(myLastStudyID,myStudyID)) {
-    //rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
-    //     Try to get id of the study from the SALOME Session
-    if(myStudyID < 0 ) SetStudyID(-1);
-    myTransfOp = myGeomEngine->GetITransformOperations(myStudyID);
+  if (CORBA::is_nil(myTransfOp)) {
+    myTransfOp = myGeomEngine->GetITransformOperations();
   }
 }
 
@@ -315,11 +256,8 @@ void GEOM_Superv_i::getShapesOp()
   if (CORBA::is_nil(myGeomEngine))
     setGeomEngine();
   // get GEOM_IShapesOperations interface
-  if (CORBA::is_nil(myShapesOp) || isNewStudy(myLastStudyID,myStudyID)) {
-    //rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
-    //     Try to get id of the study from the SALOME Session
-    if(myStudyID < 0 ) SetStudyID(-1);
-    myShapesOp = myGeomEngine->GetIShapesOperations(myStudyID);
+  if (CORBA::is_nil(myShapesOp)) {
+    myShapesOp = myGeomEngine->GetIShapesOperations();
   }
 }
 
@@ -331,11 +269,8 @@ void GEOM_Superv_i::getBlocksOp()
   if (CORBA::is_nil(myGeomEngine))
     setGeomEngine();
   // get GEOM_IBlocksOperations interface
-  if (CORBA::is_nil(myBlocksOp) || isNewStudy(myLastStudyID,myStudyID)) {
-    //rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
-    //     Try to get id of the study from the SALOME Session
-    if(myStudyID < 0 ) SetStudyID(-1);
-    myBlocksOp = myGeomEngine->GetIBlocksOperations(myStudyID);
+  if (CORBA::is_nil(myBlocksOp)) {
+    myBlocksOp = myGeomEngine->GetIBlocksOperations();
   }
 }
 
@@ -347,11 +282,8 @@ void GEOM_Superv_i::getCurvesOp()
   if (CORBA::is_nil(myGeomEngine))
     setGeomEngine();
   // get GEOM_ICurvesOperations interface
-  if (CORBA::is_nil(myCurvesOp) || isNewStudy(myLastStudyID,myStudyID)) {
-    //rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
-    //     Try to get id of the study from the SALOME Session
-    if(myStudyID < 0 ) SetStudyID(-1);
-    myCurvesOp = myGeomEngine->GetICurvesOperations(myStudyID);
+  if (CORBA::is_nil(myCurvesOp)) {
+    myCurvesOp = myGeomEngine->GetICurvesOperations();
   }
 }
 
@@ -363,11 +295,22 @@ void GEOM_Superv_i::getLocalOp()
   if (CORBA::is_nil(myGeomEngine))
     setGeomEngine();
   // get GEOM_ILocalOperations interface
-  if (CORBA::is_nil(myLocalOp) || isNewStudy(myLastStudyID,myStudyID)) {
-    //rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
-    //     Try to get id of the study from the SALOME Session
-    if(myStudyID < 0 ) SetStudyID(-1);
-    myLocalOp = myGeomEngine->GetILocalOperations(myStudyID);
+  if (CORBA::is_nil(myLocalOp)) {
+    myLocalOp = myGeomEngine->GetILocalOperations();
+  }
+}
+
+//=============================================================================
+//  getMeasureOp:
+//=============================================================================
+void GEOM_Superv_i::getMeasureOp()
+{
+  if (CORBA::is_nil(myGeomEngine))
+    setGeomEngine();
+  // get GEOM_IMeasureOperations interface
+  if (CORBA::is_nil(myMeasureOp))
+  {
+    myMeasureOp = myGeomEngine->GetIMeasureOperations();
   }
 }
 
@@ -379,11 +322,8 @@ void GEOM_Superv_i::getGroupOp()
   if (CORBA::is_nil(myGeomEngine))
     setGeomEngine();
   // get GEOM_IGroupOperations interface
-  if (CORBA::is_nil(myGroupOp) || isNewStudy(myLastStudyID,myStudyID)) {
-    //rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
-    //     Try to get id of the study from the SALOME Session
-    if(myStudyID < 0 ) SetStudyID(-1);
-    myGroupOp = myGeomEngine->GetIGroupOperations(myStudyID);
+  if (CORBA::is_nil(myGroupOp)) {
+    myGroupOp = myGeomEngine->GetIGroupOperations();
   }
 }
 
@@ -394,16 +334,92 @@ void GEOM_Superv_i::getAdvancedOp()
 {
   if (CORBA::is_nil(myGeomEngine))
     setGeomEngine();
-  // get GEOM_IAdvancedOperations interface
-  if (CORBA::is_nil(myAdvancedOp) || isNewStudy(myLastStudyID,myStudyID)) {
-    //rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
-    //     Try to get id of the study from the SALOME Session
-    if(myStudyID < 0 ) SetStudyID(-1);
-    //myAdvancedOp = myGeomEngine->GetIAdvancedOperations(myStudyID);
-    myAdvancedOp = GEOM::GEOM_IAdvancedOperations::_narrow(myGeomEngine->GetPluginOperations(myStudyID, "AdvancedEngine"));
+  // get GEOM::IAdvancedOperations interface
+  if (CORBA::is_nil(myAdvancedOp)) {
+    myAdvancedOp = GEOM::IAdvancedOperations::_narrow(myGeomEngine->GetPluginOperations("AdvancedEngine"));
+  }
+}
+
+//=============================================================================
+//  getSTLPluginOp:
+//=============================================================================
+void GEOM_Superv_i::getSTLPluginOp()
+{
+  if (CORBA::is_nil(myGeomEngine))
+    setGeomEngine();
+  // get GEOM::ISTLOperations interface
+  if (CORBA::is_nil(mySTLOp)) {
+    mySTLOp = GEOM::ISTLOperations::_narrow(myGeomEngine->GetPluginOperations("STLPluginEngine"));
+  }
+}
+
+//=============================================================================
+//  getBREPPluginOp:
+//=============================================================================
+void GEOM_Superv_i::getBREPPluginOp()
+{
+  if (CORBA::is_nil(myGeomEngine))
+    setGeomEngine();
+  // get GEOM:IBREPOperations interface
+  if (CORBA::is_nil(myBREPOp)) {
+    myBREPOp = GEOM::IBREPOperations::_narrow(myGeomEngine->GetPluginOperations("BREPPluginEngine"));
+  }
+}
+
+//=============================================================================
+//  getSTEPPluginOp:
+//=============================================================================
+void GEOM_Superv_i::getSTEPPluginOp()
+{
+  if (CORBA::is_nil(myGeomEngine))
+    setGeomEngine();
+  // get GEOM::ISTEPOperations interface
+  if (CORBA::is_nil(mySTEPOp)) {
+    mySTEPOp = GEOM::ISTEPOperations::_narrow(myGeomEngine->GetPluginOperations("STEPPluginEngine"));
+  }
+}
+
+//=============================================================================
+//  getIGESPluginOp:
+//=============================================================================
+void GEOM_Superv_i::getIGESPluginOp()
+{
+  if (CORBA::is_nil(myGeomEngine))
+    setGeomEngine();
+  // get GEOM::IIGESOperations interface
+  if (CORBA::is_nil(myIGESOp)) {
+    myIGESOp = GEOM::IIGESOperations::_narrow(myGeomEngine->GetPluginOperations("IGESPluginEngine"));
   }
 }
 
+//=============================================================================
+//  getXAOPluginOp:
+//=============================================================================
+void GEOM_Superv_i::getXAOPluginOp()
+{
+  if (CORBA::is_nil(myGeomEngine))
+    setGeomEngine();
+  // get GEOM::IXAOOperations interface
+  if (CORBA::is_nil(myXAOOp)) {
+    myXAOOp = GEOM::IXAOOperations::_narrow(myGeomEngine->GetPluginOperations("XAOPluginEngine"));
+  }
+}
+
+#ifdef WITH_VTK
+//=============================================================================
+//  getVTKPluginOp:
+//=============================================================================
+void GEOM_Superv_i::getVTKPluginOp()
+{
+  if (CORBA::is_nil(myGeomEngine))
+    setGeomEngine();
+  // get GEOM::IVTKOperations interface
+  if (CORBA::is_nil(myVTKOp)) {
+    myVTKOp = GEOM::IVTKOperations::_narrow(myGeomEngine->GetPluginOperations("VTKPluginEngine"));
+  }
+}
+#endif
+
 //=============================================================================
 //  GetServant:
 //=============================================================================
@@ -419,9 +435,9 @@ PortableServer::ServantBase_var GEOM_Superv_i::GetServant(CORBA::Object_ptr
 // function : Save()
 // purpose  : save OCAF/Geom document
 //============================================================================
-SALOMEDS::TMPFile* GEOM_Superv_i::Save(SALOMEDS::SComponent_ptr theComponent,
-                                       const char* theURL,
-                                       CORBA::Boolean isMultiFile)
+SALOMEDS::TMPFile* GEOM_Superv_i::Save(SALOMEDS::SComponent_ptr /*theComponent*/,
+                                       const char* /*theURL*/,
+                                       CORBA::Boolean /*isMultiFile*/)
 {
   SALOMEDS::TMPFile_var aStreamFile;
   return aStreamFile._retn();
@@ -431,9 +447,9 @@ SALOMEDS::TMPFile* GEOM_Superv_i::Save(SALOMEDS::SComponent_ptr theComponent,
 // function : SaveASCII()
 // purpose  :
 //============================================================================
-SALOMEDS::TMPFile* GEOM_Superv_i::SaveASCII(SALOMEDS::SComponent_ptr theComponent,
-                                            const char* theURL,
-                                            CORBA::Boolean isMultiFile)
+SALOMEDS::TMPFile* GEOM_Superv_i::SaveASCII(SALOMEDS::SComponent_ptr /*theComponent*/,
+                                            const char* /*theURL*/,
+                                            CORBA::Boolean /*isMultiFile*/)
 {
   SALOMEDS::TMPFile_var aStreamFile;
   return aStreamFile._retn();
@@ -443,10 +459,10 @@ SALOMEDS::TMPFile* GEOM_Superv_i::SaveASCII(SALOMEDS::SComponent_ptr theComponen
 // function : Load()
 // purpose  :
 //============================================================================
-CORBA::Boolean GEOM_Superv_i::Load(SALOMEDS::SComponent_ptr theComponent,
-                                   const SALOMEDS::TMPFile& theStream,
-                                   const char* theURL,
-                                   CORBA::Boolean isMultiFile)
+CORBA::Boolean GEOM_Superv_i::Load(SALOMEDS::SComponent_ptr /*theComponent*/,
+                                   const SALOMEDS::TMPFile& /*theStream*/,
+                                   const char* /*theURL*/,
+                                   CORBA::Boolean /*isMultiFile*/)
 {
   return false;
 }
@@ -455,10 +471,10 @@ CORBA::Boolean GEOM_Superv_i::Load(SALOMEDS::SComponent_ptr theComponent,
 // function : LoadASCII()
 // purpose  :
 //============================================================================
-CORBA::Boolean GEOM_Superv_i::LoadASCII(SALOMEDS::SComponent_ptr theComponent,
-                                        const SALOMEDS::TMPFile& theStream,
-                                        const char* theURL,
-                                        CORBA::Boolean isMultiFile)
+CORBA::Boolean GEOM_Superv_i::LoadASCII(SALOMEDS::SComponent_ptr /*theComponent*/,
+                                        const SALOMEDS::TMPFile& /*theStream*/,
+                                        const char* /*theURL*/,
+                                        CORBA::Boolean /*isMultiFile*/)
 {
   return false;
 }
@@ -467,7 +483,7 @@ CORBA::Boolean GEOM_Superv_i::LoadASCII(SALOMEDS::SComponent_ptr theComponent,
 // function : Close()
 // purpose  :
 //============================================================================
-void GEOM_Superv_i::Close(SALOMEDS::SComponent_ptr theComponent)
+void GEOM_Superv_i::Close(SALOMEDS::SComponent_ptr /*theComponent*/)
 {
 }
 
@@ -484,10 +500,10 @@ char* GEOM_Superv_i::ComponentDataType()
 // function : IORToLocalPersistentID()
 // purpose  :
 //============================================================================
-char* GEOM_Superv_i::IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject,
-                                            const char* IORString,
-                                            CORBA::Boolean isMultiFile,
-                                            CORBA::Boolean isASCII)
+char* GEOM_Superv_i::IORToLocalPersistentID(SALOMEDS::SObject_ptr /*theSObject*/,
+                                            const char* /*IORString*/,
+                                            CORBA::Boolean /*isMultiFile*/,
+                                            CORBA::Boolean /*isASCII*/)
 {
   return 0;
 }
@@ -498,10 +514,10 @@ char* GEOM_Superv_i::IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject,
 //          : Used when a study is loaded
 //          : The IOR (IORName) of object created is returned
 //============================================================================
-char* GEOM_Superv_i::LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject,
-                                            const char* aLocalPersistentID,
-                                            CORBA::Boolean isMultiFile,
-                                            CORBA::Boolean isASCII)
+char* GEOM_Superv_i::LocalPersistentIDToIOR(SALOMEDS::SObject_ptr /*theSObject*/,
+                                            const char* /*aLocalPersistentID*/,
+                                            CORBA::Boolean /*isMultiFile*/,
+                                            CORBA::Boolean /*isASCII*/)
 {
   return 0;
 }
@@ -521,14 +537,13 @@ CORBA::Boolean GEOM_Superv_i::CanPublishInStudy(CORBA::Object_ptr theIOR)
 // function : PublishInStudy
 // purpose  :
 //============================================================================
-SALOMEDS::SObject_ptr GEOM_Superv_i::PublishInStudy(SALOMEDS::Study_ptr theStudy,
-                                                    SALOMEDS::SObject_ptr theSObject,
+SALOMEDS::SObject_ptr GEOM_Superv_i::PublishInStudy(SALOMEDS::SObject_ptr theSObject,
                                                     CORBA::Object_ptr theObject,
-                                                    const char* theName) throw (SALOME::SALOME_Exception)
+                                                    const char* theName) 
 {
   if (CORBA::is_nil(myGeomEngine))
     setGeomEngine();
-  return myGeomEngine->PublishInStudy(theStudy, theSObject, theObject, theName);
+  return myGeomEngine->PublishInStudy(theSObject, theObject, theName);
 }
 
 //============================================================================
@@ -536,20 +551,19 @@ SALOMEDS::SObject_ptr GEOM_Superv_i::PublishInStudy(SALOMEDS::Study_ptr theStudy
 // purpose  :
 //============================================================================
 GEOM::ListOfGO*
-GEOM_Superv_i::PublishNamedShapesInStudy(SALOMEDS::Study_ptr theStudy,
-                                         //SALOMEDS::SObject_ptr theSObject,
+GEOM_Superv_i::PublishNamedShapesInStudy(//SALOMEDS::SObject_ptr theSObject,
                                          CORBA::Object_ptr theObject)
 {
   if (CORBA::is_nil(myGeomEngine))
     setGeomEngine();
-  return myGeomEngine->PublishNamedShapesInStudy(theStudy, theObject);
+  return myGeomEngine->PublishNamedShapesInStudy(theObject);
 }
 
 //============================================================================
 // function : CanCopy()
 // purpose  :
 //============================================================================
-CORBA::Boolean GEOM_Superv_i::CanCopy(SALOMEDS::SObject_ptr theObject)
+CORBA::Boolean GEOM_Superv_i::CanCopy(SALOMEDS::SObject_ptr /*theObject*/)
 {
   return false;
 }
@@ -558,7 +572,7 @@ CORBA::Boolean GEOM_Superv_i::CanCopy(SALOMEDS::SObject_ptr theObject)
 // function : CopyFrom()
 // purpose  :
 //============================================================================
-SALOMEDS::TMPFile* GEOM_Superv_i::CopyFrom(SALOMEDS::SObject_ptr theObject, CORBA::Long& theObjectID)
+SALOMEDS::TMPFile* GEOM_Superv_i::CopyFrom(SALOMEDS::SObject_ptr /*theObject*/, CORBA::Long& /*theObjectID*/)
 {
   SALOMEDS::TMPFile_var aStreamFile;
   return aStreamFile._retn();
@@ -568,7 +582,7 @@ SALOMEDS::TMPFile* GEOM_Superv_i::CopyFrom(SALOMEDS::SObject_ptr theObject, CORB
 // function : CanPaste()
 // purpose  :
 //============================================================================
-CORBA::Boolean GEOM_Superv_i::CanPaste(const char* theComponentName, CORBA::Long theObjectID)
+CORBA::Boolean GEOM_Superv_i::CanPaste(const char* /*theComponentName*/, CORBA::Long /*theObjectID*/)
 {
   return false;
 }
@@ -577,9 +591,9 @@ CORBA::Boolean GEOM_Superv_i::CanPaste(const char* theComponentName, CORBA::Long
 // function : PasteInto()
 // purpose  :
 //============================================================================
-SALOMEDS::SObject_ptr GEOM_Superv_i::PasteInto(const SALOMEDS::TMPFile& theStream,
-                                               CORBA::Long theObjectID,
-                                               SALOMEDS::SObject_ptr theObject)
+SALOMEDS::SObject_ptr GEOM_Superv_i::PasteInto(const SALOMEDS::TMPFile& /*theStream*/,
+                                               CORBA::Long /*theObjectID*/,
+                                               SALOMEDS::SObject_ptr /*theObject*/)
 {
   SALOMEDS::SObject_var aNewSO;
   return aNewSO._retn();
@@ -627,7 +641,7 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePointOnCurve (GEOM::GEOM_Object_ptr the
   beginService( " GEOM_Superv_i::MakePointOnCurve" );
   MESSAGE("GEOM_Superv_i::MakePointOnCurve");
   getBasicOp();
-  GEOM::GEOM_Object_ptr anObj = myBasicOp->MakePointOnCurve(theRefCurve, theParameter);
+  GEOM::GEOM_Object_ptr anObj = myBasicOp->MakePointOnCurve(theRefCurve, theParameter, false);
   endService( " GEOM_Superv_i::MakePointOnCurve" );
   return anObj;
 }
@@ -1073,6 +1087,38 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCylinderRH (CORBA::Double theR,
   return anObj;
 }
 
+//=============================================================================
+//  MakeCylinderPntVecRHA:
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCylinderPntVecRHA (GEOM::GEOM_Object_ptr thePnt,
+                                                           GEOM::GEOM_Object_ptr theAxis,
+                                                           CORBA::Double theRadius,
+                                                           CORBA::Double theHeight,
+                                                           CORBA::Double theAngle)
+{
+  beginService( " GEOM_Superv_i::MakeCylinderPntVecRHA" );
+  MESSAGE("GEOM_Superv_i::MakeCylinderPntVecRHA");
+  get3DPrimOp();
+  GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeCylinderPntVecRHA(thePnt, theAxis, theRadius, theHeight, theAngle);
+  endService( " GEOM_Superv_i::MakeCylinderPntVecRHA" );
+  return anObj;
+}
+
+//=============================================================================
+//  MakeCylinderRHA:
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCylinderRHA (CORBA::Double theR,
+                                                     CORBA::Double theH,
+                                                     CORBA::Double theA)
+{
+  beginService( " GEOM_Superv_i::MakeCylinderRHA" );
+  MESSAGE("GEOM_Superv_i::MakeCylinderRHA");
+  get3DPrimOp();
+  GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeCylinderRHA(theR, theH, theA);
+  endService( " GEOM_Superv_i::MakeCylinderRHA" );
+  return anObj;
+}
+
 //=============================================================================
 //  MakeSphere:
 //=============================================================================
@@ -1276,9 +1322,9 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePipe (GEOM::GEOM_Object_ptr theBase,
   beginService( " GEOM_Superv_i::MakePipe" );
   MESSAGE("GEOM_Superv_i::MakePipe");
   get3DPrimOp();
-  GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakePipe(theBase, thePath);
+  GEOM::ListOfGO_var aList = my3DPrimOp->MakePipe(theBase, thePath, false);
   endService( " GEOM_Superv_i::MakePipe" );
-  return anObj;
+  return aList[0];
 }
 
 //=============================================================================
@@ -1326,8 +1372,11 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilling (GEOM::GEOM_Object_ptr theShape
   beginService( " GEOM_Superv_i::MakeFilling" );
   MESSAGE("GEOM_Superv_i::MakeFilling");
   get3DPrimOp();
+  GEOM::ListOfGO_var objList = new GEOM::ListOfGO;
+  objList->length( 1 );
+  objList[0] = theShape;
   GEOM::GEOM_Object_ptr anObj =
-    my3DPrimOp->MakeFilling(theShape, theMinDeg, theMaxDeg, theTol2D, theTol3D,
+    my3DPrimOp->MakeFilling(objList, theMinDeg, theMaxDeg, theTol2D, theTol3D,
                             theNbIter, theMethod, theApprox);
   endService( " GEOM_Superv_i::MakeFilling" );
   return anObj;
@@ -1382,9 +1431,9 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePipeWithDifferentSections
   beginService( " GEOM_Superv_i::MakePipeWithDifferentSections" );
   MESSAGE("GEOM_Superv_i::MakePipeWithDifferentSections");
   get3DPrimOp();
-  GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakePipeWithDifferentSections(theBases,theLocations, thePath,theWithContact,theWithCorrections);
+  GEOM::ListOfGO_var aList = my3DPrimOp->MakePipeWithDifferentSections(theBases,theLocations, thePath,theWithContact,theWithCorrections, false, false);
   endService( " GEOM_Superv_i::MakePipeWithDifferentSections" );
-  return anObj;
+  return aList[0];
 }
 
 
@@ -1402,12 +1451,13 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePipeWithShellSections
   beginService( " GEOM_Superv_i::MakePipeWithShellSections" );
   MESSAGE("GEOM_Superv_i::MakePipeWithShellSections");
   get3DPrimOp();
-  GEOM::GEOM_Object_ptr anObj =
+  GEOM::ListOfGO_var aList =
     my3DPrimOp->MakePipeWithShellSections(theBases, theSubBases,
                                           theLocations, thePath,
-                                          theWithContact, theWithCorrections);
+                                          theWithContact, theWithCorrections,
+                                          false);
   endService( " GEOM_Superv_i::MakePipeWithShellSections" );
-  return anObj;
+  return aList[0];
 }
 
 
@@ -1421,10 +1471,10 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePipeShellsWithoutPath
   beginService( " GEOM_Superv_i::MakePipeShellsWithoutPath" );
   MESSAGE("GEOM_Superv_i::MakePipeShellsWithoutPath");
   get3DPrimOp();
-  GEOM::GEOM_Object_ptr anObj =
-    my3DPrimOp->MakePipeShellsWithoutPath(theBases,theLocations);
+  GEOM::ListOfGO_var aList =
+    my3DPrimOp->MakePipeShellsWithoutPath(theBases,theLocations, false);
   endService( " GEOM_Superv_i::MakePipeShellsWithoutPath" );
-  return anObj;
+  return aList[0];
 }
 
 
@@ -1439,10 +1489,10 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePipeBiNormalAlongVector
   beginService( " GEOM_Superv_i::MakePipeBiNormalAlongVector" );
   MESSAGE("GEOM_Superv_i::MakePipeBiNormalAlongVector");
   get3DPrimOp();
-  GEOM::GEOM_Object_ptr anObj =
-    my3DPrimOp->MakePipeBiNormalAlongVector(theBase, thePath, theVec);
+  GEOM::ListOfGO_var aList =
+    my3DPrimOp->MakePipeBiNormalAlongVector(theBase, thePath, theVec, false);
   endService( " GEOM_Superv_i::MakePipeBiNormalAlongVector" );
-  return anObj;
+  return aList[0];
 }
 
 
@@ -1588,41 +1638,15 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::ImportFile (const char* theFileName,
   beginService( " GEOM_Superv_i::ImportFile" );
   MESSAGE("GEOM_Superv_i::ImportFile");
   getInsOp();
-  GEOM::ListOfGO* aSeq = myInsOp->ImportFile(theFileName, theFormatName);
-  GEOM::GEOM_Object_ptr anObj;
+  GEOM::ListOfGBO_var aSeq = myInsOp->ImportFile(theFileName, theFormatName);
+  GEOM::GEOM_Object_var anObj;
   
   if (aSeq->length() > 0) {
-    anObj = aSeq->operator[](0);
+    anObj = GEOM::GEOM_Object::_narrow(aSeq[0]);
   }
 
   endService( " GEOM_Superv_i::ImportFile" );
-  return anObj;
-}
-
-//=============================================================================
-//  ImportTranslators:
-//=============================================================================
-void GEOM_Superv_i::ImportTranslators (GEOM::string_array_out theFormats,
-                                       GEOM::string_array_out thePatterns)
-{
-  beginService( " GEOM_Superv_i::ImportTranslators" );
-  MESSAGE("GEOM_Superv_i::ImportTranslators");
-  getInsOp();
-  myInsOp->ImportTranslators(theFormats, thePatterns);
-  endService( " GEOM_Superv_i::ImportTranslators" );
-}
-
-//=============================================================================
-//  ExportTranslators:
-//=============================================================================
-void GEOM_Superv_i::ExportTranslators (GEOM::string_array_out theFormats,
-                                       GEOM::string_array_out thePatterns)
-{
-  beginService( " GEOM_Superv_i::ExportTranslators" );
-  MESSAGE("GEOM_Superv_i::ExportTranslators");
-  getInsOp();
-  myInsOp->ExportTranslators(theFormats, thePatterns);
-  endService( " GEOM_Superv_i::ExportTranslators" );
+  return anObj._retn();
 }
 
 //============================= TransformOperations ===========================
@@ -1956,7 +1980,7 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::OffsetShape (GEOM::GEOM_Object_ptr theObjec
   beginService( " GEOM_Superv_i::OffsetShape" );
   MESSAGE("GEOM_Superv_i::OffsetShape");
   getTransfOp();
-  GEOM::GEOM_Object_ptr anObj = myTransfOp->OffsetShape(theObject, theOffset);
+  GEOM::GEOM_Object_ptr anObj = myTransfOp->OffsetShape(theObject, theOffset, true);
   endService( " GEOM_Superv_i::OffsetShape" );
   return anObj;
 }
@@ -1970,7 +1994,7 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::OffsetShapeCopy (GEOM::GEOM_Object_ptr theO
   beginService( " GEOM_Superv_i::OffsetShapeCopy" );
   MESSAGE("GEOM_Superv_i::OffsetShapeCopy");
   getTransfOp();
-  GEOM::GEOM_Object_ptr anObj = myTransfOp->OffsetShapeCopy(theObject, theOffset);
+  GEOM::GEOM_Object_ptr anObj = myTransfOp->OffsetShapeCopy(theObject, theOffset, true);
   endService( " GEOM_Superv_i::OffsetShapeCopy" );
   return anObj;
 }
@@ -2129,7 +2153,7 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeWire (GEOM::GEOM_List_ptr theEdgesAndWi
   if (GEOM_List_i<GEOM::ListOfGO>* aListImplEW =
       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theEdgesAndWires, myPOA).in())) {
     getShapesOp();
-    GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeWire(aListImplEW->GetList(), theTolerance);
+    GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeWire(aListImplEW->GetList(), theTolerance, GEOM::WBM_FixTolerance);
     endService( " GEOM_Superv_i::MakeWire" );
     return anObj;
   }
@@ -2170,6 +2194,24 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFaceWires (GEOM::GEOM_List_ptr theWires
   return NULL;
 }
 
+//=============================================================================
+//  MakeFaceWithConstraints:
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFaceWithConstraints (GEOM::GEOM_List_ptr theConstraints)
+{
+  beginService( " GEOM_Superv_i::MakeFaceWithConstraints" );
+  MESSAGE("GEOM_Superv_i::MakeFaceWithConstraints");
+  if (GEOM_List_i<GEOM::ListOfGO>* aConstraints =
+      dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theConstraints, myPOA).in())) {
+    getShapesOp();
+    GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeFaceWithConstraints(aConstraints->GetList());
+    endService( " GEOM_Superv_i::MakeFaceWithConstraints" );
+    return anObj;
+  }
+  endService( " GEOM_Superv_i::MakeFaceWithConstraints" );
+  return NULL;
+}
+
 //=============================================================================
 //  MakeShell:
 //=============================================================================
@@ -2237,6 +2279,25 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCompound (GEOM::GEOM_List_ptr theShapes
   return NULL;
 }
 
+//=============================================================================
+//  MakeSolidFromConnectedFaces:
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSolidFromConnectedFaces (GEOM::GEOM_List_ptr theFacesOrShells,
+                                                                  CORBA::Boolean isIntersect)
+{
+  beginService( " GEOM_Superv_i::MakeSolidFromConnectedFaces" );
+  MESSAGE("GEOM_Superv_i::MakeSolidFromConnectedFaces");
+  if (GEOM_List_i<GEOM::ListOfGO>* aListImpl =
+      dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theFacesOrShells, myPOA).in())) {
+    getShapesOp();
+    GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeSolidFromConnectedFaces(aListImpl->GetList(), isIntersect);
+    endService( " GEOM_Superv_i::MakeSolidFromConnectedFaces" );
+    return anObj;
+  }
+  endService( " GEOM_Superv_i::MakeSolidFromConnectedFaces" );
+  return NULL;
+}
+
 //=============================================================================
 //  MakeGlueFaces:
 //=============================================================================
@@ -2247,8 +2308,11 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeGlueFaces (GEOM::GEOM_Object_ptr theSha
   beginService( " GEOM_Superv_i::MakeGlueFaces" );
   MESSAGE("GEOM_Superv_i::MakeGlueFaces");
   getShapesOp();
+  GEOM::ListOfGO_var objList = new GEOM::ListOfGO;
+  objList->length( 1 );
+  objList[0] = theShape;
   GEOM::GEOM_Object_ptr anObj =
-    myShapesOp->MakeGlueFaces(theShape, theTolerance, doKeepNonSolids);
+    myShapesOp->MakeGlueFaces(objList, theTolerance, doKeepNonSolids);
   endService( " GEOM_Superv_i::MakeGlueFaces" );
   return anObj;
 }
@@ -2262,7 +2326,10 @@ GEOM::GEOM_List_ptr GEOM_Superv_i::GetGlueFaces (GEOM::GEOM_Object_ptr theShape,
   beginService( " GEOM_Superv_i::GetGlueFaces" );
   MESSAGE("GEOM_Superv_i::GetGlueFaces");
   getShapesOp();
-  GEOM::ListOfGO* aList = myShapesOp->GetGlueFaces(theShape, theTolerance);
+  GEOM::ListOfGO_var objList = new GEOM::ListOfGO;
+  objList->length( 1 );
+  objList[0] = theShape;
+  GEOM::ListOfGO* aList = myShapesOp->GetGlueFaces(objList, theTolerance);
   GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aList));
   MESSAGE(" List of "<<aListPtr->GetList().length()<<" element(s)");
   endService( " GEOM_Superv_i::GetGlueFaces" );
@@ -2281,8 +2348,11 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeGlueFacesByList (GEOM::GEOM_Object_ptr
   beginService( " GEOM_Superv_i::MakeGlueFacesByList" );
   MESSAGE("GEOM_Superv_i::MakeGlueFacesByList");
   getShapesOp();
+  GEOM::ListOfGO_var objList = new GEOM::ListOfGO;
+  objList->length( 1 );
+  objList[0] = theShape;
   GEOM::GEOM_Object_ptr anObj =
-    myShapesOp->MakeGlueFacesByList(theShape, theTolerance, theFaces,
+    myShapesOp->MakeGlueFacesByList(objList, theTolerance, theFaces,
                                     doKeepNonSolids, doGlueAllEdges);
   endService( " GEOM_Superv_i::MakeGlueFacesByList" );
   return anObj;
@@ -2612,7 +2682,7 @@ CORBA::Boolean GEOM_Superv_i::CheckCompoundOfBlocks
   beginService( " GEOM_Superv_i::CheckCompoundOfBlocks" );
   MESSAGE("GEOM_Superv_i::CheckCompoundOfBlocks");
   getBlocksOp();
-  CORBA::Boolean aRes = myBlocksOp->CheckCompoundOfBlocks(theCompound, theErrors);
+  CORBA::Boolean aRes = myBlocksOp->CheckCompoundOfBlocks(theCompound, -1., theErrors);
   endService( " GEOM_Superv_i::CheckCompoundOfBlocks" );
   return aRes;
 }
@@ -3335,30 +3405,194 @@ GEOM::GEOM_List_ptr GEOM_Superv_i::GetObjects (GEOM::GEOM_Object_ptr theGroup)
   return aListPtr->_this();
 }
 
+//=============================== Import/Export Operations =============================
+//=============================================================================
+//  Export STL
+//=============================================================================
+void GEOM_Superv_i::ExportSTL( GEOM::GEOM_Object_ptr theObject,
+                               const char*           theFileName,
+                               const bool            theIsASCII,
+                               CORBA::Double         theDeflection,
+                               const bool            theIsRelative )
+{
+  beginService( " GEOM_Superv_i::ExportSTL" );
+  MESSAGE("GEOM_Superv_i::ExportSTL");
+  getSTLPluginOp();
+  mySTLOp->ExportSTL( theObject, theFileName, theIsASCII, theDeflection, theIsRelative );
+  endService( " GEOM_Superv_i::ExportSTL" );
+}
+
+//=============================================================================
+//  Import STL
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_Superv_i::ImportSTL( const char* theFileName )
+{
+  beginService( " GEOM_Superv_i::ImportSTL" );
+  MESSAGE("GEOM_Superv_i::ImportSTL");
+  getSTLPluginOp();
+  GEOM::ListOfGO* aSeq = mySTLOp->ImportSTL(theFileName );
+  GEOM::GEOM_Object_var anObj;
+
+  if (aSeq->length() > 0) {
+    anObj = aSeq->operator[](0);
+  }
+
+  endService( " GEOM_Superv_i::ImportSTL" );
+  return anObj._retn();
+}
+
+//=============================================================================
+//  Export BREP
+//=============================================================================
+void GEOM_Superv_i::ExportBREP( GEOM::GEOM_Object_ptr theObject,
+                                const char*           theFileName )
+{
+  beginService( " GEOM_Superv_i::ExportBREP" );
+  MESSAGE("GEOM_Superv_i::ExportBREP");
+  getBREPPluginOp();
+  myBREPOp->ExportBREP( theObject, theFileName );
+  endService( " GEOM_Superv_i::ExportBREP" );
+}
+
+//=============================================================================
+//  Import BREP
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_Superv_i::ImportBREP( const char* theFileName )
+{
+  beginService( " GEOM_Superv_i::ImportBREP" );
+  MESSAGE("GEOM_Superv_i::ImportBREP");
+  getBREPPluginOp();
+  GEOM::ListOfGO* aSeq = myBREPOp->ImportBREP(theFileName );
+  GEOM::GEOM_Object_var anObj;
+
+  if (aSeq->length() > 0) {
+    anObj = aSeq->operator[](0);
+  }
+
+  endService( " GEOM_Superv_i::ImportBREP" );
+  return anObj._retn();
+}
+
+//=============================================================================
+//  Export STEP
+//=============================================================================
+void GEOM_Superv_i::ExportSTEP( GEOM::GEOM_Object_ptr theObject,
+                                const char*           theFileName )
+{
+  beginService( " GEOM_Superv_i::ExportSTEP" );
+  MESSAGE("GEOM_Superv_i::ExportSTEP");
+  getSTEPPluginOp();
+
+  const GEOM::length_unit aUnit = GEOM::LU_METER;
+
+  mySTEPOp->ExportSTEP( theObject, theFileName, aUnit );
+  endService( " GEOM_Superv_i::ExportSTEP" );
+}
+
+//=============================================================================
+//  Import STEP
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_Superv_i::ImportSTEP( const char* theFileName,
+                                                 const bool  theIsIgnoreUnits )
+{
+  beginService( " GEOM_Superv_i::ImportSTEP" );
+  MESSAGE("GEOM_Superv_i::ImportSTEP");
+  getSTEPPluginOp();
+  GEOM::ListOfGO* aSeq = mySTEPOp->ImportSTEP(theFileName, theIsIgnoreUnits, false );
+  GEOM::GEOM_Object_var anObj;
+
+  if (aSeq->length() > 0) {
+    anObj = aSeq->operator[](0);
+  }
+
+  endService( " GEOM_Superv_i::ImportSTEP" );
+  return anObj._retn();
+}
+
 //=============================================================================
-//  ExportXAO
+//  Export IGES
 //=============================================================================
-CORBA::Boolean GEOM_Superv_i::ExportXAO (GEOM::GEOM_Object_ptr shape,
-                                        const GEOM::ListOfGO& groups, const GEOM::ListOfFields& fields,
-                                        const char* author, const char* fileName)
+void GEOM_Superv_i::ExportIGES( GEOM::GEOM_Object_ptr theObject,
+                                const char*           theFileName,
+                                const char*           theVersion )
+{
+  beginService( " GEOM_Superv_i::ExportIGES" );
+  MESSAGE("GEOM_Superv_i::ExportIGES");
+  getIGESPluginOp();
+  myIGESOp->ExportIGES( theObject, theFileName, theVersion );
+  endService( " GEOM_Superv_i::ExportIGES" );
+}
+
+//=============================================================================
+//  Import IGES
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_Superv_i::ImportIGES( const char* theFileName,
+                                                 const bool  theIsIgnoreUnits )
+{
+  beginService( " GEOM_Superv_i::ImportIGES" );
+  MESSAGE("GEOM_Superv_i::ImportIGES");
+  getIGESPluginOp();
+  GEOM::ListOfGO* aSeq = myIGESOp->ImportIGES(theFileName, theIsIgnoreUnits );
+  GEOM::GEOM_Object_var anObj;
+
+  if (aSeq->length() > 0) {
+    anObj = aSeq->operator[](0);
+  }
+
+  endService( " GEOM_Superv_i::ImportIGES" );
+  return anObj._retn();
+}
+
+//=============================================================================
+//  Export XAO
+//=============================================================================
+CORBA::Boolean GEOM_Superv_i::ExportXAO( GEOM::GEOM_Object_ptr shape,
+                                         const GEOM::ListOfGO& groups,
+                                         const GEOM::ListOfFields& fields,
+                                         const char* author,
+                                         const char* fileName,
+                                         const char* shapeFileName )
 {
   beginService( " GEOM_Superv_i::ExportXAO" );
   MESSAGE("GEOM_Superv_i::ExportXAO");
-  getInsOp();
-  CORBA::Boolean isGood = myInsOp->ExportXAO(shape, groups, fields, author, fileName);
+  getXAOPluginOp();
+  CORBA::Boolean isGood = myXAOOp->ExportXAO( shape, groups, fields, author, fileName, shapeFileName );
   endService( " GEOM_Superv_i::ExportXAO" );
   return isGood;
 }
 
 //=============================================================================
-//  ImportXAO
+//  Import XAO
 //=============================================================================
-CORBA::Boolean GEOM_Superv_i::ImportXAO (const char* fileName, GEOM::GEOM_Object_out shape, 
-                                        GEOM::ListOfGO_out subShapes, GEOM::ListOfGO_out groups, GEOM::ListOfFields_out fields)
+CORBA::Boolean GEOM_Superv_i::ImportXAO( const char* /*fileName*/,
+                                         GEOM::GEOM_Object_out /*shape*/,
+                                         GEOM::ListOfGO_out /*subShapes*/,
+                                         GEOM::ListOfGO_out /*groups*/,
+                                         GEOM::ListOfFields_out /*fields*/ )
 {
   return false;
 }
 
+
+//=============================================================================
+//  Export VTK
+//=============================================================================
+void GEOM_Superv_i::ExportVTK(  GEOM::GEOM_Object_ptr theObject,
+                               const char*           theFileName,
+                               CORBA::Double         theDeflection )
+{
+  #ifdef WITH_VTK
+  beginService( " GEOM_Superv_i::ExportVTK" );
+  MESSAGE("GEOM_Superv_i::ExportVTK");
+  getVTKPluginOp();
+  myVTKOp->ExportVTK( theObject, theFileName, theDeflection );
+  endService( " GEOM_Superv_i::ExportVTK" );
+#else
+  std::string message("GEOM_Superv_i::ExportVTK functionality is unavailable");
+  THROW_SALOME_CORBA_EXCEPTION(message.c_str(), SALOME::INTERNAL_ERROR);
+#endif
+}
+
 //=============================== Advanced Operations =============================
 //=============================================================================
 //  MakePipeTShape
@@ -3516,7 +3750,7 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSmoothingSurface (GEOM::GEOM_List_ptr t
   if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(thelPoints, myPOA).in())) {
     getCurvesOp();
-    GEOM::GEOM_Object_ptr anObj = myAdvancedOp->MakeSmoothingSurface(aListImplP->GetList());
+    GEOM::GEOM_Object_ptr anObj = myAdvancedOp->MakeSmoothingSurface(aListImplP->GetList(), 2, 8, 0.);
     endService( " GEOM_Superv_i::MakeSmoothingSurface" );
     return anObj;
   }
@@ -3524,8 +3758,39 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSmoothingSurface (GEOM::GEOM_List_ptr t
   return NULL;
 }
 
+//=============================================================================
+//  PatchFace:
+//=============================================================================
+GEOM::GEOM_List_ptr GEOM_Superv_i::PatchFace(GEOM::GEOM_Object_ptr theShape)
+{
+  beginService(" GEOM_Superv_i::PatchFace");
+  MESSAGE("GEOM_Superv_i::PatchFace");
+  getLocalOp();
+
+  GEOM::ListOfGO* aList = myMeasureOp->PatchFace(theShape);
+  GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aList));
+  endService(" GEOM_Superv_i::PatchFace");
+  return aListPtr->_this();
+}
+
 /*@@ insert new functions before this line @@ do not remove this line @@*/
 
+GEOM_Superv_i_With_Session::GEOM_Superv_i_With_Session(CORBA::ORB_ptr orb,
+                PortableServer::POA_ptr poa,
+                PortableServer::ObjectId * contId,
+                const char *instanceName,
+                const char *interfaceName):GEOM_Superv_i(orb,poa,contId,instanceName,interfaceName,true,new SALOME_NamingService(orb))
+{
+}
+
+GEOM_Superv_i_Without_Session::GEOM_Superv_i_Without_Session(CORBA::ORB_ptr orb,
+                PortableServer::POA_ptr poa,
+                PortableServer::ObjectId * contId,
+                const char *instanceName,
+                const char *interfaceName, SALOME_NamingService_Abstract *my_name_service):GEOM_Superv_i(orb,poa,contId,instanceName,interfaceName,false, my_name_service)
+{
+}
+
 //=====================================================================================
 // EXPORTED METHODS
 //=====================================================================================
@@ -3540,9 +3805,23 @@ extern "C"
                                                        const char *instanceName,
                                                        const char * interfaceName)
   {
-    GEOM_Superv_i * myGEOM_Superv_i = new GEOM_Superv_i(orb, poa, contId, instanceName, interfaceName);
-    //Don't understand the reason why this component is registered ???
-//    myGEOM_Superv_i->register_name("/myGEOM_Superv");
-    return myGEOM_Superv_i->getId() ;
+    CORBA::Object_var o = poa->id_to_reference(*contId);
+    Engines::Container_var cont = Engines::Container::_narrow(o);
+    GEOM_Superv_i *myGEOM_Superv_i(nullptr);
+    if(cont->is_SSL_mode())
+    {
+      PortableServer::ServantBase *contPtr = poa->reference_to_servant(cont);
+      Abstract_Engines_Container_i *contPtrEff = dynamic_cast<Abstract_Engines_Container_i *>(contPtr);
+      SALOME_NamingService_Abstract *decoNS = new SALOME_NamingService_Abstract_Decorator(contPtrEff->getNS());
+      myGEOM_Superv_i = new GEOM_Superv_i_Without_Session(orb, poa, contId, instanceName, interfaceName,decoNS);
+      //Don't understand the reason why this component is registered ???
+  //    myGEOM_Superv_i->register_name("/myGEOM_Superv");
+      return myGEOM_Superv_i->getId() ;
+    }
+    else
+    {
+      myGEOM_Superv_i = new GEOM_Superv_i_With_Session(orb, poa, contId, instanceName, interfaceName);
+      return myGEOM_Superv_i->getId() ;
+    }
   }
 }