]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
0023299: [CEA] Finalize multi-study removal
authormpa <mpa@opencascade.com>
Fri, 7 Oct 2016 07:58:00 +0000 (10:58 +0300)
committermpa <mpa@opencascade.com>
Fri, 14 Oct 2016 07:10:01 +0000 (10:10 +0300)
- delete study id parameter
- delete using of StudyManager

162 files changed:
idl/GEOM_Gen.idl
idl/GEOM_Superv.idl
resources/GEOMCatalog.xml.in
src/AdvancedEngine/AdvancedEngine_OperationsCreator.cxx
src/AdvancedEngine/AdvancedEngine_OperationsCreator.hxx
src/AdvancedGUI/AdvancedGUI_DividedCylinderDlg.cxx
src/AdvancedGUI/AdvancedGUI_DividedDiskDlg.cxx
src/AdvancedGUI/AdvancedGUI_PipeTShapeDlg.cxx
src/AdvancedGUI/AdvancedGUI_SmoothingSurfaceDlg.cxx
src/BREPPlugin/BREPPlugin_GUI.cxx
src/BREPPlugin/BREPPlugin_OperationsCreator.cxx
src/BREPPlugin/BREPPlugin_OperationsCreator.hxx
src/BasicGUI/BasicGUI_ArcDlg.cxx
src/BasicGUI/BasicGUI_CircleDlg.cxx
src/BasicGUI/BasicGUI_CurveDlg.cxx
src/BasicGUI/BasicGUI_EllipseDlg.cxx
src/BasicGUI/BasicGUI_LineDlg.cxx
src/BasicGUI/BasicGUI_MarkerDlg.cxx
src/BasicGUI/BasicGUI_PlaneDlg.cxx
src/BasicGUI/BasicGUI_PointDlg.cxx
src/BasicGUI/BasicGUI_VectorDlg.cxx
src/BasicGUI/BasicGUI_WorkingPlaneDlg.cxx
src/BlocksGUI/BlocksGUI_BlockDlg.cxx
src/BlocksGUI/BlocksGUI_ExplodeDlg.cxx
src/BlocksGUI/BlocksGUI_PropagateDlg.cxx
src/BlocksGUI/BlocksGUI_QuadFaceDlg.cxx
src/BlocksGUI/BlocksGUI_TrsfDlg.cxx
src/BooleanGUI/BooleanGUI_Dialog.cxx
src/BuildGUI/BuildGUI_CompoundDlg.cxx
src/BuildGUI/BuildGUI_EdgeDlg.cxx
src/BuildGUI/BuildGUI_FaceDlg.cxx
src/BuildGUI/BuildGUI_ShellDlg.cxx
src/BuildGUI/BuildGUI_SolidDlg.cxx
src/BuildGUI/BuildGUI_WireDlg.cxx
src/DependencyTree/DependencyTree_Object.cxx
src/DependencyTree/DependencyTree_Selector.cxx
src/DependencyTree/DependencyTree_View.cxx
src/DependencyTree/DependencyTree_View.h
src/EntityGUI/EntityGUI_3DSketcherDlg.cxx
src/EntityGUI/EntityGUI_FeatureDetectorDlg.cxx
src/EntityGUI/EntityGUI_FieldDlg.cxx
src/EntityGUI/EntityGUI_IsolineDlg.cxx
src/EntityGUI/EntityGUI_PictureImportDlg.cxx
src/EntityGUI/EntityGUI_PolylineDlg.cxx
src/EntityGUI/EntityGUI_SketcherDlg.cxx
src/EntityGUI/EntityGUI_SubShapeDlg.cxx
src/EntityGUI/EntityGUI_SurfFromFaceDlg.cxx
src/GEOMBase/GEOMBase.cxx
src/GEOMBase/GEOMBase_Helper.cxx
src/GEOMBase/GEOMBase_Helper.h
src/GEOMBase/GEOMBase_Skeleton.cxx
src/GEOMGUI/GeometryGUI.cxx
src/GEOMGUI/GeometryGUI.h
src/GEOMToolsGUI/GEOMToolsGUI_ReduceStudyDlg.cxx
src/GEOM_I/GEOM_BaseObject_i.cc
src/GEOM_I/GEOM_BaseObject_i.hh
src/GEOM_I/GEOM_DumpPython.cc
src/GEOM_I/GEOM_Gen_i.cc
src/GEOM_I/GEOM_Gen_i.hh
src/GEOM_I/GEOM_IOperations_i.cc
src/GEOM_I/GEOM_IOperations_i.hh
src/GEOM_I/GEOM_Object_i.cc
src/GEOM_I_Superv/GEOM_Superv_i.cc
src/GEOM_I_Superv/GEOM_Superv_i.hh
src/GEOM_PY/geomtools.py
src/GEOM_PY/structelem/__init__.py
src/GEOM_PY/structelem/parts.py
src/GEOM_SWIG/AdvancedGEOMBuilder.py
src/GEOM_SWIG/BREPPluginBuilder.py
src/GEOM_SWIG/GEOM_ObjectInfo.py
src/GEOM_SWIG/GEOM_example2.py
src/GEOM_SWIG/GEOM_example3.py
src/GEOM_SWIG/GEOM_example5.py
src/GEOM_SWIG/GEOM_moteur.py
src/GEOM_SWIG/IGESPluginBuilder.py
src/GEOM_SWIG/PAL_MESH_028_geometry.py
src/GEOM_SWIG/STEPPluginBuilder.py
src/GEOM_SWIG/STLPluginBuilder.py
src/GEOM_SWIG/VTKPluginBuilder.py
src/GEOM_SWIG/XAOPluginBuilder.py
src/GEOM_SWIG/geomBuilder.py
src/GEOM_SWIG_WITHIHM/libGEOM_Swig.cxx
src/GenerationGUI/GenerationGUI_FillingDlg.cxx
src/GenerationGUI/GenerationGUI_PipeDlg.cxx
src/GenerationGUI/GenerationGUI_PipePathDlg.cxx
src/GenerationGUI/GenerationGUI_PrismDlg.cxx
src/GenerationGUI/GenerationGUI_RevolDlg.cxx
src/GenerationGUI/GenerationGUI_ThicknessDlg.cxx
src/GroupGUI/GroupGUI_BooleanDlg.cxx
src/GroupGUI/GroupGUI_GroupDlg.cxx
src/IGESPlugin/IGESPlugin_GUI.cxx
src/IGESPlugin/IGESPlugin_OperationsCreator.cxx
src/IGESPlugin/IGESPlugin_OperationsCreator.hxx
src/MeasureGUI/MeasureGUI_BndBoxDlg.cxx
src/MeasureGUI/MeasureGUI_CenterMassDlg.cxx
src/MeasureGUI/MeasureGUI_CheckCompoundOfBlocksDlg.cxx
src/MeasureGUI/MeasureGUI_CheckSelfIntersectionsDlg.cxx
src/MeasureGUI/MeasureGUI_CheckShapeDlg.cxx
src/MeasureGUI/MeasureGUI_DistanceDlg.cxx
src/MeasureGUI/MeasureGUI_FastCheckIntersectionsDlg.cxx
src/MeasureGUI/MeasureGUI_GetNonBlocksDlg.cxx
src/MeasureGUI/MeasureGUI_NormaleDlg.cxx
src/MeasureGUI/MeasureGUI_ShapeStatisticsDlg.cxx
src/MeasureGUI/MeasureGUI_Skeleton.cxx
src/OperationGUI/OperationGUI_ArchimedeDlg.cxx
src/OperationGUI/OperationGUI_ChamferDlg.cxx
src/OperationGUI/OperationGUI_ExtractionDlg.cxx
src/OperationGUI/OperationGUI_ExtrudedFeatureDlg.cxx
src/OperationGUI/OperationGUI_Fillet1d2dDlg.cxx
src/OperationGUI/OperationGUI_FilletDlg.cxx
src/OperationGUI/OperationGUI_GetShapesOnShapeDlg.cxx
src/OperationGUI/OperationGUI_GetSharedShapesDlg.cxx
src/OperationGUI/OperationGUI_PartitionDlg.cxx
src/OperationGUI/OperationGUI_TransferDataDlg.cxx
src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx
src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx
src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx
src/PrimitiveGUI/PrimitiveGUI_DiskDlg.cxx
src/PrimitiveGUI/PrimitiveGUI_FaceDlg.cxx
src/PrimitiveGUI/PrimitiveGUI_SphereDlg.cxx
src/PrimitiveGUI/PrimitiveGUI_TorusDlg.cxx
src/RepairGUI/RepairGUI_ChangeOrientationDlg.cxx
src/RepairGUI/RepairGUI_CloseContourDlg.cxx
src/RepairGUI/RepairGUI_DivideEdgeDlg.cxx
src/RepairGUI/RepairGUI_FreeBoundDlg.cxx
src/RepairGUI/RepairGUI_FreeFacesDlg.cxx
src/RepairGUI/RepairGUI_FuseEdgesDlg.cxx
src/RepairGUI/RepairGUI_GlueDlg.cxx
src/RepairGUI/RepairGUI_InspectObjectDlg.cxx
src/RepairGUI/RepairGUI_LimitToleranceDlg.cxx
src/RepairGUI/RepairGUI_RemoveExtraEdgesDlg.cxx
src/RepairGUI/RepairGUI_RemoveHolesDlg.cxx
src/RepairGUI/RepairGUI_RemoveIntWiresDlg.cxx
src/RepairGUI/RepairGUI_RemoveWebsDlg.cxx
src/RepairGUI/RepairGUI_SewingDlg.cxx
src/RepairGUI/RepairGUI_ShapeProcessDlg.cxx
src/RepairGUI/RepairGUI_SuppressFacesDlg.cxx
src/RepairGUI/RepairGUI_UnionFacesDlg.cxx
src/STEPPlugin/STEPPlugin_GUI.cxx
src/STEPPlugin/STEPPlugin_OperationsCreator.cxx
src/STEPPlugin/STEPPlugin_OperationsCreator.hxx
src/STLPlugin/STLPlugin_GUI.cxx
src/STLPlugin/STLPlugin_OperationsCreator.cxx
src/STLPlugin/STLPlugin_OperationsCreator.hxx
src/TransformationGUI/TransformationGUI_ExtensionDlg.cxx
src/TransformationGUI/TransformationGUI_MirrorDlg.cxx
src/TransformationGUI/TransformationGUI_MultiRotationDlg.cxx
src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx
src/TransformationGUI/TransformationGUI_OffsetDlg.cxx
src/TransformationGUI/TransformationGUI_PositionDlg.cxx
src/TransformationGUI/TransformationGUI_ProjectionDlg.cxx
src/TransformationGUI/TransformationGUI_ProjectionOnCylDlg.cxx
src/TransformationGUI/TransformationGUI_RotationDlg.cxx
src/TransformationGUI/TransformationGUI_ScaleDlg.cxx
src/TransformationGUI/TransformationGUI_TranslationDlg.cxx
src/VTKPlugin/VTKPlugin_GUI.cxx
src/VTKPlugin/VTKPlugin_OperationsCreator.cxx
src/VTKPlugin/VTKPlugin_OperationsCreator.hxx
src/XAOPlugin/XAOPlugin_ExportDlg.cxx
src/XAOPlugin/XAOPlugin_ImportDlg.cxx
src/XAOPlugin/XAOPlugin_OperationsCreator.cxx
src/XAOPlugin/XAOPlugin_OperationsCreator.hxx

index 31e6491a6d6bc93b2c4927896e35fc306d463472..003ad513a4c4e6f9f01beb21904b30589f7f57ba 100644 (file)
@@ -293,11 +293,6 @@ module GEOM
      */
     string GetEntry();
 
-    /*!
-     *  \brief Get ID of study, where the object is created.
-     */
-    long GetStudyID();
-
     /*!
      *  \brief Get internal type of operation created this object (POINT, BOX, CYLINDER, EXTRUSION...).
      *  \note To get topological information on the object, use \ref GEOM_IMeasureOperations::WhatIs() "WhatIs()"
@@ -692,11 +687,6 @@ module GEOM
      */
     string GetErrorCode();
 
-    /*!
-     *  \brief Get ID of study, where the operation is defined
-     */
-    long GetStudyID();
-
     /*!
      *  \brief Opens a new transaction
      */
@@ -4870,9 +4860,9 @@ module GEOM
      *  \brief Undo/Redo Management
      */
 
-    void Undo (in long theStudyID);
+    void Undo ();
 
-    void Redo (in long theStudyID);
+    void Redo ();
 
     /*!
      * \brief Publishing management
@@ -4881,8 +4871,7 @@ module GEOM
      * if theFather is not NULL the object is placed under thFather's SObject.
      * Returns a SObject where theObject is placed
      */
-    SALOMEDS::SObject AddInStudy (in SALOMEDS::Study theStudy,
-                                  in GEOM_BaseObject theObject,
+    SALOMEDS::SObject AddInStudy (in GEOM_BaseObject theObject,
                                   in string          theName,
                                   in GEOM_BaseObject theFather);
 
@@ -4890,8 +4879,6 @@ module GEOM
      *  \brief Publish sub-shapes, standing for arguments and sub-shapes of arguments
      *
      *  To be used from python scripts out of geompy.addToStudy (non-default usage)
-     *  \param theStudy  the study, in which theObject is published already,
-     *                   and in which the arguments will be published
      *  \param theObject published GEOM_Object, arguments of which will be published
      *  \param theArgs   list of GEOM_Object, operation arguments to be published.
      *                   If this list is empty, all operation arguments will be published
@@ -4910,8 +4897,7 @@ module GEOM
      *                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
      *  \return list of published sub-shapes
      */
-    ListOfGO RestoreSubShapesO (in SALOMEDS::Study   theStudy,
-                                in GEOM_Object       theObject,
+    ListOfGO RestoreSubShapesO (in GEOM_Object       theObject,
                                 in ListOfGO          theArgs,
                                 in find_shape_method theFindMethod,
                                 in boolean           theInheritFirstArg,
@@ -4921,8 +4907,6 @@ module GEOM
      *  \brief Publish sub-shapes, standing for arguments and sub-shapes of arguments
      *
      *  To be used from python scripts out of geompy.addToStudy (non-default usage)
-     *  \param theStudy  the study, in which theObject is published already,
-     *                   and in which the arguments will be published
      *  \param theObject published GEOM_Object, arguments of which will be published
      *  \param theArgs   list of GEOM_Object, operation arguments to be published.
      *                   If this list is empty, all operation arguments will be published
@@ -4941,8 +4925,7 @@ module GEOM
      *                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
      *  \return list of published sub-shapes
      */
-    ListOfGO RestoreGivenSubShapesO (in SALOMEDS::Study   theStudy,
-                                     in GEOM_Object       theObject,
+    ListOfGO RestoreGivenSubShapesO (in GEOM_Object       theObject,
                                      in ListOfGO          theArgs,
                                      in find_shape_method theFindMethod,
                                      in boolean           theInheritFirstArg,
@@ -4953,8 +4936,6 @@ module GEOM
      *
      *  To be used from GUI and from geompy.addToStudy.
      *  Work like the above method, but accepts study object theSObject instead of GEOM_Object.
-     *  \param theStudy  the study, in which theObject is published already,
-     *                   and in which the arguments will be published
      *  \param theSObject study object, referencing GEOM_Object, arguments of which will be published
      *  \param theArgs   list of GEOM_Object, operation arguments to be published.
      *                   If this list is empty, all operation arguments will be published
@@ -4972,8 +4953,7 @@ module GEOM
      *  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
      *                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
      */
-    ListOfGO RestoreSubShapesSO (in SALOMEDS::Study   theStudy,
-                                 in SALOMEDS::SObject theSObject,
+    ListOfGO RestoreSubShapesSO (in SALOMEDS::SObject theSObject,
                                  in ListOfGO          theArgs,
                                  in find_shape_method theFindMethod,
                                  in boolean           theInheritFirstArg,
@@ -4981,22 +4961,21 @@ module GEOM
 
     // #  Methods to access interfaces for objects creation and transformation
 
-    GEOM_IBasicOperations     GetIBasicOperations    (in long theStudyID) raises (SALOME::SALOME_Exception);
-    GEOM_ITransformOperations GetITransformOperations(in long theStudyID) raises (SALOME::SALOME_Exception);
-    GEOM_I3DPrimOperations    GetI3DPrimOperations   (in long theStudyID) raises (SALOME::SALOME_Exception);
-    GEOM_IShapesOperations    GetIShapesOperations   (in long theStudyID) raises (SALOME::SALOME_Exception);
-    GEOM_IBooleanOperations   GetIBooleanOperations  (in long theStudyID) raises (SALOME::SALOME_Exception);
-    GEOM_ICurvesOperations    GetICurvesOperations   (in long theStudyID) raises (SALOME::SALOME_Exception);
-    GEOM_ILocalOperations     GetILocalOperations    (in long theStudyID) raises (SALOME::SALOME_Exception);
-    GEOM_IHealingOperations   GetIHealingOperations  (in long theStudyID) raises (SALOME::SALOME_Exception);
-    GEOM_IInsertOperations    GetIInsertOperations   (in long theStudyID) raises (SALOME::SALOME_Exception);
-    GEOM_IMeasureOperations   GetIMeasureOperations  (in long theStudyID) raises (SALOME::SALOME_Exception);
-    GEOM_IBlocksOperations    GetIBlocksOperations   (in long theStudyID) raises (SALOME::SALOME_Exception);
-    GEOM_IGroupOperations     GetIGroupOperations    (in long theStudyID) raises (SALOME::SALOME_Exception);
-    GEOM_IFieldOperations     GetIFieldOperations    (in long theStudyID) raises (SALOME::SALOME_Exception);
-
-    GEOM_IOperations GetPluginOperations (in long   theStudyID,
-                                          in string theLibName) raises (SALOME::SALOME_Exception);
+    GEOM_IBasicOperations     GetIBasicOperations    () raises (SALOME::SALOME_Exception);
+    GEOM_ITransformOperations GetITransformOperations() raises (SALOME::SALOME_Exception);
+    GEOM_I3DPrimOperations    GetI3DPrimOperations   () raises (SALOME::SALOME_Exception);
+    GEOM_IShapesOperations    GetIShapesOperations   () raises (SALOME::SALOME_Exception);
+    GEOM_IBooleanOperations   GetIBooleanOperations  () raises (SALOME::SALOME_Exception);
+    GEOM_ICurvesOperations    GetICurvesOperations   () raises (SALOME::SALOME_Exception);
+    GEOM_ILocalOperations     GetILocalOperations    () raises (SALOME::SALOME_Exception);
+    GEOM_IHealingOperations   GetIHealingOperations  () raises (SALOME::SALOME_Exception);
+    GEOM_IInsertOperations    GetIInsertOperations   () raises (SALOME::SALOME_Exception);
+    GEOM_IMeasureOperations   GetIMeasureOperations  () raises (SALOME::SALOME_Exception);
+    GEOM_IBlocksOperations    GetIBlocksOperations   () raises (SALOME::SALOME_Exception);
+    GEOM_IGroupOperations     GetIGroupOperations    () raises (SALOME::SALOME_Exception);
+    GEOM_IFieldOperations     GetIFieldOperations    () raises (SALOME::SALOME_Exception);
+
+    GEOM_IOperations GetPluginOperations (in string theLibName) raises (SALOME::SALOME_Exception);
 
     // # Objects Management
 
@@ -5009,11 +4988,10 @@ module GEOM
 
     /*!
      *  \brief Returns an object defined by the study and its entry in the GEOM component
-     *  \param theStudyID is a SALOMEDS Study ID
      *  \param theEntry is an entry of the requested GEOM_Object in the GEOM component
      *  \note if the object has not previously been created a NULL GEOM_Object is returned
      */
-    GEOM_BaseObject GetObject (in long theStudyID, in string theEntry);
+    GEOM_BaseObject GetObject (in string theEntry);
 
     /*!
      *  \brief Add a sub-shape defined by indices in \a theIndices
@@ -5052,11 +5030,9 @@ module GEOM
 
     /*!
      *  \brief Publishes the named sub-shapes of given object in the study.
-     *  \param theStudy    The study in which the object is published
      *  \param theObject   The object which named sub-shapes are published
      */
-    ListOfGO PublishNamedShapesInStudy(in SALOMEDS::Study theStudy,
-                                       //in SObject theSObject,
+    ListOfGO PublishNamedShapesInStudy(//in SObject theSObject,
                                        in Object theObject);
 
     /*!
@@ -5109,31 +5085,27 @@ module GEOM
 
     /*!
      * \brief Collects dependencies of the given objects from other ones
-     * \param theStudy The study in which the object is published
      * \param theListOfEntries List of GEOM object entries in OCAF tree (not in study)
      * \return Struct of dependent entries and its links as a byte array
      * \note This method is supposed to be used by GUI only.
      */
-    SALOMEDS::TMPFile GetDependencyTree(in SALOMEDS::Study theStudy,
-                                       in string_array theListOfEntries);
+    SALOMEDS::TMPFile GetDependencyTree(in string_array theListOfEntries);
 
     /*!
      * \brief Fills 3 lists that is used to reduce study of redundant objects:
      *  - dependencies of the given objects from other ones;
      *  - children of the given objects;
      *  - all other objects in study.
-     * \param theStudy The study in which the object was published
      * \param theSelectedEntries List of GEOM object entries in OCAF tree
      * \param theParentEntries List of GEOM object entries on which the given objects depend
      * \param theSubEntries Children entries list of the given objects
      * \param theOtherEntries List of GEOM object entries which are in the study, but not in parents and children lists
      * \note This method is supposed to be used by GUI only.
      */
-    void GetEntriesToReduceStudy(in SALOMEDS::Study theStudy,
-                                inout string_array theSelectedEntries,
-                                inout string_array theParentEntries,
-                                inout string_array theSubEntries,
-                                inout string_array theOtherEntries);
+    void GetEntriesToReduceStudy(inout string_array theSelectedEntries,
+                                                inout string_array theParentEntries,
+                                                inout string_array theSubEntries,
+                                                inout string_array theOtherEntries);
 
   };
 };
index c12b0104caf198abac61fd3c85e2c8944f1c2c00..595dead54d979b226a74e70acad7208920b601b3 100644 (file)
@@ -35,11 +35,6 @@ module GEOM
 
   interface GEOM_Superv : Engines::EngineComponent,SALOMEDS::Driver
   {
-    //-----------------------------------------------------------//
-    // Set current study ID                                      //
-    //-----------------------------------------------------------//
-    void SetStudyID (in long theStudyID) ;
-
     //-----------------------------------------------------------//
     // Create ListOfGO and add items to it                       //
     //-----------------------------------------------------------//
index fceb7674a4e8c60ad52a146b45a4f4ad22c5a5a2..e45d62e9e741717d567631cdc22018e8cedd6871 100644 (file)
             <service-version>@SALOMEGEOM_VERSION@</service-version>
             <service-comment>unknown</service-comment>
             <service-by-default>0</service-by-default>
-            <inParameter-list>
-              <inParameter>
-                <inParameter-name>theStudyID</inParameter-name>
-                <inParameter-type>long</inParameter-type>
-                <inParameter-comment>unknown</inParameter-comment>
-              </inParameter>
-            </inParameter-list>
+            <inParameter-list></inParameter-list>
             <outParameter-list></outParameter-list>
             <DataStream-list></DataStream-list>
           </component-service>
             <service-version>@SALOMEGEOM_VERSION@</service-version>
             <service-comment>unknown</service-comment>
             <service-by-default>0</service-by-default>
-            <inParameter-list>
-              <inParameter>
-                <inParameter-name>theStudyID</inParameter-name>
-                <inParameter-type>long</inParameter-type>
-                <inParameter-comment>unknown</inParameter-comment>
-              </inParameter>
-            </inParameter-list>
+            <inParameter-list></inParameter-list>
             <outParameter-list></outParameter-list>
             <DataStream-list></DataStream-list>
           </component-service>
             <service-version>@SALOMEGEOM_VERSION@</service-version>
             <service-comment>unknown</service-comment>
             <service-by-default>0</service-by-default>
-            <inParameter-list>
-              <inParameter>
-                <inParameter-name>theStudyID</inParameter-name>
-                <inParameter-type>long</inParameter-type>
-                <inParameter-comment>unknown</inParameter-comment>
-              </inParameter>
-            </inParameter-list>
+            <inParameter-list></inParameter-list>
             <outParameter-list>
               <outParameter>
                 <outParameter-name>return</outParameter-name>
             <service-version>@SALOMEGEOM_VERSION@</service-version>
             <service-comment>unknown</service-comment>
             <service-by-default>0</service-by-default>
-            <inParameter-list>
-              <inParameter>
-                <inParameter-name>theStudyID</inParameter-name>
-                <inParameter-type>long</inParameter-type>
-                <inParameter-comment>unknown</inParameter-comment>
-              </inParameter>
-            </inParameter-list>
+            <inParameter-list></inParameter-list>
             <outParameter-list>
               <outParameter>
                 <outParameter-name>return</outParameter-name>
             <service-version>@SALOMEGEOM_VERSION@</service-version>
             <service-comment>unknown</service-comment>
             <service-by-default>0</service-by-default>
-            <inParameter-list>
-              <inParameter>
-                <inParameter-name>theStudyID</inParameter-name>
-                <inParameter-type>long</inParameter-type>
-                <inParameter-comment>unknown</inParameter-comment>
-              </inParameter>
-            </inParameter-list>
+            <inParameter-list></inParameter-list>
             <outParameter-list>
               <outParameter>
                 <outParameter-name>return</outParameter-name>
             <service-version>@SALOMEGEOM_VERSION@</service-version>
             <service-comment>unknown</service-comment>
             <service-by-default>0</service-by-default>
-            <inParameter-list>
-              <inParameter>
-                <inParameter-name>theStudyID</inParameter-name>
-                <inParameter-type>long</inParameter-type>
-                <inParameter-comment>unknown</inParameter-comment>
-              </inParameter>
-            </inParameter-list>
+            <inParameter-list></inParameter-list>
             <outParameter-list>
               <outParameter>
                 <outParameter-name>return</outParameter-name>
             <service-version>@SALOMEGEOM_VERSION@</service-version>
             <service-comment>unknown</service-comment>
             <service-by-default>0</service-by-default>
-            <inParameter-list>
-              <inParameter>
-                <inParameter-name>theStudyID</inParameter-name>
-                <inParameter-type>long</inParameter-type>
-                <inParameter-comment>unknown</inParameter-comment>
-              </inParameter>
-            </inParameter-list>
+            <inParameter-list></inParameter-list>
             <outParameter-list>
               <outParameter>
                 <outParameter-name>return</outParameter-name>
             <service-version>@SALOMEGEOM_VERSION@</service-version>
             <service-comment>unknown</service-comment>
             <service-by-default>0</service-by-default>
-            <inParameter-list>
-              <inParameter>
-                <inParameter-name>theStudyID</inParameter-name>
-                <inParameter-type>long</inParameter-type>
-                <inParameter-comment>unknown</inParameter-comment>
-              </inParameter>
-            </inParameter-list>
+            <inParameter-list></inParameter-list>
             <outParameter-list>
               <outParameter>
                 <outParameter-name>return</outParameter-name>
             <service-version>@SALOMEGEOM_VERSION@</service-version>
             <service-comment>unknown</service-comment>
             <service-by-default>0</service-by-default>
-            <inParameter-list>
-              <inParameter>
-                <inParameter-name>theStudyID</inParameter-name>
-                <inParameter-type>long</inParameter-type>
-                <inParameter-comment>unknown</inParameter-comment>
-              </inParameter>
-            </inParameter-list>
+            <inParameter-list></inParameter-list>
             <outParameter-list>
               <outParameter>
                 <outParameter-name>return</outParameter-name>
             <service-version>@SALOMEGEOM_VERSION@</service-version>
             <service-comment>unknown</service-comment>
             <service-by-default>0</service-by-default>
-            <inParameter-list>
-              <inParameter>
-                <inParameter-name>theStudyID</inParameter-name>
-                <inParameter-type>long</inParameter-type>
-                <inParameter-comment>unknown</inParameter-comment>
-              </inParameter>
-            </inParameter-list>
+            <inParameter-list></inParameter-list>
             <outParameter-list>
               <outParameter>
                 <outParameter-name>return</outParameter-name>
             <service-version>@SALOMEGEOM_VERSION@</service-version>
             <service-comment>unknown</service-comment>
             <service-by-default>0</service-by-default>
-            <inParameter-list>
-              <inParameter>
-                <inParameter-name>theStudyID</inParameter-name>
-                <inParameter-type>long</inParameter-type>
-                <inParameter-comment>unknown</inParameter-comment>
-              </inParameter>
-            </inParameter-list>
+            <inParameter-list></inParameter-list>
             <outParameter-list>
               <outParameter>
                 <outParameter-name>return</outParameter-name>
             <service-version>@SALOMEGEOM_VERSION@</service-version>
             <service-comment>unknown</service-comment>
             <service-by-default>0</service-by-default>
-            <inParameter-list>
-              <inParameter>
-                <inParameter-name>theStudyID</inParameter-name>
-                <inParameter-type>long</inParameter-type>
-                <inParameter-comment>unknown</inParameter-comment>
-              </inParameter>
-            </inParameter-list>
+            <inParameter-list></inParameter-list>
             <outParameter-list>
               <outParameter>
                 <outParameter-name>return</outParameter-name>
             <service-version>@SALOMEGEOM_VERSION@</service-version>
             <service-comment>unknown</service-comment>
             <service-by-default>0</service-by-default>
-            <inParameter-list>
-              <inParameter>
-                <inParameter-name>theStudyID</inParameter-name>
-                <inParameter-type>long</inParameter-type>
-                <inParameter-comment>unknown</inParameter-comment>
-              </inParameter>
-            </inParameter-list>
+            <inParameter-list></inParameter-list>
             <outParameter-list>
               <outParameter>
                 <outParameter-name>return</outParameter-name>
             <service-version>@SALOMEGEOM_VERSION@</service-version>
             <service-comment>unknown</service-comment>
             <service-by-default>0</service-by-default>
-            <inParameter-list>
-              <inParameter>
-                <inParameter-name>theStudyID</inParameter-name>
-                <inParameter-type>long</inParameter-type>
-                <inParameter-comment>unknown</inParameter-comment>
-              </inParameter>
-            </inParameter-list>
+            <inParameter-list></inParameter-list>
             <outParameter-list>
               <outParameter>
                 <outParameter-name>return</outParameter-name>
             <service-version>@SALOMEGEOM_VERSION@</service-version>
             <service-comment>unknown</service-comment>
             <service-by-default>0</service-by-default>
-            <inParameter-list>
-              <inParameter>
-                <inParameter-name>theStudyID</inParameter-name>
-                <inParameter-type>long</inParameter-type>
-                <inParameter-comment>unknown</inParameter-comment>
-              </inParameter>
-            </inParameter-list>
+            <inParameter-list></inParameter-list>
             <outParameter-list>
               <outParameter>
                 <outParameter-name>return</outParameter-name>
             <service-comment>unknown</service-comment>
             <service-by-default>0</service-by-default>
             <inParameter-list>
-              <inParameter>
-                <inParameter-name>theStudyID</inParameter-name>
-                <inParameter-type>long</inParameter-type>
-                <inParameter-comment>unknown</inParameter-comment>
-              </inParameter>
               <inParameter>
                 <inParameter-name>theLibName</inParameter-name>
                 <inParameter-type>string</inParameter-type>
             <service-comment>unknown</service-comment>
             <service-by-default>0</service-by-default>
             <inParameter-list>
-              <inParameter>
-                <inParameter-name>theStudyID</inParameter-name>
-                <inParameter-type>long</inParameter-type>
-                <inParameter-comment>unknown</inParameter-comment>
-              </inParameter>
               <inParameter>
                 <inParameter-name>theEntry</inParameter-name>
                 <inParameter-type>string</inParameter-type>
         <component-interface-comment>unknown</component-interface-comment>
        <!-- interface services list -->
         <component-service-list>
-          <component-service>
-            <service-name>SetStudyID</service-name>
-            <service-author>SALOME team</service-author>
-            <service-version>@SALOMEGEOM_VERSION@</service-version>
-            <service-comment>unknown</service-comment>
-            <service-by-default>0</service-by-default>
-            <inParameter-list>
-              <inParameter>
-                <inParameter-name>theStudyID</inParameter-name>
-                <inParameter-type>long</inParameter-type>
-                <inParameter-comment>unknown</inParameter-comment>
-              </inParameter>
-            </inParameter-list>
-            <outParameter-list></outParameter-list>
-            <DataStream-list></DataStream-list>
-          </component-service>
           <component-service>
             <service-name>CreateListOfGO</service-name>
             <service-author>SALOME team</service-author>
index f7d3603fa2bb105bd9062df2338cc26cb53b1d27..f1c5e1a39c4979118371810bb5c3be594b3afb9f 100644 (file)
@@ -33,7 +33,7 @@
 #include "Utils_ExceptHandlers.hxx"
 #include "utilities.h"
 
-std::map <int, AdvancedEngine_IOperations*>  AdvancedEngine_OperationsCreator::_mapOfOperations;
+AdvancedEngine_IOperations* AdvancedEngine_OperationsCreator::_operation;
 
 AdvancedEngine_OperationsCreator::AdvancedEngine_OperationsCreator()
 {
@@ -51,19 +51,16 @@ AdvancedEngine_OperationsCreator::~AdvancedEngine_OperationsCreator()
 }
 
 GEOM_IOperations_i* AdvancedEngine_OperationsCreator::Create (PortableServer::POA_ptr thePOA,
-                                                              int                     theStudyId,
                                                               GEOM::GEOM_Gen_ptr      theEngine,
                                                               ::GEOMImpl_Gen*         theGenImpl)
 {
   Unexpect aCatch(SALOME_SalomeException);
   MESSAGE( "AdvancedEngine_OperationsCreator::Create" );
-  return new AdvancedEngine_IOperations_i( thePOA, theEngine, get( theGenImpl, theStudyId ) );
+  _operation = new AdvancedEngine_IOperations( theGenImpl );
+  return new AdvancedEngine_IOperations_i( thePOA, theEngine, _operation );
 }
 
-AdvancedEngine_IOperations* AdvancedEngine_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl,
-                                                                  int             theStudyId )
+AdvancedEngine_IOperations* AdvancedEngine_OperationsCreator::get()
 {
-  if (_mapOfOperations.find( theStudyId ) == _mapOfOperations.end() )
-    _mapOfOperations[theStudyId] = new AdvancedEngine_IOperations( theGenImpl, theStudyId );
-  return _mapOfOperations[theStudyId];
+  return _operation;
 }
index 9d5e6a9f03a9a34c142bd2a5e07e07129d44dff9..5971fb086bc2dc2cf56e72e50e86f58a0fa94996 100755 (executable)
@@ -41,15 +41,13 @@ public:
   ~AdvancedEngine_OperationsCreator();
 
   GEOM_IOperations_i* Create (PortableServer::POA_ptr thePOA,
-                             int                     theStudyId,
-                             GEOM::GEOM_Gen_ptr      theEngine,
-                             ::GEOMImpl_Gen*         theGenImpl);
+                                         GEOM::GEOM_Gen_ptr      theEngine,
+                                         ::GEOMImpl_Gen*         theGenImpl);
 
 private:
-  static AdvancedEngine_IOperations* get( ::GEOMImpl_Gen* theGenImpl,
-                                         int             theStudyId );
+  static AdvancedEngine_IOperations* get();
 private:
-  static std::map <int, AdvancedEngine_IOperations*>  _mapOfOperations;
+  static AdvancedEngine_IOperations*_operation;
 };
 
 #endif
index aef497ee06df2302464ef0d81f5caadcf566f333..353bb7b36485dc34eea48dc884b93a4c5558e7e3 100644 (file)
@@ -216,7 +216,7 @@ void AdvancedGUI_DividedCylinderDlg::ValueChangedInSpinBox()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr AdvancedGUI_DividedCylinderDlg::createOperation()
 {
-  return getGeomEngine()->GetPluginOperations(getStudyId(), "AdvancedEngine");
+  return getGeomEngine()->GetPluginOperations("AdvancedEngine");
 }
 
 //=================================================================================
index 1a50ca61323af21ccf28078e72ab008f055e6e59..557a0666b956d1aec2a653d4760e5e5f88d61800 100644 (file)
@@ -392,7 +392,7 @@ void AdvancedGUI_DividedDiskDlg::ValueChangedInSpinBox()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr AdvancedGUI_DividedDiskDlg::createOperation()
 {
-  return getGeomEngine()->GetPluginOperations(getStudyId(), "AdvancedEngine");
+  return getGeomEngine()->GetPluginOperations("AdvancedEngine");
 }
 
 //=================================================================================
index b8a3904b780d526d28c40c6d739cef79f05555da..4008b57369529acfa3693fefe2ad201da9a26e3b 100644 (file)
@@ -555,7 +555,7 @@ void AdvancedGUI_PipeTShapeDlg::SelectionIntoArgument()
 
           if (aFindedObject->_is_nil()) { // Object not found in study
             GEOM::GEOM_IShapesOperations_var aShapesOp =
-              getGeomEngine()->GetIShapesOperations(getStudyId());
+              getGeomEngine()->GetIShapesOperations();
             aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
           }
           else {
@@ -847,7 +847,7 @@ void AdvancedGUI_PipeTShapeDlg::DisplayPreview (const bool activate, const bool
 //=================================================================================
 GEOM::GEOM_IOperations_ptr AdvancedGUI_PipeTShapeDlg::createOperation()
 {
-  return getGeomEngine()->GetPluginOperations(getStudyId(), "AdvancedEngine");
+  return getGeomEngine()->GetPluginOperations("AdvancedEngine");
 }
 
 //=================================================================================
index 527cbcde2703c5892854c7a5313b478f5efbaa17..602bad1eaf191228ac70d9fac67964978ee05206 100644 (file)
@@ -195,7 +195,7 @@ void AdvancedGUI_SmoothingSurfaceDlg::enterEvent (QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr AdvancedGUI_SmoothingSurfaceDlg::createOperation()
 {
-  return getGeomEngine()->GetPluginOperations(getStudyId(), "AdvancedEngine");
+  return getGeomEngine()->GetPluginOperations("AdvancedEngine");
 }
 
 //=================================================================================
index 83cca591d366a6c177388eec23c4d581954dd3ce..f47b3bd7c4c63df79b1d055bf67f7db45fddd94c 100644 (file)
@@ -109,11 +109,8 @@ bool BREPPlugin_GUI::importBREP( SUIT_Desktop* parent )
 {
   SalomeApp_Application* app = getGeometryGUI()->getApp();
   if ( !app ) return false;
-  SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*> ( app->activeStudy() );
-  if ( !study ) return false;
 
-  SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
-  GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "BREPPluginEngine" );
+  GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( "BREPPluginEngine" );
   BREPOpPtr brepOp = GEOM::IBREPOperations::_narrow( op );
   if ( brepOp.isNull() ) return false;
   
@@ -133,32 +130,31 @@ bool BREPPlugin_GUI::importBREP( SUIT_Desktop* parent )
       
       try
       {
-       app->putInfo( tr( "GEOM_PRP_LOADING" ).arg( fileName ) );
-       transaction.start();
-       GEOM::ListOfGO_var result = brepOp->ImportBREP( fileName.toUtf8().constData() );
-       if ( result->length() > 0 && brepOp->IsDone() )
-       {
-         GEOM::GEOM_Object_var main = result[0];
-         QString publishName = GEOMBase::GetDefaultName( SUIT_Tools::file( fileName, true ) );
-         SALOMEDS::SObject_var so = GeometryGUI::GetGeomGen()->PublishInStudy( dsStudy,
-                                                                               SALOMEDS::SObject::_nil(),
-                                                                               main.in(),
-                                                                               publishName.toUtf8().constData() );
+        app->putInfo( tr( "GEOM_PRP_LOADING" ).arg( fileName ) );
+        transaction.start();
+        GEOM::ListOfGO_var result = brepOp->ImportBREP( fileName.toUtf8().constData() );
+        if ( result->length() > 0 && brepOp->IsDone() )
+        {
+          GEOM::GEOM_Object_var main = result[0];
+          QString publishName = GEOMBase::GetDefaultName( SUIT_Tools::file( fileName, true ) );
+          SALOMEDS::SObject_var so = GeometryGUI::GetGeomGen()->PublishInStudy( SALOMEDS::SObject::_nil(),
+                                                                                                                       main.in(),
+                                                                                                                       publishName.toUtf8().constData() );
          
-         entryList.append( so->GetID() );
-         transaction.commit();
-         GEOM_Displayer( study ).Display( main.in() );
+          entryList.append( so->GetID() );
+          transaction.commit();
+          GEOM_Displayer( study ).Display( main.in() );
           main->UnRegister();
-       }
-       else
-       {
-         transaction.abort();
-         errors.append( QString( "%1 : %2" ).arg( fileName ).arg( brepOp->GetErrorCode() ) );
-       }
+        }
+        else
+        {
+          transaction.abort();
+          errors.append( QString( "%1 : %2" ).arg( fileName ).arg( brepOp->GetErrorCode() ) );
+        }
       }
       catch( const SALOME::SALOME_Exception& e )
       {
-       transaction.abort();
+        transaction.abort();
       }
     }
     getGeometryGUI()->updateObjBrowser( true );
@@ -182,11 +178,8 @@ bool BREPPlugin_GUI::exportBREP( SUIT_Desktop* parent )
 {
   SalomeApp_Application* app = getGeometryGUI()->getApp();
   if ( !app ) return false;
-  SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*> ( app->activeStudy() );
-  if ( !study ) return false;
 
-  SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
-  GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "BREPPluginEngine" );
+  GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( "BREPPluginEngine" );
   BREPOpPtr brepOp = GEOM::IBREPOperations::_narrow( op );
   if ( brepOp.isNull() ) return false;
 
index 7e55ee0443fb06468d15962e7e185d06b3efd0aa..84c05014c77d2f54917c437a0eb92853d2881529 100644 (file)
@@ -32,7 +32,7 @@
 // OCCT includes
 #include <TFunction_DriverTable.hxx>
 
-std::map <int, BREPPlugin_IOperations*> BREPPlugin_OperationsCreator::_mapOfOperations;
+BREPPlugin_IOperations* BREPPlugin_OperationsCreator::_operation;
 
 BREPPlugin_OperationsCreator::BREPPlugin_OperationsCreator()
 {
@@ -51,19 +51,16 @@ BREPPlugin_OperationsCreator::~BREPPlugin_OperationsCreator()
 }
 
 GEOM_IOperations_i* BREPPlugin_OperationsCreator::Create( PortableServer::POA_ptr thePOA,
-                                                          int                     theStudyId,
                                                           GEOM::GEOM_Gen_ptr      theEngine,
                                                           ::GEOMImpl_Gen*         theGenImpl )
 {
   Unexpect aCatch( SALOME_SalomeException );
   MESSAGE( "BREPPlugin_OperationsCreator::Create" );
-  return new BREPPlugin_IOperations_i( thePOA, theEngine, get( theGenImpl, theStudyId ) );
+  _operation = new BREPPlugin_IOperations( theGenImpl );
+  return new BREPPlugin_IOperations_i( thePOA, theEngine, _operation );
 }
 
-BREPPlugin_IOperations* BREPPlugin_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl,
-                                                          int             theStudyId )
+BREPPlugin_IOperations* BREPPlugin_OperationsCreator::get()
 {
-  if (_mapOfOperations.find( theStudyId ) == _mapOfOperations.end() )
-    _mapOfOperations[theStudyId] = new BREPPlugin_IOperations( theGenImpl, theStudyId );
-  return _mapOfOperations[theStudyId];
+  return _operation;
 }
index f2deb8646d74cc8403995f60f0730aa3baa79230..c0997b5168573baa79ef9fc64b2b62660e8c4fae 100755 (executable)
@@ -41,15 +41,13 @@ public:
   ~BREPPlugin_OperationsCreator();
 
   GEOM_IOperations_i* Create( PortableServer::POA_ptr thePOA,
-                             int                     theStudyId,
-                             GEOM::GEOM_Gen_ptr      theEngine,
-                             ::GEOMImpl_Gen*         theGenImpl );
+                                         GEOM::GEOM_Gen_ptr      theEngine,
+                                         ::GEOMImpl_Gen*         theGenImpl );
 private:
-  static BREPPlugin_IOperations* get( ::GEOMImpl_Gen*         theGenImpl,
-                                     int                     theStudyId );
+  static BREPPlugin_IOperations* get();
 
 private:
-  static std::map <int, BREPPlugin_IOperations*>  _mapOfOperations;
+  static BREPPlugin_IOperations*  _operation;
 
   friend class BREPPlugin_IECallBack;
 };
index 506b486066cdd6f876617eedabb6e8d64ee680fb..93da18e31f49ec52a8276120f9865b30c9993875 100644 (file)
@@ -452,7 +452,7 @@ void BasicGUI_ArcDlg::enterEvent( QEvent* )
 //=================================================================================
 GEOM::GEOM_IOperations_ptr BasicGUI_ArcDlg::createOperation()
 {
-  return myGeomGUI->GetGeomGen()->GetICurvesOperations( getStudyId() );
+  return myGeomGUI->GetGeomGen()->GetICurvesOperations();
 }
 
 //=================================================================================
index 9b43abc0a5647b07045bbde603eab5e54c913f63..a94c7fcbef9f7e9cd962caf9b45b69fe92f4704d 100644 (file)
@@ -543,7 +543,7 @@ double BasicGUI_CircleDlg::getRadius() const
 //=================================================================================
 GEOM::GEOM_IOperations_ptr BasicGUI_CircleDlg::createOperation()
 {
-  return myGeomGUI->GetGeomGen()->GetICurvesOperations( getStudyId() );
+  return myGeomGUI->GetGeomGen()->GetICurvesOperations();
 }
 
 //=================================================================================
index 89866fc8f452ca0ab560acc475e8909efeec8bd3..2a363b49d23637c90a264a385253f6200e2e69a0 100644 (file)
@@ -418,7 +418,7 @@ void BasicGUI_CurveDlg::enterEvent (QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr BasicGUI_CurveDlg::createOperation()
 {
-  return myGeomGUI->GetGeomGen()->GetICurvesOperations(getStudyId());
+  return myGeomGUI->GetGeomGen()->GetICurvesOperations();
 }
 
 //=================================================================================
index 9ef110a6463a59a65204c65c4b99318c585dc6e8..4fdea1811e89d9d80e6b32bb87a4679691a46c98 100644 (file)
@@ -371,7 +371,7 @@ void BasicGUI_EllipseDlg::ValueChangedInSpinBox( double newValue )
 //=================================================================================
 GEOM::GEOM_IOperations_ptr BasicGUI_EllipseDlg::createOperation()
 {
-  return myGeomGUI->GetGeomGen()->GetICurvesOperations( getStudyId() );
+  return myGeomGUI->GetGeomGen()->GetICurvesOperations();
 }
 
 //=================================================================================
index c520f9af680c69621b6cee6f918fb8f68905cebd..288062c80f7cb8b84b3291545d23840b918d3841 100644 (file)
@@ -364,7 +364,7 @@ void BasicGUI_LineDlg::enterEvent( QEvent* )
 //=================================================================================
 GEOM::GEOM_IOperations_ptr BasicGUI_LineDlg::createOperation()
 {
-  return myGeomGUI->GetGeomGen()->GetIBasicOperations( getStudyId() );
+  return myGeomGUI->GetGeomGen()->GetIBasicOperations();
 }
 
 //=================================================================================
index 56bb4eb6e066520859905359b756a9c2eeb563d1..ee6448c35fadf887ce58c1ba46b03a1d9f1ca859 100644 (file)
@@ -511,7 +511,7 @@ void BasicGUI_MarkerDlg::enterEvent( QEvent* )
 //=================================================================================
 GEOM::GEOM_IOperations_ptr BasicGUI_MarkerDlg::createOperation()
 {
-  return myGeomGUI->GetGeomGen()->GetIBasicOperations( getStudyId() );
+  return myGeomGUI->GetGeomGen()->GetIBasicOperations();
 }
 
 //=================================================================================
index 05ac56dc867d39083356259f9800a522ecbeb6c2..17d431515e24e1ebc19560190084a94a430499fa 100644 (file)
@@ -675,7 +675,7 @@ QString BasicGUI_PlaneDlg::getSizeAsString() const
 //=================================================================================
 GEOM::GEOM_IOperations_ptr BasicGUI_PlaneDlg::createOperation()
 {
-  return myGeomGUI->GetGeomGen()->GetIBasicOperations( getStudyId() );
+  return myGeomGUI->GetGeomGen()->GetIBasicOperations();
 }
 
 //=================================================================================
index 66326b97d8ef15d6a5fd3928439e14176e0cd087..4f4f89b46a1e209ec102d399ced0e02d2f421da5 100644 (file)
@@ -733,7 +733,7 @@ void BasicGUI_PointDlg::OnPointSelected(const gp_Pnt& thePnt)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr BasicGUI_PointDlg::createOperation()
 {
-  return myGeomGUI->GetGeomGen()->GetIBasicOperations(getStudyId());
+  return myGeomGUI->GetGeomGen()->GetIBasicOperations();
 }
 
 //=================================================================================
index 7d4d41923babac4132a534ab8f947c4aca42f96a..d0eaa03aec095d9a8e336bfb728a71007bb557b2 100644 (file)
@@ -395,7 +395,7 @@ void BasicGUI_VectorDlg::ReverseVector( int state )
 //=================================================================================
 GEOM::GEOM_IOperations_ptr BasicGUI_VectorDlg::createOperation()
 {
-  return myGeomGUI->GetGeomGen()->GetIBasicOperations( getStudyId() );
+  return myGeomGUI->GetGeomGen()->GetIBasicOperations();
 }
 
 //=================================================================================
index a623ab2cf15c000c224e32d1ecebbbff2235b9df..bb337df3fccc1386376e3d8a438b0ee0429c801a 100644 (file)
@@ -335,7 +335,7 @@ void BasicGUI_WorkingPlaneDlg::SelectionIntoArgument()
           aName = aName + ":edge_" + QString::number( anIndex );
 
           GEOM::GEOM_IShapesOperations_var aShapesOp =
-            getGeomEngine()->GetIShapesOperations( getStudyId() );
+            getGeomEngine()->GetIShapesOperations();
           if ( myEditCurrentArgument == Group2->LineEdit1 )
             myVectX = aShapesOp->GetSubShape( aSelectedObject, anIndex );
           else
@@ -489,7 +489,7 @@ bool BasicGUI_WorkingPlaneDlg::updateWPlane( const bool showPreview )
     Zz = Xx = 1.;
 
     GEOM::GEOM_IMeasureOperations_ptr aMeasureOp =
-      myGeomGUI->GetGeomGen()->GetIMeasureOperations( getStudyId() );
+      myGeomGUI->GetGeomGen()->GetIMeasureOperations();
     aMeasureOp->GetPosition( myFace, Ox, Oy, Oz, Zx, Zy, Zz, Xx, Xy, Xz);
 
     if ( aMeasureOp->IsDone() ) {
@@ -582,7 +582,7 @@ bool BasicGUI_WorkingPlaneDlg::updateWPlane( const bool showPreview )
   }
 
   if ( showPreview ) {
-    GEOM::GEOM_IBasicOperations_var aBasicOp = getGeomEngine()->GetIBasicOperations( getStudyId() );
+    GEOM::GEOM_IBasicOperations_var aBasicOp = getGeomEngine()->GetIBasicOperations();
     GEOM::GEOM_Object_var anObj = aBasicOp->MakeMarker
       ( myWPlane.Location().X(),   myWPlane.Location().Y(),   myWPlane.Location().Z(),
         myWPlane.XDirection().X(), myWPlane.XDirection().Y(), myWPlane.XDirection().Z(),
index 6f8c2ac0b0e29dabeda7af7ff40a2a5feb1eee77..178ed57f441d40e292ad292e97251a6f47b0c515 100644 (file)
@@ -422,7 +422,7 @@ void BlocksGUI_BlockDlg::enterEvent (QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr BlocksGUI_BlockDlg::createOperation()
 {
-  return getGeomEngine()->GetIBlocksOperations(getStudyId());
+  return getGeomEngine()->GetIBlocksOperations();
 }
 
 //=================================================================================
index 984bb22ec01294794b8c8ef46ab5ecf3abf56855..f9f543b0f870870494941786159d3aa5e7f358c9 100644 (file)
@@ -360,7 +360,7 @@ bool BlocksGUI_ExplodeDlg::isAllSubShapes() const
 //=================================================================================
 GEOM::GEOM_IOperations_ptr BlocksGUI_ExplodeDlg::createOperation()
 {
-  return getGeomEngine()->GetIBlocksOperations( getStudyId() );
+  return getGeomEngine()->GetIBlocksOperations();
 }
 
 //=================================================================================
index c585745f5ff30459456991fb2a33765a94a6da08..041e57f4e77c39e1c20b652ae11a68766dcf5d92 100644 (file)
@@ -222,7 +222,7 @@ void BlocksGUI_PropagateDlg::enterEvent( QEvent* )
 //=================================================================================
 GEOM::GEOM_IOperations_ptr BlocksGUI_PropagateDlg::createOperation()
 {
-  return getGeomEngine()->GetIBlocksOperations( getStudyId() );
+  return getGeomEngine()->GetIBlocksOperations();
 }
 
 //=================================================================================
index b1b01f88db13062408e8649c3148ca237e3bff71..116327bfe9827dac60617b170b469b800847f3a2 100644 (file)
@@ -482,7 +482,7 @@ void BlocksGUI_QuadFaceDlg::activateSelection()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr BlocksGUI_QuadFaceDlg::createOperation()
 {
-  return getGeomEngine()->GetIBlocksOperations(getStudyId());
+  return getGeomEngine()->GetIBlocksOperations();
 }
 
 //=================================================================================
index d326adab0a9ea562362b4e7420b967d0976f3da0..d4e285aed87580777555a389eb8e0b48e09bf569 100644 (file)
@@ -543,7 +543,7 @@ void BlocksGUI_TrsfDlg::enableWidgets()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr BlocksGUI_TrsfDlg::createOperation()
 {
-  return getGeomEngine()->GetIBlocksOperations(getStudyId());
+  return getGeomEngine()->GetIBlocksOperations();
 }
 
 //=================================================================================
index b766e214b69947d665c3ea99d28b0ce1884f66db..e148cc3aa82d69b52bd9da74db34717245410927 100644 (file)
@@ -378,7 +378,7 @@ void BooleanGUI_Dialog::enterEvent (QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr BooleanGUI_Dialog::createOperation()
 {
-  return getGeomEngine()->GetIBooleanOperations(getStudyId());
+  return getGeomEngine()->GetIBooleanOperations();
 }
 
 //=================================================================================
index 17d4a3bda4e7797b2c6171dba8b1f943a73ae20e..7cf57c914062b6e2d0c7a1335ca9cf8cc9842685 100644 (file)
@@ -207,7 +207,7 @@ void BuildGUI_CompoundDlg::enterEvent(QEvent* e)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr BuildGUI_CompoundDlg::createOperation()
 {
-  return getGeomEngine()->GetIShapesOperations( getStudyId() );
+  return getGeomEngine()->GetIShapesOperations();
 }
 
 //=================================================================================
index 57e6169fbcf31d6d406132e0882ea988286fd4c9..ff807392be6ec0760fc747cd9795044e010a52eb 100644 (file)
@@ -416,7 +416,7 @@ void BuildGUI_EdgeDlg::ValueChangedInSpinBox(double newValue)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr BuildGUI_EdgeDlg::createOperation()
 {
-  return getGeomEngine()->GetIShapesOperations(getStudyId());
+  return getGeomEngine()->GetIShapesOperations();
 }
 
 //=================================================================================
index bb81992cbc9eaff171098a761497052dceef7213..298bf670e62ecb5f1039d586e9478d4ad5bf6ee6 100644 (file)
@@ -585,7 +585,7 @@ void BuildGUI_FaceDlg::enterEvent( QEvent* )
 //=================================================================================
 GEOM::GEOM_IOperations_ptr BuildGUI_FaceDlg::createOperation()
 {
-  return getGeomEngine()->GetIShapesOperations( getStudyId() );
+  return getGeomEngine()->GetIShapesOperations();
 }
 
 //=================================================================================
index e32a0ac0e72e0cae7dc73687be1d29b1311fd984..2cd4b281d76c06391a0993e55d5c370499c26d66 100644 (file)
@@ -234,7 +234,7 @@ void BuildGUI_ShellDlg::enterEvent( QEvent* )
 //=================================================================================
 GEOM::GEOM_IOperations_ptr BuildGUI_ShellDlg::createOperation()
 {
-  return getGeomEngine()->GetIShapesOperations( getStudyId() );
+  return getGeomEngine()->GetIShapesOperations();
 }
 
 //=================================================================================
index d564e61ceccbe03318adcff29197b78b32bf8de3..331f481be0cb2aa1e95b0916a94787ea32e9456f 100644 (file)
@@ -296,7 +296,7 @@ void  BuildGUI_SolidDlg::EnableNameField( bool toEnable )
 //=================================================================================
 GEOM::GEOM_IOperations_ptr BuildGUI_SolidDlg::createOperation()
 {
-  return getGeomEngine()->GetIShapesOperations( getStudyId() );
+  return getGeomEngine()->GetIShapesOperations();
 }
 
 //=================================================================================
@@ -308,7 +308,7 @@ bool BuildGUI_SolidDlg::isValid (QString& msg)
   bool ok = !myShells.isEmpty();
 
   GEOM::MeasureOpPtr anOp;
-  anOp.take(myGeomGUI->GetGeomGen()->GetIMeasureOperations(getStudyId()));
+  anOp.take(myGeomGUI->GetGeomGen()->GetIMeasureOperations());
   if (getConstructorId() == 0 && (!GroupSolid->CheckButton1->isChecked() || myShells.count() == 1)) {
        for (int i = 0, n = myShells.count(); i < n && ok; i++) {
          CORBA::String_var aRes = anOp->IsGoodForSolid(myShells[i].get());
@@ -336,7 +336,7 @@ bool BuildGUI_SolidDlg::isClosed( GEOM::GEOM_Object_ptr shell )
 
   if ( !CORBA::is_nil( shell ) ) {
     GEOM::MeasureOpPtr anOp;
-    anOp.take( myGeomGUI->GetGeomGen()->GetIMeasureOperations( getStudyId() ) );
+    anOp.take( myGeomGUI->GetGeomGen()->GetIMeasureOperations() );
 
     // Detect kind of shape and parameters
     aKind = anOp->KindOfShape(shell, anInts, aDbls);
index ee0c055dac4abf9d2fa40c7b232fea695ab8257c..3085a9fefde2112898430fe3061ffecb245a008d 100644 (file)
@@ -263,7 +263,7 @@ void BuildGUI_WireDlg::enterEvent( QEvent* )
 //=================================================================================
 GEOM::GEOM_IOperations_ptr BuildGUI_WireDlg::createOperation()
 {
-  return getGeomEngine()->GetIShapesOperations( getStudyId() );
+  return getGeomEngine()->GetIShapesOperations();
 }
 
 //=================================================================================
index 3f06d4611cf4417e94915aa4cf17a4b065cec21d..91196cb63dede8fb4833f53b6dceb791395f7151 100644 (file)
@@ -59,13 +59,7 @@ myIsMainObject( false )
   myTextItem->setFont( textFont );
 
   myEntry = theEntry;
-
-  SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
-  if ( !app ) return;
-  SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>(app->activeStudy());
-  SALOMEDS::Study_var aStudyDS = GeometryGUI::ClientStudyToStudy( study->studyDS() );
-  int studyId = aStudyDS->StudyId();
-  myGeomObject = GeometryGUI::GetGeomGen()->GetObject( studyId, myEntry.c_str() );
+  myGeomObject = GeometryGUI::GetGeomGen()->GetObject( myEntry.c_str() );
 
   updateName();
 
index 73a24840298f9de399cf2dc36fd644df68a0955d..1b94c1f93bde8d7027559f0da61169199ccb45d4 100644 (file)
@@ -50,8 +50,7 @@ void DependencyTree_Selector::getSelection( SUIT_DataOwnerPtrList& theList ) con
     if( DependencyTree_Object* treeObject = dynamic_cast<DependencyTree_Object*>( myView->selectedObject() ) ) {
       QString studyEntry;
       QString name;
-      GEOM::GEOM_BaseObject_var anObj = GeometryGUI::GetGeomGen()->GetObject( myView->getStudyId(),
-                                                                              treeObject->getEntry().c_str() );
+      GEOM::GEOM_BaseObject_var anObj = GeometryGUI::GetGeomGen()->GetObject( treeObject->getEntry().c_str() );
       if( anObj->_is_nil() )
         continue;
          CORBA::String_var studyEntryVar = anObj->GetStudyEntry();
index 22b61de5668d8a44f53443a43dde6ec5710262ec..02858e12feb1ba406fcf1f828d015d4e7a06a4fd 100644 (file)
@@ -48,9 +48,6 @@ myIsUpdate( true )
   SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
   if ( !app ) return;
 
-  SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
-  myStudy = GeometryGUI::ClientStudyToStudy( study->studyDS());
-
   mySelectionMgr = app->selectionMgr();
   if ( !mySelectionMgr ) return;
 
@@ -183,15 +180,6 @@ QString DependencyTree_View::getViewName() const
   return tr( "DEPENDENCY_TREE" );
 }
 
-//=================================================================================
-// function : getStudyId()
-// purpose  : return Id of current study
-//=================================================================================
-int DependencyTree_View::getStudyId() const
-{
-  return myStudy->StudyId();
-}
-
 //=================================================================================
 // function : getObjectByEntry()
 // purpose  : return DependencyTree_Object by entry
@@ -799,7 +787,7 @@ void DependencyTree_View::getNewTreeModel( bool theUseSelectedObject, bool theUs
 
   // get string which describes dependency tree structure
   SALOMEDS::TMPFile_var SeqFile =
-    GeometryGUI::GetGeomGen()->GetDependencyTree( myStudy, myMainEntries );
+    GeometryGUI::GetGeomGen()->GetDependencyTree( myMainEntries );
   char* buf = (char*)&SeqFile[0];
 
   clearView( true );
index a32526e4419ab0d1fe0ea6b95a4756a071f3be1e..66143bc8dda5f7fbbc4dcb3d0e54448ec803ef85 100644 (file)
@@ -60,7 +60,6 @@ public:
   void                    wheelEvent( QWheelEvent* event );
 
   QString                 getViewName() const;
-  int                     getStudyId() const;
 
   DependencyTree_Object*  getObjectByEntry( const std::string& );
 
@@ -129,7 +128,6 @@ private:
   QCheckBox*              myDisplayDescendants;
   QPushButton*            updateButton;
 
-  SALOMEDS::Study_var     myStudy;
   LightApp_SelectionMgr*  mySelectionMgr;
   GEOM::string_array_var  myMainEntries;
 
index fd7b8688942cac1e6390adb2249e2156e106103e..a37cd7d6039b0e9a83dcdd5243821570f9fb6cc2 100755 (executable)
@@ -756,7 +756,7 @@ void EntityGUI_3DSketcherDlg::SelectionIntoArgument()
         aSelMgr->GetIndexes(aSelList.First(), aMap);
         if (aMap.Extent() == 1) {
           int anIndex = aMap(1);
-          GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations(getStudyId());
+          GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations();
           aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
         }
       }
@@ -943,7 +943,7 @@ void EntityGUI_3DSketcherDlg::enterEvent (QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr EntityGUI_3DSketcherDlg::createOperation()
 {
-  return getGeomEngine()->GetICurvesOperations(getStudyId());
+  return getGeomEngine()->GetICurvesOperations();
 }
 
 //=================================================================================
index bd0a18fc3bc8a5d3abb8ada015d441f78e82c8d3..98db95c3fd200d9eb5370d5b86360616fcb806f3 100644 (file)
@@ -719,7 +719,7 @@ void EntityGUI_FeatureDetectorDlg::showImageSample()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr EntityGUI_FeatureDetectorDlg::createOperation()
 {
-  return myGeomGUI->GetGeomGen()->GetIShapesOperations( getStudyId() );
+  return myGeomGUI->GetGeomGen()->GetIShapesOperations();
 }
 
 //=================================================================================
@@ -730,7 +730,7 @@ bool EntityGUI_FeatureDetectorDlg::execute( ObjectList& objects )
 {
   bool res = false;
   
-  GEOM::GEOM_IBasicOperations_var  aBasicOperations  = myGeomGUI->GetGeomGen()->GetIBasicOperations( getStudyId() );
+  GEOM::GEOM_IBasicOperations_var  aBasicOperations  = myGeomGUI->GetGeomGen()->GetIBasicOperations();
   GEOM::GEOM_IShapesOperations_var aShapesOperations = GEOM::GEOM_IShapesOperations::_narrow( getOperation() );
 
   ShapeRec_Parameters* parameters = parametersChanged();
@@ -791,7 +791,7 @@ bool EntityGUI_FeatureDetectorDlg::execute( ObjectList& objects )
     }
     else if (myConstructorId == CONTOURS)
     {    
-      GEOM::GEOM_ICurvesOperations_var aCurveOperations = myGeomGUI->GetGeomGen()->GetICurvesOperations( getStudyId() );
+      GEOM::GEOM_ICurvesOperations_var aCurveOperations = myGeomGUI->GetGeomGen()->GetICurvesOperations();
 
       myDetector->ComputeContours( useROI, parameters );
       std::vector< std::vector<cv::Point> >   contours  = myDetector->GetContours();
index 38b891fdb43d4000639f52dbc46899818d7e7c5c..2304c3cdff1b084d4bd9e43ea6fda0bc224625f9 100644 (file)
@@ -1765,7 +1765,7 @@ void EntityGUI_FieldDlg::highlightSubShapes()
   SALOME_ListIO aSelList;
 
   // To highlight the selected sub-shape in Object Browser, if it's already published under the main shape
-  GEOM::GEOM_ILocalOperations_var aLocOp = getGeomEngine()->GetILocalOperations(getStudyId());
+  GEOM::GEOM_ILocalOperations_var aLocOp = getGeomEngine()->GetILocalOperations();
   QMap<int, QString> childsMap;
   SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>(app->activeStudy());
   if (appStudy) {
@@ -1818,7 +1818,7 @@ void EntityGUI_FieldDlg::highlightSubShapes()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr EntityGUI_FieldDlg::createOperation()
 {
-  return getGeomEngine()->GetIFieldOperations(getStudyId());
+  return getGeomEngine()->GetIFieldOperations();
 }
 
 #define RETURN_WITH_MSG(a, b) \
@@ -1857,7 +1857,7 @@ bool EntityGUI_FieldDlg::isValid(QString& theMessage)
 //=================================================================================
 bool EntityGUI_FieldDlg::execute()
 {
-  SALOMEDS::Study_var aStudyDS = GeometryGUI::ClientStudyToStudy( getStudy()->studyDS() );
+  SALOMEDS::Study_var aStudyDS = GeometryGUI::GetStudy();
   SALOMEDS::StudyBuilder_var aBuilder = aStudyDS->NewBuilder();
 
   QString aName = getNewObjectName().trimmed();
@@ -1882,7 +1882,7 @@ bool EntityGUI_FieldDlg::execute()
       return false;
     
     SALOMEDS::SObject_wrap aSO =
-      getGeomEngine()->AddInStudy( aStudyDS, myField, aName.toLatin1().constData(), myShape );
+      getGeomEngine()->AddInStudy( myField, aName.toLatin1().constData(), myShape );
     if ( !aSO->_is_nil() ) {
       myField->UnRegister();
       CORBA::String_var entry = aSO->GetID();
@@ -1918,7 +1918,7 @@ bool EntityGUI_FieldDlg::execute()
         step = myField->AddStep( tbl->getStepID(), tbl->getStamp() );
 
         SALOMEDS::SObject_wrap aSO =
-          getGeomEngine()->AddInStudy( aStudyDS, step, stepName.toLatin1().constData(), myField );
+          getGeomEngine()->AddInStudy( step, stepName.toLatin1().constData(), myField );
         if ( /*!myIsCreation &&*/ !aSO->_is_nil() ) {
           step->UnRegister();
           CORBA::String_var entry = aSO->GetID();
index 8bd115db3691b972ddae8214b799bcb8e0f6e604..9d9ad5e81fd6d387251ee0bb143d5f203337c1ac 100755 (executable)
@@ -190,7 +190,7 @@ void EntityGUI_IsolineDlg::TypeChanged(int)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr EntityGUI_IsolineDlg::createOperation()
 {
-  return myGeomGUI->GetGeomGen()->GetICurvesOperations( getStudyId() );
+  return myGeomGUI->GetGeomGen()->GetICurvesOperations();
 }
 
 //=================================================================================
index ec39c0d147329f0584936905c4043e4ebcc5dc8f..e93a97dfa9576473c4978541bf842159f46fb31b 100644 (file)
@@ -163,7 +163,7 @@ bool EntityGUI_PictureImportDlg::ClickOnApply()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr EntityGUI_PictureImportDlg::createOperation()
 {
-  return myGeomGUI->GetGeomGen()->GetIBlocksOperations( getStudyId() );
+  return myGeomGUI->GetGeomGen()->GetIBlocksOperations();
 }
 
 //=================================================================================
@@ -175,7 +175,7 @@ bool EntityGUI_PictureImportDlg::execute( ObjectList& objects )
   bool res = false;
   
   GEOM::GEOM_Object_var anObj;
-  GEOM::GEOM_IBasicOperations_var aBasicOperations = myGeomGUI->GetGeomGen()->GetIBasicOperations( getStudyId() );
+  GEOM::GEOM_IBasicOperations_var aBasicOperations = myGeomGUI->GetGeomGen()->GetIBasicOperations();
   GEOM::GEOM_IBlocksOperations_var aBlocksOperations = GEOM::GEOM_IBlocksOperations::_narrow( getOperation() );
   QString theImgFileName = myLineEdit->text();
   if ( theImgFileName.isEmpty() )
index a2c4be2c603a983292125f83824e00446deb1791..09382f553e8000c6dfb7b034a17866974285dfe8 100644 (file)
@@ -286,7 +286,7 @@ void EntityGUI_PolylineDlg::GetCurveParams(GEOM::ListOfListOfDouble &theCoords,
 //=================================================================================
 GEOM::GEOM_IOperations_ptr EntityGUI_PolylineDlg::createOperation()
 {
-  return getGeomEngine()->GetICurvesOperations( getStudyId() );
+  return getGeomEngine()->GetICurvesOperations();
 }
 
 //=================================================================================
@@ -678,7 +678,7 @@ gp_Ax3 EntityGUI_PolylineDlg::WPlaneToLCS(GEOM::GeomObjPtr theGeomObj)
 
   if (aShape.ShapeType() == TopAbs_FACE) {
     GEOM::GEOM_IMeasureOperations_ptr aMeasureOp =
-      myGeomGUI->GetGeomGen()->GetIMeasureOperations(getStudyId());
+      myGeomGUI->GetGeomGen()->GetIMeasureOperations();
     double Ox, Oy, Oz, Zx, Zy, Zz, Xx, Xy, Xz;
 
     aMeasureOp->GetPosition(theGeomObj.get(), Ox, Oy, Oz, Zx, Zy, Zz, Xx, Xy, Xz);
index 45ecde755367553265afef8e73554dcc21f271a8..2c721500218132de5fa29a8c8f7445d16a700853 100644 (file)
@@ -462,7 +462,7 @@ void EntityGUI_SketcherDlg::Init()
 
   myHelpFileName = "create_sketcher_page.html";
   
-  GEOM::GEOM_IBasicOperations_var aBasicOp = getGeomEngine()->GetIBasicOperations( getStudyId() );
+  GEOM::GEOM_IBasicOperations_var aBasicOp = getGeomEngine()->GetIBasicOperations();
   myGlobalCS = aBasicOp->MakeMarker( 0,0,0,
                                      1,0,0,
                                      0,1,0 ); 
@@ -2270,7 +2270,7 @@ QString EntityGUI_SketcherDlg::GetNewCommand( QString& theParameters )
 //=================================================================================
 GEOM::GEOM_IOperations_ptr EntityGUI_SketcherDlg::createOperation()
 {
-  return getGeomEngine()->GetICurvesOperations( getStudyId() );
+  return getGeomEngine()->GetICurvesOperations();
 }
 
 //=================================================================================
@@ -2794,7 +2794,7 @@ gp_Ax3 EntityGUI_SketcherDlg::WPlaneToLCS( GEOM::GEOM_Object_var geomObj )
   if (aShape.ShapeType() == TopAbs_FACE) 
   {
     GEOM::GEOM_IMeasureOperations_ptr aMeasureOp =
-    myGeometryGUI->GetGeomGen()->GetIMeasureOperations( getStudyId() );
+    myGeometryGUI->GetGeomGen()->GetIMeasureOperations();
     double Ox, Oy, Oz, Zx, Zy, Zz, Xx, Xy, Xz;
     aMeasureOp->GetPosition( geomObj, Ox, Oy, Oz, Zx, Zy, Zz, Xx, Xy, Xz);
     if ( aMeasureOp->IsDone() )
index 5afbdda1823f801f861c37544f0caf8f0a8c86ea..5230c6ac5b62b271de2e56b5df0dfcff518394fd 100644 (file)
@@ -810,7 +810,7 @@ void EntityGUI_SubShapeDlg::activateSelection()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr EntityGUI_SubShapeDlg::createOperation()
 {
-  return getGeomEngine()->GetIShapesOperations(getStudyId());
+  return getGeomEngine()->GetIShapesOperations();
 }
 
 //=================================================================================
index 0929f1c10e24b89bcbf1c59aef2328c92d9ea351..fd723302a6d937c920564bc4c2b3a68f41e65292 100644 (file)
@@ -169,7 +169,7 @@ void EntityGUI_SurfFromFaceDlg::enterEvent (QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr EntityGUI_SurfFromFaceDlg::createOperation()
 {
-  return myGeomGUI->GetGeomGen()->GetIShapesOperations(getStudyId());
+  return myGeomGUI->GetGeomGen()->GetIShapesOperations();
 }
 
 //=================================================================================
index 847240088261e15c92a1f2bdef7e72dbe804f6f7..d5862ced2fed7b02d79732e162f943c6ab66918e 100644 (file)
@@ -869,8 +869,7 @@ void GEOMBase::PublishSubObject( GEOM::GEOM_Object_ptr object, const QString& na
     QString fatherEntry = GetEntry( father );
     if ( entry.isEmpty() && !CORBA::is_nil( father ) && !fatherEntry.isEmpty() ) {
       QString aName = !name.isEmpty() ? name : GetName( object );
-      GeometryGUI::GetGeomGen()->AddInStudy( GeometryGUI::ClientStudyToStudy( studyDS ),
-                                             object, aName.toLatin1().data(), father.in() );
+      GeometryGUI::GetGeomGen()->AddInStudy( object, aName.toLatin1().data(), father.in() );
     }
   }
 }
index 4c2614e10f759cc96a9cf04aa3527679f9e36679..ca3e73bda002cd78efb2eb439a53dc002c139276 100755 (executable)
@@ -595,12 +595,10 @@ QString GEOMBase_Helper::addInStudy( GEOM::GEOM_Object_ptr theObj, const char* t
   if ( !aStudy || theObj->_is_nil() )
     return QString();
 
-  SALOMEDS::Study_var aStudyDS = GeometryGUI::ClientStudyToStudy(aStudy);
-
   GEOM::GEOM_Object_ptr aFatherObj = getFather( theObj );
 
   SALOMEDS::SObject_var aSO =
-    getGeomEngine()->AddInStudy(aStudyDS, theObj, theName, aFatherObj);
+    getGeomEngine()->AddInStudy(theObj, theName, aFatherObj);
 
   QString anEntry;
   if ( !aSO->_is_nil() ) {
@@ -609,7 +607,7 @@ QString GEOMBase_Helper::addInStudy( GEOM::GEOM_Object_ptr theObj, const char* t
   }
   // Each dialog is responsible for this method implementation,
   // default implementation does nothing
-  restoreSubShapes(aStudyDS, aSO);
+  restoreSubShapes(aSO);
   aSO->UnRegister();
 
   return anEntry;
@@ -619,15 +617,14 @@ QString GEOMBase_Helper::addInStudy( GEOM::GEOM_Object_ptr theObj, const char* t
 // Function : restoreSubShapes
 // Purpose  : restore tree of argument's sub-shapes under the resulting shape
 //================================================================
-void GEOMBase_Helper::restoreSubShapes (SALOMEDS::Study_ptr   /*theStudy*/,
-                                        SALOMEDS::SObject_ptr /*theSObject*/)
+void GEOMBase_Helper::restoreSubShapes (SALOMEDS::SObject_ptr /*theSObject*/)
 {
   // do nothing by default
 
   // example of implementation in particular dialog:
   // GEOM::ListOfGO anArgs;
   // anArgs.length(0); // empty list means that all arguments should be restored
-  // getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, anArgs,
+  // getGeomEngine()->RestoreSubShapesSO(theSObject, anArgs,
   //                                     /*theFindMethod=*/GEOM::FSM_GetInPlace,
   //                                     /*theInheritFirstArg=*/false);
 }
@@ -657,18 +654,6 @@ void GEOMBase_Helper::updateViewer()
   getDisplayer()->UpdateViewer();
 }
 
-//================================================================
-// Function : getStudyId
-// Purpose  : Get study Id
-//================================================================
-int GEOMBase_Helper::getStudyId() const
-{
-  int anId = -1;
-  if ( getStudy() )
-    anId = getStudy()->id();
-  return anId;
-}
-
 //================================================================
 // Function : getStudy
 // Purpose  : Returns the active study. It is recommended to use
@@ -1365,7 +1350,7 @@ QList<GEOM::GeomObjPtr> GEOMBase_Helper::getSelected( const QList<TopAbs_ShapeEn
               GEOM::GeomObjPtr subShape = findObjectInFather( object.get(), idx );
               if ( !subShape ) {
                 // sub-shape is not yet published in the study
-                GEOM::ShapesOpPtr shapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() );
+                GEOM::ShapesOpPtr shapesOp = getGeomEngine()->GetIShapesOperations();
                 subShape.take( shapesOp->GetSubShape( object.get(), idx ) ); // take ownership!
               }
               if ( typeInList( (TopAbs_ShapeEnum)(subShape->GetShapeType()), types ) ) {
index 64d46f2029b634efe584abc0279126eb49bbd9d1..1658cea30a419050b89fa4a26c9250b65749d5b2 100755 (executable)
@@ -120,7 +120,6 @@ protected:
   bool hasCommand      () const;
 
   void updateObjBrowser() const;
-  int  getStudyId      () const;
   SalomeApp_Study* getStudy  () const;
   bool checkViewWindow ();
 
@@ -162,7 +161,7 @@ protected:
   // It should perform the required operation and put all new or modified objects into
   // <objects> argument.Should return <false> if some error occurs during its execution.
 
-  virtual void restoreSubShapes( SALOMEDS::Study_ptr theStudy, SALOMEDS::SObject_ptr theSObject );
+  virtual void restoreSubShapes( SALOMEDS::SObject_ptr theSObject );
   // This method is called by addInStudy().
 
   virtual GEOM::GEOM_Object_ptr getFather( GEOM::GEOM_Object_ptr theObj );
index 637648cacd5ba65b4dde965c26172f00ca89dcdf..7b505203c49dbe258c60e698a965d57ebfbe3c55 100644 (file)
@@ -187,7 +187,7 @@ void GEOMBase_Skeleton::initSpinBox( SalomeApp_DoubleSpinBox* spinBox,
 void GEOMBase_Skeleton::updateAttributes( GEOM::GEOM_Object_ptr theObj,
                                           const QStringList& theParameters)
 {
-  SALOMEDS::Study_var aStudy = GeometryGUI::ClientStudyToStudy(getStudy()->studyDS());
+  SALOMEDS::Study_var aStudy = GeometryGUI::GetStudy();
   SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
   SALOMEDS::SObject_var aSObject = aStudy->FindObjectID(theObj->GetStudyEntry());
   SALOMEDS::GenericAttribute_var anAttr = aStudyBuilder->FindOrCreateAttribute(aSObject, "AttributeString");
index eb9c53f879c314f653c3dd68340c1bb25afeeb9b..20606e5e70dfe01cbca99cf762f3b6a07fcd6b3e 100644 (file)
@@ -137,7 +137,7 @@ extern "C" {
   }
 }
 
-GeometryGUI::StudyTextureMap GeometryGUI::myTextureMap;
+GeometryGUI::TextureMap GeometryGUI::myTextureMap;
 
 GEOM::GEOM_Gen_var GeometryGUI::myComponentGeom = GEOM::GEOM_Gen::_nil();
 
@@ -177,17 +177,15 @@ CORBA::Object_var GeometryGUI::ClientSObjectToObject (_PTR(SObject) theSObject)
 }
 
 //=======================================================================
-// function : ClientStudyToStudy
+// function : GetStudy
 // purpose  :
 //=======================================================================
-SALOMEDS::Study_var GeometryGUI::ClientStudyToStudy (_PTR(Study) theStudy)
+SALOMEDS::Study_var GeometryGUI::GetStudy()
 {
   SALOME_NamingService *aNamingService = SalomeApp_Application::namingService();
-  CORBA::Object_var aSMObject = aNamingService->Resolve("/myStudyManager");
-  SALOMEDS::StudyManager_var aStudyManager = SALOMEDS::StudyManager::_narrow(aSMObject);
-  int aStudyID = theStudy->StudyId();
-  SALOMEDS::Study_var aDSStudy = aStudyManager->GetStudyByID(aStudyID);
-  return aDSStudy._retn();
+  CORBA::Object_var aStudyObject = aNamingService->Resolve("/Study");
+  SALOMEDS::Study_var aStudy = SALOMEDS::Study::_narrow(aStudyObject);
+  return aStudy._retn();
 }
 
 void GeometryGUI::Modified (bool theIsUpdateActions)
@@ -882,9 +880,8 @@ void GeometryGUI::createOriginAndBaseVectors()
     return;
   }
   if ( appStudy ) {
-    _PTR(Study) studyDS = appStudy->studyDS();
-    if ( studyDS && !CORBA::is_nil( GetGeomGen() ) ) {
-      GEOM::GEOM_IBasicOperations_var aBasicOperations = GetGeomGen()->GetIBasicOperations( studyDS->StudyId() );
+    if ( !CORBA::is_nil( GetGeomGen() ) ) {
+      GEOM::GEOM_IBasicOperations_var aBasicOperations = GetGeomGen()->GetIBasicOperations();
       if ( !aBasicOperations->_is_nil() ) {
         SUIT_ResourceMgr* aResourceMgr = SUIT_Session::session()->resourceMgr();
         double aLength = aResourceMgr->doubleValue( "Geometry", "base_vectors_length", 1.0 );
@@ -893,11 +890,10 @@ void GeometryGUI::createOriginAndBaseVectors()
         GEOM::GEOM_Object_var anOY = aBasicOperations->MakeVectorDXDYDZ( 0.0, aLength, 0.0 );
         GEOM::GEOM_Object_var anOZ = aBasicOperations->MakeVectorDXDYDZ( 0.0, 0.0, aLength );
 
-        SALOMEDS::Study_var aDSStudy = ClientStudyToStudy( studyDS );
-        GetGeomGen()->PublishInStudy( aDSStudy, SALOMEDS::SObject::_nil(), anOrigin, "O" );
-        GetGeomGen()->PublishInStudy( aDSStudy, SALOMEDS::SObject::_nil(), anOX, "OX" );
-        GetGeomGen()->PublishInStudy( aDSStudy, SALOMEDS::SObject::_nil(), anOY, "OY" );
-        GetGeomGen()->PublishInStudy( aDSStudy, SALOMEDS::SObject::_nil(), anOZ, "OZ" );
+        GetGeomGen()->PublishInStudy( SALOMEDS::SObject::_nil(), anOrigin, "O" );
+        GetGeomGen()->PublishInStudy( SALOMEDS::SObject::_nil(), anOX, "OX" );
+        GetGeomGen()->PublishInStudy( SALOMEDS::SObject::_nil(), anOY, "OY" );
+        GetGeomGen()->PublishInStudy( SALOMEDS::SObject::_nil(), anOZ, "OZ" );
         anOrigin->UnRegister();
         anOX->UnRegister();
         anOY->UnRegister();
@@ -2155,31 +2151,27 @@ QString GeometryGUI::engineIOR() const
   return "";
 }
 
-Handle(TColStd_HArray1OfByte) GeometryGUI::getTexture
-      (SalomeApp_Study* theStudy, int theId, int& theWidth, int& theHeight)
+Handle(TColStd_HArray1OfByte) GeometryGUI::getTexture (int theId, int& theWidth, int& theHeight)
 {
   theWidth = theHeight = 0;
 
   Handle(TColStd_HArray1OfByte) aTexture;
 
-  if (theStudy) {
-    TextureMap aTextureMap = myTextureMap[ theStudy->studyDS()->StudyId() ];
-    aTexture = aTextureMap[ theId ];
-    if ( aTexture.IsNull() ) {
-      GEOM::GEOM_IInsertOperations_var aInsOp = GeometryGUI::GetGeomGen()->GetIInsertOperations( theStudy->studyDS()->StudyId() );
-      if ( !aInsOp->_is_nil() ) {
-        CORBA::Long aWidth, aHeight;
-        SALOMEDS::TMPFile_var aStream = aInsOp->GetTexture( theId, aWidth, aHeight );
-        if ( aWidth > 0 && aHeight > 0 && aStream->length() > 0 ) {
-          theWidth  = aWidth;
-          theHeight = aHeight;
-
-          aTexture  = new TColStd_HArray1OfByte (1, aStream->length());
-
-          for (int i = 0; i < aStream->length(); i++)
-            aTexture->SetValue( i+1, (Standard_Byte)aStream[i] );
-          aTextureMap[ theId ] = aTexture;
-        }
+  aTexture = myTextureMap[ theId ];
+  if ( aTexture.IsNull() ) {
+    GEOM::GEOM_IInsertOperations_var aInsOp = GeometryGUI::GetGeomGen()->GetIInsertOperations();
+    if ( !aInsOp->_is_nil() ) {
+      CORBA::Long aWidth, aHeight;
+      SALOMEDS::TMPFile_var aStream = aInsOp->GetTexture( theId, aWidth, aHeight );
+      if ( aWidth > 0 && aHeight > 0 && aStream->length() > 0 ) {
+        theWidth  = aWidth;
+        theHeight = aHeight;
+
+        aTexture  = new TColStd_HArray1OfByte (1, aStream->length());
+
+        for (int i = 0; i < aStream->length(); i++)
+          aTexture->SetValue( i+1, (Standard_Byte)aStream[i] );
+        myTextureMap[ theId ] = aTexture;
       }
     }
   }
@@ -3246,12 +3238,11 @@ void GeometryGUI::ClearShapeBuffer( GEOM::GEOM_Object_ptr theObj )
   TCollection_AsciiString asciiIOR( (char *)IOR.in() );
   GEOM_Client::get_client().RemoveShapeFromBuffer( asciiIOR );
 
-  SALOMEDSClient_StudyManager *aManager = SalomeApp_Application::studyMgr();
-
-  if (!aManager)
-    return;
+  SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( application()->activeStudy() );
+  if ( !appStudy )
+         return;
 
-  _PTR(Study) aStudy = aManager->GetStudyByID(theObj->GetStudyID());
+   _PTR(Study) aStudy = appStudy->studyDS();
 
   if ( !aStudy )
     return;
index f92d92ab7b03b375beacf2adfafad914027a3706..5c7718cc51bd7f5cef632f187ae087be0f147f77 100644 (file)
@@ -85,14 +85,14 @@ public:
   virtual void                initialize( CAM_Application* );
   virtual QString             engineIOR() const;
 
-  static Handle(TColStd_HArray1OfByte) getTexture (SalomeApp_Study*, int, int&, int&);
+  static Handle(TColStd_HArray1OfByte) getTexture (int, int&, int&);
 
   static bool                 InitGeomGen();
 
   static  GEOM::GEOM_Gen_var  GetGeomGen();
 
   static CORBA::Object_var    ClientSObjectToObject (_PTR(SObject) theSObject);
-  static SALOMEDS::Study_var  ClientStudyToStudy (_PTR(Study) theStudy);
+  static SALOMEDS::Study_var  GetStudy();
 
   static void                 Modified( bool = true );
 
@@ -206,31 +206,30 @@ private:
 
   typedef QMap<long, Handle(TColStd_HArray1OfByte)> TextureMap;
 
-  typedef QMap<long, TextureMap> StudyTextureMap;
   typedef QMap<QString, GEOMGUI*> GUIMap;
 
   typedef QPair<QString, QString> PluginAction;
 
-  GUIMap                      myGUIMap;          // GUI libraries map
-  QDialog*                    myActiveDialogBox; // active dialog box
-  gp_Ax3                      myWorkingPlane;
-  //QMap<int,QString>           myRules;           // popup rules
-  static StudyTextureMap      myTextureMap;      // texture map
+  GUIMap                       myGUIMap;          // GUI libraries map
+  QDialog*                     myActiveDialogBox; // active dialog box
+  gp_Ax3                       myWorkingPlane;
+  //QMap<int,QString>          myRules;           // popup rules
+  static TextureMap            myTextureMap;      // texture map
 
-  QMap<int, PluginAction>      myPluginActions; // plugin actions
-  QMap<QString, QString>       myPluginLibs;    // plugin name to plugin client library
+  QMap<int, PluginAction>      myPluginActions;   // plugin actions
+  QMap<QString, QString>       myPluginLibs;      // plugin name to plugin client library
 
   QList<GEOMGUI_OCCSelector*>  myOCCSelectors;
   QList<LightApp_VTKSelector*> myVTKSelectors;
 
-  LightApp_Displayer*         myDisplayer;
-  int                         myLocalSelectionMode; //Select Only
+  LightApp_Displayer*          myDisplayer;
+  int                          myLocalSelectionMode; //Select Only
 
-  GEOMGUI_CreationInfoWdg*    myCreationInfoWdg;
+  GEOMGUI_CreationInfoWdg*     myCreationInfoWdg;
   
-  GEOMGUI_TextTreeWdg*       myTextTreeWdg;
+  GEOMGUI_TextTreeWdg*         myTextTreeWdg;
   
-  SALOME_ListIO               myTopLevelIOList;               
+  SALOME_ListIO                myTopLevelIOList;
 
   friend class DisplayGUI;
 };
index 2c85a3441300916069e956adf52fc0679300b037..3ae643a58025c71817ed2423fa2adf4392d313b9 100644 (file)
@@ -52,7 +52,7 @@ myDisplayer(NULL)
   myApp = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
   if ( !myApp ) return;
   SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( myApp->activeStudy() );
-  myStudy = dynamic_cast<SalomeApp_Study*>( myApp->activeStudy() )->studyDS();
+  myStudy = study->studyDS();
   myDisplayer = GEOM_Displayer( study );
 
   setWindowTitle( tr( "GEOM_REDUCE_STUDY_TITLE" ) );
@@ -164,9 +164,8 @@ void GEOMToolsGUI_ReduceStudyDlg::init( const std::set<std::string>& theObjectEn
   GEOM::string_array_var subObjects = new GEOM::string_array();
   GEOM::string_array_var otherObjects = new GEOM::string_array();
 
-  GeometryGUI::GetGeomGen()->GetEntriesToReduceStudy( GeometryGUI::ClientStudyToStudy( myStudy ),
-                                                            keptObjects, parentsObjects,
-                                                            subObjects, otherObjects );
+  GeometryGUI::GetGeomGen()->GetEntriesToReduceStudy( keptObjects, parentsObjects,
+                                                             subObjects, otherObjects );
 
   for ( int i = 0; i < keptObjects->length(); i++ )
     myKeptObjects.insert( keptObjects[i].in() );
@@ -269,7 +268,7 @@ void GEOMToolsGUI_ReduceStudyDlg::addObjectsToTree( QTreeWidget* theWidget, std:
   std::set<std::string>::iterator it;
   for( it = theObjects.begin(); it != theObjects.end(); ++it ) {
     std::string objectEntry = *it;
-    GEOM::GEOM_BaseObject_var GeomBaseObject = GeometryGUI::GetGeomGen()->GetObject( myStudy->StudyId(), objectEntry.c_str() );
+    GEOM::GEOM_BaseObject_var GeomBaseObject = GeometryGUI::GetGeomGen()->GetObject( objectEntry.c_str() );
     GEOM::GEOM_Object_var GeomObject = GEOM::GEOM_Object::_narrow( GeomBaseObject );
     QString studyEntry = GeomBaseObject->GetStudyEntry();
     if( GeomObject->_is_nil() || studyEntry.isEmpty() || !isObjectDrawable( studyEntry.toStdString() ) )
@@ -394,8 +393,7 @@ void GEOMToolsGUI_ReduceStudyDlg::unpublishObjects( std::set<std::string>& theOb
   std::set<std::string>::iterator it;
   for( it = theObjects.begin(); it != theObjects.end(); ++it ) {
     std::string objectEntry = *it;
-    GEOM::GEOM_BaseObject_var GeomBaseObject = GeometryGUI::GetGeomGen()->GetObject( myStudy->StudyId(),
-                                                                                     objectEntry.c_str() );
+    GEOM::GEOM_BaseObject_var GeomBaseObject = GeometryGUI::GetGeomGen()->GetObject( objectEntry.c_str() );
     std::string studyEntry = GeomBaseObject->GetStudyEntry();
     if ( studyEntry == "" || !isObjectDrawable( studyEntry ) )
       continue;
@@ -427,8 +425,7 @@ void GEOMToolsGUI_ReduceStudyDlg::removeObjects( std::set<std::string>& theObjec
   std::set<std::string>::iterator it;
   for( it = theObjects.begin(); it != theObjects.end(); ++it ) {
     std::string objectEntry = *it;
-    GEOM::GEOM_BaseObject_var GeomBaseObject = GeometryGUI::GetGeomGen()->GetObject( myStudy->StudyId(),
-                                                                                     objectEntry.c_str() );
+    GEOM::GEOM_BaseObject_var GeomBaseObject = GeometryGUI::GetGeomGen()->GetObject( objectEntry.c_str() );
     std::string studyEntry = GeomBaseObject->GetStudyEntry();
     if ( studyEntry == "" )
       GeometryGUI::GetGeomGen()->RemoveObject( GeomBaseObject );
index 20629cce12a8ddc8fbf76ec6d7bf44e80804cb97..837b968d15bb5d27918b61663a9247725e26e998 100644 (file)
@@ -83,17 +83,6 @@ char* GEOM_BaseObject_i::GetEntry()
   return CORBA::string_dup(anEntstr);
 }
 
-//=============================================================================
-/*!
- *  GetStudyID
- */
-//=============================================================================
-
-CORBA::Long GEOM_BaseObject_i::GetStudyID()
-{
-   return _impl->GetDocID();
-}
-
 //=============================================================================
 /*!
  *  GetType
@@ -184,7 +173,7 @@ GEOM::ListOfGBO* GEOM_BaseObject_i::GetDependency()
     HANDLE_NAMESPACE(GEOM_BaseObject) anObj = HANDLE_NAMESPACE(GEOM_BaseObject)::DownCast(aSeq->Value(i));
     if (anObj.IsNull()) continue;
     TDF_Tool::Entry(anObj->GetEntry(), anEntry);
-    GEOM::GEOM_BaseObject_var obj = _engine->GetObject(anObj->GetDocID(), (char*) anEntry.ToCString());
+    GEOM::GEOM_BaseObject_var obj = _engine->GetObject((char*) anEntry.ToCString());
     aList[i-1] = obj;
   }
 
@@ -213,8 +202,7 @@ GEOM::ListOfGBO* GEOM_BaseObject_i::GetLastDependency()
   for (int i = 1; i<=aLength; i++) {
      HANDLE_NAMESPACE(GEOM_BaseObject) anObj = HANDLE_NAMESPACE(GEOM_BaseObject)::DownCast(aSeq->Value(i));
      if (anObj.IsNull()) continue;
-     GEOM::GEOM_BaseObject_var obj = _engine->GetObject(anObj->GetDocID(),
-                                                        anObj->GetEntryString().ToCString());
+     GEOM::GEOM_BaseObject_var obj = _engine->GetObject(anObj->GetEntryString().ToCString());
      aList[i-1] = GEOM::GEOM_BaseObject::_duplicate( obj );
   }
 
index a9966da60b7b1c3b44627b2a33cb24134ba5ca43..fb103ddc30a1c08faf48f9c1aa9fe25e629d5b23 100644 (file)
@@ -42,8 +42,6 @@ class GEOM_I_EXPORT GEOM_BaseObject_i : public virtual POA_GEOM::GEOM_BaseObject
 
   virtual char* GetEntry();
 
-  virtual CORBA::Long GetStudyID();
-
   virtual CORBA::Long GetType();
 
   virtual CORBA::Long GetTick();
index eb79a3ff9ceb6f2df80b70bb33ea5686bf787a43..35254bf90b7ede81698a37f6d7986c724438c5d3 100644 (file)
@@ -151,7 +151,7 @@ Engines::TMPFile* GEOM_Gen_i::DumpPython(CORBA::Object_ptr theStudy,
   }
   
   TCollection_AsciiString aScript;
-  aScript += _impl->DumpPython(aStudy->StudyId(), objectDataVec, aVariableMap, isPublished, isMultiFile, isValidScript);
+  aScript += _impl->DumpPython(objectDataVec, aVariableMap, isPublished, isMultiFile, isValidScript);
 
   if (isPublished)
   {
index 5e1710bfa9960d5e5451cd29391e5bdaea36ef0a..dd3ec455ec8fe590e787d4d38ec592118eff5ad6 100644 (file)
@@ -171,15 +171,12 @@ char* GEOM_Gen_i::IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject,
 //          : Used when a study is loaded
 //          : The IOR (IORName) of object created is returned
 //============================================================================
-char* GEOM_Gen_i::LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject,
-                                         const char* aLocalPersistentID,
+char* GEOM_Gen_i::LocalPersistentIDToIOR(const char* aLocalPersistentID,
                                          CORBA::Boolean isMultiFile,
                                          CORBA::Boolean isASCII)
 {
-  SALOMEDS::Study_var aStudy = theSObject->GetStudy();
-
   HANDLE_NAMESPACE(GEOM_BaseObject) anObject =
-    _impl->GetObject(aStudy->StudyId(), aLocalPersistentID);
+    _impl->GetObject(aLocalPersistentID);
   if ( !anObject.IsNull() )
   {
     TCollection_AsciiString anEntry;
@@ -210,24 +207,24 @@ bool GEOM_Gen_i::CanPublishInStudy(CORBA::Object_ptr theIOR)
 // function : PublishInStudy
 // purpose  :
 //============================================================================
-SALOMEDS::SObject_ptr GEOM_Gen_i::PublishInStudy(SALOMEDS::Study_ptr   theStudy,
-                                                 SALOMEDS::SObject_ptr theSObject,
+SALOMEDS::SObject_ptr GEOM_Gen_i::PublishInStudy(SALOMEDS::SObject_ptr theSObject,
                                                  CORBA::Object_ptr     theObject,
                                                  const char*           theName)
   throw (SALOME::SALOME_Exception)
 {
   Unexpect aCatch(SALOME_SalomeException);
   SALOMEDS::SObject_var aResultSO;
-  if(CORBA::is_nil(theObject) || theStudy->_is_nil()) return aResultSO;
+  SALOMEDS::Study_var aStudy = GetStudy();
+  if(CORBA::is_nil(theObject) || aStudy->_is_nil()) return aResultSO;
   GEOM::GEOM_BaseObject_var aBaseObj = GEOM::GEOM_BaseObject::_narrow(theObject);
   GEOM::GEOM_Object_var       aShape = GEOM::GEOM_Object::_narrow(theObject);
   if(aBaseObj->_is_nil()) return aResultSO;
 
   SALOMEDS::GenericAttribute_var anAttr;
-  SALOMEDS::StudyBuilder_var     aStudyBuilder = theStudy->NewBuilder();
-  SALOMEDS::UseCaseBuilder_wrap  useCaseBuilder = theStudy->GetUseCaseBuilder();
+  SALOMEDS::StudyBuilder_var     aStudyBuilder = aStudy->NewBuilder();
+  SALOMEDS::UseCaseBuilder_wrap  useCaseBuilder = aStudy->GetUseCaseBuilder();
 
-  SALOMEDS::SComponent_var       aFather = theStudy->FindComponent("GEOM");
+  SALOMEDS::SComponent_var       aFather = aStudy->FindComponent("GEOM");
   if (aFather->_is_nil()) {
     aFather = aStudyBuilder->NewComponent("GEOM");
     anAttr = aStudyBuilder->FindOrCreateAttribute(aFather, "AttributeName");
@@ -265,7 +262,7 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PublishInStudy(SALOMEDS::Study_ptr   theStudy,
     // recieve current TopoDS shape
     CORBA::String_var entry = aShape->GetEntry();
     HANDLE_NAMESPACE(GEOM_Object) aGShape = HANDLE_NAMESPACE(GEOM_Object)::DownCast
-      ( _impl->GetObject( aShape->GetStudyID(), entry ));
+      ( _impl->GetObject( entry ));
     TopoDS_Shape TopoSh = aGShape->GetValue();
     // find label of main shape
     GEOM::GEOM_Object_var aMainSh = aShape;
@@ -273,7 +270,7 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PublishInStudy(SALOMEDS::Study_ptr   theStudy,
       aMainSh = aMainSh->GetMainShape();
     }
     entry = aMainSh->GetEntry();
-    HANDLE_NAMESPACE(GEOM_BaseObject) anObj = _impl->GetObject( aMainSh->GetStudyID(), entry );
+    HANDLE_NAMESPACE(GEOM_BaseObject) anObj = _impl->GetObject( entry );
     TDF_Label aMainLbl = anObj->GetFunction(1)->GetNamingEntry();
 
     // check all named shapes using iterator
@@ -295,7 +292,7 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PublishInStudy(SALOMEDS::Study_ptr   theStudy,
   // END: try to find existed name for current shape
 
   if ( mytype == GEOM_GROUP ) {
-    GEOM::GEOM_IGroupOperations_var anOp = GetIGroupOperations( theStudy->StudyId() );
+    GEOM::GEOM_IGroupOperations_var anOp = GetIGroupOperations();
     switch ( (TopAbs_ShapeEnum)anOp->GetType( aShape )) {
     case TopAbs_VERTEX:
       aResultSO->SetAttrString("AttributePixMap","ICON_OBJBROWSER_GROUP_PNT" );
@@ -403,7 +400,7 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PublishInStudy(SALOMEDS::Study_ptr   theStudy,
       SALOMEDS::SObject_var obj;
       do {
         anObjectName = aNamePrefix + TCollection_AsciiString(++i);
-        obj = theStudy->FindObject( anObjectName.ToCString() );
+        obj = aStudy->FindObject( anObjectName.ToCString() );
       }
       while ( !obj->_is_nil() );
     }
@@ -426,7 +423,7 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PublishInStudy(SALOMEDS::Study_ptr   theStudy,
   for(int i = 0, n = aSections->length(); i < n; i++) {
     SALOMEDS::ListOfStrings aListOfVars = aSections[i];
     for(int j = 0, m = aListOfVars.length(); j < m; j++) {
-      if(theStudy->IsVariable(aListOfVars[j].in()))
+      if(aStudy->IsVariable(aListOfVars[j].in()))
         aVars += aListOfVars[j].in();
       if(j != m-1)
         aVars += ":";
@@ -452,8 +449,7 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PublishInStudy(SALOMEDS::Study_ptr   theStudy,
 // function : CreateAndPublishGroup
 // purpose  : auxilary for PublishNamedShapesInStudy
 //============================================================================
-void GEOM_Gen_i::CreateAndPublishGroup(SALOMEDS::Study_ptr theStudy,
-                                       GEOM::GEOM_Object_var theMainShape,
+void GEOM_Gen_i::CreateAndPublishGroup(GEOM::GEOM_Object_var theMainShape,
                                        const TopTools_IndexedMapOfShape& anIndices,
                                        const TopTools_SequenceOfShape& SeqS,
                                        const TColStd_SequenceOfAsciiString& SeqN,
@@ -461,15 +457,15 @@ void GEOM_Gen_i::CreateAndPublishGroup(SALOMEDS::Study_ptr theStudy,
                                        GEOM::ListOfGO_var aResList)
 {
   CORBA::String_var entry = theMainShape->GetEntry();
-  //HANDLE_NAMESPACE(GEOM_Object) aMainShape = _impl->GetObject(theMainShape->GetStudyID(), entry);
+  //HANDLE_NAMESPACE(GEOM_Object) aMainShape = _impl->GetObject(entry);
   Handle(TColStd_HArray1OfInteger) anArray;
   if(SeqS.Length()>0) {
     // create a group
-    GEOM::GEOM_IGroupOperations_var GOp = GetIGroupOperations(theStudy->StudyId());
+    GEOM::GEOM_IGroupOperations_var GOp = GetIGroupOperations();
     GEOM::GEOM_Object_wrap GrObj = GOp->CreateGroup( theMainShape, SeqS(1).ShapeType() );
-    AddInStudy(theStudy, GrObj, GrName, theMainShape._retn());
+    AddInStudy(GrObj, GrName, theMainShape._retn());
     //CORBA::String_var GrEntry = GrObj->GetEntry();
-    //HANDLE_NAMESPACE(GEOM_Object) HGrObj = _impl->GetObject(GrObj->GetStudyID(), GrEntry);
+    //HANDLE_NAMESPACE(GEOM_Object) HGrObj = _impl->GetObject(GrEntry);
     // add named objects
     //HANDLE_NAMESPACE(GEOM_Object) anObj;
     for(int i=1; i<=SeqS.Length(); i++) {
@@ -502,8 +498,7 @@ void GEOM_Gen_i::CreateAndPublishGroup(SALOMEDS::Study_ptr theStudy,
 // purpose  :
 //============================================================================
 GEOM::ListOfGO* GEOM_Gen_i::
-            PublishNamedShapesInStudy(SALOMEDS::Study_ptr theStudy,
-                                      //SALOMEDS::SObject_ptr theSObject,
+            PublishNamedShapesInStudy(//SALOMEDS::SObject_ptr theSObject,
                                       CORBA::Object_ptr theObject)
 {
   //Unexpect aCatch(SALOME_SalomeException);
@@ -515,7 +510,7 @@ GEOM::ListOfGO* GEOM_Gen_i::
 
   CORBA::String_var entry = theMainShape->GetEntry();
   HANDLE_NAMESPACE(GEOM_Object) aMainShape = HANDLE_NAMESPACE(GEOM_Object)::DownCast
-    ( _impl->GetObject( theMainShape->GetStudyID(), entry ));
+    ( _impl->GetObject( entry ));
   if (aMainShape.IsNull()) return aResList._retn();
   TopoDS_Shape MainSh = aMainShape->GetValue();
 
@@ -555,16 +550,16 @@ GEOM::ListOfGO* GEOM_Gen_i::
   TopTools_IndexedMapOfShape anIndices;
   TopExp::MapShapes(MainSh, anIndices);
 
-  CreateAndPublishGroup(theStudy, theMainShape, anIndices, SolidSeqS, SolidSeqN,
+  CreateAndPublishGroup(theMainShape, anIndices, SolidSeqS, SolidSeqN,
                         "Group_Of_Named_Solids", aResList);
 
-  CreateAndPublishGroup(theStudy, theMainShape, anIndices, FaceSeqS, FaceSeqN,
+  CreateAndPublishGroup(theMainShape, anIndices, FaceSeqS, FaceSeqN,
                         "Group_Of_Named_Faces", aResList);
 
-  CreateAndPublishGroup(theStudy, theMainShape, anIndices, EdgeSeqS, EdgeSeqN,
+  CreateAndPublishGroup(theMainShape, anIndices, EdgeSeqS, EdgeSeqN,
                         "Group_Of_Named_Edges", aResList);
 
-  CreateAndPublishGroup(theStudy, theMainShape, anIndices, VertSeqS, VertSeqN,
+  CreateAndPublishGroup(theMainShape, anIndices, VertSeqS, VertSeqN,
                         "Group_Of_Named_Vertices", aResList);
 
   return aResList._retn();
@@ -599,7 +594,7 @@ SALOMEDS::TMPFile* GEOM_Gen_i::Save(SALOMEDS::SComponent_ptr theComponent,
   TCollection_AsciiString aNameWithExt("");
   if (isMultiFile)
     aNameWithExt = TCollection_AsciiString((char*)(SALOMEDS_Tool::GetNameFromPath
-                                                   (theComponent->GetStudy()->URL())).c_str());
+                                                   (GetStudy()->URL())).c_str());
 #if OCC_VERSION_MAJOR > 6
   aNameWithExt += TCollection_AsciiString("_GEOM.cbf");
 #else
@@ -609,7 +604,7 @@ SALOMEDS::TMPFile* GEOM_Gen_i::Save(SALOMEDS::SComponent_ptr theComponent,
   // Build a full file name of temporary file
   TCollection_AsciiString aFullName = TCollection_AsciiString((char*)aTmpDir.c_str()) + aNameWithExt;
   // Save GEOM component in this file
-  _impl->Save(theComponent->GetStudy()->StudyId(),(char*) aFullName.ToCString());
+  _impl->Save((char*) aFullName.ToCString());
   // Conver a file to the byte stream
   aStreamFile = SALOMEDS_Tool::PutFilesToStream(aTmpDir.c_str(), aSeq.in(), isMultiFile);
   // Remove the created file and tmp directory
@@ -665,7 +660,7 @@ CORBA::Boolean GEOM_Gen_i::Load(SALOMEDS::SComponent_ptr theComponent,
 
   // Prepare a file name to open
   TCollection_AsciiString aNameWithExt("");
-  SALOMEDS::Study_var study = theComponent->GetStudy();
+  SALOMEDS::Study_var study = GetStudy();
 
 #if OCC_VERSION_MAJOR > 6
   // Get the file name.
@@ -695,7 +690,7 @@ CORBA::Boolean GEOM_Gen_i::Load(SALOMEDS::SComponent_ptr theComponent,
   TCollection_AsciiString aFullName = (TCollection_AsciiString((char*)aTmpDir.c_str()) + aNameWithExt);
 
   // Open document
-  if (!_impl->Load(study->StudyId(),(char*) aFullName.ToCString())) return false;
+  if (!_impl->Load((char*) aFullName.ToCString())) return false;
 
   // Remove the created file and tmp directory
   if (!isMultiFile) SALOMEDS_Tool::RemoveTemporaryFiles(aTmpDir.c_str(), aSeq.in(), true);
@@ -735,10 +730,9 @@ CORBA::Boolean GEOM_Gen_i::LoadASCII(SALOMEDS::SComponent_ptr theComponent,
 // function : Close()
 // purpose  :
 //============================================================================
-void GEOM_Gen_i::Close(SALOMEDS::SComponent_ptr theComponent)
+void GEOM_Gen_i::Close()
 {
-  SALOMEDS::Study_var aStudy= theComponent->GetStudy();
-  _impl->Close(aStudy->StudyId());
+  _impl->Close();
 }
 
 //============================================================================
@@ -805,7 +799,7 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PasteInto(const SALOMEDS::TMPFile& theStream,
                                             CORBA::Long theObjectID,
                                             SALOMEDS::SObject_ptr theObject) {
   // Find the current Study and StudyBuilder
-  SALOMEDS::Study_var aStudy = theObject->GetStudy();
+  SALOMEDS::Study_var aStudy = GetStudy();
   SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
   SALOMEDS::UseCaseBuilder_var anUseCaseBuilder = aStudy->GetUseCaseBuilder();
   SALOMEDS::SObject_var aNewSO;
@@ -826,7 +820,7 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PasteInto(const SALOMEDS::TMPFile& theStream,
 
 
   //Create a new GEOM_Object
-  HANDLE_NAMESPACE(GEOM_Object) anObj = _impl->AddObject(aNewSO->GetStudy()->StudyId(), theObjectID);
+  HANDLE_NAMESPACE(GEOM_Object) anObj = _impl->AddObject(theObjectID);
   HANDLE_NAMESPACE(GEOM_Function) aFunction = anObj->AddFunction(GEOMImpl_CopyDriver::GetID(), COPY_WITHOUT_REF);
   aFunction->SetValue(aTopology);
 
@@ -865,26 +859,26 @@ char* GEOM_Gen_i::ComponentDataType()
 // function : AddInStudy
 // purpose  :
 //============================================================================
-SALOMEDS::SObject_ptr GEOM_Gen_i::AddInStudy (SALOMEDS::Study_ptr       theStudy,
-                                              GEOM::GEOM_BaseObject_ptr theObject,
+SALOMEDS::SObject_ptr GEOM_Gen_i::AddInStudy (GEOM::GEOM_BaseObject_ptr theObject,
                                               const char*               theName,
                                               GEOM::GEOM_BaseObject_ptr theFather)
 {
   SALOMEDS::SObject_var aResultSO;
+  SALOMEDS::Study_var aStudy = GetStudy();
   if(theObject->_is_nil() || theStudy->_is_nil()) return aResultSO;
 
-  SALOMEDS::StudyBuilder_var aStudyBuilder = theStudy->NewBuilder();
+  SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
   CORBA::String_var IOR;
 
   if(!theFather->_is_nil()) {
     IOR = _orb->object_to_string(theFather);
-    SALOMEDS::SObject_wrap aFatherSO = theStudy->FindObjectIOR(IOR.in());
+    SALOMEDS::SObject_wrap aFatherSO = aStudy->FindObjectIOR(IOR.in());
     if(aFatherSO->_is_nil()) return aResultSO._retn();
     aResultSO = aStudyBuilder->NewObject(aFatherSO);
     //aStudyBuilder->Addreference(aResultSO, aResultSO);
   }
 
-  aResultSO = PublishInStudy(theStudy, aResultSO, theObject, theName);
+  aResultSO = PublishInStudy(aResultSO, theObject, theName);
   if(aResultSO->_is_nil()) return aResultSO._retn();
 
   GEOM::ListOfGBO_var aList = theObject->GetDependency();
@@ -897,14 +891,14 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::AddInStudy (SALOMEDS::Study_ptr       theStudy
     GEOM::GEOM_BaseObject_var anObject = aList[i];
     if(anObject->_is_nil()) continue;
     IOR = _orb->object_to_string(anObject);
-    SALOMEDS::SObject_wrap aSO =  theStudy->FindObjectIOR(IOR.in());
+    SALOMEDS::SObject_wrap aSO =  aStudy->FindObjectIOR(IOR.in());
     if(aSO->_is_nil()) continue;
     CORBA::String_var anID = aSO->GetID();
     if ( aPrevID == anID.in() ) continue;
     aPrevID = anID.in();
     SALOMEDS::SObject_wrap aSubSO = aStudyBuilder->NewObject(aResultSO);
     aStudyBuilder->Addreference(aSubSO, aSO);
-    theStudy->GetUseCaseBuilder()->AppendTo( aResultSO, aSubSO );
+    aStudy->GetUseCaseBuilder()->AppendTo( aResultSO, aSubSO );
   }
 
   return aResultSO._retn();
@@ -915,26 +909,26 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::AddInStudy (SALOMEDS::Study_ptr       theStudy
 // purpose  : Publish sub-shapes, standing for arguments and sub-shapes of arguments.
 //            To be used from python scripts out of geompy.addToStudy (non-default usage)
 //============================================================================
-GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapesO (SALOMEDS::Study_ptr     theStudy,
-                                               GEOM::GEOM_Object_ptr   theObject,
+GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapesO (GEOM::GEOM_Object_ptr   theObject,
                                                const GEOM::ListOfGO&   theArgs,
                                                GEOM::find_shape_method theFindMethod,
                                                CORBA::Boolean          theInheritFirstArg,
                                                CORBA::Boolean          theAddPrefix)
 {
   GEOM::ListOfGO_var aParts = new GEOM::ListOfGO;
-  if (CORBA::is_nil(theStudy) || CORBA::is_nil(theObject))
+  SALOMEDS::Study_var aStudy = GetStudy();
+  if (CORBA::is_nil(aStudy) || CORBA::is_nil(theObject))
     return aParts._retn();
 
   // find SObject in the study if it is already published
   CORBA::String_var anIORo = _orb->object_to_string(theObject);
-  SALOMEDS::SObject_var aSO = theStudy->FindObjectIOR(anIORo.in());
+  SALOMEDS::SObject_var aSO = aStudy->FindObjectIOR(anIORo.in());
   //PTv, IMP 0020001, The salome object <aSO>
   // is not obligatory in case of invokation from script
   // if (CORBA::is_nil(aSO))
   //  return aParts._retn();
 
-  aParts = RestoreSubShapes(theStudy, theObject, aSO, theArgs,
+  aParts = RestoreSubShapes(theObject, aSO, theArgs,
                             theFindMethod, theInheritFirstArg, theAddPrefix);
   if (!CORBA::is_nil(aSO)) aSO->UnRegister();
   return aParts._retn();
@@ -945,15 +939,14 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapesO (SALOMEDS::Study_ptr     theStudy,
 // purpose  : Publish sub-shapes, standing for arguments and sub-shapes of arguments.
 //            To be used from python scripts, generated by Dump Python.
 //============================================================================
-GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapesO (SALOMEDS::Study_ptr     theStudy,
-                                                    GEOM::GEOM_Object_ptr   theObject,
+GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapesO (GEOM::GEOM_Object_ptr   theObject,
                                                     const GEOM::ListOfGO&   theArgs,
                                                     GEOM::find_shape_method theFindMethod,
                                                     CORBA::Boolean          theInheritFirstArg,
                                                     CORBA::Boolean          theAddPrefix)
 {
   GEOM::ListOfGO_var aParts = new GEOM::ListOfGO;
-  if (CORBA::is_nil(theStudy) || CORBA::is_nil(theObject))
+  if (CORBA::is_nil(GetStudy()) || CORBA::is_nil(theObject))
     return aParts._retn();
 
   // find SObject in the study if it is already published
@@ -964,7 +957,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapesO (SALOMEDS::Study_ptr     theS
   // if (CORBA::is_nil(aSO))
   //  return aParts._retn();
 
-  aParts = RestoreGivenSubShapes(theStudy, theObject, aSO, theArgs,
+  aParts = RestoreGivenSubShapes(theObject, aSO, theArgs,
                                  theFindMethod, theInheritFirstArg, theAddPrefix);
   if (!CORBA::is_nil(aSO)) aSO->UnRegister();
   return aParts._retn();
@@ -975,15 +968,14 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapesO (SALOMEDS::Study_ptr     theS
 // purpose  : Publish sub-shapes, standing for arguments and sub-shapes of arguments.
 //            To be used from GUI and from geompy.addToStudy
 //============================================================================
-GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapesSO (SALOMEDS::Study_ptr     theStudy,
-                                                SALOMEDS::SObject_ptr   theSObject,
+GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapesSO (SALOMEDS::SObject_ptr   theSObject,
                                                 const GEOM::ListOfGO&   theArgs,
                                                 GEOM::find_shape_method theFindMethod,
                                                 CORBA::Boolean          theInheritFirstArg,
                                                 CORBA::Boolean          theAddPrefix)
 {
   GEOM::ListOfGO_var aParts = new GEOM::ListOfGO;
-  if (CORBA::is_nil(theStudy) || CORBA::is_nil(theSObject))
+  if (CORBA::is_nil(GetStudy()) || CORBA::is_nil(theSObject))
     return aParts._retn();
 
   SALOMEDS::GenericAttribute_var anAttr;
@@ -998,7 +990,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapesSO (SALOMEDS::Study_ptr     theStudy
   if (CORBA::is_nil(anO))
     return aParts._retn();
 
-  aParts = RestoreSubShapes(theStudy, anO, theSObject, theArgs,
+  aParts = RestoreSubShapes(anO, theSObject, theArgs,
                             theFindMethod, theInheritFirstArg, theAddPrefix);
   return aParts._retn();
 }
@@ -1034,8 +1026,7 @@ static void addToListOfGO( const GEOM::ListOfGO& theSrcList,
 // purpose  : Private method. Works only if both theObject and theSObject
 //            are defined, and does not check, if they correspond to each other.
 //============================================================================
-GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapes(SALOMEDS::Study_ptr     theStudy,
-                                             GEOM::GEOM_Object_ptr   theObject,
+GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapes(GEOM::GEOM_Object_ptr   theObject,
                                              SALOMEDS::SObject_ptr   theSObject,
                                              const GEOM::ListOfGO&   theArgs,
                                              GEOM::find_shape_method theFindMethod,
@@ -1043,9 +1034,10 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapes(SALOMEDS::Study_ptr     theStudy,
                                              CORBA::Boolean          theAddPrefix)
 {
   GEOM::ListOfGO_var aParts = new GEOM::ListOfGO;
+  SALOMEDS::Study_var aStudy = GetStudy();
   //PTv, IMP 0020001, The salome object <theSObject>
   //     is not obligatory in case of invokation from script
-  if (CORBA::is_nil(theStudy) || CORBA::is_nil(theObject) /*|| CORBA::is_nil(theSObject)*/)
+  if (CORBA::is_nil(aStudy) || CORBA::is_nil(theObject) /*|| CORBA::is_nil(theSObject)*/)
     return aParts._retn();
 
   // For Dump Python (mantis issue 0020768)
@@ -1084,12 +1076,12 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapes(SALOMEDS::Study_ptr     theStudy,
     // but only reconstruct its published sub-shapes
 
     CORBA::String_var anIOR = _orb->object_to_string(aList[0]);
-    SALOMEDS::SObject_var anArgSO = theStudy->FindObjectIOR(anIOR.in());
+    SALOMEDS::SObject_var anArgSO = aStudy->FindObjectIOR(anIOR.in());
 
     // remember restored objects for Python Dump
     addToListOfGO(aList[0], anOutArgs);
 
-    aParts = RestoreSubShapesOneLevel(theStudy, anArgSO, theSObject, theObject,
+    aParts = RestoreSubShapesOneLevel(anArgSO, theSObject, theObject,
                                       anOutArgs, theFindMethod, theAddPrefix);
 
     // set the color of the transformed shape to the color of initial shape
@@ -1105,22 +1097,22 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapes(SALOMEDS::Study_ptr     theStudy,
   }
   else {
     // Get interface, containing method, which we will use to reconstruct sub-shapes
-    GEOM::GEOM_IShapesOperations_var  aShapesOp = GetIShapesOperations(theStudy->StudyId());
-    GEOM::GEOM_IGroupOperations_var    aGroupOp = GetIGroupOperations(theStudy->StudyId());
-    GEOM::GEOM_ITransformOperations_var aTrsfOp = GetITransformOperations(theStudy->StudyId());
+    GEOM::GEOM_IShapesOperations_var  aShapesOp = GetIShapesOperations();
+    GEOM::GEOM_IGroupOperations_var    aGroupOp = GetIGroupOperations();
+    GEOM::GEOM_ITransformOperations_var aTrsfOp = GetITransformOperations();
 
     PortableServer::Servant aServant = _poa->reference_to_servant(aTrsfOp.in());
     GEOM_ITransformOperations_i*      aTrsfOpSv = dynamic_cast<GEOM_ITransformOperations_i*>(aServant);
 
     // Reconstruct arguments and tree of sub-shapes of the arguments
     CORBA::String_var anIOR;
-    SALOMEDS::StudyBuilder_var aStudyBuilder = theStudy->NewBuilder();
+    SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
     for (Standard_Integer i = 0; i < aLength; i++)
     {
       GEOM::GEOM_Object_var anArgO = aList[i];
       if (!CORBA::is_nil(anArgO)) {
         anIOR = _orb->object_to_string(anArgO);
-        SALOMEDS::SObject_var anArgSO = theStudy->FindObjectIOR(anIOR.in());
+        SALOMEDS::SObject_var anArgSO = aStudy->FindObjectIOR(anIOR.in());
         TCollection_AsciiString anArgName;
         if (CORBA::is_nil(anArgSO)) {
           anArgName = "arg_";
@@ -1145,7 +1137,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapes(SALOMEDS::Study_ptr     theStudy,
             GEOM::GEOM_Object_var anArgOTrsf = aTrsfOpSv->TransformLikeOtherCopy(anArgO, theObject);
             if (!CORBA::is_nil(anArgOTrsf)) {
               CORBA::String_var anArgOTrsfEntry = anArgOTrsf->GetEntry();
-              HANDLE_NAMESPACE(GEOM_BaseObject) anArgOTrsfImpl = _impl->GetObject(anArgOTrsf->GetStudyID(), anArgOTrsfEntry);
+              HANDLE_NAMESPACE(GEOM_BaseObject) anArgOTrsfImpl = _impl->GetObject(anArgOTrsfEntry);
               HANDLE_NAMESPACE(GEOM_Function) anArgOTrsfFun = anArgOTrsfImpl->GetLastFunction();
               anArgOTrsfFun->SetDescription("");
               aSubO = aShapesOp->GetInPlace(theObject, anArgOTrsf);
@@ -1154,7 +1146,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapes(SALOMEDS::Study_ptr     theStudy,
             HANDLE_NAMESPACE(GEOM_Function) anOFun = theObject->GetLastFunction();
             if (!anOFun.IsNull()) {
               CORBA::String_var entryArg = anArgO->GetEntry();
-              HANDLE_NAMESPACE(GEOM_Object) anArgOImpl = _impl->GetObject(anArgO->GetStudyID(), entryArg);
+              HANDLE_NAMESPACE(GEOM_Object) anArgOImpl = _impl->GetObject(entryArg);
               if (!anArgOImpl.IsNull()) {
                 TopoDS_Shape anArgOShape = anArgOImpl->GetValue();
                 TopoDS_Shape aMultiArgShape;
@@ -1252,7 +1244,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapes(SALOMEDS::Study_ptr     theStudy,
             }
             aSubName += anArgName;
             aSubSO = aStudyBuilder->NewObject(theSObject);
-            aSubSO = PublishInStudy(theStudy, aSubSO, aSubO, aSubName.ToCString());
+            aSubSO = PublishInStudy(aSubSO, aSubO, aSubName.ToCString());
             // Restore color
             aSubO->SetColor(anArgO->GetColor());
             // set the texture
@@ -1268,10 +1260,10 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapes(SALOMEDS::Study_ptr     theStudy,
             GEOM::ListOfGO_var aSubParts;
             if (theFindMethod == GEOM::FSM_GetInPlaceByHistory)
               // pass theObject, because only it has the history
-              aSubParts = RestoreSubShapesOneLevel(theStudy, anArgSO, aSubSO,
+              aSubParts = RestoreSubShapesOneLevel(anArgSO, aSubSO,
                                                    theObject, anOutArgs, theFindMethod, theAddPrefix);
             else
-              aSubParts = RestoreSubShapesOneLevel(theStudy, anArgSO, aSubSO,
+              aSubParts = RestoreSubShapesOneLevel(anArgSO, aSubSO,
                                                    aSubO, anOutArgs, theFindMethod, theAddPrefix);
             // add to parts list
             addToListOfGO( aSubParts, aParts );
@@ -1285,7 +1277,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapes(SALOMEDS::Study_ptr     theStudy,
 
             // Restore published sub-shapes of the argument
             GEOM::ListOfGO_var aSubParts =
-              RestoreSubShapesOneLevel(theStudy, anArgSO, aSubSO,
+              RestoreSubShapesOneLevel(anArgSO, aSubSO,
                                        theObject, anOutArgs, theFindMethod, theAddPrefix);
 
             // add to parts list
@@ -1312,7 +1304,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapes(SALOMEDS::Study_ptr     theStudy,
                   aSubName = "from_parts_of_";
                 }
                 aSubName += anArgName;
-                aSubSO = PublishInStudy(theStudy, aSubSO, aSubO, aSubName.ToCString());
+                aSubSO = PublishInStudy(aSubSO, aSubO, aSubName.ToCString());
                 // Restore color
                 aSubO->SetColor(anArgO->GetColor());
                 // set the texture
@@ -1340,7 +1332,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapes(SALOMEDS::Study_ptr     theStudy,
   aResParts->length(nb);
   if (nb > 0)
   {
-    HANDLE_NAMESPACE(GEOM_BaseObject) aMainObj = _impl->GetObject(theObject->GetStudyID(), theObject->GetEntry());
+    HANDLE_NAMESPACE(GEOM_BaseObject) aMainObj = _impl->GetObject(theObject->GetEntry());
     HANDLE_NAMESPACE(GEOM_Function) aFunction = aMainObj->GetLastFunction();
     GEOM::TPythonDump pd (aFunction, true);
     pd <<"[";
@@ -1356,7 +1348,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapes(SALOMEDS::Study_ptr     theStudy,
       anObjEntryMap.insert(anEntry);
       aResParts[nbRes++] = anObj;
       // clear python dump of object
-      HANDLE_NAMESPACE(GEOM_BaseObject) aGeomObj = _impl->GetObject(anObj->GetStudyID(), anEntry);
+      HANDLE_NAMESPACE(GEOM_BaseObject) aGeomObj = _impl->GetObject(anEntry);
       HANDLE_NAMESPACE(GEOM_Function)   anObjFun = aGeomObj->GetLastFunction();
       if ( !anObjFun.IsNull() )
         anObjFun->SetDescription( "" );
@@ -1374,7 +1366,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapes(SALOMEDS::Study_ptr     theStudy,
       GEOM::GEOM_Object_var anObj = anOutArgs[ i ];
       if (CORBA::is_nil(anObj))
         continue;
-      HANDLE_NAMESPACE(GEOM_BaseObject) aGeomObj = _impl->GetObject(anObj->GetStudyID(), anObj->GetEntry());
+      HANDLE_NAMESPACE(GEOM_BaseObject) aGeomObj = _impl->GetObject(anObj->GetEntry());
       if ( j > 0 )
         pd << ", ";
       pd << aGeomObj;
@@ -1406,8 +1398,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapes(SALOMEDS::Study_ptr     theStudy,
 // function : RestoreSubShapesOneLevel
 // purpose  : Private method
 //============================================================================
-GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapesOneLevel (SALOMEDS::Study_ptr     theStudy,
-                                                      SALOMEDS::SObject_ptr   theOldSO,
+GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapesOneLevel (SALOMEDS::SObject_ptr   theOldSO,
                                                       SALOMEDS::SObject_ptr   theNewSO,
                                                       GEOM::GEOM_Object_ptr   theNewO,
                                                       GEOM::ListOfGO&         theOutArgs,
@@ -1415,24 +1406,25 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapesOneLevel (SALOMEDS::Study_ptr     th
                                                       CORBA::Boolean          theAddPrefix)
 {
   int i = 0;
+  SALOMEDS::Study_var aStudy = GetStudy();
   GEOM::ListOfGO_var aParts = new GEOM::ListOfGO;
   GEOM::ListOfGO_var aNewParts = new GEOM::ListOfGO;
-  if (CORBA::is_nil(theStudy) || CORBA::is_nil(theOldSO) ||
+  if (CORBA::is_nil(aStudy) || CORBA::is_nil(theOldSO) ||
       CORBA::is_nil(theNewO) /*|| CORBA::is_nil(theNewSO)*/)
     return aParts._retn();
 
-  SALOMEDS::StudyBuilder_var aStudyBuilder = theStudy->NewBuilder();
+  SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
 
   // Get interface, containing method, which we will use to reconstruct sub-shapes
-  GEOM::GEOM_IShapesOperations_var  aShapesOp = GetIShapesOperations(theStudy->StudyId());
-  GEOM::GEOM_IGroupOperations_var    aGroupOp = GetIGroupOperations(theStudy->StudyId());
-  GEOM::GEOM_ITransformOperations_var aTrsfOp = GetITransformOperations(theStudy->StudyId());
+  GEOM::GEOM_IShapesOperations_var  aShapesOp = GetIShapesOperations();
+  GEOM::GEOM_IGroupOperations_var    aGroupOp = GetIGroupOperations();
+  GEOM::GEOM_ITransformOperations_var aTrsfOp = GetITransformOperations();
 
   PortableServer::Servant aServant = _poa->reference_to_servant(aTrsfOp.in());
   GEOM_ITransformOperations_i*      aTrsfOpSv = dynamic_cast<GEOM_ITransformOperations_i*>(aServant);
 
   // Reconstruct published sub-shapes
-  SALOMEDS::ChildIterator_var it = theStudy->NewChildIterator(theOldSO);
+  SALOMEDS::ChildIterator_var it = aStudy->NewChildIterator(theOldSO);
 
   int aLen = 0;
   for (it->Init(); it->More(); it->Next()) {
@@ -1466,7 +1458,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapesOneLevel (SALOMEDS::Study_ptr     th
             GEOM::GEOM_Object_var anArgOTrsf = aTrsfOpSv->TransformLikeOtherCopy(anOldSubO, theNewO);
             if (!CORBA::is_nil(anArgOTrsf)) {
               CORBA::String_var anArgOTrsfEntry = anArgOTrsf->GetEntry();
-              HANDLE_NAMESPACE(GEOM_BaseObject) anArgOTrsfImpl = _impl->GetObject(anArgOTrsf->GetStudyID(), anArgOTrsfEntry);
+              HANDLE_NAMESPACE(GEOM_BaseObject) anArgOTrsfImpl = _impl->GetObject(anArgOTrsfEntry);
               HANDLE_NAMESPACE(GEOM_Function) anArgOTrsfFun = anArgOTrsfImpl->GetLastFunction();
               anArgOTrsfFun->SetDescription("");
               aNewSubO = aShapesOp->GetInPlace(theNewO, anArgOTrsf);
@@ -1531,7 +1523,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapesOneLevel (SALOMEDS::Study_ptr     th
             }
             aSubName += anArgName;
             aNewSubSO = aStudyBuilder->NewObject(theNewSO);
-            aNewSubSO = PublishInStudy(theStudy, aNewSubSO, aNewSubO, aSubName.ToCString());
+            aNewSubSO = PublishInStudy(aNewSubSO, aNewSubO, aSubName.ToCString());
             // Restore color
             aNewSubO->SetColor(anOldSubO->GetColor());
             // set the texture
@@ -1545,10 +1537,10 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapesOneLevel (SALOMEDS::Study_ptr     th
           GEOM::ListOfGO_var aSubParts;
           if (theFindMethod == GEOM::FSM_GetInPlaceByHistory)
             // pass the main shape as Object, because only it has the history
-            aSubParts = RestoreSubShapesOneLevel(theStudy, anOldSubSO, aNewSubSO,
+            aSubParts = RestoreSubShapesOneLevel(anOldSubSO, aNewSubSO,
                                                  theNewO, theOutArgs, theFindMethod, theAddPrefix);
           else
-            aSubParts = RestoreSubShapesOneLevel(theStudy, anOldSubSO, aNewSubSO,
+            aSubParts = RestoreSubShapesOneLevel(anOldSubSO, aNewSubSO,
                                                  aNewSubO, theOutArgs, theFindMethod, theAddPrefix);
           // add to parts list
           addToListOfGO( aSubParts, aNewParts );
@@ -1560,7 +1552,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapesOneLevel (SALOMEDS::Study_ptr     th
 
           // Restore published sub-shapes of the argument
           GEOM::ListOfGO_var aSubParts =
-            RestoreSubShapesOneLevel(theStudy, anOldSubSO, aNewSubSO,
+            RestoreSubShapesOneLevel(anOldSubSO, aNewSubSO,
                                      theNewO, theOutArgs, theFindMethod, theAddPrefix);
           // add to parts list
           addToListOfGO( aSubParts, aNewParts );
@@ -1592,7 +1584,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapesOneLevel (SALOMEDS::Study_ptr     th
                   aSubName = "from_parts_of_";
                 }
                 aSubName += anArgName;
-                aNewSubSO = PublishInStudy(theStudy, aNewSubSO, aNewSubO, aSubName.ToCString());
+                aNewSubSO = PublishInStudy(aNewSubSO, aNewSubO, aSubName.ToCString());
                 // Restore color
                 aNewSubO->SetColor(anOldSubO->GetColor());
                 // set the texture
@@ -1626,8 +1618,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapesOneLevel (SALOMEDS::Study_ptr     th
 //            List theArgs in this case contains not only operation arguments,
 //            but also all subshapes, which must be published.
 //============================================================================
-GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapes(SALOMEDS::Study_ptr     theStudy,
-                                                  GEOM::GEOM_Object_ptr   theObject,
+GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapes(GEOM::GEOM_Object_ptr   theObject,
                                                   SALOMEDS::SObject_ptr   theSObject,
                                                   const GEOM::ListOfGO&   theArgs,
                                                   GEOM::find_shape_method theFindMethod,
@@ -1635,9 +1626,10 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapes(SALOMEDS::Study_ptr     theStu
                                                   CORBA::Boolean          theAddPrefix)
 {
   GEOM::ListOfGO_var aParts = new GEOM::ListOfGO;
+  SALOMEDS::Study_var aStudy = GetStudy();
   //PTv, IMP 0020001, The salome object <theSObject>
   //     is not obligatory in case of invokation from script
-  if (CORBA::is_nil(theStudy) || CORBA::is_nil(theObject) /*|| CORBA::is_nil(theSObject)*/)
+  if (CORBA::is_nil(aStudy) || CORBA::is_nil(theObject) /*|| CORBA::is_nil(theSObject)*/)
     return aParts._retn();
 
   // If theArgs list is empty, nothing to do
@@ -1684,9 +1676,9 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapes(SALOMEDS::Study_ptr     theStu
     // but only reconstruct its published sub-shapes
 
     CORBA::String_var anIOR = _orb->object_to_string(aList[0]);
-    SALOMEDS::SObject_var anArgSO = theStudy->FindObjectIOR(anIOR.in());
+    SALOMEDS::SObject_var anArgSO = aStudy->FindObjectIOR(anIOR.in());
 
-    aParts = RestoreGivenSubShapesOneLevel(theStudy, anArgSO, theSObject, theObject,
+    aParts = RestoreGivenSubShapesOneLevel(anArgSO, theSObject, theObject,
                                            anArgs, theFindMethod, theAddPrefix);
 
     // set the color of the transformed shape to the color of initial shape
@@ -1702,22 +1694,22 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapes(SALOMEDS::Study_ptr     theStu
   }
   else {
     // Get interface, containing method, which we will use to reconstruct sub-shapes
-    GEOM::GEOM_IShapesOperations_var  aShapesOp = GetIShapesOperations(theStudy->StudyId());
-    GEOM::GEOM_IGroupOperations_var    aGroupOp = GetIGroupOperations(theStudy->StudyId());
-    GEOM::GEOM_ITransformOperations_var aTrsfOp = GetITransformOperations(theStudy->StudyId());
+    GEOM::GEOM_IShapesOperations_var  aShapesOp = GetIShapesOperations();
+    GEOM::GEOM_IGroupOperations_var    aGroupOp = GetIGroupOperations();
+    GEOM::GEOM_ITransformOperations_var aTrsfOp = GetITransformOperations();
 
     PortableServer::Servant aServant = _poa->reference_to_servant(aTrsfOp.in());
     GEOM_ITransformOperations_i*      aTrsfOpSv = dynamic_cast<GEOM_ITransformOperations_i*>(aServant);
 
     // Reconstruct arguments and tree of sub-shapes of the arguments
     CORBA::String_var anIOR;
-    SALOMEDS::StudyBuilder_var aStudyBuilder = theStudy->NewBuilder();
+    SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
     for (Standard_Integer i = 0; i < nbArgsActual; i++)
     {
       GEOM::GEOM_Object_var anArgO = aList[i];
       if (!CORBA::is_nil(anArgO)) {
         anIOR = _orb->object_to_string(anArgO);
-        SALOMEDS::SObject_var anArgSO = theStudy->FindObjectIOR(anIOR.in());
+        SALOMEDS::SObject_var anArgSO = aStudy->FindObjectIOR(anIOR.in());
         TCollection_AsciiString anArgName;
         if (CORBA::is_nil(anArgSO)) {
           anArgName = "arg_";
@@ -1742,7 +1734,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapes(SALOMEDS::Study_ptr     theStu
             GEOM::GEOM_Object_var anArgOTrsf = aTrsfOpSv->TransformLikeOtherCopy(anArgO, theObject);
             if (!CORBA::is_nil(anArgOTrsf)) {
               CORBA::String_var anArgOTrsfEntry = anArgOTrsf->GetEntry();
-              HANDLE_NAMESPACE(GEOM_BaseObject) anArgOTrsfImpl = _impl->GetObject(anArgOTrsf->GetStudyID(), anArgOTrsfEntry);
+              HANDLE_NAMESPACE(GEOM_BaseObject) anArgOTrsfImpl = _impl->GetObject(anArgOTrsfEntry);
               HANDLE_NAMESPACE(GEOM_Function) anArgOTrsfFun = anArgOTrsfImpl->GetLastFunction();
               anArgOTrsfFun->SetDescription("");
               aSubO = aShapesOp->GetInPlace(theObject, anArgOTrsf);
@@ -1801,7 +1793,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapes(SALOMEDS::Study_ptr     theStu
             }
             aSubName += anArgName;
             aSubSO = aStudyBuilder->NewObject(theSObject);
-            aSubSO = PublishInStudy(theStudy, aSubSO, aSubO, aSubName.ToCString());
+            aSubSO = PublishInStudy(aSubSO, aSubO, aSubName.ToCString());
             // Restore color
             aSubO->SetColor(anArgO->GetColor());
             // set the texture
@@ -1817,10 +1809,10 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapes(SALOMEDS::Study_ptr     theStu
             GEOM::ListOfGO_var aSubParts;
             if (theFindMethod == GEOM::FSM_GetInPlaceByHistory)
               // pass theObject, because only it has the history
-              aSubParts = RestoreGivenSubShapesOneLevel(theStudy, anArgSO, aSubSO,
+              aSubParts = RestoreGivenSubShapesOneLevel(anArgSO, aSubSO,
                                                         theObject, anArgs, theFindMethod, theAddPrefix);
             else
-              aSubParts = RestoreGivenSubShapesOneLevel(theStudy, anArgSO, aSubSO,
+              aSubParts = RestoreGivenSubShapesOneLevel(anArgSO, aSubSO,
                                                         aSubO, anArgs, theFindMethod, theAddPrefix);
             // add to parts list
             addToListOfGO( aSubParts, aParts );
@@ -1834,7 +1826,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapes(SALOMEDS::Study_ptr     theStu
 
             // Restore published sub-shapes of the argument
             GEOM::ListOfGO_var aSubParts =
-              RestoreGivenSubShapesOneLevel(theStudy, anArgSO, aSubSO,
+              RestoreGivenSubShapesOneLevel(anArgSO, aSubSO,
                                             theObject, anArgs, theFindMethod, theAddPrefix);
 
             // add to parts list
@@ -1858,7 +1850,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapes(SALOMEDS::Study_ptr     theStu
                   aSubName = "from_parts_of_";
                 }
                 aSubName += anArgName;
-                aSubSO = PublishInStudy(theStudy, aSubSO, aSubO, aSubName.ToCString());
+                aSubSO = PublishInStudy(aSubSO, aSubO, aSubName.ToCString());
                 // Restore color
                 aSubO->SetColor(anArgO->GetColor());
                 // set the texture
@@ -1886,7 +1878,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapes(SALOMEDS::Study_ptr     theStu
   aResParts->length(nb);
   if (nb > 0)
   {
-    HANDLE_NAMESPACE(GEOM_BaseObject) aMainObj = _impl->GetObject(theObject->GetStudyID(), theObject->GetEntry());
+    HANDLE_NAMESPACE(GEOM_BaseObject) aMainObj = _impl->GetObject(theObject->GetEntry());
     HANDLE_NAMESPACE(GEOM_Function) aFunction = aMainObj->GetLastFunction();
     GEOM::TPythonDump pd (aFunction, true);
     pd <<"[";
@@ -1902,7 +1894,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapes(SALOMEDS::Study_ptr     theStu
       anObjEntryMap.insert(anEntry);
       aResParts[nbRes++] = anObj;
       // clear python dump of object
-      HANDLE_NAMESPACE(GEOM_BaseObject) aGeomObj = _impl->GetObject(anObj->GetStudyID(), anEntry);
+      HANDLE_NAMESPACE(GEOM_BaseObject) aGeomObj = _impl->GetObject(anEntry);
       HANDLE_NAMESPACE(GEOM_Function)   anObjFun = aGeomObj->GetLastFunction();
       if ( !anObjFun.IsNull() )
         anObjFun->SetDescription( "" );
@@ -1918,7 +1910,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapes(SALOMEDS::Study_ptr     theStu
       GEOM::GEOM_Object_var anObj = theArgs[ i ];
       if (CORBA::is_nil(anObj))
         continue;
-      HANDLE_NAMESPACE(GEOM_BaseObject) aGeomObj = _impl->GetObject(anObj->GetStudyID(), anObj->GetEntry());
+      HANDLE_NAMESPACE(GEOM_BaseObject) aGeomObj = _impl->GetObject(anObj->GetEntry());
       if ( j > 0 )
         pd << ", ";
       pd << aGeomObj;
@@ -1950,8 +1942,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapes(SALOMEDS::Study_ptr     theStu
 // function : RestoreGivenSubShapesOneLevel
 // purpose  : Private method
 //============================================================================
-GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapesOneLevel (SALOMEDS::Study_ptr     theStudy,
-                                                           SALOMEDS::SObject_ptr   theOldSO,
+GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapesOneLevel (SALOMEDS::SObject_ptr   theOldSO,
                                                            SALOMEDS::SObject_ptr   theNewSO,
                                                            GEOM::GEOM_Object_ptr   theNewO,
                                                            std::set<std::string>   theArgs,
@@ -1959,24 +1950,25 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapesOneLevel (SALOMEDS::Study_ptr
                                                            CORBA::Boolean          theAddPrefix)
 {
   int i = 0;
+  SALOMEDS::Study_var aStudy = GetStudy();
   GEOM::ListOfGO_var aParts = new GEOM::ListOfGO;
   GEOM::ListOfGO_var aNewParts = new GEOM::ListOfGO;
-  if (CORBA::is_nil(theStudy) || CORBA::is_nil(theOldSO) ||
+  if (CORBA::is_nil(aStudy) || CORBA::is_nil(theOldSO) ||
       CORBA::is_nil(theNewO) /*|| CORBA::is_nil(theNewSO)*/)
     return aParts._retn();
 
-  SALOMEDS::StudyBuilder_var aStudyBuilder = theStudy->NewBuilder();
+  SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
 
   // Get interface, containing method, which we will use to reconstruct sub-shapes
-  GEOM::GEOM_IShapesOperations_var  aShapesOp = GetIShapesOperations(theStudy->StudyId());
-  GEOM::GEOM_IGroupOperations_var    aGroupOp = GetIGroupOperations(theStudy->StudyId());
-  GEOM::GEOM_ITransformOperations_var aTrsfOp = GetITransformOperations(theStudy->StudyId());
+  GEOM::GEOM_IShapesOperations_var  aShapesOp = GetIShapesOperations();
+  GEOM::GEOM_IGroupOperations_var    aGroupOp = GetIGroupOperations();
+  GEOM::GEOM_ITransformOperations_var aTrsfOp = GetITransformOperations();
 
   PortableServer::Servant aServant = _poa->reference_to_servant(aTrsfOp.in());
   GEOM_ITransformOperations_i*      aTrsfOpSv = dynamic_cast<GEOM_ITransformOperations_i*>(aServant);
 
   // Reconstruct published sub-shapes
-  SALOMEDS::ChildIterator_var it = theStudy->NewChildIterator(theOldSO);
+  SALOMEDS::ChildIterator_var it = aStudy->NewChildIterator(theOldSO);
 
   int aLen = 0;
   for (it->Init(); it->More(); it->Next()) {
@@ -2018,7 +2010,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapesOneLevel (SALOMEDS::Study_ptr
             GEOM::GEOM_Object_var anArgOTrsf = aTrsfOpSv->TransformLikeOtherCopy(anOldSubO, theNewO);
             if (!CORBA::is_nil(anArgOTrsf)) {
               CORBA::String_var anArgOTrsfEntry = anArgOTrsf->GetEntry();
-              HANDLE_NAMESPACE(GEOM_BaseObject) anArgOTrsfImpl = _impl->GetObject(anArgOTrsf->GetStudyID(), anArgOTrsfEntry);
+              HANDLE_NAMESPACE(GEOM_BaseObject) anArgOTrsfImpl = _impl->GetObject(anArgOTrsfEntry);
               HANDLE_NAMESPACE(GEOM_Function) anArgOTrsfFun = anArgOTrsfImpl->GetLastFunction();
               anArgOTrsfFun->SetDescription("");
               aNewSubO = aShapesOp->GetInPlace(theNewO, anArgOTrsf);
@@ -2080,7 +2072,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapesOneLevel (SALOMEDS::Study_ptr
             }
             aSubName += anArgName;
             aNewSubSO = aStudyBuilder->NewObject(theNewSO);
-            aNewSubSO = PublishInStudy(theStudy, aNewSubSO, aNewSubO, aSubName.ToCString());
+            aNewSubSO = PublishInStudy(aNewSubSO, aNewSubO, aSubName.ToCString());
             // Restore color
             aNewSubO->SetColor(anOldSubO->GetColor());
             // set the texture
@@ -2094,10 +2086,10 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapesOneLevel (SALOMEDS::Study_ptr
           GEOM::ListOfGO_var aSubParts;
           if (theFindMethod == GEOM::FSM_GetInPlaceByHistory)
             // pass the main shape as Object, because only it has the history
-            aSubParts = RestoreGivenSubShapesOneLevel(theStudy, anOldSubSO, aNewSubSO,
+            aSubParts = RestoreGivenSubShapesOneLevel(anOldSubSO, aNewSubSO,
                                                       theNewO, theArgs, theFindMethod, theAddPrefix);
           else
-            aSubParts = RestoreGivenSubShapesOneLevel(theStudy, anOldSubSO, aNewSubSO,
+            aSubParts = RestoreGivenSubShapesOneLevel(anOldSubSO, aNewSubSO,
                                                       aNewSubO, theArgs, theFindMethod, theAddPrefix);
           // add to parts list
           addToListOfGO( aSubParts, aNewParts );
@@ -2109,7 +2101,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapesOneLevel (SALOMEDS::Study_ptr
 
           // Restore published sub-shapes of the argument
           GEOM::ListOfGO_var aSubParts =
-            RestoreGivenSubShapesOneLevel(theStudy, anOldSubSO, aNewSubSO,
+            RestoreGivenSubShapesOneLevel(anOldSubSO, aNewSubSO,
                                           theNewO, theArgs, theFindMethod, theAddPrefix);
           // add to parts list
           addToListOfGO( aSubParts, aNewParts );
@@ -2138,7 +2130,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapesOneLevel (SALOMEDS::Study_ptr
                   aSubName = "from_parts_of_";
                 }
                 aSubName += anArgName;
-                aNewSubSO = PublishInStudy(theStudy, aNewSubSO, aNewSubO, aSubName.ToCString());
+                aNewSubSO = PublishInStudy(aNewSubSO, aNewSubO, aSubName.ToCString());
                 // Restore color
                 aNewSubO->SetColor(anOldSubO->GetColor());
                 // set the texture
@@ -2175,29 +2167,40 @@ void GEOM_Gen_i::register_name(char * name)
   name_service->Register(g, name);
 }
 
+//============================================================================
+// function : GetStudy()
+// purpose  : Get Study
+//============================================================================
+SALOMEDS::Study_var GEOM_Gen_i::GetStudy()
+{
+  CORBA::Object_var aStudyObject = name_service->Resolve( "/Study" );
+  SALOMEDS::Study_var aStudy = SALOMEDS::Study::_narrow( aStudyObject );
+  return aStudy;
+}
+
 //============================================================================
 // function : Undo
 // purpose  :
 //============================================================================
-void GEOM_Gen_i::Undo(CORBA::Long theStudyID)
+void GEOM_Gen_i::Undo()
 {
-  _impl->Undo(theStudyID);
+  _impl->Undo();
 }
 
 //============================================================================
 // function : Redo
 // purpose  :
 //============================================================================
-void GEOM_Gen_i::Redo(CORBA::Long theStudyID)
+void GEOM_Gen_i::Redo()
 {
-  _impl->Redo(theStudyID);
+  _impl->Redo();
 }
 
 //============================================================================
 // function : GetIBasicOperations
 // purpose  :
 //============================================================================
-GEOM::GEOM_IBasicOperations_ptr GEOM_Gen_i::GetIBasicOperations(CORBA::Long theStudyID)
+GEOM::GEOM_IBasicOperations_ptr GEOM_Gen_i::GetIBasicOperations()
      throw ( SALOME::SALOME_Exception )
 {
   Unexpect aCatch(SALOME_SalomeException);
@@ -2207,7 +2210,7 @@ GEOM::GEOM_IBasicOperations_ptr GEOM_Gen_i::GetIBasicOperations(CORBA::Long theS
 
   //transfer reference on engine
   GEOM_IBasicOperations_i* aServant =
-    new GEOM_IBasicOperations_i(_poa, engine, _impl->GetIBasicOperations(theStudyID));
+    new GEOM_IBasicOperations_i(_poa, engine, _impl->GetIBasicOperations());
 
   PortableServer::ObjectId_var id = _poa->activate_object(aServant);
   // activate the CORBA servant
@@ -2219,7 +2222,7 @@ GEOM::GEOM_IBasicOperations_ptr GEOM_Gen_i::GetIBasicOperations(CORBA::Long theS
 // function : GetITransformOperations
 // purpose  :
 //============================================================================
-GEOM::GEOM_ITransformOperations_ptr GEOM_Gen_i::GetITransformOperations(CORBA::Long theStudyID)
+GEOM::GEOM_ITransformOperations_ptr GEOM_Gen_i::GetITransformOperations()
      throw ( SALOME::SALOME_Exception )
 {
   Unexpect aCatch(SALOME_SalomeException);
@@ -2228,7 +2231,7 @@ GEOM::GEOM_ITransformOperations_ptr GEOM_Gen_i::GetITransformOperations(CORBA::L
   GEOM::GEOM_Gen_ptr engine = _this();
 
   GEOM_ITransformOperations_i* aServant =
-    new GEOM_ITransformOperations_i(_poa, engine, _impl->GetITransformOperations(theStudyID));
+    new GEOM_ITransformOperations_i(_poa, engine, _impl->GetITransformOperations());
 
   // activate the CORBA servant
   GEOM::GEOM_ITransformOperations_var operations = aServant->_this();
@@ -2239,7 +2242,7 @@ GEOM::GEOM_ITransformOperations_ptr GEOM_Gen_i::GetITransformOperations(CORBA::L
 // function : GetI3DPrimOperations
 // purpose  :
 //============================================================================
-GEOM::GEOM_I3DPrimOperations_ptr GEOM_Gen_i::GetI3DPrimOperations(CORBA::Long theStudyID)
+GEOM::GEOM_I3DPrimOperations_ptr GEOM_Gen_i::GetI3DPrimOperations()
      throw ( SALOME::SALOME_Exception )
 {
   Unexpect aCatch(SALOME_SalomeException);
@@ -2248,7 +2251,7 @@ GEOM::GEOM_I3DPrimOperations_ptr GEOM_Gen_i::GetI3DPrimOperations(CORBA::Long th
   GEOM::GEOM_Gen_ptr engine = _this();
 
   GEOM_I3DPrimOperations_i* aServant =
-    new GEOM_I3DPrimOperations_i(_poa, engine, _impl->GetI3DPrimOperations(theStudyID));
+    new GEOM_I3DPrimOperations_i(_poa, engine, _impl->GetI3DPrimOperations());
   PortableServer::ObjectId_var id = _poa->activate_object(aServant);
 
   // activate the CORBA servant
@@ -2260,7 +2263,7 @@ GEOM::GEOM_I3DPrimOperations_ptr GEOM_Gen_i::GetI3DPrimOperations(CORBA::Long th
 // function : GetIShapesOperations
 // purpose  :
 //============================================================================
-GEOM::GEOM_IShapesOperations_ptr GEOM_Gen_i::GetIShapesOperations(CORBA::Long theStudyID)
+GEOM::GEOM_IShapesOperations_ptr GEOM_Gen_i::GetIShapesOperations()
      throw ( SALOME::SALOME_Exception )
 {
   Unexpect aCatch(SALOME_SalomeException);
@@ -2269,7 +2272,7 @@ GEOM::GEOM_IShapesOperations_ptr GEOM_Gen_i::GetIShapesOperations(CORBA::Long th
   GEOM::GEOM_Gen_ptr engine = _this();
 
   GEOM_IShapesOperations_i* aServant =
-    new GEOM_IShapesOperations_i(_poa, engine, _impl->GetIShapesOperations(theStudyID));
+    new GEOM_IShapesOperations_i(_poa, engine, _impl->GetIShapesOperations());
 
   // activate the CORBA servant
   GEOM::GEOM_IShapesOperations_var operations = aServant->_this();
@@ -2280,7 +2283,7 @@ GEOM::GEOM_IShapesOperations_ptr GEOM_Gen_i::GetIShapesOperations(CORBA::Long th
 // function : GetIBlocksOperations
 // purpose  :
 //============================================================================
-GEOM::GEOM_IBlocksOperations_ptr GEOM_Gen_i::GetIBlocksOperations(CORBA::Long theStudyID)
+GEOM::GEOM_IBlocksOperations_ptr GEOM_Gen_i::GetIBlocksOperations()
      throw ( SALOME::SALOME_Exception )
 {
   Unexpect aCatch(SALOME_SalomeException);
@@ -2289,7 +2292,7 @@ GEOM::GEOM_IBlocksOperations_ptr GEOM_Gen_i::GetIBlocksOperations(CORBA::Long th
   GEOM::GEOM_Gen_ptr engine = _this();
 
   GEOM_IBlocksOperations_i* aServant =
-    new GEOM_IBlocksOperations_i(_poa, engine, _impl->GetIBlocksOperations(theStudyID));
+    new GEOM_IBlocksOperations_i(_poa, engine, _impl->GetIBlocksOperations());
 
   // activate the CORBA servant
   GEOM::GEOM_IBlocksOperations_var operations = aServant->_this();
@@ -2300,7 +2303,7 @@ GEOM::GEOM_IBlocksOperations_ptr GEOM_Gen_i::GetIBlocksOperations(CORBA::Long th
 // function : GetIBooleanOperations
 // purpose  :
 //============================================================================
-GEOM::GEOM_IBooleanOperations_ptr GEOM_Gen_i::GetIBooleanOperations(CORBA::Long theStudyID)
+GEOM::GEOM_IBooleanOperations_ptr GEOM_Gen_i::GetIBooleanOperations()
      throw ( SALOME::SALOME_Exception )
 {
   Unexpect aCatch(SALOME_SalomeException);
@@ -2309,7 +2312,7 @@ GEOM::GEOM_IBooleanOperations_ptr GEOM_Gen_i::GetIBooleanOperations(CORBA::Long
   GEOM::GEOM_Gen_ptr engine = _this();
 
   GEOM_IBooleanOperations_i* aServant =
-    new GEOM_IBooleanOperations_i(_poa, engine, _impl->GetIBooleanOperations(theStudyID));
+    new GEOM_IBooleanOperations_i(_poa, engine, _impl->GetIBooleanOperations());
 
   // activate the CORBA servant
   GEOM::GEOM_IBooleanOperations_var operations = aServant->_this();
@@ -2320,7 +2323,7 @@ GEOM::GEOM_IBooleanOperations_ptr GEOM_Gen_i::GetIBooleanOperations(CORBA::Long
 // function : GetICurvesOperations
 // purpose  :
 //============================================================================
-GEOM::GEOM_ICurvesOperations_ptr GEOM_Gen_i::GetICurvesOperations(CORBA::Long theStudyID)
+GEOM::GEOM_ICurvesOperations_ptr GEOM_Gen_i::GetICurvesOperations()
      throw ( SALOME::SALOME_Exception )
 {
   Unexpect aCatch(SALOME_SalomeException);
@@ -2329,7 +2332,7 @@ GEOM::GEOM_ICurvesOperations_ptr GEOM_Gen_i::GetICurvesOperations(CORBA::Long th
   GEOM::GEOM_Gen_ptr engine = _this();
 
   GEOM_ICurvesOperations_i* aServant =
-    new GEOM_ICurvesOperations_i(_poa, engine, _impl->GetICurvesOperations(theStudyID));
+    new GEOM_ICurvesOperations_i(_poa, engine, _impl->GetICurvesOperations());
 
   // activate the CORBA servant
   GEOM::GEOM_ICurvesOperations_var operations = aServant->_this();
@@ -2340,7 +2343,7 @@ GEOM::GEOM_ICurvesOperations_ptr GEOM_Gen_i::GetICurvesOperations(CORBA::Long th
 // function : GetILocalOperations
 // purpose  :
 //============================================================================
-GEOM::GEOM_ILocalOperations_ptr GEOM_Gen_i::GetILocalOperations(CORBA::Long theStudyID)
+GEOM::GEOM_ILocalOperations_ptr GEOM_Gen_i::GetILocalOperations()
      throw ( SALOME::SALOME_Exception )
 {
   Unexpect aCatch(SALOME_SalomeException);
@@ -2349,7 +2352,7 @@ GEOM::GEOM_ILocalOperations_ptr GEOM_Gen_i::GetILocalOperations(CORBA::Long theS
   GEOM::GEOM_Gen_ptr engine = _this();
 
   GEOM_ILocalOperations_i* aServant =
-    new GEOM_ILocalOperations_i(_poa, engine, _impl->GetILocalOperations(theStudyID));
+    new GEOM_ILocalOperations_i(_poa, engine, _impl->GetILocalOperations());
 
   // activate the CORBA servant
   GEOM::GEOM_ILocalOperations_var operations = aServant->_this();
@@ -2360,7 +2363,7 @@ GEOM::GEOM_ILocalOperations_ptr GEOM_Gen_i::GetILocalOperations(CORBA::Long theS
 // function : GetIHealingOperations
 // purpose  :
 //============================================================================
-GEOM::GEOM_IHealingOperations_ptr GEOM_Gen_i::GetIHealingOperations(CORBA::Long theStudyID)
+GEOM::GEOM_IHealingOperations_ptr GEOM_Gen_i::GetIHealingOperations()
      throw ( SALOME::SALOME_Exception )
 {
   Unexpect aCatch(SALOME_SalomeException);
@@ -2369,7 +2372,7 @@ GEOM::GEOM_IHealingOperations_ptr GEOM_Gen_i::GetIHealingOperations(CORBA::Long
   GEOM::GEOM_Gen_ptr engine = _this();
 
   GEOM_IHealingOperations_i* aServant =
-    new GEOM_IHealingOperations_i(_poa, engine, _impl->GetIHealingOperations(theStudyID));
+    new GEOM_IHealingOperations_i(_poa, engine, _impl->GetIHealingOperations());
 
   // activate the CORBA servant
   GEOM::GEOM_IHealingOperations_var operations = aServant->_this();
@@ -2380,7 +2383,7 @@ GEOM::GEOM_IHealingOperations_ptr GEOM_Gen_i::GetIHealingOperations(CORBA::Long
 // function : GetIInsertOperations
 // purpose  :
 //============================================================================
-GEOM::GEOM_IInsertOperations_ptr GEOM_Gen_i::GetIInsertOperations(CORBA::Long theStudyID)
+GEOM::GEOM_IInsertOperations_ptr GEOM_Gen_i::GetIInsertOperations()
      throw ( SALOME::SALOME_Exception )
 {
   Unexpect aCatch(SALOME_SalomeException);
@@ -2389,7 +2392,7 @@ GEOM::GEOM_IInsertOperations_ptr GEOM_Gen_i::GetIInsertOperations(CORBA::Long th
   GEOM::GEOM_Gen_ptr engine = _this();
 
   GEOM_IInsertOperations_i* aServant =
-    new GEOM_IInsertOperations_i(_poa, engine, _impl->GetIInsertOperations(theStudyID));
+    new GEOM_IInsertOperations_i(_poa, engine, _impl->GetIInsertOperations());
 
   // activate the CORBA servant
   GEOM::GEOM_IInsertOperations_var operations = aServant->_this();
@@ -2400,7 +2403,7 @@ GEOM::GEOM_IInsertOperations_ptr GEOM_Gen_i::GetIInsertOperations(CORBA::Long th
 // function : GetIMeasureOperations
 // purpose  :
 //============================================================================
-GEOM::GEOM_IMeasureOperations_ptr GEOM_Gen_i::GetIMeasureOperations(CORBA::Long theStudyID)
+GEOM::GEOM_IMeasureOperations_ptr GEOM_Gen_i::GetIMeasureOperations()
      throw ( SALOME::SALOME_Exception )
 {
   Unexpect aCatch(SALOME_SalomeException);
@@ -2409,7 +2412,7 @@ GEOM::GEOM_IMeasureOperations_ptr GEOM_Gen_i::GetIMeasureOperations(CORBA::Long
   GEOM::GEOM_Gen_ptr engine = _this();
 
   GEOM_IMeasureOperations_i* aServant =
-    new GEOM_IMeasureOperations_i(_poa, engine, _impl->GetIMeasureOperations(theStudyID));
+    new GEOM_IMeasureOperations_i(_poa, engine, _impl->GetIMeasureOperations());
 
   // activate the CORBA servant
   GEOM::GEOM_IMeasureOperations_var operations = aServant->_this();
@@ -2420,7 +2423,7 @@ GEOM::GEOM_IMeasureOperations_ptr GEOM_Gen_i::GetIMeasureOperations(CORBA::Long
 // function : GetIGroupOperations
 // purpose  :
 //============================================================================
-GEOM::GEOM_IGroupOperations_ptr GEOM_Gen_i::GetIGroupOperations(CORBA::Long theStudyID)
+GEOM::GEOM_IGroupOperations_ptr GEOM_Gen_i::GetIGroupOperations()
      throw ( SALOME::SALOME_Exception )
 {
   Unexpect aCatch(SALOME_SalomeException);
@@ -2429,7 +2432,7 @@ GEOM::GEOM_IGroupOperations_ptr GEOM_Gen_i::GetIGroupOperations(CORBA::Long theS
   GEOM::GEOM_Gen_ptr engine = _this();
 
   GEOM_IGroupOperations_i* aServant =
-    new GEOM_IGroupOperations_i(_poa, engine, _impl->GetIGroupOperations(theStudyID));
+    new GEOM_IGroupOperations_i(_poa, engine, _impl->GetIGroupOperations());
 
   // activate the CORBA servant
   GEOM::GEOM_IGroupOperations_var operations = aServant->_this();
@@ -2440,7 +2443,7 @@ GEOM::GEOM_IGroupOperations_ptr GEOM_Gen_i::GetIGroupOperations(CORBA::Long theS
 // function : GetIFieldOperations
 // purpose  :
 //============================================================================
-GEOM::GEOM_IFieldOperations_ptr GEOM_Gen_i::GetIFieldOperations(CORBA::Long theStudyID)
+GEOM::GEOM_IFieldOperations_ptr GEOM_Gen_i::GetIFieldOperations()
      throw ( SALOME::SALOME_Exception )
 {
   Unexpect aCatch(SALOME_SalomeException);
@@ -2449,7 +2452,7 @@ GEOM::GEOM_IFieldOperations_ptr GEOM_Gen_i::GetIFieldOperations(CORBA::Long theS
   GEOM::GEOM_Gen_ptr engine = _this();
 
   GEOM_IFieldOperations_i* aServant =
-    new GEOM_IFieldOperations_i(_poa, engine, _impl->GetIFieldOperations(theStudyID));
+    new GEOM_IFieldOperations_i(_poa, engine, _impl->GetIFieldOperations());
 
   // activate the CORBA servant
   GEOM::GEOM_IFieldOperations_var operations = aServant->_this();
@@ -2460,8 +2463,7 @@ GEOM::GEOM_IFieldOperations_ptr GEOM_Gen_i::GetIFieldOperations(CORBA::Long theS
 // function : GetPluginOperations
 // purpose  :
 //============================================================================
-GEOM::GEOM_IOperations_ptr GEOM_Gen_i::GetPluginOperations(CORBA::Long theStudyID,
-                                                           const char* theLibName)
+GEOM::GEOM_IOperations_ptr GEOM_Gen_i::GetPluginOperations(const char* theLibName)
      throw ( SALOME::SALOME_Exception )
 {
   Unexpect aCatch(SALOME_SalomeException);
@@ -2479,7 +2481,7 @@ GEOM::GEOM_IOperations_ptr GEOM_Gen_i::GetPluginOperations(CORBA::Long theStudyI
     // create a new operations object, store its ref. in engine
     if ( myOpCreatorMap.find(aLibName) != myOpCreatorMap.end() ) {
       GEOM_IOperations_i* aServant = 0;
-      aServant = myOpCreatorMap[aLibName]->Create(_poa, theStudyID, engine, _impl);
+      aServant = myOpCreatorMap[aLibName]->Create(_poa, engine, _impl);
       // activate the CORBA servant
       if (aServant)
         operations = aServant->_this();
@@ -2554,7 +2556,7 @@ GEOM::GEOM_Object_ptr GEOM_Gen_i::AddSubShape (GEOM::GEOM_Object_ptr   theMainSh
     return GEOM::GEOM_Object::_nil();
   CORBA::String_var entry = theMainShape->GetEntry();
   HANDLE_NAMESPACE(GEOM_Object) aMainShape = HANDLE_NAMESPACE(GEOM_Object)::DownCast
-    ( _impl->GetObject( theMainShape->GetStudyID(), entry ));
+    ( _impl->GetObject( entry ));
   if (aMainShape.IsNull()) return GEOM::GEOM_Object::_nil();
 
   Handle(TColStd_HArray1OfInteger) anArray = new TColStd_HArray1OfInteger(1, theIndices.length());
@@ -2576,7 +2578,7 @@ GEOM::GEOM_Object_ptr GEOM_Gen_i::AddSubShape (GEOM::GEOM_Object_ptr   theMainSh
 void GEOM_Gen_i::RemoveObject(GEOM::GEOM_BaseObject_ptr theObject)
 {
   CORBA::String_var anEntry = theObject->GetEntry();
-  HANDLE_NAMESPACE(GEOM_BaseObject) anObject = _impl->GetObject(theObject->GetStudyID(), anEntry, false);
+  HANDLE_NAMESPACE(GEOM_BaseObject) anObject = _impl->GetObject(anEntry, false);
   if (!anObject.IsNull())
     _impl->RemoveObject(anObject);
 }
@@ -2608,10 +2610,10 @@ GEOM::GEOM_Object_ptr GEOM_Gen_i::GetIORFromString(const char* stringIOR) {
 // function : GetObject()
 // purpose  :
 //=================================================================================
-GEOM::GEOM_BaseObject_ptr GEOM_Gen_i::GetObject (CORBA::Long theStudyID, const char* theEntry)
+GEOM::GEOM_BaseObject_ptr GEOM_Gen_i::GetObject (const char* theEntry)
 {
   GEOM::GEOM_BaseObject_var obj;
-  HANDLE_NAMESPACE(GEOM_BaseObject) handle_object = _impl->GetObject(theStudyID, (char*)theEntry);
+  HANDLE_NAMESPACE(GEOM_BaseObject) handle_object = _impl->GetObject((char*)theEntry);
   if (handle_object.IsNull()) return obj._retn();
 
   TCollection_AsciiString stringIOR = handle_object->GetIOR();
@@ -2673,13 +2675,12 @@ bool GEOM_Gen_i::hasObjectInfo()
 // function : getObjectInfo()
 // purpose  : returns an information for a given object by its entry
 //=================================================================================
-char* GEOM_Gen_i::getObjectInfo(CORBA::Long studyId, const char* entry)
+char* GEOM_Gen_i::getObjectInfo(const char* entry)
 {
   GEOM::GEOM_Object_var aGeomObject;
 
-  CORBA::Object_var aSMObject = name_service->Resolve( "/myStudyManager" );
-  SALOMEDS::StudyManager_var aStudyManager = SALOMEDS::StudyManager::_narrow( aSMObject );
-  SALOMEDS::Study_var aStudy = aStudyManager->GetStudyByID( studyId );
+  CORBA::Object_var aStudyObject = name_service->Resolve( "/Study" );
+  SALOMEDS::Study_var aStudy = SALOMEDS::Study::_narrow( aStudyObject );
   SALOMEDS::SObject_var aSObj = aStudy->FindObjectID( entry );
   SALOMEDS::SObject_var aResultSObj;
   if (aSObj->ReferencedObject(aResultSObj))
@@ -2702,7 +2703,7 @@ char* GEOM_Gen_i::getObjectInfo(CORBA::Long studyId, const char* entry)
     GEOM::ListOfLong_var anInts;
     GEOM::ListOfDouble_var aDbls;
 
-    GEOM::GEOM_IMeasureOperations_var anOp = GetIMeasureOperations( studyId );
+    GEOM::GEOM_IMeasureOperations_var anOp = GetIMeasureOperations();
     aKind = anOp->KindOfShape( aGeomObject, anInts, aDbls );
 
     if ( anOp->IsDone() ) {
@@ -2854,7 +2855,7 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::CreateFolder(const char* theName,
     aLocalID->UnRegister();
   }
 
-  SALOMEDS::Study_var aStudy = theFather->GetStudy();
+  SALOMEDS::Study_var aStudy = GetStudy();
   SALOMEDS::StudyBuilder_var aStudyBuilder( aStudy->NewBuilder() );
   aFolderSO = aStudyBuilder->NewObject( theFather );
 
@@ -2889,7 +2890,7 @@ void GEOM_Gen_i::MoveToFolder(GEOM::GEOM_Object_ptr theObject,
                               SALOMEDS::SObject_ptr theFolder) {
   GEOM::object_list_var objects = new GEOM::object_list();
   objects->length( 1 );
-  SALOMEDS::SObject_var aSO = theFolder->GetStudy()->FindObjectID( theObject->GetStudyEntry() );
+  SALOMEDS::SObject_var aSO = GetStudy()->FindObjectID( theObject->GetStudyEntry() );
   objects[0] = aSO;
   Move( objects, theFolder, -1 );
 }
@@ -2907,7 +2908,7 @@ void GEOM_Gen_i::MoveListToFolder (const GEOM::ListOfGO& theListOfGO,
   SALOMEDS::SObject_var aSO;
   for (int i = 0; i < aLen; i++) {
     aGO = GEOM::GEOM_Object::_duplicate( theListOfGO[i] );
-    aSO = theFolder->GetStudy()->FindObjectID( aGO->GetStudyEntry() );
+    aSO = GetStudy()->FindObjectID( aGO->GetStudyEntry() );
     objects[i] = aSO;
   }
   if ( objects->length() > 0 )
@@ -2925,7 +2926,7 @@ void GEOM_Gen_i::Move( const GEOM::object_list& what,
 {
   if ( CORBA::is_nil( where ) ) return;
 
-  SALOMEDS::Study_var study = where->GetStudy();
+  SALOMEDS::Study_var study = GetStudy();
   SALOMEDS::StudyBuilder_var studyBuilder = study->NewBuilder();
   SALOMEDS::UseCaseBuilder_var useCaseBuilder = study->GetUseCaseBuilder();
   SALOMEDS::SComponent_var father = where->GetFatherComponent();
@@ -2958,8 +2959,8 @@ void GEOM_Gen_i::Move( const GEOM::object_list& what,
 // function : GetDependencyTree
 // purpose  : Collects dependencies of the given objects from other ones
 //=======================================================================
-SALOMEDS::TMPFile* GEOM_Gen_i::GetDependencyTree( SALOMEDS::Study_ptr theStudy,
-                                                  const GEOM::string_array& theObjectEntries ) {
+SALOMEDS::TMPFile* GEOM_Gen_i::GetDependencyTree( const GEOM::string_array& theObjectEntries )
+{
   // fill in the tree structure
   GEOMUtils::TreeModel tree;
 
@@ -2967,7 +2968,7 @@ SALOMEDS::TMPFile* GEOM_Gen_i::GetDependencyTree( SALOMEDS::Study_ptr theStudy,
   for ( int i = 0; i < theObjectEntries.length(); i++ ) {
     // process objects one-by-one
     entry = theObjectEntries[i].in();
-    GEOM::GEOM_BaseObject_var anObj = GetObject( theStudy->StudyId(), entry.c_str() );
+    GEOM::GEOM_BaseObject_var anObj = GetObject(entry.c_str() );
     if ( anObj->_is_nil() )
       continue;
     std::map< std::string, std::set<std::string> > passedEntries;
@@ -3052,7 +3053,7 @@ void GEOM_Gen_i::getDownwardDependency( GEOM::GEOM_BaseObject_ptr gbo,
                                         std::map< std::string, std::set<std::string> > &passedEntries,
                                         int level ) {
   std::string aGboEntry = gbo->GetEntry();
-  Handle(TDocStd_Document) aDoc = GEOM_Engine::GetEngine()->GetDocument(gbo->GetStudyID());
+  Handle(TDocStd_Document) aDoc = GEOM_Engine::GetEngine()->GetDocument();
   Handle(TDataStd_TreeNode) aNode, aRoot;
   HANDLE_NAMESPACE(GEOM_Function) aFunction;
   if (aDoc->Main().FindAttribute(GEOM_Function::GetFunctionTreeID(), aRoot)) {
@@ -3068,7 +3069,7 @@ void GEOM_Gen_i::getDownwardDependency( GEOM::GEOM_BaseObject_ptr gbo,
       if(aLabel.IsNull()) continue;
       TCollection_AsciiString anEntry;
       TDF_Tool::Entry(aLabel, anEntry);
-      GEOM::GEOM_BaseObject_var geomObj = GetObject( gbo->GetStudyID(), anEntry.ToCString() );
+      GEOM::GEOM_BaseObject_var geomObj = GetObject(anEntry.ToCString() );
       if( CORBA::is_nil( geomObj ) )
         continue;
       // get dependencies for current object in the tree
@@ -3114,18 +3115,17 @@ void GEOM_Gen_i::getDownwardDependency( GEOM::GEOM_BaseObject_ptr gbo,
 // function : GetEntriesToReduceStudy
 // purpose  : Fills 3 lists that is used to clean study of redundant objects
 //==============================================================================
-void GEOM_Gen_i::GetEntriesToReduceStudy(SALOMEDS::Study_ptr theStudy,
-                                        GEOM::string_array& theSelectedEntries,
-                                        GEOM::string_array& theParentEntries,
-                                        GEOM::string_array& theSubEntries,
-                                        GEOM::string_array& theOtherEntries)
+void GEOM_Gen_i::GetEntriesToReduceStudy(GEOM::string_array& theSelectedEntries,
+                                         GEOM::string_array& theParentEntries,
+                                         GEOM::string_array& theSubEntries,
+                                         GEOM::string_array& theOtherEntries)
 {
   std::set<std::string> aSelected, aParents, aChildren, anOthers;
   for ( int i = 0; i < theSelectedEntries.length(); i++ ) {
     aSelected.insert( CORBA::string_dup( theSelectedEntries[i] ) );
   }
 
-  Handle(TDocStd_Document) aDoc = GEOM_Engine::GetEngine()->GetDocument(theStudy->StudyId());
+  Handle(TDocStd_Document) aDoc = GEOM_Engine::GetEngine()->GetDocument();
   Handle(TDataStd_TreeNode) aNode, aRoot;
   HANDLE_NAMESPACE(GEOM_Function) aFunction;
   if (aDoc->Main().FindAttribute(GEOM_Function::GetFunctionTreeID(), aRoot)) {
@@ -3145,7 +3145,7 @@ void GEOM_Gen_i::GetEntriesToReduceStudy(SALOMEDS::Study_ptr theStudy,
         continue;
       TDF_Tool::Entry(aLabel, anAsciiEntry);
       anEntry = anAsciiEntry.ToCString();
-      GEOM::GEOM_BaseObject_var geomObj = GetObject( theStudy->StudyId(), anEntry.c_str() );
+      GEOM::GEOM_BaseObject_var geomObj = GetObject(anEntry.c_str() );
       if( CORBA::is_nil( geomObj ) )
         continue;
 
@@ -3165,7 +3165,7 @@ void GEOM_Gen_i::GetEntriesToReduceStudy(SALOMEDS::Study_ptr theStudy,
 
     // filling list of sub-objects
     for ( it = aSelected.begin(); it != aSelected.end(); ++it ) {
-      includeSubObjects( theStudy, *it, aSelected, aParents, aChildren, anOthers );
+      includeSubObjects( *it, aSelected, aParents, aChildren, anOthers );
     }
 
     // if some selected object is not a main shape,
@@ -3173,7 +3173,7 @@ void GEOM_Gen_i::GetEntriesToReduceStudy(SALOMEDS::Study_ptr theStudy,
     // because they could not be modified anyhow.
     std::set<std::string> aToBeInSelected;
     for ( it = aSelected.begin(); it != aSelected.end(); ++it ) {
-      HANDLE_NAMESPACE(GEOM_BaseObject) handle_object = _impl->GetObject( theStudy->StudyId(), (*it).c_str(), false);
+      HANDLE_NAMESPACE(GEOM_BaseObject) handle_object = _impl->GetObject((*it).c_str(), false);
       if ( handle_object.IsNull() )
         continue;
 
@@ -3263,15 +3263,14 @@ void GEOM_Gen_i::includeParentDependencies(GEOM::GEOM_BaseObject_ptr geomObj,
 // function : includeSubObjects
 // purpose  :
 //==============================================================================
-void GEOM_Gen_i::includeSubObjects(SALOMEDS::Study_ptr theStudy,
-                                   const std::string& aSelectedEntry,
+void GEOM_Gen_i::includeSubObjects(const std::string& aSelectedEntry,
                                    std::set<std::string>& aSelected,
                                    std::set<std::string>& aParents,
                                    std::set<std::string>& aChildren,
                                    std::set<std::string>& anOthers)
 {
   std::set<std::string>::iterator foundIt;
-  HANDLE_NAMESPACE(GEOM_BaseObject) handle_object = _impl->GetObject( theStudy->StudyId(), aSelectedEntry.c_str(), false);
+  HANDLE_NAMESPACE(GEOM_BaseObject) handle_object = _impl->GetObject(aSelectedEntry.c_str(), false);
   if ( handle_object.IsNull() )
     return;
 
@@ -3299,7 +3298,7 @@ void GEOM_Gen_i::includeSubObjects(SALOMEDS::Study_ptr theStudy,
               anOthers.erase( foundIt );
       }
     }
-    includeSubObjects( theStudy, aSubEntryStr, aSelected, aParents, aChildren, anOthers );
+    includeSubObjects( aSubEntryStr, aSelected, aParents, aChildren, anOthers );
   }
 }
 //=====================================================================================
index 34641ec7ece1f483e477d309a265aea3d83856fd..6ffba33e8ecc23e278229d7869de09008d34cb00 100644 (file)
@@ -71,7 +71,6 @@ class GEOM_I_EXPORT GEOM_GenericOperationsCreator
 public:
   // Create operations
   virtual GEOM_IOperations_i* Create (PortableServer::POA_ptr thePOA,
-                                      int                     theStudyId,
                                       GEOM::GEOM_Gen_ptr      theEngine,
                                       ::GEOMImpl_Gen*         theGenImpl) = 0;
   // return the name of IDL module
@@ -109,6 +108,9 @@ class GEOM_I_EXPORT GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual publi
   // Get Naming Service object
   SALOME_NamingService* GetNS() { return name_service; }
 
+  // Get Study
+  SALOMEDS::Study_var GetStudy();
+
   //-----------------------------------------------------------------------//
   // Inherited methods from SALOMEDS::Driver                               //
   //-----------------------------------------------------------------------//
@@ -145,13 +147,11 @@ class GEOM_I_EXPORT GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual publi
                                CORBA::Boolean isASCII);
 
   bool CanPublishInStudy(CORBA::Object_ptr theIOR);
-  SALOMEDS::SObject_ptr PublishInStudy(SALOMEDS::Study_ptr theStudy,
-                                       SALOMEDS::SObject_ptr theSObject,
+  SALOMEDS::SObject_ptr PublishInStudy(SALOMEDS::SObject_ptr theSObject,
                                        CORBA::Object_ptr theObject,
                                        const char* theName) throw (SALOME::SALOME_Exception) ;
 
-  GEOM::ListOfGO* PublishNamedShapesInStudy(SALOMEDS::Study_ptr theStudy,
-                                            CORBA::Object_ptr theObject);
+  GEOM::ListOfGO* PublishNamedShapesInStudy(CORBA::Object_ptr theObject);
 
   CORBA::Boolean CanCopy(SALOMEDS::SObject_ptr theObject);
   SALOMEDS::TMPFile* CopyFrom(SALOMEDS::SObject_ptr theObject, CORBA::Long& theObjectID);
@@ -163,16 +163,14 @@ class GEOM_I_EXPORT GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual publi
   /*! \brief Adds theObject in the study with a name = theName, if
    *         theFather is not null the object is placed under theFather
    */
-  SALOMEDS::SObject_ptr AddInStudy (SALOMEDS::Study_ptr       theStudy,
-                                    GEOM::GEOM_BaseObject_ptr theObject,
+  SALOMEDS::SObject_ptr AddInStudy (GEOM::GEOM_BaseObject_ptr theObject,
                                     const char*               theName,
                                     GEOM::GEOM_BaseObject_ptr theFather);
 
   /*! \brief Publish sub-shapes, standing for arguments and sub-shapes of arguments.
    *         To be used from python scripts out of geompy.addToStudy (non-default usage)
    */
-  GEOM::ListOfGO* RestoreSubShapesO (SALOMEDS::Study_ptr     theStudy,
-                                     GEOM::GEOM_Object_ptr   theObject,
+  GEOM::ListOfGO* RestoreSubShapesO (GEOM::GEOM_Object_ptr   theObject,
                                      const GEOM::ListOfGO&   theArgs,
                                      GEOM::find_shape_method theFindMethod,
                                      CORBA::Boolean          theInheritFirstArg,
@@ -181,8 +179,7 @@ class GEOM_I_EXPORT GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual publi
   /*! \brief Publish sub-shapes, standing for given in \a theArgs arguments and sub-shapes.
    *         To be used from python scripts, generated by Dump Python.
    */
-  GEOM::ListOfGO* RestoreGivenSubShapesO (SALOMEDS::Study_ptr     theStudy,
-                                          GEOM::GEOM_Object_ptr   theObject,
+  GEOM::ListOfGO* RestoreGivenSubShapesO (GEOM::GEOM_Object_ptr   theObject,
                                           const GEOM::ListOfGO&   theArgs,
                                           GEOM::find_shape_method theFindMethod,
                                           CORBA::Boolean          theInheritFirstArg,
@@ -191,86 +188,83 @@ class GEOM_I_EXPORT GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual publi
   /*! \brief Publish sub-shapes, standing for arguments and sub-shapes of arguments.
    *         To be used from GUI and from geompy.addToStudy
    */
-  GEOM::ListOfGO* RestoreSubShapesSO (SALOMEDS::Study_ptr     theStudy,
-                                      SALOMEDS::SObject_ptr   theSObject,
+  GEOM::ListOfGO* RestoreSubShapesSO (SALOMEDS::SObject_ptr   theSObject,
                                       const GEOM::ListOfGO&   theArgs,
                                       GEOM::find_shape_method theFindMethod,
                                       CORBA::Boolean          theInheritFirstArg,
                                       CORBA::Boolean          theAddPrefix);
 
   //Collects dependencies of the given objects from other ones
-  SALOMEDS::TMPFile* GetDependencyTree(SALOMEDS::Study_ptr theStudy,
-                                       const GEOM::string_array& theObjectEntries);
+  SALOMEDS::TMPFile* GetDependencyTree(const GEOM::string_array& theObjectEntries);
 
   //-----------------------------------------------------------------------//
   // Transaction methods                                                   //
   //-----------------------------------------------------------------------//
 
-  //Undos one transaction in the document associated with theStudyID
-  virtual void Undo(CORBA::Long theStudyID);
+  //Undos one transaction in the document
+  virtual void Undo();
 
-  //Redos one transaction in the document associated with theStudyID
-  virtual void Redo(CORBA::Long theStudyID);
+  //Redos one transaction in the document
+  virtual void Redo();
 
   //-----------------------------------------------------------------------//
   // Operations methods                                                    //
   //-----------------------------------------------------------------------//
 
   //Returns a pointer to BasicOperations interface
-  virtual GEOM::GEOM_IBasicOperations_ptr GetIBasicOperations (CORBA::Long theStudyID)
+  virtual GEOM::GEOM_IBasicOperations_ptr GetIBasicOperations()
     throw (SALOME::SALOME_Exception);
 
   //Returns a pointer to TransformOperations interface
-  virtual GEOM::GEOM_ITransformOperations_ptr GetITransformOperations (CORBA::Long theStudyID)
+  virtual GEOM::GEOM_ITransformOperations_ptr GetITransformOperations()
     throw (SALOME::SALOME_Exception);
 
   //Returns a pointer to 3DPrimOperations interface
-  virtual GEOM::GEOM_I3DPrimOperations_ptr GetI3DPrimOperations (CORBA::Long theStudyID)
+  virtual GEOM::GEOM_I3DPrimOperations_ptr GetI3DPrimOperations()
     throw (SALOME::SALOME_Exception);
 
   //Returns a pointer to ShapesOperations interface
-  virtual GEOM::GEOM_IShapesOperations_ptr GetIShapesOperations (CORBA::Long theStudyID)
+  virtual GEOM::GEOM_IShapesOperations_ptr GetIShapesOperations()
     throw (SALOME::SALOME_Exception);
 
   //Returns a pointer to BlocksOperations interface
-  virtual GEOM::GEOM_IBlocksOperations_ptr GetIBlocksOperations (CORBA::Long theStudyID)
+  virtual GEOM::GEOM_IBlocksOperations_ptr GetIBlocksOperations()
     throw (SALOME::SALOME_Exception);
 
   //Returns a pointer to BooleanOperations interface
-  virtual GEOM::GEOM_IBooleanOperations_ptr GetIBooleanOperations (CORBA::Long theStudyID)
+  virtual GEOM::GEOM_IBooleanOperations_ptr GetIBooleanOperations()
     throw (SALOME::SALOME_Exception);
 
   //Returns a pointer to CurvesOperations interface
-  virtual GEOM::GEOM_ICurvesOperations_ptr GetICurvesOperations (CORBA::Long theStudyID)
+  virtual GEOM::GEOM_ICurvesOperations_ptr GetICurvesOperations()
     throw (SALOME::SALOME_Exception);
 
   //Returns a pointer to LocalOperations interface
-  virtual GEOM::GEOM_ILocalOperations_ptr GetILocalOperations (CORBA::Long theStudyID)
+  virtual GEOM::GEOM_ILocalOperations_ptr GetILocalOperations()
     throw (SALOME::SALOME_Exception);
 
   //Returns a pointer to HealingOperations interface
-  virtual GEOM::GEOM_IHealingOperations_ptr GetIHealingOperations (CORBA::Long theStudyID)
+  virtual GEOM::GEOM_IHealingOperations_ptr GetIHealingOperations()
     throw (SALOME::SALOME_Exception);
 
   //Returns a pointer to InsertOperations interface
-  virtual GEOM::GEOM_IInsertOperations_ptr GetIInsertOperations (CORBA::Long theStudyID)
+  virtual GEOM::GEOM_IInsertOperations_ptr GetIInsertOperations()
     throw (SALOME::SALOME_Exception);
 
   //Returns a pointer to MeasureOperations interface
-  virtual GEOM::GEOM_IMeasureOperations_ptr GetIMeasureOperations (CORBA::Long theStudyID)
+  virtual GEOM::GEOM_IMeasureOperations_ptr GetIMeasureOperations()
     throw (SALOME::SALOME_Exception);
 
   //Returns a pointer to GroupOperations interface
-  virtual GEOM::GEOM_IGroupOperations_ptr GetIGroupOperations (CORBA::Long theStudyID)
+  virtual GEOM::GEOM_IGroupOperations_ptr GetIGroupOperations()
     throw (SALOME::SALOME_Exception);
 
   //Returns a pointer to FiedlOperations interface
-  virtual GEOM::GEOM_IFieldOperations_ptr GetIFieldOperations (CORBA::Long theStudyID)
+  virtual GEOM::GEOM_IFieldOperations_ptr GetIFieldOperations()
     throw (SALOME::SALOME_Exception);
 
   //Returns a pointer to corresponding plugin operations interface
-  virtual GEOM::GEOM_IOperations_ptr GetPluginOperations (CORBA::Long theStudyID,
-                                                          const char* theLibName)
+  virtual GEOM::GEOM_IOperations_ptr GetPluginOperations (const char* theLibName)
     throw (SALOME::SALOME_Exception);
 
   //Adds a new sub-shape
@@ -283,8 +277,7 @@ class GEOM_I_EXPORT GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual publi
 
   virtual GEOM::GEOM_Object_ptr GetIORFromString(const char* stringIOR);
 
-  virtual Engines::TMPFile* DumpPython(CORBA::Object_ptr theStudy,
-                                       CORBA::Boolean isPublished,
+  virtual Engines::TMPFile* DumpPython(CORBA::Boolean isPublished,
                                        CORBA::Boolean isMultiFile,
                                        CORBA::Boolean& isValidScript);
 
@@ -294,7 +287,7 @@ class GEOM_I_EXPORT GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual publi
 
   // Object information
   virtual bool hasObjectInfo();
-  virtual char* getObjectInfo(CORBA::Long studyId, const char* entry);
+  virtual char* getObjectInfo(const char* entry);
 
   // Version information
   virtual char* getVersion();
@@ -319,8 +312,7 @@ class GEOM_I_EXPORT GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual publi
   /*! \brief Fills 3 lists that is used to clean study of redundant objects.
    *         To be used from GUI.
    */
-  void GetEntriesToReduceStudy(SALOMEDS::Study_ptr theStudy,
-                               GEOM::string_array& theSelectedEntries,
+  void GetEntriesToReduceStudy(GEOM::string_array& theSelectedEntries,
                                GEOM::string_array& theParentEntries,
                                GEOM::string_array& theSubEntries,
                                GEOM::string_array& theOtherEntries);
@@ -329,35 +321,31 @@ class GEOM_I_EXPORT GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual publi
   // Internal methods                                                      //
   //-----------------------------------------------------------------------//
 
-  virtual GEOM::GEOM_BaseObject_ptr GetObject(CORBA::Long theStudyID, const char* theEntry);
+  virtual GEOM::GEOM_BaseObject_ptr GetObject(const char* theEntry);
 
  private:
-  GEOM::ListOfGO* RestoreSubShapes (SALOMEDS::Study_ptr     theStudy,
-                                    GEOM::GEOM_Object_ptr   theObject,
+  GEOM::ListOfGO* RestoreSubShapes (GEOM::GEOM_Object_ptr   theObject,
                                     SALOMEDS::SObject_ptr   theSObject,
                                     const GEOM::ListOfGO&   theArgs,
                                     GEOM::find_shape_method theFindMethod,
                                     CORBA::Boolean          theInheritFirstArg,
                                     CORBA::Boolean          theAddPrefix);
 
-  GEOM::ListOfGO* RestoreSubShapesOneLevel (SALOMEDS::Study_ptr     theStudy,
-                                            SALOMEDS::SObject_ptr   theOldSO,
+  GEOM::ListOfGO* RestoreSubShapesOneLevel (SALOMEDS::SObject_ptr   theOldSO,
                                             SALOMEDS::SObject_ptr   theNewSO,
                                             GEOM::GEOM_Object_ptr   theNewO,
                                             GEOM::ListOfGO&         theOutArgs,
                                             GEOM::find_shape_method theFindMethod,
                                             CORBA::Boolean          theAddPrefix);
 
-  GEOM::ListOfGO* RestoreGivenSubShapes (SALOMEDS::Study_ptr     theStudy,
-                                         GEOM::GEOM_Object_ptr   theObject,
+  GEOM::ListOfGO* RestoreGivenSubShapes (GEOM::GEOM_Object_ptr   theObject,
                                          SALOMEDS::SObject_ptr   theSObject,
                                          const GEOM::ListOfGO&   theArgs,
                                          GEOM::find_shape_method theFindMethod,
                                          CORBA::Boolean          theInheritFirstArg,
                                          CORBA::Boolean          theAddPrefix);
 
-  GEOM::ListOfGO* RestoreGivenSubShapesOneLevel (SALOMEDS::Study_ptr     theStudy,
-                                                 SALOMEDS::SObject_ptr   theOldSO,
+  GEOM::ListOfGO* RestoreGivenSubShapesOneLevel (SALOMEDS::SObject_ptr   theOldSO,
                                                  SALOMEDS::SObject_ptr   theNewSO,
                                                  GEOM::GEOM_Object_ptr   theNewO,
                                                  std::set<std::string>   theArgs,
@@ -365,8 +353,7 @@ class GEOM_I_EXPORT GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual publi
                                                  CORBA::Boolean          theAddPrefix);
 
   // auxilary for PublishNamedShapesInStudy
-  void CreateAndPublishGroup(SALOMEDS::Study_ptr theStudy,
-                             GEOM::GEOM_Object_var theMainShape,
+  void CreateAndPublishGroup(GEOM::GEOM_Object_var theMainShape,
                              const TopTools_IndexedMapOfShape& anIndices,
                              const TopTools_SequenceOfShape& SeqS,
                              const TColStd_SequenceOfAsciiString& SeqN,
@@ -389,8 +376,7 @@ class GEOM_I_EXPORT GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual publi
                                  std::set<std::string>& aChildren,
                                  std::set<std::string>& anOthers);
 
-  void includeSubObjects(SALOMEDS::Study_ptr theStudy,
-                         const std::string& aSelectedEntry,
+  void includeSubObjects(const std::string& aSelectedEntry,
                          std::set<std::string>& aSelected,
                          std::set<std::string>& aParents,
                          std::set<std::string>& aChildren,
index b3d6c6125a88911165c2aef5deedeeb9fba3d54b..003abfaa6eccd97bb26d197b54cdaede64b0d15d 100644 (file)
@@ -88,16 +88,6 @@ char* GEOM_IOperations_i::GetErrorCode()
   return CORBA::string_dup(_impl->GetErrorCode());
 }
 
-//=============================================================================
-/*!
- *  GetStudyID
- */
-//=============================================================================
-CORBA::Long GEOM_IOperations_i::GetStudyID()
-{
-  return _impl->GetDocID();
-}
-
 //=============================================================================
 /*!
  *  StartOperation
@@ -156,7 +146,7 @@ GEOM_IOperations_i::GetBaseObjectImpl(GEOM::GEOM_BaseObject_ptr theObject)
   HANDLE_NAMESPACE(GEOM_BaseObject) anImpl;
   if (!CORBA::is_nil(theObject)) {
     CORBA::String_var anEntry = theObject->GetEntry();
-    anImpl = GetImpl()->GetEngine()->GetObject( theObject->GetStudyID(), anEntry );
+    anImpl = GetImpl()->GetEngine()->GetObject( anEntry );
   }
   return anImpl;
 }
index aa271fbf1a37e950f99571a89fc1b557a41fa467..15c0bd269f7ecbd5445ceb20fa842ee99e9c943d 100644 (file)
@@ -45,8 +45,6 @@ class GEOM_I_EXPORT GEOM_IOperations_i : public virtual POA_GEOM::GEOM_IOperatio
   
   virtual char* GetErrorCode();
 
-  virtual CORBA::Long GetStudyID();    
-
   virtual GEOM::GEOM_BaseObject_ptr GetBaseObject(HANDLE_NAMESPACE(GEOM_BaseObject) theObject);
   virtual HANDLE_NAMESPACE(GEOM_BaseObject) GetBaseObjectImpl(GEOM::GEOM_BaseObject_ptr theObject);
   virtual GEOM::GEOM_Object_ptr GetObject(HANDLE_NAMESPACE(GEOM_Object) theObject);
index be1be90bc278efd403a80b757f87346d6f40c526..5ba47b14a42c5b5b6104677ea7e9d1770fa3813f 100644 (file)
@@ -395,7 +395,7 @@ GEOM::GEOM_Object_ptr GEOM_Object_i::GetMainShape()
     TCollection_AsciiString anEntry;
     TDF_Tool::Entry(aLabel, anEntry);
     return GEOM::GEOM_Object::_narrow
-      ( _engine->GetObject(_impl->GetDocID(), anEntry.ToCString()) );
+      ( _engine->GetObject( anEntry.ToCString()) );
   }
 
   return obj._retn();
@@ -414,7 +414,7 @@ bool GEOM_Object_i::IsSame(GEOM::GEOM_BaseObject_ptr other)
   if ( !CORBA::is_nil( shapePtr ) ) {
     CORBA::String_var entry = shapePtr->GetEntry();
     HANDLE_NAMESPACE(GEOM_Object) otherObject = HANDLE_NAMESPACE(GEOM_Object)::DownCast
-      ( GEOM_Engine::GetEngine()->GetObject( shapePtr->GetStudyID(), entry, false ));
+      ( GEOM_Engine::GetEngine()->GetObject( entry, false ));
     if ( !otherObject.IsNull() ) {
       TopoDS_Shape thisShape  = _impl->GetValue();
       TopoDS_Shape otherShape = otherObject->GetValue();
index 2984de3afce8e2d6ccfef6608c256ca07a4ace5c..378d269fe3593cdc022f40f056df780063054815 100644 (file)
@@ -51,9 +51,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();
@@ -111,50 +108,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:
 //=============================================================================
@@ -236,11 +189,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();
   }
 }
 
@@ -252,11 +202,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();
   }
 }
 
@@ -268,11 +215,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();
   }
 }
 
@@ -284,11 +228,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();
   }
 }
 
@@ -300,11 +241,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();
   }
 }
 
@@ -316,11 +254,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();
   }
 }
 
@@ -332,11 +267,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();
   }
 }
 
@@ -348,11 +280,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();
   }
 }
 
@@ -364,11 +293,8 @@ 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();
   }
 }
 
@@ -380,11 +306,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();
   }
 }
 
@@ -396,11 +319,8 @@ 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 = GEOM::IAdvancedOperations::_narrow(myGeomEngine->GetPluginOperations(myStudyID, "AdvancedEngine"));
+  if (CORBA::is_nil(myAdvancedOp)) {
+    myAdvancedOp = GEOM::IAdvancedOperations::_narrow(myGeomEngine->GetPluginOperations("AdvancedEngine"));
   }
 }
 
@@ -412,11 +332,8 @@ void GEOM_Superv_i::getSTLPluginOp()
   if (CORBA::is_nil(myGeomEngine))
     setGeomEngine();
   // get GEOM::ISTLOperations interface
-  if (CORBA::is_nil(mySTLOp) || 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);
-    mySTLOp = GEOM::ISTLOperations::_narrow(myGeomEngine->GetPluginOperations(myStudyID, "STLPluginEngine"));
+  if (CORBA::is_nil(mySTLOp)) {
+    mySTLOp = GEOM::ISTLOperations::_narrow(myGeomEngine->GetPluginOperations("STLPluginEngine"));
   }
 }
 
@@ -428,11 +345,8 @@ void GEOM_Superv_i::getBREPPluginOp()
   if (CORBA::is_nil(myGeomEngine))
     setGeomEngine();
   // get GEOM:IBREPOperations interface
-  if (CORBA::is_nil(myBREPOp) || 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);
-    myBREPOp = GEOM::IBREPOperations::_narrow(myGeomEngine->GetPluginOperations(myStudyID, "BREPPluginEngine"));
+  if (CORBA::is_nil(myBREPOp)) {
+    myBREPOp = GEOM::IBREPOperations::_narrow(myGeomEngine->GetPluginOperations("BREPPluginEngine"));
   }
 }
 
@@ -444,11 +358,8 @@ void GEOM_Superv_i::getSTEPPluginOp()
   if (CORBA::is_nil(myGeomEngine))
     setGeomEngine();
   // get GEOM::ISTEPOperations interface
-  if (CORBA::is_nil(mySTEPOp) || 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);
-    mySTEPOp = GEOM::ISTEPOperations::_narrow(myGeomEngine->GetPluginOperations(myStudyID, "STEPPluginEngine"));
+  if (CORBA::is_nil(mySTEPOp)) {
+    mySTEPOp = GEOM::ISTEPOperations::_narrow(myGeomEngine->GetPluginOperations("STEPPluginEngine"));
   }
 }
 
@@ -460,11 +371,8 @@ void GEOM_Superv_i::getIGESPluginOp()
   if (CORBA::is_nil(myGeomEngine))
     setGeomEngine();
   // get GEOM::IIGESOperations interface
-  if (CORBA::is_nil(myIGESOp) || 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);
-    myIGESOp = GEOM::IIGESOperations::_narrow(myGeomEngine->GetPluginOperations(myStudyID, "IGESPluginEngine"));
+  if (CORBA::is_nil(myIGESOp)) {
+    myIGESOp = GEOM::IIGESOperations::_narrow(myGeomEngine->GetPluginOperations("IGESPluginEngine"));
   }
 }
 
@@ -476,11 +384,8 @@ void GEOM_Superv_i::getXAOPluginOp()
   if (CORBA::is_nil(myGeomEngine))
     setGeomEngine();
   // get GEOM::IXAOOperations interface
-  if (CORBA::is_nil(myXAOOp) || 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);
-    myXAOOp = GEOM::IXAOOperations::_narrow(myGeomEngine->GetPluginOperations(myStudyID, "XAOPluginEngine"));
+  if (CORBA::is_nil(myXAOOp)) {
+    myXAOOp = GEOM::IXAOOperations::_narrow(myGeomEngine->GetPluginOperations("XAOPluginEngine"));
   }
 }
 
@@ -493,11 +398,8 @@ void GEOM_Superv_i::getVTKPluginOp()
   if (CORBA::is_nil(myGeomEngine))
     setGeomEngine();
   // get GEOM::IVTKOperations interface
-  if (CORBA::is_nil(myVTKOp) || 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);
-    myVTKOp = GEOM::IVTKOperations::_narrow(myGeomEngine->GetPluginOperations(myStudyID, "VTKPluginEngine"));
+  if (CORBA::is_nil(myVTKOp)) {
+    myVTKOp = GEOM::IVTKOperations::_narrow(myGeomEngine->GetPluginOperations("VTKPluginEngine"));
   }
 }
 #endif
@@ -619,14 +521,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)
 {
   if (CORBA::is_nil(myGeomEngine))
     setGeomEngine();
-  return myGeomEngine->PublishInStudy(theStudy, theSObject, theObject, theName);
+  return myGeomEngine->PublishInStudy(theSObject, theObject, theName);
 }
 
 //============================================================================
@@ -634,13 +535,12 @@ 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);
 }
 
 //============================================================================
index 594215cc4d3d4b6221e5313e5fd681cc42bf609b..e349e061e76ef930395a269a6de0551a589ce289 100644 (file)
@@ -81,11 +81,6 @@ public:
   PortableServer::ServantBase_var GetServant(CORBA::Object_ptr       theObject,
                                              PortableServer::POA_ptr thePOA);
 
-  //-----------------------------------------------------------------------//
-  // Set current stydy ID                                                  //
-  //-----------------------------------------------------------------------//
-  void SetStudyID( CORBA::Long theId );
-
   //-----------------------------------------------------------//
   // Create ListOfGO and add items to it                       //
   //-----------------------------------------------------------//
@@ -143,13 +138,11 @@ public:
                                CORBA::Boolean isASCII);
 
   CORBA::Boolean CanPublishInStudy(CORBA::Object_ptr theIOR);
-  SALOMEDS::SObject_ptr PublishInStudy(SALOMEDS::Study_ptr theStudy,
-                                       SALOMEDS::SObject_ptr theSObject,
+  SALOMEDS::SObject_ptr PublishInStudy(SALOMEDS::SObject_ptr theSObject,
                                        CORBA::Object_ptr theObject,
                                        const char* theName) throw (SALOME::SALOME_Exception) ;
 
-  GEOM::ListOfGO* PublishNamedShapesInStudy(SALOMEDS::Study_ptr theStudy,
-                                            //SALOMEDS::SObject_ptr theSObject,
+  GEOM::ListOfGO* PublishNamedShapesInStudy(//SALOMEDS::SObject_ptr theSObject,
                                             CORBA::Object_ptr theObject);
 
   CORBA::Boolean CanCopy(SALOMEDS::SObject_ptr theObject);
@@ -790,8 +783,6 @@ public:
 private:
   SALOME_NamingService *  name_service;
   GEOM::GEOM_Gen_var      myGeomEngine;
-  CORBA::Long             myStudyID;
-  CORBA::Long             myLastStudyID; // mkr : PAL10770
   PortableServer::POA_var myPOA;
 
   GEOM::GEOM_IBasicOperations_var     myBasicOp;
index a6e18abac4e380c4ac18f92a7b2f5e91fcf2e7ee..ca263159f5e09bd99bca97e065e135607d5cd437 100644 (file)
@@ -38,9 +38,10 @@ from salome.kernel.logger import Logger
 from salome.kernel import termcolor
 logger = Logger("salome.geom.geomtools", color = termcolor.RED)
 
-from salome.kernel.studyedit import getActiveStudyId, getStudyEditor
+from salome.kernel.studyedit import getStudyEditor
 from salome.kernel.services import IDToObject, IDToSObject
 from salome.kernel.deprecation import is_called_by_sphinx
+from salome.geom import geomBuilder
 
 try:
     if not is_called_by_sphinx():
@@ -50,29 +51,16 @@ try:
 except:
     pass
 
-_geompys = {}
+_geompy = geomBuilder.New(salome.myStudy)
 
-## Return an object behaving exactly like geompy module, except that it is
-#  associated with the study \em studyId. If \em studyId is \b None, return
-#  a pseudo geompy object for the current study.
+## Return an object behaving exactly like geompy module.
 #  \ingroup geomtools
-def getGeompy(studyId = None):
+def getGeompy():
     """
-    Return an object behaving exactly like geompy module, except that it is
-    associated with the study `studyId`. If `studyId` is :const:`None`, return
-    a pseudo geompy object for the current study.
+    Return an object behaving exactly like geompy module.
     """
-    # We can't use geompy module because it initializes GEOM with
-    # salome.myStudy, which may not exist. So we use this trick to create
-    # a pseudo geompy module. 
     salome.salome_init()
-    if studyId is None:
-        studyId = getActiveStudyId()
-    if not _geompys.has_key(studyId):
-        from salome.geom import geomBuilder
-        study = salome.myStudyManager.GetStudyByID(studyId)
-        _geompys[studyId] = geomBuilder.New(study)
-    return _geompys[studyId]
+    return _geompy
 
 
 ModeWireFrame = 0
@@ -146,8 +134,7 @@ class GeomStudyTools:
         :param  folderName: the name of a folder in the GEOM part of the study
         """
         study   = self.editor.study
-        studyId = study._get_StudyId()
-        geompy  = getGeompy(studyId)
+        geompy  = getGeompy()
 
         if folderName is None:
             # Insert the shape in the study by the standard way
@@ -183,7 +170,6 @@ class GeomStudyTools:
         The underlying GEOM object is returned (so that it can be destroyed)
         """
         study = self.editor.study
-        studyId = study._get_StudyId()
         shape = self.getGeomObjectFromEntry(shapeStudyEntry)    
         studyObject = IDToSObject(shapeStudyEntry)
         self.editor.removeItem(studyObject,True)
@@ -364,13 +350,12 @@ def TEST_createAndDeleteShape():
     import salome
     salome.salome_init()
     study   = salome.myStudy
-    studyId = salome.myStudyId
 
     from salome.geom import geomtools
-    geompy = geomtools.getGeompy(studyId)
+    geompy = geomtools.getGeompy()
     
     from salome.kernel.studyedit import getStudyEditor
-    studyEditor = getStudyEditor(studyId)
+    studyEditor = getStudyEditor()
 
     gst = geomtools.GeomStudyTools(studyEditor)
 
index 80fa0612e1bcbc6e92c6331d9fac11ffcfe1ce6b..050636b78c67bd5c27a703a7de484a643d5418b2 100644 (file)
@@ -112,23 +112,15 @@ from salome.geom.structelem.parts import InvalidParameterError
 import GEOM
 
 ## This class manages the structural elements in the study. It is used to
-#  create a new structural element from a list of commands. The parameter
-#  \em studyId defines the ID of the study in which the manager will create
-#  structural elements. If it is \b None or not specified, it will use
-#  the ID of the current study as defined by 
-#  \b salome.kernel.studyedit.getActiveStudyId() function.
+#  create a new structural element from a list of commands.
 #  \ingroup structelem
 class StructuralElementManager:
     """
     This class manages the structural elements in the study. It is used to
-    create a new structural element from a list of commands. The parameter
-    `studyId` defines the ID of the study in which the manager will create
-    structural elements. If it is :const:`None` or not specified, it will use
-    the ID of the current study as defined by
-    :func:`salome.kernel.studyedit.getActiveStudyId` function.
+    create a new structural element from a list of commands.
     """
-    def __init__(self, studyId = None):
-        self._studyEditor = getStudyEditor(studyId)
+    def __init__(self):
+        self._studyEditor = getStudyEditor()
 
     ## Create a structural element from the list of commands \em commandList.
     #  Each command in this list represent a part of the structural element,
@@ -218,7 +210,7 @@ class StructuralElementManager:
         logger.debug("StructuralElementManager.createElement: START")
         logger.debug("Command list: %s" % commandList)
 
-        element = StructuralElement(self._studyEditor.studyId)
+        element = StructuralElement()
         orientationCmdList = []
         for command in commandList:
             (parttype, parameters) = command
@@ -252,9 +244,8 @@ class StructuralElementManager:
                     
                     # Create the part
                     try:
-                        part = parts.__dict__[parttype](
-                                        self._studyEditor.studyId, meshGroup,
-                                        groupGeomObj, newparams)
+                        part = parts.__dict__[parttype](meshGroup,
+                                                        groupGeomObj, newparams)
                         element.addPart(part)
                     except InvalidParameterError, e:
                         logger.error("Invalid parameter error: %s" % e)
@@ -317,30 +308,22 @@ class StructuralElementManager:
 
 
 ## This class represents a structural element, i.e. a set of geometrical
-#  objects built along geometrical primitives. The parameter \em studyId
-#  defines the ID of the study that will contain the structural element. If
-#  it is \b None or not specified, the constructor will use the ID of
-#  the active study as defined by \b salome.kernel.studyedit.getActiveStudyId
-#  function. Structural elements are normally created by the class
-#  StructuralElementManager, so this class should not be
-#  instantiated directly in the general case.
+#  objects built along geometrical primitives. Structural elements are 
+#  normally created by the class StructuralElementManager, so this class 
+#  should not be instantiated directly in the general case.
 #  \ingroup structelem
 class StructuralElement:
     """
     This class represents a structural element, i.e. a set of geometrical
-    objects built along geometrical primitives. The parameter `studyId`
-    defines the ID of the study that will contain the structural element. If
-    it is :const:`None` or not specified, the constructor will use the ID of
-    the active study as defined by :func:`salome.kernel.studyedit.getActiveStudyId`
-    function. Structural elements are normally created by the class
-    :class:`StructuralElementManager`, so this class should not be
-    instantiated directly in the general case.
+    objects built along geometrical primitives. Structural elements 
+    are normally created by the class :class:`StructuralElementManager`, 
+    so this class should not be instantiated directly in the general case.
     """
     _counter = 1
 
     MAIN_FOLDER_NAME = "Structural Elements"
 
-    def __init__(self, studyId = None):
+    def __init__(self):
         # _parts is the dictionary mapping group name to structural element
         # part. _shapeDict is the dictionary mapping SubShapeID objects to
         # structural element parts. Both are used to avoid duplicate shapes
@@ -349,9 +332,8 @@ class StructuralElement:
         self._shapeDict = {}
         self._id = StructuralElement._counter
         StructuralElement._counter += 1
-        self._studyEditor = getStudyEditor(studyId)
-        logger.debug("Creating structural element in study %s" %
-                     self._studyEditor.studyId)
+        self._studyEditor = getStudyEditor()
+        logger.debug("Creating structural element in study")
         self._SObject = None
 
     ## Find or create the study object corresponding to the structural
@@ -364,7 +346,7 @@ class StructuralElement:
         numerical ID. 
         """
         if self._SObject is None:
-            geompy = getGeompy(self._studyEditor.studyId)
+            geompy = getGeompy()
             geomComponent = self._studyEditor.study.FindComponent("GEOM")
             mainFolder = self._studyEditor.findItem(geomComponent,
                                                     name = StructuralElement.MAIN_FOLDER_NAME,
@@ -452,7 +434,7 @@ class StructuralElement:
         different parts of the structural element, and add them to the study.
         """
         gg = salome.ImportComponentGUI("GEOM")
-        geompy = getGeompy(self._studyEditor.studyId)
+        geompy = getGeompy()
         for part in self._parts.itervalues():
             # Build the structural element part
             logger.debug("Building %s" % part)
@@ -496,7 +478,7 @@ class StructuralElement:
             gg = salome.ImportComponentGUI("GEOM")
             aStudy = theSObject.GetStudy()
             useCaseBuilder = aStudy.GetUseCaseBuilder()
-            editor = getStudyEditor(aStudy._get_StudyId())
+            editor = getStudyEditor()
             aIterator = useCaseBuilder.GetUseCaseIterator(theSObject)
             aIterator.Init(False)
             while aIterator.More():
index 9b949fab65a8d5575279ee33fe94448ccb9b85b6..01b665042fff834f28e292d3b797b3a3eeafef9b 100644 (file)
@@ -119,7 +119,6 @@ class SubShapeID:
 
 ## This class is the base class for all structural element parts. It should
 #  not be instantiated directly (consider it as an "abstract" class).
-#  \param studyId (integer) the ID of the study in which the part is created.
 #  \param groupName (string) the name of the underlying geometrical primitive 
 #  in the study.
 #  \param groupGeomObj (GEOM object) the underlying geometrical primitive.
@@ -132,9 +131,6 @@ class StructuralElementPart:
     This class is the base class for all structural element parts. It should
     not be instantiated directly (consider it as an "abstract" class).
 
-    :type  studyId: integer
-    :param studyId: the ID of the study in which the part is created.
-
     :type  groupName: string
     :param groupName: the name of the underlying geometrical primitive in the
                       study.
@@ -153,7 +149,7 @@ class StructuralElementPart:
     
     DEFAULT_NAME = "StructElemPart"
 
-    def __init__(self, studyId, groupName, groupGeomObj, parameters,
+    def __init__(self, groupName, groupGeomObj, parameters,
                  name = DEFAULT_NAME, color = None):
         self._parameters = parameters
         self.groupName = groupName
@@ -161,7 +157,7 @@ class StructuralElementPart:
         self._orientation = None
         self._paramUserName = {}
         self.name = name
-        self.geom = getGeompy(studyId)
+        self.geom = getGeompy()
         self.baseShapesSet = set()
         self.isMainShape = (groupGeomObj.GetType() != 37) # See geompyDC.ShapeIdToType for type codes
         if not self.isMainShape:
@@ -236,11 +232,11 @@ class StructuralElementPart:
                                         mindim, value)
 
     ## Build the geometric shapes and the markers corresponding to the
-    #  structural element part in the study \em studyId.
+    #  structural element part in the study.
     def build(self):
         """
         Build the geometric shapes and the markers corresponding to the
-        structural element part in the study `studyId`.
+        structural element part in the study.
         """
         shape = self._buildPart()
         markers = self._buildMarkers()
@@ -308,9 +304,9 @@ class Beam(StructuralElementPart):
 
     DEFAULT_NAME = "Beam"
 
-    def __init__(self, studyId, groupName, groupGeomObj, parameters,
+    def __init__(self, groupName, groupGeomObj, parameters,
                  name = DEFAULT_NAME, color = None):
-        StructuralElementPart.__init__(self, studyId, groupName, groupGeomObj,
+        StructuralElementPart.__init__(self, groupName, groupGeomObj,
                                        parameters, name, color)
         self._orientation = orientation.Orientation1D()
 
@@ -454,7 +450,7 @@ class CircularBeam(Beam):
 
     """
 
-    def __init__(self, studyId, groupName, groupGeomObj, parameters,
+    def __init__(self, groupName, groupGeomObj, parameters,
                  name = Beam.DEFAULT_NAME, color = None):
         if color is None:
             if parameters.has_key("R1"): # variable section
@@ -462,7 +458,7 @@ class CircularBeam(Beam):
             else:                       # constant section
                 color = RED
 
-        Beam.__init__(self, studyId, groupName, groupGeomObj, parameters,
+        Beam.__init__(self, groupName, groupGeomObj, parameters,
                       name, color)
 
         self.R1 = self._getParameter(["R1", "R"])
@@ -566,7 +562,7 @@ class RectangularBeam(Beam):
 
     """
 
-    def __init__(self, studyId, groupName, groupGeomObj, parameters,
+    def __init__(self, groupName, groupGeomObj, parameters,
                  name = Beam.DEFAULT_NAME, color = None):
         if color is None:
             if parameters.has_key("HY1") or parameters.has_key("H1"):
@@ -574,7 +570,7 @@ class RectangularBeam(Beam):
             else:                  # constant section
                 color = BLUE
 
-        Beam.__init__(self, studyId, groupName, groupGeomObj, parameters,
+        Beam.__init__(self, groupName, groupGeomObj, parameters,
                       name, color)
 
         self.HY1 = self._getParameter(["HY1", "HY", "H1", "H"])
@@ -714,7 +710,7 @@ class GeneralBeam(RectangularBeam):
     parameters.
     """
 
-    def __init__(self, studyId, groupName, groupGeomObj, parameters,
+    def __init__(self, groupName, groupGeomObj, parameters,
                  name = Beam.DEFAULT_NAME, color = None):
         self.IY1 = getParameterInDict(["IY1", "IY"], parameters)
         self.IZ1 = getParameterInDict(["IZ1", "IZ"], parameters)
@@ -733,7 +729,7 @@ class GeneralBeam(RectangularBeam):
             else:                         # constant section
                 color = GREEN
 
-        RectangularBeam.__init__(self, studyId, groupName, groupGeomObj, parameters,
+        RectangularBeam.__init__(self, groupName, groupGeomObj, parameters,
                                  name, color)
 
 ## This class is an "abstract" class for all 2D structural element parts. It
@@ -749,9 +745,9 @@ class StructuralElementPart2D(StructuralElementPart):
 
     DEFAULT_NAME = "StructuralElementPart2D"
 
-    def __init__(self, studyId, groupName, groupGeomObj, parameters,
+    def __init__(self, groupName, groupGeomObj, parameters,
                  name = DEFAULT_NAME):
-        StructuralElementPart.__init__(self, studyId, groupName, groupGeomObj,
+        StructuralElementPart.__init__(self, groupName, groupGeomObj,
                                        parameters, name)
         self._orientation = orientation.Orientation2D(
                                         self._getParameter(["angleAlpha"]),
@@ -834,9 +830,9 @@ class ThickShell(StructuralElementPart2D):
 
     DEFAULT_NAME = "ThickShell"
 
-    def __init__(self, studyId, groupName, groupGeomObj, parameters,
+    def __init__(self, groupName, groupGeomObj, parameters,
                  name = DEFAULT_NAME):
-        StructuralElementPart2D.__init__(self, studyId, groupName,
+        StructuralElementPart2D.__init__(self, groupName,
                                          groupGeomObj, parameters, name)
         self.thickness = self._getParameter(["Epais"])
         logger.debug(repr(self))
@@ -978,9 +974,9 @@ class Grid(StructuralElementPart2D):
 
     DEFAULT_NAME = "Grid"
 
-    def __init__(self, studyId, groupName, groupGeomObj, parameters,
+    def __init__(self, groupName, groupGeomObj, parameters,
                  name = DEFAULT_NAME):
-        StructuralElementPart2D.__init__(self, studyId, groupName,
+        StructuralElementPart2D.__init__(self, groupName,
                                          groupGeomObj, parameters, name)
         self.xr = self._getParameter(["origAxeX"])
         self.yr = self._getParameter(["origAxeY"])
@@ -1106,82 +1102,82 @@ class Grid(StructuralElementPart2D):
 
 ## Alias for class GeneralBeam.
 #  \ingroup parts
-def VisuPoutreGenerale(studyId, groupName, groupGeomObj, parameters,
+def VisuPoutreGenerale(groupName, groupGeomObj, parameters,
                        name = "POUTRE"):
     """
     Alias for class :class:`GeneralBeam`.
     """
-    return GeneralBeam(studyId, groupName, groupGeomObj, parameters, name)
+    return GeneralBeam(groupName, groupGeomObj, parameters, name)
 
 ## Alias for class CircularBeam.
 #  \ingroup parts
-def VisuPoutreCercle(studyId, groupName, groupGeomObj, parameters,
+def VisuPoutreCercle(groupName, groupGeomObj, parameters,
                      name = "POUTRE"):
     """
     Alias for class :class:`CircularBeam`.
     """
-    return CircularBeam(studyId, groupName, groupGeomObj, parameters, name)
+    return CircularBeam(groupName, groupGeomObj, parameters, name)
 
 ## Alias for class RectangularBeam. 
 #  \ingroup parts
-def VisuPoutreRectangle(studyId, groupName, groupGeomObj, parameters,
+def VisuPoutreRectangle(groupName, groupGeomObj, parameters,
                         name = "POUTRE"):
     """
     Alias for class :class:`RectangularBeam`.
     """
-    return RectangularBeam(studyId, groupName, groupGeomObj, parameters, name)
+    return RectangularBeam(groupName, groupGeomObj, parameters, name)
 
 ## Alias for class GeneralBeam.  
 #  \ingroup parts
-def VisuBarreGenerale(studyId, groupName, groupGeomObj, parameters,
+def VisuBarreGenerale(groupName, groupGeomObj, parameters,
                       name = "BARRE"):
     """
     Alias for class :class:`GeneralBeam`.
     """
-    return GeneralBeam(studyId, groupName, groupGeomObj, parameters, name,
+    return GeneralBeam(groupName, groupGeomObj, parameters, name,
                        color = ORANGE)
 
 ## Alias for class RectangularBeam.      
 #  \ingroup parts
-def VisuBarreRectangle(studyId, groupName, groupGeomObj, parameters,
+def VisuBarreRectangle(groupName, groupGeomObj, parameters,
                        name = "BARRE"):
     """
     Alias for class :class:`RectangularBeam`.
     """
-    return RectangularBeam(studyId, groupName, groupGeomObj, parameters, name,
+    return RectangularBeam(groupName, groupGeomObj, parameters, name,
                            color = ORANGE)
 
 ## Alias for class CircularBeam.
 #  \ingroup parts
-def VisuBarreCercle(studyId, groupName, groupGeomObj, parameters,
+def VisuBarreCercle(groupName, groupGeomObj, parameters,
                     name = "BARRE"):
     """
     Alias for class :class:`CircularBeam`.
     """
-    return CircularBeam(studyId, groupName, groupGeomObj, parameters, name,
+    return CircularBeam(groupName, groupGeomObj, parameters, name,
                         color = ORANGE)
 
 ## Alias for class CircularBeam.
 #  \ingroup parts
-def VisuCable(studyId, groupName, groupGeomObj, parameters, name = "CABLE"):
+def VisuCable(groupName, groupGeomObj, parameters, name = "CABLE"):
     """
     Alias for class :class:`CircularBeam`.
     """
-    return CircularBeam(studyId, groupName, groupGeomObj, parameters, name,
+    return CircularBeam(groupName, groupGeomObj, parameters, name,
                         color = PURPLE)
 
 ## Alias for class ThickShell.
 #  \ingroup parts
-def VisuCoque(studyId, groupName, groupGeomObj, parameters, name = "COQUE"):
+def VisuCoque(groupName, groupGeomObj, parameters, name = "COQUE"):
     """
     Alias for class :class:`ThickShell`.
     """
-    return ThickShell(studyId, groupName, groupGeomObj, parameters, name)
+    return ThickShell(groupName, groupGeomObj, parameters, name)
 
 ## Alias for class Grid.
 #  \ingroup parts
-def VisuGrille(studyId, groupName, groupGeomObj, parameters, name = "GRILLE"):
+def VisuGrille(groupName, groupGeomObj, parameters, name = "GRILLE"):
     """
     Alias for class :class:`Grid`.
     """
-    return Grid(studyId, groupName, groupGeomObj, parameters, name)
+    return Grid(groupName, groupGeomObj, parameters, name)
index 709de6c10485d82a26f53c145cf9b4423a5df194..4309815fd68db24693839adb3496222a893addea 100644 (file)
@@ -23,7 +23,7 @@ from GEOM import IAdvancedOperations
 __libraryName__ = "AdvancedEngine"
 
 def GetAdvancedOperations(self):
-    anOp = self.GetPluginOperations(self.myStudyId, __libraryName__)
+    anOp = self.GetPluginOperations(__libraryName__)
     return anOp._narrow(IAdvancedOperations)
 
 ## Create a T-shape object with specified caracteristics for the main
index 11a25726d0acb9a4dba2a05c31afce932df4e37c..0ffa6cb7b8c62db346b86abc65cbce44e89a3c14 100644 (file)
@@ -24,7 +24,7 @@ from GEOM import IBREPOperations
 __libraryName__ = "BREPPluginEngine"
 
 def GetBREPPluginOperations(self):
-    anOp = self.GetPluginOperations(self.myStudyId, __libraryName__)
+    anOp = self.GetPluginOperations(__libraryName__)
     return anOp._narrow(IBREPOperations)
 
 ## Export the given shape into a file with given name in BREP format.
index 95705536f39e2f8f5f5bd25c30ec6a76e043c5d4..d3b3d63c5f03be2674e2293dd9ec2e9b1b9cbc4d 100644 (file)
@@ -49,10 +49,10 @@ obj5_entry = geompy.addToStudy(obj5, "Object5")
 hasInfo = geompy.hasObjectInfo()
 print "Check if GEOM module provides information about its objects: ", hasInfo
 if hasInfo == True:
-    print "Information about first  object: ", geompy.getObjectInfo(salome.myStudyId, obj1_entry)
-    print "Information about second object: ", geompy.getObjectInfo(salome.myStudyId, obj2_entry)
-    print "Information about third  object: ", geompy.getObjectInfo(salome.myStudyId, obj3_entry)
-    print "Information about fourth object: ", geompy.getObjectInfo(salome.myStudyId, obj4_entry)
-    print "Information about fifth  object: ", geompy.getObjectInfo(salome.myStudyId, obj5_entry)
+    print "Information about first  object: ", geompy.getObjectInfo(obj1_entry)
+    print "Information about second object: ", geompy.getObjectInfo(obj2_entry)
+    print "Information about third  object: ", geompy.getObjectInfo(obj3_entry)
+    print "Information about fourth object: ", geompy.getObjectInfo(obj4_entry)
+    print "Information about fifth  object: ", geompy.getObjectInfo(obj5_entry)
 
 salome.sg.updateObjBrowser(True)
index 6c0fdf11c758b5d0a8f5d225d3cb089f01214bd7..8ad2032a5cbfe98964430d7823cc3947f9fcc4df 100644 (file)
@@ -36,10 +36,10 @@ import math
 geom = salome.lcc.FindOrLoadComponent("FactoryServer", "GEOM")
 myBuilder = salome.myStudy.NewBuilder()
 
-BasicOp  = geom.GetIBasicOperations(salome.myStudyId)
-PrimOp   = geom.GetI3DPrimOperations(salome.myStudyId)
-InsertOp = geom.GetIInsertOperations(salome.myStudyId)
-TrsfOp   = geom.GetITransformOperations(salome.myStudyId)
+BasicOp  = geom.GetIBasicOperations()
+PrimOp   = geom.GetI3DPrimOperations()
+InsertOp = geom.GetIInsertOperations()
+TrsfOp   = geom.GetITransformOperations()
 
 point0  = BasicOp.MakePointXYZ(0.,0.,0.)
 pointz1 = BasicOp.MakePointXYZ(0.,0.,1.)
index 147d000108f37bd4c1a5122f6b28c5c96325f108..f3bd2b6eaea860bee738d4613b2e4a80efc505a1 100644 (file)
@@ -37,10 +37,10 @@ import salome_ComponentGUI
 
 gg = salome.ImportComponentGUI("GEOM")
 
-BasicOp  = geompy.GetIBasicOperations(salome.myStudyId)
-PrimOp   = geompy.GetI3DPrimOperations(salome.myStudyId)
-InsertOp = geompy.GetIInsertOperations(salome.myStudyId)
-TrsfOp   = geompy.GetITransformOperations(salome.myStudyId)
+BasicOp  = geompy.GetIBasicOperations()
+PrimOp   = geompy.GetI3DPrimOperations()
+InsertOp = geompy.GetIInsertOperations()
+TrsfOp   = geompy.GetITransformOperations()
 
 point0  = BasicOp.MakePointXYZ(0.,0.,0.)
 pointz1 = BasicOp.MakePointXYZ(0.,0.,1.)
index 029e548fc27211d8a0527479ba5e14283c4008a6..710181ac760ad1c8c9d85d8e0288c998c0738a11 100644 (file)
@@ -33,7 +33,7 @@ from salome.geom import geomBuilder
 geompy = geomBuilder.New(salome.myStudy)
 
 #Create Points
-BasicOp = geompy.GetIBasicOperations(salome.myStudyId)
+BasicOp = geompy.GetIBasicOperations()
 Vertex1 = BasicOp.MakePointXYZ(0., 0., 0.)
 Vertex2 = BasicOp.MakePointXYZ(100., 20., 30.)
 Vertex3 = BasicOp.MakePointXYZ(150., 100., -25.)
index f2e606a1600f7d79ee04d856450071181f589481..847e36482727a361b14d4ec8d1b7f59ec540b74a 100644 (file)
@@ -56,7 +56,7 @@ PosCour = PosZ + HauteurT * 4 / 7
 PosRot = PosZ + 0.9 * HauteurT
 
 #Points
-BasicOp = geompy.GetIBasicOperations(salome.myStudyId)
+BasicOp = geompy.GetIBasicOperations()
 OO = BasicOp.MakePointXYZ(0, 0, 0)
 P0 = BasicOp.MakePointXYZ(0, 0, 1)
 P1 = BasicOp.MakePointXYZ(PosX, PosY, PosZ)
index 65fad3f195ba526882aa54d3fb7c1ac601d5f679..0e686ee9f2f47bfa9050f3d6b5d6e8fe1b5c49a7 100644 (file)
@@ -24,7 +24,7 @@ from GEOM import IIGESOperations
 __libraryName__ = "IGESPluginEngine"
 
 def GetIGESPluginOperations(self):
-    anOp = self.GetPluginOperations(self.myStudyId, __libraryName__)
+    anOp = self.GetPluginOperations(__libraryName__)
     return anOp._narrow(IIGESOperations)
 
 ## Export the given shape into a file with given name in IGES format.
index 7f1633502ea838b86a7aee1c99ec5d2fa8a1c3c6..e2c0d49064bbbaf514ec6504c5757932966c6ff3 100755 (executable)
@@ -80,11 +80,11 @@ theFilenameToSave = theHomePath + "/Pyramid.hdf"
 if os.access(theFilenameToSave, os.F_OK):
     if os.access(theFilenameToSave, os.W_OK):
         os.remove(theFilenameToSave)
-        salome.myStudyManager.SaveAs(theFilenameToSave, salome.myStudy, 0)
+        salome.myStudy.SaveAs(theFilenameToSave, 0)
     else:
         print "You have no enough permissions to overwrite HDF file: ",theFilenameToSave
 else:
-    salome.myStudyManager.SaveAs(theFilenameToSave, salome.myStudy, 0)
+    salome.myStudy.SaveAs(theFilenameToSave, 0)
     
 
 salome.sg.updateObjBrowser(True)
index 84ac4cf0ca653f9c6894ce68532e9caf82fd1723..4f38b2f8fa4e2928cbcf6f6365d2f9bbe0836143 100644 (file)
@@ -25,7 +25,7 @@ import GEOM
 __libraryName__ = "STEPPluginEngine"
 
 def GetSTEPPluginOperations(self):
-    anOp = self.GetPluginOperations(self.myStudyId, __libraryName__)
+    anOp = self.GetPluginOperations(__libraryName__)
     return anOp._narrow(ISTEPOperations)
 
 ## Export the given shape into a file with given name in STEP format.
index 1ee593c1352ee96d06ce3823791809e1ab59dabd..01a3791fca3f1816ddba8aea75e94009dce301f8 100644 (file)
@@ -24,7 +24,7 @@ from GEOM import ISTLOperations
 __libraryName__ = "STLPluginEngine"
 
 def GetSTLPluginOperations(self):
-    anOp = self.GetPluginOperations(self.myStudyId, __libraryName__)
+    anOp = self.GetPluginOperations(__libraryName__)
     return anOp._narrow(ISTLOperations)
 
 ## Export the given shape into a file with given name in STL format.
index c970486509f25beac3d49af0c1fe0fe03a731d8d..044720f10ea4080c6446b2a13258d3356288a020 100644 (file)
@@ -24,7 +24,7 @@ from GEOM import IVTKOperations
 __libraryName__ = "VTKPluginEngine"
 
 def GetVTKPluginOperations(self):
-    anOp = self.GetPluginOperations(self.myStudyId, __libraryName__)
+    anOp = self.GetPluginOperations(__libraryName__)
     return anOp._narrow(IVTKOperations)
 
 ## Export the given shape into a file with given name in VTK format.
index aeffc075ed7c945552ae0f1cf7ea3b4d51ffac9e..4f826197e219315f4ff4c4020cb884e6cb3df465 100644 (file)
@@ -24,7 +24,7 @@ from GEOM import IXAOOperations
 __libraryName__ = "XAOPluginEngine"
 
 def GetXAOPluginOperations(self):
-    anOp = self.GetPluginOperations(self.myStudyId, __libraryName__)
+    anOp = self.GetPluginOperations(__libraryName__)
     return anOp._narrow(IXAOOperations)
 
 ## Export a shape to XAO format
index a7fced187856d4366aca7d31d24459f6f7e21777..3b2f724c6d05b9a2b50589d69cbd3f36351289c1 100644 (file)
@@ -652,7 +652,6 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
               GEOM._objref_GEOM_Gen.__init__(self)
               self.myMaxNbSubShapesAllowed = 0 # auto-publishing is disabled by default
               self.myBuilder = None
-              self.myStudyId = 0
               self.father    = None
 
               self.BasicOp  = None
@@ -755,7 +754,6 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
         ## @{
         def init_geom(self,theStudy):
             self.myStudy = theStudy
-            self.myStudyId = self.myStudy._get_StudyId()
             self.myBuilder = self.myStudy.NewBuilder()
             self.father = self.myStudy.FindComponent("GEOM")
             notebook.myStudy = theStudy
@@ -769,19 +767,19 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
                 aPixmap.SetPixMap("ICON_OBJBROWSER_Geometry")
                 self.myBuilder.DefineComponentInstance(self.father,self)
                 pass
-            self.BasicOp  = self.GetIBasicOperations    (self.myStudyId)
-            self.CurvesOp = self.GetICurvesOperations   (self.myStudyId)
-            self.PrimOp   = self.GetI3DPrimOperations   (self.myStudyId)
-            self.ShapesOp = self.GetIShapesOperations   (self.myStudyId)
-            self.HealOp   = self.GetIHealingOperations  (self.myStudyId)
-            self.InsertOp = self.GetIInsertOperations   (self.myStudyId)
-            self.BoolOp   = self.GetIBooleanOperations  (self.myStudyId)
-            self.TrsfOp   = self.GetITransformOperations(self.myStudyId)
-            self.LocalOp  = self.GetILocalOperations    (self.myStudyId)
-            self.MeasuOp  = self.GetIMeasureOperations  (self.myStudyId)
-            self.BlocksOp = self.GetIBlocksOperations   (self.myStudyId)
-            self.GroupOp  = self.GetIGroupOperations    (self.myStudyId)
-            self.FieldOp  = self.GetIFieldOperations    (self.myStudyId)
+            self.BasicOp  = self.GetIBasicOperations    ()
+            self.CurvesOp = self.GetICurvesOperations   ()
+            self.PrimOp   = self.GetI3DPrimOperations   ()
+            self.ShapesOp = self.GetIShapesOperations   ()
+            self.HealOp   = self.GetIHealingOperations  ()
+            self.InsertOp = self.GetIInsertOperations   ()
+            self.BoolOp   = self.GetIBooleanOperations  ()
+            self.TrsfOp   = self.GetITransformOperations()
+            self.LocalOp  = self.GetILocalOperations    ()
+            self.MeasuOp  = self.GetIMeasureOperations  ()
+            self.BlocksOp = self.GetIBlocksOperations   ()
+            self.GroupOp  = self.GetIGroupOperations    ()
+            self.FieldOp  = self.GetIFieldOperations    ()
 
             # set GEOM as root in the use case tree
             self.myUseCaseBuilder = self.myStudy.GetUseCaseBuilder()
@@ -792,8 +790,8 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
             self.myBuilder.LoadWith(self.father, self)
             pass
 
-        def GetPluginOperations(self, studyID, libraryName):
-            op = GEOM._objref_GEOM_Gen.GetPluginOperations(self, studyID, libraryName)
+        def GetPluginOperations(self, libraryName):
+            op = GEOM._objref_GEOM_Gen.GetPluginOperations(self, libraryName)
             return op
 
         ## Enable / disable results auto-publishing
index 9a810d39cacb2b6b723f833985f4420af152f541..7a0e4450d9130d6dbb6b9bef15692ba5a63eab56 100644 (file)
@@ -248,7 +248,7 @@ int GEOM_Swig::getIndexTopology( const char* theSubIOR, const char* theMainIOR )
   if ( !CORBA::is_nil( aGeomGen ) && !CORBA::is_nil( aMainShape ) && !CORBA::is_nil( aSubShape ) ) {
     // get shapes operations interface
     GEOM::GEOM_IShapesOperations_var anIShapesOperations =
-      aGeomGen->GetIShapesOperations( aMainShape->GetStudyID() );
+      aGeomGen->GetIShapesOperations();
     if ( !CORBA::is_nil( anIShapesOperations ) )
       index = anIShapesOperations->GetTopologyIndex( aMainShape, aSubShape );
   }
@@ -275,7 +275,7 @@ const char* GEOM_Swig::getShapeTypeString( const char* theIOR )
   if ( !CORBA::is_nil( aGeomGen ) && !CORBA::is_nil( aShape ) ) {
     // get shapes operations interface
     GEOM::GEOM_IShapesOperations_var anIShapesOperations =
-      aGeomGen->GetIShapesOperations( aShape->GetStudyID() );
+      aGeomGen->GetIShapesOperations();
     if ( !CORBA::is_nil( anIShapesOperations ) )
       aTypeName = anIShapesOperations->GetShapeTypeString( aShape );
   }
index 62020f0a396822e54a713aefcdd61855d9dbf452..da51a7bee06c0c2c10dba7d3cfb68b13f0192c30 100644 (file)
@@ -327,7 +327,7 @@ void GenerationGUI_FillingDlg::ApproxChanged()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr GenerationGUI_FillingDlg::createOperation()
 {
-  return getGeomEngine()->GetI3DPrimOperations(getStudyId());
+  return getGeomEngine()->GetI3DPrimOperations();
 }
 
 //=================================================================================
index d4e23678e0dbe484987eb4fb35c9104a3206967d..c0c21aa0e04e89afd65720d075217ea4142f74e2 100644 (file)
@@ -502,7 +502,7 @@ void GenerationGUI_PipeDlg::enterEvent (QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr GenerationGUI_PipeDlg::createOperation()
 {
-  return getGeomEngine()->GetI3DPrimOperations(getStudyId());
+  return getGeomEngine()->GetI3DPrimOperations();
 }
 
 //=================================================================================
index 25deeaee017a9f42f1bdae2a895b8e51019dd264..5b09040cf4a66bbd03da57f7c02fbbc0266e9da6 100644 (file)
@@ -339,7 +339,7 @@ void GenerationGUI_PipePathDlg::enterEvent (QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr GenerationGUI_PipePathDlg::createOperation()
 {
-  return getGeomEngine()->GetI3DPrimOperations(getStudyId());
+  return getGeomEngine()->GetI3DPrimOperations();
 }
 
 //=================================================================================
index 8403c41e49890d156e525b209780da95aefa14ca..379b1fd49cf28389bf9235a468cfae57127561f9 100644 (file)
@@ -526,7 +526,7 @@ void GenerationGUI_PrismDlg::ValueChangedInSpinBox()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr GenerationGUI_PrismDlg::createOperation()
 {
-  return getGeomEngine()->GetI3DPrimOperations(getStudyId());
+  return getGeomEngine()->GetI3DPrimOperations();
 }
 
 //=================================================================================
index 59b9012861aedd7b31a5cb7b70b7d76609a780f4..5019de5457ff9c1d5208365135cefc762f01c687 100644 (file)
@@ -296,7 +296,7 @@ double GenerationGUI_RevolDlg::getAngle() const
 //=================================================================================
 GEOM::GEOM_IOperations_ptr GenerationGUI_RevolDlg::createOperation()
 {
-  return getGeomEngine()->GetI3DPrimOperations(getStudyId());
+  return getGeomEngine()->GetI3DPrimOperations();
 }
 
 //=================================================================================
index fb866c1656e83d4d65192c731e2da63b03ee60a7..0d8a2cf1b9f1a71192e9ae31955775ca03e9d0f9 100644 (file)
@@ -376,7 +376,7 @@ void GenerationGUI_ThicknessDlg::ValueChangedInSpinBox()
 //==============================================================================
 GEOM::GEOM_IOperations_ptr GenerationGUI_ThicknessDlg::createOperation()
 {
-  return getGeomEngine()->GetI3DPrimOperations(getStudyId());
+  return getGeomEngine()->GetI3DPrimOperations();
 }
 
 //==============================================================================
index 994868603bf7374ebc6d1f928486056667025425..b309e74cb7f2492f43fe6d04c9ad9f26b2acb0ec 100644 (file)
@@ -265,7 +265,7 @@ void GroupGUI_BooleanDlg::enterEvent (QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr GroupGUI_BooleanDlg::createOperation()
 {
-  return getGeomEngine()->GetIGroupOperations(getStudyId());
+  return getGeomEngine()->GetIGroupOperations();
 }
 
 //=================================================================================
index a7ce624ec35f4e87a713f93b9ae5da102c363753..f83147551aa918820cc726cc9d92a326749c5b2f 100644 (file)
@@ -509,7 +509,7 @@ void GroupGUI_GroupDlg::onGetInPlace()
       SUIT_OverrideCursor wc;
       myEditCurrentArgument->setText(GEOMBase::GetName(anObj));
       GEOM::GEOM_IShapesOperations_var aShapesOp =
-        getGeomEngine()->GetIShapesOperations(getStudyId());
+        getGeomEngine()->GetIShapesOperations();
       if (subSelectionWay() == GET_IN_PLACE) {
         GEOM::GEOM_Object_var aGetInPlaceObj = aShapesOp->GetInPlace(myMainObj, anObj);
         setInPlaceObj(aGetInPlaceObj);
@@ -542,8 +542,8 @@ void GroupGUI_GroupDlg::setInPlaceObj(GEOM::GEOM_Object_var theObj, const bool i
   // build map of indices
   myMain2InPlaceIndices.Clear();
   if (!myInPlaceObj->_is_nil()) {
-    GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations(getStudyId());
-    GEOM::GEOM_ILocalOperations_var aLocOp = getGeomEngine()->GetILocalOperations(getStudyId());
+    GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations();
+    GEOM::GEOM_ILocalOperations_var aLocOp = getGeomEngine()->GetILocalOperations();
 
     GEOM::ListOfGO_var aSubObjects = aShapesOp->MakeExplode(myInPlaceObj, getShapeType(), false);
     for ( int i = 0; i < aSubObjects->length(); i++ )
@@ -696,7 +696,7 @@ void GroupGUI_GroupDlg::selectAllSubShapes()
     return;
 
   GEOM::ListOfLong_var aSubShapes;
-  GEOM::GEOM_IShapesOperations_var aShOp = getGeomEngine()->GetIShapesOperations(getStudyId());
+  GEOM::GEOM_IShapesOperations_var aShOp = getGeomEngine()->GetIShapesOperations();
   aSubShapes = aShOp->SubShapeAllIDs(myMainObj, getShapeType(), false);
   if (aSubShapes->length() > 0) {
     if (subSelectionWay() == ALL_SUBSHAPES)
@@ -1171,7 +1171,7 @@ void GroupGUI_GroupDlg::updateState (bool isAdd)
                           myIsShapeType &&
                           getShapeType() != TopAbs_VERTEX);
   // manage of 'Plot' button access
-  GEOM::GEOM_IShapesOperations_var aShOp = getGeomEngine()->GetIShapesOperations( getStudyId() );
+  GEOM::GEOM_IShapesOperations_var aShOp = getGeomEngine()->GetIShapesOperations();
   GEOM::ListOfLong_var aSubShapes = aShOp->SubShapeAllIDs( myMainObj, getShapeType(), false );
   bool hasCurrentEntities = aSubShapes->length() > 0;
 #ifndef DISABLE_PLOT2DVIEWER
@@ -1252,7 +1252,7 @@ void GroupGUI_GroupDlg::highlightSubShapes()
   SALOME_ListIO aSelList;
 
   // To highlight the selected sub-shape in Object Browser, if it's already published under the main shape
-  GEOM::GEOM_ILocalOperations_var aLocOp = getGeomEngine()->GetILocalOperations(getStudyId());
+  GEOM::GEOM_ILocalOperations_var aLocOp = getGeomEngine()->GetILocalOperations();
   QMap<int, QString> childsMap;
   SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>(app->activeStudy());
   if (appStudy) {
@@ -1311,7 +1311,7 @@ void GroupGUI_GroupDlg::highlightSubShapes()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr GroupGUI_GroupDlg::createOperation()
 {
-  return getGeomEngine()->GetIGroupOperations(getStudyId());
+  return getGeomEngine()->GetIGroupOperations();
 }
 
 #define RETURN_WITH_MSG(a, b) \
index f775a93b579f6fe5f130cf5b2b56917cb32f3ac4..ba8b743e1e7c54644192362f6f36b7686796b000 100644 (file)
@@ -110,8 +110,7 @@ bool IGESPlugin_GUI::importIGES( SUIT_Desktop* parent )
   SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*> ( app->activeStudy() );
   if ( !study ) return false;
 
-  SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
-  GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "IGESPluginEngine" );
+  GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( "IGESPluginEngine" );
   IGESOpPtr igesOp = GEOM::IIGESOperations::_narrow( op );
   if ( igesOp.isNull() ) return false;
 
@@ -177,10 +176,9 @@ bool IGESPlugin_GUI::importIGES( SUIT_Desktop* parent )
        {
          GEOM::GEOM_Object_var main = result[0];
          QString publishName = GEOMBase::GetDefaultName( SUIT_Tools::file( fileName, true ) );
-         SALOMEDS::SObject_var so = GeometryGUI::GetGeomGen()->PublishInStudy( dsStudy,
-                                                                               SALOMEDS::SObject::_nil(),
-                                                                               main.in(),
-                                                                               publishName.toUtf8().constData() );
+         SALOMEDS::SObject_var so = GeometryGUI::GetGeomGen()->PublishInStudy( SALOMEDS::SObject::_nil(),
+                                                                                                                   main.in(),
+                                                                                                                   publishName.toUtf8().constData() );
          
          entryList.append( so->GetID() );
          transaction.commit();
@@ -223,8 +221,7 @@ bool IGESPlugin_GUI::exportIGES( SUIT_Desktop* parent )
   SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*> ( app->activeStudy() );
   if ( !study ) return false;
 
-  SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
-  GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "IGESPluginEngine" );
+  GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( "IGESPluginEngine" );
   IGESOpPtr igesOp = GEOM::IIGESOperations::_narrow( op );
   if ( igesOp.isNull() ) return false;
 
index 209ce65c1b77fb873223b360e1af7d52768fbffd..e2f964390dec9da9a5bab6bd1968054287af80dd 100644 (file)
@@ -32,7 +32,7 @@
 // OCCT includes
 #include <TFunction_DriverTable.hxx>
 
-std::map <int, IGESPlugin_IOperations*> IGESPlugin_OperationsCreator::_mapOfOperations;
+IGESPlugin_IOperations* IGESPlugin_OperationsCreator::_operation;
 
 IGESPlugin_OperationsCreator::IGESPlugin_OperationsCreator()
 {
@@ -54,19 +54,16 @@ IGESPlugin_OperationsCreator::~IGESPlugin_OperationsCreator()
 }
 
 GEOM_IOperations_i* IGESPlugin_OperationsCreator::Create( PortableServer::POA_ptr thePOA,
-                                                          int                     theStudyId,
                                                           GEOM::GEOM_Gen_ptr      theEngine,
                                                           ::GEOMImpl_Gen*         theGenImpl )
 {
   Unexpect aCatch( SALOME_SalomeException );
   MESSAGE( "IGESPlugin_OperationsCreator::Create" );
-  return new IGESPlugin_IOperations_i( thePOA, theEngine, get( theGenImpl, theStudyId ) );
+  _operation = new IGESPlugin_IOperations( theGenImpl );
+  return new IGESPlugin_IOperations_i( thePOA, theEngine, _operation );
 }
 
-IGESPlugin_IOperations* IGESPlugin_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl,
-                                                          int             theStudyId )
+IGESPlugin_IOperations* IGESPlugin_OperationsCreator::get()
 {
-  if (_mapOfOperations.find( theStudyId ) == _mapOfOperations.end() )
-    _mapOfOperations[theStudyId] = new IGESPlugin_IOperations( theGenImpl, theStudyId );
-  return _mapOfOperations[theStudyId];
+  return _operation;
 }
index cd507e7c10f601916479a8a94f106a0b7433a4cd..066bcb543c97de8500d6b205c438ed1c2008c4b5 100755 (executable)
@@ -41,15 +41,13 @@ public:
   ~IGESPlugin_OperationsCreator();
 
   GEOM_IOperations_i* Create( PortableServer::POA_ptr thePOA,
-                             int                     theStudyId,
-                             GEOM::GEOM_Gen_ptr      theEngine,
-                             ::GEOMImpl_Gen*         theGenImpl );
+                                         GEOM::GEOM_Gen_ptr      theEngine,
+                                         ::GEOMImpl_Gen*         theGenImpl );
 private:
-  static IGESPlugin_IOperations* get( ::GEOMImpl_Gen*         theGenImpl,
-                                     int                     theStudyId );
+  static IGESPlugin_IOperations* get();
 
 private:
-  static std::map <int, IGESPlugin_IOperations*>  _mapOfOperations;
+  IGESPlugin_IOperations*  _operation;
 
   friend class IGESPlugin_IECallBack;
 };
index 574e7a31500700e76a4a97e2c4080f7f67c32b54..4f87282d319c87a26c324086a51ae125b0af64bc 100644 (file)
@@ -273,7 +273,7 @@ void MeasureGUI_BndBoxDlg::SelectionIntoArgument()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr MeasureGUI_BndBoxDlg::createOperation()
 {
-  return getGeomEngine()->GetIMeasureOperations(getStudyId());
+  return getGeomEngine()->GetIMeasureOperations();
 }
 
 //=================================================================================
index 301ba442b8bf78802d505d8a29ec074c437529b9..8450ba064a257f2f76b3826c715c7880d3158f85 100644 (file)
@@ -272,7 +272,7 @@ void MeasureGUI_CenterMassDlg::enterEvent( QEvent* )
 //=================================================================================
 GEOM::GEOM_IOperations_ptr MeasureGUI_CenterMassDlg::createOperation()
 {
-  return getGeomEngine()->GetIMeasureOperations( getStudyId() );
+  return getGeomEngine()->GetIMeasureOperations();
 }
 
 //=================================================================================
index bd78dd2fb0a8f58547c67d7ae9280c0d7be397a3..33eb7509cb304de05cfa9673f1787714e77b0520 100644 (file)
@@ -394,7 +394,7 @@ void MeasureGUI_CheckCompoundOfBlocksDlg::processObject()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr MeasureGUI_CheckCompoundOfBlocksDlg::createOperation()
 {
-  return getGeomEngine()->GetIBlocksOperations( getStudyId() );
+  return getGeomEngine()->GetIBlocksOperations();
 }
 
 //=================================================================================
index 41c0d94ffe53ac9e2d5b77d180429f6c7b23ed35..cdcf96403b88bae78fc6b5f5e8ad51ce621dc7e9 100644 (file)
@@ -486,7 +486,7 @@ bool MeasureGUI_CheckSelfIntersectionsDlg::extractPrefix() const
 //=================================================================================
 GEOM::GEOM_IOperations_ptr MeasureGUI_CheckSelfIntersectionsDlg::createOperation()
 {
-  return getGeomEngine()->GetIMeasureOperations( getStudyId() );
+  return getGeomEngine()->GetIMeasureOperations();
 }
 
 //=================================================================================
@@ -710,7 +710,7 @@ bool MeasureGUI_CheckSelfIntersectionsDlg::execute(ObjectList& objects)
     }
   }
 
-  GEOM::ShapesOpPtr shapesOper = getGeomEngine()->GetIShapesOperations(getStudyId());
+  GEOM::ShapesOpPtr shapesOper = getGeomEngine()->GetIShapesOperations();
   
   // Explode sub-shapes
   GEOM::ListOfLong_var anArray   = new GEOM::ListOfLong;
index 25907ba4511035f96deda1540b88ffc451ac92db..263bb27a59b755a4d3ca203e29a42c9826ba8534 100644 (file)
@@ -445,7 +445,7 @@ void MeasureGUI_CheckShapeDlg::processObject()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr MeasureGUI_CheckShapeDlg::createOperation()
 {
-  return getGeomEngine()->GetIMeasureOperations( getStudyId() );
+  return getGeomEngine()->GetIMeasureOperations();
 }
 
 //=================================================================================
@@ -625,7 +625,7 @@ bool MeasureGUI_CheckShapeDlg::execute( ObjectList& objects )
   }
 
   if (myShapesOper->_is_nil()) {
-    myShapesOper = getGeomEngine()->GetIShapesOperations(getStudyId());
+    myShapesOper = getGeomEngine()->GetIShapesOperations();
   }
 
   GEOM::ListOfGO_var aList = myShapesOper->MakeSubShapes(myObj, anArray);
index 7dd84b34fc574ebd91d401ebd465096a047f040e..9934c3230028512a79611b2c3ab074b9afa9fb21 100644 (file)
@@ -415,7 +415,7 @@ SALOME_Prs* MeasureGUI_DistanceDlg::buildPrs()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr MeasureGUI_DistanceDlg::createOperation()
 {
-  return getGeomEngine()->GetIMeasureOperations(getStudyId());
+  return getGeomEngine()->GetIMeasureOperations();
 }
 
 //=================================================================================
@@ -434,7 +434,7 @@ bool MeasureGUI_DistanceDlg::isValid (QString& msg)
 bool MeasureGUI_DistanceDlg::execute (ObjectList& objects)
 {
   GEOM::GEOM_IMeasureOperations_var anOper = GEOM::GEOM_IMeasureOperations::_narrow(getOperation());
-  GEOM::GEOM_IBasicOperations_var aBasicOper = getGeomEngine()->GetIBasicOperations(getStudyId());
+  GEOM::GEOM_IBasicOperations_var aBasicOper = getGeomEngine()->GetIBasicOperations();
 
   GEOM::ListOfDouble_var aDbls;
   int nbSols = anOper->ClosestPoints(myObj1.get(), myObj2.get(), aDbls);
index bce0e8829f4701e5540413ec8f7b00e3de7e8cf6..696e5ac1be0c679c660e3f3cc86f1f4ccf1fd659 100644 (file)
@@ -360,7 +360,7 @@ bool MeasureGUI_FastCheckIntersectionsDlg::extractPrefix() const
 //=================================================================================
 GEOM::GEOM_IOperations_ptr MeasureGUI_FastCheckIntersectionsDlg::createOperation()
 {
-  return getGeomEngine()->GetIMeasureOperations( getStudyId() );
+  return getGeomEngine()->GetIMeasureOperations();
 }
 
 //=================================================================================
@@ -611,7 +611,7 @@ GEOM::ListOfGO_var MeasureGUI_FastCheckIntersectionsDlg::getLstObjFromListSelect
   }
 
   if (myShapesOper->_is_nil())
-    myShapesOper = getGeomEngine()->GetIShapesOperations(getStudyId());
+    myShapesOper = getGeomEngine()->GetIShapesOperations();
 
   GEOM::ListOfGO_var aObjLstCreate = myShapesOper->MakeSubShapes(anObj.get(), anArray);
 
index a41c5ee778a16d05ff0c307cf08551dc41a19296..ff946e666104174c6a480e02bf6c95d9e1f47f3f 100644 (file)
@@ -287,7 +287,7 @@ void MeasureGUI_GetNonBlocksDlg::enterEvent (QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr MeasureGUI_GetNonBlocksDlg::createOperation()
 {
-  return getGeomEngine()->GetIBlocksOperations(getStudyId());
+  return getGeomEngine()->GetIBlocksOperations();
 }
 
 //=================================================================================
index 70dd07960d1ed7c1676f21a1d8b6f7be5e55e73f..12d45b46c6c8ce7781179370e90eb40bcdf9e89e 100644 (file)
@@ -188,7 +188,7 @@ void MeasureGUI_NormaleDlg::SelectionIntoArgument()
       aSelMgr->GetIndexes(aSelList.First(), aMap);
       if (aMap.Extent() == 1) // Local Selection
       {
-        GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations(getStudyId());
+        GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations();
         int anIndex = aMap(1);
         aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
         aName += QString(":face_%1").arg(anIndex);
@@ -221,7 +221,7 @@ void MeasureGUI_NormaleDlg::SelectionIntoArgument()
       aSelMgr->GetIndexes(aSelList.First(), aMap);
       if (aMap.Extent() == 1) // Local Selection
       {
-        GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations(getStudyId());
+        GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations();
         int anIndex = aMap(1);
         aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
         aName += QString(":vertex_%1").arg(anIndex);
@@ -333,7 +333,7 @@ void MeasureGUI_NormaleDlg::enterEvent (QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr MeasureGUI_NormaleDlg::createOperation()
 {
-  return getGeomEngine()->GetIMeasureOperations(getStudyId());
+  return getGeomEngine()->GetIMeasureOperations();
 }
 
 //=================================================================================
index 78afc2eb533cca662a315e70a403247573a740d6..c6efd1b6de02b0b39f9095f6dd5d7814f45d1198 100644 (file)
@@ -206,7 +206,7 @@ MeasureGUI_ShapeStatisticsDlg::~MeasureGUI_ShapeStatisticsDlg()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr MeasureGUI_ShapeStatisticsDlg::createOperation()
 {
-  return getGeomEngine()->GetIGroupOperations(getStudyId());
+  return getGeomEngine()->GetIGroupOperations();
 }
 
 #define RETURN_WITH_MSG(a, b) \
@@ -307,7 +307,7 @@ void MeasureGUI_ShapeStatisticsDlg::updateTypes( QList<GEOM::GeomObjPtr> theShap
     myShapes.push_back( aShape );
 
     GEOM::ListOfLong_var aSubShapes;
-    GEOM::GEOM_IShapesOperations_var aShOp = getGeomEngine()->GetIShapesOperations( getStudyId() );
+    GEOM::GEOM_IShapesOperations_var aShOp = getGeomEngine()->GetIShapesOperations();
     if ( hasEdges != 0 )
       hasEdges = aShOp->NumberOfSubShapes( aShapePtr.get(), TopAbs_EDGE ) > 0;
     if ( hasFaces != 0 )
index dcab485c9bd3c264a1067c1e22f13c2367f65c6c..8aa674d3ed18af8b6d36fed7c733c3d62f27486f 100644 (file)
@@ -373,7 +373,7 @@ GEOM_Displayer* MeasureGUI_Skeleton::getDisplayer()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr MeasureGUI_Skeleton::createOperation()
 {
-  return getGeomEngine()->GetIMeasureOperations( getStudyId() );
+  return getGeomEngine()->GetIMeasureOperations();
 }
 
 //=================================================================================
index 238971ee940a3f09ab02a8f4db09cb845719ad2f..1aace4f88c755c0bdfdb371f0ec02919351812a7 100644 (file)
@@ -253,7 +253,7 @@ void OperationGUI_ArchimedeDlg::enterEvent( QEvent* )
 //=================================================================================
 GEOM::GEOM_IOperations_ptr OperationGUI_ArchimedeDlg::createOperation()
 {
-  return getGeomEngine()->GetILocalOperations( getStudyId() );
+  return getGeomEngine()->GetILocalOperations();
 }
 
 //=================================================================================
index 20d0bf61731f90734810637605676684af85982d..a3e3d7b00ca60f9e2d56b9b68a024b6f688f4998 100644 (file)
@@ -748,7 +748,7 @@ void OperationGUI_ChamferDlg::enableWidgets()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr OperationGUI_ChamferDlg::createOperation()
 {
-  return getGeomEngine()->GetILocalOperations(getStudyId());
+  return getGeomEngine()->GetILocalOperations();
 }
 
 //=================================================================================
index 9c9557a5f2e52ef7642bc1ba40330d2cde2a51b4..7837cc027d3ff679747b563a2725e90b9716f1a0 100644 (file)
@@ -1200,7 +1200,7 @@ bool OperationGUI_ExtractionDlg::isValid(QString &)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr OperationGUI_ExtractionDlg::createOperation()
 {
-  return getGeomEngine()->GetIShapesOperations(getStudyId());
+  return getGeomEngine()->GetIShapesOperations();
 }
 
 //=================================================================================
index 17c9f088fef815266b5e6ce6a5a095d8b80385b9..eed2eab8320a20fac711258d6ee72f85e7139fe7 100644 (file)
@@ -340,7 +340,7 @@ void OperationGUI_ExtrudedFeatureDlg::ButtonClicked(bool checked)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr OperationGUI_ExtrudedFeatureDlg::createOperation()
 {
-  return getGeomEngine()->GetI3DPrimOperations(getStudyId());
+  return getGeomEngine()->GetI3DPrimOperations();
 }
 
 //=================================================================================
index 6f6867f4a59311e09a38731a5f740587375ed2ac..a65912c064521b8522e533486b0e21f0f7b83368 100644 (file)
@@ -215,7 +215,7 @@ void OperationGUI_Fillet1d2dDlg::SelectionIntoArgument()
             GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather( anObj, aName );
             
             if ( aFindedObject->_is_nil()) { // Object not found in study
-              GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() );
+              GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations();
               anObj = aShapesOp->GetSubShape( anObj, anIndex );
             }
             else
@@ -379,7 +379,7 @@ void OperationGUI_Fillet1d2dDlg::activateSelection()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr OperationGUI_Fillet1d2dDlg::createOperation()
 {
-  return getGeomEngine()->GetILocalOperations(getStudyId());
+  return getGeomEngine()->GetILocalOperations();
 }
 
 //=================================================================================
index fdde3777744483fd3d3dcb2988b6ffa3d3b7d388..148546a231d5023b84e0ccbd1ed61459ed966bb6 100644 (file)
@@ -594,7 +594,7 @@ void OperationGUI_FilletDlg::enableWidgets()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr OperationGUI_FilletDlg::createOperation()
 {
-  return getGeomEngine()->GetILocalOperations(getStudyId());
+  return getGeomEngine()->GetILocalOperations();
 }
 
 //=================================================================================
index be4a4aec1c7e761e7d08088e0f6b2f60bad9512b..8c8f40ddc5e8c792cfaa511e2e5ae94d4ef7632e 100644 (file)
@@ -288,7 +288,7 @@ void OperationGUI_GetShapesOnShapeDlg::enterEvent (QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr OperationGUI_GetShapesOnShapeDlg::createOperation()
 {
-  return getGeomEngine()->GetIShapesOperations(getStudyId());
+  return getGeomEngine()->GetIShapesOperations();
 }
 
 //=================================================================================
index 5b24f665ee37c3d22b4841a17e000159d16131ed..d27a65219cd78a0d8dffde970c093f52bd55d2e3 100644 (file)
@@ -331,7 +331,7 @@ int OperationGUI_GetSharedShapesDlg::GetType() const
 //=================================================================================
 GEOM::GEOM_IOperations_ptr OperationGUI_GetSharedShapesDlg::createOperation()
 {
-  return getGeomEngine()->GetIShapesOperations(getStudyId());
+  return getGeomEngine()->GetIShapesOperations();
 }
 
 //=================================================================================
index 19f0d2d4954e922789198a47e41c53150cab0c78..446d7256491a61665502f7c31edaf4b0ede588cb 100644 (file)
@@ -330,7 +330,7 @@ void OperationGUI_PartitionDlg::SelectionIntoArgument()
     if ( !myListTools.length() )
       return;
     else if ( myListTools.length() == 1 && getConstructorId() == 1 ) {
-      GEOM::GEOM_IMeasureOperations_var mOp = getGeomEngine()->GetIMeasureOperations( getStudyId() );
+      GEOM::GEOM_IMeasureOperations_var mOp = getGeomEngine()->GetIMeasureOperations();
       GEOM::ListOfLong_var   intList;
       GEOM::ListOfDouble_var dblList;
       GEOM::GEOM_IKindOfShape::shape_kind kind = mOp->KindOfShape( myListTools[0].in(), intList.out(), dblList.out() );
@@ -428,7 +428,7 @@ void OperationGUI_PartitionDlg::enterEvent( QEvent* )
 //=================================================================================
 GEOM::GEOM_IOperations_ptr OperationGUI_PartitionDlg::createOperation()
 {
-  return getGeomEngine()->GetIBooleanOperations( getStudyId() );
+  return getGeomEngine()->GetIBooleanOperations();
 }
 
 
index d2ee50509f85710bb7761ba70ff7a30100105596..9dfa239c0a36d6f56e389d904fc82a1d323881db 100755 (executable)
@@ -255,7 +255,7 @@ void OperationGUI_TransferDataDlg::enterEvent (QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr OperationGUI_TransferDataDlg::createOperation()
 {
-  return getGeomEngine()->GetIInsertOperations(getStudyId());
+  return getGeomEngine()->GetIInsertOperations();
 }
 
 //=================================================================================
index 4ee511f06b3fc1eb1c5935c36faba1ba0f0ec65d..799b0dba194b74cf2cd0971251e9fee90fcc566d 100644 (file)
@@ -355,7 +355,7 @@ void PrimitiveGUI_BoxDlg::ValueChangedInSpinBox()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr PrimitiveGUI_BoxDlg::createOperation()
 {
-  return getGeomEngine()->GetI3DPrimOperations(getStudyId());
+  return getGeomEngine()->GetI3DPrimOperations();
 }
 
 //=================================================================================
index 35026d0dc668f5d3ba73066f88a1eb693b1780f9..f0ac02fabfd9f58d2c32b55675b26643c8899418 100644 (file)
@@ -371,7 +371,7 @@ void PrimitiveGUI_ConeDlg::ValueChangedInSpinBox()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr  PrimitiveGUI_ConeDlg::createOperation()
 {
-  return getGeomEngine()->GetI3DPrimOperations(getStudyId());
+  return getGeomEngine()->GetI3DPrimOperations();
 }
 
 //=================================================================================
index 63baa9a6b9305d23d901f728c8a48ff7c84ce1dc..580335979976b36990bd42afbfc10da49abed5f9 100644 (file)
@@ -385,7 +385,7 @@ void PrimitiveGUI_CylinderDlg::ValueChangedInSpinBox()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr PrimitiveGUI_CylinderDlg::createOperation()
 {
-  return getGeomEngine()->GetI3DPrimOperations(getStudyId());
+  return getGeomEngine()->GetI3DPrimOperations();
 }
 
 //=================================================================================
index c65ce0732fcc377ae922b70cdf48827831241dc6..720ca7605408f91861fda9b0806ad740cc2358d7 100755 (executable)
@@ -454,7 +454,7 @@ void PrimitiveGUI_DiskDlg::ValueChangedInSpinBox()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr PrimitiveGUI_DiskDlg::createOperation()
 {
-  return getGeomEngine()->GetI3DPrimOperations(getStudyId());
+  return getGeomEngine()->GetI3DPrimOperations();
 }
 
 // //=================================================================================
index d404243862c4df0bfcc0f521248afbfadf017562..004692a3edcc3b298b8e444cdca839553f48f1ba 100755 (executable)
@@ -409,7 +409,7 @@ void PrimitiveGUI_FaceDlg::enterEvent( QEvent* )
 //=================================================================================
 GEOM::GEOM_IOperations_ptr PrimitiveGUI_FaceDlg::createOperation()
 {
-  return myGeomGUI->GetGeomGen()->GetI3DPrimOperations( getStudyId() );
+  return myGeomGUI->GetGeomGen()->GetI3DPrimOperations();
 }
 
 //=================================================================================
index 610f5b9b46d471ffbdc87bf173e6b35a8d9c7e88..83173ce3f319352cdc037357e5e85b1df88e9dbe 100644 (file)
@@ -325,7 +325,7 @@ void PrimitiveGUI_SphereDlg::ValueChangedInSpinBox()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr PrimitiveGUI_SphereDlg::createOperation()
 {
-  return getGeomEngine()->GetI3DPrimOperations( getStudyId() );
+  return getGeomEngine()->GetI3DPrimOperations();
 }
 
 
index a89d5bb4ab283496fe02d898290a26688d8e0039..f7c4373f188c2bce9183797b6c2c60183fb5cbae 100644 (file)
@@ -359,7 +359,7 @@ void PrimitiveGUI_TorusDlg::ValueChangedInSpinBox()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr PrimitiveGUI_TorusDlg::createOperation()
 {
-  return getGeomEngine()->GetI3DPrimOperations(getStudyId());
+  return getGeomEngine()->GetI3DPrimOperations();
 }
 
 //=================================================================================
index 51ad304cdf3e27337f1d87cc55f2dc14def5b745..f3e8f16d83c0309af5578c61d5dccb50ec4a180d 100644 (file)
@@ -249,7 +249,7 @@ void RepairGUI_ChangeOrientationDlg::enterEvent( QEvent* )
 //=================================================================================
 GEOM::GEOM_IOperations_ptr RepairGUI_ChangeOrientationDlg::createOperation()
 {
-  return getGeomEngine()->GetIHealingOperations( getStudyId() );
+  return getGeomEngine()->GetIHealingOperations();
 }
 
 
index bee3b32f0421496383dbdc4dcd452c44a577f189..957cb087b25a2d2d298f2b1492a78db200fba9ce 100644 (file)
@@ -301,7 +301,7 @@ void RepairGUI_CloseContourDlg::enterEvent (QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr RepairGUI_CloseContourDlg::createOperation()
 {
-  return getGeomEngine()->GetIHealingOperations(getStudyId());
+  return getGeomEngine()->GetIHealingOperations();
 }
 
 //=================================================================================
index 9a060578129caff3a008ff8892d791e42bb4def0..ba22d601f70f7eed85b46155a409080096332209 100644 (file)
@@ -474,7 +474,7 @@ void RepairGUI_DivideEdgeDlg::enterEvent( QEvent* )
 //=================================================================================
 GEOM::GEOM_IOperations_ptr RepairGUI_DivideEdgeDlg::createOperation()
 {
-  return getGeomEngine()->GetIHealingOperations( getStudyId() );
+  return getGeomEngine()->GetIHealingOperations();
 }
 
 //=================================================================================
index c875a27bcb488c82b7c164f9a3770897083dcf2e..bee3282a25a67c6b7755a397d86e3f460f74dd59 100644 (file)
@@ -241,7 +241,7 @@ void RepairGUI_FreeBoundDlg::activateSelection()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr RepairGUI_FreeBoundDlg::createOperation()
 {
-  return getGeomEngine()->GetIHealingOperations(getStudyId());
+  return getGeomEngine()->GetIHealingOperations();
 }
 
 //=================================================================================
index 8b5c71b6d19cb0b22b0d45d6d7eee6c48f41d57c..cfb765be3a93e39d8c95bae3a6d8245046aea6b9 100644 (file)
@@ -250,7 +250,7 @@ void RepairGUI_FreeFacesDlg::activateSelection()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr RepairGUI_FreeFacesDlg::createOperation()
 {
-  return getGeomEngine()->GetIShapesOperations( getStudyId() );
+  return getGeomEngine()->GetIShapesOperations();
 }
 
 //=================================================================================
index 591a1b528b67dad72db510ccd0606ac27cf4d8b4..4e24d3634077696046652465589380d74cd08657 100644 (file)
@@ -186,7 +186,7 @@ void RepairGUI_FuseEdgesDlg::SelectionIntoArgument()
             GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather(anObj, aName);
 
             if (aFindedObject->_is_nil()) { // Object not found in study
-              GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations(getStudyId());
+              GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations();
               anObj = aShapesOp->GetSubShape(anObj, anIndex);
             }
             else
@@ -304,7 +304,7 @@ void RepairGUI_FuseEdgesDlg::activateSelection()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr RepairGUI_FuseEdgesDlg::createOperation()
 {
-  return getGeomEngine()->GetIHealingOperations(getStudyId());
+  return getGeomEngine()->GetIHealingOperations();
 }
 
 //=================================================================================
index cf4d33ba9f904ba7906f47cf3e45c8638148c0e0..cf2472ab8c39506ab2a6e696593495b0c5e6e150 100644 (file)
@@ -408,7 +408,7 @@ void RepairGUI_GlueDlg::enterEvent(QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr RepairGUI_GlueDlg::createOperation()
 {
-  return getGeomEngine()->GetIShapesOperations(getStudyId());
+  return getGeomEngine()->GetIShapesOperations();
 }
 
 //=================================================================================
index 1888113da194cd30a89eca2c88d07cd8b08621d8..8b61bcf198ba1c617c217b87a8b9658499e8fbdd 100644 (file)
@@ -1188,8 +1188,6 @@ void RepairGUI_InspectObjectDlg::clickOnHide()
 //=================================================================================
 void RepairGUI_InspectObjectDlg::clickOnPublish()
 {
-  _PTR(Study) studyDS = dynamic_cast<SalomeApp_Study*>( myGeomGUI->getApp()->activeStudy() )->studyDS();
-
   // find main object
   TreeWidgetItem* aMainItem = dynamic_cast<TreeWidgetItem*>( myCurrentTreeObjects->topLevelItem(0) );
 
@@ -1217,12 +1215,12 @@ void RepairGUI_InspectObjectDlg::clickOnPublish()
   anArray->length(j);
 
   // get selected sub-shapes
-  GEOM::GEOM_IShapesOperations_var anOper = getGeomEngine()->GetIShapesOperations( getStudyId() );
+  GEOM::GEOM_IShapesOperations_var anOper = getGeomEngine()->GetIShapesOperations();
   GEOM::ListOfGO_var aList = anOper->MakeSubShapes( aMainObject, anArray );
 
   // publish sub-shapes
   for ( int i = 0; i < aList->length(); i++ )
-    GeometryGUI::GetGeomGen()->AddInStudy( GeometryGUI::ClientStudyToStudy( studyDS ), aList[i],
+    GeometryGUI::GetGeomGen()->AddInStudy( aList[i],
                                            anIndices.values().at(i).toStdString().c_str(), aMainObject );
 
   updateObjBrowser();
index 11ae185f2b5d5840fd408daee56e760551575c3b..be7990f2f62f573cb55dc60ac7ca40f18454d090 100644 (file)
@@ -275,7 +275,7 @@ void RepairGUI_LimitToleranceDlg::enterEvent(QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr RepairGUI_LimitToleranceDlg::createOperation()
 {
-  return getGeomEngine()->GetIHealingOperations(getStudyId());
+  return getGeomEngine()->GetIHealingOperations();
 }
 
 //=================================================================================
index 9341fe543c9026a90ab8a0348b29623eb2eaa7fa..81587600170d4c7c82be3c3c0cf735c853f00bf8 100644 (file)
@@ -267,7 +267,7 @@ void RepairGUI_RemoveExtraEdgesDlg::activateSelection()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr RepairGUI_RemoveExtraEdgesDlg::createOperation()
 {
-  return getGeomEngine()->GetIBlocksOperations( getStudyId() );
+  return getGeomEngine()->GetIBlocksOperations();
 }
 
 //=================================================================================
index 69c219628379edfa10601688e530b4ab74bc8470..6ad6053eadea234f593855f1652c56529778305e 100644 (file)
@@ -305,7 +305,7 @@ void RepairGUI_RemoveHolesDlg::enterEvent (QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr RepairGUI_RemoveHolesDlg::createOperation()
 {
-  return getGeomEngine()->GetIHealingOperations(getStudyId());
+  return getGeomEngine()->GetIHealingOperations();
 }
 
 //=================================================================================
index 12d44bf1d732206b407d805bd2141b341ebec03b..2626f6d3b291013adf764f252edca0809f6931ca 100644 (file)
@@ -290,7 +290,7 @@ void RepairGUI_RemoveIntWiresDlg::enterEvent (QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr RepairGUI_RemoveIntWiresDlg::createOperation()
 {
-  return getGeomEngine()->GetIHealingOperations(getStudyId());
+  return getGeomEngine()->GetIHealingOperations();
 }
 
 //=================================================================================
index c5f56a2b54e1ca553097a8bed75b1d11b9c2a821..7dcbadc4979c82352611c6d1150e1e87349a86ce 100755 (executable)
@@ -236,7 +236,7 @@ void RepairGUI_RemoveWebsDlg::activateSelection()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr RepairGUI_RemoveWebsDlg::createOperation()
 {
-  return getGeomEngine()->GetIHealingOperations(getStudyId());
+  return getGeomEngine()->GetIHealingOperations();
 }
 
 //=================================================================================
index bd1e03edc45a899f17b3b72727fb08f4a8246739..0050245b9f52d7ad82cd62013b2460caadf66027 100644 (file)
@@ -258,7 +258,7 @@ void RepairGUI_SewingDlg::enterEvent( QEvent* )
 //=================================================================================
 GEOM::GEOM_IOperations_ptr RepairGUI_SewingDlg::createOperation()
 {
-  return getGeomEngine()->GetIHealingOperations( getStudyId() );
+  return getGeomEngine()->GetIHealingOperations();
 }
 
 //=================================================================================
index 37880e93ed5d618c8762aba8a091627bb329bf6b..8c925a132feedb7eea62a379ae771469d538e02b 100755 (executable)
@@ -519,7 +519,7 @@ QString set_convert( const char* theParam, const char* theValue )
 //=================================================================================
 void RepairGUI_ShapeProcessDlg::loadDefaults()
 {
-  GEOM::GEOM_IHealingOperations_var anOp = myGeomGUI->GetGeomGen()->GetIHealingOperations( getStudyId() );
+  GEOM::GEOM_IHealingOperations_var anOp = myGeomGUI->GetGeomGen()->GetIHealingOperations();
   GEOM::string_array_var anOperators, aParams, aValues;
   anOp->GetShapeProcessParameters( anOperators, aParams, aValues );
 
@@ -615,7 +615,7 @@ QString RepairGUI_ShapeProcessDlg::getText( QWidget* theControl ) const
 //=================================================================================
 GEOM::GEOM_IOperations_ptr RepairGUI_ShapeProcessDlg::createOperation()
 {
-  return getGeomEngine()->GetIHealingOperations( getStudyId() );
+  return getGeomEngine()->GetIHealingOperations();
 }
 
 //=================================================================================
index e2f5e94daeccbb6eb4e82ace8b131301098e2a26..8f944bf57f3fd57f1e3bb3dec1d2c5386927043b 100644 (file)
@@ -352,7 +352,7 @@ void RepairGUI_SuppressFacesDlg::enterEvent (QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr RepairGUI_SuppressFacesDlg::createOperation()
 {
-  return getGeomEngine()->GetIHealingOperations(getStudyId());
+  return getGeomEngine()->GetIHealingOperations();
 }
 
 //=================================================================================
index 0e63edee77edcfbfb5fa7f9b3ab8fd7da270e56e..1748675bc06a23b6a96ba67825cefc9ab4d1c599 100755 (executable)
@@ -263,7 +263,7 @@ void RepairGUI_UnionFacesDlg::activateSelection()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr RepairGUI_UnionFacesDlg::createOperation()
 {
-  return getGeomEngine()->GetIBlocksOperations( getStudyId() );
+  return getGeomEngine()->GetIBlocksOperations();
 }
 
 //=================================================================================
index f9dad8df35fba31c4e5bef21cd690d7f16cbef11..3db28bb463b07422a38764f19fe6532a6b0f0a1e 100644 (file)
@@ -114,8 +114,7 @@ bool STEPPlugin_GUI::importSTEP( SUIT_Desktop* parent )
   SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*> ( app->activeStudy() );
   if ( !study ) return false;
 
-  SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
-  GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "STEPPluginEngine" );
+  GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( "STEPPluginEngine" );
   STEPOpPtr stepOp = GEOM::ISTEPOperations::_narrow( op );
   if ( stepOp.isNull() ) return false;
 
@@ -183,16 +182,15 @@ bool STEPPlugin_GUI::importSTEP( SUIT_Desktop* parent )
        {
          GEOM::GEOM_Object_var main = result[0];
          QString publishName = GEOMBase::GetDefaultName( SUIT_Tools::file( fileName, true ) );
-         SALOMEDS::SObject_var so = GeometryGUI::GetGeomGen()->PublishInStudy( dsStudy,
-                                                                               SALOMEDS::SObject::_nil(),
-                                                                               main.in(),
-                                                                               publishName.toUtf8().constData() );
+         SALOMEDS::SObject_var so = GeometryGUI::GetGeomGen()->PublishInStudy( SALOMEDS::SObject::_nil(),
+                                                                                                                   main.in(),
+                                                                                                                   publishName.toUtf8().constData() );
          
          entryList.append( so->GetID() );
          for ( int i = 1, n = result->length(); i < n; i++ ) {
            GEOM::GEOM_Object_ptr group = result[i];
            CORBA::String_var grpName = group->GetName();
-           GeometryGUI::GetGeomGen()->AddInStudy( dsStudy, group, grpName.in(), main );
+           GeometryGUI::GetGeomGen()->AddInStudy( group, grpName.in(), main );
          }
          transaction.commit();
          GEOM_Displayer( study ).Display( main.in() );
@@ -234,8 +232,7 @@ bool STEPPlugin_GUI::exportSTEP( SUIT_Desktop* parent )
   SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*> ( app->activeStudy() );
   if ( !study ) return false;
 
-  SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
-  GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "STEPPluginEngine" );
+  GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( "STEPPluginEngine" );
   STEPOpPtr stepOp = GEOM::ISTEPOperations::_narrow( op );
   if ( stepOp.isNull() ) return false;
 
index bf52a1f1a26cf5d23140bf26a19d28e092a57f99..272a0313b4a57455d7dee5c86481fca2463b88c8 100644 (file)
@@ -35,8 +35,6 @@
 // OCCT includes
 #include <TFunction_DriverTable.hxx>
 
-std::map <int, STEPPlugin_IOperations*> STEPPlugin_OperationsCreator::_mapOfOperations;
-
 STEPPlugin_OperationsCreator::STEPPlugin_OperationsCreator()
 {
   // Register drivers
@@ -56,19 +54,11 @@ STEPPlugin_OperationsCreator::~STEPPlugin_OperationsCreator()
 }
 
 GEOM_IOperations_i* STEPPlugin_OperationsCreator::Create( PortableServer::POA_ptr thePOA,
-                                                          int                     theStudyId,
                                                           GEOM::GEOM_Gen_ptr      theEngine,
                                                           ::GEOMImpl_Gen*         theGenImpl )
 {
   Unexpect aCatch( SALOME_SalomeException );
   MESSAGE( "STEPPlugin_OperationsCreator::Create" );
-  return new STEPPlugin_IOperations_i( thePOA, theEngine, get( theGenImpl, theStudyId ) );
-}
-
-STEPPlugin_IOperations* STEPPlugin_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl,
-                                                          int             theStudyId )
-{
-  if (_mapOfOperations.find( theStudyId ) == _mapOfOperations.end() )
-    _mapOfOperations[theStudyId] = new STEPPlugin_IOperations( theGenImpl, theStudyId );
-  return _mapOfOperations[theStudyId];
+  STEPPlugin_IOperations* anOperation = new STEPPlugin_IOperations( theGenImpl );
+  return new STEPPlugin_IOperations_i( thePOA, theEngine, anOperation );
 }
index efb210206859d2c1c4d19c0014695e835d9d518a..f9f5d5ee28107bd542cf0c845f8ed519c17e5ead 100755 (executable)
@@ -41,16 +41,9 @@ public:
   ~STEPPlugin_OperationsCreator();
 
   GEOM_IOperations_i* Create( PortableServer::POA_ptr thePOA,
-                             int                     theStudyId,
-                             GEOM::GEOM_Gen_ptr      theEngine,
-                             ::GEOMImpl_Gen*         theGenImpl );
+                              GEOM::GEOM_Gen_ptr      theEngine,
+                              ::GEOMImpl_Gen*         theGenImpl );
 
-private:
-  static STEPPlugin_IOperations* get( ::GEOMImpl_Gen*         theGenImpl,
-                                     int                     theStudyId );
-
-private:
-  static std::map <int, STEPPlugin_IOperations*>  _mapOfOperations;
 
   friend class STEPPlugin_IECallBack;
 };
index 70f0475b695ecc8687adee9c1f4cd5f50ba6a88e..6ca36ac81cef67700d7b917650f136f266972386 100644 (file)
@@ -110,8 +110,7 @@ bool STLPlugin_GUI::importSTL( SUIT_Desktop* parent )
   SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*> ( app->activeStudy() );
   if ( !study ) return false;
 
-  SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
-  GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "STLPluginEngine" );
+  GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( "STLPluginEngine" );
   STLOpPtr stlOp = GEOM::ISTLOperations::_narrow( op );
   if ( stlOp.isNull() ) return false;
   
@@ -138,10 +137,9 @@ bool STLPlugin_GUI::importSTL( SUIT_Desktop* parent )
        {
          GEOM::GEOM_Object_var main = result[0];
          QString publishName = GEOMBase::GetDefaultName( SUIT_Tools::file( fileName, true ) );
-         SALOMEDS::SObject_var so = GeometryGUI::GetGeomGen()->PublishInStudy( dsStudy,
-                                                                               SALOMEDS::SObject::_nil(),
-                                                                               main.in(),
-                                                                               publishName.toUtf8().constData() );
+         SALOMEDS::SObject_var so = GeometryGUI::GetGeomGen()->PublishInStudy( SALOMEDS::SObject::_nil(),
+                                                                                                                   main.in(),
+                                                                                                                   publishName.toUtf8().constData() );
          
          entryList.append( so->GetID() );
          transaction.commit();
@@ -180,11 +178,8 @@ bool STLPlugin_GUI::exportSTL( SUIT_Desktop* parent )
 {
   SalomeApp_Application* app = getGeometryGUI()->getApp();
   if ( !app ) return false;
-  SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*> ( app->activeStudy() );
-  if ( !study ) return false;
 
-  SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
-  GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "STLPluginEngine" );
+  GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( "STLPluginEngine" );
   STLOpPtr stlOp = GEOM::ISTLOperations::_narrow( op );
   if ( stlOp.isNull() ) return false;
 
index fcfa4abf5b3884896487ab751cb080355599a05d..e7defaa0a75d45278efe8836a137013a636e6264 100644 (file)
@@ -32,8 +32,6 @@
 // OCCT includes
 #include <TFunction_DriverTable.hxx>
 
-std::map <int, STLPlugin_IOperations*> STLPlugin_OperationsCreator::_mapOfOperations;
-
 STLPlugin_OperationsCreator::STLPlugin_OperationsCreator()
 {
   // Register drivers
@@ -53,19 +51,11 @@ STLPlugin_OperationsCreator::~STLPlugin_OperationsCreator()
 }
 
 GEOM_IOperations_i* STLPlugin_OperationsCreator::Create( PortableServer::POA_ptr thePOA,
-                                                         int                     theStudyId,
                                                          GEOM::GEOM_Gen_ptr      theEngine,
                                                          ::GEOMImpl_Gen*         theGenImpl )
 {
   Unexpect aCatch( SALOME_SalomeException );
   MESSAGE( "STLPlugin_OperationsCreator::Create" );
-  return new STLPlugin_IOperations_i( thePOA, theEngine, get( theGenImpl, theStudyId ) );
-}
-
-STLPlugin_IOperations* STLPlugin_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl,
-                                                        int             theStudyId )
-{
-  if (_mapOfOperations.find( theStudyId ) == _mapOfOperations.end() )
-    _mapOfOperations[theStudyId] = new STLPlugin_IOperations( theGenImpl, theStudyId );
-  return _mapOfOperations[theStudyId];
+  STLPlugin_IOperations* anOperation = new STLPlugin_IOperations( theGenImpl );
+  return new STLPlugin_IOperations_i( thePOA, theEngine, anOperation );
 }
index 6feff34ea8eeb0b38de42044bba6c6a8219b9fe3..896bf75b4dd26cadb8f3555c26094dac9857d59f 100755 (executable)
@@ -41,15 +41,8 @@ public:
   ~STLPlugin_OperationsCreator();
 
   GEOM_IOperations_i* Create( PortableServer::POA_ptr thePOA,
-                             int                     theStudyId,
-                             GEOM::GEOM_Gen_ptr      theEngine,
-                             ::GEOMImpl_Gen*         theGenImpl );
-private:
-  static STLPlugin_IOperations* get( ::GEOMImpl_Gen*         theGenImpl,
-                                    int                     theStudyId );
-
-private:
-  static std::map <int, STLPlugin_IOperations*>  _mapOfOperations;
+                              GEOM::GEOM_Gen_ptr      theEngine,
+                              ::GEOMImpl_Gen*         theGenImpl );
 
   friend class STLPlugin_IECallBack;
 };
index 8af7fda97f524c978d35cdfa723496bb04952b5b..6a45393affa628df828d1669fc23cbedfed03c73 100644 (file)
@@ -358,7 +358,7 @@ void TransformationGUI_ExtensionDlg::ValueChangedInSpinBox(double newValue)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr TransformationGUI_ExtensionDlg::createOperation()
 {
-  return getGeomEngine()->GetIShapesOperations(getStudyId());
+  return getGeomEngine()->GetIShapesOperations();
 }
 
 //=================================================================================
index 53027e0b5e19df143cbce3b9abc3cff4c899f39f..76459aa05c736e321e74adacb381c1a3259c9953 100644 (file)
@@ -322,7 +322,7 @@ void TransformationGUI_MirrorDlg::enterEvent (QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr  TransformationGUI_MirrorDlg::createOperation()
 {
-  return getGeomEngine()->GetITransformOperations(getStudyId());
+  return getGeomEngine()->GetITransformOperations();
 }
 
 //=================================================================================
index 0523977403687c405d485407598a87943f3fbf08..d6cc0ab79760993a9cb023d622ca8ecee13d74f4 100644 (file)
@@ -268,7 +268,7 @@ void TransformationGUI_MultiRotationDlg::SelectionIntoArgument()
       myBase = aSelectedObject;
 
       // recompute myAng and myStep (Mantis issue 0021718)
-      GEOM::GEOM_IMeasureOperations_var anOper = getGeomEngine()->GetIMeasureOperations(getStudyId());
+      GEOM::GEOM_IMeasureOperations_var anOper = getGeomEngine()->GetIMeasureOperations();
       double Xmin, Xmax, Ymin, Ymax, Zmin, Zmax;
       anOper->GetBoundingBox(myBase.get(), true, Xmin, Xmax, Ymin, Ymax, Zmin, Zmax);
       if (anOper->IsDone()) {
@@ -449,7 +449,7 @@ void TransformationGUI_MultiRotationDlg::CheckAngleStep (bool isOn)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr TransformationGUI_MultiRotationDlg::createOperation()
 {
-  return getGeomEngine()->GetITransformOperations(getStudyId());
+  return getGeomEngine()->GetITransformOperations();
 }
 
 //=================================================================================
index c909cb3e45437d6b6cad2df1127716c2013da6b5..cd69f6a73f8ac6770c8edc6710cf4130cbf4a2d1 100644 (file)
@@ -348,7 +348,7 @@ void TransformationGUI_MultiTranslationDlg::SelectionIntoArgument()
       myBase = aSelectedObject;
 
       // recompute myStepU (Mantis issue 0021718)
-      GEOM::GEOM_IMeasureOperations_var anOper = getGeomEngine()->GetIMeasureOperations(getStudyId());
+      GEOM::GEOM_IMeasureOperations_var anOper = getGeomEngine()->GetIMeasureOperations();
       double Xmin, Xmax, Ymin, Ymax, Zmin, Zmax;
       anOper->GetBoundingBox(myBase.get(), true, Xmin, Xmax, Ymin, Ymax, Zmin, Zmax);
       if (anOper->IsDone()) {
@@ -615,7 +615,7 @@ void TransformationGUI_MultiTranslationDlg::ReverseStepV()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr TransformationGUI_MultiTranslationDlg::createOperation()
 {
-  return getGeomEngine()->GetITransformOperations(getStudyId());
+  return getGeomEngine()->GetITransformOperations();
 }
 
 //=================================================================================
index f4157b6bda09408615bb0669f533d6118a0b2b6f..d060a1f5332bf99542176b1bdf4afc2fffebfb32 100644 (file)
@@ -240,7 +240,7 @@ void TransformationGUI_OffsetDlg::ValueChangedInSpinBox()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr TransformationGUI_OffsetDlg::createOperation()
 {
-  return getGeomEngine()->GetITransformOperations( getStudyId() );
+  return getGeomEngine()->GetITransformOperations();
 }
 
 //=================================================================================
index 44c163c6218553d53521d3518fb05c21ec0e787f..f41760fc875fca489c4500a480da4953a47241cf 100644 (file)
@@ -493,7 +493,7 @@ void TransformationGUI_PositionDlg::enterEvent (QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr TransformationGUI_PositionDlg::createOperation()
 {
-  return getGeomEngine()->GetITransformOperations(getStudyId());
+  return getGeomEngine()->GetITransformOperations();
 }
 
 //=================================================================================
index b82389f0c0d11d7058aa7e75c75594b7b4b99276..e3ad415ec7575e97eea6bb8f471a0032e19a8ce2 100644 (file)
@@ -303,7 +303,7 @@ void TransformationGUI_ProjectionDlg::enterEvent (QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr TransformationGUI_ProjectionDlg::createOperation()
 {
-  return getGeomEngine()->GetITransformOperations(getStudyId());
+  return getGeomEngine()->GetITransformOperations();
 }
 
 //=================================================================================
index 3bed7d523caeb5901f535e0aa5951e4e9392d515..b6767b3502e7ea5173b2470db16f93df76d0ee91 100644 (file)
@@ -316,7 +316,7 @@ void TransformationGUI_ProjectionOnCylDlg::enterEvent (QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr TransformationGUI_ProjectionOnCylDlg::createOperation()
 {
-  return getGeomEngine()->GetITransformOperations(getStudyId());
+  return getGeomEngine()->GetITransformOperations();
 }
 
 //=================================================================================
index 2b75947d4002128d3168c7d5f8e24af942ef159b..291726e166adb8ed37838101a7450cfdc7deebfd 100644 (file)
@@ -450,7 +450,7 @@ void TransformationGUI_RotationDlg::ValueChangedInSpinBox()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr TransformationGUI_RotationDlg::createOperation()
 {
-  return getGeomEngine()->GetITransformOperations(getStudyId());
+  return getGeomEngine()->GetITransformOperations();
 }
 
 //=================================================================================
index bf1576bdb839d7c6da18d71d2db74f9060ace5b1..d37664a2bd3299b71163b09ddaad9a0d8126395b 100644 (file)
@@ -392,7 +392,7 @@ void TransformationGUI_ScaleDlg::SetDoubleSpinBoxStep(double step)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr TransformationGUI_ScaleDlg::createOperation()
 {
-  return getGeomEngine()->GetITransformOperations(getStudyId());
+  return getGeomEngine()->GetITransformOperations();
 }
 
 //=================================================================================
index c1443ac732df163a4ed6bb56b7a65615b7935069..57cf49b4d3949d6556437c9beac37b7e8914169e 100644 (file)
@@ -450,7 +450,7 @@ void TransformationGUI_TranslationDlg::ValueChangedInSpinBox()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr TransformationGUI_TranslationDlg::createOperation()
 {
-  return getGeomEngine()->GetITransformOperations(getStudyId());
+  return getGeomEngine()->GetITransformOperations();
 }
 
 //=================================================================================
index e8124fa20e5a9ab1ed5ae9de7e713f1324a2599d..c3e357e64b054c50f01d0ddbe9a6918100835685 100644 (file)
@@ -100,11 +100,8 @@ bool VTKPlugin_GUI::exportVTK( SUIT_Desktop* parent )
 {
   SalomeApp_Application* app = getGeometryGUI()->getApp();
   if ( !app ) return false;
-  SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*> ( app->activeStudy() );
-  if ( !study ) return false;
 
-  SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
-  GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "VTKPluginEngine" );
+  GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( "VTKPluginEngine" );
   VTKOpPtr vtkOp = GEOM::IVTKOperations::_narrow( op );
   if ( vtkOp.isNull() ) return false;
 
index b5e2407e9d62c8f9dca874e660fa8c5684fd93e5..ffc854106f1ab764c455ef0e1be5891725c01ca8 100644 (file)
@@ -31,8 +31,6 @@
 // OCCT includes
 #include <TFunction_DriverTable.hxx>
 
-std::map <int, VTKPlugin_IOperations*> VTKPlugin_OperationsCreator::_mapOfOperations;
-
 VTKPlugin_OperationsCreator::VTKPlugin_OperationsCreator()
 {
   // Register drivers
@@ -49,19 +47,11 @@ VTKPlugin_OperationsCreator::~VTKPlugin_OperationsCreator()
 }
 
 GEOM_IOperations_i* VTKPlugin_OperationsCreator::Create( PortableServer::POA_ptr thePOA,
-                                                         int                     theStudyId,
                                                          GEOM::GEOM_Gen_ptr      theEngine,
                                                          ::GEOMImpl_Gen*         theGenImpl )
 {
   Unexpect aCatch( SALOME_SalomeException );
   MESSAGE( "VTKPlugin_OperationsCreator::Create" );
-  return new VTKPlugin_IOperations_i( thePOA, theEngine, get( theGenImpl, theStudyId ) );
-}
-
-VTKPlugin_IOperations* VTKPlugin_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl,
-                                                        int             theStudyId )
-{
-  if (_mapOfOperations.find( theStudyId ) == _mapOfOperations.end() )
-    _mapOfOperations[theStudyId] = new VTKPlugin_IOperations( theGenImpl, theStudyId );
-  return _mapOfOperations[theStudyId];
+  VTKPlugin_IOperations* anOperation = new VTKPlugin_IOperations( theGenImpl );
+  return new VTKPlugin_IOperations_i( thePOA, theEngine, anOperation );
 }
index 760c8fe3e0d3268e693ac881d2e6d78fa85ee78f..feea41fd979dd513a2524373319582ece6e61278 100755 (executable)
@@ -41,15 +41,8 @@ public:
   ~VTKPlugin_OperationsCreator();
 
   GEOM_IOperations_i* Create( PortableServer::POA_ptr thePOA,
-                             int                     theStudyId,
-                             GEOM::GEOM_Gen_ptr      theEngine,
-                             ::GEOMImpl_Gen*         theGenImpl );
-private:
-  static VTKPlugin_IOperations* get( ::GEOMImpl_Gen*         theGenImpl,
-                                     int                     theStudyId );
-
-private:
-  static std::map <int, VTKPlugin_IOperations*>  _mapOfOperations;
+                              GEOM::GEOM_Gen_ptr      theEngine,
+                              ::GEOMImpl_Gen*         theGenImpl );
 
   friend class VTKPlugin_IECallBack;
 };
index d3b32ee68e0cf3e82c2ca7e793f3c4be2aaaeee4..2a0a7cdf9381af664a99dd1001d9b6fde8922b15 100644 (file)
@@ -217,7 +217,7 @@ void XAOPlugin_ExportDlg::processObject()
   else
   {
     ledShape->setText(GEOMBase::GetName(m_mainObj));
-    GEOM::GEOM_IShapesOperations_var shapeOp = getGeomEngine()->GetIShapesOperations(getStudyId());
+    GEOM::GEOM_IShapesOperations_var shapeOp = getGeomEngine()->GetIShapesOperations();
 
     // add groups names
     GEOM::ListOfGO_var groups = shapeOp->GetExistingSubObjects(m_mainObj, true);
@@ -234,7 +234,7 @@ void XAOPlugin_ExportDlg::processObject()
     lstGroups->sortItems(Qt::AscendingOrder);
 
     // add fields
-    GEOM::GEOM_IFieldOperations_var fieldOp = getGeomEngine()->GetIFieldOperations(getStudyId());
+    GEOM::GEOM_IFieldOperations_var fieldOp = getGeomEngine()->GetIFieldOperations();
 
     GEOM::ListOfFields_var fields = fieldOp->GetFields(m_mainObj);
     for (int i = 0, n = fields->length(); i < n; i++)
@@ -380,7 +380,7 @@ void XAOPlugin_ExportDlg::enterEvent(QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr XAOPlugin_ExportDlg::createOperation()
 {
-  return getGeomEngine()->GetPluginOperations( getStudyId(), "XAOPluginEngine" );
+  return getGeomEngine()->GetPluginOperations( "XAOPluginEngine" );
 }
 
 //=================================================================================
index a6c2196a71b0a23e539ef132237c9fcc42f9238b..faee9d3bfa8753621eed65e226617170a84ab632 100644 (file)
@@ -235,7 +235,7 @@ void XAOPlugin_ImportDlg::enterEvent(QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr XAOPlugin_ImportDlg::createOperation()
 {
-  return getGeomEngine()->GetPluginOperations( getStudyId(), "XAOPluginEngine" );
+  return getGeomEngine()->GetPluginOperations( "XAOPluginEngine" );
 }
 
 //=================================================================================
@@ -315,10 +315,8 @@ QString XAOPlugin_ImportDlg::addFieldInStudy( GEOM::GEOM_Field_ptr theField, GEO
   if ( !aStudy || theField->_is_nil() )
     return QString();
 
-  SALOMEDS::Study_var aStudyDS = GeometryGUI::ClientStudyToStudy(aStudy);
-
   SALOMEDS::SObject_var aSO =
-    getGeomEngine()->AddInStudy(aStudyDS, theField, theField->GetName(), theFather);
+    getGeomEngine()->AddInStudy(theField, theField->GetName(), theFather);
   theField->UnRegister();
 
   QString anEntry;
@@ -334,7 +332,7 @@ QString XAOPlugin_ImportDlg::addFieldInStudy( GEOM::GEOM_Field_ptr theField, GEO
     GEOM::GEOM_FieldStep_ptr step = theField->GetStep(steps[i]);
     QString stepName = (tr("XAOPLUGIN_STEP") + " %1 %2").arg( step->GetID() ).arg( step->GetStamp() );
     SALOMEDS::SObject_wrap aSOField =
-      getGeomEngine()->AddInStudy( aStudyDS, step, stepName.toLatin1().constData(), theField );
+      getGeomEngine()->AddInStudy( step, stepName.toLatin1().constData(), theField );
     step->UnRegister();
   }
 
@@ -348,7 +346,7 @@ GEOM::GEOM_Object_ptr XAOPlugin_ImportDlg::getFather(GEOM::GEOM_Object_ptr objec
   GEOM::GEOM_Object_var fatherObj;
   if (object->GetType() != GEOM_IMPORT && m_mainShape != NULL)
   {
-    //GEOM::GEOM_IGroupOperations_var groupOper = getGeomEngine()->GetIGroupOperations(getStudyId());
+    //GEOM::GEOM_IGroupOperations_var groupOper = getGeomEngine()->GetIGroupOperations();
     //fatherObj = groupOper->GetMainShape(object);
     fatherObj = m_mainShape;
   }
index 4b6f54cd88653547f0c825372e2ceb53a1ea7d70..e2876fd5ed925bd8c2a68ff00eb2f511267a6ce2 100644 (file)
@@ -31,8 +31,6 @@
 // OCCT includes
 #include <TFunction_DriverTable.hxx>
 
-std::map <int, XAOPlugin_IOperations*> XAOPlugin_OperationsCreator::_mapOfOperations;
-
 XAOPlugin_OperationsCreator::XAOPlugin_OperationsCreator()
 {
   // Register drivers
@@ -48,19 +46,11 @@ XAOPlugin_OperationsCreator::~XAOPlugin_OperationsCreator()
 }
 
 GEOM_IOperations_i* XAOPlugin_OperationsCreator::Create( PortableServer::POA_ptr thePOA,
-                                                         int                     theStudyId,
                                                          GEOM::GEOM_Gen_ptr      theEngine,
                                                          ::GEOMImpl_Gen*         theGenImpl )
 {
   Unexpect aCatch( SALOME_SalomeException );
   MESSAGE( "XAOPlugin_OperationsCreator::Create" );
-  return new XAOPlugin_IOperations_i( thePOA, theEngine, get( theGenImpl, theStudyId ) );
-}
-
-XAOPlugin_IOperations* XAOPlugin_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl,
-                                                        int             theStudyId )
-{
-  if (_mapOfOperations.find( theStudyId ) == _mapOfOperations.end() )
-    _mapOfOperations[theStudyId] = new XAOPlugin_IOperations( theGenImpl, theStudyId );
-  return _mapOfOperations[theStudyId];
+  XAOPlugin_IOperations* anOperation = new XAOPlugin_IOperations( theGenImpl );
+  return new XAOPlugin_IOperations_i( thePOA, theEngine, anOperation );
 }
index 5568de75da45fde4fe6ed986275d406a3b665500..3811bc68a1120b02f510d3f167bad238e48c72b6 100755 (executable)
@@ -41,15 +41,8 @@ public:
   ~XAOPlugin_OperationsCreator();
 
   GEOM_IOperations_i* Create( PortableServer::POA_ptr thePOA,
-                             int                     theStudyId,
-                             GEOM::GEOM_Gen_ptr      theEngine,
-                             ::GEOMImpl_Gen*         theGenImpl );
-private:
-  static XAOPlugin_IOperations* get( ::GEOMImpl_Gen*         theGenImpl,
-                                    int                     theStudyId );
-  
-private:
-  static std::map <int, XAOPlugin_IOperations*>  _mapOfOperations;
+                              GEOM::GEOM_Gen_ptr      theEngine,
+                              ::GEOMImpl_Gen*         theGenImpl );
 
   friend class XAOPlugin_IECallBack;
 };