Salome HOME
Merge multi-study removal branch.
authorrnv <rnv@opencascade.com>
Tue, 13 Jun 2017 10:01:10 +0000 (13:01 +0300)
committerrnv <rnv@opencascade.com>
Tue, 13 Jun 2017 10:01:10 +0000 (13:01 +0300)
514 files changed:
doc/salome/examples/3dmesh.py
doc/salome/examples/a3DmeshOnModified2Dmesh.py
doc/salome/examples/cartesian_algo.py
doc/salome/examples/creating_meshes_ex01.py
doc/salome/examples/creating_meshes_ex02.py
doc/salome/examples/creating_meshes_ex03.py
doc/salome/examples/creating_meshes_ex04.py
doc/salome/examples/creating_meshes_ex05.py
doc/salome/examples/creating_meshes_ex06.py
doc/salome/examples/creating_meshes_ex07.py
doc/salome/examples/creating_meshes_ex08.py
doc/salome/examples/defining_hypotheses_adaptive1d.py
doc/salome/examples/defining_hypotheses_ex01.py
doc/salome/examples/defining_hypotheses_ex02.py
doc/salome/examples/defining_hypotheses_ex03.py
doc/salome/examples/defining_hypotheses_ex04.py
doc/salome/examples/defining_hypotheses_ex05.py
doc/salome/examples/defining_hypotheses_ex06.py
doc/salome/examples/defining_hypotheses_ex07.py
doc/salome/examples/defining_hypotheses_ex08.py
doc/salome/examples/defining_hypotheses_ex09.py
doc/salome/examples/defining_hypotheses_ex10.py
doc/salome/examples/defining_hypotheses_ex11.py
doc/salome/examples/defining_hypotheses_ex12.py
doc/salome/examples/defining_hypotheses_ex13.py
doc/salome/examples/defining_hypotheses_ex14.py
doc/salome/examples/defining_hypotheses_ex15.py
doc/salome/examples/defining_hypotheses_ex16.py
doc/salome/examples/defining_hypotheses_ex17.py
doc/salome/examples/filters_ex09.py
doc/salome/examples/filters_ex10.py
doc/salome/examples/filters_ex16.py
doc/salome/examples/filters_ex17.py
doc/salome/examples/filters_ex18.py
doc/salome/examples/filters_ex39.py
doc/salome/examples/generate_flat_elements.py
doc/salome/examples/grouping_elements_ex01.py
doc/salome/examples/grouping_elements_ex02.py
doc/salome/examples/grouping_elements_ex03.py
doc/salome/examples/grouping_elements_ex04.py
doc/salome/examples/grouping_elements_ex05.py
doc/salome/examples/grouping_elements_ex06.py
doc/salome/examples/grouping_elements_ex07.py
doc/salome/examples/grouping_elements_ex08.py
doc/salome/examples/measurements_ex01.py
doc/salome/examples/measurements_ex02.py
doc/salome/examples/measurements_ex03.py
doc/salome/examples/modifying_meshes_ex01.py
doc/salome/examples/modifying_meshes_ex02.py
doc/salome/examples/modifying_meshes_ex03.py
doc/salome/examples/modifying_meshes_ex09.py
doc/salome/examples/modifying_meshes_ex10.py
doc/salome/examples/modifying_meshes_ex15.py
doc/salome/examples/modifying_meshes_ex16.py
doc/salome/examples/modifying_meshes_ex17.py
doc/salome/examples/modifying_meshes_ex18.py
doc/salome/examples/modifying_meshes_ex19.py
doc/salome/examples/modifying_meshes_ex21.py
doc/salome/examples/modifying_meshes_ex22.py
doc/salome/examples/modifying_meshes_ex23.py
doc/salome/examples/modifying_meshes_ex25.py
doc/salome/examples/modifying_meshes_ex26.py
doc/salome/examples/notebook_smesh.py
doc/salome/examples/prism_3d_algo.py
doc/salome/examples/quality_controls_ex01.py
doc/salome/examples/quality_controls_ex02.py
doc/salome/examples/quality_controls_ex03.py
doc/salome/examples/quality_controls_ex04.py
doc/salome/examples/quality_controls_ex05.py
doc/salome/examples/quality_controls_ex06.py
doc/salome/examples/quality_controls_ex07.py
doc/salome/examples/quality_controls_ex08.py
doc/salome/examples/quality_controls_ex09.py
doc/salome/examples/quality_controls_ex10.py
doc/salome/examples/quality_controls_ex11.py
doc/salome/examples/quality_controls_ex12.py
doc/salome/examples/quality_controls_ex13.py
doc/salome/examples/quality_controls_ex14.py
doc/salome/examples/quality_controls_ex15.py
doc/salome/examples/quality_controls_ex16.py
doc/salome/examples/quality_controls_ex17.py
doc/salome/examples/quality_controls_ex18.py
doc/salome/examples/quality_controls_ex19.py
doc/salome/examples/quality_controls_ex20.py
doc/salome/examples/quality_controls_ex21.py
doc/salome/examples/quality_controls_ex22.py
doc/salome/examples/split_biquad.py
doc/salome/examples/transforming_meshes_ex03.py
doc/salome/examples/transforming_meshes_ex06.py
doc/salome/examples/transforming_meshes_ex07.py
doc/salome/examples/transforming_meshes_ex08.py
doc/salome/examples/transforming_meshes_ex09.py
doc/salome/examples/transforming_meshes_ex10.py
doc/salome/examples/transforming_meshes_ex11.py
doc/salome/examples/transforming_meshes_ex12.py
doc/salome/examples/transforming_meshes_ex13.py
doc/salome/examples/use_existing_faces.py
doc/salome/examples/viewing_meshes_ex01.py
doc/salome/examples/viewing_meshes_ex02.py
doc/salome/gui/SMESH/input/smesh_migration.doc
doc/salome/gui/SMESH/input/smeshpy_interface.doc
idl/SMESH_Gen.idl
idl/SMESH_Mesh.idl
resources/SMESHCatalog.xml.in
src/PluginUtils/GeomSelectionTools.cxx
src/PluginUtils/GeomSelectionTools.h
src/SMESH/SMESH_Algo.cxx
src/SMESH/SMESH_Algo.hxx
src/SMESH/SMESH_Gen.cxx
src/SMESH/SMESH_Gen.hxx
src/SMESH/SMESH_Hypothesis.cxx
src/SMESH/SMESH_Hypothesis.hxx
src/SMESH/SMESH_Mesh.cxx
src/SMESH/SMESH_Mesh.hxx
src/SMESHDS/SMESHDS_Document.cxx
src/SMESHDS/SMESHDS_Document.hxx
src/SMESHGUI/SMESHGUI.cxx
src/SMESHGUI/SMESHGUI.h
src/SMESHGUI/SMESHGUI_Add0DElemsOnAllNodesDlg.cxx
src/SMESHGUI/SMESHGUI_AddMeshElementDlg.cxx
src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.cxx
src/SMESHGUI/SMESHGUI_BuildCompoundDlg.cxx
src/SMESHGUI/SMESHGUI_ClippingDlg.cxx
src/SMESHGUI/SMESHGUI_ComputeDlg.cxx
src/SMESHGUI/SMESHGUI_ConvToQuadOp.cxx
src/SMESHGUI/SMESHGUI_CopyMeshDlg.cxx
src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.cxx
src/SMESHGUI/SMESHGUI_DeleteGroupDlg.cxx
src/SMESHGUI/SMESHGUI_DisplayEntitiesDlg.cxx
src/SMESHGUI/SMESHGUI_Displayer.cxx
src/SMESHGUI/SMESHGUI_DuplicateNodesDlg.cxx
src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx
src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx
src/SMESHGUI/SMESHGUI_FieldSelectorWdg.cxx
src/SMESHGUI/SMESHGUI_FilterDlg.cxx
src/SMESHGUI/SMESHGUI_FindElemByPointDlg.cxx
src/SMESHGUI/SMESHGUI_GEOMGenUtils.cxx
src/SMESHGUI/SMESHGUI_GroupDlg.cxx
src/SMESHGUI/SMESHGUI_GroupOnShapeDlg.cxx
src/SMESHGUI/SMESHGUI_GroupOpDlg.cxx
src/SMESHGUI/SMESHGUI_Hypotheses.cxx
src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx
src/SMESHGUI/SMESHGUI_Make2DFrom3DOp.cxx
src/SMESHGUI/SMESHGUI_MakeNodeAtPointDlg.cxx
src/SMESHGUI/SMESHGUI_MergeDlg.cxx
src/SMESHGUI/SMESHGUI_MeshInfo.cxx
src/SMESHGUI/SMESHGUI_MeshOp.cxx
src/SMESHGUI/SMESHGUI_MeshOrderOp.cxx
src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx
src/SMESHGUI/SMESHGUI_MeshUtils.cxx
src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx
src/SMESHGUI/SMESHGUI_NodesDlg.cxx
src/SMESHGUI/SMESHGUI_Operation.cxx
src/SMESHGUI/SMESHGUI_Operation.h
src/SMESHGUI/SMESHGUI_RemoveElementsDlg.cxx
src/SMESHGUI/SMESHGUI_RemoveNodesDlg.cxx
src/SMESHGUI/SMESHGUI_RenumberingDlg.cxx
src/SMESHGUI/SMESHGUI_ReorientFacesDlg.cxx
src/SMESHGUI/SMESHGUI_RevolutionDlg.cxx
src/SMESHGUI/SMESHGUI_RotationDlg.cxx
src/SMESHGUI/SMESHGUI_ScaleDlg.cxx
src/SMESHGUI/SMESHGUI_Selection.cxx
src/SMESHGUI/SMESHGUI_Selection.h
src/SMESHGUI/SMESHGUI_SelectionOp.cxx
src/SMESHGUI/SMESHGUI_SewingDlg.cxx
src/SMESHGUI/SMESHGUI_ShapeByMeshDlg.cxx
src/SMESHGUI/SMESHGUI_SingleEditDlg.cxx
src/SMESHGUI/SMESHGUI_SmoothingDlg.cxx
src/SMESHGUI/SMESHGUI_SplitBiQuad.cxx
src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx
src/SMESHGUI/SMESHGUI_TranslationDlg.cxx
src/SMESHGUI/SMESHGUI_Utils.cxx
src/SMESHGUI/SMESHGUI_Utils.h
src/SMESHGUI/SMESHGUI_VTKUtils.cxx
src/SMESHGUI/SMESHGUI_VTKUtils.h
src/SMESHUtils/SMESH_MAT2d.cxx
src/SMESH_I/CMakeLists.txt
src/SMESH_I/SMESH_2smeshpy.cxx
src/SMESH_I/SMESH_2smeshpy.hxx
src/SMESH_I/SMESH_DumpPython.cxx
src/SMESH_I/SMESH_Filter_i.cxx
src/SMESH_I/SMESH_Gen_i.cxx
src/SMESH_I/SMESH_Gen_i.hxx
src/SMESH_I/SMESH_Gen_i_1.cxx
src/SMESH_I/SMESH_Group_i.cxx
src/SMESH_I/SMESH_Hypothesis_i.cxx
src/SMESH_I/SMESH_Hypothesis_i.hxx
src/SMESH_I/SMESH_MeshEditor_i.cxx
src/SMESH_I/SMESH_Mesh_i.cxx
src/SMESH_I/SMESH_Mesh_i.hxx
src/SMESH_I/SMESH_NoteBook.cxx
src/SMESH_I/SMESH_PreMeshInfo.cxx
src/SMESH_I/SMESH_PythonDump.hxx
src/SMESH_PY/smeshstudytools.py
src/SMESH_SWIG/PAL_MESH_041_mesh.py
src/SMESH_SWIG/PAL_MESH_043_2D.py
src/SMESH_SWIG/PAL_MESH_043_3D.py
src/SMESH_SWIG/SMESH_AdvancedEditor.py
src/SMESH_SWIG/SMESH_BelongToGeom.py
src/SMESH_SWIG/SMESH_BuildCompound.py
src/SMESH_SWIG/SMESH_GroupFromGeom.py
src/SMESH_SWIG/SMESH_GroupFromGeom2.py
src/SMESH_SWIG/SMESH_GroupLyingOnGeom.py
src/SMESH_SWIG/SMESH_Nut.py
src/SMESH_SWIG/SMESH_Partition1_tetra.py
src/SMESH_SWIG/SMESH_Sphere.py
src/SMESH_SWIG/SMESH_blocks.py
src/SMESH_SWIG/SMESH_box.py
src/SMESH_SWIG/SMESH_box2_tetra.py
src/SMESH_SWIG/SMESH_box3_tetra.py
src/SMESH_SWIG/SMESH_box_tetra.py
src/SMESH_SWIG/SMESH_controls.py
src/SMESH_SWIG/SMESH_demo_hexa2_upd.py
src/SMESH_SWIG/SMESH_fixation.py
src/SMESH_SWIG/SMESH_fixation_hexa.py
src/SMESH_SWIG/SMESH_fixation_netgen.py
src/SMESH_SWIG/SMESH_fixation_tetra.py
src/SMESH_SWIG/SMESH_flight_skin.py
src/SMESH_SWIG/SMESH_freebord.py
src/SMESH_SWIG/SMESH_hexaedre.py
src/SMESH_SWIG/SMESH_mechanic.py
src/SMESH_SWIG/SMESH_mechanic_editor.py
src/SMESH_SWIG/SMESH_mechanic_netgen.py
src/SMESH_SWIG/SMESH_mechanic_tetra.py
src/SMESH_SWIG/SMESH_reg.py
src/SMESH_SWIG/SMESH_test.py
src/SMESH_SWIG/SMESH_test0.py
src/SMESH_SWIG/SMESH_test1.py
src/SMESH_SWIG/SMESH_test1_AndDisplay.py
src/SMESH_SWIG/SMESH_test2.py
src/SMESH_SWIG/SMESH_test3.py
src/SMESH_SWIG/SMESH_test4.py
src/SMESH_SWIG/SMESH_test5.py
src/SMESH_SWIG/StdMeshersBuilder.py
src/SMESH_SWIG/ex01_cube2build.py
src/SMESH_SWIG/ex02_cube2primitive.py
src/SMESH_SWIG/ex03_cube2partition.py
src/SMESH_SWIG/ex04_cube5tetraHexa.py
src/SMESH_SWIG/ex05_hole1build.py
src/SMESH_SWIG/ex06_hole1boolean.py
src/SMESH_SWIG/ex07_hole1partition.py
src/SMESH_SWIG/ex08_hole2build.py
src/SMESH_SWIG/ex09_grid4build.py
src/SMESH_SWIG/ex10_grid4geometry.py
src/SMESH_SWIG/ex11_grid3partition.py
src/SMESH_SWIG/ex12_grid17partition.py
src/SMESH_SWIG/ex13_hole1partial.py
src/SMESH_SWIG/ex14_cyl1holed.py
src/SMESH_SWIG/ex15_cyl2geometry.py
src/SMESH_SWIG/ex16_cyl2complementary.py
src/SMESH_SWIG/ex17_dome1.py
src/SMESH_SWIG/ex18_dome2.py
src/SMESH_SWIG/ex19_sphereINcube.py
src/SMESH_SWIG/ex21_lamp.py
src/SMESH_SWIG/ex24_cylinder.py
src/SMESH_SWIG/ex29_refine.py
src/SMESH_SWIG/ex30_groupsOp.py
src/SMESH_SWIG/ex30_tepal.py
src/SMESH_SWIG/ex31_dimGroup.py
src/SMESH_SWIG/smesh.py
src/SMESH_SWIG/smeshBuilder.py
src/SMESH_SWIG/smesh_algorithm.py
src/SMESH_SWIG/smesh_selection.py
src/SMESH_SWIG_WITHIHM/CMakeLists.txt
src/SMESH_SWIG_WITHIHM/libSMESH_Swig.cxx
src/SMESH_SWIG_WITHIHM/libSMESH_Swig.h
src/SMESH_SWIG_WITHIHM/libSMESH_Swig.i
src/StdMeshers/StdMeshers_Adaptive1D.cxx
src/StdMeshers/StdMeshers_Adaptive1D.hxx
src/StdMeshers/StdMeshers_Arithmetic1D.cxx
src/StdMeshers/StdMeshers_Arithmetic1D.hxx
src/StdMeshers/StdMeshers_AutomaticLength.cxx
src/StdMeshers/StdMeshers_AutomaticLength.hxx
src/StdMeshers/StdMeshers_CartesianParameters3D.cxx
src/StdMeshers/StdMeshers_CartesianParameters3D.hxx
src/StdMeshers/StdMeshers_Cartesian_3D.cxx
src/StdMeshers/StdMeshers_Cartesian_3D.hxx
src/StdMeshers/StdMeshers_CompositeHexa_3D.cxx
src/StdMeshers/StdMeshers_CompositeHexa_3D.hxx
src/StdMeshers/StdMeshers_CompositeSegment_1D.cxx
src/StdMeshers/StdMeshers_CompositeSegment_1D.hxx
src/StdMeshers/StdMeshers_Deflection1D.cxx
src/StdMeshers/StdMeshers_Deflection1D.hxx
src/StdMeshers/StdMeshers_FixedPoints1D.cxx
src/StdMeshers/StdMeshers_FixedPoints1D.hxx
src/StdMeshers/StdMeshers_Geometric1D.cxx
src/StdMeshers/StdMeshers_Geometric1D.hxx
src/StdMeshers/StdMeshers_HexaFromSkin_3D.cxx
src/StdMeshers/StdMeshers_HexaFromSkin_3D.hxx
src/StdMeshers/StdMeshers_Hexa_3D.cxx
src/StdMeshers/StdMeshers_Hexa_3D.hxx
src/StdMeshers/StdMeshers_ImportSource.cxx
src/StdMeshers/StdMeshers_ImportSource.hxx
src/StdMeshers/StdMeshers_Import_1D.cxx
src/StdMeshers/StdMeshers_Import_1D.hxx
src/StdMeshers/StdMeshers_Import_1D2D.cxx
src/StdMeshers/StdMeshers_Import_1D2D.hxx
src/StdMeshers/StdMeshers_LayerDistribution.cxx
src/StdMeshers/StdMeshers_LayerDistribution.hxx
src/StdMeshers/StdMeshers_LayerDistribution2D.cxx
src/StdMeshers/StdMeshers_LayerDistribution2D.hxx
src/StdMeshers/StdMeshers_LengthFromEdges.cxx
src/StdMeshers/StdMeshers_LengthFromEdges.hxx
src/StdMeshers/StdMeshers_LocalLength.cxx
src/StdMeshers/StdMeshers_LocalLength.hxx
src/StdMeshers/StdMeshers_MEFISTO_2D.cxx
src/StdMeshers/StdMeshers_MEFISTO_2D.hxx
src/StdMeshers/StdMeshers_MaxElementArea.cxx
src/StdMeshers/StdMeshers_MaxElementArea.hxx
src/StdMeshers/StdMeshers_MaxElementVolume.cxx
src/StdMeshers/StdMeshers_MaxElementVolume.hxx
src/StdMeshers/StdMeshers_MaxLength.cxx
src/StdMeshers/StdMeshers_MaxLength.hxx
src/StdMeshers/StdMeshers_NotConformAllowed.cxx
src/StdMeshers/StdMeshers_NotConformAllowed.hxx
src/StdMeshers/StdMeshers_NumberOfLayers.cxx
src/StdMeshers/StdMeshers_NumberOfLayers.hxx
src/StdMeshers/StdMeshers_NumberOfLayers2D.cxx
src/StdMeshers/StdMeshers_NumberOfLayers2D.hxx
src/StdMeshers/StdMeshers_NumberOfSegments.cxx
src/StdMeshers/StdMeshers_NumberOfSegments.hxx
src/StdMeshers/StdMeshers_PolygonPerFace_2D.cxx
src/StdMeshers/StdMeshers_PolygonPerFace_2D.hxx
src/StdMeshers/StdMeshers_Prism_3D.cxx
src/StdMeshers/StdMeshers_Prism_3D.hxx
src/StdMeshers/StdMeshers_ProjectionSource1D.cxx
src/StdMeshers/StdMeshers_ProjectionSource1D.hxx
src/StdMeshers/StdMeshers_ProjectionSource2D.cxx
src/StdMeshers/StdMeshers_ProjectionSource2D.hxx
src/StdMeshers/StdMeshers_ProjectionSource3D.cxx
src/StdMeshers/StdMeshers_ProjectionSource3D.hxx
src/StdMeshers/StdMeshers_Projection_1D.cxx
src/StdMeshers/StdMeshers_Projection_1D.hxx
src/StdMeshers/StdMeshers_Projection_1D2D.cxx
src/StdMeshers/StdMeshers_Projection_1D2D.hxx
src/StdMeshers/StdMeshers_Projection_2D.cxx
src/StdMeshers/StdMeshers_Projection_2D.hxx
src/StdMeshers/StdMeshers_Projection_3D.cxx
src/StdMeshers/StdMeshers_Projection_3D.hxx
src/StdMeshers/StdMeshers_Propagation.cxx
src/StdMeshers/StdMeshers_Propagation.hxx
src/StdMeshers/StdMeshers_QuadFromMedialAxis_1D2D.cxx
src/StdMeshers/StdMeshers_QuadFromMedialAxis_1D2D.hxx
src/StdMeshers/StdMeshers_QuadrangleParams.cxx
src/StdMeshers/StdMeshers_QuadrangleParams.hxx
src/StdMeshers/StdMeshers_QuadranglePreference.cxx
src/StdMeshers/StdMeshers_QuadranglePreference.hxx
src/StdMeshers/StdMeshers_Quadrangle_2D.cxx
src/StdMeshers/StdMeshers_Quadrangle_2D.hxx
src/StdMeshers/StdMeshers_QuadraticMesh.cxx
src/StdMeshers/StdMeshers_QuadraticMesh.hxx
src/StdMeshers/StdMeshers_RadialPrism_3D.cxx
src/StdMeshers/StdMeshers_RadialPrism_3D.hxx
src/StdMeshers/StdMeshers_RadialQuadrangle_1D2D.cxx
src/StdMeshers/StdMeshers_RadialQuadrangle_1D2D.hxx
src/StdMeshers/StdMeshers_Regular_1D.cxx
src/StdMeshers/StdMeshers_Regular_1D.hxx
src/StdMeshers/StdMeshers_Reversible1D.cxx
src/StdMeshers/StdMeshers_Reversible1D.hxx
src/StdMeshers/StdMeshers_SegmentAroundVertex_0D.cxx
src/StdMeshers/StdMeshers_SegmentAroundVertex_0D.hxx
src/StdMeshers/StdMeshers_SegmentLengthAroundVertex.cxx
src/StdMeshers/StdMeshers_SegmentLengthAroundVertex.hxx
src/StdMeshers/StdMeshers_StartEndLength.cxx
src/StdMeshers/StdMeshers_StartEndLength.hxx
src/StdMeshers/StdMeshers_UseExisting_1D2D.cxx
src/StdMeshers/StdMeshers_UseExisting_1D2D.hxx
src/StdMeshers/StdMeshers_ViscousLayers.cxx
src/StdMeshers/StdMeshers_ViscousLayers.hxx
src/StdMeshers/StdMeshers_ViscousLayers2D.cxx
src/StdMeshers/StdMeshers_ViscousLayers2D.hxx
src/StdMeshersGUI/CMakeLists.txt
src/StdMeshersGUI/StdMeshersGUI_LayerDistributionParamWdg.cxx
src/StdMeshersGUI/StdMeshersGUI_ObjectReferenceParamWdg.cxx
src/StdMeshersGUI/StdMeshersGUI_StdHypothesisCreator.cxx
src/StdMeshersGUI/StdMeshersGUI_SubShapeSelectorWdg.cxx
src/StdMeshers_I/StdMeshers_Adaptive1D_i.cxx
src/StdMeshers_I/StdMeshers_Adaptive1D_i.hxx
src/StdMeshers_I/StdMeshers_Arithmetic1D_i.cxx
src/StdMeshers_I/StdMeshers_Arithmetic1D_i.hxx
src/StdMeshers_I/StdMeshers_AutomaticLength_i.cxx
src/StdMeshers_I/StdMeshers_AutomaticLength_i.hxx
src/StdMeshers_I/StdMeshers_CartesianParameters3D_i.cxx
src/StdMeshers_I/StdMeshers_CartesianParameters3D_i.hxx
src/StdMeshers_I/StdMeshers_Cartesian_3D_i.cxx
src/StdMeshers_I/StdMeshers_Cartesian_3D_i.hxx
src/StdMeshers_I/StdMeshers_CompositeSegment_1D_i.cxx
src/StdMeshers_I/StdMeshers_CompositeSegment_1D_i.hxx
src/StdMeshers_I/StdMeshers_Deflection1D_i.cxx
src/StdMeshers_I/StdMeshers_Deflection1D_i.hxx
src/StdMeshers_I/StdMeshers_FixedPoints1D_i.cxx
src/StdMeshers_I/StdMeshers_FixedPoints1D_i.hxx
src/StdMeshers_I/StdMeshers_Geometric1D_i.cxx
src/StdMeshers_I/StdMeshers_Geometric1D_i.hxx
src/StdMeshers_I/StdMeshers_Hexa_3D_i.cxx
src/StdMeshers_I/StdMeshers_Hexa_3D_i.hxx
src/StdMeshers_I/StdMeshers_ImportSource1D_i.cxx
src/StdMeshers_I/StdMeshers_ImportSource1D_i.hxx
src/StdMeshers_I/StdMeshers_ImportSource2D_i.cxx
src/StdMeshers_I/StdMeshers_ImportSource2D_i.hxx
src/StdMeshers_I/StdMeshers_Import_1D2D_i.cxx
src/StdMeshers_I/StdMeshers_Import_1D2D_i.hxx
src/StdMeshers_I/StdMeshers_Import_1D_i.cxx
src/StdMeshers_I/StdMeshers_Import_1D_i.hxx
src/StdMeshers_I/StdMeshers_LayerDistribution2D_i.cxx
src/StdMeshers_I/StdMeshers_LayerDistribution2D_i.hxx
src/StdMeshers_I/StdMeshers_LayerDistribution_i.cxx
src/StdMeshers_I/StdMeshers_LayerDistribution_i.hxx
src/StdMeshers_I/StdMeshers_LengthFromEdges_i.cxx
src/StdMeshers_I/StdMeshers_LengthFromEdges_i.hxx
src/StdMeshers_I/StdMeshers_LocalLength_i.cxx
src/StdMeshers_I/StdMeshers_LocalLength_i.hxx
src/StdMeshers_I/StdMeshers_MEFISTO_2D_i.cxx
src/StdMeshers_I/StdMeshers_MEFISTO_2D_i.hxx
src/StdMeshers_I/StdMeshers_MaxElementArea_i.cxx
src/StdMeshers_I/StdMeshers_MaxElementArea_i.hxx
src/StdMeshers_I/StdMeshers_MaxElementVolume_i.cxx
src/StdMeshers_I/StdMeshers_MaxElementVolume_i.hxx
src/StdMeshers_I/StdMeshers_MaxLength_i.cxx
src/StdMeshers_I/StdMeshers_MaxLength_i.hxx
src/StdMeshers_I/StdMeshers_NotConformAllowed_i.cxx
src/StdMeshers_I/StdMeshers_NotConformAllowed_i.hxx
src/StdMeshers_I/StdMeshers_NumberOfLayers2D_i.cxx
src/StdMeshers_I/StdMeshers_NumberOfLayers2D_i.hxx
src/StdMeshers_I/StdMeshers_NumberOfLayers_i.cxx
src/StdMeshers_I/StdMeshers_NumberOfLayers_i.hxx
src/StdMeshers_I/StdMeshers_NumberOfSegments_i.cxx
src/StdMeshers_I/StdMeshers_NumberOfSegments_i.hxx
src/StdMeshers_I/StdMeshers_ObjRefUlils.cxx
src/StdMeshers_I/StdMeshers_ObjRefUlils.hxx
src/StdMeshers_I/StdMeshers_PolygonPerFace_2D_i.cxx
src/StdMeshers_I/StdMeshers_PolygonPerFace_2D_i.hxx
src/StdMeshers_I/StdMeshers_Prism_3D_i.cxx
src/StdMeshers_I/StdMeshers_Prism_3D_i.hxx
src/StdMeshers_I/StdMeshers_ProjectionSource1D_i.cxx
src/StdMeshers_I/StdMeshers_ProjectionSource1D_i.hxx
src/StdMeshers_I/StdMeshers_ProjectionSource2D_i.cxx
src/StdMeshers_I/StdMeshers_ProjectionSource2D_i.hxx
src/StdMeshers_I/StdMeshers_ProjectionSource3D_i.cxx
src/StdMeshers_I/StdMeshers_ProjectionSource3D_i.hxx
src/StdMeshers_I/StdMeshers_Projection_1D_2D_3D_i.cxx
src/StdMeshers_I/StdMeshers_Projection_1D_2D_3D_i.hxx
src/StdMeshers_I/StdMeshers_Propagation_i.cxx
src/StdMeshers_I/StdMeshers_Propagation_i.hxx
src/StdMeshers_I/StdMeshers_QuadrangleParams_i.cxx
src/StdMeshers_I/StdMeshers_QuadrangleParams_i.hxx
src/StdMeshers_I/StdMeshers_QuadranglePreference_i.cxx
src/StdMeshers_I/StdMeshers_QuadranglePreference_i.hxx
src/StdMeshers_I/StdMeshers_Quadrangle_2D_i.cxx
src/StdMeshers_I/StdMeshers_Quadrangle_2D_i.hxx
src/StdMeshers_I/StdMeshers_QuadraticMesh_i.cxx
src/StdMeshers_I/StdMeshers_QuadraticMesh_i.hxx
src/StdMeshers_I/StdMeshers_RadialQuadrangle_1D2D_i.cxx
src/StdMeshers_I/StdMeshers_RadialQuadrangle_1D2D_i.hxx
src/StdMeshers_I/StdMeshers_Regular_1D_i.cxx
src/StdMeshers_I/StdMeshers_Regular_1D_i.hxx
src/StdMeshers_I/StdMeshers_SegmentAroundVertex_0D_i.cxx
src/StdMeshers_I/StdMeshers_SegmentAroundVertex_0D_i.hxx
src/StdMeshers_I/StdMeshers_SegmentLengthAroundVertex_i.cxx
src/StdMeshers_I/StdMeshers_SegmentLengthAroundVertex_i.hxx
src/StdMeshers_I/StdMeshers_StartEndLength_i.cxx
src/StdMeshers_I/StdMeshers_StartEndLength_i.hxx
src/StdMeshers_I/StdMeshers_UseExisting_1D2D_i.cxx
src/StdMeshers_I/StdMeshers_UseExisting_1D2D_i.hxx
src/StdMeshers_I/StdMeshers_ViscousLayers2D_i.cxx
src/StdMeshers_I/StdMeshers_ViscousLayers2D_i.hxx
src/StdMeshers_I/StdMeshers_ViscousLayers_i.cxx
src/StdMeshers_I/StdMeshers_ViscousLayers_i.hxx
src/StdMeshers_I/StdMeshers_i.cxx
src/Tools/MGCleanerPlug/MGCleanerMonPlugDialog.py
src/Tools/MGCleanerPlug/MGCleanerplug_plugin.py
src/Tools/MacMesh/MacMesh/CutnGroup.py
src/Tools/MacMesh/MacMesh/GenFunctions.py
src/Tools/MacMesh/MacMesh/MacObject.py
src/Tools/MacMesh/MacMesh/PublishGroups.py
src/Tools/MeshCut/meshcut_plugin.py
src/Tools/Verima/Doc/usage_outil.rst
src/Tools/Verima/Stats/getCritere.py
src/Tools/YamsPlug/monYamsPlugDialog.py
src/Tools/YamsPlug/yamsplug_plugin.py
src/Tools/blocFissure/AREextradosLauncher.py
src/Tools/blocFissure/AREintradosLauncher.py
src/Tools/blocFissure/exemple2.py
src/Tools/blocFissure/fissureLauncher.py
src/Tools/blocFissure/gmu/construitFissureGenerale.py
src/Tools/blocFissure/gmu/creeZoneDefautDansObjetSain.py
src/Tools/blocFissure/gmu/geomsmesh.py
src/Tools/blocFissure/gmu/insereFissureElliptique.py
src/Tools/blocFissure/gmu/insereFissureGenerale.py
src/Tools/blocFissure/gmu/insereFissureLongue.py
src/Tools/blocFissure/ihm/fissureCoude_plugin.py
src/Tools/blocFissure/ihm/fissureGenerale_plugin.py
src/Tools/blocFissure/lanceurSoudureArrondieTest.py
src/Tools/blocFissure/lanceurSoudureViveTest.py
src/Tools/blocFissure/lanceurTestAubry.py
src/Tools/blocFissure/materielCasTests/cubeAngle.py
src/Tools/blocFissure/materielCasTests/cubeFin.py
src/Tools/blocFissure/materielCasTests/decoupeCylindre.py
src/Tools/blocFissure/materielCasTests/disque_perce.py
src/Tools/blocFissure/materielCasTests/ellipse.py
src/Tools/blocFissure/materielCasTests/ellipse_disque.py
src/Tools/blocFissure/materielCasTests/ellipse_probleme.py
src/Tools/blocFissure/materielCasTests/eprouvetteCourbe.py
src/Tools/blocFissure/materielCasTests/eprouvetteDroite.py
src/Tools/blocFissure/materielCasTests/fissureGauche.py
src/Tools/blocFissure/materielCasTests/fissureGauche2.py
src/Tools/blocFissure/materielCasTests/vis.py
src/Tools/padder/meshjob/idl/SPADDERPluginTest.idl
src/Tools/padder/meshjob/impl/SPADDERPluginTester_i.cxx
src/Tools/padder/meshjob/impl/SPADDERPluginTester_i.hxx
src/Tools/padder/resources/testdata/buildparticules.py
src/Tools/padder/spadderpy/gui/inputdialog.py
src/Tools/padder/spadderpy/gui/plugindialog.py
src/Tools/padder/unittests/usecase_spadderPluginTester.py

index 47383fee949f4dd77b97f7b85292073caff4e7e3..04d6073bdb2adb486e8850e0ff6338214ac9c90d 100644 (file)
@@ -3,11 +3,11 @@
 import salome
 salome.salome_init()
 from salome.geom import geomBuilder
 import salome
 salome.salome_init()
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH
 from salome.smesh import smeshBuilder
 
 import SMESH
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 ###
 # Geometry: an assembly of a box, a cylinder and a truncated cone
 
 ###
 # Geometry: an assembly of a box, a cylinder and a truncated cone
index 5520d7afe9089ca3660ff1f3b031a5828debb274..ae03906c89068e7861633390ead318d182009078 100644 (file)
@@ -2,7 +2,7 @@ import salome
 salome.salome_init()
 
 from salome.geom import geomBuilder
 salome.salome_init()
 
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 # This script demonstrates generation of 3D mesh basing on a modified 2D mesh
 #
 
 # This script demonstrates generation of 3D mesh basing on a modified 2D mesh
 #
@@ -31,7 +31,7 @@ Sph_Face = geompy.GetInPlace(Cut_1, Sph_Face, isNewImplementation=True, theName=
 
 import  SMESH
 from salome.smesh import smeshBuilder
 
 import  SMESH
 from salome.smesh import smeshBuilder
-smesh = smeshBuilder.New(salome.myStudy)
+smesh = smeshBuilder.New()
 
 Mesh_1 = smesh.Mesh(Cut_1)
 
 
 Mesh_1 = smesh.Mesh(Cut_1)
 
@@ -59,4 +59,4 @@ Mesh_1.Tetrahedron()
 Mesh_1.Compute()
 
 if salome.sg.hasDesktop():
 Mesh_1.Compute()
 
 if salome.sg.hasDesktop():
-  salome.sg.updateObjBrowser(True)
+  salome.sg.updateObjBrowser()
index e5651cb670a2a96a2e9c8492e8220d647ddd0582..6472c053ec403c4918cd04ae5496e6639a9611b6 100644 (file)
@@ -5,11 +5,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 import salome_notebook
 
 
 import salome_notebook
 
 
index f328d0582e19ccf5bbd6199beef539fa537d20f0..786758d5d04f0f1ebfe102a0b3b7514b96ba6fa1 100644 (file)
@@ -4,11 +4,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # create a box
 box = geompy.MakeBox(0., 0., 0., 100., 200., 300.)
 
 # create a box
 box = geompy.MakeBox(0., 0., 0., 100., 200., 300.)
index 230e67a00f8f9ec9886c5288fc37d5941c5d3677..522f72bf4c1d05a2d0fd6e7d27618766e5d7ccb7 100644 (file)
@@ -4,11 +4,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # create a box
 box = geompy.MakeBoxDXDYDZ(10., 10., 10.)
 
 # create a box
 box = geompy.MakeBoxDXDYDZ(10., 10., 10.)
index 8687b8971a1c2cc486896492388372733252dbce..2fa762c3f19ec83cf751483644efe51825f45f01 100644 (file)
@@ -4,11 +4,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
 [Face_1,Face_2,Face_3,Face_4,Face_5,Face_6] = geompy.SubShapeAllSorted(Box_1, geompy.ShapeType["FACE"])
 
 Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
 [Face_1,Face_2,Face_3,Face_4,Face_5,Face_6] = geompy.SubShapeAllSorted(Box_1, geompy.ShapeType["FACE"])
index 82408d5a3e5da222e9cc6863f046ed4f703f2a5d..86b4434810205a19faee70fbed96c049b9350f19 100644 (file)
@@ -4,11 +4,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 def PrintMeshInfo(theMesh):
     aMesh = theMesh.GetMesh()
 
 def PrintMeshInfo(theMesh):
     aMesh = theMesh.GetMesh()
index ae1d073b4260139f5deb0c7502f018dae48cbbcd..5426b729402fdb33990102c2f824fbaeff3f6f1e 100644 (file)
@@ -4,11 +4,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # create a box
 box = geompy.MakeBox(0., 0., 0., 100., 200., 300.)
 
 # create a box
 box = geompy.MakeBox(0., 0., 0., 100., 200., 300.)
index 90fe2765e5b6b636bfedc6d5eb8ded6fd86eb14a..3cc4dc1023d98decd129ae2f8b66bf58b4ed444f 100644 (file)
@@ -8,11 +8,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 import math
 
 
 import math
 
@@ -84,7 +84,7 @@ geompy.DifferenceList(group_1, [group_1_box])
 # Mesh the blocks with hexahedral
 # -------------------------------
 
 # Mesh the blocks with hexahedral
 # -------------------------------
 
-smesh.SetCurrentStudy(salome.myStudy)
+smesh.UpdateStudy()
 
 def discretize(x, y, z,  nbSeg, shape=blocks):
     vert = geompy.MakeVertex( x, y, z )
 
 def discretize(x, y, z,  nbSeg, shape=blocks):
     vert = geompy.MakeVertex( x, y, z )
index 4ddb69702ac8697566ef2d860b3353d0d890deec..db825507bef1abb08950b2c1c542778596744d81 100644 (file)
@@ -4,11 +4,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 ## create a bottom box
 Box_inf = geompy.MakeBox(0., 0., 0., 200., 200., 50.)
 
 ## create a bottom box
 Box_inf = geompy.MakeBox(0., 0., 0., 200., 200., 50.)
@@ -39,7 +39,7 @@ geompy.addToStudy(Box_sup, "Box_sup")
 geompy.addToStudyInFather(Box_sup, Fsup2, "Fsup")
 geompy.addToStudyInFather(Box_sup, Finf2, "Finf")
 
 geompy.addToStudyInFather(Box_sup, Fsup2, "Fsup")
 geompy.addToStudyInFather(Box_sup, Finf2, "Finf")
 
-smesh.SetCurrentStudy(salome.myStudy)
+smesh.UpdateStudy()
 
 ## create a bottom mesh
 Mesh_inf = smesh.Mesh(Box_inf, "Mesh_inf")
 
 ## create a bottom mesh
 Mesh_inf = smesh.Mesh(Box_inf, "Mesh_inf")
@@ -78,4 +78,4 @@ Compound2 = smesh.Concatenate([Mesh_inf, Mesh_sup], 1, 0, 1e-05, True,
                               name='Compound with UniteGrps and GrpsOfAllElems')
 
 if salome.sg.hasDesktop():
                               name='Compound with UniteGrps and GrpsOfAllElems')
 
 if salome.sg.hasDesktop():
-    salome.sg.updateObjBrowser(True)
+    salome.sg.updateObjBrowser()
index 0cb4b229f54375aa01601e9d9bf1a6260e84d118..7fa7a7dcffc3161a293aa5e6a3624c2c5608166e 100644 (file)
@@ -4,11 +4,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # make geometry of a box
 box = geompy.MakeBoxDXDYDZ(100,100,100)
 
 # make geometry of a box
 box = geompy.MakeBoxDXDYDZ(100,100,100)
index 96e2fabfe1912ce45ff7bcdad8640cd474d92771..579d14de5fc5eb1b7db98e7c1c76160f73ede789 100644 (file)
@@ -1,9 +1,9 @@
 import salome, math
 salome.salome_init()
 from salome.geom import geomBuilder
 import salome, math
 salome.salome_init()
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 from salome.smesh import smeshBuilder
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 
 box   = geompy.MakeBoxDXDYDZ( 100, 100, 100 )
 
 
 box   = geompy.MakeBoxDXDYDZ( 100, 100, 100 )
index c9f02bc12a2a7a1ac717e974c5bc72245cb6abbf..a4083ba4934b66f69906f097d3c8b50f7930e2fd 100644 (file)
@@ -4,10 +4,10 @@ import salome
 salome.salome_init()
 
 from salome.geom import geomBuilder
 salome.salome_init()
 
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 from salome.smesh import smeshBuilder
 
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # create a box
 box = geompy.MakeBoxDXDYDZ(10., 10., 10.)
 
 # create a box
 box = geompy.MakeBoxDXDYDZ(10., 10., 10.)
index 572404569d8f53c16feb88a1eb40316e787f574c..9473354b3733b2a868c419dba5ea758f85a2400d 100644 (file)
@@ -4,11 +4,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # create a face from arc and straight segment
 px = geompy.MakeVertex(100., 0.  , 0.  )
 
 # create a face from arc and straight segment
 px = geompy.MakeVertex(100., 0.  , 0.  )
index 05a984b77d2f68cf296e6ccfd5dff0959c1cf3cd..3e0a5a7defa0305b8bcab7b0047620395c899adf 100644 (file)
@@ -4,11 +4,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # create a box
 box = geompy.MakeBoxDXDYDZ(10., 10., 10.)
 
 # create a box
 box = geompy.MakeBoxDXDYDZ(10., 10., 10.)
index 8ebddfc5c3fd32d58a57fd9d9902ced2ddd71cf1..c15e4421bf2fc0cc7efb69216994f9e43b379fcb 100644 (file)
@@ -4,11 +4,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # create a box
 box = geompy.MakeBoxDXDYDZ(10., 10., 10.)
 
 # create a box
 box = geompy.MakeBoxDXDYDZ(10., 10., 10.)
index 204496ce039b7803cfda6d7611052b4ce996b094..d998447184cc5e6efb400c60ddd83273584d5ac9 100644 (file)
@@ -4,11 +4,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # create a face
 px   = geompy.MakeVertex(100., 0.  , 0.  )
 
 # create a face
 px   = geompy.MakeVertex(100., 0.  , 0.  )
index 495067aa6e5a909bcc3345337522a713459691ec..0c84223332503a6398eddda5089ea42a23101207 100644 (file)
@@ -4,11 +4,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # create a cylinder
 cyl = geompy.MakeCylinderRH(30., 50.)
 
 # create a cylinder
 cyl = geompy.MakeCylinderRH(30., 50.)
index 1630a9047e757f61e3c2b606c565c7de857f12f9..a8a8e9fd2ef9041241ca9c921836f87fd4b4a952 100644 (file)
@@ -4,11 +4,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # create sketchers
 sketcher1 = geompy.MakeSketcher("Sketcher:F 0 0:TT 70 0:TT 70 70:TT 0 70:WW")
 
 # create sketchers
 sketcher1 = geompy.MakeSketcher("Sketcher:F 0 0:TT 70 0:TT 70 70:TT 0 70:WW")
index 3c877f3dae45e8a6edf4e58273178c8c17725508..285eae2ad63f29e0c67f65e220dfad39d51f241f 100644 (file)
@@ -4,11 +4,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # create a box
 base = geompy.MakeSketcher("Sketcher:F 0 0:TT 10 0:TT 20 10:TT 0 10:WF", theName="F")
 
 # create a box
 base = geompy.MakeSketcher("Sketcher:F 0 0:TT 10 0:TT 20 10:TT 0 10:WF", theName="F")
index 8490a4b8c753ba679727cab2ec80da62818640b8..6e86cc95ea7c7bf6d955c4a5a94610d500cb713e 100644 (file)
@@ -4,11 +4,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # create a box
 box = geompy.MakeBoxDXDYDZ(10., 10., 10.)
 
 # create a box
 box = geompy.MakeBoxDXDYDZ(10., 10., 10.)
index 6e6bf84bbc185d38dc8616ec9143a892d4055822..9fea80b144c82531ea5b1b7cff2e98cfa8b3bfe3 100644 (file)
@@ -6,11 +6,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # Prepare geometry
 
 
 # Prepare geometry
 
index 2510ed6f0b75275e70dd9dd6196aaaee79dc203f..a57d0781dd5784c335893ca02d172433589e2f43 100644 (file)
@@ -6,11 +6,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # Prepare geometry
 
 
 # Prepare geometry
 
index 827c4c5e2d4d02d6d6205c7573ccf60af2dca203..7ead18cbf3b81ea45db38ee1e4afdaf27c683198 100644 (file)
@@ -4,11 +4,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 from salome.StdMeshers import StdMeshersBuilder
 
 # Create face and explode it on edges
 from salome.StdMeshers import StdMeshersBuilder
 
 # Create face and explode it on edges
index 339cd200d4e62d56127d5036b2838726dbfdb5b8..0bcdcf60a2bc2b777cf8576d8c4fdcf2f743b0fd 100644 (file)
@@ -4,11 +4,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # Create face from the wire and add to study
 Face = geompy.MakeSketcher("Sketcher:F 0 0:TT 20 0:R 90:C 20 90:WF", [0, 0, 0, 1, 0, 0, 0, 0, 1])
 
 # Create face from the wire and add to study
 Face = geompy.MakeSketcher("Sketcher:F 0 0:TT 20 0:R 90:C 20 90:WF", [0, 0, 0, 1, 0, 0, 0, 0, 1])
index 3f55844cff79e68af6171aa669e98dcff52a7b0b..b0ef9f6af9b8f0054d65f6d70dd033ca5fc64fba 100644 (file)
@@ -4,11 +4,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # Get 1/4 part from the disk face.
 Box_1 = geompy.MakeBoxDXDYDZ(100, 100, 100)
 
 # Get 1/4 part from the disk face.
 Box_1 = geompy.MakeBoxDXDYDZ(100, 100, 100)
index 2e01e1b323114c76c004d8f1a136b0aa4ef38e8c..80b430e2a608a90c328942e91ceccc238227d192 100644 (file)
@@ -4,11 +4,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 from salome.StdMeshers import StdMeshersBuilder
 
 # Make quadrangle face and explode it on edges.
 from salome.StdMeshers import StdMeshersBuilder
 
 # Make quadrangle face and explode it on edges.
index ce11e3e400821e463ca833a689a03736e202757f..575601f1ef18da00b548e86878f3112c6ef8ad9d 100644 (file)
@@ -4,11 +4,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # Make a patritioned box
 
 
 # Make a patritioned box
 
index 36d8f6c1f4f2e091cd456e00e7a7a9c23f21e147..f2b7d8c20f4f21207ef87ac3a0e2c92ddcb80820 100644 (file)
@@ -4,11 +4,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 X = geompy.MakeVectorDXDYDZ( 1,0,0 )
 O = geompy.MakeVertex( 100,50,50 )
 
 X = geompy.MakeVectorDXDYDZ( 1,0,0 )
 O = geompy.MakeVertex( 100,50,50 )
index 032d55ddda5f6b4f2c239f727c00908adeed016d..d83edc6aa558fc3286a383a8c79d9ddd646153ec 100644 (file)
@@ -4,9 +4,9 @@
 import salome, SMESH
 salome.salome_init()
 from salome.geom import geomBuilder
 import salome, SMESH
 salome.salome_init()
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 from salome.smesh import smeshBuilder
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # create mesh
 face = geompy.MakeFaceHW(100, 100, 1, theName="quadrangle")
 
 # create mesh
 face = geompy.MakeFaceHW(100, 100, 1, theName="quadrangle")
index bf6f7419bb9de4a1c4f6821cb538c2bbed1b38af..54b4367b0e5da28559d475c74f64295e2078e051 100644 (file)
@@ -4,9 +4,9 @@
 import salome, SMESH
 salome.salome_init()
 from salome.geom import geomBuilder
 import salome, SMESH
 salome.salome_init()
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 from salome.smesh import smeshBuilder
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # create mesh
 face = geompy.MakeFaceHW(100, 100, 1)
 
 # create mesh
 face = geompy.MakeFaceHW(100, 100, 1)
index bdca2d86a14d5a41df283d52ddf616c4c40cb351..c859a07f213996f16e321348f95d8034e6aa1dd9 100644 (file)
@@ -5,11 +5,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 import salome_notebook
 
 # make a mesh on a box
 import salome_notebook
 
 # make a mesh on a box
index 9dc01b49c49bb495b2ac56f4e16314b1ea7a4069..e10e27f883eb7601677d9c956f3ad0b26ee1e389 100644 (file)
@@ -3,10 +3,10 @@
 import salome
 salome.salome_init()
 from salome.geom import geomBuilder
 import salome
 salome.salome_init()
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 import SMESH
 from salome.smesh import smeshBuilder
 import SMESH
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # make a mesh on a box
 box = geompy.MakeBoxDXDYDZ(100,100,100)
 
 # make a mesh on a box
 box = geompy.MakeBoxDXDYDZ(100,100,100)
index 32950cc50302504776e80f81f7fb4cdd94962ff2..c53768a839c027604bd50cbce970268979599abc 100644 (file)
@@ -3,10 +3,10 @@
 import salome
 salome.salome_init()
 from salome.geom import geomBuilder
 import salome
 salome.salome_init()
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 import SMESH
 from salome.smesh import smeshBuilder
 import SMESH
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # make a mesh on a box
 box = geompy.MakeBoxDXDYDZ(100,100,100)
 
 # make a mesh on a box
 box = geompy.MakeBoxDXDYDZ(100,100,100)
index ebbb0b936591ae9f5ed76af956d91d70a3ea47d5..d367ab8781ed748f6cb2ccca0e2c23bd65efd14c 100644 (file)
@@ -3,9 +3,9 @@
 import salome, SMESH
 salome.salome_init()
 from salome.geom import geomBuilder
 import salome, SMESH
 salome.salome_init()
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 from salome.smesh import smeshBuilder
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # create two boxes to have two domains in the mesh
 
 
 # create two boxes to have two domains in the mesh
 
index df187188b8d9399d9fd703e9fc3660fead430691..b81d80155179a2c85d7036a1003020c1853c5f25 100644 (file)
@@ -8,11 +8,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 
 # geometry 
 
 
 # geometry 
index 0bb1b9a2f9321571a12c41620dbfe5995773017d..d99f9b4aed05117367bc9e3316e2de8fabd759fd 100644 (file)
@@ -77,4 +77,4 @@ aGroup.Remove( [2,3,4] )
 
 
 
 
 
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 84150125395d82cef55866fbdaee70042cda101a..4e2a4957f763ca1625c2312af6b021bcfc599a04 100644 (file)
@@ -5,11 +5,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # create a box
 box = geompy.MakeBox(0., 0., 0., 100., 100., 100.)
 
 # create a box
 box = geompy.MakeBox(0., 0., 0., 100., 100., 100.)
@@ -43,4 +43,4 @@ aSmeshGroup1 = quadra.GroupOnGeom(face, "SMESHGroup1")
 # create SMESH group on <aGeomGroupE> with default name
 aSmeshGroup2 = quadra.GroupOnGeom(aGeomGroupE) 
 
 # create SMESH group on <aGeomGroupE> with default name
 aSmeshGroup2 = quadra.GroupOnGeom(aGeomGroupE) 
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index bd85e09e05f55d79c3648a2f95121eb61eaf5ade..560f6a3fbb3e33450d7154f0c97137ab48546ca7 100644 (file)
@@ -5,11 +5,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 import salome_notebook
 
 
 import salome_notebook
 
 
@@ -46,4 +46,4 @@ filt2.SetCriteria( [ smesh.GetCriterion( SMESH.FACE, SMESH.FT_RangeOfIds, "1-70"
 filtIDs3 = filtGroup.GetIDs()
 print "After filter modification, group on filter contains %s elemens" % filtGroup.Size()
 
 filtIDs3 = filtGroup.GetIDs()
 print "After filter modification, group on filter contains %s elemens" % filtGroup.Size()
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 9beb77e364512bac452ac2f5b2520bc1114ad37c..a9b03ed0b4202f2ec2f599ec8ff31736954554f4 100644 (file)
@@ -42,4 +42,4 @@ for i in range(len(aGroupElemIDs)):
   pass
 print ""
 
   pass
 print ""
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 047691b863aba6b0a22d4baa88c72b181fe0c5ae..16c1f14ca31e16ee62958cc6e29bd5a0d746e19e 100644 (file)
@@ -52,4 +52,4 @@ aGroup4.SetColor( SALOMEDS.Color(1.,0.,0.));
 aGroup5 = mesh.UnionListOfGroups([aGroup3, aGroup4], "Any Area")
 print "Criterion: Any Area, Nb = ", len(aGroup5.GetListOfID())
 
 aGroup5 = mesh.UnionListOfGroups([aGroup3, aGroup4], "Any Area")
 print "Criterion: Any Area, Nb = ", len(aGroup5.GetListOfID())
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index bf9e3708ba26be7f6c38a80be7779aa4e28ba5cc..2fc70fe6eed389e79337c7018ec9cf7313e361b8 100644 (file)
@@ -34,4 +34,4 @@ aGroup3 = mesh.IntersectListOfGroups([aGroup1, aGroup2], "20 < Area < 60")
 print "Criterion: 20 < Area < 60, Nb = ", len(aGroup3.GetListOfID())
 # Please note that also there is IntersectGroups() method which works with two groups only
 
 print "Criterion: 20 < Area < 60, Nb = ", len(aGroup3.GetListOfID())
 # Please note that also there is IntersectGroups() method which works with two groups only
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 1a79c5fe27a2ee2c714e771b000d16deed61439d..e0c7ab199f8599b18c16bf5c2652b572c192b7f3 100644 (file)
@@ -32,4 +32,4 @@ aGroupRes = mesh.CutGroups(aGroupMain, aGroupTool, "Area >= 60")
 print "Criterion: Area >= 60, Nb = ", len(aGroupRes.GetListOfID())
 # Please note that also there is CutListOfGroups() method which works with lists of groups of any lengths
 
 print "Criterion: Area >= 60, Nb = ", len(aGroupRes.GetListOfID())
 # Please note that also there is CutListOfGroups() method which works with lists of groups of any lengths
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 459a50dc24a8556aec8db00120e699013495dfe8..f53dcca69222f553c654923ac0f11340db27aafe 100644 (file)
@@ -30,4 +30,4 @@ aGrp = mesh.CreateDimGroup( [aSrcGroup1, aSrcGroup2], SMESH.EDGE, "Edges" )
 # Create group of nodes using source groups of faces
 aGrp = mesh.CreateDimGroup( [aSrcGroup1, aSrcGroup2], SMESH.NODE, "Nodes" )
 
 # Create group of nodes using source groups of faces
 aGrp = mesh.CreateDimGroup( [aSrcGroup1, aSrcGroup2], SMESH.NODE, "Nodes" )
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index d8a5bd71c02764351d7c231ad175c41c42be0dc4..b94f59cbb8d5411fb9ecb9942966a1c855202e29 100644 (file)
@@ -4,11 +4,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 import salome_notebook
 
 from SMESH_mechanic import mesh as mesh1
 import salome_notebook
 
 from SMESH_mechanic import mesh as mesh1
index b5fbf8b1f3e929ca7c3842f9b829acfaf426c505..a11a47dfb5a98f24d9d6c420df51385730c4f262 100644 (file)
@@ -5,11 +5,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 import salome_notebook
 
 from SMESH_mechanic import mesh as mesh1
 import salome_notebook
 
 from SMESH_mechanic import mesh as mesh1
index 5a44cdaca9f25e5d0f8278a7a2d00462a315d7fa..de4af2b550cac4540a14e9370575fef10f6a41d9 100644 (file)
@@ -5,11 +5,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # create a box
 box = geompy.MakeBoxDXDYDZ(100,100,100)
 
 # create a box
 box = geompy.MakeBoxDXDYDZ(100,100,100)
index 0ef07aa7af0eae18dea177cb23309eeff9bb3345..b2594db97f0d07d4bebf74478a0ce6314b5f7ba1 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 
 from salome.smesh import smeshBuilder
 salome.salome_init()
 
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 
 mesh = smesh.Mesh()
 
 
 mesh = smesh.Mesh()
index 7948ed3dc1e74dae7bd4048aec0da124e53266bf..64a783a27c4241ad38cc6fa358f46c1a54294064 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 
 from salome.smesh import smeshBuilder
 salome.salome_init()
 
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 
 mesh = smesh.Mesh()
 
 
 mesh = smesh.Mesh()
index 0c6bc61dd1a24aa4381e53cd51cf5d5677c82ed5..8918b8320d0e87e8d42913f15a07ef5640e91583 100644 (file)
@@ -5,11 +5,11 @@ import salome
 salome.salome_init()
 
 from salome.geom import geomBuilder
 salome.salome_init()
 
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 
 # create a geometry
 
 
 # create a geometry
index c09cb62c6b97293d11f577fae191f9debc710344..401fda8d6edc6feb88305aeb0e666a8eb185d1a1 100644 (file)
@@ -7,7 +7,7 @@ salome.salome_init()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 
 # create an empty mesh structure
 
 
 # create an empty mesh structure
@@ -34,4 +34,4 @@ f1 = MakePolygon(mesh, 0, 0,  0, 30, 13)
 f2 = MakePolygon(mesh, 0, 0, 10, 21,  9)
 f3 = MakePolygon(mesh, 0, 0, 20, 13,  6)
 
 f2 = MakePolygon(mesh, 0, 0, 10, 21,  9)
 f3 = MakePolygon(mesh, 0, 0, 20, 13,  6)
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index bf13423ed898c3075aca7d19f092b3d765480453..fe8ec68c6d887954a4dcc65744e531705d8e9a19 100644 (file)
@@ -5,7 +5,7 @@ import salome
 salome.salome_init()
 
 from salome.smesh import smeshBuilder
 salome.salome_init()
 
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 import math
 
 
 import math
 
@@ -60,4 +60,4 @@ mesh.AddPolyhedralVolume([dd[0], dd[1], dd[2], dd[3], dd[4],  # top
                          [5,5,5,5,5,5,5,5,5,5,5,5])
 
 if salome.sg.hasDesktop():
                          [5,5,5,5,5,5,5,5,5,5,5,5])
 
 if salome.sg.hasDesktop():
-    salome.sg.updateObjBrowser(True)
+    salome.sg.updateObjBrowser()
index 5985c0844f45656b2d2b3ccdb465dc8f8b7ad5b0..22aba54cccd1fde1a3077b837ad940037b0887d0 100644 (file)
@@ -5,11 +5,11 @@ import salome
 salome.salome_init()
 
 from salome.geom import geomBuilder
 salome.salome_init()
 
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 
 box = geompy.MakeBoxDXDYDZ(200, 200, 200)
 
 
 box = geompy.MakeBoxDXDYDZ(200, 200, 200)
index 0786445eb2c95326c580aeb2d59c52be6e763f70..28052722373c9cf8e5c3cda43606a61091befe41 100644 (file)
@@ -5,11 +5,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 import salome_notebook
 
 
 import salome_notebook
 
 
@@ -51,4 +51,4 @@ res = mesh.InverseDiag(bb[1], tt[2])
 if not res: print "failed!"
 else:       print "done."
 
 if not res: print "failed!"
 else:       print "done."
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index ebeb247a81a017a094f2d6b29343712cefd5424b..939278143b58656679604579a6eca6712e4f7395 100644 (file)
@@ -5,11 +5,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 import salome_notebook
 
 
 import salome_notebook
 
 
@@ -51,4 +51,4 @@ res = mesh.DeleteDiag(bb[1], tt[2])
 if not res: print "failed!"
 else:       print "done."
 
 if not res: print "failed!"
 else:       print "done."
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 458b0fe2557e817c5bda56198f7ba1d38eb960c6..d6256cdc176802f44e0935f6e79dd1700e6f3cb7 100644 (file)
@@ -5,11 +5,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 import salome_notebook
 
 
 import salome_notebook
 
 
@@ -51,4 +51,4 @@ res = mesh.TriToQuad([ff[2], ff[3], ff[4], ff[5]], SMESH.FT_MinimumAngle, 60.)
 if not res: print "failed!"
 else:       print "done."
 
 if not res: print "failed!"
 else:       print "done."
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 8ef2c7c8a581fd56ad21bf6582e194068b888849..7e3c723c52ea956c7da551804b924b0e0f0f7da2 100644 (file)
@@ -5,11 +5,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 import salome_notebook
 
 
 import salome_notebook
 
 
@@ -42,4 +42,4 @@ f5 = mesh.AddFace([n5, n6, n12, n11])
 # Change the orientation of the second and the fourth faces.
 mesh.Reorient([2, 4])
 
 # Change the orientation of the second and the fourth faces.
 mesh.Reorient([2, 4])
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 650d998e5e8014792c80e71f53add61d01bffefb..a6d108bc2e4c865772ce152acf0c75fed8fa5c63 100644 (file)
@@ -5,11 +5,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 import SMESH_mechanic
 
 
 import SMESH_mechanic
 
@@ -32,4 +32,4 @@ print "\nSmoothing ... ",
 if not res: print "failed!"
 else:       print "done."
 
 if not res: print "failed!"
 else:       print "done."
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index b4f5f3cd3da60168d479bb0c0d69d946704358d5..32466ccf0d6c96a56b050062e55df2569a10548f 100644 (file)
@@ -5,11 +5,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 import SMESH_mechanic
 
 
 import SMESH_mechanic
 
@@ -31,4 +31,4 @@ GroupTri = mesh.GroupOnGeom(face, "Group of faces (extrusion)", SMESH.FACE)
 # perform extrusion of the group
 mesh.ExtrusionSweepObject(GroupTri, vector, 5)
 
 # perform extrusion of the group
 mesh.ExtrusionSweepObject(GroupTri, vector, 5)
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 3db2c3e1246c38de83e02b6806bbe5b0a5c9745e..05e699c468f8403474c7cb7436f341299fee1b19 100644 (file)
@@ -6,11 +6,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # 1. Create points
 points = [[0, 0], [50, 30], [50, 110], [0, 150], [-80, 150], [-130, 70], [-130, -20]]
 
 # 1. Create points
 points = [[0, 0], [50, 30], [50, 110], [0, 150], [-80, 150], [-130, 70], [-130, -20]]
@@ -128,4 +128,4 @@ error = quad_6.ExtrusionAlongPath(ff_6 , Edge_Circle_mesh, Edge_Circle, 1,
 error = quad_7.ExtrusionAlongPath(ff_7, Edge_Circle_mesh, Edge_Circle, 1,
                                   1, [a45, -a45, a45, -a45, a45, -a45, a45, -a45], 0, refPoint)
 
 error = quad_7.ExtrusionAlongPath(ff_7, Edge_Circle_mesh, Edge_Circle, 1,
                                   1, [a45, -a45, a45, -a45, a45, -a45, a45, -a45], 0, refPoint)
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 4072560c45ac47dc73ba96647945f8779320ecea..ad3ac4565a33373bf090611d3e73ab1b619bd794 100644 (file)
@@ -5,11 +5,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # define the geometry
 Box_1 = geompy.MakeBoxDXDYDZ(200., 200., 200.)
 
 # define the geometry
 Box_1 = geompy.MakeBoxDXDYDZ(200., 200., 200.)
index 4a8eba75ee35a8e86c469753fecdeb50040cf6bf..53059ff96c9f7f7c7edba2ae0b2649264511809e 100644 (file)
@@ -5,11 +5,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # create sphere of radius 100
 
 
 # create sphere of radius 100
 
index e52ef1b540def8dbac9bf39224465d343ac69837..376e511634196636a6b61f2bb1a6e53e0a1d0e83 100644 (file)
@@ -5,11 +5,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 import salome_notebook
 
 # set variables
 import salome_notebook
 
 # set variables
index 5aa283edf05d352b2efae68d455fc9b10ff49beb..6c2a9d6d4bdef5762011b559d796a4d767b08c79 100644 (file)
@@ -4,11 +4,11 @@ import salome
 salome.salome_init()
 
 from salome.geom import geomBuilder
 salome.salome_init()
 
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH
 from salome.smesh import smeshBuilder
 
 import SMESH
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 OX = geompy.MakeVectorDXDYDZ(1,0,0)
 OY = geompy.MakeVectorDXDYDZ(0,1,0)
 
 OX = geompy.MakeVectorDXDYDZ(1,0,0)
 OY = geompy.MakeVectorDXDYDZ(0,1,0)
index 6990aa66b43b7790bd417dd3f8222e577508aaf1..8b869e67c389e558e6f5d56d67263033a3e2f2cb 100644 (file)
@@ -5,11 +5,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # create open shell: a box without one plane
 box = geompy.MakeBox(0., 0., 0., 20., 20., 15.)
 
 # create open shell: a box without one plane
 box = geompy.MakeBox(0., 0., 0., 20., 20., 15.)
@@ -44,4 +44,4 @@ print ""
 aGroup = mesh.GetMesh().CreateGroup(SMESH.EDGE, "Free borders")
 aGroup.Add(anIds)
 
 aGroup = mesh.GetMesh().CreateGroup(SMESH.EDGE, "Free borders")
 aGroup.Add(anIds)
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index c2fc56f86496d9019bba127d76a8956c74932049..f1c1943be12774d62c981fbc6f0959a2e910ef4a 100644 (file)
@@ -5,11 +5,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # create open shell: a box without one plane
 box = geompy.MakeBox(0., 0., 0., 20., 20., 15.)
 
 # create open shell: a box without one plane
 box = geompy.MakeBox(0., 0., 0., 20., 20., 15.)
@@ -46,4 +46,4 @@ print ""
 aGroup = mesh.GetMesh().CreateGroup(SMESH.EDGE, "Borders at multi-connections")
 aGroup.Add(anIds)
 
 aGroup = mesh.GetMesh().CreateGroup(SMESH.EDGE, "Borders at multi-connections")
 aGroup.Add(anIds)
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 7c5a804f5067b992e20c39a3f6c0c159dbd9b0c5..6ac5410e7009a4b6e696f06b4f3046908b3f7215 100644 (file)
@@ -5,11 +5,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # create open shell: a box without one plane
 box = geompy.MakeBox(0., 0., 0., 20., 20., 15.)
 
 # create open shell: a box without one plane
 box = geompy.MakeBox(0., 0., 0., 20., 20., 15.)
@@ -46,4 +46,4 @@ print ""
 aGroup = mesh.GetMesh().CreateGroup(SMESH.EDGE, "Edges with length > " + `length_margin`)
 aGroup.Add(anIds)
 
 aGroup = mesh.GetMesh().CreateGroup(SMESH.EDGE, "Edges with length > " + `length_margin`)
 aGroup.Add(anIds)
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 373ddbe024fc6f28397b0b3ccdc55852c770eb22..9d902f5b068e31977ba7c214de91e7c5d749f18d 100644 (file)
@@ -37,4 +37,4 @@ for i in range(len(aBorders)):
   aGroupF.Add([aBorder.myElemId])
   aGroupN.Add([aBorder.myPnt1, aBorder.myPnt2])
 
   aGroupF.Add([aBorder.myElemId])
   aGroupN.Add([aBorder.myPnt1, aBorder.myPnt2])
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index cbd2178391639e24954293f4a1508252f8938321..bf6d7fa4c4f44b960c5307f3918356c879ebf29e 100644 (file)
@@ -5,11 +5,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # create box
 box = geompy.MakeBox(0., 0., 0., 100., 200., 300.)
 
 # create box
 box = geompy.MakeBox(0., 0., 0., 100., 200., 300.)
@@ -51,4 +51,4 @@ for i in range(len(anNodeIds)):
   pass
 print ""
 
   pass
 print ""
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 1bd007bf632849eb81c673ca44b65ec2226a01df..6df90c0c9910e8a234f6928a18f4050692b14136 100644 (file)
@@ -5,11 +5,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 ####### GEOM part ########
 
 
 ####### GEOM part ########
 
@@ -75,4 +75,4 @@ aFaceIds = Mesh_1.GetIdsFromFilter(aFilter)
 aGroup = Mesh_1.CreateEmptyGroup(SMESH.FACE, "Shared_faces")
 aGroup.Add(aFaceIds)
 
 aGroup = Mesh_1.CreateEmptyGroup(SMESH.FACE, "Shared_faces")
 aGroup.Add(aFaceIds)
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 5e84f2bfce6cd4c0e96ac87444170971eef5e048..e85b27d73c86131637c50a359b4a6969c6457a09 100644 (file)
@@ -5,11 +5,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 import salome_notebook
 
 
 import salome_notebook
 
 
index 541af64a3220053bbef14b31940daa61e6eda7e6..8a98910e579b0a674c7fba986614c9378ce36d91 100644 (file)
@@ -5,11 +5,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 import salome_notebook
 
 
 import salome_notebook
 
 
index aca903ae0112fe7710953ae60ecfbfe8fae30f2b..82050cbc0b6e711546246267aff19e16e4f086f6 100644 (file)
@@ -5,11 +5,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 import salome_notebook
 
 
 import salome_notebook
 
 
index 041183224a670360309ca0675df25a0c5f16d754..1a4287fc7211463e9c1a46295012263b7cd39227 100644 (file)
@@ -5,11 +5,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 import salome_notebook
 
 
 import salome_notebook
 
 
index b0b5e3f24dd89dd4ed2985988446afd66845456a..dffd85ca249a9ecf622092755d5ac5c641817c33 100644 (file)
@@ -5,11 +5,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # create open shell: a box without one plane
 box = geompy.MakeBox(0., 0., 0., 20., 20., 15.)
 
 # create open shell: a box without one plane
 box = geompy.MakeBox(0., 0., 0., 20., 20., 15.)
@@ -47,4 +47,4 @@ print ""
 aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Faces with length 2D > " + `length_margin`)
 aGroup.Add(anIds)
 
 aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Faces with length 2D > " + `length_margin`)
 aGroup.Add(anIds)
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index ba6fb9d7deccba5a1096a3cec211ed01772154c8..77027c2f50925c08364b51ee8be2efd055e720df 100644 (file)
@@ -5,11 +5,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # create a compound of two glued boxes
 box1 = geompy.MakeBox(0., 0., 0., 20., 20., 15.)
 
 # create a compound of two glued boxes
 box1 = geompy.MakeBox(0., 0., 0., 20., 20., 15.)
@@ -47,4 +47,4 @@ print ""
 aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Borders at multi-connection 2D = " + `nb_conn`)
 aGroup.Add(anIds)
 
 aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Borders at multi-connection 2D = " + `nb_conn`)
 aGroup.Add(anIds)
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 3b52dbc126b03608ce3fb8c5fed2c13a3de45c8e..82070ac3b5c940a4e2ccec815cb939a71ee82631 100644 (file)
@@ -28,4 +28,4 @@ print ""
 aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Area > " + `area_margin`)
 aGroup.Add(anIds)
 
 aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Area > " + `area_margin`)
 aGroup.Add(anIds)
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index b66d9413a80a067030efd2574ba911187dc7656b..eb6f844ef774268d82e3cf08246a223fe2327dcf 100644 (file)
@@ -28,4 +28,4 @@ print ""
 aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Taper > " + `taper_margin`)
 aGroup.Add(anIds)
 
 aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Taper > " + `taper_margin`)
 aGroup.Add(anIds)
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 0aeedbfa8b65923e50a3b24d8095c8b9c135f9d3..4bc47d2e1a0279fbcc878920abeae89f28650637 100644 (file)
@@ -28,4 +28,4 @@ print ""
 aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Aspect Ratio > " + `ar_margin`)
 aGroup.Add(anIds)
 
 aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Aspect Ratio > " + `ar_margin`)
 aGroup.Add(anIds)
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index e80e91f48c9f0e25f8be9fa8068b7d52a9731644..65bac06061d86bb09746c559ffe5f74dbd5d158c 100644 (file)
@@ -29,4 +29,4 @@ aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Minimum Angle < " + `min_angle`)
 
 aGroup.Add(anIds)
 
 
 aGroup.Add(anIds)
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 8f7f39c488929e89c2d06213bdde4d1eed27cc8b..75566f416fa2b2c6e51893c11ba4d2dc1d9a2192 100644 (file)
@@ -29,4 +29,4 @@ aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Warp > " + `wa_margin`)
 
 aGroup.Add(anIds)
 
 
 aGroup.Add(anIds)
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index ad6dff1850cfef7d881d7dcc2d525d64e7ebc7f4..431557e6ef70cb993e69bc4ae59819418a399ad8 100644 (file)
@@ -28,4 +28,4 @@ print ""
 aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Skew > " + `skew_margin`)
 aGroup.Add(anIds)
 
 aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Skew > " + `skew_margin`)
 aGroup.Add(anIds)
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 814cb5ba527fe71282cec130fb914ceff36a0ab2..19b680f2946780d6f2735ed9a54b4b86e882d004 100644 (file)
@@ -28,4 +28,4 @@ print ""
 aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Element Diameter 2D > " + `mel_2d_margin`)
 aGroup.Add(anIds)
 
 aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Element Diameter 2D > " + `mel_2d_margin`)
 aGroup.Add(anIds)
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 3a7c44f940fac163e130ba4857999d916f2c6908..f0a7bccf0d7502c4c8321d80eaf6d807e28eed72 100644 (file)
@@ -29,4 +29,4 @@ aGroup = mesh.CreateEmptyGroup(SMESH.VOLUME, "Aspect Ratio 3D > " + `ar_margin`)
 
 aGroup.Add(anIds)
 
 
 aGroup.Add(anIds)
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 1f27eef3af06bf07fd1b7a98ff609bb5173e09f3..e64e2fb5556b02c98f1de5cba1929f290bb3a50e 100644 (file)
@@ -30,4 +30,4 @@ aGroup = mesh.CreateEmptyGroup(SMESH.VOLUME, "Volume < " + `volume_margin`)
 
 aGroup.Add(anIds)
 
 
 aGroup.Add(anIds)
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index e43e5c1b8e3ea764670dd2ec85a4d4e436a04c44..15335f97975951189d200337db46aec007cab974 100644 (file)
@@ -28,4 +28,4 @@ print ""
 aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Element Diameter 3D > " + `mel_3d_margin`)
 aGroup.Add(anIds)
 
 aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Element Diameter 3D > " + `mel_3d_margin`)
 aGroup.Add(anIds)
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index e53e7b0b1c7ced203074345d505e31dd8b739a52..235d491578e2221f975263a08a14a2c6d0dfce98 100644 (file)
@@ -4,10 +4,10 @@ import salome
 salome.salome_init()
 
 from salome.geom import geomBuilder
 salome.salome_init()
 
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 from salome.smesh import smeshBuilder
 
 from salome.smesh import smeshBuilder
-smesh = smeshBuilder.New(salome.myStudy)
+smesh = smeshBuilder.New()
 
 # make a shape consisting of two quadranges
 OY  = geompy.MakeVectorDXDYDZ(0, 1, 0)
 
 # make a shape consisting of two quadranges
 OY  = geompy.MakeVectorDXDYDZ(0, 1, 0)
index a6f7701f841ae862ece320927ae95efadc213e67..8184e24508ec36a7b17c80457c64e5d5bdc4ce58 100644 (file)
@@ -4,11 +4,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 Box = geompy.MakeBoxDXDYDZ(200, 200, 200)
 f = geompy.SubShapeAllSorted(Box, geompy.ShapeType["FACE"])
 
 Box = geompy.MakeBoxDXDYDZ(200, 200, 200)
 f = geompy.SubShapeAllSorted(Box, geompy.ShapeType["FACE"])
index 47c25b1ea79e934b19e175a617a465d5fb15dd95..36cf38544a5cffbd8c169b1a631bdf7f4767f174 100644 (file)
@@ -5,11 +5,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # create a face to be meshed
 px = geompy.MakeVertex(100., 0.  , 0.  )
 
 # create a face to be meshed
 px = geompy.MakeVertex(100., 0.  , 0.  )
@@ -77,4 +77,4 @@ print "Triangles  : ", trias.NbTriangles()
 print "Quadrangles: ", trias.NbQuadrangles()
 print "Volumes    : ", trias.NbVolumes()
 
 print "Quadrangles: ", trias.NbQuadrangles()
 print "Volumes    : ", trias.NbVolumes()
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 227eb636e4da210b060f1c45ecdbb6962214eb44..f14c2ca62be8fa4b3aaf7c1d3325d359a303c719 100644 (file)
@@ -5,11 +5,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # create two faces of a box
 box1 = geompy.MakeBox(0., 0., -10., 30., 20., 25.)
 
 # create two faces of a box
 box1 = geompy.MakeBox(0., 0., -10., 30., 20., 25.)
index 77042de9981579ca6af4b32dea7dc01088d8d9ab..b593e0ef1864813baad55f4501b7ce3c6a545d00 100644 (file)
@@ -5,11 +5,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 import salome_notebook
 
 
 import salome_notebook
 
 
index 9264a5c4c508aa81410e9db22f167098ddb7a7b4..6caccd1056fd09c476c7f30be62073c3431d5369 100644 (file)
@@ -5,11 +5,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # make two not sewed quadranges
 OY0 = geompy.MakeVectorDXDYDZ(0, 1, 0)
 
 # make two not sewed quadranges
 OY0 = geompy.MakeVectorDXDYDZ(0, 1, 0)
index e0120b4810f5dc87b5a03dfc88aac0dc32bf8cfa..5ff16d470211be9aebe47a86b02bc894e878316d 100644 (file)
@@ -4,11 +4,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # create two boxes
 box1 = geompy.MakeBox(0.,  0., 0., 10., 10., 10.)
 
 # create two boxes
 box1 = geompy.MakeBox(0.,  0., 0., 10., 10., 10.)
index 0abe520131492f6585d342c2a73a2577f244ee3c..db0d24d62658a74c5a85a9a1e1f03d312cc5fb22 100644 (file)
@@ -6,11 +6,11 @@ salome.salome_init()
 
 import GEOM
 from salome.geom import geomBuilder
 
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH
 from salome.smesh import smeshBuilder
 
 import SMESH
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # Create a box
 
 
 # Create a box
 
@@ -92,4 +92,4 @@ mesh.DoubleElements([ 1, 2 ])
 
 # Update object browser
 if salome.sg.hasDesktop():
 
 # Update object browser
 if salome.sg.hasDesktop():
-    salome.sg.updateObjBrowser(False)
+    salome.sg.updateObjBrowser()
index e1d850ec6a6e29464aece45a54302dd1ff61bd34..a8c9a58af4fb343401976dbdafe8b72a92dc6046 100644 (file)
@@ -5,11 +5,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 import salome_notebook
 
 
 import salome_notebook
 
 
index 37a3f5eed20b01b3dbb18da1b46a60dc3fc56a83..bbdac25623e578728ffe372491ed039dd6847c91 100644 (file)
@@ -5,11 +5,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 import salome_notebook
 
 
 import salome_notebook
 
 
index c4b95fdafd945440e9733368422c9f6c32f90760..1af8322e308f5279bf3f5201be1573152f1c1c13 100644 (file)
@@ -5,11 +5,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 import salome_notebook
 
 import numpy as np
 import salome_notebook
 
 import numpy as np
index 85bc69fbca2457e2af92fdcab8574347b7e09818..9a3c485283e161fc88ced0618779d954c6d47b8f 100644 (file)
@@ -5,11 +5,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # create a box
 box = geompy.MakeBox(0., 0., 0., 20., 20., 20.)
 
 # create a box
 box = geompy.MakeBox(0., 0., 0., 20., 20., 20.)
index 2ed0a214b0e3c5b08bd1e9f98defa8d4d4eca198..0dfa09a8557feed77f5746a8bc64d833208ef44b 100644 (file)
@@ -5,11 +5,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # Create a geometry to mesh
 box = geompy.MakeBoxDXDYDZ(100,100,100)
 
 # Create a geometry to mesh
 box = geompy.MakeBoxDXDYDZ(100,100,100)
index 3713fae3752f9ace9d6ba3d5003cc71eba043e98..cf01817583d8da14181e3068a1af450b89b27d91 100644 (file)
@@ -20,13 +20,13 @@ salome.salome_init()
 \n the old mode (from dump):
 \code
 import smesh, SMESH, SALOMEDS
 \n the old mode (from dump):
 \code
 import smesh, SMESH, SALOMEDS
-smesh.SetCurrentStudy(salome.myStudy)
+smesh.UpdateStudy()
 \endcode
 \n the new mode:
 \code
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 \endcode
 \n the new mode:
 \code
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 \endcode
 
 
 \endcode
 
 
index 524a4ceb074281232f912b8c8fcfec83ef7b397b..5a24ee76ca5cecd844edb715fc3ccd0845ca58e0 100644 (file)
@@ -28,7 +28,7 @@ A usual workflow to generate a mesh on geometry is following:
   <li>Create an instance of \ref smeshBuilder.smeshBuilder "smeshBuilder":
     <pre>
       from salome.smesh import smeshBuilder
   <li>Create an instance of \ref smeshBuilder.smeshBuilder "smeshBuilder":
     <pre>
       from salome.smesh import smeshBuilder
-      smesh = smeshBuilder.New( salome.myStudy )
+      smesh = smeshBuilder.New()
     </pre></li>
   <li>Create a \ref smeshBuilder.Mesh "mesh" object:
     <pre>
     </pre></li>
   <li>Create a \ref smeshBuilder.Mesh "mesh" object:
     <pre>
index 75fbe089438725870291f755776561e9d291be8d..dc943334698ecd3e2cc9aeef8a44208d6834d87a 100644 (file)
@@ -139,14 +139,19 @@ module SMESH
     boolean IsEmbeddedMode();
 
     /*!
     boolean IsEmbeddedMode();
 
     /*!
-      Set the current study
+      Update the study
      */
      */
-    void SetCurrentStudy( in SALOMEDS::Study theStudy );
-
+    void UpdateStudy();
+    
+    /*!
+      Set enable publishing in the study
+     */
+    void SetEnablePublish( in boolean theIsEnablePublish );
+    
     /*!
     /*!
-      Get the current study
+      Get enable publishing in the study
      */
      */
-    SALOMEDS::Study GetCurrentStudy();
+    boolean IsEnablePublish();
 
     /*!
      * Create a hypothesis that can be shared by differents parts of the mesh.
 
     /*!
      * Create a hypothesis that can be shared by differents parts of the mesh.
index cef3831ee99245d92db46a343f57f552c267c7f8..7c506aaccab3725a2abb9a5ba42b914d028f73c2 100644 (file)
@@ -597,11 +597,6 @@ module SMESH
      */
     long GetId();
 
      */
     long GetId();
 
-    /*!
-     * Get the study Id
-     */
-    long GetStudyId();
-
     /*!
      * Obtain instance of SMESH_MeshEditor
      */
     /*!
      * Obtain instance of SMESH_MeshEditor
      */
index a1d573d7f51c8af47b62f40587d7c53e21a74ccc..3e18f1535d40f54c5ea2475f4ba38018c1b9a25c 100644 (file)
             <service-by-default>0</service-by-default>
             <inParameter-list>
               <inParameter>
             <service-by-default>0</service-by-default>
             <inParameter-list>
               <inParameter>
-               <inParameter-type>string</inParameter-type>
-               <inParameter-name>anHyp</inParameter-name>
-               <inParameter-comment></inParameter-comment>
-              </inParameter>
-              <inParameter>
-               <inParameter-type>long</inParameter-type>
-               <inParameter-name>studyId</inParameter-name>
-               <inParameter-comment></inParameter-comment>
+                <inParameter-type>string</inParameter-type>
+                <inParameter-name>anHyp</inParameter-name>
+                <inParameter-comment></inParameter-comment>
               </inParameter>
             </inParameter-list>
             <outParameter-list>
               </inParameter>
             </inParameter-list>
             <outParameter-list>
               <inParameter-name>geomEngine</inParameter-name>
               <inParameter-comment></inParameter-comment>
             </inParameter>
               <inParameter-name>geomEngine</inParameter-name>
               <inParameter-comment></inParameter-comment>
             </inParameter>
-            <inParameter>
-              <inParameter-type>long</inParameter-type>
-              <inParameter-name>studyId</inParameter-name>
-              <inParameter-comment></inParameter-comment>
-            </inParameter>
             <inParameter>
               <inParameter-type>GEOM/GEOM_Object</inParameter-type>
               <inParameter-name>aShape</inParameter-name>
             <inParameter>
               <inParameter-type>GEOM/GEOM_Object</inParameter-type>
               <inParameter-name>aShape</inParameter-name>
index 0a9be930932a69e3e95ac543e7661c1813c439b0..32240fb47e7ad4c531bbe295ee18dd3cbb2776c7 100644 (file)
 
 /*!
  * Constructor
 
 /*!
  * Constructor
- * @param aStudy pointer to the Study
  *
  */
  *
  */
-GeomSelectionTools::GeomSelectionTools(_PTR(Study) aStudy)
+GeomSelectionTools::GeomSelectionTools()
 {
 {
-  myStudy = aStudy;
-}
-
-/*!
- * Accessor to the Study used by this GeomSelectionTools object
- * @return The study used by the GeomSelectionTools class
- */
-_PTR(Study) GeomSelectionTools::getMyStudy()
-{
-    return myStudy;
 }
 
 /*!
 }
 
 /*!
@@ -137,7 +126,7 @@ std::string GeomSelectionTools::getFirstSelectedEntry()
  */
 std::string GeomSelectionTools::getEntryOfObject(Handle(SALOME_InteractiveObject) anIO){
   std::string entry="";
  */
 std::string GeomSelectionTools::getEntryOfObject(Handle(SALOME_InteractiveObject) anIO){
   std::string entry="";
-  _PTR(SObject) aSO = myStudy->FindObjectID(anIO->getEntry());
+  _PTR(SObject) aSO = SalomeApp_Application::getStudy()->FindObjectID(anIO->getEntry());
   if (aSO){
     _PTR(SObject) aRefSObj;
     // If selected object is a reference
   if (aSO){
     _PTR(SObject) aRefSObj;
     // If selected object is a reference
@@ -157,7 +146,7 @@ std::string GeomSelectionTools::getEntryOfObject(Handle(SALOME_InteractiveObject
  */
 std::string GeomSelectionTools::getNameFromEntry(std::string entry){
   std::string name = "";
  */
 std::string GeomSelectionTools::getNameFromEntry(std::string entry){
   std::string name = "";
-  _PTR(SObject) aSO = myStudy->FindObjectID(entry);
+  _PTR(SObject) aSO = SalomeApp_Application::getStudy()->FindObjectID(entry);
   if (aSO){
     _PTR(SObject) aRefSObj;
     // If selected object is a reference
   if (aSO){
     _PTR(SObject) aRefSObj;
     // If selected object is a reference
@@ -180,7 +169,7 @@ std::string GeomSelectionTools::getFirstSelectedComponentDataType()
   Handle(SALOME_InteractiveObject) anIO;
   std::string DataType="";
   anIO=GeomSelectionTools::getFirstSelectedSalomeObject();
   Handle(SALOME_InteractiveObject) anIO;
   std::string DataType="";
   anIO=GeomSelectionTools::getFirstSelectedSalomeObject();
-  _PTR(SObject) aSO = myStudy->FindObjectID(anIO->getEntry());
+  _PTR(SObject) aSO = SalomeApp_Application::getStudy()->FindObjectID(anIO->getEntry());
   if (aSO){
     _PTR(SObject) aRefSObj;
     // If selected object is a reference
   if (aSO){
     _PTR(SObject) aRefSObj;
     // If selected object is a reference
@@ -201,7 +190,7 @@ TopAbs_ShapeEnum GeomSelectionTools::entryToShapeType(std::string entry){
 //   MESSAGE("GeomSelectionTools::entryToShapeType"<<entry );
   TopoDS_Shape S = TopoDS_Shape();
   TopAbs_ShapeEnum ShapeType = TopAbs_SHAPE;
 //   MESSAGE("GeomSelectionTools::entryToShapeType"<<entry );
   TopoDS_Shape S = TopoDS_Shape();
   TopAbs_ShapeEnum ShapeType = TopAbs_SHAPE;
-   _PTR(SObject) aSO = myStudy->FindObjectID(entry);
+   _PTR(SObject) aSO = SalomeApp_Application::getStudy()->FindObjectID(entry);
   if (aSO){
     _PTR(SObject) aRefSObj;
     GEOM::GEOM_Object_var aShape;
   if (aSO){
     _PTR(SObject) aRefSObj;
     GEOM::GEOM_Object_var aShape;
@@ -225,7 +214,7 @@ TopAbs_ShapeEnum GeomSelectionTools::entryToShapeType(std::string entry){
         if (aShape->GetType() == GEOM_GROUP){
 //           MESSAGE("It's a group");
           GEOM::GEOM_IGroupOperations_wrap aGroupOp =
         if (aShape->GetType() == GEOM_GROUP){
 //           MESSAGE("It's a group");
           GEOM::GEOM_IGroupOperations_wrap aGroupOp =
-            _geomEngine->GetIGroupOperations(myStudy->StudyId());
+            _geomEngine->GetIGroupOperations();
           ShapeType= (TopAbs_ShapeEnum)aGroupOp->GetType(aShape);
         }
         // if not
           ShapeType= (TopAbs_ShapeEnum)aGroupOp->GetType(aShape);
         }
         // if not
index c4013ff99ea1be648e251a9a78ea043a81f92f09..0fc4cbaf36910424fd7e9e40e1e8ee30aeda9898 100644 (file)
@@ -49,13 +49,9 @@ class LightApp_SelectionMgr;
 class PLUGINUTILS_EXPORT GeomSelectionTools
 {
 
 class PLUGINUTILS_EXPORT GeomSelectionTools
 {
 
-private:
-
-  _PTR(Study) myStudy;
-
 public:
 
 public:
 
-  GeomSelectionTools(_PTR(Study));
+  GeomSelectionTools();
   static SalomeApp_Application*  GetSalomeApplication();
   static LightApp_SelectionMgr* selectionMgr();
   SALOME_ListIO* getSelectedSalomeObjects();
   static SalomeApp_Application*  GetSalomeApplication();
   static LightApp_SelectionMgr* selectionMgr();
   SALOME_ListIO* getSelectedSalomeObjects();
@@ -67,7 +63,6 @@ public:
   TopAbs_ShapeEnum getFirstSelectedShapeType();
   TopAbs_ShapeEnum entryToShapeType(std::string );
   GeomAbs_SurfaceType getFaceInformation(TopoDS_Shape);
   TopAbs_ShapeEnum getFirstSelectedShapeType();
   TopAbs_ShapeEnum entryToShapeType(std::string );
   GeomAbs_SurfaceType getFaceInformation(TopoDS_Shape);
-  _PTR(Study) getMyStudy();
 };
 
 //////////////////////////////////////////
 };
 
 //////////////////////////////////////////
index 4e4002ee321eee827dc676a97d1117a0942295b5..c4fbb42cfe3a73b423ebda23500bf2a467e04058 100644 (file)
@@ -175,8 +175,8 @@ const SMESH_Algo::Features& SMESH_Algo::GetFeatures( const std::string& algoType
  */
 //=============================================================================
 
  */
 //=============================================================================
 
-SMESH_Algo::SMESH_Algo (int hypId, int studyId, SMESH_Gen * gen)
-  : SMESH_Hypothesis(hypId, studyId, gen)
+SMESH_Algo::SMESH_Algo (int hypId, SMESH_Gen * gen)
+  : SMESH_Hypothesis(hypId, gen)
 {
   _compatibleAllHypFilter = _compatibleNoAuxHypFilter = NULL;
   _onlyUnaryInput = _requireDiscreteBoundary = _requireShape = true;
 {
   _compatibleAllHypFilter = _compatibleNoAuxHypFilter = NULL;
   _onlyUnaryInput = _requireDiscreteBoundary = _requireShape = true;
@@ -204,26 +204,26 @@ SMESH_Algo::~SMESH_Algo()
  */
 //=============================================================================
 
  */
 //=============================================================================
 
-SMESH_0D_Algo::SMESH_0D_Algo(int hypId, int studyId, SMESH_Gen* gen)
-  : SMESH_Algo(hypId, studyId, gen)
+SMESH_0D_Algo::SMESH_0D_Algo(int hypId, SMESH_Gen* gen)
+  : SMESH_Algo(hypId, gen)
 {
   _shapeType = (1 << TopAbs_VERTEX);
   _type = ALGO_0D;
 }
 {
   _shapeType = (1 << TopAbs_VERTEX);
   _type = ALGO_0D;
 }
-SMESH_1D_Algo::SMESH_1D_Algo(int hypId, int studyId, SMESH_Gen* gen)
-  : SMESH_Algo(hypId, studyId, gen)
+SMESH_1D_Algo::SMESH_1D_Algo(int hypId, SMESH_Gen* gen)
+  : SMESH_Algo(hypId, gen)
 {
   _shapeType = (1 << TopAbs_EDGE);
   _type = ALGO_1D;
 }
 {
   _shapeType = (1 << TopAbs_EDGE);
   _type = ALGO_1D;
 }
-SMESH_2D_Algo::SMESH_2D_Algo(int hypId, int studyId, SMESH_Gen* gen)
-  : SMESH_Algo(hypId, studyId, gen)
+SMESH_2D_Algo::SMESH_2D_Algo(int hypId, SMESH_Gen* gen)
+  : SMESH_Algo(hypId, gen)
 {
   _shapeType = (1 << TopAbs_FACE);
   _type = ALGO_2D;
 }
 {
   _shapeType = (1 << TopAbs_FACE);
   _type = ALGO_2D;
 }
-SMESH_3D_Algo::SMESH_3D_Algo(int hypId, int studyId, SMESH_Gen* gen)
-  : SMESH_Algo(hypId, studyId, gen)
+SMESH_3D_Algo::SMESH_3D_Algo(int hypId, SMESH_Gen* gen)
+  : SMESH_Algo(hypId, gen)
 {
   _shapeType = (1 << TopAbs_SOLID);
   _type = ALGO_3D;
 {
   _shapeType = (1 << TopAbs_SOLID);
   _type = ALGO_3D;
index ba8c2d356f0a3aad3da622548fbdfcf9405111b6..e35cf6284e37bc31e3c6b68c06666a8ad0c2fee8 100644 (file)
@@ -102,10 +102,9 @@ class SMESH_EXPORT SMESH_Algo : public SMESH_Hypothesis
   /*!
    * \brief Creates algorithm
     * \param hypId - algorithm ID
   /*!
    * \brief Creates algorithm
     * \param hypId - algorithm ID
-    * \param studyId - study ID
     * \param gen - SMESH_Gen
    */
     * \param gen - SMESH_Gen
    */
-  SMESH_Algo(int hypId, int studyId, SMESH_Gen * gen);
+  SMESH_Algo(int hypId, SMESH_Gen * gen);
 
   /*!
    * \brief Destructor
 
   /*!
    * \brief Destructor
@@ -475,19 +474,19 @@ protected:
 class SMESH_EXPORT SMESH_0D_Algo: public SMESH_Algo
 {
 public:
 class SMESH_EXPORT SMESH_0D_Algo: public SMESH_Algo
 {
 public:
-  SMESH_0D_Algo(int hypId, int studyId,  SMESH_Gen* gen);
+  SMESH_0D_Algo(int hypId, SMESH_Gen* gen);
 };
 
 class SMESH_EXPORT SMESH_1D_Algo: public SMESH_Algo
 {
 public:
 };
 
 class SMESH_EXPORT SMESH_1D_Algo: public SMESH_Algo
 {
 public:
-  SMESH_1D_Algo(int hypId, int studyId,  SMESH_Gen* gen);
+  SMESH_1D_Algo(int hypId, SMESH_Gen* gen);
 };
 
 class SMESH_EXPORT SMESH_2D_Algo: public SMESH_Algo
 {
 public:
 };
 
 class SMESH_EXPORT SMESH_2D_Algo: public SMESH_Algo
 {
 public:
-  SMESH_2D_Algo(int hypId, int studyId, SMESH_Gen* gen);
+  SMESH_2D_Algo(int hypId, SMESH_Gen* gen);
   /*!
    * \brief Method in which an algorithm generating a structured mesh
    *        fixes positions of in-face nodes after there movement
   /*!
    * \brief Method in which an algorithm generating a structured mesh
    *        fixes positions of in-face nodes after there movement
@@ -500,7 +499,7 @@ public:
 class SMESH_EXPORT SMESH_3D_Algo: public SMESH_Algo
 {
 public:
 class SMESH_EXPORT SMESH_3D_Algo: public SMESH_Algo
 {
 public:
-  SMESH_3D_Algo(int hypId, int studyId, SMESH_Gen* gen);
+  SMESH_3D_Algo(int hypId, SMESH_Gen* gen);
 };
 
 #endif
 };
 
 #endif
index bd5654c89588eb1bd05ddde3ae963e978e7cd8eb..27881281ed5f593b839a0561cdea0d6f2b2e56d1 100644 (file)
@@ -65,6 +65,8 @@ using namespace std;
 
 SMESH_Gen::SMESH_Gen()
 {
 
 SMESH_Gen::SMESH_Gen()
 {
+  _studyContext = new StudyContextStruct;
+  _studyContext->myDocument = new SMESHDS_Document();
   _localId = 0;
   _hypId   = 0;
   _segmentation = _nbSegments = 10;
   _localId = 0;
   _hypId   = 0;
   _segmentation = _nbSegments = 10;
@@ -94,19 +96,14 @@ namespace
 
 SMESH_Gen::~SMESH_Gen()
 {
 
 SMESH_Gen::~SMESH_Gen()
 {
-  std::map < int, StudyContextStruct * >::iterator i_sc = _mapStudyContext.begin();
-  for ( ; i_sc != _mapStudyContext.end(); ++i_sc )
-  {
-    StudyContextStruct* context = i_sc->second;
-    std::map < int, SMESH_Hypothesis * >::iterator i_hyp = context->mapHypothesis.begin();
-    for ( ; i_hyp != context->mapHypothesis.end(); ++i_hyp )
+    std::map < int, SMESH_Hypothesis * >::iterator i_hyp = _studyContext->mapHypothesis.begin();
+    for ( ; i_hyp != _studyContext->mapHypothesis.end(); ++i_hyp )
     {
       if ( _Hyp* h = static_cast< _Hyp*>( i_hyp->second ))
         h->NullifyGen();
     }
     {
       if ( _Hyp* h = static_cast< _Hyp*>( i_hyp->second ))
         h->NullifyGen();
     }
-    delete context->myDocument;
-    delete context;
-  }
+  delete _studyContext->myDocument;
+  delete _studyContext;
 }
 
 //=============================================================================
 }
 
 //=============================================================================
@@ -116,21 +113,17 @@ SMESH_Gen::~SMESH_Gen()
  */
 //=============================================================================
 
  */
 //=============================================================================
 
-SMESH_Mesh* SMESH_Gen::CreateMesh(int theStudyId, bool theIsEmbeddedMode)
+SMESH_Mesh* SMESH_Gen::CreateMesh(bool theIsEmbeddedMode)
   throw(SALOME_Exception)
 {
   Unexpect aCatch(SalomeException);
 
   throw(SALOME_Exception)
 {
   Unexpect aCatch(SalomeException);
 
-  // Get studyContext, create it if it does'nt exist, with a SMESHDS_Document
-  StudyContextStruct *aStudyContext = GetStudyContext(theStudyId);
-
   // create a new SMESH_mesh object
   SMESH_Mesh *aMesh = new SMESH_Mesh(_localId++,
   // create a new SMESH_mesh object
   SMESH_Mesh *aMesh = new SMESH_Mesh(_localId++,
-                                     theStudyId,
                                      this,
                                      theIsEmbeddedMode,
                                      this,
                                      theIsEmbeddedMode,
-                                     aStudyContext->myDocument);
-  aStudyContext->mapMesh[_localId-1] = aMesh;
+                                     _studyContext->myDocument);
+  _studyContext->mapMesh[_localId-1] = aMesh;
 
   return aMesh;
 }
 
   return aMesh;
 }
@@ -1149,17 +1142,9 @@ SMESH_Algo *SMESH_Gen::GetAlgo(SMESH_subMesh * aSubMesh,
  */
 //=============================================================================
 
  */
 //=============================================================================
 
-StudyContextStruct *SMESH_Gen::GetStudyContext(int studyId)
+StudyContextStruct *SMESH_Gen::GetStudyContext()
 {
 {
-  // Get studyContext, create it if it does'nt exist, with a SMESHDS_Document
-
-  if (_mapStudyContext.find(studyId) == _mapStudyContext.end())
-  {
-    _mapStudyContext[studyId] = new StudyContextStruct;
-    _mapStudyContext[studyId]->myDocument = new SMESHDS_Document(studyId);
-  }
-  StudyContextStruct *myStudyContext = _mapStudyContext[studyId];
-  return myStudyContext;
+  return _studyContext;
 }
 
 //================================================================================
 }
 
 //================================================================================
index d011050354f065381884f99f8ffb016f5c77c67d..1433a79fa0d5f0fcc2da7c7bbabca59702c6c3e8 100644 (file)
@@ -66,7 +66,7 @@ public:
   SMESH_Gen();
   ~SMESH_Gen();
 
   SMESH_Gen();
   ~SMESH_Gen();
 
-  SMESH_Mesh* CreateMesh(int theStudyId, bool theIsEmbeddedMode)
+  SMESH_Mesh* CreateMesh(bool theIsEmbeddedMode)
     throw(SALOME_Exception);
 
   enum ComputeFlags
     throw(SALOME_Exception);
 
   enum ComputeFlags
@@ -147,7 +147,7 @@ public:
   // if Compute() would fail because of some algo bad state
   // theErrors list contains problems description
 
   // if Compute() would fail because of some algo bad state
   // theErrors list contains problems description
 
-  StudyContextStruct *GetStudyContext(int studyId);
+  StudyContextStruct *GetStudyContext();
 
   static int GetShapeDim(const TopAbs_ShapeEnum & aShapeType);
   static int GetShapeDim(const TopoDS_Shape &     aShape)
 
   static int GetShapeDim(const TopAbs_ShapeEnum & aShapeType);
   static int GetShapeDim(const TopoDS_Shape &     aShape)
@@ -165,7 +165,7 @@ public:
 private:
 
   int _localId;                         // unique Id of created objects, within SMESH_Gen entity
 private:
 
   int _localId;                         // unique Id of created objects, within SMESH_Gen entity
-  std::map < int, StudyContextStruct * >_mapStudyContext;
+  StudyContextStruct* _studyContext;
 
   // hypotheses managing
   int _hypId;
 
   // hypotheses managing
   int _hypId;
index c4107fb3892bed30a88f0b640277375422e4640c..991eb2e94b316490ea7c39c0fe6733b678b4b314 100644 (file)
@@ -41,15 +41,13 @@ using namespace std;
 //=============================================================================
 
 SMESH_Hypothesis::SMESH_Hypothesis(int hypId,
 //=============================================================================
 
 SMESH_Hypothesis::SMESH_Hypothesis(int hypId,
-                                   int studyId,
                                    SMESH_Gen* gen) : SMESHDS_Hypothesis(hypId)
 {
   _gen            = gen;
                                    SMESH_Gen* gen) : SMESHDS_Hypothesis(hypId)
 {
   _gen            = gen;
-  _studyId        = studyId;
   _type           = PARAM_ALGO;
   _shapeType      = 0;  // to be set by algo with TopAbs_Enum
   _param_algo_dim = -1; // to be set by algo parameter
   _type           = PARAM_ALGO;
   _shapeType      = 0;  // to be set by algo with TopAbs_Enum
   _param_algo_dim = -1; // to be set by algo parameter
-  StudyContextStruct* myStudyContext = gen->GetStudyContext(_studyId);
+  StudyContextStruct* myStudyContext = gen->GetStudyContext();
   myStudyContext->mapHypothesis[hypId] = this;
 }
 
   myStudyContext->mapHypothesis[hypId] = this;
 }
 
@@ -63,7 +61,7 @@ SMESH_Hypothesis::~SMESH_Hypothesis()
 {
   if ( _gen )
   {
 {
   if ( _gen )
   {
-    StudyContextStruct* myStudyContext = _gen->GetStudyContext(_studyId);
+    StudyContextStruct* myStudyContext = _gen->GetStudyContext();
     myStudyContext->mapHypothesis[_hypId] = 0;
   }
 }
     myStudyContext->mapHypothesis[_hypId] = 0;
   }
 }
@@ -106,22 +104,11 @@ int SMESH_Hypothesis::GetShapeType() const
  */
 //=============================================================================
 
  */
 //=============================================================================
 
-int SMESH_Hypothesis::GetStudyId() const
-{
-  return _studyId;
-}
-
-//=============================================================================
-/*!
- * 
- */
-//=============================================================================
-
 void SMESH_Hypothesis::NotifySubMeshesHypothesisModification()
 {
   // for all meshes in study
 
 void SMESH_Hypothesis::NotifySubMeshesHypothesisModification()
 {
   // for all meshes in study
 
-  StudyContextStruct* myStudyContext = _gen->GetStudyContext(_studyId);
+  StudyContextStruct* myStudyContext = _gen->GetStudyContext();
   map<int, SMESH_Mesh*>::iterator itm;
   for (itm = myStudyContext->mapMesh.begin();
        itm != myStudyContext->mapMesh.end();
   map<int, SMESH_Mesh*>::iterator itm;
   for (itm = myStudyContext->mapMesh.begin();
        itm != myStudyContext->mapMesh.end();
@@ -161,7 +148,7 @@ void SMESH_Hypothesis::SetLibName(const char* theLibName)
 
 SMESH_Mesh* SMESH_Hypothesis::GetMeshByPersistentID(int id)
 {
 
 SMESH_Mesh* SMESH_Hypothesis::GetMeshByPersistentID(int id)
 {
-  StudyContextStruct* myStudyContext = _gen->GetStudyContext(_studyId);
+  StudyContextStruct* myStudyContext = _gen->GetStudyContext();
   map<int, SMESH_Mesh*>::iterator itm = myStudyContext->mapMesh.begin();
   for ( ; itm != myStudyContext->mapMesh.end(); itm++)
   {
   map<int, SMESH_Mesh*>::iterator itm = myStudyContext->mapMesh.begin();
   for ( ; itm != myStudyContext->mapMesh.end(); itm++)
   {
index bfcd2f518daa7b303628e8c246220738c9024c5d..60b74bfb4a80e1405d31d8be3f048fb7bd9a74a2 100644 (file)
@@ -69,10 +69,9 @@ public:
   static bool IsStatusFatal(Hypothesis_Status theStatus)
   { return theStatus >= HYP_UNKNOWN_FATAL; }
 
   static bool IsStatusFatal(Hypothesis_Status theStatus)
   { return theStatus >= HYP_UNKNOWN_FATAL; }
 
-  SMESH_Hypothesis(int hypId, int studyId, SMESH_Gen* gen);
+  SMESH_Hypothesis(int hypId, SMESH_Gen* gen);
   virtual ~SMESH_Hypothesis();
   virtual int GetDim() const;
   virtual ~SMESH_Hypothesis();
   virtual int GetDim() const;
-  int         GetStudyId() const;
   SMESH_Gen*  GetGen() const { return (SMESH_Gen*) _gen; }
   virtual int GetShapeType() const;
   virtual const char* GetLibName() const;
   SMESH_Gen*  GetGen() const { return (SMESH_Gen*) _gen; }
   virtual int GetShapeType() const;
   virtual const char* GetLibName() const;
@@ -126,7 +125,6 @@ public:
 
 protected:
   SMESH_Gen* _gen;
 
 protected:
   SMESH_Gen* _gen;
-  int        _studyId;
   int        _shapeType;
   int        _param_algo_dim; // to be set at descendant hypothesis constructor
 
   int        _shapeType;
   int        _param_algo_dim; // to be set at descendant hypothesis constructor
 
index 893a28aba659e6f8fbfb93475a251acddc4c0b97..9a3393c9a0aac9f32451b90d80df3ffca80a9f42 100644 (file)
@@ -106,7 +106,6 @@ class SMESH_Mesh::SubMeshHolder : public SMESHDS_TSubMeshHolder< SMESH_subMesh >
 //=============================================================================
 
 SMESH_Mesh::SMESH_Mesh(int               theLocalId, 
 //=============================================================================
 
 SMESH_Mesh::SMESH_Mesh(int               theLocalId, 
-                       int               theStudyId, 
                        SMESH_Gen*        theGen,
                        bool              theIsEmbeddedMode,
                        SMESHDS_Document* theDocument):
                        SMESH_Gen*        theGen,
                        bool              theIsEmbeddedMode,
                        SMESHDS_Document* theDocument):
@@ -114,7 +113,6 @@ SMESH_Mesh::SMESH_Mesh(int               theLocalId,
 {
   if(MYDEBUG) MESSAGE("SMESH_Mesh::SMESH_Mesh(int localId)");
   _id            = theLocalId;
 {
   if(MYDEBUG) MESSAGE("SMESH_Mesh::SMESH_Mesh(int localId)");
   _id            = theLocalId;
-  _studyId       = theStudyId;
   _gen           = theGen;
   _myDocument    = theDocument;
   _myMeshDS      = theDocument->NewMesh(theIsEmbeddedMode,theLocalId);
   _gen           = theGen;
   _myDocument    = theDocument;
   _myMeshDS      = theDocument->NewMesh(theIsEmbeddedMode,theLocalId);
@@ -135,7 +133,6 @@ SMESH_Mesh::SMESH_Mesh(int               theLocalId,
 
 SMESH_Mesh::SMESH_Mesh():
   _id(-1),
 
 SMESH_Mesh::SMESH_Mesh():
   _id(-1),
-  _studyId(-1),
   _groupId( 0 ),
   _nbSubShapes( 0 ),
   _isShapeToMesh( false ),
   _groupId( 0 ),
   _nbSubShapes( 0 ),
   _isShapeToMesh( false ),
@@ -208,7 +205,7 @@ SMESH_Mesh::~SMESH_Mesh()
   // remove self from studyContext
   if ( _gen )
   {
   // remove self from studyContext
   if ( _gen )
   {
-    StudyContextStruct * studyContext = _gen->GetStudyContext( _studyId );
+    StudyContextStruct * studyContext = _gen->GetStudyContext();
     studyContext->mapMesh.erase( _id );
   }
   if ( _myDocument )
     studyContext->mapMesh.erase( _id );
   }
   if ( _myDocument )
@@ -248,7 +245,7 @@ SMESH_Mesh* SMESH_Mesh::FindMesh( int meshId ) const
   if ( _id == meshId )
     return (SMESH_Mesh*) this;
 
   if ( _id == meshId )
     return (SMESH_Mesh*) this;
 
-  if ( StudyContextStruct *aStudyContext = _gen->GetStudyContext( _studyId ))
+  if ( StudyContextStruct *aStudyContext = _gen->GetStudyContext())
   {
     std::map < int, SMESH_Mesh * >::iterator i_m = aStudyContext->mapMesh.find( meshId );
     if ( i_m != aStudyContext->mapMesh.end() )
   {
     std::map < int, SMESH_Mesh * >::iterator i_m = aStudyContext->mapMesh.find( meshId );
     if ( i_m != aStudyContext->mapMesh.end() )
@@ -734,7 +731,7 @@ SMESH_Mesh::RemoveHypothesis(const TopoDS_Shape & aSubShape,
   Unexpect aCatch(SalomeException);
   if(MYDEBUG) MESSAGE("SMESH_Mesh::RemoveHypothesis");
 
   Unexpect aCatch(SalomeException);
   if(MYDEBUG) MESSAGE("SMESH_Mesh::RemoveHypothesis");
 
-  StudyContextStruct *sc = _gen->GetStudyContext(_studyId);
+  StudyContextStruct *sc = _gen->GetStudyContext();
   if (sc->mapHypothesis.find(anHypId) == sc->mapHypothesis.end())
     throw SALOME_Exception(LOCALIZED("hypothesis does not exist"));
 
   if (sc->mapHypothesis.find(anHypId) == sc->mapHypothesis.end())
     throw SALOME_Exception(LOCALIZED("hypothesis does not exist"));
 
@@ -995,7 +992,7 @@ int SMESH_Mesh::GetHypotheses(const SMESH_subMesh *               aSubMesh,
 
 SMESH_Hypothesis * SMESH_Mesh::GetHypothesis(const int anHypId) const
 {
 
 SMESH_Hypothesis * SMESH_Mesh::GetHypothesis(const int anHypId) const
 {
-  StudyContextStruct *sc = _gen->GetStudyContext(_studyId);
+  StudyContextStruct *sc = _gen->GetStudyContext();
   if (sc->mapHypothesis.find(anHypId) == sc->mapHypothesis.end())
     return NULL;
 
   if (sc->mapHypothesis.find(anHypId) == sc->mapHypothesis.end())
     return NULL;
 
index a8ec5dfae4e0fdfc1762cd981c82ddcccc53dea1..158788613f0b61d911b09f6d7e9bc57c7a69de10 100644 (file)
@@ -68,7 +68,6 @@ class SMESH_EXPORT SMESH_Mesh
 {
  public:
   SMESH_Mesh(int               theLocalId,
 {
  public:
   SMESH_Mesh(int               theLocalId,
-             int               theStudyId,
              SMESH_Gen*        theGen,
              bool              theIsEmbeddedMode,
              SMESHDS_Document* theDocument);
              SMESH_Gen*        theGen,
              bool              theIsEmbeddedMode,
              SMESHDS_Document* theDocument);
@@ -359,7 +358,6 @@ private:
   
 protected:
   int                        _id;           // id given by creator (unique within the creator instance)
   
 protected:
   int                        _id;           // id given by creator (unique within the creator instance)
-  int                        _studyId;
   int                        _groupId;      // id generator for group objects
   int                        _nbSubShapes;  // initial nb of subshapes in the shape to mesh
   bool                       _isShapeToMesh;// set to true when a shape is given (only once)
   int                        _groupId;      // id generator for group objects
   int                        _nbSubShapes;  // initial nb of subshapes in the shape to mesh
   bool                       _isShapeToMesh;// set to true when a shape is given (only once)
index 4513302d3767bc5e5210122c58d16156ef8d13eb..f9de0bee1f245c13ff48e381c0cd3902297cc6a7 100644 (file)
@@ -35,7 +35,7 @@ using namespace std;
 //function : Create
 //purpose  : 
 //=======================================================================
 //function : Create
 //purpose  : 
 //=======================================================================
-SMESHDS_Document::SMESHDS_Document(int UserID):myUserID(UserID)
+SMESHDS_Document::SMESHDS_Document()
 {
 }
 
 {
 }
 
index 73fdc3b9fe87d358a9dbccffe1d0a545fd6fd34f..1cb0c9a9bf92adad5e9347d9fb58f4e5ea9e4996 100644 (file)
 class SMESHDS_EXPORT SMESHDS_Document
 {
   public:
 class SMESHDS_EXPORT SMESHDS_Document
 {
   public:
-        SMESHDS_Document(int UserID);
-        ~SMESHDS_Document();
-        SMESHDS_Mesh *       NewMesh(bool theIsEmbeddedMode, int MeshID);
-        void                 RemoveMesh(int MeshID);
-        SMESHDS_Mesh *       GetMesh(int MeshID);
-        void                 AddHypothesis(SMESHDS_Hypothesis * H);
-        void                 RemoveHypothesis(int HypID);
-        SMESHDS_Hypothesis * GetHypothesis(int HypID);
-        int                  NbMeshes();
-        int                  NbHypothesis();
-        void                 InitMeshesIterator();
-        SMESHDS_Mesh *       NextMesh();
-        bool                 MoreMesh();        
-        void                 InitHypothesisIterator();
-        SMESHDS_Hypothesis * NextHypothesis();
-        bool                 MoreHypothesis();  
+    SMESHDS_Document();
+    ~SMESHDS_Document();
+    SMESHDS_Mesh *       NewMesh(bool theIsEmbeddedMode, int MeshID);
+    void                 RemoveMesh(int MeshID);
+    SMESHDS_Mesh *       GetMesh(int MeshID);
+    void                 AddHypothesis(SMESHDS_Hypothesis * H);
+    void                 RemoveHypothesis(int HypID);
+    SMESHDS_Hypothesis * GetHypothesis(int HypID);
+    int                  NbMeshes();
+    int                  NbHypothesis();
+    void                 InitMeshesIterator();
+    SMESHDS_Mesh *       NextMesh();
+    bool                 MoreMesh();
+    void                 InitHypothesisIterator();
+    SMESHDS_Hypothesis * NextHypothesis();
+    bool                 MoreHypothesis();
 
   private:
 
   private:
-        int                                         myUserID;
-        std::map<int,SMESHDS_Mesh*>                 myMeshes;
-        std::map<int,SMESHDS_Hypothesis*>           myHypothesis;
-        std::map<int,SMESHDS_Mesh*>::iterator       myMeshesIt;
-        std::map<int,SMESHDS_Hypothesis*>::iterator myHypothesisIt;
+    std::map<int,SMESHDS_Mesh*>                 myMeshes;
+    std::map<int,SMESHDS_Hypothesis*>           myHypothesis;
+    std::map<int,SMESHDS_Mesh*>::iterator       myMeshesIt;
+    std::map<int,SMESHDS_Hypothesis*>::iterator myHypothesisIt;
 };
 
 #endif
 };
 
 #endif
index 1145efb17d3b1fe336704c0005693a320a395e3a..3f2b887710b780ff979c506ae21d02af75eb1050 100644 (file)
@@ -194,7 +194,7 @@ namespace
 
   void ExportMeshToFile(int theCommandID);
 
 
   void ExportMeshToFile(int theCommandID);
 
-  void SetDisplayMode(int theCommandID, SMESHGUI_StudyId2MarkerMap& theMarkerMap);
+  void SetDisplayMode(int theCommandID, VTK::MarkerMap& theMarkerMap);
 
   void SetDisplayEntity(int theCommandID);
 
 
   void SetDisplayEntity(int theCommandID);
 
@@ -276,7 +276,7 @@ namespace
     if ( filenames.count() > 0 )
     {
       SUIT_OverrideCursor wc;
     if ( filenames.count() > 0 )
     {
       SUIT_OverrideCursor wc;
-      _PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
+      _PTR(Study) aStudy = SMESH::getStudy();
 
       QStringList errors;
       QStringList anEntryList;
 
       QStringList errors;
       QStringList anEntryList;
@@ -1336,7 +1336,7 @@ namespace
       if ( selected.Extent() )
       {
         Handle(SALOME_InteractiveObject) anIObject = selected.First();
       if ( selected.Extent() )
       {
         Handle(SALOME_InteractiveObject) anIObject = selected.First();
-        _PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
+        _PTR(Study) aStudy = SMESH::getStudy();
         _PTR(SObject) aSObj = aStudy->FindObjectID(anIObject->getEntry());
         if (aSObj) {
           if ( aStudy->GetUseCaseBuilder()->SortChildren( aSObj, true/*AscendingOrder*/ ) ) {
         _PTR(SObject) aSObj = aStudy->FindObjectID(anIObject->getEntry());
         if (aSObj) {
           if ( aStudy->GetUseCaseBuilder()->SortChildren( aSObj, true/*AscendingOrder*/ ) ) {
@@ -1347,7 +1347,7 @@ namespace
     }
   }
 
     }
   }
 
-  void SetDisplayMode(int theCommandID, SMESHGUI_StudyId2MarkerMap& theMarkerMap)
+  void SetDisplayMode(int theCommandID, VTK::MarkerMap& theMarkerMap)
   {
     SALOME_ListIO selected;
     SalomeApp_Application* app =
   {
     SALOME_ListIO selected;
     SalomeApp_Application* app =
@@ -1369,8 +1369,6 @@ namespace
       return;
     }
 
       return;
     }
 
-    _PTR(Study) aStudy = appStudy->studyDS();
-
     aSel->selectedObjects( selected );
 
     if ( selected.Extent() >= 1 )
     aSel->selectedObjects( selected );
 
     if ( selected.Extent() >= 1 )
@@ -1469,7 +1467,7 @@ namespace
             break;
         }
 
             break;
         }
 
-        SMESHGUI_PropertiesDlg dlg( theMarkerMap[ aStudy->StudyId() ], SMESHGUI::desktop() );
+        SMESHGUI_PropertiesDlg dlg( theMarkerMap, SMESHGUI::desktop() );
         // nodes: color, marker
         dlg.setNodeColor( nodeColor );
         if( markerType != VTK::MT_USER )
         // nodes: color, marker
         dlg.setNodeColor( nodeColor );
         if( markerType != VTK::MT_USER )
@@ -1525,8 +1523,8 @@ namespace
           orientation3d    = dlg.orientation3d();
           shrinkCoef       = dlg.shrinkCoef() / 100.;
 
           orientation3d    = dlg.orientation3d();
           shrinkCoef       = dlg.shrinkCoef() / 100.;
 
-          // store point markers map that might be changed by the user
-          theMarkerMap[ aStudy->StudyId() ] = dlg.customMarkers();
+          // store point markers that might be changed by the user
+          theMarkerMap = dlg.customMarkers();
 
           // set properties from dialog box to the presentations
           SALOME_ListIteratorOfListIO It( selected );
 
           // set properties from dialog box to the presentations
           SALOME_ListIteratorOfListIO It( selected );
@@ -1542,9 +1540,8 @@ namespace
               anActor->SetMarkerStd( markerType, markerScale );
             }
             else {
               anActor->SetMarkerStd( markerType, markerScale );
             }
             else {
-              const VTK::MarkerMap& markerMap = theMarkerMap[ aStudy->StudyId() ];
-              VTK::MarkerMap::const_iterator iter = markerMap.find( markerId );
-              if ( iter != markerMap.end() )
+              VTK::MarkerMap::const_iterator iter = theMarkerMap.find( markerId );
+              if ( iter != theMarkerMap.end() )
                 anActor->SetMarkerTexture( markerId, iter->second.second );
             }
             // volumes: normal color, reversed color (delta)
                 anActor->SetMarkerTexture( markerId, iter->second.second );
             }
             // volumes: normal color, reversed color (delta)
@@ -1682,7 +1679,7 @@ namespace
   void Control( int theCommandID )
   {
     SMESH_Actor::eControl aControl = SMESH_Actor::eControl( ActionToControl( theCommandID ));
   void Control( int theCommandID )
   {
     SMESH_Actor::eControl aControl = SMESH_Actor::eControl( ActionToControl( theCommandID ));
-    _PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
+    _PTR(Study) aStudy = SMESH::getStudy();
 
     SALOME_ListIO selected;
     if ( LightApp_SelectionMgr *aSel = SMESHGUI::selectionMgr() )
 
     SALOME_ListIO selected;
     if ( LightApp_SelectionMgr *aSel = SMESHGUI::selectionMgr() )
@@ -1701,7 +1698,7 @@ namespace
             if ( !anIDSrc->_is_nil() ) {
               SMESH_Actor *anActor = SMESH::FindActorByEntry( anIO->getEntry());
               if (( !anActor && selected.Extent() == 1 ) &&
             if ( !anIDSrc->_is_nil() ) {
               SMESH_Actor *anActor = SMESH::FindActorByEntry( anIO->getEntry());
               if (( !anActor && selected.Extent() == 1 ) &&
-                  ( anActor = SMESH::CreateActor( aStudy, anIO->getEntry() )))
+                  ( anActor = SMESH::CreateActor( anIO->getEntry() )))
               {
                 anActor->SetControlMode( aControl );
                 SMESH::DisplayActor( SMESH::GetCurrentVtkView(), anActor );
               {
                 anActor->SetControlMode( aControl );
                 SMESH::DisplayActor( SMESH::GetCurrentVtkView(), anActor );
@@ -1758,7 +1755,7 @@ namespace
 
   QString CheckTypeObject(const Handle(SALOME_InteractiveObject) & theIO)
   {
 
   QString CheckTypeObject(const Handle(SALOME_InteractiveObject) & theIO)
   {
-    _PTR(Study)  aStudy = SMESH::GetActiveStudyDocument();
+    _PTR(Study)  aStudy = SMESH::getStudy();
     _PTR(SObject) aSObj = aStudy->FindObjectID(theIO->getEntry());
     if (aSObj) {
       _PTR(SComponent) aSComp = aSObj->GetFatherComponent();
     _PTR(SObject) aSObj = aStudy->FindObjectID(theIO->getEntry());
     if (aSObj) {
       _PTR(SComponent) aSComp = aSObj->GetFatherComponent();
@@ -1822,7 +1819,7 @@ void SMESHGUI::OnEditDelete()
   LightApp_SelectionMgr* aSel = SMESHGUI::selectionMgr();
   SALOME_ListIO selected; aSel->selectedObjects( selected, QString::null, false );
 
   LightApp_SelectionMgr* aSel = SMESHGUI::selectionMgr();
   SALOME_ListIO selected; aSel->selectedObjects( selected, QString::null, false );
 
-  _PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
+  _PTR(Study) aStudy = SMESH::getStudy();
   _PTR(StudyBuilder) aStudyBuilder = aStudy->NewBuilder();
   _PTR(GenericAttribute) anAttr;
   _PTR(AttributeIOR) anIOR;
   _PTR(StudyBuilder) aStudyBuilder = aStudy->NewBuilder();
   _PTR(GenericAttribute) anAttr;
   _PTR(AttributeIOR) anIOR;
@@ -2210,17 +2207,6 @@ SMESHGUI* SMESHGUI::GetSMESHGUI()
     smeshMod = dynamic_cast<SMESHGUI*>( module );
   }
 
     smeshMod = dynamic_cast<SMESHGUI*>( module );
   }
 
-  if ( smeshMod && smeshMod->application() && smeshMod->application()->activeStudy() )
-  {
-    SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( smeshMod->application()->activeStudy() );
-    if ( study )
-    {
-      _PTR(Study) aStudy = study->studyDS();
-      if ( aStudy )
-        GetSMESHGen()->SetCurrentStudy( _CAST(Study,aStudy)->GetStudy() );
-    }
-  }
-
   return smeshMod;
 }
 
   return smeshMod;
 }
 
@@ -2393,36 +2379,27 @@ bool SMESHGUI::DefineDlgPosition(QWidget * aDlg, int &x, int &y)
   return true;
 }
 
   return true;
 }
 
-//=============================================================================
 /*!
 /*!
- *
- */
-//=============================================================================
-static int isStudyLocked(_PTR(Study) theStudy){
-  return theStudy->GetProperties()->IsLocked();
-}
-
-static bool checkLock(_PTR(Study) theStudy) {
-  if (isStudyLocked(theStudy)) {
-    SUIT_MessageBox::warning( SMESHGUI::desktop(),
-                              QObject::tr("WRN_WARNING"),
-                              QObject::tr("WRN_STUDY_LOCKED") );
+ * \brief Verifies whether study of operation is locked
+  * \param theMess - specifies whether message box must be shown if study is locked
+  * \return State of study.
+*
+* Verifies whether study of operation is locked. If second parameter is TRUE and study
+* is locked when corresponding message box appears
+*/
+bool SMESHGUI::isStudyLocked( bool theMessage )
+{
+  if ( SMESH::getStudy()->GetProperties()->IsLocked() )
+  {
+    if ( theMessage )
+      SUIT_MessageBox::warning( SMESHGUI::desktop(),
+                                QObject::tr( "WRN_WARNING" ),
+                                QObject::tr( "WRN_STUDY_LOCKED" ) );
     return true;
   }
   return false;
 }
 
     return true;
   }
   return false;
 }
 
-//=======================================================================
-//function : CheckActiveStudyLocked
-//purpose  :
-//=======================================================================
-
-bool SMESHGUI::isActiveStudyLocked()
-{
-  _PTR(Study) aStudy = activeStudy()->studyDS();
-  return checkLock( aStudy );
-}
-
 //=============================================================================
 /*!
  *
 //=============================================================================
 /*!
  *
@@ -2434,15 +2411,10 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
   if( !anApp )
     return false;
 
   if( !anApp )
     return false;
 
-  _PTR(Study) aStudy = SMESH::GetActiveStudyDocument(); //Document OCAF de l'etude active
   SUIT_ResourceMgr* mgr = resourceMgr();
   if( !mgr )
     return false;
 
   SUIT_ResourceMgr* mgr = resourceMgr();
   if( !mgr )
     return false;
 
-  if (CORBA::is_nil(GetSMESHGen()->GetCurrentStudy())) {
-    GetSMESHGen()->SetCurrentStudy(_CAST(Study,aStudy)->GetStudy());
-  }
-
   SUIT_ViewWindow* view = application()->desktop()->activeWindow();
   SVTK_ViewWindow* vtkwnd = dynamic_cast<SVTK_ViewWindow*>( view );
 
   SUIT_ViewWindow* view = application()->desktop()->activeWindow();
   SVTK_ViewWindow* vtkwnd = dynamic_cast<SVTK_ViewWindow*>( view );
 
@@ -2450,7 +2422,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
 
   switch (theCommandID) {
   case SMESHOp::OpDelete:
 
   switch (theCommandID) {
   case SMESHOp::OpDelete:
-    if(checkLock(aStudy)) break;
+    if(isStudyLocked()) break;
     OnEditDelete();
     break;
   case SMESHOp::OpImportDAT:
     OnEditDelete();
     break;
   case SMESHOp::OpImportDAT:
@@ -2468,7 +2440,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
   case SMESHOp::OpPopupImportSAUV:
   case SMESHOp::OpPopupImportGMF:
     {
   case SMESHOp::OpPopupImportSAUV:
   case SMESHOp::OpPopupImportGMF:
     {
-      if(checkLock(aStudy)) break;
+      if(isStudyLocked()) break;
       ::ImportMeshesFromFile(GetSMESHGen(),theCommandID);
       break;
     }
       ::ImportMeshesFromFile(GetSMESHGen(),theCommandID);
       break;
     }
@@ -2630,7 +2602,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
 
   case SMESHOp::OpUpdate:
     {
 
   case SMESHOp::OpUpdate:
     {
-      if(checkLock(aStudy)) break;
+      if(isStudyLocked()) break;
       SUIT_OverrideCursor wc;
       try {
 #if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
       SUIT_OverrideCursor wc;
       try {
 #if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
@@ -2697,7 +2669,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
         }
 
         // PAL13338 + PAL15161 -->
         }
 
         // PAL13338 + PAL15161 -->
-        if ( ( theCommandID==SMESHOp::OpShow || theCommandID==SMESHOp::OpShowOnly ) && !checkLock(aStudy)) {
+        if ( ( theCommandID==SMESHOp::OpShow || theCommandID==SMESHOp::OpShowOnly ) && !isStudyLocked()) {
           SMESH::UpdateView();
           SMESHGUI::GetSMESHGUI()->EmitSignalVisibilityChanged();
         }
           SMESH::UpdateView();
           SMESHGUI::GetSMESHGUI()->EmitSignalVisibilityChanged();
         }
@@ -2719,7 +2691,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
 
   case SMESHOp::OpNode:
     {
 
   case SMESHOp::OpNode:
     {
-      if(checkLock(aStudy)) break;
+      if(isStudyLocked()) break;
 
       if ( vtkwnd ) {
         EmitSignalDeactivateDialog();
 
       if ( vtkwnd ) {
         EmitSignalDeactivateDialog();
@@ -2746,14 +2718,14 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
     break;
   case SMESHOp::OpCopyMesh:
     {
     break;
   case SMESHOp::OpCopyMesh:
     {
-      if (checkLock(aStudy)) break;
+      if (isStudyLocked()) break;
       EmitSignalDeactivateDialog();
       ( new SMESHGUI_CopyMeshDlg( this ) )->show();
     }
     break;
   case SMESHOp::OpBuildCompoundMesh:
     {
       EmitSignalDeactivateDialog();
       ( new SMESHGUI_CopyMeshDlg( this ) )->show();
     }
     break;
   case SMESHOp::OpBuildCompoundMesh:
     {
-      if (checkLock(aStudy)) break;
+      if (isStudyLocked()) break;
       EmitSignalDeactivateDialog();
       ( new SMESHGUI_BuildCompoundDlg( this ) )->show();
     }
       EmitSignalDeactivateDialog();
       ( new SMESHGUI_BuildCompoundDlg( this ) )->show();
     }
@@ -2768,7 +2740,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
         break;
       }
 
         break;
       }
 
-      if ( checkLock( aStudy ) )
+      if ( isStudyLocked() )
         break;
 
       /*Standard_Boolean aRes;
         break;
 
       /*Standard_Boolean aRes;
@@ -2798,7 +2770,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
         break;
       }
 
         break;
       }
 
-      if ( checkLock( aStudy ) )
+      if ( isStudyLocked() )
         break;
 
       EmitSignalDeactivateDialog();
         break;
 
       EmitSignalDeactivateDialog();
@@ -2817,7 +2789,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
     }
   case SMESHOp::OpSmoothing:
     {
     }
   case SMESHOp::OpSmoothing:
     {
-      if(checkLock(aStudy)) break;
+      if(isStudyLocked()) break;
       if( vtkwnd ) {
         EmitSignalDeactivateDialog();
         ( new SMESHGUI_SmoothingDlg( this ) )->show();
       if( vtkwnd ) {
         EmitSignalDeactivateDialog();
         ( new SMESHGUI_SmoothingDlg( this ) )->show();
@@ -2829,7 +2801,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
     }
   case SMESHOp::OpExtrusion:
     {
     }
   case SMESHOp::OpExtrusion:
     {
-      if (checkLock(aStudy)) break;
+      if (isStudyLocked()) break;
       if (vtkwnd) {
         EmitSignalDeactivateDialog();
         ( new SMESHGUI_ExtrusionDlg ( this ) )->show();
       if (vtkwnd) {
         EmitSignalDeactivateDialog();
         ( new SMESHGUI_ExtrusionDlg ( this ) )->show();
@@ -2840,7 +2812,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
     }
   case SMESHOp::OpExtrusionAlongAPath:
     {
     }
   case SMESHOp::OpExtrusionAlongAPath:
     {
-      if (checkLock(aStudy)) break;
+      if (isStudyLocked()) break;
       if (vtkwnd) {
         EmitSignalDeactivateDialog();
         ( new SMESHGUI_ExtrusionAlongPathDlg( this ) )->show();
       if (vtkwnd) {
         EmitSignalDeactivateDialog();
         ( new SMESHGUI_ExtrusionAlongPathDlg( this ) )->show();
@@ -2851,7 +2823,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
     }
   case SMESHOp::OpRevolution:
     {
     }
   case SMESHOp::OpRevolution:
     {
-      if(checkLock(aStudy)) break;
+      if(isStudyLocked()) break;
       if( vtkwnd ) {
         EmitSignalDeactivateDialog();
         ( new SMESHGUI_RevolutionDlg( this ) )->show();
       if( vtkwnd ) {
         EmitSignalDeactivateDialog();
         ( new SMESHGUI_RevolutionDlg( this ) )->show();
@@ -2863,7 +2835,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
     }
   case SMESHOp::OpPatternMapping:
     {
     }
   case SMESHOp::OpPatternMapping:
     {
-      if ( checkLock( aStudy ) )
+      if ( isStudyLocked() )
         break;
       if ( vtkwnd )
       {
         break;
       if ( vtkwnd )
       {
@@ -2892,7 +2864,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
         break;
       }
 
         break;
       }
 
-      if(checkLock(aStudy)) break;
+      if(isStudyLocked()) break;
       EmitSignalDeactivateDialog();
       SMESH::SMESH_Mesh_var aMesh = SMESH::SMESH_Mesh::_nil();
 
       EmitSignalDeactivateDialog();
       SMESH::SMESH_Mesh_var aMesh = SMESH::SMESH_Mesh::_nil();
 
@@ -2919,7 +2891,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
         break;
       }
 
         break;
       }
 
-      if(checkLock(aStudy)) break;
+      if(isStudyLocked()) break;
       EmitSignalDeactivateDialog();
 
       LightApp_SelectionMgr *aSel = SMESHGUI::selectionMgr();
       EmitSignalDeactivateDialog();
 
       LightApp_SelectionMgr *aSel = SMESHGUI::selectionMgr();
@@ -2932,7 +2904,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
         // check if submesh is selected
         Handle(SALOME_InteractiveObject) IObject = selected.First();
         if (IObject->hasEntry()) {
         // check if submesh is selected
         Handle(SALOME_InteractiveObject) IObject = selected.First();
         if (IObject->hasEntry()) {
-          _PTR(SObject) aSObj = aStudy->FindObjectID(IObject->getEntry());
+          _PTR(SObject) aSObj = SMESH::getStudy()->FindObjectID(IObject->getEntry());
           if( aSObj ) {
             SMESH::SMESH_subMesh_var aSubMesh = SMESH::SMESH_subMesh::_narrow( SMESH::SObjectToObject( aSObj ) );
             if (!aSubMesh->_is_nil()) {
           if( aSObj ) {
             SMESH::SMESH_subMesh_var aSubMesh = SMESH::SMESH_subMesh::_narrow( SMESH::SObjectToObject( aSObj ) );
             if (!aSubMesh->_is_nil()) {
@@ -2996,7 +2968,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
         break;
       }
 
         break;
       }
 
-      if(checkLock(aStudy)) break;
+      if(isStudyLocked()) break;
       EmitSignalDeactivateDialog();
 
       LightApp_SelectionMgr *aSel = SMESHGUI::selectionMgr();
       EmitSignalDeactivateDialog();
 
       LightApp_SelectionMgr *aSel = SMESHGUI::selectionMgr();
@@ -3026,7 +2998,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
 
   case SMESHOp::OpAddElemGroupPopup:     // Add elements to group
     {
 
   case SMESHOp::OpAddElemGroupPopup:     // Add elements to group
     {
-      if(checkLock(aStudy)) break;
+      if(isStudyLocked()) break;
       if (myState == 800) {
         SMESHGUI_GroupDlg *aDlg = (SMESHGUI_GroupDlg*) myActiveDialogBox;
         if (aDlg) aDlg->onAdd();
       if (myState == 800) {
         SMESHGUI_GroupDlg *aDlg = (SMESHGUI_GroupDlg*) myActiveDialogBox;
         if (aDlg) aDlg->onAdd();
@@ -3036,7 +3008,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
 
   case SMESHOp::OpRemoveElemGroupPopup:  // Remove elements from group
     {
 
   case SMESHOp::OpRemoveElemGroupPopup:  // Remove elements from group
     {
-      if(checkLock(aStudy)) break;
+      if(isStudyLocked()) break;
       if (myState == 800) {
         SMESHGUI_GroupDlg *aDlg = (SMESHGUI_GroupDlg*) myActiveDialogBox;
         if (aDlg) aDlg->onRemove();
       if (myState == 800) {
         SMESHGUI_GroupDlg *aDlg = (SMESHGUI_GroupDlg*) myActiveDialogBox;
         if (aDlg) aDlg->onRemove();
@@ -3052,7 +3024,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
         break;
       }
 
         break;
       }
 
-      if(checkLock(aStudy)) break;
+      if(isStudyLocked()) break;
       EmitSignalDeactivateDialog();
 
       LightApp_SelectionMgr *aSel = SMESHGUI::selectionMgr();
       EmitSignalDeactivateDialog();
 
       LightApp_SelectionMgr *aSel = SMESHGUI::selectionMgr();
@@ -3092,7 +3064,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
         break;
       }
 
         break;
       }
 
-      if ( checkLock( aStudy ) )
+      if ( isStudyLocked() )
         break;
 
       EmitSignalDeactivateDialog();
         break;
 
       EmitSignalDeactivateDialog();
@@ -3112,7 +3084,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
 
     case SMESHOp::OpGroupUnderlyingElem: // Create groups of entities from existing groups of superior dimensions
     {
 
     case SMESHOp::OpGroupUnderlyingElem: // Create groups of entities from existing groups of superior dimensions
     {
-      if ( checkLock( aStudy ) )
+      if ( isStudyLocked() )
         break;
 
       EmitSignalDeactivateDialog();
         break;
 
       EmitSignalDeactivateDialog();
@@ -3130,7 +3102,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
         break;
       }
 
         break;
       }
 
-      if ( checkLock( aStudy ) )
+      if ( isStudyLocked() )
         break;
 
       EmitSignalDeactivateDialog();
         break;
 
       EmitSignalDeactivateDialog();
@@ -3172,7 +3144,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
 
   case SMESHOp::OpEditHypothesis:
     {
 
   case SMESHOp::OpEditHypothesis:
     {
-      if(checkLock(aStudy)) break;
+      if(isStudyLocked()) break;
 
       LightApp_SelectionMgr *aSel = SMESHGUI::selectionMgr();
       SALOME_ListIO selected;
 
       LightApp_SelectionMgr *aSel = SMESHGUI::selectionMgr();
       SALOME_ListIO selected;
@@ -3217,7 +3189,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
     }
   case SMESHOp::OpUnassign:                      // REMOVE HYPOTHESIS / ALGORITHMS
     {
     }
   case SMESHOp::OpUnassign:                      // REMOVE HYPOTHESIS / ALGORITHMS
     {
-      if(checkLock(aStudy)) break;
+      if(isStudyLocked()) break;
       SUIT_OverrideCursor wc;
 
       LightApp_SelectionMgr *aSel = SMESHGUI::selectionMgr();
       SUIT_OverrideCursor wc;
 
       LightApp_SelectionMgr *aSel = SMESHGUI::selectionMgr();
@@ -3248,7 +3220,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
   case SMESHOp::OpPyramid:
   case SMESHOp::OpHexagonalPrism:
     {
   case SMESHOp::OpPyramid:
   case SMESHOp::OpHexagonalPrism:
     {
-      if(checkLock(aStudy)) break;
+      if(isStudyLocked()) break;
       if ( vtkwnd ) {
         EmitSignalDeactivateDialog();
         SMDSAbs_EntityType type = SMDSEntity_Edge;
       if ( vtkwnd ) {
         EmitSignalDeactivateDialog();
         SMDSAbs_EntityType type = SMDSEntity_Edge;
@@ -3274,7 +3246,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
     }
   case SMESHOp::OpPolyhedron:
     {
     }
   case SMESHOp::OpPolyhedron:
     {
-      if(checkLock(aStudy)) break;
+      if(isStudyLocked()) break;
       if ( vtkwnd ) {
         EmitSignalDeactivateDialog();
         ( new SMESHGUI_CreatePolyhedralVolumeDlg( this ) )->show();
       if ( vtkwnd ) {
         EmitSignalDeactivateDialog();
         ( new SMESHGUI_CreatePolyhedralVolumeDlg( this ) )->show();
@@ -3296,7 +3268,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
   case SMESHOp::OpQuadraticHexahedron:
   case SMESHOp::OpTriQuadraticHexahedron:
     {
   case SMESHOp::OpQuadraticHexahedron:
   case SMESHOp::OpTriQuadraticHexahedron:
     {
-      if(checkLock(aStudy)) break;
+      if(isStudyLocked()) break;
       if ( vtkwnd ) {
         EmitSignalDeactivateDialog();
         SMDSAbs_EntityType type = SMDSEntity_Last;
       if ( vtkwnd ) {
         EmitSignalDeactivateDialog();
         SMDSAbs_EntityType type = SMDSEntity_Last;
@@ -3326,7 +3298,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
     }
   case SMESHOp::OpRemoveNodes:
     {
     }
   case SMESHOp::OpRemoveNodes:
     {
-      if(checkLock(aStudy)) break;
+      if(isStudyLocked()) break;
       if ( vtkwnd ) {
         EmitSignalDeactivateDialog();
         ( new SMESHGUI_RemoveNodesDlg( this ) )->show();
       if ( vtkwnd ) {
         EmitSignalDeactivateDialog();
         ( new SMESHGUI_RemoveNodesDlg( this ) )->show();
@@ -3339,7 +3311,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
     }
   case SMESHOp::OpRemoveElements:                                    // REMOVES ELEMENTS
     {
     }
   case SMESHOp::OpRemoveElements:                                    // REMOVES ELEMENTS
     {
-      if(checkLock(aStudy)) break;
+      if(isStudyLocked()) break;
       if( vtkwnd ) {
         EmitSignalDeactivateDialog();
         ( new SMESHGUI_RemoveElementsDlg( this ) )->show();
       if( vtkwnd ) {
         EmitSignalDeactivateDialog();
         ( new SMESHGUI_RemoveElementsDlg( this ) )->show();
@@ -3353,7 +3325,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
     }
   case SMESHOp::OpClearMesh: {
 
     }
   case SMESHOp::OpClearMesh: {
 
-    if(checkLock(aStudy)) break;
+    if(isStudyLocked()) break;
 
     SALOME_ListIO selected;
     if( LightApp_SelectionMgr *aSel = SMESHGUI::selectionMgr() )
 
     SALOME_ListIO selected;
     if( LightApp_SelectionMgr *aSel = SMESHGUI::selectionMgr() )
@@ -3374,7 +3346,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
         SMESH::ModifiedMesh( aMeshSObj, false, true);
         // hide groups and submeshes
         _PTR(ChildIterator) anIter =
         SMESH::ModifiedMesh( aMeshSObj, false, true);
         // hide groups and submeshes
         _PTR(ChildIterator) anIter =
-          SMESH::GetActiveStudyDocument()->NewChildIterator( aMeshSObj );
+          SMESH::getStudy()->NewChildIterator( aMeshSObj );
         for ( anIter->InitEx(true); anIter->More(); anIter->Next() )
         {
           _PTR(SObject) so = anIter->Value();
         for ( anIter->InitEx(true); anIter->More(); anIter->Next() )
         {
           _PTR(SObject) so = anIter->Value();
@@ -3393,7 +3365,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
   }
   case SMESHOp::OpRemoveOrphanNodes:
     {
   }
   case SMESHOp::OpRemoveOrphanNodes:
     {
-      if(checkLock(aStudy)) break;
+      if(isStudyLocked()) break;
       SALOME_ListIO selected;
       if( LightApp_SelectionMgr *aSel = SMESHGUI::selectionMgr() )
         aSel->selectedObjects( selected );
       SALOME_ListIO selected;
       if( LightApp_SelectionMgr *aSel = SMESHGUI::selectionMgr() )
         aSel->selectedObjects( selected );
@@ -3432,7 +3404,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
     }
   case SMESHOp::OpRenumberingNodes:
     {
     }
   case SMESHOp::OpRenumberingNodes:
     {
-      if(checkLock(aStudy)) break;
+      if(isStudyLocked()) break;
       if( vtkwnd ) {
         EmitSignalDeactivateDialog();
         ( new SMESHGUI_RenumberingDlg( this, 0 ) )->show();
       if( vtkwnd ) {
         EmitSignalDeactivateDialog();
         ( new SMESHGUI_RenumberingDlg( this, 0 ) )->show();
@@ -3446,7 +3418,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
     }
   case SMESHOp::OpRenumberingElements:
     {
     }
   case SMESHOp::OpRenumberingElements:
     {
-      if(checkLock(aStudy)) break;
+      if(isStudyLocked()) break;
       if ( vtkwnd ) {
         EmitSignalDeactivateDialog();
         ( new SMESHGUI_RenumberingDlg( this, 1 ) )->show();
       if ( vtkwnd ) {
         EmitSignalDeactivateDialog();
         ( new SMESHGUI_RenumberingDlg( this, 1 ) )->show();
@@ -3460,7 +3432,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
     }
   case SMESHOp::OpTranslation:
     {
     }
   case SMESHOp::OpTranslation:
     {
-      if(checkLock(aStudy)) break;
+      if(isStudyLocked()) break;
       if ( vtkwnd ) {
         EmitSignalDeactivateDialog();
         ( new SMESHGUI_TranslationDlg( this ) )->show();
       if ( vtkwnd ) {
         EmitSignalDeactivateDialog();
         ( new SMESHGUI_TranslationDlg( this ) )->show();
@@ -3473,7 +3445,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
     }
   case SMESHOp::OpRotation:
     {
     }
   case SMESHOp::OpRotation:
     {
-      if(checkLock(aStudy)) break;
+      if(isStudyLocked()) break;
       if( vtkwnd ) {
         EmitSignalDeactivateDialog();
         ( new SMESHGUI_RotationDlg( this ) )->show();
       if( vtkwnd ) {
         EmitSignalDeactivateDialog();
         ( new SMESHGUI_RotationDlg( this ) )->show();
@@ -3486,7 +3458,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
     }
   case SMESHOp::OpSymmetry:
     {
     }
   case SMESHOp::OpSymmetry:
     {
-      if(checkLock(aStudy)) break;
+      if(isStudyLocked()) break;
       if(vtkwnd) {
         EmitSignalDeactivateDialog();
         ( new SMESHGUI_SymmetryDlg( this ) )->show();
       if(vtkwnd) {
         EmitSignalDeactivateDialog();
         ( new SMESHGUI_SymmetryDlg( this ) )->show();
@@ -3499,7 +3471,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
     }
   case SMESHOp::OpScale:
     {
     }
   case SMESHOp::OpScale:
     {
-      if(checkLock(aStudy)) break;
+      if(isStudyLocked()) break;
       if ( vtkwnd ) {
         EmitSignalDeactivateDialog();
         ( new SMESHGUI_ScaleDlg( this ) )->show();
       if ( vtkwnd ) {
         EmitSignalDeactivateDialog();
         ( new SMESHGUI_ScaleDlg( this ) )->show();
@@ -3513,7 +3485,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
 
   case SMESHOp::OpSewing:
     {
 
   case SMESHOp::OpSewing:
     {
-      if(checkLock(aStudy)) break;
+      if(isStudyLocked()) break;
       if(vtkwnd) {
         EmitSignalDeactivateDialog();
         ( new SMESHGUI_SewingDlg( this ) )->show();
       if(vtkwnd) {
         EmitSignalDeactivateDialog();
         ( new SMESHGUI_SewingDlg( this ) )->show();
@@ -3526,7 +3498,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
     }
   case SMESHOp::OpMergeNodes:
     {
     }
   case SMESHOp::OpMergeNodes:
     {
-      if(checkLock(aStudy)) break;
+      if(isStudyLocked()) break;
       if(vtkwnd) {
         EmitSignalDeactivateDialog();
         ( new SMESHGUI_MergeDlg( this, 0 ) )->show();
       if(vtkwnd) {
         EmitSignalDeactivateDialog();
         ( new SMESHGUI_MergeDlg( this, 0 ) )->show();
@@ -3539,7 +3511,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
     }
   case SMESHOp::OpMergeElements:
     {
     }
   case SMESHOp::OpMergeElements:
     {
-      if (checkLock(aStudy)) break;
+      if (isStudyLocked()) break;
       if (vtkwnd) {
         EmitSignalDeactivateDialog();
         ( new SMESHGUI_MergeDlg( this, 1 ) )->show();
       if (vtkwnd) {
         EmitSignalDeactivateDialog();
         ( new SMESHGUI_MergeDlg( this, 1 ) )->show();
@@ -3556,7 +3528,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
 
   case SMESHOp::OpDuplicateNodes:
     {
 
   case SMESHOp::OpDuplicateNodes:
     {
-      if(checkLock(aStudy)) break;
+      if(isStudyLocked()) break;
       if ( vtkwnd ) {
         EmitSignalDeactivateDialog();
         ( new SMESHGUI_DuplicateNodesDlg( this ) )->show();
       if ( vtkwnd ) {
         EmitSignalDeactivateDialog();
         ( new SMESHGUI_DuplicateNodesDlg( this ) )->show();
@@ -4849,11 +4821,7 @@ bool SMESHGUI::activateModule( SUIT_Study* study )
   action(SMESHOp::OpDelete)->setEnabled(true); // Delete: Key_Delete
 
   //  0020210. Make SMESH_Gen update meshes at switching GEOM->SMESH
   action(SMESHOp::OpDelete)->setEnabled(true); // Delete: Key_Delete
 
   //  0020210. Make SMESH_Gen update meshes at switching GEOM->SMESH
-  GetSMESHGen()->SetCurrentStudy(SALOMEDS::Study::_nil());
-  if ( SalomeApp_Study* s = dynamic_cast<SalomeApp_Study*>( study )) {
-    if ( _PTR(Study) aStudy = s->studyDS() )
-      GetSMESHGen()->SetCurrentStudy( _CAST(Study,aStudy)->GetStudy() );
-  }
+  GetSMESHGen()->UpdateStudy();
 
   // get all view currently opened in the study and connect their signals  to
   // the corresponding slots of the class.
 
   // get all view currently opened in the study and connect their signals  to
   // the corresponding slots of the class.
@@ -4886,7 +4854,7 @@ void SMESHGUI::studyClosed( SUIT_Study* s )
 {
   if( !s )
     return;
 {
   if( !s )
     return;
-  SMESH::RemoveVisuData( s->id() );
+  SMESH::RemoveVisuData();
   SalomeApp_Module::studyClosed( s );
 }
 
   SalomeApp_Module::studyClosed( s );
 }
 
@@ -4902,16 +4870,11 @@ void SMESHGUI::OnGUIEvent()
 
 SMESH::SMESH_Gen_var SMESHGUI::GetSMESHGen()
 {
 
 SMESH::SMESH_Gen_var SMESHGUI::GetSMESHGen()
 {
-  _PTR(Study) aStudy = SMESH::GetActiveStudyDocument(); //Document OCAF de l'etude active
   if ( CORBA::is_nil( myComponentSMESH ) )
   if ( CORBA::is_nil( myComponentSMESH ) )
-    {
-      SMESHGUI aGUI; //SRN BugID: IPAL9186: Create an instance of SMESHGUI to initialize myComponentSMESH
-      if ( aStudy )
-        aGUI.myComponentSMESH->SetCurrentStudy(_CAST(Study,aStudy)->GetStudy());
-      return aGUI.myComponentSMESH;
-    }
-  if ( aStudy )
-    myComponentSMESH->SetCurrentStudy(_CAST(Study,aStudy)->GetStudy());
+  {
+    SMESHGUI aGUI; //SRN BugID: IPAL9186: Create an instance of SMESHGUI to initialize myComponentSMESH
+    return aGUI.myComponentSMESH;
+  }
   return myComponentSMESH;
 }
 
   return myComponentSMESH;
 }
 
@@ -5621,8 +5584,7 @@ LightApp_Operation* SMESHGUI::createOperation( const int id ) const
 
 void SMESHGUI::switchToOperation(int id)
 {
 
 void SMESHGUI::switchToOperation(int id)
 {
-  if ( _PTR(Study) aStudy = SMESH::GetActiveStudyDocument() )
-    activeStudy()->abortAllOperations();
+  activeStudy()->abortAllOperations();
   startOperation( id );
 }
 
   startOperation( id );
 }
 
@@ -5715,12 +5677,11 @@ void SMESHGUI::storeVisualParameters (int savePoint)
                                                              savePoint);
   _PTR(IParameters) ip = ClientFactory::getIParameters(ap);
 
                                                              savePoint);
   _PTR(IParameters) ip = ClientFactory::getIParameters(ap);
 
-  // store map of custom markers
-  const VTK::MarkerMap& aMarkerMap = myMarkerMap[ studyDS->StudyId() ];
-  if( !aMarkerMap.empty() )
+  // store custom markers
+  if( !myMarkerMap.empty() )
   {
   {
-    VTK::MarkerMap::const_iterator anIter = aMarkerMap.begin();
-    for( ; anIter != aMarkerMap.end(); anIter++ )
+    VTK::MarkerMap::const_iterator anIter = myMarkerMap.begin();
+    for( ; anIter != myMarkerMap.end(); anIter++ )
     {
       int anId = anIter->first;
       VTK::MarkerData aMarkerData = anIter->second;
     {
       int anId = anIter->first;
       VTK::MarkerData aMarkerData = anIter->second;
@@ -6068,8 +6029,7 @@ void SMESHGUI::restoreVisualParameters (int savePoint)
                                                              savePoint);
   _PTR(IParameters) ip = ClientFactory::getIParameters(ap);
 
                                                              savePoint);
   _PTR(IParameters) ip = ClientFactory::getIParameters(ap);
 
-  // restore map of custom markers and map of clipping planes
-  VTK::MarkerMap& aMarkerMap = myMarkerMap[ studyDS->StudyId() ];
+  // restore custom markers and map of clipping planes
   TPlaneDataMap aPlaneDataMap;
 
   std::vector<std::string> properties = ip->getProperties();
   TPlaneDataMap aPlaneDataMap;
 
   std::vector<std::string> properties = ip->getProperties();
@@ -6126,7 +6086,7 @@ void SMESHGUI::restoreVisualParameters (int savePoint)
           aMarkerTexture.push_back( aChar.digitValue() );
       }
 
           aMarkerTexture.push_back( aChar.digitValue() );
       }
 
-      aMarkerMap[ anId ] = VTK::MarkerData( aMarkerFileName, aMarkerTexture );
+      myMarkerMap[ anId ] = VTK::MarkerData( aMarkerFileName, aMarkerTexture );
     }
     else if( aPropertyType == "ClippingPlane" )
     {
     }
     else if( aPropertyType == "ClippingPlane" )
     {
@@ -6644,8 +6604,8 @@ void SMESHGUI::restoreVisualParameters (int savePoint)
                     aSmeshActor->SetMarkerStd( (VTK::MarkerType)aParam1, (VTK::MarkerScale)aParam2 );
                   }
                   else if( data[0] == "custom" ) {
                     aSmeshActor->SetMarkerStd( (VTK::MarkerType)aParam1, (VTK::MarkerScale)aParam2 );
                   }
                   else if( data[0] == "custom" ) {
-                    VTK::MarkerMap::const_iterator markerIt = aMarkerMap.find( aParam1 );
-                    if( markerIt != aMarkerMap.end() ) {
+                    VTK::MarkerMap::const_iterator markerIt = myMarkerMap.find( aParam1 );
+                    if( markerIt != myMarkerMap.end() ) {
                       VTK::MarkerData aMarkerData = markerIt->second;
                       aSmeshActor->SetMarkerTexture( aParam1, aMarkerData.second );
                     }
                       VTK::MarkerData aMarkerData = markerIt->second;
                       aSmeshActor->SetMarkerTexture( aParam1, aMarkerData.second );
                     }
@@ -7049,7 +7009,7 @@ bool SMESHGUI::renameAllowed( const QString& entry) const {
     return false;
 
   // check type to prevent renaming of inappropriate objects
     return false;
 
   // check type to prevent renaming of inappropriate objects
-  int aType = SMESHGUI_Selection::type(qPrintable(entry), SMESH::GetActiveStudyDocument());
+  int aType = SMESHGUI_Selection::type(qPrintable(entry));
   if (aType == SMESH::MESH || aType == SMESH::GROUP ||
       aType == SMESH::SUBMESH || aType == SMESH::SUBMESH_COMPOUND ||
       aType == SMESH::SUBMESH_SOLID || aType == SMESH::SUBMESH_FACE ||
   if (aType == SMESH::MESH || aType == SMESH::GROUP ||
       aType == SMESH::SUBMESH || aType == SMESH::SUBMESH_COMPOUND ||
       aType == SMESH::SUBMESH_SOLID || aType == SMESH::SUBMESH_FACE ||
@@ -7096,7 +7056,7 @@ bool SMESHGUI::renameObject( const QString& entry, const QString& name) {
     if ( obj->FindAttribute(anAttr, "AttributeName") ) {
       aName = anAttr;
       // check type to prevent renaming of inappropriate objects
     if ( obj->FindAttribute(anAttr, "AttributeName") ) {
       aName = anAttr;
       // check type to prevent renaming of inappropriate objects
-      int aType = SMESHGUI_Selection::type( qPrintable(entry), SMESH::GetActiveStudyDocument() );
+      int aType = SMESHGUI_Selection::type( qPrintable(entry));
       if (aType == SMESH::MESH || aType == SMESH::GROUP ||
           aType == SMESH::SUBMESH || aType == SMESH::SUBMESH_COMPOUND ||
           aType == SMESH::SUBMESH_SOLID || aType == SMESH::SUBMESH_FACE ||
       if (aType == SMESH::MESH || aType == SMESH::GROUP ||
           aType == SMESH::SUBMESH || aType == SMESH::SUBMESH_COMPOUND ||
           aType == SMESH::SUBMESH_SOLID || aType == SMESH::SUBMESH_FACE ||
index 92a51bf56bb073f03f6c8a6dec22384d713d0f44..44b7671bbfb4187056a99a239e731197910febc5 100644 (file)
@@ -63,8 +63,6 @@ class LightApp_SelectionMgr;
 class SMESH_Actor;
 class SMESHGUI_FilterLibraryDlg;
 
 class SMESH_Actor;
 class SMESHGUI_FilterLibraryDlg;
 
-typedef std::map<int, VTK::MarkerMap> SMESHGUI_StudyId2MarkerMap;
-
 namespace SMESH
 {
   class OrientedPlane;
 namespace SMESH
 {
   class OrientedPlane;
@@ -96,14 +94,14 @@ public :
   static SUIT_ResourceMgr*        resourceMgr();
   static SUIT_Desktop*            desktop();
   static SalomeApp_Study*         activeStudy();
   static SUIT_ResourceMgr*        resourceMgr();
   static SUIT_Desktop*            desktop();
   static SalomeApp_Study*         activeStudy();
-  
-  bool                            isActiveStudyLocked();
 
   static bool                     automaticUpdate(unsigned int requestedSize = 0, bool* limitExceeded = 0);
   static bool                     automaticUpdate( SMESH::SMESH_IDSource_ptr, int*, bool*, int*, long* );
 
   static void                     Modified( bool = true );
 
 
   static bool                     automaticUpdate(unsigned int requestedSize = 0, bool* limitExceeded = 0);
   static bool                     automaticUpdate( SMESH::SMESH_IDSource_ptr, int*, bool*, int*, long* );
 
   static void                     Modified( bool = true );
 
+  static bool                     isStudyLocked( bool = true );
+
   virtual LightApp_Displayer*     displayer();
   virtual QString                 engineIOR() const;
   virtual void                    initialize( CAM_Application* );
   virtual LightApp_Displayer*     displayer();
   virtual QString                 engineIOR() const;
   virtual void                    initialize( CAM_Application* );
@@ -225,7 +223,7 @@ private :
 
   SMESHGUI_FilterLibraryDlg*      myFilterLibraryDlg;
 
 
   SMESHGUI_FilterLibraryDlg*      myFilterLibraryDlg;
 
-  SMESHGUI_StudyId2MarkerMap      myMarkerMap;
+  VTK::MarkerMap                  myMarkerMap;
   SMESHGUI_ClippingPlaneInfoMap   myClippingPlaneInfoMap;
 
   vtkSmartPointer<vtkCallbackCommand> myEventCallbackCommand;
   SMESHGUI_ClippingPlaneInfoMap   myClippingPlaneInfoMap;
 
   vtkSmartPointer<vtkCallbackCommand> myEventCallbackCommand;
index 30a8fc92d6f29faa74f8de50050ceb17dc7454d5..a015b4181e1bdd6b9b04185f0d633b1ea2023cfc 100644 (file)
@@ -310,8 +310,7 @@ void SMESHGUI_Add0DElemsOnAllNodesOp::selectionDone()
     _PTR(SObject) group0DRoot;
     if ( meshSO && meshSO->FindSubObject( SMESH::Tag_0DElementsGroups, group0DRoot ))
     {
     _PTR(SObject) group0DRoot;
     if ( meshSO && meshSO->FindSubObject( SMESH::Tag_0DElementsGroups, group0DRoot ))
     {
-      _PTR(Study)              aStudy = SMESH::GetActiveStudyDocument();
-      _PTR(ChildIterator) group0DIter = aStudy->NewChildIterator( group0DRoot );
+      _PTR(ChildIterator) group0DIter = SMESH::getStudy()->NewChildIterator( group0DRoot );
       for ( ; group0DIter->More(); group0DIter->Next() )
       {
         _PTR(SObject) groupSO = group0DIter->Value();
       for ( ; group0DIter->More(); group0DIter->Next() )
       {
         _PTR(SObject) groupSO = group0DIter->Value();
index 25bbd46e7c12d24af2e0db2541e6bb6c3d72ffe7..aea995c8823cd43610f476b0bde02abcaff123e4 100644 (file)
@@ -549,7 +549,7 @@ void SMESHGUI_AddMeshElementDlg::ClickOnApply()
   if( !isValid() )
     return;
 
   if( !isValid() )
     return;
 
-  if (myNbOkNodes && !mySMESHGUI->isActiveStudyLocked()) {
+  if (myNbOkNodes && !SMESHGUI::isStudyLocked()) {
     myBusy = true;
     QStringList aListId = myEditCurrentArgument->text().split(" ", QString::SkipEmptyParts);
     SMESH::long_array_var anArrayOfIndices = new SMESH::long_array;
     myBusy = true;
     QStringList aListId = myEditCurrentArgument->text().split(" ", QString::SkipEmptyParts);
     SMESH::long_array_var anArrayOfIndices = new SMESH::long_array;
index c24dbc4b3eac838cee465990b0267b74649f2dd1..d23b066288f8f4dc0a544483baa14a54a0dd881b 100644 (file)
@@ -686,7 +686,7 @@ bool SMESHGUI_AddQuadraticElementDlg::ClickOnApply()
   if( !isValid() )
     return false;
 
   if( !isValid() )
     return false;
 
-  if ( mySMESHGUI->isActiveStudyLocked() || myBusy || !IsValid() )
+  if ( SMESHGUI::isStudyLocked() || myBusy || !IsValid() )
     return false;
 
   BusyLocker lock( myBusy );
     return false;
 
   BusyLocker lock( myBusy );
index aac578ba22440c023b86bdbc78fd84907d199f1c..0cd63352b9c86ce79a25a0f6561459fda6ef0c86 100644 (file)
@@ -250,10 +250,7 @@ QString SMESHGUI_BuildCompoundDlg::GetDefaultName(const QString& theOperation)
   QString aName = "";
 
   // collect all object names of SMESH component
   QString aName = "";
 
   // collect all object names of SMESH component
-  SalomeApp_Study* appStudy =
-    dynamic_cast<SalomeApp_Study*>( SUIT_Session::session()->activeApplication()->activeStudy() );
-  if ( !appStudy ) return aName;
-  _PTR(Study) aStudy = appStudy->studyDS();
+  _PTR(Study) aStudy = SMESH::getStudy();
 
   std::set<std::string> aSet;
   _PTR(SComponent) aMeshCompo (aStudy->FindComponent("SMESH"));
 
   std::set<std::string> aSet;
   _PTR(SComponent) aMeshCompo (aStudy->FindComponent("SMESH"));
@@ -283,7 +280,7 @@ QString SMESHGUI_BuildCompoundDlg::GetDefaultName(const QString& theOperation)
 //=================================================================================
 bool SMESHGUI_BuildCompoundDlg::ClickOnApply()
 {
 //=================================================================================
 bool SMESHGUI_BuildCompoundDlg::ClickOnApply()
 {
-  if (mySMESHGUI->isActiveStudyLocked())
+  if (SMESHGUI::isStudyLocked())
     return false;
 
   if (!isValid())
     return false;
 
   if (!isValid())
@@ -335,7 +332,7 @@ bool SMESHGUI_BuildCompoundDlg::ClickOnApply()
       SMESH::UpdateView();
 
       _PTR(SObject) aSO = SMESH::FindSObject(aMesh.in());
       SMESH::UpdateView();
 
       _PTR(SObject) aSO = SMESH::FindSObject(aMesh.in());
-      if ( SMESH_Actor* anActor = SMESH::CreateActor(aSO->GetStudy(), aSO->GetID().c_str()) ) {
+      if ( SMESH_Actor* anActor = SMESH::CreateActor( aSO->GetID().c_str()) ) {
         SMESH::DisplayActor(SMESH::GetActiveWindow(), anActor);
         SMESH::UpdateView();
       }
         SMESH::DisplayActor(SMESH::GetActiveWindow(), anActor);
         SMESH::UpdateView();
       }
index d7d455b6d79cf5dd58d9cb0247e70e8f802e4cb9..55a87509d6480b73bd28f60640a6244d00e53c2f 100644 (file)
@@ -1068,11 +1068,7 @@ void SMESHGUI_ClippingDlg::updateActorList()
 {
   ActorList->clear();
 
 {
   ActorList->clear();
 
-  SalomeApp_Study* anAppStudy = SMESHGUI::activeStudy();
-  if( !anAppStudy )
-    return;
-
-  _PTR(Study) aStudy = anAppStudy->studyDS();
+  _PTR(Study) aStudy = SMESH::getStudy();
   if( !aStudy )
     return;
 
   if( !aStudy )
     return;
 
index 5a32503a1ae6f702a5a77476fc44675e3a1cbbc8..fa746f19a679bbee85c03ec280dffcb652fd0213 100644 (file)
@@ -379,9 +379,7 @@ namespace SMESH
     _PTR(SObject) so = SMESH::FindSObject(aMainShape);
     if ( subShapeID == 1 || !so )
       return so;
     _PTR(SObject) so = SMESH::FindSObject(aMainShape);
     if ( subShapeID == 1 || !so )
       return so;
-    _PTR(ChildIterator) it;
-    if (_PTR(Study) study = SMESH::GetActiveStudyDocument())
-      it =  study->NewChildIterator(so);
+    _PTR(ChildIterator) it = SMESH::getStudy()->NewChildIterator(so);
     _PTR(SObject) subSO;
     if ( it ) {
       for ( it->InitEx(true); !subSO && it->More(); it->Next() ) {
     _PTR(SObject) subSO;
     if ( it ) {
       for ( it->InitEx(true); !subSO && it->More(); it->Next() ) {
@@ -927,7 +925,7 @@ void SMESHGUI_BaseComputeOp::computeMesh()
 
     // NPAL16631: if ( !memoryLack )
     {
 
     // NPAL16631: if ( !memoryLack )
     {
-      _PTR(SObject) sobj = SMESH::GetActiveStudyDocument()->FindObjectID(myIObject->getEntry());
+      _PTR(SObject) sobj = SMESH::getStudy()->FindObjectID(myIObject->getEntry());
       SMESH::ModifiedMesh( sobj,
                            !computeFailed && aHypErrors.isEmpty(),
                            myMesh->NbNodes() == 0);
       SMESH::ModifiedMesh( sobj,
                            !computeFailed && aHypErrors.isEmpty(),
                            myMesh->NbNodes() == 0);
@@ -998,8 +996,7 @@ void SMESHGUI_BaseComputeOp::computeMesh()
               {
                 toDisplay = true;
                 SMESH_Actor *anActor = SMESH::FindActorByObject( aMesh );
               {
                 toDisplay = true;
                 SMESH_Actor *anActor = SMESH::FindActorByObject( aMesh );
-                if ( !anActor ) anActor = SMESH::CreateActor( (*anIter).second->GetStudy(),
-                                                              (*anIter).second->GetID().c_str(),
+                if ( !anActor ) anActor = SMESH::CreateActor( (*anIter).second->GetID().c_str(),
                                                               /*clearLog =*/ true );
                 if ( anActor ) // actor is not created for an empty mesh
                 {
                                                               /*clearLog =*/ true );
                 if ( anActor ) // actor is not created for an empty mesh
                 {
@@ -1267,7 +1264,6 @@ void SMESHGUI_BaseComputeOp::stopOperation()
 void SMESHGUI_BaseComputeOp::onPublishShape()
 {
   GEOM::GEOM_Gen_var      geomGen = SMESH::GetGEOMGen();
 void SMESHGUI_BaseComputeOp::onPublishShape()
 {
   GEOM::GEOM_Gen_var      geomGen = SMESH::GetGEOMGen();
-  SALOMEDS::Study_var       study = SMESHGUI::GetSMESHGen()->GetCurrentStudy();
   GEOM::GEOM_Object_var meshShape = myMesh->GetShapeToMesh();
 
   QStringList entryList;
   GEOM::GEOM_Object_var meshShape = myMesh->GetShapeToMesh();
 
   QStringList entryList;
@@ -1283,7 +1279,7 @@ void SMESHGUI_BaseComputeOp::onPublishShape()
       if ( !SMESH::getSubShapeSO( 1, myMainShape )) // the main shape not published
       {
         QString name = GEOMBase::GetDefaultName( SMESH::shapeTypeName( myMainShape, "MAIN_SHAPE" ));
       if ( !SMESH::getSubShapeSO( 1, myMainShape )) // the main shape not published
       {
         QString name = GEOMBase::GetDefaultName( SMESH::shapeTypeName( myMainShape, "MAIN_SHAPE" ));
-        SALOMEDS::SObject_wrap so = geomGen->AddInStudy( study, myMainShape,
+        SALOMEDS::SObject_wrap so = geomGen->AddInStudy( myMainShape,
                                                          name.toLatin1().data(),
                                                          GEOM::GEOM_Object::_nil());
         // look for myMainShape in the table
                                                          name.toLatin1().data(),
                                                          GEOM::GEOM_Object::_nil());
         // look for myMainShape in the table
@@ -1302,7 +1298,7 @@ void SMESHGUI_BaseComputeOp::onPublishShape()
         if ( curSub == 1 ) continue;
       }
       QString name = GEOMBase::GetDefaultName( SMESH::shapeTypeName( shape, "ERROR_SHAPE" ));
         if ( curSub == 1 ) continue;
       }
       QString name = GEOMBase::GetDefaultName( SMESH::shapeTypeName( shape, "ERROR_SHAPE" ));
-      SALOMEDS::SObject_wrap so = geomGen->AddInStudy( study, shape,
+      SALOMEDS::SObject_wrap so = geomGen->AddInStudy( shape,
                                                        name.toLatin1().data(), myMainShape);
       if ( !so->_is_nil() ) {
         CORBA::String_var name  = so->GetName();
                                                        name.toLatin1().data(), myMainShape);
       if ( !so->_is_nil() ) {
         CORBA::String_var name  = so->GetName();
@@ -1743,7 +1739,7 @@ void SMESHGUI_PrecomputeOp::initDialog()
   QList<int> modes;
 
   QMap<int, int> modeMap;
   QList<int> modes;
 
   QMap<int, int> modeMap;
-  _PTR(SObject)  pMesh = studyDS()->FindObjectID( myIObject->getEntry() );
+  _PTR(SObject)  pMesh = SMESH::getStudy()->FindObjectID( myIObject->getEntry() );
   getAssignedAlgos( pMesh, modeMap );
   if ( modeMap.contains( SMESH::DIM_3D ) )
   {
   getAssignedAlgos( pMesh, modeMap );
   if ( modeMap.contains( SMESH::DIM_3D ) )
   {
@@ -1786,8 +1782,7 @@ void SMESHGUI_PrecomputeOp::getAssignedAlgos(_PTR(SObject)  theMesh,
   int aPart = SMESH::Tag_RefOnAppliedAlgorithms;
   if ( theMesh->FindSubObject( aPart, aHypFolder ))
   {
   int aPart = SMESH::Tag_RefOnAppliedAlgorithms;
   if ( theMesh->FindSubObject( aPart, aHypFolder ))
   {
-    _PTR(ChildIterator) anIter =
-      SMESH::GetActiveStudyDocument()->NewChildIterator( aHypFolder );
+    _PTR(ChildIterator) anIter = SMESH::getStudy()->NewChildIterator( aHypFolder );
     for ( ; anIter->More(); anIter->Next() )
     {
       _PTR(SObject) anObj = anIter->Value();
     for ( ; anIter->More(); anIter->Next() )
     {
       _PTR(SObject) anObj = anIter->Value();
@@ -1830,8 +1825,7 @@ void SMESHGUI_PrecomputeOp::getAssignedAlgos(_PTR(SObject)  theMesh,
     if ( !theMesh->FindSubObject( aPart, aHypFolder ))
       continue;
 
     if ( !theMesh->FindSubObject( aPart, aHypFolder ))
       continue;
 
-    _PTR(ChildIterator) anIter =
-      SMESH::GetActiveStudyDocument()->NewChildIterator( aHypFolder );
+    _PTR(ChildIterator) anIter = SMESH::getStudy()->NewChildIterator( aHypFolder );
     for ( anIter->InitEx(true); anIter->More(); anIter->Next() )
     {
       _PTR(SObject) anObj = anIter->Value();
     for ( anIter->InitEx(true); anIter->More(); anIter->Next() )
     {
       _PTR(SObject) anObj = anIter->Value();
index 3afa881c15178f5b4a3e82a8ed7b627e900d95e9..b412f118decabcaab2c3ad1fec4dcec414ee4313 100644 (file)
@@ -129,7 +129,7 @@ void SMESHGUI_ConvToQuadOp::selectionDone()
   try
   {
     QString anObjEntry = myDlg->selectedObject( 0 );
   try
   {
     QString anObjEntry = myDlg->selectedObject( 0 );
-    _PTR(SObject) pObj = studyDS()->FindObjectID( anObjEntry.toLatin1().data() );
+    _PTR(SObject) pObj = SMESH::getStudy()->FindObjectID( anObjEntry.toLatin1().data() );
     if ( !pObj ) return;
 
     SMESH::SMESH_IDSource_var idSource = 
     if ( !pObj ) return;
 
     SMESH::SMESH_IDSource_var idSource = 
@@ -204,7 +204,7 @@ bool SMESHGUI_ConvToQuadOp::onApply()
   QString aMess;
 
   QString anObjEntry = myDlg->selectedObject( 0 );
   QString aMess;
 
   QString anObjEntry = myDlg->selectedObject( 0 );
-  _PTR(SObject) pObj = studyDS()->FindObjectID( anObjEntry.toLatin1().data() );
+  _PTR(SObject) pObj = SMESH::getStudy()->FindObjectID( anObjEntry.toLatin1().data() );
   if ( !pObj )
   {
     dlg()->show();
   if ( !pObj )
   {
     dlg()->show();
@@ -382,7 +382,7 @@ SMESHGUI_ConvToQuadOp::DestinationMesh( const SMESH::SMESH_IDSource_var& idSourc
 void SMESHGUI_ConvToQuadOp::ConnectRadioButtons( int id )
 {
   QString anObjEntry = myDlg->selectedObject( 0 );
 void SMESHGUI_ConvToQuadOp::ConnectRadioButtons( int id )
 {
   QString anObjEntry = myDlg->selectedObject( 0 );
-  _PTR(SObject) pObj = studyDS()->FindObjectID( anObjEntry.toLatin1().data() );
+  _PTR(SObject) pObj = SMESH::getStudy()->FindObjectID( anObjEntry.toLatin1().data() );
   if ( !pObj ) return;
 
   SMESH::SMESH_IDSource_var idSource = 
   if ( !pObj ) return;
 
   SMESH::SMESH_IDSource_var idSource = 
index 0fc5aef49ba59fd75f94e995ff9e4a20ef7ee09d..b6609fcff170f51dbd081d3852524135d9223d89 100644 (file)
@@ -303,7 +303,7 @@ void SMESHGUI_CopyMeshDlg::Init (bool ResetControls)
 
 bool SMESHGUI_CopyMeshDlg::ClickOnApply()
 {
 
 bool SMESHGUI_CopyMeshDlg::ClickOnApply()
 {
-  if (mySMESHGUI->isActiveStudyLocked())
+  if (SMESHGUI::isStudyLocked())
     return false;
 
   if( !isValid() )
     return false;
 
   if( !isValid() )
index e938f0667250f9a48878ba630d0ebf2b9ae07f7d..38f64d2ad93ae9a334323a1e19e2e3a7ec0c6bde 100644 (file)
@@ -448,7 +448,7 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::ClickOnApply()
   if( !isValid() )
     return;
 
   if( !isValid() )
     return;
 
-  if ( myNbOkElements>0 && !mySMESHGUI->isActiveStudyLocked())
+  if ( myNbOkElements>0 && !SMESHGUI::isStudyLocked())
     {
       if(checkEditLine(false) == -1) {return;}
       busy = true;
     {
       if(checkEditLine(false) == -1) {return;}
       busy = true;
index 7711022c36f3a4372bbb18b3aecb12cac125cac7..6f589a9a0e42c5bd7568036fab40709e6c3f8bc9 100644 (file)
@@ -194,7 +194,7 @@ bool SMESHGUI_DeleteGroupDlg::isValid()
     return false;
   }
 
     return false;
   }
 
-  return !mySMESHGUI->isActiveStudyLocked();
+  return !SMESHGUI::isStudyLocked();
 }
 
 //=================================================================================
 }
 
 //=================================================================================
index 14088fe1a169614ce010ba1a9fd6c30ca7aa91ac..fd673c22a2ba68d98f2ef6549fd71bf674f77987 100644 (file)
@@ -233,8 +233,7 @@ void SMESHGUI_DisplayEntitiesDlg::onOk()
   const char* entry = myIObject->getEntry();
   
   if ( !myActor ) {
   const char* entry = myIObject->getEntry();
   
   if ( !myActor ) {
-    myActor = SMESH::CreateActor(SMESH::GetActiveStudyDocument(), 
-                                 entry, true);
+    myActor = SMESH::CreateActor(entry, true);
   }
 
   if( myEntityMode != myActor->GetEntityMode() ) {
   }
 
   if( myEntityMode != myActor->GetEntityMode() ) {
index 6fa1ee65c890bcd55e362321a7c2965725f447e5..633d9196abbb7570e76281e887a010e33ca567a0 100644 (file)
@@ -68,7 +68,7 @@ SALOME_Prs* SMESHGUI_Displayer::buildPresentation( const QString& entry, SALOME_
       SUIT_ViewWindow* wnd = vtk_viewer->getViewManager()->getActiveView();
       SMESH_Actor* anActor = SMESH::FindActorByEntry( wnd, entry.toLatin1().data() );
       if( !anActor )
       SUIT_ViewWindow* wnd = vtk_viewer->getViewManager()->getActiveView();
       SMESH_Actor* anActor = SMESH::FindActorByEntry( wnd, entry.toLatin1().data() );
       if( !anActor )
-        anActor = SMESH::CreateActor( study()->studyDS(), entry.toLatin1().data(), true );
+        anActor = SMESH::CreateActor( entry.toLatin1().data(), true );
       if( anActor )
       {
         SMESH::DisplayActor( wnd, anActor );
       if( anActor )
       {
         SMESH::DisplayActor( wnd, anActor );
@@ -94,12 +94,7 @@ bool SMESHGUI_Displayer::canBeDisplayed( const QString& entry, const QString& vi
   if(viewer_type != SVTK_Viewer::Type())
     return res;
   
   if(viewer_type != SVTK_Viewer::Type())
     return res;
   
-  SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( myApp->activeStudy() );
-  if( !study )
-    return res;
-  
-  
-  _PTR(SObject) obj = study->studyDS()->FindObjectID( (const char*)entry.toLatin1() );
+  _PTR(SObject) obj = SMESH::getStudy()->FindObjectID( (const char*)entry.toLatin1() );
   CORBA::Object_var anObj = SMESH::SObjectToObject( obj );
   
     /*
   CORBA::Object_var anObj = SMESH::SObjectToObject( obj );
   
     /*
index 297a85d47dba5cfbcbc5125142cdc8d0796e722b..0eb48be8378e641ea1cc7d896db40f1befad5585 100644 (file)
@@ -395,7 +395,7 @@ void SMESHGUI_DuplicateNodesDlg::onConstructorsClicked (int constructorId)
 */
 bool SMESHGUI_DuplicateNodesDlg::onApply()
 {
 */
 bool SMESHGUI_DuplicateNodesDlg::onApply()
 {
-  if ( mySMESHGUI->isActiveStudyLocked() || !isValid() )
+  if ( SMESHGUI::isStudyLocked() || !isValid() )
     return false;
 
   BusyLocker lock( myBusy );
     return false;
 
   BusyLocker lock( myBusy );
index 9b6ce1843a433aec2cd615b149e4feafcd3c4d87..417d1f803f4a813800dca173f6df50f98a9948aa 100644 (file)
@@ -394,7 +394,7 @@ void SMESHGUI_ExtrusionAlongPathDlg::CheckIsEnable()
 //=================================================================================
 bool SMESHGUI_ExtrusionAlongPathDlg::ClickOnApply()
 {
 //=================================================================================
 bool SMESHGUI_ExtrusionAlongPathDlg::ClickOnApply()
 {
-  if (mySMESHGUI->isActiveStudyLocked())
+  if (SMESHGUI::isStudyLocked())
     return false;
 
   if ( !SelectorWdg->IsAnythingSelected() || myPath->_is_nil() )
     return false;
 
   if ( !SelectorWdg->IsAnythingSelected() || myPath->_is_nil() )
index 205544cfa0993ba688f3dfd69a386640774a7525..7a37a17158400f98af2d3fad2914c06d2a20197e 100644 (file)
@@ -1092,7 +1092,7 @@ void SMESHGUI_ExtrusionDlg::ClickOnRadio()
 
 bool SMESHGUI_ExtrusionDlg::ClickOnApply()
 {
 
 bool SMESHGUI_ExtrusionDlg::ClickOnApply()
 {
-  if (mySMESHGUI->isActiveStudyLocked())
+  if (SMESHGUI::isStudyLocked())
     return false;
 
   if (!isValid())
     return false;
 
   if (!isValid())
index 8b060f647c19d1c999e820f0673fac252cc3aeaf..7ab25ef53d2fcc21494496e5779e51e3e94ea6f6 100644 (file)
@@ -92,9 +92,8 @@ GetAllFeilds(const QList< QPair< SMESH::SMESH_IDSource_var, QString > >& meshes,
   myFields = & fields;
   myTree->clear();
   
   myFields = & fields;
   myTree->clear();
   
-  _PTR(Study) study = SMESH::GetActiveStudyDocument();
   GEOM::GEOM_Gen_var geomGen = SMESH::GetGEOMGen();
   GEOM::GEOM_Gen_var geomGen = SMESH::GetGEOMGen();
-  GEOM::GEOM_IFieldOperations_wrap fieldOp = geomGen->GetIFieldOperations( study->StudyId() );
+  GEOM::GEOM_IFieldOperations_wrap fieldOp = geomGen->GetIFieldOperations();
 
   for ( int iM = 0; iM < meshes.count(); ++iM )
   {
 
   for ( int iM = 0; iM < meshes.count(); ++iM )
   {
index 4e7f6bf5ff91f1fb827ca8e6f3a2088478e904ae..00fdedfaedad522da9aa3941c9b953b391bb39c2 100755 (executable)
@@ -1369,8 +1369,7 @@ void SMESHGUI_FilterTable::SetCriterion (const int                       theRow,
   {
     if ( strlen( theCriterion.ThresholdID ) > 0 ) // shape ID -> name
     {
   {
     if ( strlen( theCriterion.ThresholdID ) > 0 ) // shape ID -> name
     {
-      _PTR(SObject) sobj =
-        SMESH::GetActiveStudyDocument()->FindObjectID( theCriterion.ThresholdID.in() );
+      _PTR(SObject) sobj = SMESH::getStudy()->FindObjectID( theCriterion.ThresholdID.in() );
       if ( !sobj )
         aTable->item( theRow, 2 )->setText( QString( theCriterion.ThresholdID ) );
       else
       if ( !sobj )
         aTable->item( theRow, 2 )->setText( QString( theCriterion.ThresholdID ) );
       else
@@ -3195,8 +3194,7 @@ bool SMESHGUI_FilterDlg::isValid() const
       QString aName;
       myTable->GetThreshold(i, aName);
 
       QString aName;
       myTable->GetThreshold(i, aName);
 
-      std::vector<_PTR(SObject)> aList =
-        SMESH::GetActiveStudyDocument()->FindObjectByName(aName.toLatin1().constData(), "GEOM");
+      std::vector<_PTR(SObject)> aList = SMESH::getStudy()->FindObjectByName(aName.toLatin1().constData(), "GEOM");
       if (aList.size() == 0) {
         SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_INSUFFICIENT_DATA"),
                                      tr("BAD_SHAPE_NAME").arg(aName));
       if (aList.size() == 0) {
         SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_INSUFFICIENT_DATA"),
                                      tr("BAD_SHAPE_NAME").arg(aName));
index 5ec69fed3974685b0e6d6e8cefec956a777e021c..a23d80aa330af5e6685a294cc48c8add33c50edd 100644 (file)
@@ -495,7 +495,7 @@ void SMESHGUI_FindElemByPointOp::onSelectionDone()
     if (aList.Extent() == 1 && aList.First()->hasEntry())
     {
       Handle(SALOME_InteractiveObject) anIO = aList.First();
     if (aList.Extent() == 1 && aList.First()->hasEntry())
     {
       Handle(SALOME_InteractiveObject) anIO = aList.First();
-      _PTR(SObject) pObj = studyDS()->FindObjectID(anIO->getEntry());
+      _PTR(SObject) pObj = SMESH::getStudy()->FindObjectID(anIO->getEntry());
       CORBA::Object_var anObj = SMESH::IObjectToObject( anIO );
       newMeshEntry = anIO->getEntry();
       SMESH::SMESH_IDSource_var aMeshOrPart = SMESH::SMESH_IDSource::_narrow(anObj);
       CORBA::Object_var anObj = SMESH::IObjectToObject( anIO );
       newMeshEntry = anIO->getEntry();
       SMESH::SMESH_IDSource_var aMeshOrPart = SMESH::SMESH_IDSource::_narrow(anObj);
index 974b54ff88e1b17e6cae96b89332c9a59d62bcaa..5367420060850c3a9f8e3d8bada1c2cdd4261f5d 100644 (file)
@@ -93,11 +93,7 @@ namespace SMESH
     if ( !aMeshShape->_is_nil() )
       return aMeshShape;
 
     if ( !aMeshShape->_is_nil() )
       return aMeshShape;
 
-    _PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
-    if (!aStudy)
-      return aMeshShape;
-
-    _PTR(ChildIterator) anIter (aStudy->NewChildIterator(theSO));
+    _PTR(ChildIterator) anIter (SMESH::getStudy()->NewChildIterator(theSO));
     for ( ; anIter->More(); anIter->Next()) {
       _PTR(SObject) aSObject = anIter->Value();
       _PTR(SObject) aRefSOClient;
     for ( ; anIter->More(); anIter->Next()) {
       _PTR(SObject) aSObject = anIter->Value();
       _PTR(SObject) aRefSOClient;
@@ -120,11 +116,7 @@ namespace SMESH
     if (!smeshSO)
       return 0;
 
     if (!smeshSO)
       return 0;
 
-    _PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
-    if (!aStudy)
-      return 0;
-
-    _PTR(ChildIterator) anIter (aStudy->NewChildIterator( smeshSO ));
+    _PTR(ChildIterator) anIter (SMESH::getStudy()->NewChildIterator( smeshSO ));
     for ( ; anIter->More(); anIter->Next()) {
       _PTR(SObject) aSObject = anIter->Value();
       _PTR(SObject) aRefSOClient;
     for ( ; anIter->More(); anIter->Next()) {
       _PTR(SObject) aSObject = anIter->Value();
       _PTR(SObject) aRefSOClient;
@@ -153,11 +145,10 @@ namespace SMESH
                                      long                  theID)
   {
     GEOM::GEOM_Gen_var geomGen = SMESH::GetGEOMGen();
                                      long                  theID)
   {
     GEOM::GEOM_Gen_var geomGen = SMESH::GetGEOMGen();
-    _PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
-    if (!aStudy || geomGen->_is_nil())
+    if (geomGen->_is_nil())
       return GEOM::GEOM_Object::_nil();
     GEOM::GEOM_IShapesOperations_wrap aShapesOp =
       return GEOM::GEOM_Object::_nil();
     GEOM::GEOM_IShapesOperations_wrap aShapesOp =
-      geomGen->GetIShapesOperations(aStudy->StudyId());
+      geomGen->GetIShapesOperations();
     if (aShapesOp->_is_nil())
       return GEOM::GEOM_Object::_nil();
     GEOM::GEOM_Object_wrap subShape = aShapesOp->GetSubShape (theMainShape,theID);
     if (aShapesOp->_is_nil())
       return GEOM::GEOM_Object::_nil();
     GEOM::GEOM_Object_wrap subShape = aShapesOp->GetSubShape (theMainShape,theID);
@@ -183,10 +174,7 @@ namespace SMESH
     meshGeom.clear();
     if ( hypIO.IsNull() ) return false;
 
     meshGeom.clear();
     if ( hypIO.IsNull() ) return false;
 
-    _PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
-    if ( !aStudy ) return false;
-
-    _PTR(SObject) hypSO = aStudy->FindObjectID( hypIO->getEntry() );
+    _PTR(SObject) hypSO = SMESH::getStudy()->FindObjectID( hypIO->getEntry() );
     if ( !hypSO ) return false;
 
     // Depth() is a number of fathers
     if ( !hypSO ) return false;
 
     // Depth() is a number of fathers
index c7d806b7da09362543e0ff236a00ef96c5072eb5..ce7f8b88af92956310cc239b856e2920d0f1cefa 100644 (file)
@@ -498,10 +498,7 @@ QString SMESHGUI_GroupDlg::GetDefaultName(const QString& theOperation)
   QString aName = "";
 
   // collect all object names of SMESH component
   QString aName = "";
 
   // collect all object names of SMESH component
-  SalomeApp_Study* appStudy =
-    dynamic_cast<SalomeApp_Study*>( SUIT_Session::session()->activeApplication()->activeStudy() );
-  if ( !appStudy ) return aName;
-  _PTR(Study) aStudy = appStudy->studyDS();
+  _PTR(Study) aStudy = SMESH::getStudy();
 
   std::set<std::string> aSet;
   _PTR(SComponent) aMeshCompo (aStudy->FindComponent( "SMESH" ));
 
   std::set<std::string> aSet;
   _PTR(SComponent) aMeshCompo (aStudy->FindComponent( "SMESH" ));
@@ -528,14 +525,13 @@ QString SMESHGUI_GroupDlg::GetDefaultName(const QString& theOperation)
 void  SMESHGUI_GroupDlg::setDefaultName() const
 {
   QString aResName;
 void  SMESHGUI_GroupDlg::setDefaultName() const
 {
   QString aResName;
-  _PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
   int i=1;
   QString aPrefix ="Group_";
   _PTR(SObject) anObj;
   do
   {
     aResName = aPrefix + QString::number( i++ );
   int i=1;
   QString aPrefix ="Group_";
   _PTR(SObject) anObj;
   do
   {
     aResName = aPrefix + QString::number( i++ );
-    anObj = aStudy->FindObject( SMESH::toUtf8(aResName) );
+    anObj = SMESH::getStudy()->FindObject( SMESH::toUtf8(aResName) );
   }
   while ( anObj );
   myName->setText(aResName); 
   }
   while ( anObj );
   myName->setText(aResName); 
@@ -664,7 +660,7 @@ void SMESHGUI_GroupDlg::init (SMESH::SMESH_GroupBase_ptr theGroup,
   else if ( grpType == 1 ) // group on geom
   {
     QString aShapeName( "" );
   else if ( grpType == 1 ) // group on geom
   {
     QString aShapeName( "" );
-    _PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
+    _PTR(Study) aStudy = SMESH::getStudy();
     GEOM::GEOM_Object_var aGroupShape = myGroupOnGeom->GetShape();
     if (!aGroupShape->_is_nil())
     {
     GEOM::GEOM_Object_var aGroupShape = myGroupOnGeom->GetShape();
     if (!aGroupShape->_is_nil())
     {
@@ -915,7 +911,7 @@ void SMESHGUI_GroupDlg::setSelectionMode (int theMode)
 //=================================================================================
 bool SMESHGUI_GroupDlg::onApply()
 {
 //=================================================================================
 bool SMESHGUI_GroupDlg::onApply()
 {
-  if (mySMESHGUI->isActiveStudyLocked())
+  if (SMESHGUI::isStudyLocked())
     return false;
 
   if (myName->text().trimmed().isEmpty())
     return false;
 
   if (myName->text().trimmed().isEmpty())
@@ -1050,7 +1046,7 @@ bool SMESHGUI_GroupDlg::onApply()
       if (myMesh->_is_nil() || !myGeomObjects->length())
         return false;
 
       if (myMesh->_is_nil() || !myGeomObjects->length())
         return false;
 
-      _PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
+      _PTR(Study) aStudy = SMESH::getStudy();
 
       if (myGeomObjects->length() == 1) {
         myGroupOnGeom = myMesh->CreateGroupFromGEOM(aType,
 
       if (myGeomObjects->length() == 1) {
         myGroupOnGeom = myMesh->CreateGroupFromGEOM(aType,
@@ -1064,12 +1060,11 @@ bool SMESHGUI_GroupDlg::onApply()
 
         // create a geometry group
         GEOM::GEOM_Gen_var geomGen = SMESH::GetGEOMGen();
 
         // create a geometry group
         GEOM::GEOM_Gen_var geomGen = SMESH::GetGEOMGen();
-        _PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
 
 
-        if (geomGen->_is_nil() || !aStudy)
+        if (geomGen->_is_nil())
           return false;
 
           return false;
 
-        GEOM::GEOM_IGroupOperations_wrap op = geomGen->GetIGroupOperations(aStudy->StudyId());
+        GEOM::GEOM_IGroupOperations_wrap op = geomGen->GetIGroupOperations();
         if (op->_is_nil())
           return false;
 
         if (op->_is_nil())
           return false;
 
@@ -1095,7 +1090,7 @@ bool SMESHGUI_GroupDlg::onApply()
           QString aNewGeomGroupName ( "Auto_group_for_" );
           aNewGeomGroupName += myName->text();
           SALOMEDS::SObject_var aNewGroupSO =
           QString aNewGeomGroupName ( "Auto_group_for_" );
           aNewGeomGroupName += myName->text();
           SALOMEDS::SObject_var aNewGroupSO =
-            geomGen->AddInStudy(aSMESHGen->GetCurrentStudy(), aGroupVar,
+            geomGen->AddInStudy(aGroupVar,
                                 SMESH::toUtf8(aNewGeomGroupName), aMeshShape);
         }
 
                                 SMESH::toUtf8(aNewGeomGroupName), aMeshShape);
         }
 
@@ -1412,13 +1407,12 @@ void SMESHGUI_GroupDlg::onObjectSelectionChanged()
           continue;
 
         // Check if group constructed on the same shape as a mesh or on its child
           continue;
 
         // Check if group constructed on the same shape as a mesh or on its child
-        _PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
 
         // The main shape of the group
         GEOM::GEOM_Object_var aGroupMainShape;
         if (aGeomGroup->GetType() == 37) {
           GEOM::GEOM_IGroupOperations_wrap anOp =
 
         // The main shape of the group
         GEOM::GEOM_Object_var aGroupMainShape;
         if (aGeomGroup->GetType() == 37) {
           GEOM::GEOM_IGroupOperations_wrap anOp =
-            SMESH::GetGEOMGen()->GetIGroupOperations(aStudy->StudyId());
+            SMESH::GetGEOMGen()->GetIGroupOperations();
           aGroupMainShape = anOp->GetMainShape(aGeomGroup);
           // aGroupMainShape is an existing servant => GEOM_Object_var not GEOM_Object_wrap
         }
           aGroupMainShape = anOp->GetMainShape(aGeomGroup);
           // aGroupMainShape is an existing servant => GEOM_Object_var not GEOM_Object_wrap
         }
@@ -1427,7 +1421,7 @@ void SMESHGUI_GroupDlg::onObjectSelectionChanged()
           aGroupMainShape->Register();
         }
         _PTR(SObject) aGroupMainShapeSO =
           aGroupMainShape->Register();
         }
         _PTR(SObject) aGroupMainShapeSO =
-          aStudy->FindObjectID(aGroupMainShape->GetStudyEntry());
+          SMESH::getStudy()->FindObjectID(aGroupMainShape->GetStudyEntry());
 
         _PTR(SObject) anObj, aRef;
         bool isRefOrSubShape = false;
 
         _PTR(SObject) anObj, aRef;
         bool isRefOrSubShape = false;
@@ -2006,9 +2000,8 @@ void SMESHGUI_GroupDlg::onAdd()
     onListSelectionChanged();
 
   } else if (myCurrentLineEdit == myGeomGroupLine && myGeomObjects->length() == 1) {
     onListSelectionChanged();
 
   } else if (myCurrentLineEdit == myGeomGroupLine && myGeomObjects->length() == 1) {
-    _PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
     GEOM::GEOM_IGroupOperations_wrap aGroupOp =
     GEOM::GEOM_IGroupOperations_wrap aGroupOp =
-      SMESH::GetGEOMGen()->GetIGroupOperations(aStudy->StudyId());
+      SMESH::GetGEOMGen()->GetIGroupOperations();
 
     SMESH::ElementType aGroupType = SMESH::ALL;
     switch(aGroupOp->GetType(myGeomObjects[0])) {
 
     SMESH::ElementType aGroupType = SMESH::ALL;
     switch(aGroupOp->GetType(myGeomObjects[0])) {
@@ -2021,8 +2014,8 @@ void SMESHGUI_GroupDlg::onAdd()
 
     if (aGroupType == aType) {
       _PTR(SObject) aGroupSO =
 
     if (aGroupType == aType) {
       _PTR(SObject) aGroupSO =
-        //aStudy->FindObjectIOR(aStudy->ConvertObjectToIOR(myGeomGroup));
-        aStudy->FindObjectID(myGeomObjects[0]->GetStudyEntry());
+        //SMESH::getStudy()->FindObjectIOR(SMESH::getStudy()->ConvertObjectToIOR(myGeomGroup));
+        SMESH::getStudy()->FindObjectID(myGeomObjects[0]->GetStudyEntry());
       // Construct filter
       SMESH::FilterManager_var aFilterMgr = SMESH::GetFilterManager();
       SMESH::Filter_var aFilter = aFilterMgr->CreateFilter();
       // Construct filter
       SMESH::FilterManager_var aFilterMgr = SMESH::GetFilterManager();
       SMESH::Filter_var aFilter = aFilterMgr->CreateFilter();
@@ -2454,8 +2447,7 @@ void SMESHGUI_GroupDlg::onPublishShapeByMeshDlg(SUIT_Operation* op)
     if ( !aGeomVar->_is_nil() )
     {
       QString ID = aGeomVar->GetStudyEntry();
     if ( !aGeomVar->_is_nil() )
     {
       QString ID = aGeomVar->GetStudyEntry();
-      _PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
-      if ( _PTR(SObject) aGeomSO = aStudy->FindObjectID( ID.toLatin1().data() )) {
+      if ( _PTR(SObject) aGeomSO = SMESH::getStudy()->FindObjectID( ID.toLatin1().data() )) {
         SALOME_ListIO anIOList;
         Handle(SALOME_InteractiveObject) anIO = new SALOME_InteractiveObject
           ( aGeomSO->GetID().c_str(), "SMESH", aGeomSO->GetName().c_str() );
         SALOME_ListIO anIOList;
         Handle(SALOME_InteractiveObject) anIO = new SALOME_InteractiveObject
           ( aGeomSO->GetID().c_str(), "SMESH", aGeomSO->GetName().c_str() );
index dc1461cda8159a93ab2669695854a27dc2a2c1f7..aaf5f6801e7816bc65f882f23fd720d2da8bf6dc 100644 (file)
@@ -219,13 +219,12 @@ static SMESH::ElementType elementType(GEOM::GEOM_Object_var geom)
     case GEOM::COMPOUND: break;
     default:             return SMESH::ALL;
     }
     case GEOM::COMPOUND: break;
     default:             return SMESH::ALL;
     }
-    _PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
     GEOM::GEOM_IShapesOperations_wrap aShapeOp =
     GEOM::GEOM_IShapesOperations_wrap aShapeOp =
-      SMESH::GetGEOMGen()->GetIShapesOperations(aStudy->StudyId());
+      SMESH::GetGEOMGen()->GetIShapesOperations();
 
     if ( geom->GetType() == 37 ) { // geom group
       GEOM::GEOM_IGroupOperations_wrap aGroupOp =
 
     if ( geom->GetType() == 37 ) { // geom group
       GEOM::GEOM_IGroupOperations_wrap aGroupOp =
-        SMESH::GetGEOMGen()->GetIGroupOperations(aStudy->StudyId());
+        SMESH::GetGEOMGen()->GetIGroupOperations();
       if ( !aGroupOp->_is_nil() ) {
         // mainShape is an existing servant => GEOM_Object_var not GEOM_Object_wrap
         GEOM::GEOM_Object_var mainShape = aGroupOp->GetMainShape( geom );
       if ( !aGroupOp->_is_nil() ) {
         // mainShape is an existing servant => GEOM_Object_var not GEOM_Object_wrap
         GEOM::GEOM_Object_var mainShape = aGroupOp->GetMainShape( geom );
@@ -296,11 +295,11 @@ bool SMESHGUI_GroupOnShapeOp::onApply()
 {
   SUIT_OverrideCursor aWaitCursor;
 
 {
   SUIT_OverrideCursor aWaitCursor;
 
-  if (isStudyLocked())
+  if (SMESHGUI::isStudyLocked())
     return false;
 
   // study
     return false;
 
   // study
-  _PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
+  _PTR(Study) aStudy = SMESH::getStudy();
   if ( !aStudy ) return false;
 
   // mesh
   if ( !aStudy ) return false;
 
   // mesh
@@ -460,7 +459,7 @@ void SMESHGUI_GroupOnShapeOp::selectionDone()
   QStringList goodNames, goodIds;
   if (nbSelected > 0) {
     // study
   QStringList goodNames, goodIds;
   if (nbSelected > 0) {
     // study
-    if (_PTR(Study) aStudy = SMESH::GetActiveStudyDocument()) {
+    if (_PTR(Study) aStudy = SMESH::getStudy()) {
       // mesh
       if (_PTR(SObject)  meshSO = aStudy->FindObjectID( myMeshID.toLatin1().data() )) {
         // shape to mesh
       // mesh
       if (_PTR(SObject)  meshSO = aStudy->FindObjectID( myMeshID.toLatin1().data() )) {
         // shape to mesh
index 915933dc40e028d5e138cbc5b3c2133f0a8a940d..b4084b6655b391f4cf23e1a6d91dbff3b7e09e78 100644 (file)
@@ -629,7 +629,7 @@ void SMESHGUI_UnionGroupsDlg::reset()
 */
 bool SMESHGUI_UnionGroupsDlg::onApply()
 {
 */
 bool SMESHGUI_UnionGroupsDlg::onApply()
 {
-  if ( getSMESHGUI()->isActiveStudyLocked())
+  if ( SMESHGUI::isStudyLocked())
     return false;
 
   // Verify validity of group name
     return false;
 
   // Verify validity of group name
@@ -738,7 +738,7 @@ void SMESHGUI_IntersectGroupsDlg::reset()
 */
 bool SMESHGUI_IntersectGroupsDlg::onApply()
 {
 */
 bool SMESHGUI_IntersectGroupsDlg::onApply()
 {
-  if ( getSMESHGUI()->isActiveStudyLocked())
+  if ( SMESHGUI::isStudyLocked())
     return false;
 
   // Verify validity of group name
     return false;
 
   // Verify validity of group name
@@ -898,7 +898,7 @@ void SMESHGUI_CutGroupsDlg::reset()
 */
 bool SMESHGUI_CutGroupsDlg::onApply()
 {
 */
 bool SMESHGUI_CutGroupsDlg::onApply()
 {
-  if ( getSMESHGUI()->isActiveStudyLocked())
+  if ( SMESHGUI::isStudyLocked())
     return false;
 
   // Verify validity of group name
     return false;
 
   // Verify validity of group name
@@ -1088,7 +1088,7 @@ void SMESHGUI_DimGroupDlg::setElementType( const SMESH::ElementType& theElemType
 */
 bool SMESHGUI_DimGroupDlg::onApply()
 {
 */
 bool SMESHGUI_DimGroupDlg::onApply()
 {
-  if ( getSMESHGUI()->isActiveStudyLocked())
+  if ( SMESHGUI::isStudyLocked())
     return false;
 
   // Verify validity of group name
     return false;
 
   // Verify validity of group name
index f313c8ce2cba016f685848be11629ca21aec2226..bbb79cfe37e233e780e26c3fdc47f52d0e42e886 100644 (file)
@@ -213,7 +213,7 @@ QFrame* SMESHGUI_GenericHypothesisCreator::buildStdFrame()
       case QVariant::String:
         {
           if((*anIt).isVariable) {
       case QVariant::String:
         {
           if((*anIt).isVariable) {
-            _PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
+            _PTR(Study) aStudy = SMESH::getStudy();
             QString aVar = (*anIt).myValue.toString();
             if(aStudy->IsInteger(aVar.toLatin1().constData())){
               SalomeApp_IntSpinBox* sb = new SalomeApp_IntSpinBox( GroupC1 );
             QString aVar = (*anIt).myValue.toString();
             if(aStudy->IsInteger(aVar.toLatin1().constData())){
               SalomeApp_IntSpinBox* sb = new SalomeApp_IntSpinBox( GroupC1 );
@@ -298,7 +298,7 @@ void SMESHGUI_GenericHypothesisCreator::onDialogFinished( int result )
   {
     //remove just created hypothesis
     _PTR(SObject) aHypSObject = SMESH::FindSObject( myHypo );
   {
     //remove just created hypothesis
     _PTR(SObject) aHypSObject = SMESH::FindSObject( myHypo );
-    _PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
+    _PTR(Study) aStudy = SMESH::getStudy();
     if( aStudy && !aStudy->GetProperties()->IsLocked() )
     {
       _PTR(StudyBuilder) aBuilder = aStudy->NewBuilder();
     if( aStudy && !aStudy->GetProperties()->IsLocked() )
     {
       _PTR(StudyBuilder) aBuilder = aStudy->NewBuilder();
index 021e003b93ada81e5b8ac34a605df6fa074364ff..12668b5bf8f983b5a9feb386940a89f52b270cb6 100644 (file)
@@ -701,7 +701,7 @@ namespace SMESH
     SUIT_OverrideCursor wc;
 
     try {
     SUIT_OverrideCursor wc;
 
     try {
-      _PTR(Study) aStudy = GetActiveStudyDocument();
+      _PTR(Study) aStudy = getStudy();
       _PTR(SObject) aHypObj = aStudy->FindObjectID( IObject->getEntry() );
       if( aHypObj )
       {
       _PTR(SObject) aHypObj = aStudy->FindObjectID( IObject->getEntry() );
       if( aHypObj )
       {
@@ -785,8 +785,7 @@ namespace SMESH
     if (!AlgoOrHyp->_is_nil()) {
       _PTR(SObject) SO_Hypothesis = SMESH::FindSObject(AlgoOrHyp);
       if (SO_Hypothesis) {
     if (!AlgoOrHyp->_is_nil()) {
       _PTR(SObject) SO_Hypothesis = SMESH::FindSObject(AlgoOrHyp);
       if (SO_Hypothesis) {
-        SObjectList listSO =
-          SMESHGUI::activeStudy()->studyDS()->FindDependances(SO_Hypothesis);
+        SObjectList listSO = SMESH::getStudy()->FindDependances(SO_Hypothesis);
 
         if(MYDEBUG) MESSAGE("SMESHGUI::GetMeshesUsingAlgoOrHypothesis(): dependency number ="<<listSO.size());
         for (unsigned int i = 0; i < listSO.size(); i++) {
 
         if(MYDEBUG) MESSAGE("SMESHGUI::GetMeshesUsingAlgoOrHypothesis(): dependency number ="<<listSO.size());
         for (unsigned int i = 0; i < listSO.size(); i++) {
index e5eef00dd02ec8317a4a12a67930e1610e68be0a..73c54eb1ca251a616187e101b1ebc48490b97ea8 100644 (file)
@@ -302,8 +302,7 @@ void SMESHGUI_Make2DFrom3DOp::selectionDone()
       bool isMesh = true;
       for ( int i = 0; i < ids.count() && isMesh; ++i )
       {
       bool isMesh = true;
       for ( int i = 0; i < ids.count() && isMesh; ++i )
       {
-        _PTR(SObject) sobj =
-          SMESHGUI::activeStudy()->studyDS()->FindObjectID( ids[i].toLatin1().constData() );
+        _PTR(SObject) sobj = SMESH::getStudy()->FindObjectID( ids[i].toLatin1().constData() );
         mySrcMesh = SMESH::SObjectToInterface<SMESH::SMESH_Mesh>( sobj );  
         //isMesh = !mySrcMesh->_is_nil(); // EAP - it's sometimes necessary to copy to a new mesh
       }
         mySrcMesh = SMESH::SObjectToInterface<SMESH::SMESH_Mesh>( sobj );  
         //isMesh = !mySrcMesh->_is_nil(); // EAP - it's sometimes necessary to copy to a new mesh
       }
@@ -356,7 +355,7 @@ bool SMESHGUI_Make2DFrom3DOp::isValid( QString& msg ) const
     for ( int i = 0; i < entries.count(); ++i )
     {
       SMESH::SMESH_GroupBase_var grp;
     for ( int i = 0; i < entries.count(); ++i )
     {
       SMESH::SMESH_GroupBase_var grp;
-      if ( _PTR(SObject) sobj = SMESHGUI::activeStudy()->studyDS()->FindObjectID( entries[i].toLatin1().constData() ))
+      if ( _PTR(SObject) sobj = SMESH::getStudy()->FindObjectID( entries[i].toLatin1().constData() ))
         grp = SMESH::SObjectToInterface<SMESH::SMESH_GroupBase>( sobj );
       if ( grp->_is_nil() ) {
         msg = tr( "SMESH_NOT_ONLY_GROUPS" );
         grp = SMESH::SObjectToInterface<SMESH::SMESH_GroupBase>( sobj );
       if ( grp->_is_nil() ) {
         msg = tr( "SMESH_NOT_ONLY_GROUPS" );
@@ -370,7 +369,7 @@ bool SMESHGUI_Make2DFrom3DOp::isValid( QString& msg ) const
   for ( int i = 0; i < entries.count(); ++i )
   {
     SMESH::SMESH_IDSource_var idSource;
   for ( int i = 0; i < entries.count(); ++i )
   {
     SMESH::SMESH_IDSource_var idSource;
-    if ( _PTR(SObject) sobj = SMESHGUI::activeStudy()->studyDS()->FindObjectID( entries[i].toLatin1().constData() ))
+    if ( _PTR(SObject) sobj = SMESH::getStudy()->FindObjectID( entries[i].toLatin1().constData() ))
       idSource = SMESH::SObjectToInterface<SMESH::SMESH_IDSource>( sobj );
     if ( !idSource->_is_nil() ) {
       SMESH::array_of_ElementType_var types = idSource->GetTypes();
       idSource = SMESH::SObjectToInterface<SMESH::SMESH_IDSource>( sobj );
     if ( !idSource->_is_nil() ) {
       SMESH::array_of_ElementType_var types = idSource->GetTypes();
@@ -428,8 +427,7 @@ bool SMESHGUI_Make2DFrom3DOp::compute2DMesh( QStringList& theEntryList )
       groups->length( entries.count() );
       for ( int i = 0; i < entries.count(); ++i )
       {
       groups->length( entries.count() );
       for ( int i = 0; i < entries.count(); ++i )
       {
-        _PTR(SObject) sobj =
-          SMESHGUI::activeStudy()->studyDS()->FindObjectID( entries[i].toLatin1().constData() );
+        _PTR(SObject) sobj = SMESH::getStudy()->FindObjectID( entries[i].toLatin1().constData() );
         SMESH::SMESH_IDSource_var grp = SMESH::SObjectToInterface<SMESH::SMESH_IDSource>( sobj );  
         SMESH::array_of_ElementType_var types = grp->GetTypes();
         if ( types->length() < 1 || types[0] != goodType )
         SMESH::SMESH_IDSource_var grp = SMESH::SObjectToInterface<SMESH::SMESH_IDSource>( sobj );  
         SMESH::array_of_ElementType_var types = grp->GetTypes();
         if ( types->length() < 1 || types[0] != goodType )
@@ -482,7 +480,7 @@ bool SMESHGUI_Make2DFrom3DOp::compute2DMesh( QStringList& theEntryList )
 
 bool SMESHGUI_Make2DFrom3DOp::onApply()
 {
 
 bool SMESHGUI_Make2DFrom3DOp::onApply()
 {
-  if ( isStudyLocked() )
+  if ( SMESHGUI::isStudyLocked() )
     return false;
 
   QString msg;
     return false;
 
   QString msg;
index 385bb8f1b95adc6bafe8ef53e340946858e53d8f..cd5a89ff5c3de644c2369612222b06d3cde59c82 100644 (file)
@@ -493,7 +493,7 @@ void SMESHGUI_MakeNodeAtPointOp::stopOperation()
 
 bool SMESHGUI_MakeNodeAtPointOp::onApply()
 {
 
 bool SMESHGUI_MakeNodeAtPointOp::onApply()
 {
-  if( isStudyLocked() )
+  if( SMESHGUI::isStudyLocked() )
     return false;
 
   if ( !myMeshActor ) {
     return false;
 
   if ( !myMeshActor ) {
index 2aba558af7aa5b6a827d67a863e8545462c1a3cf..d25b65970ef32240d3939f6cc4d85ac96475330e 100644 (file)
@@ -511,7 +511,7 @@ void SMESHGUI_MergeDlg::FindGravityCenter(TColStd_MapOfInteger & theElemsIdMap,
 //=================================================================================
 bool SMESHGUI_MergeDlg::ClickOnApply()
 {
 //=================================================================================
 bool SMESHGUI_MergeDlg::ClickOnApply()
 {
-  if (mySMESHGUI->isActiveStudyLocked() || myMesh->_is_nil())
+  if (SMESHGUI::isStudyLocked() || myMesh->_is_nil())
     return false;
 
   try {
     return false;
 
   try {
index 299ba97c0471bfe536fc50f5de4df9bd6ce99d20..610ccc08ca3d60f4ece94066410aeae96ee2f76c 100644 (file)
@@ -3216,12 +3216,6 @@ void SMESHGUI_MeshInfoDlg::showItemInfo( const QString& theStr )
 
 void SMESHGUI_MeshInfoDlg::dump()
 {
 
 void SMESHGUI_MeshInfoDlg::dump()
 {
-  SUIT_Application* app = SUIT_Session::session()->activeApplication();
-  if ( !app ) return;
-  SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study *>( app->activeStudy() );
-  if ( !appStudy ) return;
-  _PTR( Study ) aStudy = appStudy->studyDS();
-
   QStringList aFilters;
   aFilters.append( tr( "TEXT_FILES" ));
 
   QStringList aFilters;
   aFilters.append( tr( "TEXT_FILES" ));
 
@@ -3973,12 +3967,6 @@ void SMESHGUI_CtrlInfoDlg::deactivate()
  */
 void SMESHGUI_CtrlInfoDlg::dump()
 {
  */
 void SMESHGUI_CtrlInfoDlg::dump()
 {
-  SUIT_Application* app = SUIT_Session::session()->activeApplication();
-  if ( !app ) return;
-  SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study *>( app->activeStudy() );
-  if ( !appStudy ) return;
-  _PTR( Study ) aStudy = appStudy->studyDS();
-
   QStringList aFilters;
   aFilters.append( tr( "TEXT_FILES" ));
 
   QStringList aFilters;
   aFilters.append( tr( "TEXT_FILES" ));
 
index 43d92b9fc96c191ae3db98324bbbf30fb1e3a2f5..f9f5ab83ab4fe362ec1f26df2d76926d30d3a309 100644 (file)
@@ -133,7 +133,7 @@ LightApp_Dialog* SMESHGUI_MeshOp::dlg() const
 //================================================================================
 bool SMESHGUI_MeshOp::onApply()
 {
 //================================================================================
 bool SMESHGUI_MeshOp::onApply()
 {
-  if (isStudyLocked())
+  if (SMESHGUI::isStudyLocked())
     return false;
 
   QString aMess;
     return false;
 
   QString aMess;
@@ -227,7 +227,7 @@ void SMESHGUI_MeshOp::startOperation()
   }
   SMESHGUI_SelectionOp::startOperation();
   // iterate through dimensions and get available algorithms, set them to the dialog
   }
   SMESHGUI_SelectionOp::startOperation();
   // iterate through dimensions and get available algorithms, set them to the dialog
-  _PTR(SComponent) aFather = SMESH::GetActiveStudyDocument()->FindComponent( "SMESH" );
+  _PTR(SComponent) aFather = SMESH::getStudy()->FindComponent( "SMESH" );
   for ( int i = SMESH::DIM_0D; i <= SMESH::DIM_3D; i++ )
   {
     SMESHGUI_MeshTab* aTab = myDlg->tab( i );
   for ( int i = SMESH::DIM_0D; i <= SMESH::DIM_3D; i++ )
   {
     SMESHGUI_MeshTab* aTab = myDlg->tab( i );
@@ -329,7 +329,7 @@ bool SMESHGUI_MeshOp::isSubshapeOk() const
 
   // mesh
   QString aMeshEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Mesh );
 
   // mesh
   QString aMeshEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Mesh );
-  _PTR(SObject) pMesh = studyDS()->FindObjectID( aMeshEntry.toLatin1().data() );
+  _PTR(SObject) pMesh = SMESH::getStudy()->FindObjectID( aMeshEntry.toLatin1().data() );
   if (!pMesh) return false;
 
   SMESH::SMESH_Mesh_var mesh = SMESH::SObjectToInterface<SMESH::SMESH_Mesh>( pMesh );
   if (!pMesh) return false;
 
   SMESH::SMESH_Mesh_var mesh = SMESH::SObjectToInterface<SMESH::SMESH_Mesh>( pMesh );
@@ -345,17 +345,16 @@ bool SMESHGUI_MeshOp::isSubshapeOk() const
 
   if (aGEOMs.count() > 0) {
     GEOM::GEOM_Gen_var geomGen = SMESH::GetGEOMGen();
 
   if (aGEOMs.count() > 0) {
     GEOM::GEOM_Gen_var geomGen = SMESH::GetGEOMGen();
-    _PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
-    if (geomGen->_is_nil() || !aStudy) return false;
+    if (geomGen->_is_nil()) return false;
 
 
-    GEOM::GEOM_IGroupOperations_wrap op = geomGen->GetIGroupOperations(aStudy->StudyId());
+    GEOM::GEOM_IGroupOperations_wrap op = geomGen->GetIGroupOperations();
     if (op->_is_nil()) return false;
 
     // check all selected shapes
     QStringList::const_iterator aSubShapesIter = aGEOMs.begin();
     for ( ; aSubShapesIter != aGEOMs.end(); aSubShapesIter++) {
       QString aSubGeomEntry = (*aSubShapesIter);
     if (op->_is_nil()) return false;
 
     // check all selected shapes
     QStringList::const_iterator aSubShapesIter = aGEOMs.begin();
     for ( ; aSubShapesIter != aGEOMs.end(); aSubShapesIter++) {
       QString aSubGeomEntry = (*aSubShapesIter);
-      _PTR(SObject) pSubGeom = studyDS()->FindObjectID(aSubGeomEntry.toLatin1().data());
+      _PTR(SObject) pSubGeom = SMESH::getStudy()->FindObjectID(aSubGeomEntry.toLatin1().data());
       if (!pSubGeom) return false;
 
       GEOM::GEOM_Object_var aSubGeomVar =
       if (!pSubGeom) return false;
 
       GEOM::GEOM_Object_var aSubGeomVar =
@@ -375,7 +374,7 @@ bool SMESHGUI_MeshOp::isSubshapeOk() const
       if ( aSubGeomVar->GetShapeType() == GEOM::COMPOUND )
       {
         // is aSubGeomVar a compound of sub-shapes?
       if ( aSubGeomVar->GetShapeType() == GEOM::COMPOUND )
       {
         // is aSubGeomVar a compound of sub-shapes?
-        GEOM::GEOM_IShapesOperations_wrap sop = geomGen->GetIShapesOperations(aStudy->StudyId());
+        GEOM::GEOM_IShapesOperations_wrap sop = geomGen->GetIShapesOperations();
         if (sop->_is_nil()) return false;
         GEOM::ListOfLong_var ids = sop->GetAllSubShapesIDs( aSubGeomVar,
                                                             GEOM::SHAPE,/*sorted=*/false);
         if (sop->_is_nil()) return false;
         GEOM::ListOfLong_var ids = sop->GetAllSubShapesIDs( aSubGeomVar,
                                                             GEOM::SHAPE,/*sorted=*/false);
@@ -417,7 +416,7 @@ char* SMESHGUI_MeshOp::isSubmeshIgnored() const
 
     QString aMeshEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Mesh );
     QString aGeomEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Geom );
 
     QString aMeshEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Mesh );
     QString aGeomEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Geom );
-    _PTR(SObject) pMesh = studyDS()->FindObjectID( aMeshEntry.toLatin1().data() );
+    _PTR(SObject) pMesh = SMESH::getStudy()->FindObjectID( aMeshEntry.toLatin1().data() );
     if ( pMesh ) {
 
       QStringList algoNames;
     if ( pMesh ) {
 
       QStringList algoNames;
@@ -433,7 +432,7 @@ char* SMESHGUI_MeshOp::isSubmeshIgnored() const
       }
 
 //       GEOM::GEOM_Object_var geom;
       }
 
 //       GEOM::GEOM_Object_var geom;
-//       if (_PTR(SObject) pGeom = studyDS()->FindObjectID( aGeomEntry.toLatin1().data() ))
+//       if (_PTR(SObject) pGeom = SMESH::getStudy()->FindObjectID( aGeomEntry.toLatin1().data() ))
 //         geom = SMESH::SObjectToInterface<GEOM::GEOM_Object>( pGeom );
 
 //       if ( !geom->_is_nil() && geom->GetShapeType() >= GEOM::FACE ) { // WIRE, EDGE as well
 //         geom = SMESH::SObjectToInterface<GEOM::GEOM_Object>( pGeom );
 
 //       if ( !geom->_is_nil() && geom->GetShapeType() >= GEOM::FACE ) { // WIRE, EDGE as well
@@ -462,8 +461,8 @@ _PTR(SObject) SMESHGUI_MeshOp::getSubmeshByGeom() const
 {
   QString aMeshEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Mesh );
   QString aGeomEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Geom );
 {
   QString aMeshEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Mesh );
   QString aGeomEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Geom );
-  _PTR(SObject) pMesh = studyDS()->FindObjectID( aMeshEntry.toLatin1().data() );
-  _PTR(SObject) pGeom = studyDS()->FindObjectID( aGeomEntry.toLatin1().data() );
+  _PTR(SObject) pMesh = SMESH::getStudy()->FindObjectID( aMeshEntry.toLatin1().data() );
+  _PTR(SObject) pGeom = SMESH::getStudy()->FindObjectID( aGeomEntry.toLatin1().data() );
   if ( pMesh && pGeom ) {
     GEOM::GEOM_Object_var geom = SMESH::SObjectToInterface<GEOM::GEOM_Object>( pGeom );
     if ( !geom->_is_nil() ) {
   if ( pMesh && pGeom ) {
     GEOM::GEOM_Object_var geom = SMESH::SObjectToInterface<GEOM::GEOM_Object>( pGeom );
     if ( !geom->_is_nil() ) {
@@ -480,7 +479,7 @@ _PTR(SObject) SMESHGUI_MeshOp::getSubmeshByGeom() const
       }
       _PTR(GenericAttribute) anAttr;
       _PTR(SObject) aSubmeshRoot;
       }
       _PTR(GenericAttribute) anAttr;
       _PTR(SObject) aSubmeshRoot;
-      _PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
+      _PTR(Study) aStudy = SMESH::getStudy();
       if ( pMesh->FindSubObject( tag, aSubmeshRoot ) )
       {
         _PTR(ChildIterator) smIter = aStudy->NewChildIterator( aSubmeshRoot );
       if ( pMesh->FindSubObject( tag, aSubmeshRoot ) )
       {
         _PTR(ChildIterator) smIter = aStudy->NewChildIterator( aSubmeshRoot );
@@ -523,7 +522,7 @@ void SMESHGUI_MeshOp::selectionDone()
 
     //Check geometry for mesh
     QString anObjEntry = myDlg->selectedObject(SMESHGUI_MeshDlg::Obj);
 
     //Check geometry for mesh
     QString anObjEntry = myDlg->selectedObject(SMESHGUI_MeshDlg::Obj);
-    _PTR(SObject) pObj = studyDS()->FindObjectID(anObjEntry.toLatin1().data());
+    _PTR(SObject) pObj = SMESH::getStudy()->FindObjectID(anObjEntry.toLatin1().data());
     if (pObj)
     {
       SMESH::SMESH_Mesh_var aMeshVar =
     if (pObj)
     {
       SMESH::SMESH_Mesh_var aMeshVar =
@@ -551,7 +550,7 @@ void SMESHGUI_MeshOp::selectionDone()
         int iSubSh = 0;
         for ( ; aSubShapesIter != aGEOMs.end(); aSubShapesIter++, iSubSh++) {
           QString aSubGeomEntry = (*aSubShapesIter);
         int iSubSh = 0;
         for ( ; aSubShapesIter != aGEOMs.end(); aSubShapesIter++, iSubSh++) {
           QString aSubGeomEntry = (*aSubShapesIter);
-          _PTR(SObject) pSubGeom = studyDS()->FindObjectID(aSubGeomEntry.toLatin1().data());
+          _PTR(SObject) pSubGeom = SMESH::getStudy()->FindObjectID(aSubGeomEntry.toLatin1().data());
          
           if( pSubGeom ) { 
             SALOMEDS_SObject* sobj = _CAST(SObject,pSubGeom);
          
           if( pSubGeom ) { 
             SALOMEDS_SObject* sobj = _CAST(SObject,pSubGeom);
@@ -567,7 +566,7 @@ void SMESHGUI_MeshOp::selectionDone()
       } else {
         // get geometry by selected sub-mesh
         QString anObjEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Obj );
       } else {
         // get geometry by selected sub-mesh
         QString anObjEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Obj );
-        _PTR(SObject) pObj = studyDS()->FindObjectID( anObjEntry.toLatin1().data() );
+        _PTR(SObject) pObj = SMESH::getStudy()->FindObjectID( anObjEntry.toLatin1().data() );
         GEOM::GEOM_Object_var aGeomVar = SMESH::GetShapeOnMeshOrSubMesh( pObj );
         if (!aGeomVar->_is_nil()) {
           aSeq->length(1);
         GEOM::GEOM_Object_var aGeomVar = SMESH::GetShapeOnMeshOrSubMesh( pObj );
         if (!aGeomVar->_is_nil()) {
           aSeq->length(1);
@@ -694,12 +693,12 @@ void SMESHGUI_MeshOp::selectionDone()
         // enable/disable popup for choice of geom selection way
         bool enable = false;
         QString aMeshEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Mesh );
         // enable/disable popup for choice of geom selection way
         bool enable = false;
         QString aMeshEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Mesh );
-        if ( _PTR(SObject) pMesh = studyDS()->FindObjectID( aMeshEntry.toLatin1().data() )) {
+        if ( _PTR(SObject) pMesh = SMESH::getStudy()->FindObjectID( aMeshEntry.toLatin1().data() )) {
           SMESH::SMESH_Mesh_var mesh = SMESH::SObjectToInterface<SMESH::SMESH_Mesh>( pMesh );
           if ( !mesh->_is_nil() ) {
             //rnv: issue 21056: EDF 1608 SMESH: Dialog Box "Create Sub Mesh": focus should automatically switch to geometry
             QString aGeomEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Geom );
           SMESH::SMESH_Mesh_var mesh = SMESH::SObjectToInterface<SMESH::SMESH_Mesh>( pMesh );
           if ( !mesh->_is_nil() ) {
             //rnv: issue 21056: EDF 1608 SMESH: Dialog Box "Create Sub Mesh": focus should automatically switch to geometry
             QString aGeomEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Geom );
-            _PTR(SObject) pGeom = studyDS()->FindObjectID( aGeomEntry.toLatin1().data() );
+            _PTR(SObject) pGeom = SMESH::getStudy()->FindObjectID( aGeomEntry.toLatin1().data() );
             if ( !pGeom || GEOM::GEOM_Object::_narrow( _CAST( SObject,pGeom )->GetObject() )->_is_nil() )
               myDlg->activateObject(SMESHGUI_MeshDlg::Geom);
             enable = ( shapeDim > 1 ) && ( mesh->NbEdges() > 0 );
             if ( !pGeom || GEOM::GEOM_Object::_narrow( _CAST( SObject,pGeom )->GetObject() )->_is_nil() )
               myDlg->activateObject(SMESHGUI_MeshDlg::Geom);
             enable = ( shapeDim > 1 ) && ( mesh->NbEdges() > 0 );
@@ -774,7 +773,7 @@ bool SMESHGUI_MeshOp::isValid( QString& theMess ) const
   {
     QString aMeshEntry = myDlg->selectedObject
       ( myToCreate ? SMESHGUI_MeshDlg::Mesh : SMESHGUI_MeshDlg::Obj );
   {
     QString aMeshEntry = myDlg->selectedObject
       ( myToCreate ? SMESHGUI_MeshDlg::Mesh : SMESHGUI_MeshDlg::Obj );
-    if ( _PTR(SObject) pMesh = studyDS()->FindObjectID( aMeshEntry.toLatin1().data() )) {
+    if ( _PTR(SObject) pMesh = SMESH::getStudy()->FindObjectID( aMeshEntry.toLatin1().data() )) {
       SMESH::SMESH_Mesh_var mesh = SMESH::SObjectToInterface<SMESH::SMESH_Mesh>( pMesh );
       if ( !mesh->_is_nil() && CORBA::is_nil( mesh->GetShapeToMesh() )) {
         theMess = tr( "IMPORTED_MESH" );
       SMESH::SMESH_Mesh_var mesh = SMESH::SObjectToInterface<SMESH::SMESH_Mesh>( pMesh );
       if ( !mesh->_is_nil() && CORBA::is_nil( mesh->GetShapeToMesh() )) {
         theMess = tr( "IMPORTED_MESH" );
@@ -803,7 +802,7 @@ bool SMESHGUI_MeshOp::isValid( QString& theMess ) const
       }
       return true;
     }
       }
       return true;
     }
-    _PTR(SObject) pGeom = studyDS()->FindObjectID( aGeomEntry.toLatin1().data() );
+    _PTR(SObject) pGeom = SMESH::getStudy()->FindObjectID( aGeomEntry.toLatin1().data() );
     if ( !pGeom || GEOM::GEOM_Object::_narrow( _CAST( SObject,pGeom )->GetObject() )->_is_nil() )
     {
       theMess = tr( "GEOMETRY_OBJECT_IS_NULL" );
     if ( !pGeom || GEOM::GEOM_Object::_narrow( _CAST( SObject,pGeom )->GetObject() )->_is_nil() )
     {
       theMess = tr( "GEOMETRY_OBJECT_IS_NULL" );
@@ -819,7 +818,7 @@ bool SMESHGUI_MeshOp::isValid( QString& theMess ) const
         theMess = tr( "MESH_IS_NOT_DEFINED" );
         return false;
       }
         theMess = tr( "MESH_IS_NOT_DEFINED" );
         return false;
       }
-      _PTR(SObject) pMesh = studyDS()->FindObjectID( aMeshEntry.toLatin1().data() );
+      _PTR(SObject) pMesh = SMESH::getStudy()->FindObjectID( aMeshEntry.toLatin1().data() );
       if ( !pMesh || SMESH::SMESH_Mesh::_narrow( _CAST( SObject,pMesh )->GetObject() )->_is_nil() )
       {
         theMess = tr( "MESH_IS_NULL" );
       if ( !pMesh || SMESH::SMESH_Mesh::_narrow( _CAST( SObject,pMesh )->GetObject() )->_is_nil() )
       {
         theMess = tr( "MESH_IS_NULL" );
@@ -946,7 +945,7 @@ void SMESHGUI_MeshOp::availableHyps( const int       theDim,
   QString aCurrentGeomToSelect;
   if ( !theMeshType.isEmpty() ) {
     aCurrentGeomToSelect = myDlg->selectedObject( myToCreate ? SMESHGUI_MeshDlg::Geom : SMESHGUI_MeshDlg::Obj );
   QString aCurrentGeomToSelect;
   if ( !theMeshType.isEmpty() ) {
     aCurrentGeomToSelect = myDlg->selectedObject( myToCreate ? SMESHGUI_MeshDlg::Geom : SMESHGUI_MeshDlg::Obj );
-    if ( _PTR(SObject) so = studyDS()->FindObjectID( aCurrentGeomToSelect.toLatin1().data() )) {
+    if ( _PTR(SObject) so = SMESH::getStudy()->FindObjectID( aCurrentGeomToSelect.toLatin1().data() )) {
       aGeomVar = SMESH::GetGeom( so );
     }
    if ( aCurrentGeomToSelect != myLastGeomToSelect )
       aGeomVar = SMESH::GetGeom( so );
     }
    if ( aCurrentGeomToSelect != myLastGeomToSelect )
@@ -1050,8 +1049,7 @@ void SMESHGUI_MeshOp::existingHyps( const int       theDim,
 
   if ( theFather->FindSubObject( aPart, aHypRoot ) )
   {
 
   if ( theFather->FindSubObject( aPart, aHypRoot ) )
   {
-    _PTR(ChildIterator) anIter =
-      SMESH::GetActiveStudyDocument()->NewChildIterator( aHypRoot );
+    _PTR(ChildIterator) anIter = SMESH::getStudy()->NewChildIterator( aHypRoot );
     for ( ; anIter->More(); anIter->Next() )
     {
       _PTR(SObject) anObj = anIter->Value();
     for ( ; anIter->More(); anIter->Next() )
     {
       _PTR(SObject) anObj = anIter->Value();
@@ -1122,14 +1120,14 @@ SMESHGUI_MeshOp::getInitParamsHypothesis( const QString& aHypType,
   {
     anEntry = myDlg->selectedObject
       ( myToCreate ? SMESHGUI_MeshDlg::Mesh : SMESHGUI_MeshDlg::Obj );
   {
     anEntry = myDlg->selectedObject
       ( myToCreate ? SMESHGUI_MeshDlg::Mesh : SMESHGUI_MeshDlg::Obj );
-    if ( _PTR(SObject) pObj = studyDS()->FindObjectID( anEntry.toLatin1().data() ))
+    if ( _PTR(SObject) pObj = SMESH::getStudy()->FindObjectID( anEntry.toLatin1().data() ))
     {
       CORBA::Object_ptr Obj = _CAST( SObject,pObj )->GetObject();
       if ( myToCreate ) // mesh and geom may be selected
       {
         aMeshVar = SMESH::SMESH_Mesh::_narrow( Obj );
         anEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Geom );
     {
       CORBA::Object_ptr Obj = _CAST( SObject,pObj )->GetObject();
       if ( myToCreate ) // mesh and geom may be selected
       {
         aMeshVar = SMESH::SMESH_Mesh::_narrow( Obj );
         anEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Geom );
-        if ( _PTR(SObject) pGeom = studyDS()->FindObjectID( anEntry.toLatin1().data() ))
+        if ( _PTR(SObject) pGeom = SMESH::getStudy()->FindObjectID( anEntry.toLatin1().data() ))
           aGeomVar= GEOM::GEOM_Object::_narrow( _CAST( SObject,pGeom )->GetObject() );
       }
       else // edition: sub-mesh may be selected
           aGeomVar= GEOM::GEOM_Object::_narrow( _CAST( SObject,pGeom )->GetObject() );
       }
       else // edition: sub-mesh may be selected
@@ -1147,7 +1145,7 @@ SMESHGUI_MeshOp::getInitParamsHypothesis( const QString& aHypType,
     if ( !myToCreate ) // mesh to edit can be selected
     {
       anEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Obj );
     if ( !myToCreate ) // mesh to edit can be selected
     {
       anEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Obj );
-      if ( _PTR(SObject) pMesh = studyDS()->FindObjectID( anEntry.toLatin1().data() ))
+      if ( _PTR(SObject) pMesh = SMESH::getStudy()->FindObjectID( anEntry.toLatin1().data() ))
       {
         aMeshVar = SMESH::SMESH_Mesh::_narrow( _CAST( SObject,pMesh )->GetObject() );
         if ( !aMeshVar->_is_nil() )
       {
         aMeshVar = SMESH::SMESH_Mesh::_narrow( _CAST( SObject,pMesh )->GetObject() );
         if ( !aMeshVar->_is_nil() )
@@ -1156,7 +1154,7 @@ SMESHGUI_MeshOp::getInitParamsHypothesis( const QString& aHypType,
     }
     if ( aGeomVar->_is_nil() ) {
       anEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Geom );
     }
     if ( aGeomVar->_is_nil() ) {
       anEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Geom );
-      if ( _PTR(SObject) pGeom = studyDS()->FindObjectID( anEntry.toLatin1().data() ))
+      if ( _PTR(SObject) pGeom = SMESH::getStudy()->FindObjectID( anEntry.toLatin1().data() ))
       {
         aGeomVar= GEOM::GEOM_Object::_narrow( _CAST( SObject,pGeom )->GetObject() );
       }
       {
         aGeomVar= GEOM::GEOM_Object::_narrow( _CAST( SObject,pGeom )->GetObject() );
       }
@@ -1199,13 +1197,13 @@ void SMESHGUI_MeshOp::initHypCreator( SMESHGUI_GenericHypothesisCreator* theCrea
     aMeshEntry = aGeomEntry;
 
   if ( aMeshEntry != aGeomEntry ) { // Get Geom object from Mesh of a sub-mesh being edited
     aMeshEntry = aGeomEntry;
 
   if ( aMeshEntry != aGeomEntry ) { // Get Geom object from Mesh of a sub-mesh being edited
-    _PTR(SObject) pObj = studyDS()->FindObjectID( aMeshEntry.toLatin1().data() );
+    _PTR(SObject) pObj = SMESH::getStudy()->FindObjectID( aMeshEntry.toLatin1().data() );
     GEOM::GEOM_Object_var aGeomVar = SMESH::GetShapeOnMeshOrSubMesh( pObj );
     aMeshEntry = ( aGeomVar->_is_nil() ) ? QString() : SMESH::toQStr( aGeomVar->GetStudyEntry() );
   }
 
   if ( aMeshEntry == "" && aGeomEntry == "" ) { // get geom of an object being edited
     GEOM::GEOM_Object_var aGeomVar = SMESH::GetShapeOnMeshOrSubMesh( pObj );
     aMeshEntry = ( aGeomVar->_is_nil() ) ? QString() : SMESH::toQStr( aGeomVar->GetStudyEntry() );
   }
 
   if ( aMeshEntry == "" && aGeomEntry == "" ) { // get geom of an object being edited
-    _PTR(SObject) pObj = studyDS()->FindObjectID( anObjEntry.toLatin1().data() );
+    _PTR(SObject) pObj = SMESH::getStudy()->FindObjectID( anObjEntry.toLatin1().data() );
     bool isMesh;
     GEOM::GEOM_Object_var aGeomVar = SMESH::GetShapeOnMeshOrSubMesh( pObj, &isMesh );
     if ( !aGeomVar->_is_nil() )
     bool isMesh;
     GEOM::GEOM_Object_var aGeomVar = SMESH::GetShapeOnMeshOrSubMesh( pObj, &isMesh );
     if ( !aGeomVar->_is_nil() )
@@ -1218,7 +1216,7 @@ void SMESHGUI_MeshOp::initHypCreator( SMESHGUI_GenericHypothesisCreator* theCrea
 
   if ( anObjEntry != "" && aGeomEntry != "" && aMeshEntry == "" ) {
     // take geometry from submesh being created
 
   if ( anObjEntry != "" && aGeomEntry != "" && aMeshEntry == "" ) {
     // take geometry from submesh being created
-    _PTR(SObject) pObj = studyDS()->FindObjectID( anObjEntry.toLatin1().data() );
+    _PTR(SObject) pObj = SMESH::getStudy()->FindObjectID( anObjEntry.toLatin1().data() );
     if ( pObj ) {
       // if current object is sub-mesh
       SMESH::SMESH_subMesh_var aSubMeshVar =
     if ( pObj ) {
       // if current object is sub-mesh
       SMESH::SMESH_subMesh_var aSubMeshVar =
@@ -1396,7 +1394,7 @@ void SMESHGUI_MeshOp::onHypoCreated( int result )
     myDlg->setEnabled( true );
   }
 
     myDlg->setEnabled( true );
   }
 
-  _PTR(SComponent) aFather = SMESH::GetActiveStudyDocument()->FindComponent("SMESH");
+  _PTR(SComponent) aFather = SMESH::getStudy()->FindComponent("SMESH");
 
   int nbHyp = myExistingHyps[myDim][myType].count();
   HypothesisData* algoData = hypData( myDim, Algo, currentHyp( myDim, Algo ));
 
   int nbHyp = myExistingHyps[myDim][myType].count();
   HypothesisData* algoData = hypData( myDim, Algo, currentHyp( myDim, Algo ));
@@ -1610,7 +1608,7 @@ void SMESHGUI_MeshOp::onAlgoSelected( const int theIndex,
 
   // set hypotheses corresponding to the found algorithms
 
 
   // set hypotheses corresponding to the found algorithms
 
-  _PTR(SObject) pObj = SMESH::GetActiveStudyDocument()->FindComponent("SMESH");
+  _PTR(SObject) pObj = SMESH::getStudy()->FindComponent("SMESH");
 
   for ( int dim = SMESH::DIM_0D; dim <= SMESH::DIM_3D; dim++ )
   {
 
   for ( int dim = SMESH::DIM_0D; dim <= SMESH::DIM_3D; dim++ )
   {
@@ -1829,7 +1827,7 @@ bool SMESHGUI_MeshOp::createMesh( QString& theMess, QStringList& theEntryList )
   for ( int i = 0; it!=aList.end(); it++, ++i )
   {
     QString aGeomEntry = *it;
   for ( int i = 0; it!=aList.end(); it++, ++i )
   {
     QString aGeomEntry = *it;
-    _PTR(SObject) pGeom = studyDS()->FindObjectID( aGeomEntry.toLatin1().data() );
+    _PTR(SObject) pGeom = SMESH::getStudy()->FindObjectID( aGeomEntry.toLatin1().data() );
     GEOM::GEOM_Object_var aGeomVar =
       GEOM::GEOM_Object::_narrow( _CAST( SObject,pGeom )->GetObject() );
 
     GEOM::GEOM_Object_var aGeomVar =
       GEOM::GEOM_Object::_narrow( _CAST( SObject,pGeom )->GetObject() );
 
@@ -1896,7 +1894,7 @@ bool SMESHGUI_MeshOp::createSubMesh( QString& theMess, QStringList& theEntryList
 
   // get mesh object
   QString aMeshEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Mesh );
 
   // get mesh object
   QString aMeshEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Mesh );
-  _PTR(SObject) pMesh = studyDS()->FindObjectID( aMeshEntry.toLatin1().data() );
+  _PTR(SObject) pMesh = SMESH::getStudy()->FindObjectID( aMeshEntry.toLatin1().data() );
   SMESH::SMESH_Mesh_var aMeshVar =
     SMESH::SMESH_Mesh::_narrow( _CAST( SObject,pMesh )->GetObject() );
   if (aMeshVar->_is_nil())
   SMESH::SMESH_Mesh_var aMeshVar =
     SMESH::SMESH_Mesh::_narrow( _CAST( SObject,pMesh )->GetObject() );
   if (aMeshVar->_is_nil())
@@ -1916,17 +1914,16 @@ bool SMESHGUI_MeshOp::createSubMesh( QString& theMess, QStringList& theEntryList
   {
     //QString aGeomEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Geom );
     QString aGeomEntry = aGEOMs.first();
   {
     //QString aGeomEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Geom );
     QString aGeomEntry = aGEOMs.first();
-    _PTR(SObject) pGeom = studyDS()->FindObjectID( aGeomEntry.toLatin1().data() );
+    _PTR(SObject) pGeom = SMESH::getStudy()->FindObjectID( aGeomEntry.toLatin1().data() );
     aGeomVar = GEOM::GEOM_Object::_narrow( _CAST( SObject,pGeom )->GetObject() );
   }
   else if (aGEOMs.count() > 1)
   {
     // create a GEOM group
     GEOM::GEOM_Gen_var geomGen = SMESH::GetGEOMGen();
     aGeomVar = GEOM::GEOM_Object::_narrow( _CAST( SObject,pGeom )->GetObject() );
   }
   else if (aGEOMs.count() > 1)
   {
     // create a GEOM group
     GEOM::GEOM_Gen_var geomGen = SMESH::GetGEOMGen();
-    _PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
-    if (!geomGen->_is_nil() && aStudy) {
+    if (!geomGen->_is_nil()) {
       GEOM::GEOM_IGroupOperations_wrap op =
       GEOM::GEOM_IGroupOperations_wrap op =
-        geomGen->GetIGroupOperations(aStudy->StudyId());
+        geomGen->GetIGroupOperations();
       if (!op->_is_nil()) {
         // check and add all selected GEOM objects: they must be
         // a sub-shapes of the main GEOM and must be of one type
       if (!op->_is_nil()) {
         // check and add all selected GEOM objects: they must be
         // a sub-shapes of the main GEOM and must be of one type
@@ -1937,7 +1934,7 @@ bool SMESHGUI_MeshOp::createSubMesh( QString& theMess, QStringList& theEntryList
         QStringList::const_iterator aSubShapesIter = aGEOMs.begin();
         for ( ; aSubShapesIter != aGEOMs.end(); aSubShapesIter++, iSubSh++) {
           QString aSubGeomEntry = (*aSubShapesIter);
         QStringList::const_iterator aSubShapesIter = aGEOMs.begin();
         for ( ; aSubShapesIter != aGEOMs.end(); aSubShapesIter++, iSubSh++) {
           QString aSubGeomEntry = (*aSubShapesIter);
-          _PTR(SObject) pSubGeom = studyDS()->FindObjectID(aSubGeomEntry.toLatin1().data());
+          _PTR(SObject) pSubGeom = SMESH::getStudy()->FindObjectID(aSubGeomEntry.toLatin1().data());
           GEOM::GEOM_Object_var aSubGeomVar =
             GEOM::GEOM_Object::_narrow(_CAST(SObject,pSubGeom)->GetObject());
           TopAbs_ShapeEnum aSubShapeType = (TopAbs_ShapeEnum)aSubGeomVar->GetShapeType();
           GEOM::GEOM_Object_var aSubGeomVar =
             GEOM::GEOM_Object::_narrow(_CAST(SObject,pSubGeom)->GetObject());
           TopAbs_ShapeEnum aSubShapeType = (TopAbs_ShapeEnum)aSubGeomVar->GetShapeType();
@@ -1960,9 +1957,8 @@ bool SMESHGUI_MeshOp::createSubMesh( QString& theMess, QStringList& theEntryList
           // publish the GEOM group in study
           QString aNewGeomGroupName ("Auto_group_for_");
           aNewGeomGroupName += aName;
           // publish the GEOM group in study
           QString aNewGeomGroupName ("Auto_group_for_");
           aNewGeomGroupName += aName;
-          SALOMEDS::Study_var aStudyVar = _CAST(Study, aStudy)->GetStudy();
           SALOMEDS::SObject_wrap aNewGroupSO =
           SALOMEDS::SObject_wrap aNewGroupSO =
-            geomGen->AddInStudy( aStudyVar, aGeomVar,
+            geomGen->AddInStudy( aGeomVar,
                                  aNewGeomGroupName.toLatin1().data(), mainGeom);
         }
       }
                                  aNewGeomGroupName.toLatin1().data(), mainGeom);
         }
       }
@@ -2117,7 +2113,7 @@ void SMESHGUI_MeshOp::setDefaultName( const QString& thePrefix ) const
 {
   QString aResName;
 
 {
   QString aResName;
 
-  _PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
+  _PTR(Study) aStudy = SMESH::getStudy();
   int i = 1;
 
   QString aPrefix = thePrefix;
   int i = 1;
 
   QString aPrefix = thePrefix;
@@ -2158,7 +2154,7 @@ SMESH::SMESH_Hypothesis_var SMESHGUI_MeshOp::getAlgo( const int theDim )
   QString aHypName = dataList[ aHypIndex ]->TypeName;
 
   // get existing algorithms
   QString aHypName = dataList[ aHypIndex ]->TypeName;
 
   // get existing algorithms
-  _PTR(SObject) pObj = SMESH::GetActiveStudyDocument()->FindComponent("SMESH");
+  _PTR(SObject) pObj = SMESH::getStudy()->FindComponent("SMESH");
   QStringList tmp;
   existingHyps( theDim, Algo, pObj, tmp, myExistingHyps[ theDim ][ Algo ]);
 
   QStringList tmp;
   existingHyps( theDim, Algo, pObj, tmp, myExistingHyps[ theDim ][ Algo ]);
 
@@ -2204,7 +2200,7 @@ SMESH::SMESH_Hypothesis_var SMESHGUI_MeshOp::getAlgo( const int theDim )
         delete aCreator;
       }
       QStringList tmpList;
         delete aCreator;
       }
       QStringList tmpList;
-      _PTR(SComponent) aFather = SMESH::GetActiveStudyDocument()->FindComponent( "SMESH" );
+      _PTR(SComponent) aFather = SMESH::getStudy()->FindComponent( "SMESH" );
       existingHyps( theDim, Algo, aFather, tmpList, myExistingHyps[ theDim ][ Algo ] );
     }
 
       existingHyps( theDim, Algo, aFather, tmpList, myExistingHyps[ theDim ][ Algo ] );
     }
 
@@ -2233,7 +2229,7 @@ SMESH::SMESH_Hypothesis_var SMESHGUI_MeshOp::getAlgo( const int theDim )
 void SMESHGUI_MeshOp::readMesh()
 {
   QString anObjEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Obj );
 void SMESHGUI_MeshOp::readMesh()
 {
   QString anObjEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Obj );
-  _PTR(SObject) pObj = studyDS()->FindObjectID( anObjEntry.toLatin1().data() );
+  _PTR(SObject) pObj = SMESH::getStudy()->FindObjectID( anObjEntry.toLatin1().data() );
   if ( !pObj )
     return;
 
   if ( !pObj )
     return;
 
@@ -2399,7 +2395,7 @@ bool SMESHGUI_MeshOp::editMeshOrSubMesh( QString& theMess )
     return false;
 
   QString anObjEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Obj );
     return false;
 
   QString anObjEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Obj );
-  _PTR(SObject) pObj = studyDS()->FindObjectID( anObjEntry.toLatin1().data() );
+  _PTR(SObject) pObj = SMESH::getStudy()->FindObjectID( anObjEntry.toLatin1().data() );
   if ( !pObj )
     return false;
 
   if ( !pObj )
     return false;
 
@@ -2582,7 +2578,7 @@ void SMESHGUI_MeshOp::onGeomSelectionByMesh( bool theByMesh )
     }
     // set mesh object to SMESHGUI_ShapeByMeshOp and start it
     QString aMeshEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Mesh );
     }
     // set mesh object to SMESHGUI_ShapeByMeshOp and start it
     QString aMeshEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Mesh );
-    if ( _PTR(SObject) pMesh = studyDS()->FindObjectID( aMeshEntry.toLatin1().data() )) {
+    if ( _PTR(SObject) pMesh = SMESH::getStudy()->FindObjectID( aMeshEntry.toLatin1().data() )) {
       SMESH::SMESH_Mesh_var aMeshVar =
         SMESH::SMESH_Mesh::_narrow( _CAST( SObject,pMesh )->GetObject() );
       if ( !aMeshVar->_is_nil() ) {
       SMESH::SMESH_Mesh_var aMeshVar =
         SMESH::SMESH_Mesh::_narrow( _CAST( SObject,pMesh )->GetObject() );
       if ( !aMeshVar->_is_nil() ) {
@@ -2611,7 +2607,7 @@ void SMESHGUI_MeshOp::onPublishShapeByMeshDlg(SUIT_Operation* op)
     if ( !aGeomVar->_is_nil() )
     {
       QString ID = SMESH::toQStr( aGeomVar->GetStudyEntry() );
     if ( !aGeomVar->_is_nil() )
     {
       QString ID = SMESH::toQStr( aGeomVar->GetStudyEntry() );
-      if ( _PTR(SObject) aGeomSO = studyDS()->FindObjectID( ID.toLatin1().data() )) {
+      if ( _PTR(SObject) aGeomSO = SMESH::getStudy()->FindObjectID( ID.toLatin1().data() )) {
         selectObject( aGeomSO );
         selectionDone();
       }
         selectObject( aGeomSO );
         selectionDone();
       }
index eec510cea2d9e2819c48acdfe2f390d6c1b644ca..cab1695a5f155c89bccdd0734724236020e5582e 100644 (file)
@@ -280,7 +280,7 @@ bool SMESHGUI_MeshOrderMgr::SetMeshOrder( const  ListListId& theListListIds )
   if (theListListIds.isEmpty() || myMesh->_is_nil())
     return false;
 
   if (theListListIds.isEmpty() || myMesh->_is_nil())
     return false;
 
-  _PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
+  _PTR(Study) aStudy = SMESH::getStudy();
   _PTR(SObject) aMeshSObj = SMESH::FindSObject(myMesh);
   if ( !aStudy || !aMeshSObj )
     return false;
   _PTR(SObject) aMeshSObj = SMESH::FindSObject(myMesh);
   if ( !aStudy || !aMeshSObj )
     return false;
index 53e60ce65f9153acf8287c81e517ca0a0bb30952..8b0bd227c3e17d9b62df382b7feb1a28691f5deb 100755 (executable)
@@ -504,7 +504,7 @@ bool SMESHGUI_MeshPatternDlg::onApply()
         _PTR(SObject) aSO = SMESH::FindSObject(myMesh.in());
         SMESH_Actor* anActor = SMESH::FindActorByEntry(aSO->GetID().c_str());
         if (!anActor) {
         _PTR(SObject) aSO = SMESH::FindSObject(myMesh.in());
         SMESH_Actor* anActor = SMESH::FindActorByEntry(aSO->GetID().c_str());
         if (!anActor) {
-          anActor = SMESH::CreateActor(aSO->GetStudy(), aSO->GetID().c_str());
+          anActor = SMESH::CreateActor(aSO->GetID().c_str());
           if (anActor) {
             SMESH::DisplayActor(SMESH::GetActiveWindow(), anActor);
             SMESH::FitAll();
           if (anActor) {
             SMESH::DisplayActor(SMESH::GetActiveWindow(), anActor);
             SMESH::FitAll();
index 9b3d606a0b2507a3b90569116c5ca3e122b18a3c..0e322fc4a7c97fc37459a51537a7d02013b793f3 100644 (file)
@@ -64,7 +64,7 @@ namespace SMESH
   {
     QString baseName = thePostfix.isEmpty() ? 
       theBaseName : theBaseName + "_" + thePostfix;
   {
     QString baseName = thePostfix.isEmpty() ? 
       theBaseName : theBaseName + "_" + thePostfix;
-    if ( _PTR(Study) aStudy = GetActiveStudyDocument() ) {
+    if ( _PTR(Study) aStudy = getStudy() ) {
       QString name = baseName;
       while ( !aStudy->FindObjectByName( name.toLatin1().data(), "SMESH" ).empty() ) {
         int nb = 0;
       QString name = baseName;
       while ( !aStudy->FindObjectByName( name.toLatin1().data(), "SMESH" ).empty() ) {
         int nb = 0;
@@ -90,7 +90,7 @@ namespace SMESH
     QString baseName = thePostfix.isEmpty() ? 
       theBaseName : theBaseName + "_" + thePostfix;
     QString name = baseName;
     QString baseName = thePostfix.isEmpty() ? 
       theBaseName : theBaseName + "_" + thePostfix;
     QString name = baseName;
-    if ( _PTR(Study) aStudy = GetActiveStudyDocument() ) {
+    if ( _PTR(Study) aStudy = getStudy() ) {
       _PTR(SObject) p = theParent;
       if ( !p ) p = aStudy->FindComponent( "SMESH" );
       if ( p ) {
       _PTR(SObject) p = theParent;
       if ( !p ) p = aStudy->FindComponent( "SMESH" );
       if ( p ) {
index f31874bb0be88e298906d82c13ece5201a2dbc36..1f1ee9efc667d21d729e144ac52cc706f7da0087 100755 (executable)
@@ -995,7 +995,7 @@ void SMESHGUI_MultiEditDlg::setSelectionMode()
 //=======================================================================
 bool SMESHGUI_MultiEditDlg::onApply()
 {
 //=======================================================================
 bool SMESHGUI_MultiEditDlg::onApply()
 {
-  if (mySMESHGUI->isActiveStudyLocked())
+  if (SMESHGUI::isStudyLocked())
     return false;
   if (!isValid(true))
     return false;
     return false;
   if (!isValid(true))
     return false;
index 0e6bd0d98cd07e8f12ba03aab918441c806c44a1..5f2f2d9219df22fafb0819ace97a245f5cbe1ff5 100644 (file)
@@ -102,9 +102,7 @@ namespace SMESH
       SMESH::SMESH_MeshEditor_var aMeshEditor = theMesh->GetMeshEditor();
       theMesh->SetParameters( theParameters.join(":").toLatin1().constData() );
       aNodeId = aMeshEditor->AddNode( x, y, z );
       SMESH::SMESH_MeshEditor_var aMeshEditor = theMesh->GetMeshEditor();
       theMesh->SetParameters( theParameters.join(":").toLatin1().constData() );
       aNodeId = aMeshEditor->AddNode( x, y, z );
-      _PTR(Study) aStudy = GetActiveStudyDocument();
-      CORBA::Long anId = aStudy->StudyId();
-      if (TVisualObjPtr aVisualObj = SMESH::GetVisualObj( anId, aSobj->GetID().c_str() ) ) {
+      if (TVisualObjPtr aVisualObj = SMESH::GetVisualObj( aSobj->GetID().c_str() ) ) {
         aVisualObj->Update( true );
       }
     } 
         aVisualObj->Update( true );
       }
     } 
@@ -423,7 +421,7 @@ void SMESHGUI_NodesDlg::ClickOnOk()
 //=================================================================================
 bool SMESHGUI_NodesDlg::ClickOnApply()
 {
 //=================================================================================
 bool SMESHGUI_NodesDlg::ClickOnApply()
 {
-  if ( mySMESHGUI->isActiveStudyLocked() )
+  if ( SMESHGUI::isStudyLocked() )
     return false;
 
   if ( myMesh->_is_nil() ) {
     return false;
 
   if ( myMesh->_is_nil() ) {
index 0a6b8bc2739757a6b65eb306c41e71e60e6616e6..2b604b0ebbb75fa7c6c43ecdd52a975faa7d2f7c 100755 (executable)
@@ -122,7 +122,7 @@ bool SMESHGUI_Operation::isReadyToStart() const
                               tr( "NO_MODULE" ) );
     return false;
   }
                               tr( "NO_MODULE" ) );
     return false;
   }
-  else if ( isStudyLocked() )
+  else if ( SMESHGUI::isStudyLocked() )
     return false;
 
   return true;
     return false;
 
   return true;
@@ -142,16 +142,6 @@ void SMESHGUI_Operation::setDialogActive( const bool active )
 
 }
 
 
 }
 
-//=======================================================================
-// name    : studyDS
-// Purpose :
-//=======================================================================
-_PTR(Study) SMESHGUI_Operation::studyDS() const
-{
-  SalomeApp_Study* s = dynamic_cast<SalomeApp_Study*>( study() );
-  return s->studyDS();
-}
-
 //=======================================================================
 // name    : onOk
 // Purpose :
 //=======================================================================
 // name    : onOk
 // Purpose :
@@ -236,30 +226,6 @@ bool SMESHGUI_Operation::isApplyAndClose() const
   return myIsApplyAndClose;
 }
 
   return myIsApplyAndClose;
 }
 
-/*!
- * \brief Verifies whether study of operation is locked
-  * \param theMess - specifies whether message box must be shown if study is locked
-  * \return State of study.
-*
-* Verifies whether study of operation is locked. If second parameter is TRUE and study
-* is locked when corresponding message box appears
-*/
-bool SMESHGUI_Operation::isStudyLocked( const bool theMess ) const
-{
-  if ( studyDS() )
-  {
-    if ( studyDS()->GetProperties()->IsLocked() )
-    {
-      if ( theMess )
-        SUIT_MessageBox::warning( SMESHGUI::desktop(), tr( "WRN_WARNING" ),
-                                  tr( "WRN_STUDY_LOCKED" ) );
-      return true;
-    }
-  }
-
-  return false;
-}
-
 /*!
  * \brief Verifies whether given operator is valid for this one
   * \param theOtherOp - other operation
 /*!
  * \brief Verifies whether given operator is valid for this one
   * \param theOtherOp - other operation
index 990759dc8985b5553155e94863910872bd2d2e9f..3f3e891517cef6a322a7bbeaf952723df9874d9d 100755 (executable)
@@ -65,9 +65,6 @@ protected:
   virtual void      setDialogActive( const bool );
 
   SMESHGUI*         getSMESHGUI() const;
   virtual void      setDialogActive( const bool );
 
   SMESHGUI*         getSMESHGUI() const;
-  bool              isStudyLocked( const bool = true ) const;
-
-  _PTR(Study)       studyDS() const;
   
   virtual bool      isValid( SUIT_Operation* ) const;
 
   
   virtual bool      isValid( SUIT_Operation* ) const;
 
index 067eb5f49e734f6c2d48e900f21e4fcb784dbbd3..620996d18f42eb585650ddd95a902ab52e592a83 100644 (file)
@@ -223,7 +223,7 @@ void SMESHGUI_RemoveElementsDlg::Init()
 //=================================================================================
 void SMESHGUI_RemoveElementsDlg::ClickOnApply()
 {
 //=================================================================================
 void SMESHGUI_RemoveElementsDlg::ClickOnApply()
 {
-  if (mySMESHGUI->isActiveStudyLocked())
+  if (SMESHGUI::isStudyLocked())
     return;
 
   if (myNbOkElements)
     return;
 
   if (myNbOkElements)
index 805b37c85a1eccabe0371eb783e6abea10295d11..a94f4b488077fa5241bd3bbcef3ddc4703d7c4ff 100644 (file)
@@ -229,7 +229,7 @@ void SMESHGUI_RemoveNodesDlg::Init()
 //=================================================================================
 void SMESHGUI_RemoveNodesDlg::ClickOnApply()
 {
 //=================================================================================
 void SMESHGUI_RemoveNodesDlg::ClickOnApply()
 {
-  if (mySMESHGUI->isActiveStudyLocked())
+  if (SMESHGUI::isStudyLocked())
     return;
 
   if (myNbOkNodes) {
     return;
 
   if (myNbOkNodes) {
index 5dc81e40ec90e9c995fb9939b978180ab1e7af28..9f21446747fc566a90f5c7e7eb7e2dee94b7dc5e 100644 (file)
@@ -210,7 +210,7 @@ void SMESHGUI_RenumberingDlg::Init()
 //=================================================================================
 void SMESHGUI_RenumberingDlg::ClickOnApply()
 {
 //=================================================================================
 void SMESHGUI_RenumberingDlg::ClickOnApply()
 {
-  if (mySMESHGUI->isActiveStudyLocked())
+  if (SMESHGUI::isStudyLocked())
     return;
 
   if (!myMesh->_is_nil()) {
     return;
 
   if (!myMesh->_is_nil()) {
index cb3828246dbc0af8776cf4467737349e085ee480..f6f72edb2bc5f549b42e0299baa375aadc0dc956 100644 (file)
@@ -638,7 +638,7 @@ void SMESHGUI_ReorientFacesOp::onTextChange( const QString& theText )
 
 bool SMESHGUI_ReorientFacesOp::onApply()
 {
 
 bool SMESHGUI_ReorientFacesOp::onApply()
 {
-  if( isStudyLocked() )
+  if( SMESHGUI::isStudyLocked() )
     return false;
 
   QString msg;
     return false;
 
   QString msg;
@@ -728,7 +728,7 @@ bool SMESHGUI_ReorientFacesOp::isValid( QString& msg )
 {
   // check object
   QString objectEntry = myDlg->selectedObject( EObject );
 {
   // check object
   QString objectEntry = myDlg->selectedObject( EObject );
-  _PTR(SObject) pSObject = studyDS()->FindObjectID( objectEntry.toLatin1().data() );
+  _PTR(SObject) pSObject = SMESH::getStudy()->FindObjectID( objectEntry.toLatin1().data() );
   myObject = SMESH::SMESH_IDSource::_narrow( _CAST( SObject,pSObject )->GetObject() );
   if ( myObject->_is_nil() )
   {
   myObject = SMESH::SMESH_IDSource::_narrow( _CAST( SObject,pSObject )->GetObject() );
   if ( myObject->_is_nil() )
   {
@@ -749,7 +749,7 @@ bool SMESHGUI_ReorientFacesOp::isValid( QString& msg )
   if ( myDlg->myConstructorGrp->checkedId() == CONSTRUCTOR_VOLUME )
   {
     objectEntry = myDlg->selectedObject( EVolumes );
   if ( myDlg->myConstructorGrp->checkedId() == CONSTRUCTOR_VOLUME )
   {
     objectEntry = myDlg->selectedObject( EVolumes );
-    _PTR(SObject) pSObject = studyDS()->FindObjectID( objectEntry.toLatin1().data() );
+    _PTR(SObject) pSObject = SMESH::getStudy()->FindObjectID( objectEntry.toLatin1().data() );
     myVolumeObj = SMESH::SObjectToInterface< SMESH::SMESH_IDSource>( pSObject );
     if ( myVolumeObj->_is_nil() )
     {
     myVolumeObj = SMESH::SObjectToInterface< SMESH::SMESH_IDSource>( pSObject );
     if ( myVolumeObj->_is_nil() )
     {
index 27dfe0af088d7ed1aa05c443097c4cbf6c0bccf8..f23c6d2f652688145b890e611b82b215925d306c 100644 (file)
@@ -392,7 +392,7 @@ bool SMESHGUI_RevolutionDlg::isValid()
 //=================================================================================
 bool SMESHGUI_RevolutionDlg::ClickOnApply()
 {
 //=================================================================================
 bool SMESHGUI_RevolutionDlg::ClickOnApply()
 {
-  if (mySMESHGUI->isActiveStudyLocked())
+  if (SMESHGUI::isStudyLocked())
     return false;
 
   if (!isValid())
     return false;
 
   if (!isValid())
index 48e7204cbac16bc01bc660abbe394a2435bd8198..291d908ddbb5686d539621f604c7126ee0fde7aa 100644 (file)
@@ -400,7 +400,7 @@ void SMESHGUI_RotationDlg::Init (bool ResetControls)
 //=================================================================================
 bool SMESHGUI_RotationDlg::ClickOnApply()
 {
 //=================================================================================
 bool SMESHGUI_RotationDlg::ClickOnApply()
 {
-  if (mySMESHGUI->isActiveStudyLocked())
+  if (SMESHGUI::isStudyLocked())
     return false;
 
   if( !isValid() )
     return false;
 
   if( !isValid() )
index 85e9dd46c84125ccf57c95c3cb9ebdf19c6ce611..001ee7d9440a02acbd4667a707abe59ec48c3fb6 100644 (file)
@@ -439,7 +439,7 @@ void SMESHGUI_ScaleDlg::ConstructorsClicked (int constructorId)
 //=================================================================================
 bool SMESHGUI_ScaleDlg::ClickOnApply()
 {
 //=================================================================================
 bool SMESHGUI_ScaleDlg::ClickOnApply()
 {
-  if (mySMESHGUI->isActiveStudyLocked())
+  if (SMESHGUI::isStudyLocked())
     return false;
 
   if( !isValid() )
     return false;
 
   if( !isValid() )
index b6976df864921b7e5219e1bf10c74d7c794b9f9a..0b113839d81732f0b25f608b9254c31b4657d99c 100644 (file)
@@ -40,7 +40,7 @@
 #include <SMESH_ScalarBarActor.h>
 
 // SALOME GUI includes
 #include <SMESH_ScalarBarActor.h>
 
 // SALOME GUI includes
-#include <SalomeApp_Study.h>
+#include <SalomeApp_Application.h>
 #include <LightApp_VTKSelector.h>
 #include <SVTK_ViewWindow.h>
 
 #include <LightApp_VTKSelector.h>
 #include <SVTK_ViewWindow.h>
 
@@ -75,15 +75,10 @@ void SMESHGUI_Selection::init( const QString& client, LightApp_SelectionMgr* mgr
 {
   LightApp_Selection::init( client, mgr );
 
 {
   LightApp_Selection::init( client, mgr );
 
-  if( mgr && study() )
+  if( mgr )
   {
   {
-    SalomeApp_Study* aSStudy = dynamic_cast<SalomeApp_Study*>(study());
-    if (!aSStudy)
-      return;
-    _PTR(Study) aStudy = aSStudy->studyDS();
-
     for( int i=0, n=count(); i<n; i++ ) {
     for( int i=0, n=count(); i<n; i++ ) {
-      myTypes.append( typeName( type( entry( i ), aStudy ) ) );
+      myTypes.append( typeName( type( entry( i ) ) ) );
       myControls.append( controlMode( i ) );
     }
   }
       myControls.append( controlMode( i ) );
     }
   }
@@ -203,8 +198,8 @@ QList<QVariant> SMESHGUI_Selection::elemTypes( int ind, bool fromObj ) const
   {
     if ( ind >= 0 && ind < myTypes.count() && myTypes[ind] != "Unknown" )
     {
   {
     if ( ind >= 0 && ind < myTypes.count() && myTypes[ind] != "Unknown" )
     {
-      _PTR(SObject) sobj = SMESH::GetActiveStudyDocument()->FindObjectID( entry( ind ).toLatin1().data() );
-      CORBA::Object_var obj = SMESH::SObjectToObject( sobj, SMESH::GetActiveStudyDocument() );
+      _PTR(SObject) sobj = SMESH::getStudy()->FindObjectID( entry( ind ).toLatin1().data() );
+      CORBA::Object_var obj = SMESH::SObjectToObject( sobj );
       SMESH::SMESH_IDSource_var idSrc = SMESH::SMESH_IDSource::_narrow( obj );
       if ( !CORBA::is_nil( idSrc ) )
       {
       SMESH::SMESH_IDSource_var idSrc = SMESH::SMESH_IDSource::_narrow( obj );
       if ( !CORBA::is_nil( idSrc ) )
       {
@@ -268,7 +263,7 @@ QString SMESHGUI_Selection::displayMode( int ind ) const
 
 bool SMESHGUI_Selection::isQuadratic( int ind ) const
 {
 
 bool SMESHGUI_Selection::isQuadratic( int ind ) const
 {
-  _PTR(SObject) so = SMESH::GetActiveStudyDocument()->FindObjectID( entry( ind ).toLatin1().data() );
+  _PTR(SObject) so = SMESH::getStudy()->FindObjectID( entry( ind ).toLatin1().data() );
   if ( !so )
     return false;
   SMESH::SMESH_IDSource_var idSource =  SMESH::SObjectToInterface<SMESH::SMESH_IDSource>( so );
   if ( !so )
     return false;
   SMESH::SMESH_IDSource_var idSource =  SMESH::SObjectToInterface<SMESH::SMESH_IDSource>( so );
@@ -463,11 +458,14 @@ bool SMESHGUI_Selection::isAutoColor( int ind ) const
 {
   if ( ind >= 0 && ind < myTypes.count() && myTypes[ind] != "Unknown" )
   {
 {
   if ( ind >= 0 && ind < myTypes.count() && myTypes[ind] != "Unknown" )
   {
-    _PTR(SObject) sobj = SMESH::GetActiveStudyDocument()->FindObjectID( entry( ind ).toLatin1().data() );
-    CORBA::Object_var      obj = SMESH::SObjectToObject( sobj, SMESH::GetActiveStudyDocument() );
-    SMESH::SMESH_Mesh_var mesh = SMESH::SMESH_Mesh::_narrow( obj );
-    if ( !CORBA::is_nil( mesh ) )
-      return mesh->GetAutoColor();
+    _PTR(SObject) sobj = SMESH::getStudy()->FindObjectID( entry( ind ).toLatin1().data() );
+    CORBA::Object_var obj = SMESH::SObjectToObject( sobj );
+
+    if ( !CORBA::is_nil( obj ) ) {
+      SMESH::SMESH_Mesh_var mesh = SMESH::SMESH_Mesh::_narrow( obj );
+      if ( !CORBA::is_nil( mesh ) )
+        return mesh->GetAutoColor();
+    }
   }
   return false;
 }
   }
   return false;
 }
@@ -481,8 +479,8 @@ int SMESHGUI_Selection::numberOfNodes( int ind ) const
 {
   if ( ind >= 0 && ind < myTypes.count() && myTypes[ind] != "Unknown" )
   {
 {
   if ( ind >= 0 && ind < myTypes.count() && myTypes[ind] != "Unknown" )
   {
-    _PTR(SObject) sobj = SMESH::GetActiveStudyDocument()->FindObjectID( entry( ind ).toLatin1().data() );
-    CORBA::Object_var obj = SMESH::SObjectToObject( sobj, SMESH::GetActiveStudyDocument() );
+    _PTR(SObject) sobj = SMESH::getStudy()->FindObjectID( entry( ind ).toLatin1().data() );
+    CORBA::Object_var obj = SMESH::SObjectToObject( sobj );
 
     if ( !CORBA::is_nil( obj ) ) {
       SMESH::SMESH_Mesh_var mesh = SMESH::SMESH_Mesh::_narrow( obj );
 
     if ( !CORBA::is_nil( obj ) ) {
       SMESH::SMESH_Mesh_var mesh = SMESH::SMESH_Mesh::_narrow( obj );
@@ -512,8 +510,8 @@ int SMESHGUI_Selection::dim( int ind ) const
   int dim = -1;
   if ( ind >= 0 && ind < myTypes.count() && myTypes[ind] != "Unknown" )
   {
   int dim = -1;
   if ( ind >= 0 && ind < myTypes.count() && myTypes[ind] != "Unknown" )
   {
-    _PTR(SObject) sobj = SMESH::GetActiveStudyDocument()->FindObjectID( entry( ind ).toLatin1().data() );
-    CORBA::Object_var obj = SMESH::SObjectToObject( sobj, SMESH::GetActiveStudyDocument() );
+    _PTR(SObject) sobj = SMESH::getStudy()->FindObjectID( entry( ind ).toLatin1().data() );
+    CORBA::Object_var obj = SMESH::SObjectToObject( sobj );
 
     if ( !CORBA::is_nil( obj ) ) {
       SMESH::SMESH_IDSource_var idSrc = SMESH::SMESH_IDSource::_narrow( obj );
 
     if ( !CORBA::is_nil( obj ) ) {
       SMESH::SMESH_IDSource_var idSrc = SMESH::SMESH_IDSource::_narrow( obj );
@@ -547,7 +545,7 @@ bool SMESHGUI_Selection::isComputable( int ind ) const
                                               myTypes[ind].startsWith("Mesh " )))
   {
     QMap<int,int> modeMap;
                                               myTypes[ind].startsWith("Mesh " )))
   {
     QMap<int,int> modeMap;
-    _PTR(SObject) meshSO = SMESH::GetActiveStudyDocument()->FindObjectID( entry( ind ).toLatin1().data() );
+    _PTR(SObject) meshSO = SMESH::getStudy()->FindObjectID( entry( ind ).toLatin1().data() );
 
     _PTR(SComponent) component = meshSO->GetFatherComponent();
     if ( meshSO->Depth() - component->Depth() > 1 ) // sub-mesh, get a mesh
 
     _PTR(SComponent) component = meshSO->GetFatherComponent();
     if ( meshSO->Depth() - component->Depth() > 1 ) // sub-mesh, get a mesh
@@ -573,7 +571,7 @@ bool SMESHGUI_Selection::isPreComputable( int ind ) const
     if ( maxDim < 2 ) // we can preview 1D or 2D
     {
       QMap<int,int> modeMap;
     if ( maxDim < 2 ) // we can preview 1D or 2D
     {
       QMap<int,int> modeMap;
-      _PTR(SObject) pMesh = SMESH::GetActiveStudyDocument()->FindObjectID( entry( ind ).toLatin1().data() );
+      _PTR(SObject) pMesh = SMESH::getStudy()->FindObjectID( entry( ind ).toLatin1().data() );
       SMESHGUI_PrecomputeOp::getAssignedAlgos( pMesh, modeMap );
       if ( modeMap.size() > 1 )
         return (( modeMap.contains( SMESH::DIM_3D )) ||
       SMESHGUI_PrecomputeOp::getAssignedAlgos( pMesh, modeMap );
       if ( modeMap.size() > 1 )
         return (( modeMap.contains( SMESH::DIM_3D )) ||
@@ -592,7 +590,7 @@ bool SMESHGUI_Selection::hasGeomReference( int ind ) const
 {
   if ( ind >= 0 && ind < myTypes.count() && myTypes[ind] != "Unknown" )
   {
 {
   if ( ind >= 0 && ind < myTypes.count() && myTypes[ind] != "Unknown" )
   {
-    _PTR(SObject) so = SMESH::GetActiveStudyDocument()->FindObjectID( entry( ind ).toLatin1().data() );
+    _PTR(SObject) so = SMESH::getStudy()->FindObjectID( entry( ind ).toLatin1().data() );
     GEOM::GEOM_Object_var shape = SMESH::GetShapeOnMeshOrSubMesh( so );
     return !shape->_is_nil();
   }
     GEOM::GEOM_Object_var shape = SMESH::GetShapeOnMeshOrSubMesh( so );
     return !shape->_is_nil();
   }
@@ -609,7 +607,7 @@ bool SMESHGUI_Selection::isEditableHyp( int ind ) const
   bool isEditable = true;
   if ( ind >= 0 && ind < myTypes.count() && myTypes[ind] == "Hypothesis" )
   {
   bool isEditable = true;
   if ( ind >= 0 && ind < myTypes.count() && myTypes[ind] == "Hypothesis" )
   {
-    _PTR(SObject) so = SMESH::GetActiveStudyDocument()->FindObjectID( entry( ind ).toLatin1().data() );
+    _PTR(SObject) so = SMESH::getStudy()->FindObjectID( entry( ind ).toLatin1().data() );
     SMESH::SMESH_Hypothesis_var hyp = SMESH::SObjectToInterface<SMESH::SMESH_Hypothesis>( so );
     if ( !hyp->_is_nil() )
     {
     SMESH::SMESH_Hypothesis_var hyp = SMESH::SObjectToInterface<SMESH::SMESH_Hypothesis>( so );
     if ( !hyp->_is_nil() )
     {
@@ -646,9 +644,9 @@ bool SMESHGUI_Selection::hasChildren( int ind ) const
 {
   if ( ind >= 0 )
   {
 {
   if ( ind >= 0 )
   {
-    _PTR(SObject) sobj = SMESH::GetActiveStudyDocument()->FindObjectID( entry( ind ).toLatin1().data() );
+    _PTR(SObject) sobj = SMESH::getStudy()->FindObjectID( entry( ind ).toLatin1().data() );
     if ( sobj ) 
     if ( sobj ) 
-      return SMESH::GetActiveStudyDocument()->GetUseCaseBuilder()->HasChildren( sobj );
+      return SMESH::getStudy()->GetUseCaseBuilder()->HasChildren( sobj );
   }
   return false;
 }
   }
   return false;
 }
@@ -663,9 +661,10 @@ int SMESHGUI_Selection::nbChildren( int ind ) const
   int nb = 0;
   if ( ind >= 0 )
   {
   int nb = 0;
   if ( ind >= 0 )
   {
-    _PTR(SObject) sobj = SMESH::GetActiveStudyDocument()->FindObjectID( entry( ind ).toLatin1().data() );
-    if ( sobj && sobj->GetStudy()->GetUseCaseBuilder()->IsUseCaseNode( sobj ) ) {
-      _PTR(UseCaseIterator) it = sobj->GetStudy()->GetUseCaseBuilder()->GetUseCaseIterator( sobj ); 
+    _PTR(Study) study = SMESH::getStudy();
+    _PTR(SObject) sobj = study->FindObjectID( entry( ind ).toLatin1().data() );
+    if ( sobj && study->GetUseCaseBuilder()->IsUseCaseNode( sobj ) ) {
+      _PTR(UseCaseIterator) it = study->GetUseCaseBuilder()->GetUseCaseIterator( sobj );
       for ( it->Init( false ); it->More(); it->Next() ) nb++;
     }
   }
       for ( it->Init( false ); it->More(); it->Next() ) nb++;
     }
   }
@@ -687,10 +686,10 @@ bool SMESHGUI_Selection::isContainer( int ind ) const
 //purpose  : 
 //=======================================================================
 
 //purpose  : 
 //=======================================================================
 
-int SMESHGUI_Selection::type( const QString& entry, _PTR(Study) study )
+int SMESHGUI_Selection::type( const QString& entry )
 {
   int res = -1;
 {
   int res = -1;
-  _PTR(SObject) obj = study->FindObjectID( entry.toLatin1().data() );
+  _PTR(SObject) obj = SalomeApp_Application::getStudy()->FindObjectID( entry.toLatin1().data() );
   if ( obj ) {
     _PTR(SObject) ref;
     if ( obj->ReferencedObject( ref ) )
   if ( obj ) {
     _PTR(SObject) ref;
     if ( obj->ReferencedObject( ref ) )
@@ -786,7 +785,7 @@ QString SMESHGUI_Selection::typeName( const int t )
 bool SMESHGUI_Selection::isImported( const int ind ) const
 {
   bool res = false;
 bool SMESHGUI_Selection::isImported( const int ind ) const
 {
   bool res = false;
-  _PTR(SObject) sobj = SMESH::GetActiveStudyDocument()->FindObjectID( entry( ind ).toLatin1().constData() );
+  _PTR(SObject) sobj = SMESH::getStudy()->FindObjectID( entry( ind ).toLatin1().constData() );
   if ( sobj )
   {
     SMESH::SMESH_Mesh_var aMesh = SMESH::SMESH_Mesh::_narrow( SMESH::SObjectToObject( sobj ) );
   if ( sobj )
   {
     SMESH::SMESH_Mesh_var aMesh = SMESH::SMESH_Mesh::_narrow( SMESH::SObjectToObject( sobj ) );
@@ -816,7 +815,7 @@ int SMESHGUI_Selection::guiState()
 
 QString SMESHGUI_Selection::groupType( int ind ) const
 {
 
 QString SMESHGUI_Selection::groupType( int ind ) const
 {
-  _PTR(SObject) sobj = SMESH::GetActiveStudyDocument()->FindObjectID( entry( ind ).toLatin1().constData() );
+  _PTR(SObject) sobj = SMESH::getStudy()->FindObjectID( entry( ind ).toLatin1().constData() );
   if ( sobj )
   {
     SMESH::SMESH_Group_var g = SMESH::SObjectToInterface<SMESH::SMESH_Group>( sobj );
   if ( sobj )
   {
     SMESH::SMESH_Group_var g = SMESH::SObjectToInterface<SMESH::SMESH_Group>( sobj );
index 71690c7137dfbe63f99ccda2ab828ed6a1502ea6..115b0e46f60ef1e6845ab64a81d6cca4afaa15f3 100644 (file)
@@ -85,7 +85,7 @@ public:
   
   SMESH_Actor*            getActor( int ) const;
 
   
   SMESH_Actor*            getActor( int ) const;
 
-  static int              type( const QString&, _PTR(Study) );
+  static int              type( const QString& );
   static QString          typeName( const int );
   static  int             guiState();
   
   static QString          typeName( const int );
   static  int             guiState();
   
index ca551105a5db5d68f9f9ababf00ecf2a9c66abb0..ed560b87ee5400108f0be8733d2db59ea87be068 100644 (file)
@@ -295,36 +295,28 @@ SVTK_Selector* SMESHGUI_SelectionOp::selector() const
 //=======================================================================
 int SMESHGUI_SelectionOp::typeById( const QString& str, const EntityType objtype ) const
 {
 //=======================================================================
 int SMESHGUI_SelectionOp::typeById( const QString& str, const EntityType objtype ) const
 {
-  SalomeApp_Study* _study = dynamic_cast<SalomeApp_Study*>( study() );
-  if( !_study )
-    return -1;
-
-  _PTR( Study ) st = _study->studyDS();
+  _PTR(Study) aStudy = SMESH::getStudy();
 
   int res = -1;
   if( objtype == Object )
   {
 
   int res = -1;
   if( objtype == Object )
   {
-    SalomeApp_Study* _study = dynamic_cast<SalomeApp_Study*>( study() );
-    if( _study )
+    int t = SMESHGUI_Selection::type( str );
+    if( t<0 )
     {
     {
-      int t = SMESHGUI_Selection::type( str, _study->studyDS() );
-      if( t<0 )
+      //try to get GEOM type
+      _PTR( SObject ) sobj = aStudy->FindObjectID( str.toLatin1().data() );
+      if( sobj )
       {
       {
-        //try to get GEOM type
-        _PTR( SObject ) sobj = st->FindObjectID( str.toLatin1().data() );
-        if( sobj )
-        {
-          GEOM::GEOM_Object_var obj = GEOM::GEOM_Object::_narrow(
-            dynamic_cast<SALOMEDS_SObject*>( sobj.get() )->GetObject() );
-          if( !CORBA::is_nil( obj ) )
-            // as decoding of type id is not realized in LightApp_Dialog,
-            //make all GEOM objects have same type id
-            res = SMESHGUI_Dialog::prefix( "GEOM" );// + obj->GetType();
-        }
+        GEOM::GEOM_Object_var obj = GEOM::GEOM_Object::_narrow(
+          dynamic_cast<SALOMEDS_SObject*>( sobj.get() )->GetObject() );
+        if( !CORBA::is_nil( obj ) )
+          // as decoding of type id is not realized in LightApp_Dialog,
+          //make all GEOM objects have same type id
+          res = SMESHGUI_Dialog::prefix( "GEOM" );// + obj->GetType();
       }
       }
-      else
-        res = SMESHGUI_Dialog::prefix( "SMESH" ) + t;
     }
     }
+    else
+      res = SMESHGUI_Dialog::prefix( "SMESH" ) + t;
   }
   else
   {
   }
   else
   {
@@ -335,7 +327,7 @@ int SMESHGUI_SelectionOp::typeById( const QString& str, const EntityType objtype
     int id = _id.toInt( &ok );
     if( ok )
     {
     int id = _id.toInt( &ok );
     if( ok )
     {
-      _PTR( SObject ) sobj = st->FindObjectID( entry.toLatin1().data() );
+      _PTR( SObject ) sobj = aStudy->FindObjectID( entry.toLatin1().data() );
       SMESH::SMESH_Mesh_var mesh = SMESH::SMESH_Mesh::_narrow( 
         dynamic_cast<SALOMEDS_SObject*>( sobj.get() )->GetObject() );
       SMESH::SMESH_subMesh_var submesh = SMESH::SMESH_subMesh::_narrow( 
       SMESH::SMESH_Mesh_var mesh = SMESH::SMESH_Mesh::_narrow( 
         dynamic_cast<SALOMEDS_SObject*>( sobj.get() )->GetObject() );
       SMESH::SMESH_subMesh_var submesh = SMESH::SMESH_subMesh::_narrow( 
@@ -422,13 +414,9 @@ void SMESHGUI_SelectionOp::selected( QStringList& names,
       QString id = anIt.Value()->getEntry();
       ids.append( id );
       types.append( typeById( id, Object ) );
       QString id = anIt.Value()->getEntry();
       ids.append( id );
       types.append( typeById( id, Object ) );
-      SalomeApp_Study* _study = dynamic_cast<SalomeApp_Study*>( study() );
-      if( _study )
-      {
-        _PTR(SObject) obj = _study->studyDS()->FindObjectID( anIt.Value()->getEntry() );
-        if( obj )
-          names.append( QString( obj->GetName().c_str() ).trimmed() );
-      }
+      _PTR(SObject) obj = SMESH::getStudy()->FindObjectID( anIt.Value()->getEntry() );
+      if( obj )
+        names.append( QString( obj->GetName().c_str() ).trimmed() );
     }
   }
 }
     }
   }
 }
index 22253c4d69caec10655af62a565c787b09d98365..27dfe06e75e49695312599ab83ce2a0f6bf61e3e 100644 (file)
@@ -1293,7 +1293,7 @@ void SMESHGUI_SewingDlg::onSwapClicked()
 //=================================================================================
 bool SMESHGUI_SewingDlg::ClickOnApply()
 {
 //=================================================================================
 bool SMESHGUI_SewingDlg::ClickOnApply()
 {
-  if (mySMESHGUI->isActiveStudyLocked())
+  if (SMESHGUI::isStudyLocked())
     return false;
 
   bool aResult = false;
     return false;
 
   bool aResult = false;
index 6bff0c7ece87d602dad77ff6046b3e1f155ad505..5d82de8bebb4970fd87b28a13febf0ceba41d897 100644 (file)
@@ -319,13 +319,12 @@ void SMESHGUI_ShapeByMeshOp::commitOperation()
     else
     {
       GEOM::GEOM_Gen_var geomGen = SMESH::GetGEOMGen();
     else
     {
       GEOM::GEOM_Gen_var geomGen = SMESH::GetGEOMGen();
-      _PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
 
 
-      if (geomGen->_is_nil() || !aStudy)
+      if (geomGen->_is_nil())
         return;
 
       GEOM::GEOM_IShapesOperations_wrap aShapesOp =
         return;
 
       GEOM::GEOM_IShapesOperations_wrap aShapesOp =
-        geomGen->GetIShapesOperations(aStudy->StudyId());
+        geomGen->GetIShapesOperations();
       if (aShapesOp->_is_nil() )
         return;
 
       if (aShapesOp->_is_nil() )
         return;
 
@@ -364,7 +363,7 @@ void SMESHGUI_ShapeByMeshOp::commitOperation()
       else if (aNumberOfGO > 1)
       {
         GEOM::GEOM_IGroupOperations_wrap aGroupOp =
       else if (aNumberOfGO > 1)
       {
         GEOM::GEOM_IGroupOperations_wrap aGroupOp =
-          geomGen->GetIGroupOperations(aStudy->StudyId());
+          geomGen->GetIGroupOperations();
         if(aGroupOp->_is_nil())
           return;
 
         if(aGroupOp->_is_nil())
           return;
 
@@ -386,9 +385,8 @@ void SMESHGUI_ShapeByMeshOp::commitOperation()
 
       // publish the GEOM object in study
       QString aNewGeomGroupName ( myDlg->myGeomName->text() );
 
       // publish the GEOM object in study
       QString aNewGeomGroupName ( myDlg->myGeomName->text() );
-      SALOMEDS::Study_var aStudyVar = _CAST(Study,aStudy)->GetStudy();
       SALOMEDS::SObject_wrap aNewGroupSO =
       SALOMEDS::SObject_wrap aNewGroupSO =
-        geomGen->AddInStudy( aStudyVar, aGeomObject, 
+        geomGen->AddInStudy( aGeomObject,
                              aNewGeomGroupName.toLatin1().data(), aMeshShape);
 
       // get a GEOM_Object already published, which doesn't need UnRegister()
                              aNewGeomGroupName.toLatin1().data(), aMeshShape);
 
       // get a GEOM_Object already published, which doesn't need UnRegister()
index 08424f6d49a6d91fe65eae2ac847c5092df9ecf9..a95ce564867721648425315dbbb3ca41bc96f680 100755 (executable)
@@ -493,7 +493,7 @@ void SMESHGUI_SingleEditDlg::enterEvent (QEvent*)
 //=================================================================================
 bool SMESHGUI_SingleEditDlg::onApply()
 {
 //=================================================================================
 bool SMESHGUI_SingleEditDlg::onApply()
 {
-  if (mySMESHGUI->isActiveStudyLocked())
+  if (SMESHGUI::isStudyLocked())
     return false;
   // verify validity of input data
   if (!isValid(true))
     return false;
   // verify validity of input data
   if (!isValid(true))
index caa4c51194fd1f1de33e69da4e28144d19cace2c..3f79c3292f28fee5482d190a51deff9a976d0e4f 100644 (file)
@@ -341,7 +341,7 @@ void SMESHGUI_SmoothingDlg::Init()
 //=================================================================================
 bool SMESHGUI_SmoothingDlg::ClickOnApply()
 {
 //=================================================================================
 bool SMESHGUI_SmoothingDlg::ClickOnApply()
 {
-  if (mySMESHGUI->isActiveStudyLocked())
+  if (SMESHGUI::isStudyLocked())
     return false;
 
   if (!isValid())
     return false;
 
   if (!isValid())
index 71cca13a5fcbd77f3b4014f47a945258b98a86ab..75e03affbc832b5109a83cc0ef97f0fda2c7384f 100644 (file)
@@ -202,7 +202,7 @@ bool SMESHGUI_SplitBiQuadOp::onApply()
   int nbObj = 0;
   for ( int i = 0; i < entries.count() ; ++i )
   {
   int nbObj = 0;
   for ( int i = 0; i < entries.count() ; ++i )
   {
-    _PTR(SObject) pObj = studyDS()->FindObjectID( entries[i].toLatin1().data() );
+    _PTR(SObject) pObj = SMESH::getStudy()->FindObjectID( entries[i].toLatin1().data() );
     SMESH::SMESH_IDSource_var obj = SMESH::SObjectToInterface<SMESH::SMESH_IDSource>( pObj );
     if( !CORBA::is_nil( obj ))
     {
     SMESH::SMESH_IDSource_var obj = SMESH::SObjectToInterface<SMESH::SMESH_IDSource>( pObj );
     if( !CORBA::is_nil( obj ))
     {
index e6886021ad769e40218d413116f1c0ffd04f4254..f994189fd2df0932fe2c40f7dd43e79c54e070ec 100644 (file)
@@ -474,7 +474,7 @@ void SMESHGUI_SymmetryDlg::ConstructorsClicked (int constructorId)
 //=================================================================================
 bool SMESHGUI_SymmetryDlg::ClickOnApply()
 {
 //=================================================================================
 bool SMESHGUI_SymmetryDlg::ClickOnApply()
 {
-  if (mySMESHGUI->isActiveStudyLocked())
+  if (SMESHGUI::isStudyLocked())
     return false;
 
   if( !isValid() )
     return false;
 
   if( !isValid() )
index 75e5635bfa59a153b34e9938ac52e9e4a1259423..21342aebd88abef9f96f027c89ac26ab713ecb64 100644 (file)
@@ -475,7 +475,7 @@ void SMESHGUI_TranslationDlg::ConstructorsClicked (int constructorId)
 //=================================================================================
 bool SMESHGUI_TranslationDlg::ClickOnApply()
 {
 //=================================================================================
 bool SMESHGUI_TranslationDlg::ClickOnApply()
 {
-  if (mySMESHGUI->isActiveStudyLocked())
+  if (SMESHGUI::isStudyLocked())
     return false;
 
   if( !isValid() )
     return false;
 
   if( !isValid() )
index 21f74593fbde626c20cdcba8a1061971d4209417..e6fdb1c157d7aa469158bd37b1e59ea8dd56259c 100644 (file)
@@ -76,12 +76,6 @@ namespace SMESH
     return SUIT_Session::session()->resourceMgr();
   }
 
     return SUIT_Session::session()->resourceMgr();
   }
 
-  _PTR(Study)
-  GetCStudy(const SalomeApp_Study* theStudy)
-  {
-    return theStudy->studyDS();
-  }
-
   CORBA::Object_var 
   DataOwnerToObject(const LightApp_DataOwnerPtr& theOwner)
   {
   CORBA::Object_var 
   DataOwnerToObject(const LightApp_DataOwnerPtr& theOwner)
   {
@@ -90,9 +84,8 @@ namespace SMESH
       const Handle(SALOME_InteractiveObject)& anIO = theOwner->IO();
       if(!anIO.IsNull()){
         if(anIO->hasEntry()){
       const Handle(SALOME_InteractiveObject)& anIO = theOwner->IO();
       if(!anIO.IsNull()){
         if(anIO->hasEntry()){
-          _PTR(Study) aStudy = GetActiveStudyDocument();
-          _PTR(SObject) aSObj = aStudy->FindObjectID(anIO->getEntry());
-          anObj = SObjectToObject(aSObj,aStudy);
+          _PTR(SObject) aSObj = getStudy()->FindObjectID(anIO->getEntry());
+          anObj = SObjectToObject(aSObj);
         }
       }
     }
         }
       }
     }
@@ -118,13 +111,12 @@ namespace SMESH
       return NULL;
   }
 
       return NULL;
   }
 
-  _PTR(Study) GetActiveStudyDocument()
+  _PTR(Study) getStudy()
   {
   {
-    SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>(GetActiveStudy());
-    if (aStudy)
-      return aStudy->studyDS();
-    else
-      return _PTR(Study)();
+    static _PTR(Study) _study;
+    if(!_study)
+      _study = SalomeApp_Application::getStudy();
+    return _study;
   }
 
   _PTR(SObject) FindSObject (CORBA::Object_ptr theObject)
   }
 
   _PTR(SObject) FindSObject (CORBA::Object_ptr theObject)
@@ -132,26 +124,23 @@ namespace SMESH
     SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>
       (SUIT_Session::session()->activeApplication());
     if (app && !CORBA::is_nil(theObject)) {
     SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>
       (SUIT_Session::session()->activeApplication());
     if (app && !CORBA::is_nil(theObject)) {
-      if(_PTR(Study) aStudy = GetActiveStudyDocument()){
-        CORBA::String_var anIOR = app->orb()->object_to_string(theObject);
-        if (strcmp(anIOR.in(), "") != 0)
-          return aStudy->FindObjectIOR(anIOR.in());
-      }
+      CORBA::String_var anIOR = app->orb()->object_to_string(theObject);
+      if (strcmp(anIOR.in(), "") != 0)
+        return getStudy()->FindObjectIOR(anIOR.in());
     }
     return _PTR(SObject)();
   }
 
   void SetName (_PTR(SObject) theSObject, const QString& theName)
   {
     }
     return _PTR(SObject)();
   }
 
   void SetName (_PTR(SObject) theSObject, const QString& theName)
   {
-    _PTR(Study) aStudy = GetActiveStudyDocument();
-    if (aStudy->GetProperties()->IsLocked())
+    if (getStudy()->GetProperties()->IsLocked())
       return;
     SMESHGUI::GetSMESHGen()->SetName(theSObject->GetIOR().c_str(), theName.toLatin1().data());
   }
 
   void SetValue (_PTR(SObject) theSObject, const QString& theValue)
   {
       return;
     SMESHGUI::GetSMESHGen()->SetName(theSObject->GetIOR().c_str(), theName.toLatin1().data());
   }
 
   void SetValue (_PTR(SObject) theSObject, const QString& theValue)
   {
-    _PTR(Study) aStudy = GetActiveStudyDocument();
+    _PTR(Study) aStudy = getStudy();
     if (aStudy->GetProperties()->IsLocked())
       return;
     _PTR(StudyBuilder) aBuilder = aStudy->NewBuilder();
     if (aStudy->GetProperties()->IsLocked())
       return;
     _PTR(StudyBuilder) aBuilder = aStudy->NewBuilder();
@@ -164,7 +153,7 @@ namespace SMESH
   
   void setFileName (_PTR(SObject) theSObject, const QString& theValue)
   {
   
   void setFileName (_PTR(SObject) theSObject, const QString& theValue)
   {
-    _PTR(Study) aStudy = GetActiveStudyDocument();
+    _PTR(Study) aStudy = getStudy();
     if (aStudy->GetProperties()->IsLocked())
       return;
     _PTR(StudyBuilder) aBuilder = aStudy->NewBuilder();
     if (aStudy->GetProperties()->IsLocked())
       return;
     _PTR(StudyBuilder) aBuilder = aStudy->NewBuilder();
@@ -177,7 +166,7 @@ namespace SMESH
   
   void setFileType (_PTR(SObject) theSObject, const QString& theValue)
   {
   
   void setFileType (_PTR(SObject) theSObject, const QString& theValue)
   {
-    _PTR(Study) aStudy = GetActiveStudyDocument();
+    _PTR(Study) aStudy = getStudy();
     if (aStudy->GetProperties()->IsLocked())
       return;
     _PTR(StudyBuilder) aBuilder = aStudy->NewBuilder();
     if (aStudy->GetProperties()->IsLocked())
       return;
     _PTR(StudyBuilder) aBuilder = aStudy->NewBuilder();
@@ -188,8 +177,7 @@ namespace SMESH
       aFileType->SetValue(theValue.toLatin1().data());
   }
 
       aFileType->SetValue(theValue.toLatin1().data());
   }
 
-  CORBA::Object_var SObjectToObject (_PTR(SObject) theSObject,
-                                     _PTR(Study)   /*theStudy*/)
+  CORBA::Object_var SObjectToObject (_PTR(SObject) theSObject )
   {
     SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>
       (SUIT_Session::session()->activeApplication());
   {
     SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>
       (SUIT_Session::session()->activeApplication());
@@ -207,12 +195,6 @@ namespace SMESH
     return CORBA::Object::_nil();
   }
 
     return CORBA::Object::_nil();
   }
 
-  CORBA::Object_var SObjectToObject (_PTR(SObject) theSObject)
-  {
-    _PTR(Study) aStudy;// = GetActiveStudyDocument(); -- aStudy is not used
-    return SObjectToObject(theSObject,aStudy);
-  }
-
   _PTR(SObject) ObjectToSObject( CORBA::Object_ptr theObject )
   {
     _PTR(SObject) res;
   _PTR(SObject) ObjectToSObject( CORBA::Object_ptr theObject )
   {
     _PTR(SObject) res;
@@ -220,9 +202,8 @@ namespace SMESH
       (SUIT_Session::session()->activeApplication());
     if ( app ) {
       CORBA::String_var ior = app->orb()->object_to_string( theObject );
       (SUIT_Session::session()->activeApplication());
     if ( app ) {
       CORBA::String_var ior = app->orb()->object_to_string( theObject );
-      SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
-      if ( study && strlen( ior ) > 0 )
-        res = study->studyDS()->FindObjectIOR( ior.in() );
+      if ( strlen( ior ) > 0 )
+        res = getStudy()->FindObjectIOR( ior.in() );
     }
     return res;
   }
     }
     return res;
   }
@@ -231,9 +212,8 @@ namespace SMESH
   {
     if (!theIO.IsNull()) {
       if (theIO->hasEntry()) {
   {
     if (!theIO.IsNull()) {
       if (theIO->hasEntry()) {
-        _PTR(Study) aStudy = GetActiveStudyDocument();
-        _PTR(SObject) anObj = aStudy->FindObjectID(theIO->getEntry());
-        return SObjectToObject(anObj,aStudy);
+        _PTR(SObject) anObj = getStudy()->FindObjectID(theIO->getEntry());
+        return SObjectToObject(anObj);
       }
     }
     return CORBA::Object::_nil();
       }
     }
     return CORBA::Object::_nil();
@@ -279,8 +259,8 @@ namespace SMESH
 
   void ModifiedMesh (_PTR(SObject) theSObject, bool theIsNotModif, bool isEmptyMesh)
   {
 
   void ModifiedMesh (_PTR(SObject) theSObject, bool theIsNotModif, bool isEmptyMesh)
   {
-    _PTR(Study) aStudy = GetActiveStudyDocument();
-    if ( !aStudy || aStudy->GetProperties()->IsLocked() )
+    _PTR(Study) aStudy = getStudy();
+    if ( !aStudy || aStudy->GetProperties()->IsLocked())
       return;
 
     _PTR(StudyBuilder) aBuilder = aStudy->NewBuilder();
       return;
 
     _PTR(StudyBuilder) aBuilder = aStudy->NewBuilder();
@@ -314,7 +294,7 @@ namespace SMESH
           aPixmap = anAttr;
 
           std::string entry = aSObj1->GetID();
           aPixmap = anAttr;
 
           std::string entry = aSObj1->GetID();
-          int objType = SMESHGUI_Selection::type( entry.c_str(), aStudy );
+          int objType = SMESHGUI_Selection::type( entry.c_str() );
           if ( objType == SMESH::HYPOTHESIS || objType == SMESH::ALGORITHM )
             continue;
 
           if ( objType == SMESH::HYPOTHESIS || objType == SMESH::ALGORITHM )
             continue;
 
index 5b2e0b89ba662fb1caa7aa102767b8e7f04a880c..4a1a1c600fbf7659f3b90103df606f4782854be7 100644 (file)
@@ -80,10 +80,6 @@ SMESHGUI_EXPORT
 SMESHGUI_EXPORT
   SUIT_ResourceMgr*
   GetResourceMgr( const SalomeApp_Module* );
 SMESHGUI_EXPORT
   SUIT_ResourceMgr*
   GetResourceMgr( const SalomeApp_Module* );
-  
-SMESHGUI_EXPORT
-  _PTR(Study)
-  GetCStudy( const SalomeApp_Study* );
 
 SMESHGUI_EXPORT
   CORBA::Object_var DataOwnerToObject( const LightApp_DataOwnerPtr& );
 
 SMESHGUI_EXPORT
   CORBA::Object_var DataOwnerToObject( const LightApp_DataOwnerPtr& );
@@ -104,7 +100,7 @@ SMESHGUI_EXPORT
   SUIT_ViewWindow* GetActiveWindow();
 
 SMESHGUI_EXPORT
   SUIT_ViewWindow* GetActiveWindow();
 
 SMESHGUI_EXPORT
-  _PTR(Study) GetActiveStudyDocument();
+  _PTR(Study) getStudy();
 
 SMESHGUI_EXPORT
   _PTR(SObject) FindSObject( CORBA::Object_ptr );
 
 SMESHGUI_EXPORT
   _PTR(SObject) FindSObject( CORBA::Object_ptr );
@@ -117,10 +113,6 @@ SMESHGUI_EXPORT
   void setFileType( _PTR(SObject), const QString& );
   void setFileName( _PTR(SObject), const QString& );
 
   void setFileType( _PTR(SObject), const QString& );
   void setFileName( _PTR(SObject), const QString& );
 
-SMESHGUI_EXPORT
-  CORBA::Object_var SObjectToObject( _PTR(SObject),
-                                     _PTR(Study) );
-
 SMESHGUI_EXPORT
   CORBA::Object_var SObjectToObject( _PTR(SObject) );
 
 SMESHGUI_EXPORT
   CORBA::Object_var SObjectToObject( _PTR(SObject) );
 
index 5c5bbab522936705450cfde8bf5554ba1045539b..98fcb550d8be0aa0c4fb60ab638dad1f985e0ab9 100644 (file)
@@ -76,7 +76,7 @@
 
 namespace SMESH
 {
 
 namespace SMESH
 {
-  typedef std::map<TKeyOfVisualObj,TVisualObjPtr> TVisualObjCont;
+  typedef std::map<std::string,TVisualObjPtr> TVisualObjCont;
   static TVisualObjCont VISUAL_OBJ_CONT;
 
   //=============================================================================
   static TVisualObjCont VISUAL_OBJ_CONT;
 
   //=============================================================================
@@ -136,17 +136,13 @@ namespace SMESH
       }
     }
     
       }
     }
     
-    if (aViewManager ) {
-      int aStudyId = aViewManager->study()->id();
-      TVisualObjCont::key_type aKey(aStudyId,theEntry);
-      TVisualObjCont::iterator anIter = VISUAL_OBJ_CONT.find(aKey);
-      if(anIter != VISUAL_OBJ_CONT.end()) {
-        // for unknown reason, object destructor is not called, so clear object manually
-        anIter->second->GetUnstructuredGrid()->SetCells(0,0,0,0,0);
-        anIter->second->GetUnstructuredGrid()->SetPoints(0);
-      }
-      VISUAL_OBJ_CONT.erase(aKey);
+    TVisualObjCont::iterator anIter = VISUAL_OBJ_CONT.find(theEntry);
+    if(anIter != VISUAL_OBJ_CONT.end()) {
+      // for unknown reason, object destructor is not called, so clear object manually
+      anIter->second->GetUnstructuredGrid()->SetCells(0,0,0,0,0);
+      anIter->second->GetUnstructuredGrid()->SetPoints(0);
     }
     }
+    VISUAL_OBJ_CONT.erase(theEntry);
 
     if(actorRemoved)
       aStudy->setVisibilityState(theEntry, Qtx::HiddenState);
 
     if(actorRemoved)
       aStudy->setVisibilityState(theEntry, Qtx::HiddenState);
@@ -199,7 +195,7 @@ namespace SMESH
    */
   //================================================================================
 
    */
   //================================================================================
 
-  void RemoveVisuData(int studyID)
+  void RemoveVisuData()
   {
     SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>
       ( SUIT_Session::session()->activeApplication() );
   {
     SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>
       ( SUIT_Session::session()->activeApplication() );
@@ -207,8 +203,7 @@ namespace SMESH
     ViewManagerList viewMgrs = app->viewManagers();
     for ( int iM = 0; iM < viewMgrs.count(); ++iM ) {
       SUIT_ViewManager* aViewManager = viewMgrs.at( iM );
     ViewManagerList viewMgrs = app->viewManagers();
     for ( int iM = 0; iM < viewMgrs.count(); ++iM ) {
       SUIT_ViewManager* aViewManager = viewMgrs.at( iM );
-      if ( aViewManager && aViewManager->getType() == SVTK_Viewer::Type() &&
-           aViewManager->study()->id() == studyID ) {
+      if ( aViewManager && aViewManager->getType() == SVTK_Viewer::Type() ) {
         QVector<SUIT_ViewWindow*> views = aViewManager->getViews();
         for ( int iV = 0; iV < views.count(); ++iV ) {
           if(SVTK_ViewWindow* vtkWnd = GetVtkViewWindow(views[iV])) {
         QVector<SUIT_ViewWindow*> views = aViewManager->getViews();
         for ( int iV = 0; iV < views.count(); ++iV ) {
           if(SVTK_ViewWindow* vtkWnd = GetVtkViewWindow(views[iV])) {
@@ -229,16 +224,10 @@ namespace SMESH
     }
     TVisualObjCont::iterator anIter = VISUAL_OBJ_CONT.begin();
     for ( ; anIter != VISUAL_OBJ_CONT.end(); ) {
     }
     TVisualObjCont::iterator anIter = VISUAL_OBJ_CONT.begin();
     for ( ; anIter != VISUAL_OBJ_CONT.end(); ) {
-      int curId = anIter->first.first;
-      if ( curId == studyID ) {
-        // for unknown reason, object destructor is not called, so clear object manually
-        anIter->second->GetUnstructuredGrid()->SetCells(0,0,0,0,0);
-        anIter->second->GetUnstructuredGrid()->SetPoints(0);
-        VISUAL_OBJ_CONT.erase( anIter++ ); // anIter++ returns a copy of self before incrementing
-      }
-      else {
-        anIter++;
-      }
+      // for unknown reason, object destructor is not called, so clear object manually
+      anIter->second->GetUnstructuredGrid()->SetCells(0,0,0,0,0);
+      anIter->second->GetUnstructuredGrid()->SetPoints(0);
+      VISUAL_OBJ_CONT.erase( anIter++ ); // anIter++ returns a copy of self before incrementing
     }
   }
 
     }
   }
 
@@ -278,18 +267,17 @@ namespace SMESH
    */
   //================================================================================
 
    */
   //================================================================================
 
-  TVisualObjPtr GetVisualObj(int theStudyId, const char* theEntry, bool nulData){
+  TVisualObjPtr GetVisualObj(const char* theEntry, bool nulData){
     TVisualObjPtr aVisualObj;
     TVisualObjPtr aVisualObj;
-    TVisualObjCont::key_type aKey(theStudyId,theEntry);
     try{
       OCC_CATCH_SIGNALS;
     try{
       OCC_CATCH_SIGNALS;
-      TVisualObjCont::iterator anIter = VISUAL_OBJ_CONT.find(aKey);
+      TVisualObjCont::iterator anIter = VISUAL_OBJ_CONT.find(theEntry);
       if(anIter != VISUAL_OBJ_CONT.end()){
         aVisualObj = anIter->second;
       }else{
         SalomeApp_Application* app =
           dynamic_cast<SalomeApp_Application*>( SMESHGUI::activeStudy()->application() );
       if(anIter != VISUAL_OBJ_CONT.end()){
         aVisualObj = anIter->second;
       }else{
         SalomeApp_Application* app =
           dynamic_cast<SalomeApp_Application*>( SMESHGUI::activeStudy()->application() );
-        _PTR(Study) aStudy = SMESHGUI::activeStudy()->studyDS();
+        _PTR(Study) aStudy = SMESH::getStudy();
         _PTR(SObject) aSObj = aStudy->FindObjectID(theEntry);
         if(aSObj){
           _PTR(GenericAttribute) anAttr;
         _PTR(SObject) aSObj = aStudy->FindObjectID(theEntry);
         if(aSObj){
           _PTR(GenericAttribute) anAttr;
@@ -302,7 +290,7 @@ namespace SMESH
               SMESH::SMESH_Mesh_var aMesh = SMESH::SMESH_Mesh::_narrow(anObj);
               if(!aMesh->_is_nil()){
                 aVisualObj.reset(new SMESH_MeshObj(aMesh));
               SMESH::SMESH_Mesh_var aMesh = SMESH::SMESH_Mesh::_narrow(anObj);
               if(!aMesh->_is_nil()){
                 aVisualObj.reset(new SMESH_MeshObj(aMesh));
-                TVisualObjCont::value_type aValue(aKey,aVisualObj);
+                TVisualObjCont::value_type aValue(theEntry,aVisualObj);
                 VISUAL_OBJ_CONT.insert(aValue);
               }
               //Try narrow to SMESH_Group interface
                 VISUAL_OBJ_CONT.insert(aValue);
               }
               //Try narrow to SMESH_Group interface
@@ -313,10 +301,10 @@ namespace SMESH
                 aFatherSObj = aFatherSObj->GetFather();
                 if(!aFatherSObj) return aVisualObj;
                 CORBA::String_var anEntry = aFatherSObj->GetID().c_str();
                 aFatherSObj = aFatherSObj->GetFather();
                 if(!aFatherSObj) return aVisualObj;
                 CORBA::String_var anEntry = aFatherSObj->GetID().c_str();
-                TVisualObjPtr aVisObj = GetVisualObj(theStudyId,anEntry.in());
+                TVisualObjPtr aVisObj = GetVisualObj(anEntry.in());
                 if(SMESH_MeshObj* aMeshObj = dynamic_cast<SMESH_MeshObj*>(aVisObj.get())){
                   aVisualObj.reset(new SMESH_GroupObj(aGroup,aMeshObj));
                 if(SMESH_MeshObj* aMeshObj = dynamic_cast<SMESH_MeshObj*>(aVisObj.get())){
                   aVisualObj.reset(new SMESH_GroupObj(aGroup,aMeshObj));
-                  TVisualObjCont::value_type aValue(aKey,aVisualObj);
+                  TVisualObjCont::value_type aValue(theEntry,aVisualObj);
                   VISUAL_OBJ_CONT.insert(aValue);
                 }
               }
                   VISUAL_OBJ_CONT.insert(aValue);
                 }
               }
@@ -328,10 +316,10 @@ namespace SMESH
                 aFatherSObj = aFatherSObj->GetFather();
                 if(!aFatherSObj) return aVisualObj;
                 CORBA::String_var anEntry = aFatherSObj->GetID().c_str();
                 aFatherSObj = aFatherSObj->GetFather();
                 if(!aFatherSObj) return aVisualObj;
                 CORBA::String_var anEntry = aFatherSObj->GetID().c_str();
-                TVisualObjPtr aVisObj = GetVisualObj(theStudyId,anEntry.in());
+                TVisualObjPtr aVisObj = GetVisualObj(anEntry.in());
                 if(SMESH_MeshObj* aMeshObj = dynamic_cast<SMESH_MeshObj*>(aVisObj.get())){
                   aVisualObj.reset(new SMESH_subMeshObj(aSubMesh,aMeshObj));
                 if(SMESH_MeshObj* aMeshObj = dynamic_cast<SMESH_MeshObj*>(aVisObj.get())){
                   aVisualObj.reset(new SMESH_subMeshObj(aSubMesh,aMeshObj));
-                  TVisualObjCont::value_type aValue(aKey,aVisualObj);
+                  TVisualObjCont::value_type aValue(theEntry,aVisualObj);
                   VISUAL_OBJ_CONT.insert(aValue);
                 }
               }
                   VISUAL_OBJ_CONT.insert(aValue);
                 }
               }
@@ -553,7 +541,7 @@ namespace SMESH
       return NULL;
 
     if(!CORBA::is_nil(theObject)){
       return NULL;
 
     if(!CORBA::is_nil(theObject)){
-      _PTR(Study) aStudy = GetActiveStudyDocument();
+      _PTR(Study) aStudy = getStudy();
       CORBA::String_var anIOR = app->orb()->object_to_string( theObject );
       _PTR(SObject) aSObject = aStudy->FindObjectIOR(anIOR.in());
       if(aSObject){
       CORBA::String_var anIOR = app->orb()->object_to_string( theObject );
       _PTR(SObject) aSObject = aStudy->FindObjectIOR(anIOR.in());
       if(aSObject){
@@ -565,14 +553,12 @@ namespace SMESH
   }
 
 
   }
 
 
-  SMESH_Actor* CreateActor(_PTR(Study) theStudy,
-                           const char* theEntry,
+  SMESH_Actor* CreateActor(const char* theEntry,
                            int theIsClear)
   {
     SMESH_Actor *anActor = NULL;
                            int theIsClear)
   {
     SMESH_Actor *anActor = NULL;
-    CORBA::Long anId = theStudy->StudyId();
-    if(TVisualObjPtr aVisualObj = GetVisualObj(anId,theEntry)){
-      _PTR(SObject) aSObj = theStudy->FindObjectID(theEntry);
+    if(TVisualObjPtr aVisualObj = GetVisualObj(theEntry)){
+      _PTR(SObject) aSObj = getStudy()->FindObjectID(theEntry);
       if(aSObj){
         _PTR(GenericAttribute) anAttr;
         if(aSObj->FindAttribute(anAttr,"AttributeName")){
       if(aSObj){
         _PTR(GenericAttribute) anAttr;
         if(aSObj->FindAttribute(anAttr,"AttributeName")){
@@ -645,10 +631,7 @@ namespace SMESH
         Handle(SALOME_InteractiveObject) anIO = theActor->getIO();
         if(anIO->hasEntry()){
           std::string anEntry = anIO->getEntry();
         Handle(SALOME_InteractiveObject) anIO = theActor->getIO();
         if(anIO->hasEntry()){
           std::string anEntry = anIO->getEntry();
-          SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( vtkWnd->getViewManager()->study() );
-          int aStudyId = aStudy->id();
-          TVisualObjCont::key_type aKey(aStudyId,anEntry);
-          VISUAL_OBJ_CONT.erase(aKey);
+          VISUAL_OBJ_CONT.erase(anEntry);
         }
       }
       theActor->Delete();
         }
       }
       theActor->Delete();
@@ -753,13 +736,10 @@ namespace SMESH
             {
               //MESSAGE("---");
               SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>(theWnd->getViewManager()->study());
             {
               //MESSAGE("---");
               SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>(theWnd->getViewManager()->study());
-              _PTR(Study) aDocument = aStudy->studyDS();
-              // Pass non-visual objects (hypotheses, etc.), return true in this case
-              CORBA::Long anId = aDocument->StudyId();
               TVisualObjPtr aVisualObj;
               TVisualObjPtr aVisualObj;
-              if ( (aVisualObj = GetVisualObj(anId,theEntry)) && aVisualObj->IsValid())
+              if ( (aVisualObj = GetVisualObj(theEntry)) && aVisualObj->IsValid())
               {
               {
-                if ((anActor = CreateActor(aDocument,theEntry,true))) {
+                if ((anActor = CreateActor(theEntry,true))) {
                   bool needFitAll = noSmeshActors(theWnd); // fit for the first object only
                   DisplayActor(theWnd,anActor);
                   anActor->SetVisibility(true);
                   bool needFitAll = noSmeshActors(theWnd); // fit for the first object only
                   DisplayActor(theWnd,anActor);
                   anActor->SetVisibility(true);
@@ -827,9 +807,7 @@ namespace SMESH
   bool Update(const Handle(SALOME_InteractiveObject)& theIO, bool theDisplay)
   {
     //MESSAGE("Update");
   bool Update(const Handle(SALOME_InteractiveObject)& theIO, bool theDisplay)
   {
     //MESSAGE("Update");
-    _PTR(Study) aStudy = GetActiveStudyDocument();
-    CORBA::Long anId = aStudy->StudyId();
-    if ( TVisualObjPtr aVisualObj = SMESH::GetVisualObj(anId,theIO->getEntry())) {
+    if ( TVisualObjPtr aVisualObj = SMESH::GetVisualObj(theIO->getEntry())) {
       if ( theDisplay )
         UpdateView(SMESH::eDisplay,theIO->getEntry());
       return true;
       if ( theDisplay )
         UpdateView(SMESH::eDisplay,theIO->getEntry());
       return true;
@@ -840,9 +818,7 @@ namespace SMESH
   bool UpdateNulData(const Handle(SALOME_InteractiveObject)& theIO, bool theDisplay)
   {
     //MESSAGE("UpdateNulData");
   bool UpdateNulData(const Handle(SALOME_InteractiveObject)& theIO, bool theDisplay)
   {
     //MESSAGE("UpdateNulData");
-    _PTR(Study) aStudy = GetActiveStudyDocument();
-    CORBA::Long anId = aStudy->StudyId();
-    if ( TVisualObjPtr aVisualObj = SMESH::GetVisualObj(anId,theIO->getEntry(), true)) {
+    if ( TVisualObjPtr aVisualObj = SMESH::GetVisualObj(theIO->getEntry(), true)) {
       if ( theDisplay )
         UpdateView(SMESH::eDisplay,theIO->getEntry());
       return true;
       if ( theDisplay )
         UpdateView(SMESH::eDisplay,theIO->getEntry());
       return true;
index b1159bd139ede160bfcaf7dff4b1451f8a89603b..217b1995da5f4190a58477e14c7f1a980f62e1a3 100644 (file)
@@ -63,10 +63,9 @@ class vtkActor;
 namespace SMESH
 {
   //----------------------------------------------------------------------------
 namespace SMESH
 {
   //----------------------------------------------------------------------------
-  typedef std::pair<int,std::string> TKeyOfVisualObj;
   
 SMESHGUI_EXPORT
   
 SMESHGUI_EXPORT
-  TVisualObjPtr GetVisualObj( int, const char*, bool nulData =false );
+  TVisualObjPtr GetVisualObj( const char*, bool nulData =false );
 SMESHGUI_EXPORT
   void OnVisuException(); // PAL16631
 
 SMESHGUI_EXPORT
   void OnVisuException(); // PAL16631
 
@@ -103,13 +102,13 @@ SMESHGUI_EXPORT
 
   //----------------------------------------------------------------------------
 SMESHGUI_EXPORT  
 
   //----------------------------------------------------------------------------
 SMESHGUI_EXPORT  
-  SMESH_Actor* CreateActor( _PTR(Study), const char*, int = false );
+  SMESH_Actor* CreateActor( const char*, int = false );
 SMESHGUI_EXPORT
   void DisplayActor( SUIT_ViewWindow*, SMESH_Actor* );
 SMESHGUI_EXPORT
   void RemoveActor( SUIT_ViewWindow*, SMESH_Actor* );
 SMESHGUI_EXPORT
 SMESHGUI_EXPORT
   void DisplayActor( SUIT_ViewWindow*, SMESH_Actor* );
 SMESHGUI_EXPORT
   void RemoveActor( SUIT_ViewWindow*, SMESH_Actor* );
 SMESHGUI_EXPORT
-  void RemoveVisuData( int );
+  void RemoveVisuData();
 
   //----------------------------------------------------------------------------
   enum EDisplaing { eDisplayAll, eDisplay, eDisplayOnly, eErase, eEraseAll };
 
   //----------------------------------------------------------------------------
   enum EDisplaing { eDisplayAll, eDisplay, eDisplayOnly, eErase, eEraseAll };
index aad6899d32debaa1f322d69d3123b24902fe804a..f37334a160308c8759f28b9568fdf5c1ec023b76 100644 (file)
@@ -434,7 +434,7 @@ namespace
     text << "import salome, SMESH\n";
     text << "salome.salome_init()\n";
     text << "from salome.smesh import smeshBuilder\n";
     text << "import salome, SMESH\n";
     text << "salome.salome_init()\n";
     text << "from salome.smesh import smeshBuilder\n";
-    text << "smesh = smeshBuilder.New(salome.myStudy)\n";
+    text << "smesh = smeshBuilder.New()\n";
     text << "m=smesh.Mesh()\n";
     for ( size_t iE = 0; iE < bndSegsPerEdge.size(); ++iE )
     {
     text << "m=smesh.Mesh()\n";
     for ( size_t iE = 0; iE < bndSegsPerEdge.size(); ++iE )
     {
index f8fabc08cd59a31f9d1d231e58cf4400f932274e..63c599a8878fa1e5a16d3ebf01ab1e71e4fd455e 100644 (file)
@@ -70,6 +70,7 @@ SET(_link_LIBRARIES
   ${KERNEL_SalomeGenericObj}
   ${KERNEL_SalomeIDLKERNEL}
   ${KERNEL_SALOMELocalTrace}
   ${KERNEL_SalomeGenericObj}
   ${KERNEL_SalomeIDLKERNEL}
   ${KERNEL_SALOMELocalTrace}
+  ${KERNEL_SalomeKernelHelpers}
   ${CAS_TKCDF}
   ${CAS_TKBO}
   ${CAS_TKShHealing}
   ${CAS_TKCDF}
   ${CAS_TKBO}
   ${CAS_TKShHealing}
index f3a0a556cf1f207d763f09df3900c39a2aa20d0a..7b957b6a36cc1fc663b8ef1bd24a88576ffba5f1 100644 (file)
@@ -461,7 +461,6 @@ SMESH_2smeshpy::ConvertScript(std::list< TCollection_AsciiString >&     theScrip
                               Resource_DataMapOfAsciiStringAsciiString& theEntry2AccessorMethod,
                               Resource_DataMapOfAsciiStringAsciiString& theObjectNames,
                               std::set< TCollection_AsciiString >&      theRemovedObjIDs,
                               Resource_DataMapOfAsciiStringAsciiString& theEntry2AccessorMethod,
                               Resource_DataMapOfAsciiStringAsciiString& theObjectNames,
                               std::set< TCollection_AsciiString >&      theRemovedObjIDs,
-                              SALOMEDS::Study_ptr&                      theStudy,
                               const bool                                theToKeepAllCommands)
 {
   std::list< TCollection_AsciiString >::iterator lineIt;
                               const bool                                theToKeepAllCommands)
 {
   std::list< TCollection_AsciiString >::iterator lineIt;
@@ -484,7 +483,6 @@ SMESH_2smeshpy::ConvertScript(std::list< TCollection_AsciiString >&     theScrip
   theGen = new _pyGen( theEntry2AccessorMethod,
                        theObjectNames,
                        theRemovedObjIDs,
   theGen = new _pyGen( theEntry2AccessorMethod,
                        theObjectNames,
                        theRemovedObjIDs,
-                       theStudy,
                        theToKeepAllCommands );
 
   for ( lineIt = theScriptLines.begin(); lineIt != theScriptLines.end(); ++lineIt )
                        theToKeepAllCommands );
 
   for ( lineIt = theScriptLines.begin(); lineIt != theScriptLines.end(); ++lineIt )
@@ -516,7 +514,6 @@ SMESH_2smeshpy::ConvertScript(std::list< TCollection_AsciiString >&     theScrip
   set<_pyID> createdObjects;
   createdObjects.insert( "smeshBuilder" );
   createdObjects.insert( "smesh" );
   set<_pyID> createdObjects;
   createdObjects.insert( "smeshBuilder" );
   createdObjects.insert( "smesh" );
-  createdObjects.insert( "theStudy" );
   for ( cmd = theGen->GetCommands().begin(); cmd != theGen->GetCommands().end(); ++cmd )
   {
 #ifdef DUMP_CONVERSION
   for ( cmd = theGen->GetCommands().begin(); cmd != theGen->GetCommands().end(); ++cmd )
   {
 #ifdef DUMP_CONVERSION
@@ -544,7 +541,6 @@ SMESH_2smeshpy::ConvertScript(std::list< TCollection_AsciiString >&     theScrip
 _pyGen::_pyGen(Resource_DataMapOfAsciiStringAsciiString& theEntry2AccessorMethod,
                Resource_DataMapOfAsciiStringAsciiString& theObjectNames,
                std::set< TCollection_AsciiString >&      theRemovedObjIDs,
 _pyGen::_pyGen(Resource_DataMapOfAsciiStringAsciiString& theEntry2AccessorMethod,
                Resource_DataMapOfAsciiStringAsciiString& theObjectNames,
                std::set< TCollection_AsciiString >&      theRemovedObjIDs,
-               SALOMEDS::Study_ptr&                      theStudy,
                const bool                                theToKeepAllCommands)
   : _pyObject( new _pyCommand( "", 0 )),
     myNbCommands( 0 ),
                const bool                                theToKeepAllCommands)
   : _pyObject( new _pyCommand( "", 0 )),
     myNbCommands( 0 ),
@@ -553,7 +549,6 @@ _pyGen::_pyGen(Resource_DataMapOfAsciiStringAsciiString& theEntry2AccessorMethod
     myRemovedObjIDs( theRemovedObjIDs ),
     myNbFilters( 0 ),
     myToKeepAllCommands( theToKeepAllCommands ),
     myRemovedObjIDs( theRemovedObjIDs ),
     myNbFilters( 0 ),
     myToKeepAllCommands( theToKeepAllCommands ),
-    myStudy( SALOMEDS::Study::_duplicate( theStudy )),
     myGeomIDNb(0), myGeomIDIndex(-1)
 {
   // make that GetID() to return TPythonDump::SMESHGenName()
     myGeomIDNb(0), myGeomIDIndex(-1)
 {
   // make that GetID() to return TPythonDump::SMESHGenName()
@@ -562,11 +557,11 @@ _pyGen::_pyGen(Resource_DataMapOfAsciiStringAsciiString& theEntry2AccessorMethod
   GetCreationCmd()->GetString() += "=";
 
   // Find 1st digit of study entry by which a GEOM object differs from a SMESH object
   GetCreationCmd()->GetString() += "=";
 
   // Find 1st digit of study entry by which a GEOM object differs from a SMESH object
-  if ( !theObjectNames.IsEmpty() && !CORBA::is_nil( theStudy ))
+  if ( !theObjectNames.IsEmpty() )
   {
     // find a GEOM entry
     _pyID geomID;
   {
     // find a GEOM entry
     _pyID geomID;
-    SALOMEDS::SComponent_wrap geomComp = theStudy->FindComponent("GEOM");
+    SALOMEDS::SComponent_wrap geomComp = SMESH_Gen_i::getStudyServant()->FindComponent("GEOM");
     if ( geomComp->_is_nil() ) return;
     CORBA::String_var entry = geomComp->GetID();
     geomID = entry.in();
     if ( geomComp->_is_nil() ) return;
     CORBA::String_var entry = geomComp->GetID();
     geomID = entry.in();
@@ -1101,7 +1096,7 @@ void _pyGen::Process( const Handle(_pyCommand)& theCommand )
   static TStringSet smeshpyMethods;
   if ( smeshpyMethods.empty() ) {
     const char * names[] =
   static TStringSet smeshpyMethods;
   if ( smeshpyMethods.empty() ) {
     const char * names[] =
-      { "SetEmbeddedMode","IsEmbeddedMode","SetCurrentStudy","GetCurrentStudy",
+      { "SetEmbeddedMode","IsEmbeddedMode","UpdateStudy","GetStudy",
         "GetPattern","GetSubShapesId",
         "" }; // <- mark of array end
     smeshpyMethods.Insert( names );
         "GetPattern","GetSubShapesId",
         "" }; // <- mark of array end
     smeshpyMethods.Insert( names );
@@ -1673,7 +1668,7 @@ bool _pyGen::IsNotPublished(const _pyID& theObjID) const
   // either the SMESH object is not in study or it is a GEOM object
   if ( IsGeomObject( theObjID ))
   {
   // either the SMESH object is not in study or it is a GEOM object
   if ( IsGeomObject( theObjID ))
   {
-    SALOMEDS::SObject_wrap so = myStudy->FindObjectID( theObjID.ToCString() );
+    SALOMEDS::SObject_wrap so = SMESH_Gen_i::getStudyServant()->FindObjectID( theObjID.ToCString() );
     if ( so->_is_nil() ) return true;
     CORBA::Object_var obj = so->GetObject();
     return CORBA::is_nil( obj );
     if ( so->_is_nil() ) return true;
     CORBA::Object_var obj = so->GetObject();
     return CORBA::is_nil( obj );
@@ -2122,7 +2117,7 @@ bool _pyMesh::NeedMeshAccess( const Handle(_pyCommand)& theCommand )
     const char * names[] =
       { "ExportDAT","ExportUNV","ExportSTL","ExportSAUV", "RemoveGroup","RemoveGroupWithContents",
         "GetGroups","UnionGroups","IntersectGroups","CutGroups","CreateDimGroup","GetLog","GetId",
     const char * names[] =
       { "ExportDAT","ExportUNV","ExportSTL","ExportSAUV", "RemoveGroup","RemoveGroupWithContents",
         "GetGroups","UnionGroups","IntersectGroups","CutGroups","CreateDimGroup","GetLog","GetId",
-        "ClearLog","GetStudyId","HasDuplicatedGroupNamesMED","GetMEDMesh","NbNodes","NbElements",
+        "ClearLog","HasDuplicatedGroupNamesMED","GetMEDMesh","NbNodes","NbElements",
         "NbEdges","NbEdgesOfOrder","NbFaces","NbFacesOfOrder","NbTriangles",
         "NbTrianglesOfOrder","NbQuadrangles","NbQuadranglesOfOrder","NbPolygons","NbVolumes",
         "NbVolumesOfOrder","NbTetras","NbTetrasOfOrder","NbHexas","NbHexasOfOrder",
         "NbEdges","NbEdgesOfOrder","NbFaces","NbFacesOfOrder","NbTriangles",
         "NbTrianglesOfOrder","NbQuadrangles","NbQuadranglesOfOrder","NbPolygons","NbVolumes",
         "NbVolumesOfOrder","NbTetras","NbTetrasOfOrder","NbHexas","NbHexasOfOrder",
index 6fd991533bd9188f7e6fc9f06a404adb5399f633..589c78317dfd08f48a8f8367d7abe34a28da3e51 100644 (file)
@@ -255,7 +255,6 @@ public:
   _pyGen(Resource_DataMapOfAsciiStringAsciiString& theEntry2AccessorMethod,
          Resource_DataMapOfAsciiStringAsciiString& theObjectNames,
          std::set< TCollection_AsciiString >&      theRemovedObjIDs,
   _pyGen(Resource_DataMapOfAsciiStringAsciiString& theEntry2AccessorMethod,
          Resource_DataMapOfAsciiStringAsciiString& theObjectNames,
          std::set< TCollection_AsciiString >&      theRemovedObjIDs,
-         SALOMEDS::Study_ptr&                      theStudy,
          const bool                                theToKeepAllCommands);
   Handle(_pyCommand) AddCommand( const _AString& theCommand );
   void ExchangeCommands( Handle(_pyCommand) theCmd1, Handle(_pyCommand) theCmd2 );
          const bool                                theToKeepAllCommands);
   Handle(_pyCommand) AddCommand( const _AString& theCommand );
   void ExchangeCommands( Handle(_pyCommand) theCmd1, Handle(_pyCommand) theCmd2 );
@@ -326,7 +325,6 @@ private:
   Handle(_pyCommand)                        myLastCommand;
   int                                       myNbFilters;
   bool                                      myToKeepAllCommands;
   Handle(_pyCommand)                        myLastCommand;
   int                                       myNbFilters;
   bool                                      myToKeepAllCommands;
-  SALOMEDS::Study_var                       myStudy;
   int                                       myGeomIDNb, myGeomIDIndex;
   std::map< _AString, ExportedMeshData >    myFile2ExportedMesh;
   Handle( _pyHypothesisReader )             myHypReader;
   int                                       myGeomIDNb, myGeomIDIndex;
   std::map< _AString, ExportedMeshData >    myFile2ExportedMesh;
   Handle( _pyHypothesisReader )             myHypReader;
index cc842f215462cc31dedfe6acfedeca3f84b65e55..92506466cdbd268668025cb1c8106b4745bb1861 100644 (file)
@@ -74,13 +74,12 @@ namespace SMESH
       SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
       std::string aString = myStream.str();
       TCollection_AsciiString aCollection(Standard_CString(aString.c_str()));
       SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
       std::string aString = myStream.str();
       TCollection_AsciiString aCollection(Standard_CString(aString.c_str()));
-      SALOMEDS::Study_var aStudy = aSMESHGen->GetCurrentStudy();
-      if(!aStudy->_is_nil() && !aCollection.IsEmpty())
+      if(!aCollection.IsEmpty())
       {
         const std::string & objEntry = SMESH_Gen_i::GetSMESHGen()->GetLastObjEntry();
         if ( !objEntry.empty() )
           aCollection += (TVar::ObjPrefix() + objEntry ).c_str();
       {
         const std::string & objEntry = SMESH_Gen_i::GetSMESHGen()->GetLastObjEntry();
         if ( !objEntry.empty() )
           aCollection += (TVar::ObjPrefix() + objEntry ).c_str();
-        aSMESHGen->AddToPythonScript(aStudy->StudyId(),aCollection);
+        aSMESHGen->AddToPythonScript(aCollection);
         if(MYDEBUG) MESSAGE(aString);
         // prevent misuse of already treated variables
         aSMESHGen->UpdateParameters(CORBA::Object_var().in(),"");
         if(MYDEBUG) MESSAGE(aString);
         // prevent misuse of already treated variables
         aSMESHGen->UpdateParameters(CORBA::Object_var().in(),"");
@@ -316,8 +315,7 @@ namespace SMESH
   operator<<(CORBA::Object_ptr theArg)
   {
     SMESH_Gen_i*          aSMESHGen = SMESH_Gen_i::GetSMESHGen();
   operator<<(CORBA::Object_ptr theArg)
   {
     SMESH_Gen_i*          aSMESHGen = SMESH_Gen_i::GetSMESHGen();
-    SALOMEDS::Study_var      aStudy = aSMESHGen->GetCurrentStudy();
-    SALOMEDS::SObject_wrap aSObject = SMESH_Gen_i::ObjectToSObject(aStudy,theArg);
+    SALOMEDS::SObject_wrap aSObject = SMESH_Gen_i::ObjectToSObject(theArg);
     if(!aSObject->_is_nil()) {
       CORBA::String_var id = aSObject->GetID();
       myStream << id;
     if(!aSObject->_is_nil()) {
       CORBA::String_var id = aSObject->GetID();
       myStream << id;
@@ -336,8 +334,7 @@ namespace SMESH
   TPythonDump::
   operator<<(SMESH::SMESH_Hypothesis_ptr theArg)
   {
   TPythonDump::
   operator<<(SMESH::SMESH_Hypothesis_ptr theArg)
   {
-    SALOMEDS::Study_var     aStudy = SMESH_Gen_i::GetSMESHGen()->GetCurrentStudy();
-    SALOMEDS::SObject_wrap aSObject = SMESH_Gen_i::ObjectToSObject(aStudy,theArg);
+    SALOMEDS::SObject_wrap aSObject = SMESH_Gen_i::ObjectToSObject(theArg);
     if(aSObject->_is_nil() && !CORBA::is_nil(theArg))
       myStream << "hyp_" << theArg->GetId();
     else
     if(aSObject->_is_nil() && !CORBA::is_nil(theArg))
       myStream << "hyp_" << theArg->GetId();
     else
@@ -352,8 +349,7 @@ namespace SMESH
     if ( CORBA::is_nil( theArg ) )
       return *this << "None";
     SMESH_Gen_i*          aSMESHGen = SMESH_Gen_i::GetSMESHGen();
     if ( CORBA::is_nil( theArg ) )
       return *this << "None";
     SMESH_Gen_i*          aSMESHGen = SMESH_Gen_i::GetSMESHGen();
-    SALOMEDS::Study_var      aStudy = aSMESHGen->GetCurrentStudy();
-    SALOMEDS::SObject_wrap aSObject = SMESH_Gen_i::ObjectToSObject(aStudy,theArg);
+    SALOMEDS::SObject_wrap aSObject = SMESH_Gen_i::ObjectToSObject(theArg);
     if(!aSObject->_is_nil())
     {
       return *this << aSObject;
     if(!aSObject->_is_nil())
     {
       return *this << aSObject;
@@ -368,7 +364,7 @@ namespace SMESH
       SMESH::long_array_var    anElementsId = theArg->GetIDs();
       SMESH::array_of_ElementType_var types = theArg->GetTypes();
       SMESH::ElementType               type = types->length() ? types[0] : SMESH::ALL;
       SMESH::long_array_var    anElementsId = theArg->GetIDs();
       SMESH::array_of_ElementType_var types = theArg->GetTypes();
       SMESH::ElementType               type = types->length() ? types[0] : SMESH::ALL;
-      SALOMEDS::SObject_wrap         meshSO = SMESH_Gen_i::ObjectToSObject(aStudy,mesh);
+      SALOMEDS::SObject_wrap         meshSO = SMESH_Gen_i::ObjectToSObject(mesh);
       if ( meshSO->_is_nil() ) // don't waste memory for dumping not published objects
         return *this << mesh << ".GetIDSource([], " << type << ")";
       else
       if ( meshSO->_is_nil() ) // don't waste memory for dumping not published objects
         return *this << mesh << ".GetIDSource([], " << type << ")";
       else
@@ -718,12 +714,11 @@ void RemoveTabulation( TCollection_AsciiString& theScript )
 //function : DumpPython
 //purpose  :
 //=======================================================================
 //function : DumpPython
 //purpose  :
 //=======================================================================
-Engines::TMPFile* SMESH_Gen_i::DumpPython (CORBA::Object_ptr theStudy,
-                                           CORBA::Boolean isPublished,
+Engines::TMPFile* SMESH_Gen_i::DumpPython (CORBA::Boolean isPublished,
                                            CORBA::Boolean isMultiFile,
                                            CORBA::Boolean& isValidScript)
 {
                                            CORBA::Boolean isMultiFile,
                                            CORBA::Boolean& isValidScript)
 {
-  SALOMEDS::Study_var aStudy = SALOMEDS::Study::_narrow(theStudy);
+  SALOMEDS::Study_var aStudy = getStudyServant();
   if (CORBA::is_nil(aStudy))
     return new Engines::TMPFile(0);
 
   if (CORBA::is_nil(aStudy))
     return new Engines::TMPFile(0);
 
@@ -761,7 +756,7 @@ Engines::TMPFile* SMESH_Gen_i::DumpPython (CORBA::Object_ptr theStudy,
 
   // Add trace of API methods calls and replace study entries by names
   TCollection_AsciiString aScript;
 
   // Add trace of API methods calls and replace study entries by names
   TCollection_AsciiString aScript;
-  aScript += DumpPython_impl(aStudy, aMap, aMapNames, isPublished, isMultiFile,
+  aScript += DumpPython_impl(aMap, aMapNames, isPublished, isMultiFile,
                              myIsHistoricalPythonDump, isValidScript, aSavedTrace);
 
   int aLen = aScript.Length();
                              myIsHistoricalPythonDump, isValidScript, aSavedTrace);
 
   int aLen = aScript.Length();
@@ -782,12 +777,12 @@ Engines::TMPFile* SMESH_Gen_i::DumpPython (CORBA::Object_ptr theStudy,
  *  AddToPythonScript
  */
 //=============================================================================
  *  AddToPythonScript
  */
 //=============================================================================
-void SMESH_Gen_i::AddToPythonScript (int theStudyID, const TCollection_AsciiString& theString)
+void SMESH_Gen_i::AddToPythonScript (const TCollection_AsciiString& theString)
 {
 {
-  if (myPythonScripts.find(theStudyID) == myPythonScripts.end()) {
-    myPythonScripts[theStudyID] = new TColStd_HSequenceOfAsciiString;
+  if (myPythonScript.IsNull()) {
+    myPythonScript = new TColStd_HSequenceOfAsciiString;
   }
   }
-  myPythonScripts[theStudyID]->Append(theString);
+  myPythonScript->Append(theString);
 }
 
 //=============================================================================
 }
 
 //=============================================================================
@@ -795,11 +790,11 @@ void SMESH_Gen_i::AddToPythonScript (int theStudyID, const TCollection_AsciiStri
  *  RemoveLastFromPythonScript
  */
 //=============================================================================
  *  RemoveLastFromPythonScript
  */
 //=============================================================================
-void SMESH_Gen_i::RemoveLastFromPythonScript (int theStudyID)
+void SMESH_Gen_i::RemoveLastFromPythonScript()
 {
 {
-  if (myPythonScripts.find(theStudyID) != myPythonScripts.end()) {
-    int aLen = myPythonScripts[theStudyID]->Length();
-    myPythonScripts[theStudyID]->Remove(aLen);
+  if (!myPythonScript.IsNull()) {
+    int aLen = myPythonScript->Length();
+    myPythonScript->Remove(aLen);
   }
 }
 
   }
 }
 
@@ -807,15 +802,15 @@ void SMESH_Gen_i::RemoveLastFromPythonScript (int theStudyID)
 //function : SavePython
 //purpose  :
 //=======================================================================
 //function : SavePython
 //purpose  :
 //=======================================================================
-void SMESH_Gen_i::SavePython (SALOMEDS::Study_ptr theStudy)
+void SMESH_Gen_i::SavePython()
 {
   // Dump trace of API methods calls
 {
   // Dump trace of API methods calls
-  TCollection_AsciiString aScript = GetNewPythonLines(theStudy->StudyId());
+  TCollection_AsciiString aScript = GetNewPythonLines();
 
   // Check contents of PythonObject attribute
   CORBA::String_var compDataType = ComponentDataType();
 
   // Check contents of PythonObject attribute
   CORBA::String_var compDataType = ComponentDataType();
-  SALOMEDS::SObject_wrap aSO = theStudy->FindComponent( compDataType.in() );
-  SALOMEDS::StudyBuilder_var aStudyBuilder = theStudy->NewBuilder();
+  SALOMEDS::SObject_wrap aSO = getStudyServant()->FindComponent( compDataType.in() );
+  SALOMEDS::StudyBuilder_var aStudyBuilder = getStudyServant()->NewBuilder();
   SALOMEDS::GenericAttribute_wrap anAttr =
     aStudyBuilder->FindOrCreateAttribute(aSO, "AttributePythonObject");
 
   SALOMEDS::GenericAttribute_wrap anAttr =
     aStudyBuilder->FindOrCreateAttribute(aSO, "AttributePythonObject");
 
@@ -835,7 +830,7 @@ void SMESH_Gen_i::SavePython (SALOMEDS::Study_ptr theStudy)
   pyAttr->SetObject(oldScript.ToCString(), 1);
 
   // Clean trace of API methods calls
   pyAttr->SetObject(oldScript.ToCString(), 1);
 
   // Clean trace of API methods calls
-  CleanPythonTrace(theStudy->StudyId());
+  CleanPythonTrace();
 }
 
 
 }
 
 
@@ -979,7 +974,6 @@ namespace {
 //================================================================================
 /*!
  * \brief Createa a Dump Python script
 //================================================================================
 /*!
  * \brief Createa a Dump Python script
- *  \param [in] theStudy - the study to dump
  *  \param [in,out] theObjectNames - map of an entry to a study and python name
  *  \param [in] theNames -  - map of an entry to a study name
  *  \param [in] isPublished - \c true if dump of object publication in study is needed
  *  \param [in,out] theObjectNames - map of an entry to a study and python name
  *  \param [in] theNames -  - map of an entry to a study name
  *  \param [in] isPublished - \c true if dump of object publication in study is needed
@@ -993,8 +987,7 @@ namespace {
 //================================================================================
 
 TCollection_AsciiString SMESH_Gen_i::DumpPython_impl
 //================================================================================
 
 TCollection_AsciiString SMESH_Gen_i::DumpPython_impl
-                        (SALOMEDS::Study_ptr                       theStudy,
-                         Resource_DataMapOfAsciiStringAsciiString& theObjectNames,
+                        (Resource_DataMapOfAsciiStringAsciiString& theObjectNames,
                          Resource_DataMapOfAsciiStringAsciiString& theNames,
                          bool                                      isPublished,
                          bool                                      isMultiFile,
                          Resource_DataMapOfAsciiStringAsciiString& theNames,
                          bool                                      isPublished,
                          bool                                      isMultiFile,
@@ -1003,7 +996,6 @@ TCollection_AsciiString SMESH_Gen_i::DumpPython_impl
                          TCollection_AsciiString&                  theSavedTrace)
 {
   SMESH_TRY;
                          TCollection_AsciiString&                  theSavedTrace)
 {
   SMESH_TRY;
-  const int aStudyID = theStudy->StudyId();
 
   const TCollection_AsciiString aSmeshpy ( SMESH_2smeshpy::SmeshpyName() );
   const TCollection_AsciiString aSMESHGen( SMESH_2smeshpy::GenName() );
 
   const TCollection_AsciiString aSmeshpy ( SMESH_2smeshpy::SmeshpyName() );
   const TCollection_AsciiString aSMESHGen( SMESH_2smeshpy::GenName() );
@@ -1015,9 +1007,9 @@ TCollection_AsciiString SMESH_Gen_i::DumpPython_impl
   std::list< TCollection_AsciiString >::iterator linesIt;
   
   if ( isPublished )
   std::list< TCollection_AsciiString >::iterator linesIt;
   
   if ( isPublished )
-    lines.push_back(  aSMESHGen + " = smeshBuilder.New(theStudy)" );
+    lines.push_back(  aSMESHGen + " = smeshBuilder.New()" );
    else
    else
-    lines.push_back(  aSMESHGen + " = smeshBuilder.New(None)" );
+    lines.push_back(  aSMESHGen + " = smeshBuilder.New(False)" );
   lines.push_back( helper + "aFilterManager = " + aSMESHGen + ".CreateFilterManager()" );
   lines.push_back( helper + "aMeasurements = "  + aSMESHGen + ".CreateMeasurements()" );
 
   lines.push_back( helper + "aFilterManager = " + aSMESHGen + ".CreateFilterManager()" );
   lines.push_back( helper + "aMeasurements = "  + aSMESHGen + ".CreateMeasurements()" );
 
@@ -1063,9 +1055,9 @@ TCollection_AsciiString SMESH_Gen_i::DumpPython_impl
   }
 
   // Add new dump trace of API methods calls to script lines
   }
 
   // Add new dump trace of API methods calls to script lines
-  if (myPythonScripts.find( aStudyID ) != myPythonScripts.end())
+  if (!myPythonScript.IsNull())
   {
   {
-    Handle(TColStd_HSequenceOfAsciiString) aPythonScript = myPythonScripts[ aStudyID ];
+    Handle(TColStd_HSequenceOfAsciiString) aPythonScript = myPythonScript;
     Standard_Integer istr, aLen = aPythonScript->Length();
     for (istr = 1; istr <= aLen; istr++)
       lines.push_back( aPythonScript->Value( istr ));
     Standard_Integer istr, aLen = aPythonScript->Length();
     for (istr = 1; istr <= aLen; istr++)
       lines.push_back( aPythonScript->Value( istr ));
@@ -1079,7 +1071,7 @@ TCollection_AsciiString SMESH_Gen_i::DumpPython_impl
   if ( !getenv("NO_2smeshpy_conversion"))
     SMESH_2smeshpy::ConvertScript( lines, anEntry2AccessorMethod,
                                    theObjectNames, aRemovedObjIDs,
   if ( !getenv("NO_2smeshpy_conversion"))
     SMESH_2smeshpy::ConvertScript( lines, anEntry2AccessorMethod,
                                    theObjectNames, aRemovedObjIDs,
-                                   theStudy, isHistoricalDump );
+                                   isHistoricalDump );
 
   bool importGeom = false;
   GEOM::GEOM_Gen_ptr geom = GetGeomEngine();
 
   bool importGeom = false;
   GEOM::GEOM_Gen_ptr geom = GetGeomEngine();
@@ -1218,7 +1210,7 @@ TCollection_AsciiString SMESH_Gen_i::DumpPython_impl
   }
 
   if ( isMultiFile )
   }
 
   if ( isMultiFile )
-    initPart += "def RebuildData(theStudy):";
+    initPart += "def RebuildData():";
   initPart += "\n";
 
   anUpdatedScript.Prepend( initPart );
   initPart += "\n";
 
   anUpdatedScript.Prepend( initPart );
@@ -1229,12 +1221,12 @@ TCollection_AsciiString SMESH_Gen_i::DumpPython_impl
   TCollection_AsciiString removeObjPart;
   if ( !mapRemoved.IsEmpty() ) {
     removeObjPart += nt + "## some objects were removed";
   TCollection_AsciiString removeObjPart;
   if ( !mapRemoved.IsEmpty() ) {
     removeObjPart += nt + "## some objects were removed";
-    removeObjPart += nt + "aStudyBuilder = theStudy.NewBuilder()";
+    removeObjPart += nt + "aStudyBuilder = salome.myStudy.NewBuilder()";
     Resource_DataMapIteratorOfDataMapOfAsciiStringAsciiString mapRemovedIt;
     for ( mapRemovedIt.Initialize( mapRemoved ); mapRemovedIt.More(); mapRemovedIt.Next() ) {
       aName   = mapRemovedIt.Value(); // python name
       anEntry = mapRemovedIt.Key();
     Resource_DataMapIteratorOfDataMapOfAsciiStringAsciiString mapRemovedIt;
     for ( mapRemovedIt.Initialize( mapRemoved ); mapRemovedIt.More(); mapRemovedIt.Next() ) {
       aName   = mapRemovedIt.Value(); // python name
       anEntry = mapRemovedIt.Key();
-      removeObjPart += nt + "SO = theStudy.FindObjectIOR(theStudy.ConvertObjectToIOR(";
+      removeObjPart += nt + "SO = salome.myStudy.FindObjectIOR(salome.myStudy.ConvertObjectToIOR(";
       removeObjPart += aName;
       // for object wrapped by class of smeshBuilder.py
       if ( anEntry2AccessorMethod.IsBound( anEntry ) )
       removeObjPart += aName;
       // for object wrapped by class of smeshBuilder.py
       if ( anEntry2AccessorMethod.IsBound( anEntry ) )
@@ -1272,7 +1264,7 @@ TCollection_AsciiString SMESH_Gen_i::DumpPython_impl
   {
     //Output the script that sets up the visual parameters.
     CORBA::String_var compDataType = ComponentDataType();
   {
     //Output the script that sets up the visual parameters.
     CORBA::String_var compDataType = ComponentDataType();
-    CORBA::String_var script = theStudy->GetDefaultScript( compDataType.in(), tab.ToCString() );
+    CORBA::String_var script = getStudyServant()->GetDefaultScript( compDataType.in(), tab.ToCString() );
     if ( script.in() && script.in()[0] ) {
       visualPropertiesPart += nt + "### Store presentation parameters of displayed objects\n";
       visualPropertiesPart += script.in();
     if ( script.in() && script.in()[0] ) {
       visualPropertiesPart += nt + "### Store presentation parameters of displayed objects\n";
       visualPropertiesPart += script.in();
@@ -1289,9 +1281,9 @@ TCollection_AsciiString SMESH_Gen_i::DumpPython_impl
       "\nif __name__ == '__main__':"
       "\n\tSMESH_RebuildData = RebuildData"
       "\n\texec('import '+re.sub('SMESH$','GEOM',thisModule)+' as GEOM_dump')"
       "\nif __name__ == '__main__':"
       "\n\tSMESH_RebuildData = RebuildData"
       "\n\texec('import '+re.sub('SMESH$','GEOM',thisModule)+' as GEOM_dump')"
-      "\n\tGEOM_dump.RebuildData( salome.myStudy )"
+      "\n\tGEOM_dump.RebuildData()"
       "\n\texec('from '+re.sub('SMESH$','GEOM',thisModule)+' import * ')"
       "\n\texec('from '+re.sub('SMESH$','GEOM',thisModule)+' import * ')"
-      "\n\tSMESH_RebuildData( salome.myStudy )";
+      "\n\tSMESH_RebuildData()";
   }
   anUpdatedScript += "\n";
 
   }
   anUpdatedScript += "\n";
 
@@ -1368,13 +1360,13 @@ TCollection_AsciiString SMESH_Gen_i::DumpPython_impl
  *  GetNewPythonLines
  */
 //=============================================================================
  *  GetNewPythonLines
  */
 //=============================================================================
-TCollection_AsciiString SMESH_Gen_i::GetNewPythonLines (int theStudyID)
+TCollection_AsciiString SMESH_Gen_i::GetNewPythonLines()
 {
   TCollection_AsciiString aScript;
 
   // Dump trace of API methods calls
 {
   TCollection_AsciiString aScript;
 
   // Dump trace of API methods calls
-  if (myPythonScripts.find(theStudyID) != myPythonScripts.end()) {
-    Handle(TColStd_HSequenceOfAsciiString) aPythonScript = myPythonScripts[theStudyID];
+  if (!myPythonScript.IsNull()) {
+    Handle(TColStd_HSequenceOfAsciiString) aPythonScript = myPythonScript;
     Standard_Integer istr, aLen = aPythonScript->Length();
     for (istr = 1; istr <= aLen; istr++) {
       aScript += "\n";
     Standard_Integer istr, aLen = aPythonScript->Length();
     for (istr = 1; istr <= aLen; istr++) {
       aScript += "\n";
@@ -1391,12 +1383,12 @@ TCollection_AsciiString SMESH_Gen_i::GetNewPythonLines (int theStudyID)
  *  CleanPythonTrace
  */
 //=============================================================================
  *  CleanPythonTrace
  */
 //=============================================================================
-void SMESH_Gen_i::CleanPythonTrace (int theStudyID)
+void SMESH_Gen_i::CleanPythonTrace()
 {
   TCollection_AsciiString aScript;
 
   // Clean trace of API methods calls
 {
   TCollection_AsciiString aScript;
 
   // Clean trace of API methods calls
-  if (myPythonScripts.find(theStudyID) != myPythonScripts.end()) {
-    myPythonScripts[theStudyID]->Clear();
+  if (!myPythonScript.IsNull()) {
+    myPythonScript->Clear();
   }
 }
   }
 }
index 9432b91170849f48a5f90112b48065f1f4cfbc86..a255fa53f7cec411d9cabc24a5a40e94c1dbc68c 100644 (file)
@@ -138,18 +138,14 @@ static TopoDS_Shape getShapeByName( const char* theName )
   if ( theName != 0 )
   {
     SMESH_Gen_i* aSMESHGen     = SMESH_Gen_i::GetSMESHGen();
   if ( theName != 0 )
   {
     SMESH_Gen_i* aSMESHGen     = SMESH_Gen_i::GetSMESHGen();
-    SALOMEDS::Study_var aStudy = aSMESHGen->GetCurrentStudy();
-    if ( !aStudy->_is_nil() )
+    SALOMEDS::Study::ListOfSObject_var aList = SMESH_Gen_i::getStudyServant()->FindObjectByName( theName, "GEOM" );
+    if ( aList->length() > 0 )
     {
     {
-      SALOMEDS::Study::ListOfSObject_var aList = aStudy->FindObjectByName( theName, "GEOM" );
-      if ( aList->length() > 0 )
-      {
-        CORBA::Object_var        anObj = aList[ 0 ]->GetObject();
-        GEOM::GEOM_Object_var aGeomObj = GEOM::GEOM_Object::_narrow( anObj );
-        TopoDS_Shape             shape = aSMESHGen->GeomObjectToShape( aGeomObj );
-        SALOME::UnRegister( aList ); // UnRegister() objects in aList
-        return shape;
-      }
+      CORBA::Object_var        anObj = aList[ 0 ]->GetObject();
+      GEOM::GEOM_Object_var aGeomObj = GEOM::GEOM_Object::_narrow( anObj );
+      TopoDS_Shape             shape = aSMESHGen->GeomObjectToShape( aGeomObj );
+      SALOME::UnRegister( aList ); // UnRegister() objects in aList
+      return shape;
     }
   }
   return TopoDS_Shape();
     }
   }
   return TopoDS_Shape();
@@ -159,14 +155,11 @@ static TopoDS_Shape getShapeByID (const char* theID)
 {
   if ( theID && strlen( theID ) > 0 ) {
     SMESH_Gen_i*     aSMESHGen = SMESH_Gen_i::GetSMESHGen();
 {
   if ( theID && strlen( theID ) > 0 ) {
     SMESH_Gen_i*     aSMESHGen = SMESH_Gen_i::GetSMESHGen();
-    SALOMEDS::Study_var aStudy = aSMESHGen->GetCurrentStudy();
-    if ( !aStudy->_is_nil() ) {
-      SALOMEDS::SObject_wrap aSObj = aStudy->FindObjectID(theID);
-      if ( !aSObj->_is_nil() ) {
-        CORBA::Object_var          obj = aSObj->GetObject();
-        GEOM::GEOM_Object_var aGeomObj = GEOM::GEOM_Object::_narrow(obj);
-        return aSMESHGen->GeomObjectToShape( aGeomObj );
-      }
+    SALOMEDS::SObject_wrap aSObj = SMESH_Gen_i::getStudyServant()->FindObjectID(theID);
+    if ( !aSObj->_is_nil() ) {
+      CORBA::Object_var          obj = aSObj->GetObject();
+      GEOM::GEOM_Object_var aGeomObj = GEOM::GEOM_Object::_narrow(obj);
+      return aSMESHGen->GeomObjectToShape( aGeomObj );
     }
   }
   return TopoDS_Shape();
     }
   }
   return TopoDS_Shape();
@@ -175,14 +168,10 @@ static TopoDS_Shape getShapeByID (const char* theID)
 // static std::string getShapeNameByID (const char* theID)
 // {
 //   if ( theID && strlen( theID ) > 0 ) {
 // static std::string getShapeNameByID (const char* theID)
 // {
 //   if ( theID && strlen( theID ) > 0 ) {
-//     SMESH_Gen_i*     aSMESHGen = SMESH_Gen_i::GetSMESHGen();
-//     SALOMEDS::Study_var aStudy = aSMESHGen->GetCurrentStudy();
-//     if ( !aStudy->_is_nil() ) {
-//       SALOMEDS::SObject_wrap aSObj = aStudy->FindObjectID(theID);
-//       if ( !aSObj->_is_nil() ) {
-//         CORBA::String_var name = aSObj->GetName();
-//         return name.in();
-//       }
+//     SALOMEDS::SObject_wrap aSObj = SMESH_Gen_i::getStudyServant()->FindObjectID(theID);
+//     if ( !aSObj->_is_nil() ) {
+//       CORBA::String_var name = aSObj->GetName();
+//       return name.in();
 //     }
 //   }
 //   return "";
 //     }
 //   }
 //   return "";
@@ -779,14 +768,10 @@ void BelongToMeshGroup_i::SetGroupID( const char* theID ) // IOR or StoreName
   }
   else if ( strncmp( "0:", myID.c_str(), 2 ) == 0 ) // transient mode + GUI
   {
   }
   else if ( strncmp( "0:", myID.c_str(), 2 ) == 0 ) // transient mode + GUI
   {
-    SMESH_Gen_i* aSMESHGen     = SMESH_Gen_i::GetSMESHGen();
-    SALOMEDS::Study_var aStudy = aSMESHGen->GetCurrentStudy();
-    if ( !aStudy->_is_nil() ) {
-      SALOMEDS::SObject_wrap aSObj = aStudy->FindObjectID( myID.c_str() );
-      if ( !aSObj->_is_nil() ) {
-        CORBA::Object_var obj = aSObj->GetObject();
-        SetGroup( SMESH::SMESH_GroupBase::_narrow( obj ));
-      }
+    SALOMEDS::SObject_wrap aSObj = SMESH_Gen_i::getStudyServant()->FindObjectID( myID.c_str() );
+    if ( !aSObj->_is_nil() ) {
+      CORBA::Object_var obj = aSObj->GetObject();
+      SetGroup( SMESH::SMESH_GroupBase::_narrow( obj ));
     }
   }
   else if ( !myID.empty() ) // persistent mode
     }
   }
   else if ( !myID.empty() ) // persistent mode
@@ -812,7 +797,7 @@ SMESH::SMESH_GroupBase_ptr BelongToMeshGroup_i::GetGroup()
   {
     // search for a group in a current study
     SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
   {
     // search for a group in a current study
     SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
-    if ( StudyContext*  sc = aSMESHGen->GetCurrentStudyContext() )
+    if ( StudyContext*  sc = aSMESHGen->GetStudyContext() )
     {
       int id = 1;
       std::string ior;
     {
       int id = 1;
       std::string ior;
@@ -1677,11 +1662,7 @@ void ConnectedElements_i::SetThreshold ( const char*
     }
   case SMESH::ConnectedElements::VERTEX: // get a VERTEX by its entry /////////////////
     {
     }
   case SMESH::ConnectedElements::VERTEX: // get a VERTEX by its entry /////////////////
     {
-      SALOMEDS::Study_var study = SMESH_Gen_i::GetSMESHGen()->GetCurrentStudy();
-      if ( study->_is_nil() )
-        THROW_SALOME_CORBA_EXCEPTION
-          ( "ConnectedElements_i::SetThreshold(): NULL current study", SALOME::BAD_PARAM );
-      SALOMEDS::SObject_wrap sobj = study->FindObjectID( threshold );
+      SALOMEDS::SObject_wrap sobj = SMESH_Gen_i::getStudyServant()->FindObjectID( threshold );
       if ( sobj->_is_nil() )
         THROW_SALOME_CORBA_EXCEPTION
           ( "ConnectedElements_i::SetThreshold(): invalid vertex study entry", SALOME::BAD_PARAM );
       if ( sobj->_is_nil() )
         THROW_SALOME_CORBA_EXCEPTION
           ( "ConnectedElements_i::SetThreshold(): invalid vertex study entry", SALOME::BAD_PARAM );
index 916a1f2221aebb4f30521f2abd379ee1ee2ae740..072d1180074ff45bec7e8a779c0fa0c9ac4fa8dd 100644 (file)
@@ -293,7 +293,10 @@ SMESH_Gen_i::SMESH_Gen_i( CORBA::ORB_ptr            orb,
   _thisObj = this ;
   _id = myPoa->activate_object( _thisObj );
 
   _thisObj = this ;
   _id = myPoa->activate_object( _thisObj );
 
+  myStudyContext = new StudyContext;
+
   myIsEmbeddedMode = false;
   myIsEmbeddedMode = false;
+  myIsEnablePublish = true;
   myShapeReader = NULL;  // shape reader
   mySMESHGen = this;
   myIsHistoricalPythonDump = true;
   myShapeReader = NULL;  // shape reader
   mySMESHGen = this;
   myIsHistoricalPythonDump = true;
@@ -351,11 +354,8 @@ SMESH_Gen_i::~SMESH_Gen_i()
   myHypCreatorMap.clear();
 
   // Clear study contexts data
   myHypCreatorMap.clear();
 
   // Clear study contexts data
-  map<int, StudyContext*>::iterator it;
-  for ( it = myStudyContextMap.begin(); it != myStudyContextMap.end(); ++it ) {
-    delete it->second;
-  }
-  myStudyContextMap.clear();
+  delete myStudyContext;
+
   // delete shape reader
   if ( myShapeReader )
     delete myShapeReader;
   // delete shape reader
   if ( myShapeReader )
     delete myShapeReader;
@@ -480,7 +480,7 @@ SMESH::SMESH_Hypothesis_ptr SMESH_Gen_i::createHypothesis(const char* theHypName
     getHypothesisCreator(theHypName, theLibName, aPlatformLibName);
 
   // create a new hypothesis object, store its ref. in studyContext
     getHypothesisCreator(theHypName, theLibName, aPlatformLibName);
 
   // create a new hypothesis object, store its ref. in studyContext
-  myHypothesis_i = aCreator->Create(myPoa, GetCurrentStudyID(), &myGen);
+  myHypothesis_i = aCreator->Create(myPoa, &myGen);
   if (myHypothesis_i)
   {
     myHypothesis_i->SetLibName( aPlatformLibName.c_str() ); // for persistency assurance
   if (myHypothesis_i)
   {
     myHypothesis_i->SetLibName( aPlatformLibName.c_str() ); // for persistency assurance
@@ -512,10 +512,10 @@ SMESH::SMESH_Mesh_ptr SMESH_Gen_i::createMesh()
   // Get or create the GEOM_Client instance
   try {
     // create a new mesh object servant, store it in a map in study context
   // Get or create the GEOM_Client instance
   try {
     // create a new mesh object servant, store it in a map in study context
-    SMESH_Mesh_i* meshServant = new SMESH_Mesh_i( GetPOA(), this, GetCurrentStudyID() );
+    SMESH_Mesh_i* meshServant = new SMESH_Mesh_i( GetPOA(), this );
     // create a new mesh object
     if(MYDEBUG) MESSAGE("myIsEmbeddedMode " << myIsEmbeddedMode);
     // create a new mesh object
     if(MYDEBUG) MESSAGE("myIsEmbeddedMode " << myIsEmbeddedMode);
-    meshServant->SetImpl( myGen.CreateMesh( GetCurrentStudyID(), myIsEmbeddedMode ));
+    meshServant->SetImpl( myGen.CreateMesh( myIsEmbeddedMode ));
 
     // activate the CORBA servant of Mesh
     SMESH::SMESH_Mesh_var mesh = SMESH::SMESH_Mesh::_narrow( meshServant->_this() );
 
     // activate the CORBA servant of Mesh
     SMESH::SMESH_Mesh_var mesh = SMESH::SMESH_Mesh::_narrow( meshServant->_this() );
@@ -609,82 +609,74 @@ CORBA::Boolean SMESH_Gen_i::IsEmbeddedMode()
 
 //=============================================================================
 /*!
 
 //=============================================================================
 /*!
- *  SMESH_Gen_i::SetCurrentStudy
+ *  SMESH_Gen_i::SetEnablePublish
  *
  *
- *  Set current study
+ *  Set enable publishing in the study
  */
 //=============================================================================
  */
 //=============================================================================
-
-void SMESH_Gen_i::SetCurrentStudy( SALOMEDS::Study_ptr theStudy )
+void SMESH_Gen_i::SetEnablePublish( CORBA::Boolean theIsEnablePublish )
 {
 {
-  setCurrentStudy( theStudy );
+  myIsEnablePublish = theIsEnablePublish;
 }
 
 }
 
-void SMESH_Gen_i::setCurrentStudy( SALOMEDS::Study_ptr theStudy,
-                                   bool                theStudyIsBeingClosed)
+//=============================================================================
+/*!
+ *  SMESH_Gen_i::IsEnablePublish
+ *
+ *  Check enable publishing
+ */
+//=============================================================================
+
+CORBA::Boolean SMESH_Gen_i::IsEnablePublish()
 {
 {
-  int curStudyId = GetCurrentStudyID();
-  myCurrentStudy = SALOMEDS::Study::_duplicate( theStudy );
-  // create study context, if it doesn't exist and set current study
-  int studyId = GetCurrentStudyID();
-  if ( myStudyContextMap.find( studyId ) == myStudyContextMap.end() )
-    myStudyContextMap[ studyId ] = new StudyContext;
-
-  // myCurrentStudy may be nil
-  if ( !theStudyIsBeingClosed && !CORBA::is_nil( myCurrentStudy ) ) {
-    SALOMEDS::StudyBuilder_var aStudyBuilder = myCurrentStudy->NewBuilder();
-    SALOMEDS::SComponent_wrap GEOM_var = myCurrentStudy->FindComponent( "GEOM" );
-    if( !GEOM_var->_is_nil() )
-      aStudyBuilder->LoadWith( GEOM_var, GetGeomEngine() );
-    // NPAL16168, issue 0020210
-    // Let meshes update their data depending on GEOM groups that could change
-    if ( curStudyId != studyId )
-    {
-      CORBA::String_var compDataType = ComponentDataType();
-      SALOMEDS::SComponent_wrap me = myCurrentStudy->FindComponent( compDataType.in() );
-      if ( !me->_is_nil() ) {
-        SALOMEDS::ChildIterator_wrap anIter = myCurrentStudy->NewChildIterator( me );
-        for ( ; anIter->More(); anIter->Next() ) {
-          SALOMEDS::SObject_wrap so = anIter->Value();
-          CORBA::Object_var     ior = SObjectToObject( so );
-          if ( SMESH_Mesh_i*   mesh = SMESH::DownCast<SMESH_Mesh_i*>( ior ))
-            mesh->CheckGeomModif();
-        }
-      }
-    }
-  }
+  return myIsEnablePublish;
 }
 
 //=============================================================================
 /*!
 }
 
 //=============================================================================
 /*!
- *  SMESH_Gen_i::GetCurrentStudy
+ *  SMESH_Gen_i::UpdateStudy
  *
  *
- *  Get current study
+ *  Update study (needed at switching GEOM->SMESH)
  */
 //=============================================================================
 
  */
 //=============================================================================
 
-SALOMEDS::Study_ptr SMESH_Gen_i::GetCurrentStudy()
+void SMESH_Gen_i::UpdateStudy()
 {
 {
-  if(MYDEBUG) MESSAGE( "SMESH_Gen_i::GetCurrentStudy: study Id = " << GetCurrentStudyID() );
-  if ( GetCurrentStudyID() < 0 )
-    return SALOMEDS::Study::_nil();
-  return SALOMEDS::Study::_duplicate( myCurrentStudy );
+  if ( !myStudyContext )
+    myStudyContext = new StudyContext;
+
+  SALOMEDS::Study_var aStudy = getStudyServant();
+  if ( !CORBA::is_nil( aStudy ) ) {
+    SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
+    SALOMEDS::SComponent_wrap GEOM_var = aStudy->FindComponent( "GEOM" );
+    if( !GEOM_var->_is_nil() )
+      aStudyBuilder->LoadWith( GEOM_var, GetGeomEngine() );
+    // NPAL16168, issue 0020210
+    // Let meshes update their data depending on GEOM groups that could change
+    CORBA::String_var compDataType = ComponentDataType();
+    SALOMEDS::SComponent_wrap me = aStudy->FindComponent( compDataType.in() );
+    if ( !me->_is_nil() ) {
+      SALOMEDS::ChildIterator_wrap anIter = aStudy->NewChildIterator( me );
+      for ( ; anIter->More(); anIter->Next() ) {
+        SALOMEDS::SObject_wrap so = anIter->Value();
+        CORBA::Object_var     ior = SObjectToObject( so );
+        if ( SMESH_Mesh_i*   mesh = SMESH::DownCast<SMESH_Mesh_i*>( ior ))
+          mesh->CheckGeomModif();
+      }
+    }
+  }
 }
 
 //=============================================================================
 /*!
 }
 
 //=============================================================================
 /*!
- *  SMESH_Gen_i::GetCurrentStudyContext
+ *  SMESH_Gen_i::GetStudyContext
  *
  *
- *  Get current study context
+ *  Get study context
  */
 //=============================================================================
  */
 //=============================================================================
-StudyContext* SMESH_Gen_i::GetCurrentStudyContext()
+StudyContext* SMESH_Gen_i::GetStudyContext()
 {
 {
-  if ( !CORBA::is_nil( myCurrentStudy ) &&
-       myStudyContextMap.find( GetCurrentStudyID() ) != myStudyContextMap.end() )
-    return myStudyContextMap[ myCurrentStudy->StudyId() ];
-  else
-    return 0;
+  return myStudyContext;
 }
 
 //=============================================================================
 }
 
 //=============================================================================
@@ -705,7 +697,7 @@ SMESH::SMESH_Hypothesis_ptr SMESH_Gen_i::CreateHypothesis( const char* theHypNam
 
   // Publish hypothesis/algorithm in the study
   if ( CanPublishInStudy( hyp ) ) {
 
   // Publish hypothesis/algorithm in the study
   if ( CanPublishInStudy( hyp ) ) {
-    SALOMEDS::SObject_wrap aSO = PublishHypothesis( myCurrentStudy, hyp );
+    SALOMEDS::SObject_wrap aSO = PublishHypothesis( hyp );
     if ( !aSO->_is_nil() ) {
       // Update Python script
       TPythonDump() << aSO << " = " << this << ".CreateHypothesis('"
     if ( !aSO->_is_nil() ) {
       // Update Python script
       TPythonDump() << aSO << " = " << this << ".CreateHypothesis('"
@@ -830,12 +822,12 @@ CORBA::Boolean SMESH_Gen_i::GetSoleSubMeshUsingHyp( SMESH::SMESH_Hypothesis_ptr
                                                     SMESH::SMESH_Mesh_out       theMesh,
                                                     GEOM::GEOM_Object_out       theShape)
 {
                                                     SMESH::SMESH_Mesh_out       theMesh,
                                                     GEOM::GEOM_Object_out       theShape)
 {
-  if ( GetCurrentStudyID() < 0 || CORBA::is_nil( theHyp ))
+  if ( CORBA::is_nil( theHyp ))
     return false;
 
   // get Mesh component SO
   CORBA::String_var compDataType = ComponentDataType();
     return false;
 
   // get Mesh component SO
   CORBA::String_var compDataType = ComponentDataType();
-  SALOMEDS::SComponent_wrap comp = myCurrentStudy->FindComponent( compDataType.in() );
+  SALOMEDS::SComponent_wrap comp = getStudyServant()->FindComponent( compDataType.in() );
   if ( CORBA::is_nil( comp ))
     return false;
 
   if ( CORBA::is_nil( comp ))
     return false;
 
@@ -843,7 +835,7 @@ CORBA::Boolean SMESH_Gen_i::GetSoleSubMeshUsingHyp( SMESH::SMESH_Hypothesis_ptr
   SMESH::SMESH_Mesh_var foundMesh;
   TopoDS_Shape          foundShape;
   bool                  isSole = true;
   SMESH::SMESH_Mesh_var foundMesh;
   TopoDS_Shape          foundShape;
   bool                  isSole = true;
-  SALOMEDS::ChildIterator_wrap meshIter = myCurrentStudy->NewChildIterator( comp );
+  SALOMEDS::ChildIterator_wrap meshIter = getStudyServant()->NewChildIterator( comp );
   for ( ; meshIter->More() && isSole; meshIter->Next() )
   {
     SALOMEDS::SObject_wrap curSO = meshIter->Value();
   for ( ; meshIter->More() && isSole; meshIter->Next() )
   {
     SALOMEDS::SObject_wrap curSO = meshIter->Value();
@@ -1049,9 +1041,9 @@ SMESH::SMESH_Mesh_ptr SMESH_Gen_i::CreateMesh( GEOM::GEOM_Object_ptr theShapeObj
 
   // publish mesh in the study
   if ( CanPublishInStudy( mesh ) ) {
 
   // publish mesh in the study
   if ( CanPublishInStudy( mesh ) ) {
-    SALOMEDS::StudyBuilder_var aStudyBuilder = myCurrentStudy->NewBuilder();
+    SALOMEDS::StudyBuilder_var aStudyBuilder = getStudyServant()->NewBuilder();
     aStudyBuilder->NewCommand();  // There is a transaction
     aStudyBuilder->NewCommand();  // There is a transaction
-    SALOMEDS::SObject_wrap aSO = PublishMesh( myCurrentStudy, mesh.in() );
+    SALOMEDS::SObject_wrap aSO = PublishMesh( mesh.in() );
     aStudyBuilder->CommitCommand();
     if ( !aSO->_is_nil() ) {
       // Update Python script
     aStudyBuilder->CommitCommand();
     if ( !aSO->_is_nil() ) {
       // Update Python script
@@ -1080,9 +1072,9 @@ SMESH::SMESH_Mesh_ptr SMESH_Gen_i::CreateEmptyMesh()
 
   // publish mesh in the study
   if ( CanPublishInStudy( mesh ) ) {
 
   // publish mesh in the study
   if ( CanPublishInStudy( mesh ) ) {
-    SALOMEDS::StudyBuilder_var aStudyBuilder = myCurrentStudy->NewBuilder();
+    SALOMEDS::StudyBuilder_var aStudyBuilder = getStudyServant()->NewBuilder();
     aStudyBuilder->NewCommand();  // There is a transaction
     aStudyBuilder->NewCommand();  // There is a transaction
-    SALOMEDS::SObject_wrap aSO = PublishMesh( myCurrentStudy, mesh.in() );
+    SALOMEDS::SObject_wrap aSO = PublishMesh( mesh.in() );
     aStudyBuilder->CommitCommand();
     if ( !aSO->_is_nil() ) {
       // Update Python script
     aStudyBuilder->CommitCommand();
     if ( !aSO->_is_nil() ) {
       // Update Python script
@@ -1135,9 +1127,9 @@ SMESH::SMESH_Mesh_ptr SMESH_Gen_i::CreateMeshesFromUNV( const char* theFileName
   string aFileName;
   // publish mesh in the study
   if ( CanPublishInStudy( aMesh ) ) {
   string aFileName;
   // publish mesh in the study
   if ( CanPublishInStudy( aMesh ) ) {
-    SALOMEDS::StudyBuilder_var aStudyBuilder = myCurrentStudy->NewBuilder();
+    SALOMEDS::StudyBuilder_var aStudyBuilder = getStudyServant()->NewBuilder();
     aStudyBuilder->NewCommand();  // There is a transaction
     aStudyBuilder->NewCommand();  // There is a transaction
-    SALOMEDS::SObject_wrap aSO = PublishMesh( myCurrentStudy, aMesh.in(), aFileName.c_str() );
+    SALOMEDS::SObject_wrap aSO = PublishMesh( aMesh.in(), aFileName.c_str() );
     aStudyBuilder->CommitCommand();
     if ( !aSO->_is_nil() ) {
       // Update Python script
     aStudyBuilder->CommitCommand();
     if ( !aSO->_is_nil() ) {
       // Update Python script
@@ -1193,11 +1185,9 @@ SMESH::mesh_array* SMESH_Gen_i::CreateMeshesFromMEDorSAUV( const char* theFileNa
 
   if (theStatus == SMESH::DRS_OK) {
     SALOMEDS::StudyBuilder_var aStudyBuilder;
 
   if (theStatus == SMESH::DRS_OK) {
     SALOMEDS::StudyBuilder_var aStudyBuilder;
-    if ( GetCurrentStudyID() > -1 )
-    {
-      aStudyBuilder = myCurrentStudy->NewBuilder();
-      aStudyBuilder->NewCommand();  // There is a transaction
-    }
+    aStudyBuilder = getStudyServant()->NewBuilder();
+    aStudyBuilder->NewCommand();  // There is a transaction
+
     aResult->length( aNames.size() );
     int i = 0;
 
     aResult->length( aNames.size() );
     int i = 0;
 
@@ -1216,7 +1206,7 @@ SMESH::mesh_array* SMESH_Gen_i::CreateMeshesFromMEDorSAUV( const char* theFileNa
         // little trick: for MED file theFileName and theFileNameForPython are the same, but they are different for SAUV
         // - as names of meshes are stored in MED file, we use them for data publishing
         // - as mesh name is not stored in UNV file, we use file name as name of mesh when publishing data
         // little trick: for MED file theFileName and theFileNameForPython are the same, but they are different for SAUV
         // - as names of meshes are stored in MED file, we use them for data publishing
         // - as mesh name is not stored in UNV file, we use file name as name of mesh when publishing data
-        aSO = PublishMesh( myCurrentStudy, mesh.in(), ( theFileName == theFileNameForPython ) ? (*it).c_str() : aFileName.c_str() );
+        aSO = PublishMesh( mesh.in(), ( theFileName == theFileNameForPython ) ? (*it).c_str() : aFileName.c_str() );
 
       // Python Dump
       if ( !aSO->_is_nil() ) {
 
       // Python Dump
       if ( !aSO->_is_nil() ) {
@@ -1327,10 +1317,9 @@ SMESH::SMESH_Mesh_ptr SMESH_Gen_i::CreateMeshesFromSTL( const char* theFileName
 #endif
   // publish mesh in the study
   if ( CanPublishInStudy( aMesh ) ) {
 #endif
   // publish mesh in the study
   if ( CanPublishInStudy( aMesh ) ) {
-    SALOMEDS::StudyBuilder_var aStudyBuilder = myCurrentStudy->NewBuilder();
+    SALOMEDS::StudyBuilder_var aStudyBuilder = getStudyServant()->NewBuilder();
     aStudyBuilder->NewCommand();  // There is a transaction
     aStudyBuilder->NewCommand();  // There is a transaction
-    SALOMEDS::SObject_wrap aSO = PublishInStudy
-      ( myCurrentStudy, SALOMEDS::SObject::_nil(), aMesh.in(), aFileName.c_str() );
+    SALOMEDS::SObject_wrap aSO = PublishInStudy( SALOMEDS::SObject::_nil(), aMesh.in(), aFileName.c_str() );
     aStudyBuilder->CommitCommand();
     if ( !aSO->_is_nil() ) {
       // Update Python script
     aStudyBuilder->CommitCommand();
     if ( !aSO->_is_nil() ) {
       // Update Python script
@@ -1378,7 +1367,7 @@ SMESH::mesh_array* SMESH_Gen_i::CreateMeshesFromCGNS( const char* theFileName,
 
     if (theStatus == SMESH::DRS_OK)
     {
 
     if (theStatus == SMESH::DRS_OK)
     {
-      SALOMEDS::StudyBuilder_var aStudyBuilder = myCurrentStudy->NewBuilder();
+      SALOMEDS::StudyBuilder_var aStudyBuilder = getStudyServant()->NewBuilder();
       aStudyBuilder->NewCommand();  // There is a transaction
 
       int i = 0;
       aStudyBuilder->NewCommand();  // There is a transaction
 
       int i = 0;
@@ -1406,7 +1395,7 @@ SMESH::mesh_array* SMESH_Gen_i::CreateMeshesFromCGNS( const char* theFileName,
         // publish mesh in the study
         SALOMEDS::SObject_wrap aSO;
         if ( CanPublishInStudy( mesh ) )
         // publish mesh in the study
         SALOMEDS::SObject_wrap aSO;
         if ( CanPublishInStudy( mesh ) )
-          aSO = PublishMesh( myCurrentStudy, mesh.in(), meshName.c_str() );
+          aSO = PublishMesh( mesh.in(), meshName.c_str() );
 
         // Python Dump
         if ( !aSO->_is_nil() ) {
 
         // Python Dump
         if ( !aSO->_is_nil() ) {
@@ -1456,10 +1445,9 @@ SMESH_Gen_i::CreateMeshesFromGMF( const char*             theFileName,
 #endif
   // publish mesh in the study
   if ( CanPublishInStudy( aMesh ) ) {
 #endif
   // publish mesh in the study
   if ( CanPublishInStudy( aMesh ) ) {
-    SALOMEDS::StudyBuilder_var aStudyBuilder = myCurrentStudy->NewBuilder();
+    SALOMEDS::StudyBuilder_var aStudyBuilder = getStudyServant()->NewBuilder();
     aStudyBuilder->NewCommand();  // There is a transaction
     aStudyBuilder->NewCommand();  // There is a transaction
-    SALOMEDS::SObject_wrap aSO = PublishInStudy
-      ( myCurrentStudy, SALOMEDS::SObject::_nil(), aMesh.in(), aFileName.c_str() );
+    SALOMEDS::SObject_wrap aSO = PublishInStudy( SALOMEDS::SObject::_nil(), aMesh.in(), aFileName.c_str() );
     aStudyBuilder->CommitCommand();
     if ( !aSO->_is_nil() ) {
       // Update Python script
     aStudyBuilder->CommitCommand();
     if ( !aSO->_is_nil() ) {
       // Update Python script
@@ -1526,16 +1514,17 @@ CORBA::Boolean SMESH_Gen_i::IsReadyToCompute( SMESH::SMESH_Mesh_ptr theMesh,
 SALOMEDS::SObject_ptr SMESH_Gen_i::GetAlgoSO(const ::SMESH_Algo* algo)
 {
   if ( algo ) {
 SALOMEDS::SObject_ptr SMESH_Gen_i::GetAlgoSO(const ::SMESH_Algo* algo)
 {
   if ( algo ) {
-    if ( !myCurrentStudy->_is_nil() ) {
+  SALOMEDS::Study_var aStudy = getStudyServant();
+    if ( !aStudy->_is_nil() ) {
       // find algo in the study
       CORBA::String_var compDataType  = ComponentDataType();
       // find algo in the study
       CORBA::String_var compDataType  = ComponentDataType();
-      SALOMEDS::SComponent_wrap father = myCurrentStudy->FindComponent( compDataType.in() );
+      SALOMEDS::SComponent_wrap father = aStudy->FindComponent( compDataType.in() );
       if ( !father->_is_nil() ) {
       if ( !father->_is_nil() ) {
-        SALOMEDS::ChildIterator_wrap itBig = myCurrentStudy->NewChildIterator( father );
+        SALOMEDS::ChildIterator_wrap itBig = aStudy->NewChildIterator( father );
         for ( ; itBig->More(); itBig->Next() ) {
           SALOMEDS::SObject_wrap gotBranch = itBig->Value();
           if ( gotBranch->Tag() == GetAlgorithmsRootTag() ) {
         for ( ; itBig->More(); itBig->Next() ) {
           SALOMEDS::SObject_wrap gotBranch = itBig->Value();
           if ( gotBranch->Tag() == GetAlgorithmsRootTag() ) {
-            SALOMEDS::ChildIterator_wrap algoIt = myCurrentStudy->NewChildIterator( gotBranch );
+            SALOMEDS::ChildIterator_wrap algoIt = aStudy->NewChildIterator( gotBranch );
             for ( ; algoIt->More(); algoIt->Next() ) {
               SALOMEDS::SObject_wrap algoSO = algoIt->Value();
               CORBA::Object_var     algoIOR = SObjectToObject( algoSO );
             for ( ; algoIt->More(); algoIt->Next() ) {
               SALOMEDS::SObject_wrap algoSO = algoIt->Value();
               CORBA::Object_var     algoIOR = SObjectToObject( algoSO );
@@ -2271,16 +2260,16 @@ SMESH_Gen_i::GetGeometryByMeshElement( SMESH::SMESH_Mesh_ptr  theMesh,
     GEOM::GEOM_Gen_ptr    geomGen   = GetGeomEngine();
 
     // try to find the corresponding SObject
     GEOM::GEOM_Gen_ptr    geomGen   = GetGeomEngine();
 
     // try to find the corresponding SObject
-    SALOMEDS::SObject_wrap SObj = ObjectToSObject( myCurrentStudy, geom.in() );
+    SALOMEDS::SObject_wrap SObj = ObjectToSObject( geom.in() );
     if ( SObj->_is_nil() ) // submesh can be not found even if published
     {
       // try to find published submesh
       GEOM::ListOfLong_var list = geom->GetSubShapeIndices();
       if ( !geom->IsMainShape() && list->length() == 1 ) {
     if ( SObj->_is_nil() ) // submesh can be not found even if published
     {
       // try to find published submesh
       GEOM::ListOfLong_var list = geom->GetSubShapeIndices();
       if ( !geom->IsMainShape() && list->length() == 1 ) {
-        SALOMEDS::SObject_wrap mainSO = ObjectToSObject( myCurrentStudy, mainShape );
+        SALOMEDS::SObject_wrap mainSO = ObjectToSObject( mainShape );
         SALOMEDS::ChildIterator_wrap it;
         if ( !mainSO->_is_nil() ) {
         SALOMEDS::ChildIterator_wrap it;
         if ( !mainSO->_is_nil() ) {
-          it = myCurrentStudy->NewChildIterator( mainSO );
+          it = getStudyServant()->NewChildIterator( mainSO );
         }
         if ( !it->_is_nil() ) {
           for ( it->InitEx(true); it->More(); it->Next() ) {
         }
         if ( !it->_is_nil() ) {
           for ( it->InitEx(true); it->More(); it->Next() ) {
@@ -2300,7 +2289,7 @@ SMESH_Gen_i::GetGeometryByMeshElement( SMESH::SMESH_Mesh_ptr  theMesh,
       }
     }
     if ( SObj->_is_nil() ) // publish a new subshape
       }
     }
     if ( SObj->_is_nil() ) // publish a new subshape
-      SObj = geomGen->AddInStudy( myCurrentStudy, geom, theGeomName, mainShape );
+      SObj = geomGen->AddInStudy( geom, theGeomName, mainShape );
 
     // return only published geometry
     if ( !SObj->_is_nil() ) {
 
     // return only published geometry
     if ( !SObj->_is_nil() ) {
@@ -2348,10 +2337,10 @@ SMESH_Gen_i::FindGeometryByMeshElement( SMESH::SMESH_Mesh_ptr  theMesh,
         GEOM::GEOM_Object_var geom = ShapeToGeomObject( meshDS->IndexToShape( shapeID ));
         if ( geom->_is_nil() ) {
           // try to find a published sub-shape
         GEOM::GEOM_Object_var geom = ShapeToGeomObject( meshDS->IndexToShape( shapeID ));
         if ( geom->_is_nil() ) {
           // try to find a published sub-shape
-          SALOMEDS::SObject_wrap mainSO = ObjectToSObject( myCurrentStudy, mainShape );
+          SALOMEDS::SObject_wrap mainSO = ObjectToSObject( mainShape );
           SALOMEDS::ChildIterator_wrap it;
           if ( !mainSO->_is_nil() ) {
           SALOMEDS::ChildIterator_wrap it;
           if ( !mainSO->_is_nil() ) {
-            it = myCurrentStudy->NewChildIterator( mainSO );
+            it = getStudyServant()->NewChildIterator( mainSO );
           }
           if ( !it->_is_nil() ) {
             for ( it->InitEx(true); it->More(); it->Next() ) {
           }
           if ( !it->_is_nil() ) {
             for ( it->InitEx(true); it->More(); it->Next() ) {
@@ -2370,8 +2359,7 @@ SMESH_Gen_i::FindGeometryByMeshElement( SMESH::SMESH_Mesh_ptr  theMesh,
         }
         if ( geom->_is_nil() ) {
           // explode
         }
         if ( geom->_is_nil() ) {
           // explode
-          GEOM::GEOM_IShapesOperations_wrap op =
-            geomGen->GetIShapesOperations( GetCurrentStudyID() );
+          GEOM::GEOM_IShapesOperations_wrap op = geomGen->GetIShapesOperations();
           if ( !op->_is_nil() )
             geom = op->GetSubShape( mainShape, shapeID );
         }
           if ( !op->_is_nil() )
             geom = op->GetSubShape( mainShape, shapeID );
         }
@@ -2563,7 +2551,7 @@ SMESH_Gen_i::ConcatenateCommon(const SMESH::ListOfIDSources& theMeshesArray,
           int _assert[( nbNames == SMESH::NB_ELEMENT_TYPES ) ? 2 : -1 ]; _assert[0]=_assert[1]=0;
         }
         string groupName = "Gr";
           int _assert[( nbNames == SMESH::NB_ELEMENT_TYPES ) ? 2 : -1 ]; _assert[0]=_assert[1]=0;
         }
         string groupName = "Gr";
-        SALOMEDS::SObject_wrap aMeshSObj = ObjectToSObject( myCurrentStudy, theMeshesArray[i] );
+        SALOMEDS::SObject_wrap aMeshSObj = ObjectToSObject( theMeshesArray[i] );
         if ( aMeshSObj ) {
           CORBA::String_var name = aMeshSObj->GetName();
           groupName += name;
         if ( aMeshSObj ) {
           CORBA::String_var name = aMeshSObj->GetName();
           groupName += name;
@@ -2717,7 +2705,7 @@ SMESH_Gen_i::ConcatenateCommon(const SMESH::ListOfIDSources& theMeshesArray,
   }
 
   // IPAL21468 Change icon of compound because it need not be computed.
   }
 
   // IPAL21468 Change icon of compound because it need not be computed.
-  SALOMEDS::SObject_wrap aMeshSObj = ObjectToSObject( myCurrentStudy, aNewMesh );
+  SALOMEDS::SObject_wrap aMeshSObj = ObjectToSObject( aNewMesh );
   SetPixMap( aMeshSObj, "ICON_SMESH_TREE_MESH" );
 
   if (aNewMeshDS)
   SetPixMap( aMeshSObj, "ICON_SMESH_TREE_MESH" );
 
   if (aNewMeshDS)
@@ -2764,7 +2752,7 @@ SMESH::SMESH_Mesh_ptr SMESH_Gen_i::CopyMesh(SMESH::SMESH_IDSource_ptr meshPart,
   SMESH_Mesh_i*       newMesh_i = SMESH::DownCast<SMESH_Mesh_i*>( newMesh );
   if ( !newMesh_i )
     THROW_SALOME_CORBA_EXCEPTION( "can't create a mesh", SALOME::INTERNAL_ERROR );
   SMESH_Mesh_i*       newMesh_i = SMESH::DownCast<SMESH_Mesh_i*>( newMesh );
   if ( !newMesh_i )
     THROW_SALOME_CORBA_EXCEPTION( "can't create a mesh", SALOME::INTERNAL_ERROR );
-  SALOMEDS::SObject_wrap meshSO = ObjectToSObject(myCurrentStudy, newMesh );
+  SALOMEDS::SObject_wrap meshSO = ObjectToSObject( newMesh );
   if ( !meshSO->_is_nil() )
   {
     SetName( meshSO, meshName, "Mesh" );
   if ( !meshSO->_is_nil() )
   {
     SetName( meshSO, meshName, "Mesh" );
@@ -3009,16 +2997,13 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
                                       const char*              theURL,
                                       bool                     isMultiFile )
 {
                                       const char*              theURL,
                                       bool                     isMultiFile )
 {
-  //  ASSERT( theComponent->GetStudy()->StudyId() == myCurrentStudy->StudyId() )
-  // san -- in case <myCurrentStudy> differs from theComponent's study,
-  // use that of the component
-  if ( theComponent->GetStudy()->StudyId() != GetCurrentStudyID() )
-    SetCurrentStudy( theComponent->GetStudy() );
+  if (!myStudyContext)
+    UpdateStudy();
 
   // Store study contents as a set of python commands
 
   // Store study contents as a set of python commands
-  SavePython(myCurrentStudy);
+  SavePython();
 
 
-  StudyContext* myStudyContext = GetCurrentStudyContext();
+  SALOMEDS::Study_var aStudy = getStudyServant();
 
   // Declare a byte stream
   SALOMEDS::TMPFile_var aStreamFile;
 
   // Declare a byte stream
   SALOMEDS::TMPFile_var aStreamFile;
@@ -3028,20 +3013,20 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
     ( isMultiFile ) ? TCollection_AsciiString( ( char* )theURL ) : ( char* )SALOMEDS_Tool::GetTmpDir().c_str();
 
   // Create a sequence of files processed
     ( isMultiFile ) ? TCollection_AsciiString( ( char* )theURL ) : ( char* )SALOMEDS_Tool::GetTmpDir().c_str();
 
   // Create a sequence of files processed
-  SALOMEDS::ListOfFileNames_var aFileSeq = new SALOMEDS::ListOfFileNames;
-  aFileSeq->length( NUM_TMP_FILES );
+  SALOMEDS_Tool::ListOfFiles aFileSeq;
+  aFileSeq.reserve( NUM_TMP_FILES );
 
   TCollection_AsciiString aStudyName( "" );
   if ( isMultiFile )
 
   TCollection_AsciiString aStudyName( "" );
   if ( isMultiFile )
-    aStudyName = ( (char*)SALOMEDS_Tool::GetNameFromPath( myCurrentStudy->URL() ).c_str() );
+    aStudyName = ( (char*)SALOMEDS_Tool::GetNameFromPath( aStudy->URL() ).c_str() );
 
   // Set names of temporary files
   TCollection_AsciiString filename =
     aStudyName + TCollection_AsciiString( "_SMESH.hdf" );        // for SMESH data itself
   TCollection_AsciiString meshfile =
     aStudyName + TCollection_AsciiString( "_SMESH_Mesh.med" );   // for mesh data to be stored in MED file
 
   // Set names of temporary files
   TCollection_AsciiString filename =
     aStudyName + TCollection_AsciiString( "_SMESH.hdf" );        // for SMESH data itself
   TCollection_AsciiString meshfile =
     aStudyName + TCollection_AsciiString( "_SMESH_Mesh.med" );   // for mesh data to be stored in MED file
-  aFileSeq[ 0 ] = CORBA::string_dup( filename.ToCString() );
-  aFileSeq[ 1 ] = CORBA::string_dup( meshfile.ToCString() );
+  aFileSeq.push_back(CORBA::string_dup( filename.ToCString() ));
+  aFileSeq.push_back(CORBA::string_dup( meshfile.ToCString() ));
   filename = tmpDir + filename;
   meshfile = tmpDir + meshfile;
 
   filename = tmpDir + filename;
   meshfile = tmpDir + meshfile;
 
@@ -3075,7 +3060,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
   // SetStoreName() to groups before storing hypotheses to let them refer to
   // groups using "store name", which is "Group <group_persistent_id>"
   {
   // SetStoreName() to groups before storing hypotheses to let them refer to
   // groups using "store name", which is "Group <group_persistent_id>"
   {
-    SALOMEDS::ChildIterator_wrap itBig = myCurrentStudy->NewChildIterator( theComponent );
+    SALOMEDS::ChildIterator_wrap itBig = aStudy->NewChildIterator( theComponent );
     for ( ; itBig->More(); itBig->Next() ) {
       SALOMEDS::SObject_wrap gotBranch = itBig->Value();
       if ( gotBranch->Tag() > GetAlgorithmsRootTag() ) {
     for ( ; itBig->More(); itBig->Next() ) {
       SALOMEDS::SObject_wrap gotBranch = itBig->Value();
       if ( gotBranch->Tag() > GetAlgorithmsRootTag() ) {
@@ -3112,7 +3097,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
   aFile->CreateOnDisk();
 
   // --> iterator for top-level objects
   aFile->CreateOnDisk();
 
   // --> iterator for top-level objects
-  SALOMEDS::ChildIterator_wrap itBig = myCurrentStudy->NewChildIterator( theComponent );
+  SALOMEDS::ChildIterator_wrap itBig = aStudy->NewChildIterator( theComponent );
   for ( ; itBig->More(); itBig->Next() ) {
     SALOMEDS::SObject_wrap gotBranch = itBig->Value();
 
   for ( ; itBig->More(); itBig->Next() ) {
     SALOMEDS::SObject_wrap gotBranch = itBig->Value();
 
@@ -3123,7 +3108,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
       aTopGroup->CreateOnDisk();
 
       // iterator for all hypotheses
       aTopGroup->CreateOnDisk();
 
       // iterator for all hypotheses
-      SALOMEDS::ChildIterator_wrap it = myCurrentStudy->NewChildIterator( gotBranch );
+      SALOMEDS::ChildIterator_wrap it = aStudy->NewChildIterator( gotBranch );
       for ( ; it->More(); it->Next() ) {
         SALOMEDS::SObject_wrap mySObject = it->Value();
         CORBA::Object_var anObject = SObjectToObject( mySObject );
       for ( ; it->More(); it->Next() ) {
         SALOMEDS::SObject_wrap mySObject = it->Value();
         CORBA::Object_var anObject = SObjectToObject( mySObject );
@@ -3192,7 +3177,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
       aTopGroup->CreateOnDisk();
 
       // iterator for all algorithms
       aTopGroup->CreateOnDisk();
 
       // iterator for all algorithms
-      SALOMEDS::ChildIterator_wrap it = myCurrentStudy->NewChildIterator( gotBranch );
+      SALOMEDS::ChildIterator_wrap it = aStudy->NewChildIterator( gotBranch );
       for ( ; it->More(); it->Next() ) {
         SALOMEDS::SObject_wrap mySObject = it->Value();
         CORBA::Object_var anObject = SObjectToObject( mySObject );
       for ( ; it->More(); it->Next() ) {
         SALOMEDS::SObject_wrap mySObject = it->Value();
         CORBA::Object_var anObject = SObjectToObject( mySObject );
@@ -3341,13 +3326,13 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
             SALOMEDS::SObject_wrap myHypBranch;
             found = gotBranch->FindSubObject( GetRefOnAppliedHypothesisTag(), myHypBranch.inout() );
             if ( found && !shapeRefFound && hasShape) { // remove applied hyps
             SALOMEDS::SObject_wrap myHypBranch;
             found = gotBranch->FindSubObject( GetRefOnAppliedHypothesisTag(), myHypBranch.inout() );
             if ( found && !shapeRefFound && hasShape) { // remove applied hyps
-              myCurrentStudy->NewBuilder()->RemoveObjectWithChildren( myHypBranch );
+              aStudy->NewBuilder()->RemoveObjectWithChildren( myHypBranch );
             }
             if ( found && (shapeRefFound || !hasShape) ) {
               aGroup = new HDFgroup( "Applied Hypotheses", aTopGroup );
               aGroup->CreateOnDisk();
 
             }
             if ( found && (shapeRefFound || !hasShape) ) {
               aGroup = new HDFgroup( "Applied Hypotheses", aTopGroup );
               aGroup->CreateOnDisk();
 
-              SALOMEDS::ChildIterator_wrap it = myCurrentStudy->NewChildIterator( myHypBranch );
+              SALOMEDS::ChildIterator_wrap it = aStudy->NewChildIterator( myHypBranch );
               int hypNb = 0;
               for ( ; it->More(); it->Next() ) {
                 SALOMEDS::SObject_wrap mySObject = it->Value();
               int hypNb = 0;
               for ( ; it->More(); it->Next() ) {
                 SALOMEDS::SObject_wrap mySObject = it->Value();
@@ -3385,13 +3370,13 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
             found = gotBranch->FindSubObject( GetRefOnAppliedAlgorithmsTag(),
                                               myAlgoBranch.inout() );
             if ( found && !shapeRefFound && hasShape) { // remove applied algos
             found = gotBranch->FindSubObject( GetRefOnAppliedAlgorithmsTag(),
                                               myAlgoBranch.inout() );
             if ( found && !shapeRefFound && hasShape) { // remove applied algos
-              myCurrentStudy->NewBuilder()->RemoveObjectWithChildren( myAlgoBranch );
+              aStudy->NewBuilder()->RemoveObjectWithChildren( myAlgoBranch );
             }
             if ( found && (shapeRefFound || !hasShape)) {
               aGroup = new HDFgroup( "Applied Algorithms", aTopGroup );
               aGroup->CreateOnDisk();
 
             }
             if ( found && (shapeRefFound || !hasShape)) {
               aGroup = new HDFgroup( "Applied Algorithms", aTopGroup );
               aGroup->CreateOnDisk();
 
-              SALOMEDS::ChildIterator_wrap it = myCurrentStudy->NewChildIterator( myAlgoBranch );
+              SALOMEDS::ChildIterator_wrap it = aStudy->NewChildIterator( myAlgoBranch );
               int algoNb = 0;
               for ( ; it->More(); it->Next() ) {
                 SALOMEDS::SObject_wrap mySObject = it->Value();
               int algoNb = 0;
               for ( ; it->More(); it->Next() ) {
                 SALOMEDS::SObject_wrap mySObject = it->Value();
@@ -3434,7 +3419,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
               {
                 bool hasShapeRef = false;
                 SALOMEDS::ChildIterator_wrap itSM =
               {
                 bool hasShapeRef = false;
                 SALOMEDS::ChildIterator_wrap itSM =
-                  myCurrentStudy->NewChildIterator( mySubmeshBranch );
+                  aStudy->NewChildIterator( mySubmeshBranch );
                 for ( ; itSM->More(); itSM->Next() ) {
                   SALOMEDS::SObject_wrap mySubRef, myShape, mySObject = itSM->Value();
                   if ( mySObject->FindSubObject( GetRefOnShapeTag(), mySubRef.inout() ))
                 for ( ; itSM->More(); itSM->Next() ) {
                   SALOMEDS::SObject_wrap mySubRef, myShape, mySObject = itSM->Value();
                   if ( mySObject->FindSubObject( GetRefOnShapeTag(), mySubRef.inout() ))
@@ -3459,11 +3444,11 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
                         }
                       }
                     }
                         }
                       }
                     }
-                    myCurrentStudy->NewBuilder()->RemoveObjectWithChildren( mySObject );
+                    aStudy->NewBuilder()->RemoveObjectWithChildren( mySObject );
                   }
                 } // loop on submeshes of a type
                 if ( !shapeRefFound || !hasShapeRef ) { // remove the whole submeshes branch
                   }
                 } // loop on submeshes of a type
                 if ( !shapeRefFound || !hasShapeRef ) { // remove the whole submeshes branch
-                  myCurrentStudy->NewBuilder()->RemoveObjectWithChildren( mySubmeshBranch );
+                  aStudy->NewBuilder()->RemoveObjectWithChildren( mySubmeshBranch );
                   found = false;
                 }
               }  // end check if there is shape reference in submeshes
                   found = false;
                 }
               }  // end check if there is shape reference in submeshes
@@ -3489,7 +3474,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
                 aGroup->CreateOnDisk();
 
                 // iterator for all submeshes of given type
                 aGroup->CreateOnDisk();
 
                 // iterator for all submeshes of given type
-                SALOMEDS::ChildIterator_wrap itSM = myCurrentStudy->NewChildIterator( mySubmeshBranch );
+                SALOMEDS::ChildIterator_wrap itSM = aStudy->NewChildIterator( mySubmeshBranch );
                 for ( ; itSM->More(); itSM->Next() ) {
                   SALOMEDS::SObject_wrap mySObject = itSM->Value();
                   CORBA::Object_var anSubObject = SObjectToObject( mySObject );
                 for ( ; itSM->More(); itSM->Next() ) {
                   SALOMEDS::SObject_wrap mySObject = itSM->Value();
                   CORBA::Object_var anSubObject = SObjectToObject( mySObject );
@@ -3526,7 +3511,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
                       aSubSubGroup = new HDFgroup( "Applied Hypotheses", aSubGroup );
                       aSubSubGroup->CreateOnDisk();
 
                       aSubSubGroup = new HDFgroup( "Applied Hypotheses", aSubGroup );
                       aSubSubGroup->CreateOnDisk();
 
-                      SALOMEDS::ChildIterator_wrap it = myCurrentStudy->NewChildIterator( mySubHypBranch );
+                      SALOMEDS::ChildIterator_wrap it = aStudy->NewChildIterator( mySubHypBranch );
                       int hypNb = 0;
                       for ( ; it->More(); it->Next() ) {
                         SALOMEDS::SObject_wrap mySubSObject = it->Value();
                       int hypNb = 0;
                       for ( ; it->More(); it->Next() ) {
                         SALOMEDS::SObject_wrap mySubSObject = it->Value();
@@ -3563,7 +3548,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
                       aSubSubGroup->CreateOnDisk();
 
                       SALOMEDS::ChildIterator_wrap it =
                       aSubSubGroup->CreateOnDisk();
 
                       SALOMEDS::ChildIterator_wrap it =
-                        myCurrentStudy->NewChildIterator( mySubAlgoBranch );
+                        aStudy->NewChildIterator( mySubAlgoBranch );
                       int algoNb = 0;
                       for ( ; it->More(); it->Next() ) {
                         SALOMEDS::SObject_wrap mySubSObject = it->Value();
                       int algoNb = 0;
                       for ( ; it->More(); it->Next() ) {
                         SALOMEDS::SObject_wrap mySubSObject = it->Value();
@@ -3659,7 +3644,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
                 aGroup = new HDFgroup( name_group, aTopGroup );
                 aGroup->CreateOnDisk();
 
                 aGroup = new HDFgroup( name_group, aTopGroup );
                 aGroup->CreateOnDisk();
 
-                SALOMEDS::ChildIterator_wrap it = myCurrentStudy->NewChildIterator( myGroupsBranch );
+                SALOMEDS::ChildIterator_wrap it = aStudy->NewChildIterator( myGroupsBranch );
                 for ( ; it->More(); it->Next() ) {
                   SALOMEDS::SObject_wrap mySObject = it->Value();
                   CORBA::Object_var aSubObject = SObjectToObject( mySObject );
                 for ( ; it->More(); it->Next() ) {
                   SALOMEDS::SObject_wrap mySObject = it->Value();
                   CORBA::Object_var aSubObject = SObjectToObject( mySObject );
@@ -3944,11 +3929,11 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
   delete aFile;
 
   // Convert temporary files to stream
   delete aFile;
 
   // Convert temporary files to stream
-  aStreamFile = SALOMEDS_Tool::PutFilesToStream( tmpDir.ToCString(), aFileSeq.in(), isMultiFile );
+  aStreamFile = SALOMEDS_Tool::PutFilesToStream( tmpDir.ToCString(), aFileSeq, isMultiFile );
 
   // Remove temporary files and directory
   if ( !isMultiFile )
 
   // Remove temporary files and directory
   if ( !isMultiFile )
-    SALOMEDS_Tool::RemoveTemporaryFiles( tmpDir.ToCString(), aFileSeq.in(), true );
+    SALOMEDS_Tool::RemoveTemporaryFiles( tmpDir.ToCString(), aFileSeq, true );
 
   return aStreamFile._retn();
 }
 
   return aStreamFile._retn();
 }
@@ -3995,11 +3980,7 @@ void SMESH_Gen_i::loadGeomData( SALOMEDS::SComponent_ptr theCompRoot )
   if ( theCompRoot->_is_nil() )
     return;
 
   if ( theCompRoot->_is_nil() )
     return;
 
-  SALOMEDS::Study_var aStudy = SALOMEDS::Study::_narrow( theCompRoot->GetStudy() );
-  if ( aStudy->_is_nil() )
-    return;
-
-  SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
+  SALOMEDS::StudyBuilder_var aStudyBuilder = getStudyServant()->NewBuilder();
   aStudyBuilder->LoadWith( theCompRoot, GetGeomEngine() );
 }
 
   aStudyBuilder->LoadWith( theCompRoot, GetGeomEngine() );
 }
 
@@ -4016,29 +3997,26 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent,
                         const char*              theURL,
                         bool                     isMultiFile )
 {
                         const char*              theURL,
                         bool                     isMultiFile )
 {
-  if ( theComponent->GetStudy()->StudyId() != GetCurrentStudyID() )
-    SetCurrentStudy( theComponent->GetStudy() );
-
+  if (!myStudyContext)
+    UpdateStudy();
+  SALOMEDS::Study_var aStudy = getStudyServant();
   /*  if( !theComponent->_is_nil() )
       {
   /*  if( !theComponent->_is_nil() )
       {
-      //SALOMEDS::Study_var aStudy = SALOMEDS::Study::_narrow( theComponent->GetStudy() );
-      if( !myCurrentStudy->FindComponent( "GEOM" )->_is_nil() )
-      loadGeomData( myCurrentStudy->FindComponent( "GEOM" ) );
+      if( !aStudy->FindComponent( "GEOM" )->_is_nil() )
+      loadGeomData( aStudy->FindComponent( "GEOM" ) );
       }*/
 
       }*/
 
-  StudyContext* myStudyContext = GetCurrentStudyContext();
-
   // Get temporary files location
   TCollection_AsciiString tmpDir =
     ( char* )( isMultiFile ? theURL : SALOMEDS_Tool::GetTmpDir().c_str() );
 
   // Convert the stream into sequence of files to process
   // Get temporary files location
   TCollection_AsciiString tmpDir =
     ( char* )( isMultiFile ? theURL : SALOMEDS_Tool::GetTmpDir().c_str() );
 
   // Convert the stream into sequence of files to process
-  SALOMEDS::ListOfFileNames_var aFileSeq = SALOMEDS_Tool::PutStreamToFiles( theStream,
-                                                                            tmpDir.ToCString(),
-                                                                            isMultiFile );
+  SALOMEDS_Tool::ListOfFiles aFileSeq = SALOMEDS_Tool::PutStreamToFiles( theStream,
+                                                                         tmpDir.ToCString(),
+                                                                         isMultiFile );
   TCollection_AsciiString aStudyName( "" );
   if ( isMultiFile ) {
   TCollection_AsciiString aStudyName( "" );
   if ( isMultiFile ) {
-    CORBA::String_var url = myCurrentStudy->URL();
+    CORBA::String_var url = aStudy->URL();
     aStudyName = (char*)SALOMEDS_Tool::GetNameFromPath( url.in() ).c_str();
   }
   // Set names of temporary files
     aStudyName = (char*)SALOMEDS_Tool::GetNameFromPath( url.in() ).c_str();
   }
   // Set names of temporary files
@@ -4343,7 +4321,7 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent,
             aDataset->ReadFromDisk( refFromFile );
             aDataset->CloseOnDisk();
             if ( strlen( refFromFile ) > 0 ) {
             aDataset->ReadFromDisk( refFromFile );
             aDataset->CloseOnDisk();
             if ( strlen( refFromFile ) > 0 ) {
-              SALOMEDS::SObject_wrap shapeSO = myCurrentStudy->FindObjectID( refFromFile );
+              SALOMEDS::SObject_wrap shapeSO = aStudy->FindObjectID( refFromFile );
 
               // Make sure GEOM data are loaded first
               //loadGeomData( shapeSO->GetFatherComponent() );
 
               // Make sure GEOM data are loaded first
               //loadGeomData( shapeSO->GetFatherComponent() );
@@ -4442,7 +4420,7 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent,
             aDataset->ReadFromDisk( refFromFile );
             aDataset->CloseOnDisk();
             // san - it is impossible to recover applied algorithms using their entries within Load() method
             aDataset->ReadFromDisk( refFromFile );
             aDataset->CloseOnDisk();
             // san - it is impossible to recover applied algorithms using their entries within Load() method
-            //SALOMEDS::SObject_wrap hypSO = myCurrentStudy->FindObjectID( refFromFile );
+            //SALOMEDS::SObject_wrap hypSO = aStudy->FindObjectID( refFromFile );
             //CORBA::Object_var hypObject = SObjectToObject( hypSO );
             int id = atoi( refFromFile );
             delete [] refFromFile;
             //CORBA::Object_var hypObject = SObjectToObject( hypSO );
             int id = atoi( refFromFile );
             delete [] refFromFile;
@@ -4479,7 +4457,7 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent,
             aDataset->ReadFromDisk( refFromFile );
             aDataset->CloseOnDisk();
             // san - it is impossible to recover applied hypotheses using their entries within Load() method
             aDataset->ReadFromDisk( refFromFile );
             aDataset->CloseOnDisk();
             // san - it is impossible to recover applied hypotheses using their entries within Load() method
-            //SALOMEDS::SObject_wrap hypSO = myCurrentStudy->FindObjectID( refFromFile );
+            //SALOMEDS::SObject_wrap hypSO = myStudy->FindObjectID( refFromFile );
             //CORBA::Object_var hypObject = SObjectToObject( hypSO );
             int id = atoi( refFromFile );
             delete [] refFromFile;
             //CORBA::Object_var hypObject = SObjectToObject( hypSO );
             int id = atoi( refFromFile );
             delete [] refFromFile;
@@ -4550,7 +4528,7 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent,
                 aDataset->ReadFromDisk( refFromFile );
                 aDataset->CloseOnDisk();
                 if ( strlen( refFromFile ) > 0 ) {
                 aDataset->ReadFromDisk( refFromFile );
                 aDataset->CloseOnDisk();
                 if ( strlen( refFromFile ) > 0 ) {
-                  SALOMEDS::SObject_wrap subShapeSO = myCurrentStudy->FindObjectID( refFromFile );
+                  SALOMEDS::SObject_wrap subShapeSO = aStudy->FindObjectID( refFromFile );
                   CORBA::Object_var subShapeObject = SObjectToObject( subShapeSO );
                   if ( !CORBA::is_nil( subShapeObject ) ) {
                     aSubShapeObject = GEOM::GEOM_Object::_narrow( subShapeObject );
                   CORBA::Object_var subShapeObject = SObjectToObject( subShapeSO );
                   if ( !CORBA::is_nil( subShapeObject ) ) {
                     aSubShapeObject = GEOM::GEOM_Object::_narrow( subShapeObject );
@@ -4700,7 +4678,7 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent,
                 aDataset->ReadFromDisk( refFromFile );
                 aDataset->CloseOnDisk();
                 if ( strlen( refFromFile ) > 0 ) {
                 aDataset->ReadFromDisk( refFromFile );
                 aDataset->CloseOnDisk();
                 if ( strlen( refFromFile ) > 0 ) {
-                  SALOMEDS::SObject_wrap shapeSO = myCurrentStudy->FindObjectID( refFromFile );
+                  SALOMEDS::SObject_wrap shapeSO = aStudy->FindObjectID( refFromFile );
                   CORBA::Object_var shapeObject = SObjectToObject( shapeSO );
                   if ( !CORBA::is_nil( shapeObject ) ) {
                     aShapeObject = GEOM::GEOM_Object::_narrow( shapeObject );
                   CORBA::Object_var shapeObject = SObjectToObject( shapeSO );
                   if ( !CORBA::is_nil( shapeObject ) ) {
                     aShapeObject = GEOM::GEOM_Object::_narrow( shapeObject );
@@ -4850,7 +4828,7 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent,
     SMESH_File meshFile( meshfile.ToCString() );
     if ( !meshFile ) // no meshfile exists
     {
     SMESH_File meshFile( meshfile.ToCString() );
     if ( !meshFile ) // no meshfile exists
     {
-      SALOMEDS_Tool::RemoveTemporaryFiles( tmpDir.ToCString(), aFileSeq.in(), true );
+      SALOMEDS_Tool::RemoveTemporaryFiles( tmpDir.ToCString(), aFileSeq, true );
     }
     else
     {
     }
     else
     {
@@ -4867,12 +4845,11 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent,
 
   // creation of tree nodes for all data objects in the study
   // to support tree representation customization and drag-n-drop:
 
   // creation of tree nodes for all data objects in the study
   // to support tree representation customization and drag-n-drop:
-  SALOMEDS::Study_var                    study = theComponent->GetStudy();
-  SALOMEDS::UseCaseBuilder_wrap useCaseBuilder = study->GetUseCaseBuilder();
+  SALOMEDS::UseCaseBuilder_wrap useCaseBuilder = aStudy->GetUseCaseBuilder();
   if ( !useCaseBuilder->IsUseCaseNode( theComponent ) ) {
     useCaseBuilder->SetRootCurrent();
     useCaseBuilder->Append( theComponent ); // component object is added as the top level item
   if ( !useCaseBuilder->IsUseCaseNode( theComponent ) ) {
     useCaseBuilder->SetRootCurrent();
     useCaseBuilder->Append( theComponent ); // component object is added as the top level item
-    SALOMEDS::ChildIterator_wrap it = study->NewChildIterator( theComponent );
+    SALOMEDS::ChildIterator_wrap it = aStudy->NewChildIterator( theComponent );
     for (it->InitEx(true); it->More(); it->Next()) {
       useCaseBuilder->AppendTo( it->Value()->GetFather(), it->Value() );
     }
     for (it->InitEx(true); it->More(); it->Next()) {
       useCaseBuilder->AppendTo( it->Value()->GetFather(), it->Value() );
     }
@@ -4932,22 +4909,13 @@ void SMESH_Gen_i::Close( SALOMEDS::SComponent_ptr theComponent )
 {
   if(MYDEBUG) MESSAGE( "SMESH_Gen_i::Close" );
 
 {
   if(MYDEBUG) MESSAGE( "SMESH_Gen_i::Close" );
 
-  // set correct current study
-  SALOMEDS::Study_var study = theComponent->GetStudy();
-  if ( study->StudyId() != GetCurrentStudyID())
-    setCurrentStudy( study, /*IsBeingClosed=*/true );
-
   // Clear study contexts data
   // Clear study contexts data
-  int studyId = GetCurrentStudyID();
-  if ( myStudyContextMap.find( studyId ) != myStudyContextMap.end() ) {
-    delete myStudyContextMap[ studyId ];
-    myStudyContextMap.erase( studyId );
-  }
+  delete myStudyContext;
+  myStudyContext = 0;
 
   // remove the tmp files meshes are loaded from
   SMESH_PreMeshInfo::RemoveStudyFiles_TMP_METHOD( theComponent );
 
 
   // remove the tmp files meshes are loaded from
   SMESH_PreMeshInfo::RemoveStudyFiles_TMP_METHOD( theComponent );
 
-  myCurrentStudy = SALOMEDS::Study::_nil();
   return;
 }
 
   return;
 }
 
@@ -4980,7 +4948,6 @@ char* SMESH_Gen_i::IORToLocalPersistentID( SALOMEDS::SObject_ptr /*theSObject*/,
                                            CORBA::Boolean        /*isASCII*/ )
 {
   if(MYDEBUG) MESSAGE( "SMESH_Gen_i::IORToLocalPersistentID" );
                                            CORBA::Boolean        /*isASCII*/ )
 {
   if(MYDEBUG) MESSAGE( "SMESH_Gen_i::IORToLocalPersistentID" );
-  StudyContext* myStudyContext = GetCurrentStudyContext();
 
   if ( myStudyContext && strcmp( IORString, "" ) != 0 ) {
     int anId = myStudyContext->findId( IORString );
 
   if ( myStudyContext && strcmp( IORString, "" ) != 0 ) {
     int anId = myStudyContext->findId( IORString );
@@ -5008,7 +4975,6 @@ char* SMESH_Gen_i::LocalPersistentIDToIOR( SALOMEDS::SObject_ptr /*theSObject*/,
                                            CORBA::Boolean        /*isASCII*/ )
 {
   if(MYDEBUG) MESSAGE( "SMESH_Gen_i::LocalPersistentIDToIOR(): id = " << aLocalPersistentID );
                                            CORBA::Boolean        /*isASCII*/ )
 {
   if(MYDEBUG) MESSAGE( "SMESH_Gen_i::LocalPersistentIDToIOR(): id = " << aLocalPersistentID );
-  StudyContext* myStudyContext = GetCurrentStudyContext();
 
   if ( myStudyContext && strcmp( aLocalPersistentID, "" ) != 0 ) {
     int anId = atoi( aLocalPersistentID );
 
   if ( myStudyContext && strcmp( aLocalPersistentID, "" ) != 0 ) {
     int anId = atoi( aLocalPersistentID );
@@ -5024,7 +4990,6 @@ char* SMESH_Gen_i::LocalPersistentIDToIOR( SALOMEDS::SObject_ptr /*theSObject*/,
 
 int SMESH_Gen_i::RegisterObject(CORBA::Object_ptr theObject)
 {
 
 int SMESH_Gen_i::RegisterObject(CORBA::Object_ptr theObject)
 {
-  StudyContext* myStudyContext = GetCurrentStudyContext();
   if ( myStudyContext && !CORBA::is_nil( theObject )) {
     CORBA::String_var iorString = GetORB()->object_to_string( theObject );
     return myStudyContext->addObject( string( iorString.in() ) );
   if ( myStudyContext && !CORBA::is_nil( theObject )) {
     CORBA::String_var iorString = GetORB()->object_to_string( theObject );
     return myStudyContext->addObject( string( iorString.in() ) );
@@ -5042,7 +5007,6 @@ int SMESH_Gen_i::RegisterObject(CORBA::Object_ptr theObject)
 
 CORBA::Long SMESH_Gen_i::GetObjectId(CORBA::Object_ptr theObject)
 {
 
 CORBA::Long SMESH_Gen_i::GetObjectId(CORBA::Object_ptr theObject)
 {
-  StudyContext* myStudyContext = GetCurrentStudyContext();
   if ( myStudyContext && !CORBA::is_nil( theObject )) {
     string iorString = GetORB()->object_to_string( theObject );
     return myStudyContext->findId( iorString );
   if ( myStudyContext && !CORBA::is_nil( theObject )) {
     string iorString = GetORB()->object_to_string( theObject );
     return myStudyContext->findId( iorString );
@@ -5062,18 +5026,13 @@ void SMESH_Gen_i::SetName(const char* theIOR,
 {
   if ( theIOR && strcmp( theIOR, "" ) ) {
     CORBA::Object_var anObject = GetORB()->string_to_object( theIOR );
 {
   if ( theIOR && strcmp( theIOR, "" ) ) {
     CORBA::Object_var anObject = GetORB()->string_to_object( theIOR );
-    SALOMEDS::SObject_wrap aSO = ObjectToSObject( myCurrentStudy, anObject );
+    SALOMEDS::SObject_wrap aSO = ObjectToSObject( anObject );
     if ( !aSO->_is_nil() ) {
       SetName( aSO, theName );
     }
   }
 }
 
     if ( !aSO->_is_nil() ) {
       SetName( aSO, theName );
     }
   }
 }
 
-int SMESH_Gen_i::GetCurrentStudyID()
-{
-  return myCurrentStudy->_is_nil() || myCurrentStudy->_non_existent() ? -1 : myCurrentStudy->StudyId();
-}
-
 // Version information
 char* SMESH_Gen_i::getVersion()
 {
 // Version information
 char* SMESH_Gen_i::getVersion()
 {
@@ -5095,9 +5054,8 @@ void SMESH_Gen_i::Move( const SMESH::sobject_list& what,
 {
   if ( CORBA::is_nil( where ) ) return;
 
 {
   if ( CORBA::is_nil( where ) ) return;
 
-  SALOMEDS::Study_var study = where->GetStudy();
-  SALOMEDS::StudyBuilder_var studyBuilder = study->NewBuilder();
-  SALOMEDS::UseCaseBuilder_var useCaseBuilder = study->GetUseCaseBuilder();
+  SALOMEDS::StudyBuilder_var studyBuilder = getStudyServant()->NewBuilder();
+  SALOMEDS::UseCaseBuilder_var useCaseBuilder = getStudyServant()->GetUseCaseBuilder();
   SALOMEDS::SComponent_var father = where->GetFatherComponent();
   std::string dataType = father->ComponentDataType();
   if ( dataType != "SMESH" ) return; // not a SMESH component
   SALOMEDS::SComponent_var father = where->GetFatherComponent();
   std::string dataType = father->ComponentDataType();
   if ( dataType != "SMESH" ) return; // not a SMESH component
index 1e869462cd65cf08dc9936b82e669d92e7550975..53921ba6461aeb569e55cf72ae794b9fad957de6 100644 (file)
@@ -154,8 +154,9 @@ public:
   // Get CORBA object corresponding to the SALOMEDS::SObject
   static CORBA::Object_var SObjectToObject( SALOMEDS::SObject_ptr theSObject );
   // Get the SALOMEDS::SObject corresponding to a CORBA object
   // Get CORBA object corresponding to the SALOMEDS::SObject
   static CORBA::Object_var SObjectToObject( SALOMEDS::SObject_ptr theSObject );
   // Get the SALOMEDS::SObject corresponding to a CORBA object
-  static SALOMEDS::SObject_ptr ObjectToSObject(SALOMEDS::Study_ptr theStudy,
-                                               CORBA::Object_ptr   theObject);
+  static SALOMEDS::SObject_ptr ObjectToSObject(CORBA::Object_ptr theObject);
+  // Get the SALOMEDS::Study from naming service
+  static SALOMEDS::Study_ptr getStudyServant();
   // Get GEOM Object correspoding to TopoDS_Shape
   GEOM::GEOM_Object_ptr ShapeToGeomObject (const TopoDS_Shape& theShape );
   // Get TopoDS_Shape correspoding to GEOM_Object
   // Get GEOM Object correspoding to TopoDS_Shape
   GEOM::GEOM_Object_ptr ShapeToGeomObject (const TopoDS_Shape& theShape );
   // Get TopoDS_Shape correspoding to GEOM_Object
@@ -182,15 +183,19 @@ public:
   //GEOM::GEOM_Gen_ptr SetGeomEngine( const char* containerLoc );
   void SetGeomEngine( GEOM::GEOM_Gen_ptr geomcompo );
 
   //GEOM::GEOM_Gen_ptr SetGeomEngine( const char* containerLoc );
   void SetGeomEngine( GEOM::GEOM_Gen_ptr geomcompo );
 
-  // Set current study
+  // Set embedded mode
   void SetEmbeddedMode( CORBA::Boolean theMode );
   void SetEmbeddedMode( CORBA::Boolean theMode );
-  // Get current study
+  // Check embedded mode
   CORBA::Boolean IsEmbeddedMode();
 
   CORBA::Boolean IsEmbeddedMode();
 
-  // Set current study
-  void SetCurrentStudy( SALOMEDS::Study_ptr theStudy );
-  // Get current study
-  SALOMEDS::Study_ptr GetCurrentStudy();
+  // Set enable publishing in the study
+  void SetEnablePublish( CORBA::Boolean theIsEnablePublish );
+
+  // Check enable publishing
+  CORBA::Boolean IsEnablePublish();
+
+  // Update study
+  void UpdateStudy();
 
   // Create hypothesis/algorothm of given type
   SMESH::SMESH_Hypothesis_ptr CreateHypothesis (const char* theHypType,
 
   // Create hypothesis/algorothm of given type
   SMESH::SMESH_Hypothesis_ptr CreateHypothesis (const char* theHypType,
@@ -437,8 +442,7 @@ public:
   // Returns true if object can be published in the study
   bool CanPublishInStudy( CORBA::Object_ptr theIOR );
   // Publish object in the study
   // Returns true if object can be published in the study
   bool CanPublishInStudy( CORBA::Object_ptr theIOR );
   // Publish object in the study
-  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 );
                                         CORBA::Object_ptr     theObject,
                                         const char*           theName )
     throw ( SALOME::SALOME_Exception );
@@ -467,19 +471,17 @@ public:
   // Dump python
   // ============
 
   // Dump python
   // ============
 
-  virtual Engines::TMPFile* DumpPython(CORBA::Object_ptr theStudy,
-                                       CORBA::Boolean isPublished,
+  virtual Engines::TMPFile* DumpPython(CORBA::Boolean isPublished,
                                        CORBA::Boolean isMultiFile,
                                        CORBA::Boolean& isValidScript);
 
                                        CORBA::Boolean isMultiFile,
                                        CORBA::Boolean& isValidScript);
 
-  void AddToPythonScript (int theStudyID, const TCollection_AsciiString& theString);
+  void AddToPythonScript (const TCollection_AsciiString& theString);
 
 
-  void RemoveLastFromPythonScript (int theStudyID);
+  void RemoveLastFromPythonScript();
 
 
-  void SavePython (SALOMEDS::Study_ptr theStudy);
+  void SavePython();
 
 
-  TCollection_AsciiString DumpPython_impl (SALOMEDS::Study_ptr theStudy,
-                                           Resource_DataMapOfAsciiStringAsciiString& theObjectNames,
+  TCollection_AsciiString DumpPython_impl (Resource_DataMapOfAsciiStringAsciiString& theObjectNames,
                                            Resource_DataMapOfAsciiStringAsciiString& theNames,
                                            bool isPublished,
                                            bool isMultiFile,
                                            Resource_DataMapOfAsciiStringAsciiString& theNames,
                                            bool isPublished,
                                            bool isMultiFile,
@@ -487,9 +489,9 @@ public:
                                            bool& aValidScript,
                                            TCollection_AsciiString& theSavedTrace);
 
                                            bool& aValidScript,
                                            TCollection_AsciiString& theSavedTrace);
 
-  TCollection_AsciiString GetNewPythonLines (int theStudyID);
+  TCollection_AsciiString GetNewPythonLines();
 
 
-  void CleanPythonTrace (int theStudyID);
+  void CleanPythonTrace();
 
   // *****************************************
   // Internal methods
 
   // *****************************************
   // Internal methods
@@ -519,33 +521,26 @@ public:
   static long GetBallElementsGroupsTag();
 
   // publishing methods
   static long GetBallElementsGroupsTag();
 
   // publishing methods
-  SALOMEDS::SComponent_ptr PublishComponent(SALOMEDS::Study_ptr theStudy);
-  SALOMEDS::SObject_ptr PublishMesh (SALOMEDS::Study_ptr   theStudy,
-                                     SMESH::SMESH_Mesh_ptr theMesh,
+  SALOMEDS::SComponent_ptr PublishComponent();
+  SALOMEDS::SObject_ptr PublishMesh (SMESH::SMESH_Mesh_ptr theMesh,
                                      const char*           theName = 0);
                                      const char*           theName = 0);
-  SALOMEDS::SObject_ptr PublishHypothesis (SALOMEDS::Study_ptr         theStudy,
-                                           SMESH::SMESH_Hypothesis_ptr theHyp,
+  SALOMEDS::SObject_ptr PublishHypothesis (SMESH::SMESH_Hypothesis_ptr theHyp,
                                            const char*                 theName = 0);
                                            const char*                 theName = 0);
-  SALOMEDS::SObject_ptr PublishSubMesh (SALOMEDS::Study_ptr      theStudy,
-                                        SMESH::SMESH_Mesh_ptr    theMesh,
+  SALOMEDS::SObject_ptr PublishSubMesh (SMESH::SMESH_Mesh_ptr    theMesh,
                                         SMESH::SMESH_subMesh_ptr theSubMesh,
                                         GEOM::GEOM_Object_ptr    theShapeObject,
                                         const char*              theName = 0);
                                         SMESH::SMESH_subMesh_ptr theSubMesh,
                                         GEOM::GEOM_Object_ptr    theShapeObject,
                                         const char*              theName = 0);
-  SALOMEDS::SObject_ptr PublishGroup (SALOMEDS::Study_ptr    theStudy,
-                                      SMESH::SMESH_Mesh_ptr  theMesh,
+  SALOMEDS::SObject_ptr PublishGroup (SMESH::SMESH_Mesh_ptr  theMesh,
                                       SMESH::SMESH_GroupBase_ptr theGroup,
                                       GEOM::GEOM_Object_ptr  theShapeObject,
                                       const char*            theName = 0);
                                       SMESH::SMESH_GroupBase_ptr theGroup,
                                       GEOM::GEOM_Object_ptr  theShapeObject,
                                       const char*            theName = 0);
-  bool AddHypothesisToShape(SALOMEDS::Study_ptr         theStudy,
-                            SMESH::SMESH_Mesh_ptr       theMesh,
+  bool AddHypothesisToShape(SMESH::SMESH_Mesh_ptr       theMesh,
                             GEOM::GEOM_Object_ptr       theShapeObject,
                             SMESH::SMESH_Hypothesis_ptr theHyp);
                             GEOM::GEOM_Object_ptr       theShapeObject,
                             SMESH::SMESH_Hypothesis_ptr theHyp);
-  bool RemoveHypothesisFromShape(SALOMEDS::Study_ptr         theStudy,
-                                 SMESH::SMESH_Mesh_ptr       theMesh,
+  bool RemoveHypothesisFromShape(SMESH::SMESH_Mesh_ptr       theMesh,
                                  GEOM::GEOM_Object_ptr       theShapeObject,
                                  SMESH::SMESH_Hypothesis_ptr theHyp);
                                  GEOM::GEOM_Object_ptr       theShapeObject,
                                  SMESH::SMESH_Hypothesis_ptr theHyp);
-  SALOMEDS::SObject_ptr GetMeshOrSubmeshByShape (SALOMEDS::Study_ptr   theStudy,
-                                                 SMESH::SMESH_Mesh_ptr theMesh,
+  SALOMEDS::SObject_ptr GetMeshOrSubmeshByShape (SMESH::SMESH_Mesh_ptr theMesh,
                                                  GEOM::GEOM_Object_ptr theShape);
   static void SetName(SALOMEDS::SObject_ptr theSObject,
                       const char*           theName,
                                                  GEOM::GEOM_Object_ptr theShape);
   static void SetName(SALOMEDS::SObject_ptr theSObject,
                       const char*           theName,
@@ -555,7 +550,7 @@ public:
                         const char*           thePixMap);
 
   //  Get study context
                         const char*           thePixMap);
 
   //  Get study context
-  StudyContext* GetCurrentStudyContext();
+  StudyContext* GetStudyContext();
 
   // Register an object in a StudyContext; return object id
   int RegisterObject(CORBA::Object_ptr theObject);
 
   // Register an object in a StudyContext; return object id
   int RegisterObject(CORBA::Object_ptr theObject);
@@ -567,7 +562,7 @@ public:
   template<class TInterface>
   typename TInterface::_var_type GetObjectByOldId( const int oldID )
   {
   template<class TInterface>
   typename TInterface::_var_type GetObjectByOldId( const int oldID )
   {
-    if ( StudyContext* myStudyContext = GetCurrentStudyContext() ) {
+    if ( myStudyContext ) {
       std::string ior = myStudyContext->getIORbyOldId( oldID );
       if ( !ior.empty() )
         return TInterface::_narrow(GetORB()->string_to_object( ior.c_str() ));
       std::string ior = myStudyContext->getIORbyOldId( oldID );
       if ( !ior.empty() )
         return TInterface::_narrow(GetORB()->string_to_object( ior.c_str() ));
@@ -575,9 +570,6 @@ public:
     return TInterface::_nil();
   }
 
     return TInterface::_nil();
   }
 
-  // Get current study ID
-  int GetCurrentStudyID();
-
   /*!
    * \brief Find SObject for an algo
    */
   /*!
    * \brief Find SObject for an algo
    */
@@ -653,9 +645,6 @@ private:
                                                 const char* theCommandNameForPython,
                                                 const char* theFileNameForPython);
 
                                                 const char* theCommandNameForPython,
                                                 const char* theFileNameForPython);
 
-  void setCurrentStudy( SALOMEDS::Study_ptr theStudy,
-                        bool                theStudyIsBeingClosed=false);
-
   std::vector<long> _GetInside(SMESH::SMESH_IDSource_ptr meshPart,
                                SMESH::ElementType     theElemType,
                                TopoDS_Shape& aShape,
   std::vector<long> _GetInside(SMESH::SMESH_IDSource_ptr meshPart,
                                SMESH::ElementType     theElemType,
                                TopoDS_Shape& aShape,
@@ -673,11 +662,11 @@ private:
   // hypotheses managing
   std::map<std::string, GenericHypothesisCreator_i*> myHypCreatorMap;
 
   // hypotheses managing
   std::map<std::string, GenericHypothesisCreator_i*> myHypCreatorMap;
 
-  std::map<int, StudyContext*>   myStudyContextMap;  // Map of study context objects
+  StudyContext*                  myStudyContext;  // study context
 
   GEOM_Client*                   myShapeReader;      // Shape reader
 
   GEOM_Client*                   myShapeReader;      // Shape reader
-  SALOMEDS::Study_var            myCurrentStudy;     // Current study
   CORBA::Boolean                 myIsEmbeddedMode;   // Current mode
   CORBA::Boolean                 myIsEmbeddedMode;   // Current mode
+  CORBA::Boolean                 myIsEnablePublish;  // Enable publishing
 
   // Default color of groups
   std::string myDefaultGroupColor;
 
   // Default color of groups
   std::string myDefaultGroupColor;
@@ -686,11 +675,11 @@ private:
   bool myToForgetMeshDataOnHypModif;
 
   // Dump Python: trace of API methods calls
   bool myToForgetMeshDataOnHypModif;
 
   // Dump Python: trace of API methods calls
-  std::map < int, Handle(TColStd_HSequenceOfAsciiString) > myPythonScripts;
-  bool                                                     myIsHistoricalPythonDump;
-  std::vector< int >                                       myLastParamIndex;
-  std::vector< std::string >                               myLastParameters;
-  std::string                                              myLastObj;
+  Handle(TColStd_HSequenceOfAsciiString) myPythonScript;
+  bool                                   myIsHistoricalPythonDump;
+  std::vector< int >                     myLastParamIndex;
+  std::vector< std::string >             myLastParameters;
+  std::string                            myLastObj;
 };
 
 
 };
 
 
index b08b7e3e6d35d8b09a536a17ca8b5b5e75a68af5..c9b43633cbba20c5b671f4db37b25a167d3d1e78 100644 (file)
@@ -40,6 +40,7 @@
 #include <Utils_ExceptHandlers.hxx>
 #include <SALOMEDS_wrap.hxx>
 #include <SALOMEDS_Attributes_wrap.hxx>
 #include <Utils_ExceptHandlers.hxx>
 #include <SALOMEDS_wrap.hxx>
 #include <SALOMEDS_Attributes_wrap.hxx>
+#include <SALOME_KernelServices.hxx>
 
 #include <TCollection_AsciiString.hxx>
 #include <TopoDS_Solid.hxx>
 
 #include <TCollection_AsciiString.hxx>
 #include <TopoDS_Solid.hxx>
@@ -162,10 +163,11 @@ long SMESH_Gen_i::GetBallElementsGroupsTag()
 
 bool SMESH_Gen_i::CanPublishInStudy(CORBA::Object_ptr theIOR)
 {
 
 bool SMESH_Gen_i::CanPublishInStudy(CORBA::Object_ptr theIOR)
 {
-  if(MYDEBUG) MESSAGE("CanPublishInStudy - "<<!CORBA::is_nil(myCurrentStudy));
-  if( GetCurrentStudyID() < 0 )
-    return false;
+  if(MYDEBUG) MESSAGE("CanPublishInStudy - "<<!CORBA::is_nil(getStudyServant()));
   
   
+  if( !myIsEnablePublish )
+    return false;
+
   SMESH::SMESH_Mesh_var aMesh       = SMESH::SMESH_Mesh::_narrow(theIOR);
   if( !aMesh->_is_nil() )
     return true;
   SMESH::SMESH_Mesh_var aMesh       = SMESH::SMESH_Mesh::_narrow(theIOR);
   if( !aMesh->_is_nil() )
     return true;
@@ -191,18 +193,26 @@ bool SMESH_Gen_i::CanPublishInStudy(CORBA::Object_ptr theIOR)
 //purpose  : Put a result into a SALOMEDS::SObject_wrap or call UnRegister()!
 //=======================================================================
 
 //purpose  : Put a result into a SALOMEDS::SObject_wrap or call UnRegister()!
 //=======================================================================
 
-SALOMEDS::SObject_ptr SMESH_Gen_i::ObjectToSObject(SALOMEDS::Study_ptr theStudy,
-                                                   CORBA::Object_ptr   theObject)
+SALOMEDS::SObject_ptr SMESH_Gen_i::ObjectToSObject(CORBA::Object_ptr theObject)
 {
   SALOMEDS::SObject_wrap aSO;
 {
   SALOMEDS::SObject_wrap aSO;
-  if ( !CORBA::is_nil( theStudy ) && !CORBA::is_nil( theObject ))
+  if ( !CORBA::is_nil( theObject ))
   {
     CORBA::String_var objStr = SMESH_Gen_i::GetORB()->object_to_string( theObject );
   {
     CORBA::String_var objStr = SMESH_Gen_i::GetORB()->object_to_string( theObject );
-    aSO = theStudy->FindObjectIOR( objStr.in() );
+    aSO = getStudyServant()->FindObjectIOR( objStr.in() );
   }
   return aSO._retn();
 }
 
   }
   return aSO._retn();
 }
 
+//=======================================================================
+//function : GetStudyPtr
+//purpose  : Get study from naming service
+//=======================================================================
+SALOMEDS::Study_ptr SMESH_Gen_i::getStudyServant()
+{
+  return SALOMEDS::Study::_duplicate(KERNEL::getStudyServant());
+}
+
 //=======================================================================
 //function : objectToServant
 //purpose  : 
 //=======================================================================
 //function : objectToServant
 //purpose  : 
@@ -255,14 +265,14 @@ TopoDS_Shape SMESH_Gen_i::GeomObjectToShape(GEOM::GEOM_Object_ptr theGeomObject)
 //purpose  : 
 //=======================================================================
 
 //purpose  : 
 //=======================================================================
 
-static SALOMEDS::SObject_ptr publish(SALOMEDS::Study_ptr   theStudy,
-                                     CORBA::Object_ptr     theIOR,
+static SALOMEDS::SObject_ptr publish(CORBA::Object_ptr     theIOR,
                                      SALOMEDS::SObject_ptr theFatherObject,
                                      const int             theTag = 0,
                                      const char*           thePixMap = 0,
                                      const bool            theSelectable = true)
 {
                                      SALOMEDS::SObject_ptr theFatherObject,
                                      const int             theTag = 0,
                                      const char*           thePixMap = 0,
                                      const bool            theSelectable = true)
 {
-  SALOMEDS::SObject_wrap SO = SMESH_Gen_i::ObjectToSObject( theStudy, theIOR );
+  SALOMEDS::Study_var theStudy = SMESH_Gen_i::getStudyServant();
+  SALOMEDS::SObject_wrap SO = SMESH_Gen_i::ObjectToSObject( theIOR );
   SALOMEDS::StudyBuilder_var     aStudyBuilder = theStudy->NewBuilder();
   SALOMEDS::UseCaseBuilder_wrap useCaseBuilder = theStudy->GetUseCaseBuilder();
   bool isNewSO = false, isInUseCaseTree = false;
   SALOMEDS::StudyBuilder_var     aStudyBuilder = theStudy->NewBuilder();
   SALOMEDS::UseCaseBuilder_wrap useCaseBuilder = theStudy->GetUseCaseBuilder();
   bool isNewSO = false, isInUseCaseTree = false;
@@ -356,8 +366,7 @@ void SMESH_Gen_i::SetName(SALOMEDS::SObject_ptr theSObject,
                           const char*           theDefaultName)
 {
   if ( !theSObject->_is_nil() ) {
                           const char*           theDefaultName)
 {
   if ( !theSObject->_is_nil() ) {
-    SALOMEDS::Study_var               aStudy = theSObject->GetStudy();
-    SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
+    SALOMEDS::StudyBuilder_var aStudyBuilder = getStudyServant()->NewBuilder();
     SALOMEDS::GenericAttribute_wrap   anAttr =
       aStudyBuilder->FindOrCreateAttribute( theSObject, "AttributeName" );
     SALOMEDS::AttributeName_wrap aNameAttr = anAttr;
     SALOMEDS::GenericAttribute_wrap   anAttr =
       aStudyBuilder->FindOrCreateAttribute( theSObject, "AttributeName" );
     SALOMEDS::AttributeName_wrap aNameAttr = anAttr;
@@ -389,8 +398,7 @@ void SMESH_Gen_i::SetPixMap(SALOMEDS::SObject_ptr theSObject,
 {
   if ( !theSObject->_is_nil() && thePixMap && strlen( thePixMap ))
   {
 {
   if ( !theSObject->_is_nil() && thePixMap && strlen( thePixMap ))
   {
-    SALOMEDS::Study_var               aStudy = theSObject->GetStudy();
-    SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
+    SALOMEDS::StudyBuilder_var aStudyBuilder = getStudyServant()->NewBuilder();
     SALOMEDS::GenericAttribute_wrap anAttr =
       aStudyBuilder->FindOrCreateAttribute( theSObject, "AttributePixMap" );
     SALOMEDS::AttributePixMap_wrap aPMAttr = anAttr;
     SALOMEDS::GenericAttribute_wrap anAttr =
       aStudyBuilder->FindOrCreateAttribute( theSObject, "AttributePixMap" );
     SALOMEDS::AttributePixMap_wrap aPMAttr = anAttr;
@@ -403,21 +411,21 @@ void SMESH_Gen_i::SetPixMap(SALOMEDS::SObject_ptr theSObject,
 //purpose  : 
 //=======================================================================
 
 //purpose  : 
 //=======================================================================
 
-static void addReference (SALOMEDS::Study_ptr   theStudy,
-                          SALOMEDS::SObject_ptr theSObject,
+static void addReference (SALOMEDS::SObject_ptr theSObject,
                           CORBA::Object_ptr     theToObject,
                           int                   theTag = 0)
 {
                           CORBA::Object_ptr     theToObject,
                           int                   theTag = 0)
 {
-  SALOMEDS::SObject_wrap aToObjSO = SMESH_Gen_i::ObjectToSObject( theStudy, theToObject );
+  SALOMEDS::Study_var aStudy = SMESH_Gen_i::getStudyServant();
+  SALOMEDS::SObject_wrap aToObjSO = SMESH_Gen_i::ObjectToSObject( theToObject );
   if ( !aToObjSO->_is_nil() && !theSObject->_is_nil() ) {
   if ( !aToObjSO->_is_nil() && !theSObject->_is_nil() ) {
-    SALOMEDS::StudyBuilder_var aStudyBuilder = theStudy->NewBuilder();
+    SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
     SALOMEDS::SObject_wrap aReferenceSO;
     if ( !theTag ) {
       // check if the reference to theToObject already exists
       // and find a free label for the reference object
       bool isReferred = false;
       int tag = 1;
     SALOMEDS::SObject_wrap aReferenceSO;
     if ( !theTag ) {
       // check if the reference to theToObject already exists
       // and find a free label for the reference object
       bool isReferred = false;
       int tag = 1;
-      SALOMEDS::ChildIterator_wrap anIter = theStudy->NewChildIterator( theSObject );
+      SALOMEDS::ChildIterator_wrap anIter = aStudy->NewChildIterator( theSObject );
       for ( ; !isReferred && anIter->More(); anIter->Next(), ++tag ) {
         SALOMEDS::SObject_wrap curSO = anIter->Value();
         if ( curSO->ReferencedObject( aReferenceSO.inout() )) {
       for ( ; !isReferred && anIter->More(); anIter->Next(), ++tag ) {
         SALOMEDS::SObject_wrap curSO = anIter->Value();
         if ( curSO->ReferencedObject( aReferenceSO.inout() )) {
@@ -444,7 +452,7 @@ static void addReference (SALOMEDS::Study_ptr   theStudy,
 
     // add reference to the use case tree
     // (to support tree representation customization and drag-n-drop)
 
     // add reference to the use case tree
     // (to support tree representation customization and drag-n-drop)
-    SALOMEDS::UseCaseBuilder_wrap  useCaseBuilder = theStudy->GetUseCaseBuilder();
+    SALOMEDS::UseCaseBuilder_wrap  useCaseBuilder = aStudy->GetUseCaseBuilder();
     SALOMEDS::UseCaseIterator_wrap    useCaseIter = useCaseBuilder->GetUseCaseIterator(theSObject);
     for ( ; useCaseIter->More(); useCaseIter->Next() )
     {
     SALOMEDS::UseCaseIterator_wrap    useCaseIter = useCaseBuilder->GetUseCaseIterator(theSObject);
     for ( ; useCaseIter->More(); useCaseIter->Next() )
     {
@@ -464,42 +472,41 @@ static void addReference (SALOMEDS::Study_ptr   theStudy,
  */
 //=============================================================================
 
  */
 //=============================================================================
 
-SALOMEDS::SObject_ptr SMESH_Gen_i::PublishInStudy(SALOMEDS::Study_ptr   theStudy,
-                                                  SALOMEDS::SObject_ptr theSObject,
+SALOMEDS::SObject_ptr SMESH_Gen_i::PublishInStudy(SALOMEDS::SObject_ptr theSObject,
                                                   CORBA::Object_ptr     theIOR,
                                                   const char*           theName)
      throw (SALOME::SALOME_Exception)
 {
   Unexpect aCatch(SALOME_SalomeException);
   SALOMEDS::SObject_wrap aSO;
                                                   CORBA::Object_ptr     theIOR,
                                                   const char*           theName)
      throw (SALOME::SALOME_Exception)
 {
   Unexpect aCatch(SALOME_SalomeException);
   SALOMEDS::SObject_wrap aSO;
-  if ( CORBA::is_nil( theStudy ) || CORBA::is_nil( theIOR ))
+  if ( CORBA::is_nil( theIOR ))
     return aSO._retn();
   if(MYDEBUG) MESSAGE("PublishInStudy");
 
   // Publishing a mesh
   SMESH::SMESH_Mesh_var aMesh = SMESH::SMESH_Mesh::_narrow( theIOR );
   if( !aMesh->_is_nil() )
     return aSO._retn();
   if(MYDEBUG) MESSAGE("PublishInStudy");
 
   // Publishing a mesh
   SMESH::SMESH_Mesh_var aMesh = SMESH::SMESH_Mesh::_narrow( theIOR );
   if( !aMesh->_is_nil() )
-    aSO = PublishMesh( theStudy, aMesh, theName );
+    aSO = PublishMesh( aMesh, theName );
 
   // Publishing a sub-mesh
   SMESH::SMESH_subMesh_var aSubMesh = SMESH::SMESH_subMesh::_narrow( theIOR );
   if( aSO->_is_nil() && !aSubMesh->_is_nil() ) {
     GEOM::GEOM_Object_var aShapeObject = aSubMesh->GetSubShape();
     aMesh = aSubMesh->GetFather();
 
   // Publishing a sub-mesh
   SMESH::SMESH_subMesh_var aSubMesh = SMESH::SMESH_subMesh::_narrow( theIOR );
   if( aSO->_is_nil() && !aSubMesh->_is_nil() ) {
     GEOM::GEOM_Object_var aShapeObject = aSubMesh->GetSubShape();
     aMesh = aSubMesh->GetFather();
-    aSO = PublishSubMesh( theStudy, aMesh, aSubMesh, aShapeObject, theName );
+    aSO = PublishSubMesh( aMesh, aSubMesh, aShapeObject, theName );
   }
 
   // Publishing a hypothesis or algorithm
   SMESH::SMESH_Hypothesis_var aHyp = SMESH::SMESH_Hypothesis::_narrow( theIOR );
   if ( aSO->_is_nil() && !aHyp->_is_nil() )
   }
 
   // Publishing a hypothesis or algorithm
   SMESH::SMESH_Hypothesis_var aHyp = SMESH::SMESH_Hypothesis::_narrow( theIOR );
   if ( aSO->_is_nil() && !aHyp->_is_nil() )
-    aSO = PublishHypothesis( theStudy, aHyp );
+    aSO = PublishHypothesis( aHyp );
 
   // Publishing a group
   SMESH::SMESH_GroupBase_var aGroup = SMESH::SMESH_GroupBase::_narrow(theIOR);
   if ( aSO->_is_nil() && !aGroup->_is_nil() ) {
     GEOM::GEOM_Object_var aShapeObject;
     aMesh = aGroup->GetMesh();
 
   // Publishing a group
   SMESH::SMESH_GroupBase_var aGroup = SMESH::SMESH_GroupBase::_narrow(theIOR);
   if ( aSO->_is_nil() && !aGroup->_is_nil() ) {
     GEOM::GEOM_Object_var aShapeObject;
     aMesh = aGroup->GetMesh();
-    aSO = PublishGroup( theStudy, aMesh, aGroup, aShapeObject, theName );
+    aSO = PublishGroup( aMesh, aGroup, aShapeObject, theName );
   }
   if(MYDEBUG) MESSAGE("PublishInStudy_END");
 
   }
   if(MYDEBUG) MESSAGE("PublishInStudy_END");
 
@@ -511,17 +518,15 @@ SALOMEDS::SObject_ptr SMESH_Gen_i::PublishInStudy(SALOMEDS::Study_ptr   theStudy
 //purpose  : 
 //=======================================================================
 
 //purpose  : 
 //=======================================================================
 
-SALOMEDS::SComponent_ptr SMESH_Gen_i::PublishComponent(SALOMEDS::Study_ptr theStudy)
+SALOMEDS::SComponent_ptr SMESH_Gen_i::PublishComponent()
 {
 {
-  if ( CORBA::is_nil( theStudy ))
-    return SALOMEDS::SComponent::_nil();
   if(MYDEBUG) MESSAGE("PublishComponent");
 
   if(MYDEBUG) MESSAGE("PublishComponent");
 
-  SALOMEDS::StudyBuilder_var    aStudyBuilder  = theStudy->NewBuilder(); 
-  SALOMEDS::UseCaseBuilder_wrap useCaseBuilder = theStudy->GetUseCaseBuilder();
+  SALOMEDS::StudyBuilder_var    aStudyBuilder  = getStudyServant()->NewBuilder();
+  SALOMEDS::UseCaseBuilder_wrap useCaseBuilder = getStudyServant()->GetUseCaseBuilder();
 
   CORBA::String_var   compDataType = ComponentDataType();
 
   CORBA::String_var   compDataType = ComponentDataType();
-  SALOMEDS::SComponent_wrap father = theStudy->FindComponent( compDataType.in() );
+  SALOMEDS::SComponent_wrap father = getStudyServant()->FindComponent( compDataType.in() );
   if ( !CORBA::is_nil( father ) ) {
     // check that the component is added to the use case browser
     if ( !useCaseBuilder->IsUseCaseNode( father ) ) {
   if ( !CORBA::is_nil( father ) ) {
     // check that the component is added to the use case browser
     if ( !useCaseBuilder->IsUseCaseNode( father ) ) {
@@ -564,21 +569,19 @@ SALOMEDS::SComponent_ptr SMESH_Gen_i::PublishComponent(SALOMEDS::Study_ptr theSt
 //purpose  : 
 //=======================================================================
 
 //purpose  : 
 //=======================================================================
 
-SALOMEDS::SObject_ptr SMESH_Gen_i::PublishMesh (SALOMEDS::Study_ptr   theStudy,
-                                                SMESH::SMESH_Mesh_ptr theMesh,
+SALOMEDS::SObject_ptr SMESH_Gen_i::PublishMesh (SMESH::SMESH_Mesh_ptr theMesh,
                                                 const char*           theName)
 {
                                                 const char*           theName)
 {
-  if ( CORBA::is_nil( theStudy ) ||
-       CORBA::is_nil( theMesh ))
+  if ( CORBA::is_nil( theMesh ))
     return SALOMEDS::SComponent::_nil();
   if(MYDEBUG) MESSAGE("PublishMesh--IN");
 
   // find or publish a mesh
 
     return SALOMEDS::SComponent::_nil();
   if(MYDEBUG) MESSAGE("PublishMesh--IN");
 
   // find or publish a mesh
 
-  SALOMEDS::SObject_wrap aMeshSO = ObjectToSObject( theStudy, theMesh );
+  SALOMEDS::SObject_wrap aMeshSO = ObjectToSObject( theMesh );
   if ( aMeshSO->_is_nil() )
   {
   if ( aMeshSO->_is_nil() )
   {
-    SALOMEDS::SComponent_wrap father = PublishComponent( theStudy );
+    SALOMEDS::SComponent_wrap father = PublishComponent();
     if ( father->_is_nil() )
       return aMeshSO._retn();
 
     if ( father->_is_nil() )
       return aMeshSO._retn();
 
@@ -589,7 +592,7 @@ SALOMEDS::SObject_ptr SMESH_Gen_i::PublishMesh (SALOMEDS::Study_ptr   theStudy,
     else
       aTag++;
 
     else
       aTag++;
 
-    aMeshSO = publish (theStudy, theMesh, father, aTag, "ICON_SMESH_TREE_MESH_WARN" );
+    aMeshSO = publish ( theMesh, father, aTag, "ICON_SMESH_TREE_MESH_WARN" );
     if ( aMeshSO->_is_nil() )
       return aMeshSO._retn();
   }
     if ( aMeshSO->_is_nil() )
       return aMeshSO._retn();
   }
@@ -599,7 +602,7 @@ SALOMEDS::SObject_ptr SMESH_Gen_i::PublishMesh (SALOMEDS::Study_ptr   theStudy,
 
   GEOM::GEOM_Object_var aShapeObject = theMesh->GetShapeToMesh();
   if ( !CORBA::is_nil( aShapeObject )) {
 
   GEOM::GEOM_Object_var aShapeObject = theMesh->GetShapeToMesh();
   if ( !CORBA::is_nil( aShapeObject )) {
-    addReference( theStudy, aMeshSO, aShapeObject, GetRefOnShapeTag() );
+    addReference( aMeshSO, aShapeObject, GetRefOnShapeTag() );
 
     // Publish global hypotheses
 
 
     // Publish global hypotheses
 
@@ -607,8 +610,8 @@ SALOMEDS::SObject_ptr SMESH_Gen_i::PublishMesh (SALOMEDS::Study_ptr   theStudy,
     for ( CORBA::ULong i = 0; i < hypList->length(); i++ )
     {
       SMESH::SMESH_Hypothesis_var aHyp = SMESH::SMESH_Hypothesis::_narrow( hypList[ i ]);
     for ( CORBA::ULong i = 0; i < hypList->length(); i++ )
     {
       SMESH::SMESH_Hypothesis_var aHyp = SMESH::SMESH_Hypothesis::_narrow( hypList[ i ]);
-      SALOMEDS::SObject_wrap so = PublishHypothesis( theStudy, aHyp );
-      AddHypothesisToShape( theStudy, theMesh, aShapeObject, aHyp );
+      SALOMEDS::SObject_wrap so = PublishHypothesis( aHyp );
+      AddHypothesisToShape( theMesh, aShapeObject, aHyp );
     }
   }
 
     }
   }
 
@@ -623,7 +626,7 @@ SALOMEDS::SObject_ptr SMESH_Gen_i::PublishMesh (SALOMEDS::Study_ptr   theStudy,
     SMESH::SMESH_subMesh_ptr aSubMesh = (*subIt).second->_this();
     if ( !CORBA::is_nil( aSubMesh )) {
       aShapeObject = aSubMesh->GetSubShape();
     SMESH::SMESH_subMesh_ptr aSubMesh = (*subIt).second->_this();
     if ( !CORBA::is_nil( aSubMesh )) {
       aShapeObject = aSubMesh->GetSubShape();
-      SALOMEDS::SObject_wrap( PublishSubMesh( theStudy, theMesh, aSubMesh, aShapeObject ));
+      SALOMEDS::SObject_wrap( PublishSubMesh( theMesh, aSubMesh, aShapeObject ));
     }
   }
 
     }
   }
 
@@ -638,7 +641,7 @@ SALOMEDS::SObject_ptr SMESH_Gen_i::PublishMesh (SALOMEDS::Study_ptr   theStudy,
       SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( aGroup );
       if ( !aGeomGroup->_is_nil() )
         aShapeObj = aGeomGroup->GetShape();
       SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( aGroup );
       if ( !aGeomGroup->_is_nil() )
         aShapeObj = aGeomGroup->GetShape();
-      SALOMEDS::SObject_wrap( PublishGroup( theStudy, theMesh, aGroup, aShapeObj ));
+      SALOMEDS::SObject_wrap( PublishGroup( theMesh, aGroup, aShapeObj ));
     }
   }
 
     }
   }
 
@@ -651,22 +654,20 @@ SALOMEDS::SObject_ptr SMESH_Gen_i::PublishMesh (SALOMEDS::Study_ptr   theStudy,
 //purpose  : 
 //=======================================================================
 
 //purpose  : 
 //=======================================================================
 
-SALOMEDS::SObject_ptr SMESH_Gen_i::PublishSubMesh (SALOMEDS::Study_ptr      theStudy,
-                                                   SMESH::SMESH_Mesh_ptr    theMesh,
+SALOMEDS::SObject_ptr SMESH_Gen_i::PublishSubMesh (SMESH::SMESH_Mesh_ptr    theMesh,
                                                    SMESH::SMESH_subMesh_ptr theSubMesh,
                                                    GEOM::GEOM_Object_ptr    theShapeObject,
                                                    const char*              theName)
 {
                                                    SMESH::SMESH_subMesh_ptr theSubMesh,
                                                    GEOM::GEOM_Object_ptr    theShapeObject,
                                                    const char*              theName)
 {
-  if (theStudy->_is_nil() || theMesh->_is_nil() ||
-      theSubMesh->_is_nil() || theShapeObject->_is_nil() )
+  if ( theMesh->_is_nil() || theSubMesh->_is_nil() || theShapeObject->_is_nil() )
     return SALOMEDS::SObject::_nil();
 
     return SALOMEDS::SObject::_nil();
 
-  SALOMEDS::SObject_wrap aSubMeshSO = ObjectToSObject( theStudy, theSubMesh );
+  SALOMEDS::SObject_wrap aSubMeshSO = ObjectToSObject( theSubMesh );
   if ( aSubMeshSO->_is_nil() )
   {
   if ( aSubMeshSO->_is_nil() )
   {
-    SALOMEDS::SObject_wrap aMeshSO = ObjectToSObject( theStudy, theMesh );
+    SALOMEDS::SObject_wrap aMeshSO = ObjectToSObject( theMesh );
     if ( aMeshSO->_is_nil() ) {
     if ( aMeshSO->_is_nil() ) {
-      aMeshSO = PublishMesh( theStudy, theMesh );
+      aMeshSO = PublishMesh( theMesh );
       if ( aMeshSO->_is_nil())
         return SALOMEDS::SObject::_nil();
     }
       if ( aMeshSO->_is_nil())
         return SALOMEDS::SObject::_nil();
     }
@@ -705,8 +706,8 @@ SALOMEDS::SObject_ptr SMESH_Gen_i::PublishSubMesh (SALOMEDS::Study_ptr      theS
     }
 
     // Find or create submesh root
     }
 
     // Find or create submesh root
-    SALOMEDS::SObject_wrap aRootSO = publish (theStudy, CORBA::Object::_nil(),
-                                             aMeshSO, aRootTag, 0, false );
+    SALOMEDS::SObject_wrap aRootSO = publish ( CORBA::Object::_nil(),
+                                               aMeshSO, aRootTag, 0, false );
     if ( aRootSO->_is_nil() )
       return aSubMeshSO._retn();
 
     if ( aRootSO->_is_nil() )
       return aSubMeshSO._retn();
 
@@ -716,7 +717,7 @@ SALOMEDS::SObject_ptr SMESH_Gen_i::PublishSubMesh (SALOMEDS::Study_ptr      theS
     SMESH::array_of_ElementType_var elemTypes = theSubMesh->GetTypes();
     const int isEmpty = ( elemTypes->length() == 0 );
     const char* pm[2] = { "ICON_SMESH_TREE_MESH", "ICON_SMESH_TREE_MESH_WARN" };
     SMESH::array_of_ElementType_var elemTypes = theSubMesh->GetTypes();
     const int isEmpty = ( elemTypes->length() == 0 );
     const char* pm[2] = { "ICON_SMESH_TREE_MESH", "ICON_SMESH_TREE_MESH_WARN" };
-    aSubMeshSO = publish (theStudy, theSubMesh, aRootSO, 0, pm[isEmpty] );
+    aSubMeshSO = publish ( theSubMesh, aRootSO, 0, pm[isEmpty] );
     if ( aSubMeshSO->_is_nil() )
       return aSubMeshSO._retn();
   }
     if ( aSubMeshSO->_is_nil() )
       return aSubMeshSO._retn();
   }
@@ -724,15 +725,15 @@ SALOMEDS::SObject_ptr SMESH_Gen_i::PublishSubMesh (SALOMEDS::Study_ptr      theS
 
   // Add reference to theShapeObject
 
 
   // Add reference to theShapeObject
 
-  addReference( theStudy, aSubMeshSO, theShapeObject, 1 );
+  addReference( aSubMeshSO, theShapeObject, 1 );
 
   // Publish hypothesis
 
   SMESH::ListOfHypothesis_var hypList = theMesh->GetHypothesisList( theShapeObject );
   for ( CORBA::ULong i = 0; i < hypList->length(); i++ ) {
     SMESH::SMESH_Hypothesis_var aHyp = SMESH::SMESH_Hypothesis::_narrow( hypList[ i ]);
 
   // Publish hypothesis
 
   SMESH::ListOfHypothesis_var hypList = theMesh->GetHypothesisList( theShapeObject );
   for ( CORBA::ULong i = 0; i < hypList->length(); i++ ) {
     SMESH::SMESH_Hypothesis_var aHyp = SMESH::SMESH_Hypothesis::_narrow( hypList[ i ]);
-    SALOMEDS::SObject_wrap so = PublishHypothesis( theStudy, aHyp );
-    AddHypothesisToShape( theStudy, theMesh, theShapeObject, aHyp );
+    SALOMEDS::SObject_wrap so = PublishHypothesis( aHyp );
+    AddHypothesisToShape( theMesh, theShapeObject, aHyp );
   }
 
   return aSubMeshSO._retn();
   }
 
   return aSubMeshSO._retn();
@@ -743,21 +744,20 @@ SALOMEDS::SObject_ptr SMESH_Gen_i::PublishSubMesh (SALOMEDS::Study_ptr      theS
 //purpose  : 
 //=======================================================================
 
 //purpose  : 
 //=======================================================================
 
-SALOMEDS::SObject_ptr SMESH_Gen_i::PublishGroup (SALOMEDS::Study_ptr    theStudy,
-                                                 SMESH::SMESH_Mesh_ptr  theMesh,
+SALOMEDS::SObject_ptr SMESH_Gen_i::PublishGroup (SMESH::SMESH_Mesh_ptr  theMesh,
                                                  SMESH::SMESH_GroupBase_ptr theGroup,
                                                  GEOM::GEOM_Object_ptr  theShapeObject,
                                                  const char*            theName)
 {
                                                  SMESH::SMESH_GroupBase_ptr theGroup,
                                                  GEOM::GEOM_Object_ptr  theShapeObject,
                                                  const char*            theName)
 {
-  if (theStudy->_is_nil() || theMesh->_is_nil() || theGroup->_is_nil() )
+  if (theMesh->_is_nil() || theGroup->_is_nil() )
     return SALOMEDS::SObject::_nil();
 
     return SALOMEDS::SObject::_nil();
 
-  SALOMEDS::SObject_wrap aGroupSO = ObjectToSObject( theStudy, theGroup );
+  SALOMEDS::SObject_wrap aGroupSO = ObjectToSObject( theGroup );
   if ( aGroupSO->_is_nil() )
   {
   if ( aGroupSO->_is_nil() )
   {
-    SALOMEDS::SObject_wrap aMeshSO = ObjectToSObject( theStudy, theMesh );
+    SALOMEDS::SObject_wrap aMeshSO = ObjectToSObject( theMesh );
     if ( aMeshSO->_is_nil() ) {
     if ( aMeshSO->_is_nil() ) {
-      aMeshSO = PublishInStudy( theStudy, SALOMEDS::SObject::_nil(), theMesh, "");
+      aMeshSO = PublishInStudy( SALOMEDS::SObject::_nil(), theMesh, "");
       if ( aMeshSO->_is_nil())
         return SALOMEDS::SObject::_nil();
     }
       if ( aMeshSO->_is_nil())
         return SALOMEDS::SObject::_nil();
     }
@@ -773,8 +773,8 @@ SALOMEDS::SObject_ptr SMESH_Gen_i::PublishGroup (SALOMEDS::Study_ptr    theStudy
       long aRootTag = GetNodeGroupsTag() + aType - 1;
 
       // Find or create groups root
       long aRootTag = GetNodeGroupsTag() + aType - 1;
 
       // Find or create groups root
-      SALOMEDS::SObject_wrap aRootSO = publish (theStudy, CORBA::Object::_nil(),
-                                               aMeshSO, aRootTag, 0, false );
+      SALOMEDS::SObject_wrap aRootSO = publish ( CORBA::Object::_nil(),
+                                                 aMeshSO, aRootTag, 0, false );
       if ( aRootSO->_is_nil() ) return SALOMEDS::SObject::_nil();
 
       if ( aType < sizeof(aRootNames)/sizeof(char*) )
       if ( aRootSO->_is_nil() ) return SALOMEDS::SObject::_nil();
 
       if ( aType < sizeof(aRootNames)/sizeof(char*) )
@@ -798,7 +798,7 @@ SALOMEDS::SObject_ptr SMESH_Gen_i::PublishGroup (SALOMEDS::Study_ptr    theStudy
             isEmpty = ( allElemTypes[i] != theGroup->GetType() );
         }
       }
             isEmpty = ( allElemTypes[i] != theGroup->GetType() );
         }
       }
-      aGroupSO = publish (theStudy, theGroup, aRootSO, 0, pm[isEmpty].c_str() );
+      aGroupSO = publish ( theGroup, aRootSO, 0, pm[isEmpty].c_str() );
     }
     if ( aGroupSO->_is_nil() )
       return aGroupSO._retn();
     }
     if ( aGroupSO->_is_nil() )
       return aGroupSO._retn();
@@ -808,7 +808,7 @@ SALOMEDS::SObject_ptr SMESH_Gen_i::PublishGroup (SALOMEDS::Study_ptr    theStudy
 
   //Add reference to geometry
   if ( !theShapeObject->_is_nil() )
 
   //Add reference to geometry
   if ( !theShapeObject->_is_nil() )
-    addReference( theStudy, aGroupSO, theShapeObject, 1 );
+    addReference( aGroupSO, theShapeObject, 1 );
 
   return aGroupSO._retn();
 }
 
   return aGroupSO._retn();
 }
@@ -819,20 +819,19 @@ SALOMEDS::SObject_ptr SMESH_Gen_i::PublishGroup (SALOMEDS::Study_ptr    theStudy
 //=======================================================================
 
 SALOMEDS::SObject_ptr
 //=======================================================================
 
 SALOMEDS::SObject_ptr
-  SMESH_Gen_i::PublishHypothesis (SALOMEDS::Study_ptr         theStudy,
-                                  SMESH::SMESH_Hypothesis_ptr theHyp,
+  SMESH_Gen_i::PublishHypothesis (SMESH::SMESH_Hypothesis_ptr theHyp,
                                   const char*                 theName)
 {
   if(MYDEBUG) MESSAGE("PublishHypothesis")
                                   const char*                 theName)
 {
   if(MYDEBUG) MESSAGE("PublishHypothesis")
-  if (theStudy->_is_nil() || theHyp->_is_nil())
+  if (theHyp->_is_nil())
     return SALOMEDS::SObject::_nil();
 
   CORBA::String_var hypType = theHyp->GetName();
 
     return SALOMEDS::SObject::_nil();
 
   CORBA::String_var hypType = theHyp->GetName();
 
-  SALOMEDS::SObject_wrap aHypSO = ObjectToSObject( theStudy, theHyp );
+  SALOMEDS::SObject_wrap aHypSO = ObjectToSObject( theHyp );
   if ( aHypSO->_is_nil() )
   {
   if ( aHypSO->_is_nil() )
   {
-    SALOMEDS::SComponent_wrap father = PublishComponent( theStudy );
+    SALOMEDS::SComponent_wrap father = PublishComponent();
     if ( father->_is_nil() )
       return aHypSO._retn();
 
     if ( father->_is_nil() )
       return aHypSO._retn();
 
@@ -840,7 +839,7 @@ SALOMEDS::SObject_ptr
     bool isAlgo = ( !SMESH::SMESH_Algo::_narrow( theHyp )->_is_nil() );
     int aRootTag = isAlgo ? GetAlgorithmsRootTag() : GetHypothesisRootTag();
     SALOMEDS::SObject_wrap aRootSO =
     bool isAlgo = ( !SMESH::SMESH_Algo::_narrow( theHyp )->_is_nil() );
     int aRootTag = isAlgo ? GetAlgorithmsRootTag() : GetHypothesisRootTag();
     SALOMEDS::SObject_wrap aRootSO =
-      publish (theStudy, CORBA::Object::_nil(),father, aRootTag,
+      publish (CORBA::Object::_nil(),father, aRootTag,
                isAlgo ? "ICON_SMESH_TREE_ALGO" : "ICON_SMESH_TREE_HYPO", false);
     SetName( aRootSO, isAlgo ?  "Algorithms" : "Hypotheses" );
 
                isAlgo ? "ICON_SMESH_TREE_ALGO" : "ICON_SMESH_TREE_HYPO", false);
     SetName( aRootSO, isAlgo ?  "Algorithms" : "Hypotheses" );
 
@@ -851,7 +850,7 @@ SALOMEDS::SObject_ptr
     string pluginName = myHypCreatorMap[ hypType.in() ]->GetModuleName();
     if ( pluginName != "StdMeshers" )
       aPmName = pluginName + "::" + aPmName;
     string pluginName = myHypCreatorMap[ hypType.in() ]->GetModuleName();
     if ( pluginName != "StdMeshers" )
       aPmName = pluginName + "::" + aPmName;
-    aHypSO = publish( theStudy, theHyp, aRootSO, 0, aPmName.c_str() );
+    aHypSO = publish( theHyp, aRootSO, 0, aPmName.c_str() );
   }
 
   SetName( aHypSO, theName, hypType.in() );
   }
 
   SetName( aHypSO, theName, hypType.in() );
@@ -866,8 +865,7 @@ SALOMEDS::SObject_ptr
 //=======================================================================
 
 SALOMEDS::SObject_ptr
 //=======================================================================
 
 SALOMEDS::SObject_ptr
-  SMESH_Gen_i::GetMeshOrSubmeshByShape (SALOMEDS::Study_ptr   theStudy,
-                                        SMESH::SMESH_Mesh_ptr theMesh,
+  SMESH_Gen_i::GetMeshOrSubmeshByShape (SMESH::SMESH_Mesh_ptr theMesh,
                                         GEOM::GEOM_Object_ptr theShape)
 {
   if(MYDEBUG) MESSAGE("GetMeshOrSubmeshByShape")
                                         GEOM::GEOM_Object_ptr theShape)
 {
   if(MYDEBUG) MESSAGE("GetMeshOrSubmeshByShape")
@@ -886,12 +884,12 @@ SALOMEDS::SObject_ptr
   if ( !aShape.IsNull() && mesh_i && mesh_i->GetImpl().GetMeshDS() ) {
     SMESHDS_Mesh* meshDS = mesh_i->GetImpl().GetMeshDS();
     if ( aShape.IsSame( meshDS->ShapeToMesh() ))
   if ( !aShape.IsNull() && mesh_i && mesh_i->GetImpl().GetMeshDS() ) {
     SMESHDS_Mesh* meshDS = mesh_i->GetImpl().GetMeshDS();
     if ( aShape.IsSame( meshDS->ShapeToMesh() ))
-      aMeshOrSubMesh = ObjectToSObject( theStudy, theMesh );
+      aMeshOrSubMesh = ObjectToSObject( theMesh );
     else {
       int shapeID = meshDS->ShapeToIndex( aShape );
       SMESH::SMESH_subMesh_var aSubMesh = mesh_i->getSubMesh(shapeID);
       if ( !aSubMesh->_is_nil() )
     else {
       int shapeID = meshDS->ShapeToIndex( aShape );
       SMESH::SMESH_subMesh_var aSubMesh = mesh_i->getSubMesh(shapeID);
       if ( !aSubMesh->_is_nil() )
-        aMeshOrSubMesh = ObjectToSObject( theStudy, aSubMesh );
+        aMeshOrSubMesh = ObjectToSObject( aSubMesh );
     }
   }
   if(MYDEBUG) MESSAGE("GetMeshOrSubmeshByShape--END")
     }
   }
   if(MYDEBUG) MESSAGE("GetMeshOrSubmeshByShape--END")
@@ -903,27 +901,26 @@ SALOMEDS::SObject_ptr
 //purpose  : 
 //=======================================================================
 
 //purpose  : 
 //=======================================================================
 
-bool SMESH_Gen_i::AddHypothesisToShape(SALOMEDS::Study_ptr         theStudy,
-                                       SMESH::SMESH_Mesh_ptr       theMesh,
+bool SMESH_Gen_i::AddHypothesisToShape(SMESH::SMESH_Mesh_ptr       theMesh,
                                        GEOM::GEOM_Object_ptr       theShape,
                                        SMESH::SMESH_Hypothesis_ptr theHyp)
 {
   if(MYDEBUG) MESSAGE("AddHypothesisToShape")
                                        GEOM::GEOM_Object_ptr       theShape,
                                        SMESH::SMESH_Hypothesis_ptr theHyp)
 {
   if(MYDEBUG) MESSAGE("AddHypothesisToShape")
-  if (theStudy->_is_nil() || theMesh->_is_nil() ||
+  if (theMesh->_is_nil() ||
       theHyp->_is_nil() || (theShape->_is_nil()
                             && theMesh->HasShapeToMesh()) )
     return false;
 
       theHyp->_is_nil() || (theShape->_is_nil()
                             && theMesh->HasShapeToMesh()) )
     return false;
 
-  SALOMEDS::SObject_wrap aMeshSO = ObjectToSObject( theStudy, theMesh );
+  SALOMEDS::SObject_wrap aMeshSO = ObjectToSObject( theMesh );
   if ( aMeshSO->_is_nil() )
   if ( aMeshSO->_is_nil() )
-    aMeshSO = PublishMesh( theStudy, theMesh );
-  SALOMEDS::SObject_wrap aHypSO = PublishHypothesis( theStudy, theHyp );
+    aMeshSO = PublishMesh( theMesh );
+  SALOMEDS::SObject_wrap aHypSO = PublishHypothesis( theHyp );
   if ( aMeshSO->_is_nil() || aHypSO->_is_nil())
     return false;
 
   // Find a mesh or submesh referring to theShape
   SALOMEDS::SObject_wrap aMeshOrSubMesh =
   if ( aMeshSO->_is_nil() || aHypSO->_is_nil())
     return false;
 
   // Find a mesh or submesh referring to theShape
   SALOMEDS::SObject_wrap aMeshOrSubMesh =
-    GetMeshOrSubmeshByShape( theStudy, theMesh, theShape );
+    GetMeshOrSubmeshByShape( theMesh, theShape );
   if ( aMeshOrSubMesh->_is_nil() )
   {
     // publish submesh
   if ( aMeshOrSubMesh->_is_nil() )
   {
     // publish submesh
@@ -933,7 +930,7 @@ bool SMESH_Gen_i::AddHypothesisToShape(SALOMEDS::Study_ptr         theStudy,
       SMESHDS_Mesh* meshDS = mesh_i->GetImpl().GetMeshDS();
       int shapeID = meshDS->ShapeToIndex( aShape );
       SMESH::SMESH_subMesh_var aSubMesh = mesh_i->getSubMesh(shapeID);
       SMESHDS_Mesh* meshDS = mesh_i->GetImpl().GetMeshDS();
       int shapeID = meshDS->ShapeToIndex( aShape );
       SMESH::SMESH_subMesh_var aSubMesh = mesh_i->getSubMesh(shapeID);
-      aMeshOrSubMesh = PublishSubMesh( theStudy, theMesh, aSubMesh, theShape );
+      aMeshOrSubMesh = PublishSubMesh( theMesh, aSubMesh, theShape );
     }
     if ( aMeshOrSubMesh->_is_nil() )
       return false;
     }
     if ( aMeshOrSubMesh->_is_nil() )
       return false;
@@ -942,12 +939,12 @@ bool SMESH_Gen_i::AddHypothesisToShape(SALOMEDS::Study_ptr         theStudy,
   //Find or Create Applied Hypothesis root
   bool aIsAlgo = !SMESH::SMESH_Algo::_narrow( theHyp )->_is_nil();
   SALOMEDS::SObject_wrap AHR =
   //Find or Create Applied Hypothesis root
   bool aIsAlgo = !SMESH::SMESH_Algo::_narrow( theHyp )->_is_nil();
   SALOMEDS::SObject_wrap AHR =
-    publish (theStudy, CORBA::Object::_nil(), aMeshOrSubMesh,
+    publish (CORBA::Object::_nil(), aMeshOrSubMesh,
              aIsAlgo ? GetRefOnAppliedAlgorithmsTag() : GetRefOnAppliedHypothesisTag(),
              aIsAlgo ? "ICON_SMESH_TREE_ALGO" : "ICON_SMESH_TREE_HYPO", false);
   SetName( AHR, aIsAlgo ? "Applied algorithms" : "Applied hypotheses" );
 
              aIsAlgo ? GetRefOnAppliedAlgorithmsTag() : GetRefOnAppliedHypothesisTag(),
              aIsAlgo ? "ICON_SMESH_TREE_ALGO" : "ICON_SMESH_TREE_HYPO", false);
   SetName( AHR, aIsAlgo ? "Applied algorithms" : "Applied hypotheses" );
 
-  addReference( theStudy, AHR, theHyp );
+  addReference( AHR, theHyp );
 
   if(MYDEBUG) MESSAGE("AddHypothesisToShape--END")
   return true;
 
   if(MYDEBUG) MESSAGE("AddHypothesisToShape--END")
   return true;
@@ -958,17 +955,16 @@ bool SMESH_Gen_i::AddHypothesisToShape(SALOMEDS::Study_ptr         theStudy,
 //purpose  : 
 //=======================================================================
 
 //purpose  : 
 //=======================================================================
 
-bool SMESH_Gen_i::RemoveHypothesisFromShape(SALOMEDS::Study_ptr         theStudy,
-                                            SMESH::SMESH_Mesh_ptr       theMesh,
+bool SMESH_Gen_i::RemoveHypothesisFromShape(SMESH::SMESH_Mesh_ptr       theMesh,
                                             GEOM::GEOM_Object_ptr       theShape,
                                             SMESH::SMESH_Hypothesis_ptr theHyp)
 {
                                             GEOM::GEOM_Object_ptr       theShape,
                                             SMESH::SMESH_Hypothesis_ptr theHyp)
 {
-  if (theStudy->_is_nil() || theMesh->_is_nil() ||
+  if (theMesh->_is_nil() ||
       theHyp->_is_nil() || (theShape->_is_nil()
                             && theMesh->HasShapeToMesh()))
     return false;
 
       theHyp->_is_nil() || (theShape->_is_nil()
                             && theMesh->HasShapeToMesh()))
     return false;
 
-  SALOMEDS::SObject_wrap aHypSO = ObjectToSObject( theStudy, theHyp );
+  SALOMEDS::SObject_wrap aHypSO = ObjectToSObject( theHyp );
   if ( aHypSO->_is_nil() )
     return false;
 
   if ( aHypSO->_is_nil() )
     return false;
 
@@ -976,13 +972,13 @@ bool SMESH_Gen_i::RemoveHypothesisFromShape(SALOMEDS::Study_ptr         theStudy
 
   // Find a mesh or sub-mesh referring to theShape
   SALOMEDS::SObject_wrap aMeshOrSubMesh =
 
   // Find a mesh or sub-mesh referring to theShape
   SALOMEDS::SObject_wrap aMeshOrSubMesh =
-    GetMeshOrSubmeshByShape( theStudy, theMesh, theShape );
+    GetMeshOrSubmeshByShape( theMesh, theShape );
   if ( aMeshOrSubMesh->_is_nil() )
     return false;
 
   // Find and remove a reference to aHypSO
   SALOMEDS::SObject_wrap aRef, anObj;
   if ( aMeshOrSubMesh->_is_nil() )
     return false;
 
   // Find and remove a reference to aHypSO
   SALOMEDS::SObject_wrap aRef, anObj;
-  SALOMEDS::ChildIterator_wrap it = theStudy->NewChildIterator( aMeshOrSubMesh );
+  SALOMEDS::ChildIterator_wrap it = getStudyServant()->NewChildIterator( aMeshOrSubMesh );
   bool found = false;
   for ( it->InitEx( true ); ( it->More() && !found ); it->Next() ) {
     anObj = it->Value();
   bool found = false;
   for ( it->InitEx( true ); ( it->More() && !found ); it->Next() ) {
     anObj = it->Value();
@@ -993,7 +989,7 @@ bool SMESH_Gen_i::RemoveHypothesisFromShape(SALOMEDS::Study_ptr         theStudy
     }
     if ( found )
     {
     }
     if ( found )
     {
-      SALOMEDS::StudyBuilder_var builder = theStudy->NewBuilder();
+      SALOMEDS::StudyBuilder_var builder = getStudyServant()->NewBuilder();
       builder->RemoveObject( anObj );
     }
   }
       builder->RemoveObject( anObj );
     }
   }
@@ -1012,10 +1008,6 @@ bool SMESH_Gen_i::RemoveHypothesisFromShape(SALOMEDS::Study_ptr         theStudy
 
 void SMESH_Gen_i::UpdateParameters(CORBA::Object_ptr theObject, const char* theParameters)
 {
 
 void SMESH_Gen_i::UpdateParameters(CORBA::Object_ptr theObject, const char* theParameters)
 {
-  SALOMEDS::Study_var aStudy = GetCurrentStudy();
-  if ( aStudy->_is_nil() )
-    return;
-
   // find variable names within theParameters
 
   myLastObj.clear();
   // find variable names within theParameters
 
   myLastObj.clear();
@@ -1032,7 +1024,7 @@ void SMESH_Gen_i::UpdateParameters(CORBA::Object_ptr theObject, const char* theP
       if ( prevPos < pos )
       {
         string val( theParameters + prevPos, theParameters + pos );
       if ( prevPos < pos )
       {
         string val( theParameters + prevPos, theParameters + pos );
-        if ( !aStudy->IsVariable( val.c_str() ))
+        if ( !getStudyServant()->IsVariable( val.c_str() ))
           val.clear();
         myLastParameters.push_back( val );
         nbVars += (! myLastParameters.back().empty() );
           val.clear();
         myLastParameters.push_back( val );
         nbVars += (! myLastParameters.back().empty() );
@@ -1054,14 +1046,14 @@ void SMESH_Gen_i::UpdateParameters(CORBA::Object_ptr theObject, const char* theP
   // (2) indices of found variables in myLastParamIndex.
 
   // remember theObject
   // (2) indices of found variables in myLastParamIndex.
 
   // remember theObject
-  SALOMEDS::SObject_wrap aSObj =  ObjectToSObject(aStudy,theObject);
+  SALOMEDS::SObject_wrap aSObj =  ObjectToSObject(theObject);
   if ( aSObj->_is_nil() )
     return;
   CORBA::String_var anObjEntry = aSObj->GetID();
   myLastObj = anObjEntry.in();
 
   // get a string of variable names
   if ( aSObj->_is_nil() )
     return;
   CORBA::String_var anObjEntry = aSObj->GetID();
   myLastObj = anObjEntry.in();
 
   // get a string of variable names
-  SALOMEDS::StudyBuilder_var   aStudyBuilder = aStudy->NewBuilder();
+  SALOMEDS::StudyBuilder_var   aStudyBuilder = getStudyServant()->NewBuilder();
   SALOMEDS::GenericAttribute_wrap     anAttr =
     aStudyBuilder->FindOrCreateAttribute( aSObj, "AttributeString" );
   SALOMEDS::AttributeString_wrap aStringAttr = anAttr;
   SALOMEDS::GenericAttribute_wrap     anAttr =
     aStudyBuilder->FindOrCreateAttribute( aSObj, "AttributeString" );
   SALOMEDS::AttributeString_wrap aStringAttr = anAttr;
@@ -1130,15 +1122,11 @@ void SMESH_Gen_i::UpdateParameters(CORBA::Object_ptr theObject, const char* theP
 std::vector< std::string > SMESH_Gen_i::GetAllParameters(const std::string& theObjectEntry) const
 {
   std::vector< std::string > varNames;
 std::vector< std::string > SMESH_Gen_i::GetAllParameters(const std::string& theObjectEntry) const
 {
   std::vector< std::string > varNames;
-  if ( myCurrentStudy->_is_nil() )
-    return varNames;
 
 
-  SALOMEDS::SObject_wrap aSObj = myCurrentStudy->FindObjectID( theObjectEntry.c_str() );
-  if ( myCurrentStudy->_is_nil() )
-    return varNames;
+  SALOMEDS::SObject_wrap aSObj = getStudyServant()->FindObjectID( theObjectEntry.c_str() );
 
   // get a string of variable names
 
   // get a string of variable names
-  SALOMEDS::StudyBuilder_var   aStudyBuilder = myCurrentStudy->NewBuilder();
+  SALOMEDS::StudyBuilder_var   aStudyBuilder = getStudyServant()->NewBuilder();
   SALOMEDS::GenericAttribute_wrap     anAttr =
     aStudyBuilder->FindOrCreateAttribute( aSObj, "AttributeString" );
   SALOMEDS::AttributeString_wrap aStringAttr = anAttr;
   SALOMEDS::GenericAttribute_wrap     anAttr =
     aStudyBuilder->FindOrCreateAttribute( aSObj, "AttributeString" );
   SALOMEDS::AttributeString_wrap aStringAttr = anAttr;
@@ -1183,7 +1171,7 @@ std::vector< std::string > SMESH_Gen_i::GetAllParameters(const std::string& theO
 //   //const char* aParameters = theParameters;
 // //   const char* aParameters = CORBA::string_dup(theParameters);
 //   TCollection_AsciiString anInputParams;
 //   //const char* aParameters = theParameters;
 // //   const char* aParameters = CORBA::string_dup(theParameters);
 //   TCollection_AsciiString anInputParams;
-//   SALOMEDS::Study_var aStudy = GetCurrentStudy();
+//   SALOMEDS::Study_var aStudy = getStudyServant();
 //   if( !aStudy->_is_nil() ) {
 // //     SALOMEDS::ListOfListOfStrings_var aSections = aStudy->ParseVariables(theParameters);
 // //     for(int j=0;j<aSections->length();j++) {
 //   if( !aStudy->_is_nil() ) {
 // //     SALOMEDS::ListOfListOfStrings_var aSections = aStudy->ParseVariables(theParameters);
 // //     for(int j=0;j<aSections->length();j++) {
@@ -1232,7 +1220,7 @@ char* SMESH_Gen_i::GetParameters(CORBA::Object_ptr theObject)
 {
   CORBA::String_var aResult("");
 
 {
   CORBA::String_var aResult("");
 
-  SALOMEDS::SObject_wrap aSObj = ObjectToSObject( myCurrentStudy, theObject );
+  SALOMEDS::SObject_wrap aSObj = ObjectToSObject( theObject );
   if ( !aSObj->_is_nil() )
   {
     SALOMEDS::GenericAttribute_wrap attr;
   if ( !aSObj->_is_nil() )
   {
     SALOMEDS::GenericAttribute_wrap attr;
index d9c4b0961d208e34d40bcacc65d9bff6804a6e37..ef9ad77608468615d646e17fb2de594c76c5fb55 100644 (file)
@@ -150,9 +150,8 @@ void SMESH_GroupBase_i::SetName( const char* theName )
 
   // Update group name in a study
   SMESH_Gen_i*              aGen = myMeshServant->GetGen();
 
   // Update group name in a study
   SMESH_Gen_i*              aGen = myMeshServant->GetGen();
-  SALOMEDS::Study_var      aStudy = aGen->GetCurrentStudy();
   SMESH::SMESH_GroupBase_var aGrp = _this();
   SMESH::SMESH_GroupBase_var aGrp = _this();
-  SALOMEDS::SObject_var      anSO = aGen->ObjectToSObject( aStudy, aGrp );
+  SALOMEDS::SObject_var      anSO = aGen->ObjectToSObject( aGrp );
   if ( !anSO->_is_nil() )
   {
     aGen->SetName( anSO, theName );
   if ( !anSO->_is_nil() )
   {
     aGen->SetName( anSO, theName );
index b3e4e48325a354797167f1a2e8973ca85d028712..9b9779d68505ced3e554ecd12f1cc19695906ea0 100644 (file)
@@ -128,8 +128,7 @@ bool SMESH_Hypothesis_i::IsPublished()
   bool res = false;
   if ( SMESH_Gen_i *gen = SMESH_Gen_i::GetSMESHGen())
   {
   bool res = false;
   if ( SMESH_Gen_i *gen = SMESH_Gen_i::GetSMESHGen())
   {
-    SALOMEDS::Study_var study = gen->GetCurrentStudy();
-    SALOMEDS::SObject_wrap SO = SMESH_Gen_i::ObjectToSObject( study, _this());
+    SALOMEDS::SObject_wrap SO = SMESH_Gen_i::ObjectToSObject( _this());
     res = !SO->_is_nil();
   }
   return res;
     res = !SO->_is_nil();
   }
   return res;
index 85f1d01964e6fe6d89d8ed771132247748d4f6a4..ee8baec36a57907d6ee10f3fd5b1e015f4c0332f 100644 (file)
@@ -133,7 +133,6 @@ class SMESH_I_EXPORT GenericHypothesisCreator_i
 public:
   // Create a hypothesis
   virtual SMESH_Hypothesis_i* Create(PortableServer::POA_ptr thePOA,
 public:
   // Create a hypothesis
   virtual SMESH_Hypothesis_i* Create(PortableServer::POA_ptr thePOA,
-                                     int                     theStudyId,
                                      ::SMESH_Gen*            theGenImpl) = 0;
   virtual ~GenericHypothesisCreator_i() {}
 
                                      ::SMESH_Gen*            theGenImpl) = 0;
   virtual ~GenericHypothesisCreator_i() {}
 
@@ -153,10 +152,9 @@ template <class T> class HypothesisCreator_i: public GenericHypothesisCreator_i
 {
 public:
   virtual SMESH_Hypothesis_i* Create (PortableServer::POA_ptr thePOA,
 {
 public:
   virtual SMESH_Hypothesis_i* Create (PortableServer::POA_ptr thePOA,
-                                      int                     theStudyId,
                                       ::SMESH_Gen*            theGenImpl)
   {
                                       ::SMESH_Gen*            theGenImpl)
   {
-    return new T (thePOA, theStudyId, theGenImpl);
+    return new T (thePOA, theGenImpl);
   };
 };
 
   };
 };
 
index 0ba74d70ffef6b3c0fb393d661c3a951ee6dbe9f..7cbef4f106184bf30b1b8de63a8dd8beda123100 100644 (file)
@@ -110,7 +110,7 @@ namespace MeshEditor_I {
     SMDSAbs_ElementType myPreviewType; // type to show
     //!< Constructor
     TPreviewMesh(SMDSAbs_ElementType previewElements = SMDSAbs_All) {
     SMDSAbs_ElementType myPreviewType; // type to show
     //!< Constructor
     TPreviewMesh(SMDSAbs_ElementType previewElements = SMDSAbs_All) {
-      _isShapeToMesh = (_id =_studyId = 0);
+      _isShapeToMesh = (_id = 0);
       _myMeshDS  = new SMESHDS_Mesh( _id, true );
       myPreviewType = previewElements;
     }
       _myMeshDS  = new SMESHDS_Mesh( _id, true );
       myPreviewType = previewElements;
     }
@@ -5269,8 +5269,7 @@ SMESH::SMESH_Mesh_ptr SMESH_MeshEditor_i::makeMesh(const char* theMeshName)
 {
   SMESH_Gen_i*              gen = SMESH_Gen_i::GetSMESHGen();
   SMESH::SMESH_Mesh_var    mesh = gen->CreateEmptyMesh();
 {
   SMESH_Gen_i*              gen = SMESH_Gen_i::GetSMESHGen();
   SMESH::SMESH_Mesh_var    mesh = gen->CreateEmptyMesh();
-  SALOMEDS::Study_var     study = gen->GetCurrentStudy();
-  SALOMEDS::SObject_wrap meshSO = gen->ObjectToSObject( study, mesh );
+  SALOMEDS::SObject_wrap meshSO = gen->ObjectToSObject( mesh );
   gen->SetName( meshSO, theMeshName, "Mesh" );
   gen->SetPixMap( meshSO, "ICON_SMESH_TREE_MESH_IMPORTED");
 
   gen->SetName( meshSO, theMeshName, "Mesh" );
   gen->SetPixMap( meshSO, "ICON_SMESH_TREE_MESH_IMPORTED");
 
index 268dfd829b3fc4fc058a6aa1a141a57ec528911e..d030cbc93b99224c73319515e8f2002945bab70a 100644 (file)
@@ -104,14 +104,12 @@ int SMESH_Mesh_i::_idGenerator = 0;
 //=============================================================================
 
 SMESH_Mesh_i::SMESH_Mesh_i( PortableServer::POA_ptr thePOA,
 //=============================================================================
 
 SMESH_Mesh_i::SMESH_Mesh_i( PortableServer::POA_ptr thePOA,
-                            SMESH_Gen_i*            gen_i,
-                            CORBA::Long             studyId )
+                            SMESH_Gen_i*            gen_i )
 : SALOME::GenericObj_i( thePOA )
 {
   _impl          = NULL;
   _gen_i         = gen_i;
   _id            = _idGenerator++;
 : SALOME::GenericObj_i( thePOA )
 {
   _impl          = NULL;
   _gen_i         = gen_i;
   _id            = _idGenerator++;
-  _studyId       = studyId;
   _editor        = NULL;
   _previewEditor = NULL;
   _preMeshInfo   = NULL;
   _editor        = NULL;
   _previewEditor = NULL;
   _preMeshInfo   = NULL;
@@ -239,9 +237,7 @@ GEOM::GEOM_Object_ptr SMESH_Mesh_i::GetShapeToMesh()
         for ( ; data != _geomGroupData.end(); ++data )
           if ( data->_smeshObject->_is_equivalent( _this() ))
           {
         for ( ; data != _geomGroupData.end(); ++data )
           if ( data->_smeshObject->_is_equivalent( _this() ))
           {
-            SALOMEDS::Study_var study = _gen_i->GetCurrentStudy();
-            if ( study->_is_nil() ) break;
-            SALOMEDS::SObject_wrap so = study->FindObjectID( data->_groupEntry.c_str() );
+            SALOMEDS::SObject_wrap so = SMESH_Gen_i::getStudyServant()->FindObjectID( data->_groupEntry.c_str() );
             CORBA::Object_var     obj = _gen_i->SObjectToObject( so );
             aShapeObj = GEOM::GEOM_Object::_narrow( obj );
             break;
             CORBA::Object_var     obj = _gen_i->SObjectToObject( so );
             aShapeObj = GEOM::GEOM_Object::_narrow( obj );
             break;
@@ -499,8 +495,7 @@ int SMESH_Mesh_i::ImportSTLFile( const char* theFileName )
   std::string name = _impl->STLToMesh( theFileName );
   if ( !name.empty() )
   {
   std::string name = _impl->STLToMesh( theFileName );
   if ( !name.empty() )
   {
-    SALOMEDS::Study_var     study = _gen_i->GetCurrentStudy();
-    SALOMEDS::SObject_wrap meshSO = _gen_i->ObjectToSObject( study, _this() );
+    SALOMEDS::SObject_wrap meshSO = _gen_i->ObjectToSObject( _this() );
     _gen_i->SetName( meshSO, name.c_str() );
   }
 
     _gen_i->SetName( meshSO, name.c_str() );
   }
 
@@ -609,8 +604,7 @@ SMESH_Mesh_i::AddHypothesis(GEOM::GEOM_Object_ptr       aSubShape,
   SMESH::SMESH_Mesh_var mesh( _this() );
   if ( !SMESH_Hypothesis::IsStatusFatal(status) )
   {
   SMESH::SMESH_Mesh_var mesh( _this() );
   if ( !SMESH_Hypothesis::IsStatusFatal(status) )
   {
-    SALOMEDS::Study_var study = _gen_i->GetCurrentStudy();
-    _gen_i->AddHypothesisToShape( study, mesh, aSubShape, anHyp );
+    _gen_i->AddHypothesisToShape( mesh, aSubShape, anHyp );
   }
   if(MYDEBUG) MESSAGE( " AddHypothesis(): status = " << status );
 
   }
   if(MYDEBUG) MESSAGE( " AddHypothesis(): status = " << status );
 
@@ -695,8 +689,7 @@ SMESH::Hypothesis_Status SMESH_Mesh_i::RemoveHypothesis(GEOM::GEOM_Object_ptr aS
 
   if ( !SMESH_Hypothesis::IsStatusFatal(status) )
   {
 
   if ( !SMESH_Hypothesis::IsStatusFatal(status) )
   {
-    SALOMEDS::Study_var study = _gen_i->GetCurrentStudy();
-    _gen_i->RemoveHypothesisFromShape( study, mesh, aSubShape, anHyp );
+    _gen_i->RemoveHypothesisFromShape( mesh, aSubShape, anHyp );
   }
   // Update Python script
   if(_impl->HasShapeToMesh())
   }
   // Update Python script
   if(_impl->HasShapeToMesh())
@@ -866,9 +859,8 @@ SMESH::SMESH_subMesh_ptr SMESH_Mesh_i::GetSubMesh(GEOM::GEOM_Object_ptr aSubShap
       subMesh = createSubMesh( aSubShape );
     if ( _gen_i->CanPublishInStudy( subMesh ))
     {
       subMesh = createSubMesh( aSubShape );
     if ( _gen_i->CanPublishInStudy( subMesh ))
     {
-      SALOMEDS::Study_var study = _gen_i->GetCurrentStudy();
       SALOMEDS::SObject_wrap aSO =
       SALOMEDS::SObject_wrap aSO =
-        _gen_i->PublishSubMesh( study, aMesh, subMesh, aSubShape, theName );
+        _gen_i->PublishSubMesh( aMesh, subMesh, aSubShape, theName );
       if ( !aSO->_is_nil()) {
         // Update Python script
         TPythonDump() << aSO << " = " << aMesh << ".GetSubMesh( "
       if ( !aSO->_is_nil()) {
         // Update Python script
         TPythonDump() << aSO << " = " << aMesh << ".GetSubMesh( "
@@ -897,28 +889,25 @@ void SMESH_Mesh_i::RemoveSubMesh( SMESH::SMESH_subMesh_ptr theSubMesh )
     return;
 
   GEOM::GEOM_Object_var aSubShape;
     return;
 
   GEOM::GEOM_Object_var aSubShape;
-  SALOMEDS::Study_var aStudy = _gen_i->GetCurrentStudy();
-  if ( !aStudy->_is_nil() )  {
-    // Remove submesh's SObject
-    SALOMEDS::SObject_wrap anSO = _gen_i->ObjectToSObject( aStudy, theSubMesh );
-    if ( !anSO->_is_nil() ) {
-      long aTag = SMESH_Gen_i::GetRefOnShapeTag();
-      SALOMEDS::SObject_wrap anObj, aRef;
-      if ( anSO->FindSubObject( aTag, anObj.inout() ) &&
-           anObj->ReferencedObject( aRef.inout() ))
-      {
-        CORBA::Object_var obj = aRef->GetObject();
-        aSubShape = GEOM::GEOM_Object::_narrow( obj );
-      }
-      // if ( aSubShape->_is_nil() ) // not published shape (IPAL13617)
-      //   aSubShape = theSubMesh->GetSubShape();
+  // Remove submesh's SObject
+  SALOMEDS::SObject_wrap anSO = _gen_i->ObjectToSObject( theSubMesh );
+  if ( !anSO->_is_nil() ) {
+    long aTag = SMESH_Gen_i::GetRefOnShapeTag();
+    SALOMEDS::SObject_wrap anObj, aRef;
+    if ( anSO->FindSubObject( aTag, anObj.inout() ) &&
+         anObj->ReferencedObject( aRef.inout() ))
+    {
+      CORBA::Object_var obj = aRef->GetObject();
+      aSubShape = GEOM::GEOM_Object::_narrow( obj );
+    }
+    // if ( aSubShape->_is_nil() ) // not published shape (IPAL13617)
+    //   aSubShape = theSubMesh->GetSubShape();
 
 
-      SALOMEDS::StudyBuilder_var builder = aStudy->NewBuilder();
-      builder->RemoveObjectWithChildren( anSO );
+    SALOMEDS::StudyBuilder_var builder = SMESH_Gen_i::getStudyServant()->NewBuilder();
+    builder->RemoveObjectWithChildren( anSO );
 
 
-      // Update Python script
-      TPythonDump() << SMESH::SMESH_Mesh_var( _this() ) << ".RemoveSubMesh( " << anSO << " )";
-    }
+    // Update Python script
+    TPythonDump() << SMESH::SMESH_Mesh_var( _this() ) << ".RemoveSubMesh( " << anSO << " )";
   }
 
   if ( removeSubMesh( theSubMesh, aSubShape.in() ))
   }
 
   if ( removeSubMesh( theSubMesh, aSubShape.in() ))
@@ -948,9 +937,8 @@ SMESH::SMESH_Group_ptr SMESH_Mesh_i::CreateGroup( SMESH::ElementType theElemType
   if ( _gen_i->CanPublishInStudy( aNewGroup ) )
   {
     SMESH::SMESH_Mesh_var mesh = _this();
   if ( _gen_i->CanPublishInStudy( aNewGroup ) )
   {
     SMESH::SMESH_Mesh_var mesh = _this();
-    SALOMEDS::Study_var  study = _gen_i->GetCurrentStudy();
     SALOMEDS::SObject_wrap aSO =
     SALOMEDS::SObject_wrap aSO =
-      _gen_i->PublishGroup( study, mesh, aNewGroup, GEOM::GEOM_Object::_nil(), theName);
+      _gen_i->PublishGroup( mesh, aNewGroup, GEOM::GEOM_Object::_nil(), theName);
     if ( !aSO->_is_nil())
       // Update Python script
       TPythonDump() << aSO << " = " << mesh << ".CreateGroup( "
     if ( !aSO->_is_nil())
       // Update Python script
       TPythonDump() << aSO << " = " << mesh << ".CreateGroup( "
@@ -985,9 +973,8 @@ SMESH_Mesh_i::CreateGroupFromGEOM (SMESH::ElementType    theElemType,
     if ( _gen_i->CanPublishInStudy( aNewGroup ) )
     {
       SMESH::SMESH_Mesh_var mesh = _this();
     if ( _gen_i->CanPublishInStudy( aNewGroup ) )
     {
       SMESH::SMESH_Mesh_var mesh = _this();
-      SALOMEDS::Study_var  study = _gen_i->GetCurrentStudy();
       SALOMEDS::SObject_wrap aSO =
       SALOMEDS::SObject_wrap aSO =
-        _gen_i->PublishGroup( study, mesh, aNewGroup, theGeomObj, theName );
+        _gen_i->PublishGroup( mesh, aNewGroup, theGeomObj, theName );
       if ( !aSO->_is_nil())
         TPythonDump() << aSO << " = " << mesh << ".CreateGroupFromGEOM( "
                       << theElemType << ", '" << theName << "', " << theGeomObj << " )";
       if ( !aSO->_is_nil())
         TPythonDump() << aSO << " = " << mesh << ".CreateGroupFromGEOM( "
                       << theElemType << ", '" << theName << "', " << theGeomObj << " )";
@@ -1034,9 +1021,8 @@ SMESH_Mesh_i::CreateGroupFromFilter(SMESH::ElementType theElemType,
   if ( _gen_i->CanPublishInStudy( aNewGroup ) )
   {
     SMESH::SMESH_Mesh_var mesh = _this();
   if ( _gen_i->CanPublishInStudy( aNewGroup ) )
   {
     SMESH::SMESH_Mesh_var mesh = _this();
-    SALOMEDS::Study_var  study = _gen_i->GetCurrentStudy();
     SALOMEDS::SObject_wrap aSO =
     SALOMEDS::SObject_wrap aSO =
-      _gen_i->PublishGroup( study, mesh, aNewGroup, GEOM::GEOM_Object::_nil(), theName );
+      _gen_i->PublishGroup( mesh, aNewGroup, GEOM::GEOM_Object::_nil(), theName );
 
     if ( !aSO->_is_nil())
       pd << aSO << " = " << mesh << ".CreateGroupFromFilter( "
 
     if ( !aSO->_is_nil())
       pd << aSO << " = " << mesh << ".CreateGroupFromFilter( "
@@ -1063,19 +1049,15 @@ void SMESH_Mesh_i::RemoveGroup( SMESH::SMESH_GroupBase_ptr theGroup )
   if ( !aGroup )
     return;
 
   if ( !aGroup )
     return;
 
-  SALOMEDS::Study_var aStudy = _gen_i->GetCurrentStudy();
-  if ( !aStudy->_is_nil() )
+  SALOMEDS::SObject_wrap aGroupSO = _gen_i->ObjectToSObject( theGroup );
+  if ( !aGroupSO->_is_nil() )
   {
   {
-    SALOMEDS::SObject_wrap aGroupSO = _gen_i->ObjectToSObject( aStudy, theGroup );
-    if ( !aGroupSO->_is_nil() )
-    {
-      // Update Python script
-      TPythonDump() << SMESH::SMESH_Mesh_var(_this()) << ".RemoveGroup( " << aGroupSO << " )";
+    // Update Python script
+    TPythonDump() << SMESH::SMESH_Mesh_var(_this()) << ".RemoveGroup( " << aGroupSO << " )";
 
 
-      // Remove group's SObject
-      SALOMEDS::StudyBuilder_var builder = aStudy->NewBuilder();
-      builder->RemoveObjectWithChildren( aGroupSO );
-    }
+    // Remove group's SObject
+    SALOMEDS::StudyBuilder_var builder = SMESH_Gen_i::getStudyServant()->NewBuilder();
+    builder->RemoveObjectWithChildren( aGroupSO );
   }
   aGroup->Modified(/*removed=*/true); // notify dependent Filter with FT_BelongToMeshGroup criterion
 
   }
   aGroup->Modified(/*removed=*/true); // notify dependent Filter with FT_BelongToMeshGroup criterion
 
@@ -1836,14 +1818,13 @@ void SMESH_Mesh_i::addGeomGroupData(GEOM::GEOM_Object_ptr theGeomObj,
   if ( CORBA::is_nil( theGeomObj ) || theGeomObj->GetType() != GEOM_GROUP )
     return;
   // group SO
   if ( CORBA::is_nil( theGeomObj ) || theGeomObj->GetType() != GEOM_GROUP )
     return;
   // group SO
-  SALOMEDS::Study_var    study   = _gen_i->GetCurrentStudy();
-  SALOMEDS::SObject_wrap groupSO = _gen_i->ObjectToSObject( study, theGeomObj );
+  SALOMEDS::SObject_wrap groupSO = _gen_i->ObjectToSObject( theGeomObj );
   if ( groupSO->_is_nil() )
     return;
   // group indices
   GEOM::GEOM_Gen_var geomGen = _gen_i->GetGeomEngine();
   GEOM::GEOM_IGroupOperations_wrap groupOp =
   if ( groupSO->_is_nil() )
     return;
   // group indices
   GEOM::GEOM_Gen_var geomGen = _gen_i->GetGeomEngine();
   GEOM::GEOM_IGroupOperations_wrap groupOp =
-    geomGen->GetIGroupOperations( _gen_i->GetCurrentStudyID() );
+    geomGen->GetIGroupOperations();
   GEOM::ListOfLong_var ids = groupOp->GetObjects( theGeomObj );
 
   // store data
   GEOM::ListOfLong_var ids = groupOp->GetObjects( theGeomObj );
 
   // store data
@@ -1891,9 +1872,7 @@ TopoDS_Shape SMESH_Mesh_i::newGroupShape( TGeomGroupData & groupData)
   TopoDS_Shape newShape;
 
   // get geom group
   TopoDS_Shape newShape;
 
   // get geom group
-  SALOMEDS::Study_var study = _gen_i->GetCurrentStudy();
-  if ( study->_is_nil() ) return newShape; // means "not changed"
-  SALOMEDS::SObject_wrap groupSO = study->FindObjectID( groupData._groupEntry.c_str() );
+  SALOMEDS::SObject_wrap groupSO = SMESH_Gen_i::getStudyServant()->FindObjectID( groupData._groupEntry.c_str() );
   if ( !groupSO->_is_nil() )
   {
     CORBA::Object_var groupObj = _gen_i->SObjectToObject( groupSO );
   if ( !groupSO->_is_nil() )
   {
     CORBA::Object_var groupObj = _gen_i->SObjectToObject( groupSO );
@@ -1904,7 +1883,7 @@ TopoDS_Shape SMESH_Mesh_i::newGroupShape( TGeomGroupData & groupData)
     set<int> curIndices;
     GEOM::GEOM_Gen_var geomGen = _gen_i->GetGeomEngine();
     GEOM::GEOM_IGroupOperations_wrap groupOp =
     set<int> curIndices;
     GEOM::GEOM_Gen_var geomGen = _gen_i->GetGeomEngine();
     GEOM::GEOM_IGroupOperations_wrap groupOp =
-      geomGen->GetIGroupOperations( _gen_i->GetCurrentStudyID() );
+      geomGen->GetIGroupOperations();
     GEOM::ListOfLong_var   ids = groupOp->GetObjects( geomGroup );
     for ( CORBA::ULong i = 0; i < ids->length(); ++i )
       curIndices.insert( ids[i] );
     GEOM::ListOfLong_var   ids = groupOp->GetObjects( geomGroup );
     for ( CORBA::ULong i = 0; i < ids->length(); ++i )
       curIndices.insert( ids[i] );
@@ -1969,9 +1948,6 @@ void SMESH_Mesh_i::CheckGeomModif()
 {
   if ( !_impl->HasShapeToMesh() ) return;
 
 {
   if ( !_impl->HasShapeToMesh() ) return;
 
-  SALOMEDS::Study_var study = _gen_i->GetCurrentStudy();
-  if ( study->_is_nil() ) return;
-
   GEOM::GEOM_Object_var mainGO = _gen_i->ShapeToGeomObject( _impl->GetShapeToMesh() );
   //if ( mainGO->_is_nil() ) return;
 
   GEOM::GEOM_Object_var mainGO = _gen_i->ShapeToGeomObject( _impl->GetShapeToMesh() );
   //if ( mainGO->_is_nil() ) return;
 
@@ -2118,9 +2094,6 @@ void SMESH_Mesh_i::CheckGeomGroupModif()
 {
   if ( !_impl->HasShapeToMesh() ) return;
 
 {
   if ( !_impl->HasShapeToMesh() ) return;
 
-  SALOMEDS::Study_var study = _gen_i->GetCurrentStudy();
-  if ( study->_is_nil() ) return;
-
   CORBA::Long nbEntities = NbNodes() + NbElements();
 
   // Check if group contents changed
   CORBA::Long nbEntities = NbNodes() + NbElements();
 
   // Check if group contents changed
@@ -2307,7 +2280,7 @@ void SMESH_Mesh_i::CheckGeomGroupModif()
         if ( _mapGroups.find( oldID ) == _mapGroups.end() )
           continue;
         // get group name
         if ( _mapGroups.find( oldID ) == _mapGroups.end() )
           continue;
         // get group name
-        SALOMEDS::SObject_wrap groupSO = _gen_i->ObjectToSObject( study,_mapGroups[oldID] );
+        SALOMEDS::SObject_wrap groupSO = _gen_i->ObjectToSObject( _mapGroups[oldID] );
         CORBA::String_var      name    = groupSO->GetName();
         // update
         SMESH_GroupBase_i*  group_i    = SMESH::DownCast<SMESH_GroupBase_i*>(_mapGroups[oldID] );
         CORBA::String_var      name    = groupSO->GetName();
         // update
         SMESH_GroupBase_i*  group_i    = SMESH::DownCast<SMESH_GroupBase_i*>(_mapGroups[oldID] );
@@ -2328,15 +2301,15 @@ void SMESH_Mesh_i::CheckGeomGroupModif()
   if ( newNbEntities != nbEntities )
   {
     // Add all SObjects with icons to soToUpdateIcons
   if ( newNbEntities != nbEntities )
   {
     // Add all SObjects with icons to soToUpdateIcons
-    soToUpdateIcons.push_back( _gen_i->ObjectToSObject( study, _this() )); // mesh
+    soToUpdateIcons.push_back( _gen_i->ObjectToSObject( _this() )); // mesh
 
     for (map<int, SMESH::SMESH_subMesh_ptr>::iterator i_sm = _mapSubMeshIor.begin();
          i_sm != _mapSubMeshIor.end(); ++i_sm ) // submeshes
 
     for (map<int, SMESH::SMESH_subMesh_ptr>::iterator i_sm = _mapSubMeshIor.begin();
          i_sm != _mapSubMeshIor.end(); ++i_sm ) // submeshes
-      soToUpdateIcons.push_back( _gen_i->ObjectToSObject( study, i_sm->second ));
+      soToUpdateIcons.push_back( _gen_i->ObjectToSObject( i_sm->second ));
 
     for ( map<int, SMESH::SMESH_GroupBase_ptr>::iterator i_gr = _mapGroups.begin();
           i_gr != _mapGroups.end(); ++i_gr ) // groups
 
     for ( map<int, SMESH::SMESH_GroupBase_ptr>::iterator i_gr = _mapGroups.begin();
           i_gr != _mapGroups.end(); ++i_gr ) // groups
-      soToUpdateIcons.push_back( _gen_i->ObjectToSObject( study, i_gr->second ));
+      soToUpdateIcons.push_back( _gen_i->ObjectToSObject( i_gr->second ));
   }
 
   list< SALOMEDS::SObject_wrap >::iterator so = soToUpdateIcons.begin();
   }
 
   list< SALOMEDS::SObject_wrap >::iterator so = soToUpdateIcons.begin();
@@ -2382,10 +2355,10 @@ SMESH::SMESH_Group_ptr SMESH_Mesh_i::ConvertToStandalone( SMESH::SMESH_GroupBase
 
   SALOMEDS::StudyBuilder_var builder;
   SALOMEDS::SObject_wrap     aGroupSO;
 
   SALOMEDS::StudyBuilder_var builder;
   SALOMEDS::SObject_wrap     aGroupSO;
-  SALOMEDS::Study_var        aStudy = _gen_i->GetCurrentStudy();
+  SALOMEDS::Study_var        aStudy = SMESH_Gen_i::getStudyServant();
   if ( !aStudy->_is_nil() ) {
     builder  = aStudy->NewBuilder();
   if ( !aStudy->_is_nil() ) {
     builder  = aStudy->NewBuilder();
-    aGroupSO = _gen_i->ObjectToSObject( aStudy, theGroup );
+    aGroupSO = _gen_i->ObjectToSObject( theGroup );
     if ( !aGroupSO->_is_nil() )
     {
       // remove reference to geometry
     if ( !aGroupSO->_is_nil() )
     {
       // remove reference to geometry
@@ -2706,17 +2679,6 @@ CORBA::Long SMESH_Mesh_i::GetId()throw(SALOME::SALOME_Exception)
   return _id;
 }
 
   return _id;
 }
 
-//=============================================================================
-/*!
- *
- */
-//=============================================================================
-
-CORBA::Long SMESH_Mesh_i::GetStudyId()throw(SALOME::SALOME_Exception)
-{
-  return _studyId;
-}
-
 //=============================================================================
 namespace
 {
 //=============================================================================
 namespace
 {
@@ -2976,9 +2938,9 @@ string SMESH_Mesh_i::prepareMeshNameAndGroups(const char*    file,
   // Perform Export
   PrepareForWriting(file, overwrite);
   string aMeshName = "Mesh";
   // Perform Export
   PrepareForWriting(file, overwrite);
   string aMeshName = "Mesh";
-  SALOMEDS::Study_var aStudy = _gen_i->GetCurrentStudy();
+  SALOMEDS::Study_var aStudy = SMESH_Gen_i::getStudyServant();
   if ( !aStudy->_is_nil() ) {
   if ( !aStudy->_is_nil() ) {
-    SALOMEDS::SObject_wrap aMeshSO = _gen_i->ObjectToSObject( aStudy, _this() );
+    SALOMEDS::SObject_wrap aMeshSO = _gen_i->ObjectToSObject(  _this() );
     if ( !aMeshSO->_is_nil() ) {
       CORBA::String_var name = aMeshSO->GetName();
       aMeshName = name;
     if ( !aMeshSO->_is_nil() ) {
       CORBA::String_var name = aMeshSO->GetName();
       aMeshName = name;
@@ -3151,8 +3113,7 @@ void SMESH_Mesh_i::ExportSTL (const char *file, const bool isascii)
                 << ".ExportSTL( r'" << file << "', " << isascii << " )";
 
   CORBA::String_var name;
                 << ".ExportSTL( r'" << file << "', " << isascii << " )";
 
   CORBA::String_var name;
-  SALOMEDS::Study_var study = _gen_i->GetCurrentStudy();
-  SALOMEDS::SObject_wrap so = _gen_i->ObjectToSObject( study, _this() );
+  SALOMEDS::SObject_wrap so = _gen_i->ObjectToSObject( _this() );
   if ( !so->_is_nil() )
     name = so->GetName();
 
   if ( !so->_is_nil() )
     name = so->GetName();
 
@@ -3234,14 +3195,12 @@ void SMESH_Mesh_i::ExportPartToMED(SMESH::SMESH_IDSource_ptr meshPart,
 
     PrepareForWriting(file, overwrite);
 
 
     PrepareForWriting(file, overwrite);
 
-    SALOMEDS::Study_var aStudy = _gen_i->GetCurrentStudy();
-    if ( !aStudy->_is_nil() ) {
-      SALOMEDS::SObject_wrap SO = _gen_i->ObjectToSObject( aStudy, meshPart );
-      if ( !SO->_is_nil() ) {
-        CORBA::String_var name = SO->GetName();
-        aMeshName = name;
-      }
+    SALOMEDS::SObject_wrap SO = _gen_i->ObjectToSObject( meshPart );
+    if ( !SO->_is_nil() ) {
+      CORBA::String_var name = SO->GetName();
+      aMeshName = name;
     }
     }
+
     SMESH_MeshPartDS* partDS = new SMESH_MeshPartDS( meshPart );
     _impl->ExportMED( file, aMeshName.c_str(), auto_groups,
                       version, partDS, autoDimension, /*addODOnVertices=*/have0dField);
     SMESH_MeshPartDS* partDS = new SMESH_MeshPartDS( meshPart );
     _impl->ExportMED( file, aMeshName.c_str(), auto_groups,
                       version, partDS, autoDimension, /*addODOnVertices=*/have0dField);
@@ -3608,8 +3567,7 @@ void SMESH_Mesh_i::ExportPartToSTL(::SMESH::SMESH_IDSource_ptr meshPart,
   PrepareForWriting(file);
 
   CORBA::String_var name;
   PrepareForWriting(file);
 
   CORBA::String_var name;
-  SALOMEDS::Study_var study = _gen_i->GetCurrentStudy();
-  SALOMEDS::SObject_wrap so = _gen_i->ObjectToSObject( study, meshPart );
+  SALOMEDS::SObject_wrap so = _gen_i->ObjectToSObject( meshPart );
   if ( !so->_is_nil() )
     name = so->GetName();
 
   if ( !so->_is_nil() )
     name = so->GetName();
 
@@ -3639,8 +3597,7 @@ void SMESH_Mesh_i::ExportCGNS(::SMESH::SMESH_IDSource_ptr meshPart,
   PrepareForWriting(file,overwrite);
 
   std::string meshName("");
   PrepareForWriting(file,overwrite);
 
   std::string meshName("");
-  SALOMEDS::Study_var study = _gen_i->GetCurrentStudy();
-  SALOMEDS::SObject_wrap so = _gen_i->ObjectToSObject( study, meshPart );
+  SALOMEDS::SObject_wrap so = _gen_i->ObjectToSObject( meshPart );
   if ( !so->_is_nil() )
   {
     CORBA::String_var name = so->GetName();
   if ( !so->_is_nil() )
   {
     CORBA::String_var name = so->GetName();
@@ -4978,10 +4935,9 @@ SMESH_Mesh_i::MakeGroupsOfBadInputElements( int         theSubShapeID,
         groups[ ++iG ] = createGroup( SMESH::ElementType(i), theGroupName );
         if ( _gen_i->CanPublishInStudy( groups[ iG ] ))
         {
         groups[ ++iG ] = createGroup( SMESH::ElementType(i), theGroupName );
         if ( _gen_i->CanPublishInStudy( groups[ iG ] ))
         {
-          SALOMEDS::Study_var  study = _gen_i->GetCurrentStudy();
           SMESH::SMESH_Mesh_var mesh = _this();
           SALOMEDS::SObject_wrap aSO =
           SMESH::SMESH_Mesh_var mesh = _this();
           SALOMEDS::SObject_wrap aSO =
-            _gen_i->PublishGroup( study, mesh, groups[ iG ],
+            _gen_i->PublishGroup( mesh, groups[ iG ],
                                  GEOM::GEOM_Object::_nil(), theGroupName);
         }
         SMESH_GroupBase_i* grp_i = SMESH::DownCast< SMESH_GroupBase_i* >( groups[ iG ]);
                                  GEOM::GEOM_Object::_nil(), theGroupName);
         }
         SMESH_GroupBase_i* grp_i = SMESH::DownCast< SMESH_GroupBase_i* >( groups[ iG ]);
@@ -5005,7 +4961,6 @@ SMESH_Mesh_i::MakeGroupsOfBadInputElements( int         theSubShapeID,
 
 void SMESH_Mesh_i::CreateGroupServants()
 {
 
 void SMESH_Mesh_i::CreateGroupServants()
 {
-  SALOMEDS::Study_var  aStudy = _gen_i->GetCurrentStudy();
   SMESH::SMESH_Mesh_var aMesh = _this();
 
   set<int> addedIDs;
   SMESH::SMESH_Mesh_var aMesh = _this();
 
   set<int> addedIDs;
@@ -5042,10 +4997,8 @@ void SMESH_Mesh_i::CreateGroupServants()
     else        { nextId = 0; } // avoid "unused variable" warning in release mode
 
     // publishing the groups in the study
     else        { nextId = 0; } // avoid "unused variable" warning in release mode
 
     // publishing the groups in the study
-    if ( !aStudy->_is_nil() ) {
-      GEOM::GEOM_Object_var shapeVar = _gen_i->ShapeToGeomObject( shape );
-      _gen_i->PublishGroup( aStudy, aMesh, groupVar, shapeVar, group->GetName());
-    }
+    GEOM::GEOM_Object_var shapeVar = _gen_i->ShapeToGeomObject( shape );
+    _gen_i->PublishGroup( aMesh, groupVar, shapeVar, group->GetName());
   }
   if ( !addedIDs.empty() )
   {
   }
   if ( !addedIDs.empty() )
   {
@@ -5111,10 +5064,6 @@ void SMESH_Mesh_i::checkGroupNames()
   int nbGrp = NbGroups();
   if ( !nbGrp )
     return;
   int nbGrp = NbGroups();
   if ( !nbGrp )
     return;
-
-  SALOMEDS::Study_var aStudy = _gen_i->GetCurrentStudy();
-  if ( aStudy->_is_nil() )
-    return; // nothing to do
   
   SMESH::ListOfGroups* grpList = 0;
   // avoid dump of "GetGroups"
   
   SMESH::ListOfGroups* grpList = 0;
   // avoid dump of "GetGroups"
@@ -5128,7 +5077,7 @@ void SMESH_Mesh_i::checkGroupNames()
     SMESH::SMESH_GroupBase_ptr aGrp = (*grpList)[ gIndx ];
     if ( !aGrp )
       continue;
     SMESH::SMESH_GroupBase_ptr aGrp = (*grpList)[ gIndx ];
     if ( !aGrp )
       continue;
-    SALOMEDS::SObject_wrap aGrpSO = _gen_i->ObjectToSObject( aStudy, aGrp );
+    SALOMEDS::SObject_wrap aGrpSO = _gen_i->ObjectToSObject( aGrp );
     if ( aGrpSO->_is_nil() )
       continue;
     // correct name of the mesh group if necessary
     if ( aGrpSO->_is_nil() )
       continue;
     // correct name of the mesh group if necessary
@@ -5171,15 +5120,12 @@ SMESH::string_array* SMESH_Mesh_i::GetLastParameters()
   SMESH_Gen_i *gen = SMESH_Gen_i::GetSMESHGen();
   if(gen) {
     CORBA::String_var aParameters = GetParameters();
   SMESH_Gen_i *gen = SMESH_Gen_i::GetSMESHGen();
   if(gen) {
     CORBA::String_var aParameters = GetParameters();
-    SALOMEDS::Study_var    aStudy = gen->GetCurrentStudy();
-    if ( !aStudy->_is_nil()) {
-      SALOMEDS::ListOfListOfStrings_var aSections = aStudy->ParseVariables(aParameters); 
-      if ( aSections->length() > 0 ) {
-        SALOMEDS::ListOfStrings aVars = aSections[ aSections->length() - 1 ];
-        aResult->length( aVars.length() );
-        for ( CORBA::ULong i = 0;i < aVars.length(); i++ )
-          aResult[i] = CORBA::string_dup( aVars[i] );
-      }
+    SALOMEDS::ListOfListOfStrings_var aSections = SMESH_Gen_i::getStudyServant()->ParseVariables(aParameters);
+    if ( aSections->length() > 0 ) {
+      SALOMEDS::ListOfStrings aVars = aSections[ aSections->length() - 1 ];
+      aResult->length( aVars.length() );
+      for ( CORBA::ULong i = 0;i < aVars.length(); i++ )
+        aResult[i] = CORBA::string_dup( aVars[i] );
     }
   }
   return aResult._retn();
     }
   }
   return aResult._retn();
index 62d08763d3e4dac3a7c3aa8514e0e1f3387e57f4..f4c2cf71bd39102befbf3a2443efac78d45f64ea 100644 (file)
@@ -59,8 +59,7 @@ class SMESH_I_EXPORT SMESH_Mesh_i:
   SMESH_Mesh_i(const SMESH_Mesh_i&);
 public:
   SMESH_Mesh_i( PortableServer::POA_ptr thePOA,
   SMESH_Mesh_i(const SMESH_Mesh_i&);
 public:
   SMESH_Mesh_i( PortableServer::POA_ptr thePOA,
-                SMESH_Gen_i*            myGen_i,
-                CORBA::Long             studyId );
+                SMESH_Gen_i*            myGen_i );
 
   virtual ~SMESH_Mesh_i();
 
 
   virtual ~SMESH_Mesh_i();
 
@@ -185,8 +184,6 @@ public:
 
   CORBA::Long GetId() throw (SALOME::SALOME_Exception);
 
 
   CORBA::Long GetId() throw (SALOME::SALOME_Exception);
 
-  CORBA::Long GetStudyId() throw (SALOME::SALOME_Exception);
-
   // --- C++ interface
 
   void SetImpl(::SMESH_Mesh* impl);
   // --- C++ interface
 
   void SetImpl(::SMESH_Mesh* impl);
@@ -703,7 +700,6 @@ private:
   ::SMESH_Mesh* _impl;        // :: force no namespace here
   SMESH_Gen_i*  _gen_i;
   int           _id;          // id given by creator (unique within the creator instance)
   ::SMESH_Mesh* _impl;        // :: force no namespace here
   SMESH_Gen_i*  _gen_i;
   int           _id;          // id given by creator (unique within the creator instance)
-  int           _studyId;
   std::map<int, SMESH::SMESH_subMesh_ptr>    _mapSubMeshIor;
   std::map<int, SMESH::SMESH_GroupBase_ptr>  _mapGroups;
   std::map<int, SMESH::SMESH_Hypothesis_ptr> _mapHypo;
   std::map<int, SMESH::SMESH_subMesh_ptr>    _mapSubMeshIor;
   std::map<int, SMESH::SMESH_GroupBase_ptr>  _mapGroups;
   std::map<int, SMESH::SMESH_Hypothesis_ptr> _mapHypo;
index e4deee310cd1452ca5f53878725df143bdb6ac09..2b282b8d4549110011627dbdd993aa010b16e176 100644 (file)
@@ -707,8 +707,7 @@ void SMESH_NoteBook::ReplaceVariables()
         // dumped calls due to the fix of
         // issue 0021364:: Dump of netgen parameters has duplicate lines
         SMESH_Gen_i *          aGen = SMESH_Gen_i::GetSMESHGen();
         // dumped calls due to the fix of
         // issue 0021364:: Dump of netgen parameters has duplicate lines
         SMESH_Gen_i *          aGen = SMESH_Gen_i::GetSMESHGen();
-        SALOMEDS::Study_var  aStudy = aGen->GetCurrentStudy();
-        SALOMEDS::SObject_wrap sobj = aStudy->FindObjectID( (*it).first.ToCString() );
+        SALOMEDS::SObject_wrap sobj = SMESH_Gen_i::getStudyServant()->FindObjectID( (*it).first.ToCString() );
         CORBA::Object_var       obj = aGen->SObjectToObject( sobj );
         if ( SMESH_Hypothesis_i* h = SMESH::DownCast< SMESH_Hypothesis_i*>( obj ))
         {
         CORBA::Object_var       obj = aGen->SObjectToObject( sobj );
         if ( SMESH_Hypothesis_i* h = SMESH::DownCast< SMESH_Hypothesis_i*>( obj ))
         {
@@ -745,7 +744,7 @@ void SMESH_NoteBook::InitObjectMap()
   if(!aGen)
     return;
   
   if(!aGen)
     return;
   
-  SALOMEDS::Study_var aStudy = aGen->GetCurrentStudy();
+  SALOMEDS::Study_var aStudy = SMESH_Gen_i::getStudyServant();
   if(aStudy->_is_nil())
     return;
   
   if(aStudy->_is_nil())
     return;
   
@@ -954,11 +953,7 @@ bool SMESH_NoteBook::GetReal(const TCollection_AsciiString& theVarName, double&
 {
   bool ok = false;
 
 {
   bool ok = false;
 
-  SMESH_Gen_i *aGen = SMESH_Gen_i::GetSMESHGen();
-  if(!aGen)
-    return ok;
-
-  SALOMEDS::Study_ptr aStudy = aGen->GetCurrentStudy();
+  SALOMEDS::Study_ptr aStudy = SMESH_Gen_i::getStudyServant();
   if(aStudy->_is_nil())
     return ok;
 
   if(aStudy->_is_nil())
     return ok;
 
index 3d8980ff9a3751a9efc1b144ceb9b4ba705bcf1d..e11046e1b4a459a0c4b8e4fc322abfc3ad288378 100644 (file)
@@ -63,8 +63,8 @@ namespace
 {
   enum {  GroupOnFilter_OutOfDate = -1 };
 
 {
   enum {  GroupOnFilter_OutOfDate = -1 };
 
-  // a map to count not yet loaded meshes 
-  static std::map< int, int > theStudyIDToMeshCounter;
+  // count not yet loaded meshes
+  static int theMeshCounter = 0;
 
   //================================================================================
   /*!
 
   //================================================================================
   /*!
@@ -74,9 +74,7 @@ namespace
 
   void meshInfoLoaded( SMESH_Mesh_i* mesh )
   {
 
   void meshInfoLoaded( SMESH_Mesh_i* mesh )
   {
-    std::map< int, int >::iterator id2counter =
-      theStudyIDToMeshCounter.insert( std::make_pair( (int) mesh->GetStudyId(), 0 )).first;
-    id2counter->second++;
+    theMeshCounter++;
   }
   //================================================================================
   /*!
   }
   //================================================================================
   /*!
@@ -88,18 +86,18 @@ namespace
                          std::string   medFile,
                          std::string   hdfFile)
   {
                          std::string   medFile,
                          std::string   hdfFile)
   {
-    if ( --theStudyIDToMeshCounter[ (int) mesh->GetStudyId() ] == 0 )
+    if ( --theMeshCounter == 0 )
     {
       std::string tmpDir = SALOMEDS_Tool::GetDirFromPath( hdfFile );
 
     {
       std::string tmpDir = SALOMEDS_Tool::GetDirFromPath( hdfFile );
 
-      SALOMEDS::ListOfFileNames_var aFiles = new SALOMEDS::ListOfFileNames;
-      aFiles->length(2);
+      SALOMEDS_Tool::ListOfFiles aFiles;
+      aFiles.reserve(2);
       medFile = SALOMEDS_Tool::GetNameFromPath( medFile ) + ".med";
       hdfFile = SALOMEDS_Tool::GetNameFromPath( hdfFile ) + ".hdf";
       medFile = SALOMEDS_Tool::GetNameFromPath( medFile ) + ".med";
       hdfFile = SALOMEDS_Tool::GetNameFromPath( hdfFile ) + ".hdf";
-      aFiles[0] = medFile.c_str();
-      aFiles[1] = hdfFile.c_str();
+      aFiles.push_back(medFile.c_str());
+      aFiles.push_back(hdfFile.c_str());
 
 
-      SALOMEDS_Tool::RemoveTemporaryFiles( tmpDir.c_str(), aFiles.in(), true );
+      SALOMEDS_Tool::RemoveTemporaryFiles( tmpDir.c_str(), aFiles, true );
     }
   }
 
     }
   }
 
@@ -117,25 +115,22 @@ namespace
     SignalToGUI( SMESH_Mesh_i* mesh )
     {
       SMESH_Gen_i* gen = SMESH_Gen_i::GetSMESHGen();
     SignalToGUI( SMESH_Mesh_i* mesh )
     {
       SMESH_Gen_i* gen = SMESH_Gen_i::GetSMESHGen();
-      SALOMEDS::Study_var study = gen->GetCurrentStudy();
-      if ( !study->_is_nil() && study->StudyId() == mesh->GetStudyId() )
+
+      SALOMEDS::SObject_wrap meshSO = gen->ObjectToSObject( mesh->_this() );
+      CORBA::Object_var        obj = gen->GetNS()->Resolve( "/Kernel/Session" );
+      _session = SALOME::Session::_narrow( obj );
+      if ( !meshSO->_is_nil() && !_session->_is_nil() )
       {
       {
-        SALOMEDS::SObject_wrap meshSO = gen->ObjectToSObject(study, mesh->_this() );
-        CORBA::Object_var        obj = gen->GetNS()->Resolve( "/Kernel/Session" );
-        _session = SALOME::Session::_narrow( obj );
-        if ( !meshSO->_is_nil() && !_session->_is_nil() )
-        {
-          CORBA::String_var meshEntry = meshSO->GetID();
-          _messagePrefix = "SMESH/mesh_loading/";
-          _messagePrefix += meshEntry.in();
+        CORBA::String_var meshEntry = meshSO->GetID();
+        _messagePrefix = "SMESH/mesh_loading/";
+        _messagePrefix += meshEntry.in();
 
 
-          std::string msgToGUI = _messagePrefix + "/";
-          msgToGUI += SMESH_Comment( mesh->NbNodes() );
-          msgToGUI += "/";
-          msgToGUI += SMESH_Comment( mesh->NbElements() );
+        std::string msgToGUI = _messagePrefix + "/";
+        msgToGUI += SMESH_Comment( mesh->NbNodes() );
+        msgToGUI += "/";
+        msgToGUI += SMESH_Comment( mesh->NbElements() );
 
 
-          _session->emitMessageOneWay( msgToGUI.c_str());
-        }
+        _session->emitMessageOneWay( msgToGUI.c_str());
       }
     }
     void sendStop()
       }
     }
     void sendStop()
@@ -1225,10 +1220,9 @@ bool SMESH_PreMeshInfo::IsMeshInfoCorrect() const
 
 void SMESH_PreMeshInfo::RemoveStudyFiles_TMP_METHOD(SALOMEDS::SComponent_ptr smeshComp)
 {
 
 void SMESH_PreMeshInfo::RemoveStudyFiles_TMP_METHOD(SALOMEDS::SComponent_ptr smeshComp)
 {
-  SALOMEDS::Study_var study = smeshComp->GetStudy();
-  if ( theStudyIDToMeshCounter[ (int) study->StudyId() ] > 0 )
+  if ( theMeshCounter > 0 )
   {
   {
-    SALOMEDS::ChildIterator_wrap itBig = study->NewChildIterator( smeshComp );
+    SALOMEDS::ChildIterator_wrap itBig = SMESH_Gen_i::getStudyServant()->NewChildIterator( smeshComp );
     for ( ; itBig->More(); itBig->Next() ) {
       SALOMEDS::SObject_wrap gotBranch = itBig->Value();
       CORBA::Object_var       anObject = SMESH_Gen_i::SObjectToObject( gotBranch );
     for ( ; itBig->More(); itBig->Next() ) {
       SALOMEDS::SObject_wrap gotBranch = itBig->Value();
       CORBA::Object_var       anObject = SMESH_Gen_i::SObjectToObject( gotBranch );
index 52baab3035244f082942031af4abba8771853635..f4ea8834461768ace7701a5391f50a070d2c4d9c 100644 (file)
@@ -69,7 +69,6 @@ public:
                 Resource_DataMapOfAsciiStringAsciiString& theEntry2AccessorMethod,
                 Resource_DataMapOfAsciiStringAsciiString& theObjectNames,
                 std::set< TCollection_AsciiString >&      theRemovedObjIDs,
                 Resource_DataMapOfAsciiStringAsciiString& theEntry2AccessorMethod,
                 Resource_DataMapOfAsciiStringAsciiString& theObjectNames,
                 std::set< TCollection_AsciiString >&      theRemovedObjIDs,
-                SALOMEDS::Study_ptr&                      theStudy,
                 const bool                                theHistoricalDump);
 
   /*!
                 const bool                                theHistoricalDump);
 
   /*!
index 3d407f85bacfcf9014f805b768a522f8ff1d27d1..33f0d7b1aa6cf0a67456392e0a0d75cceb06f34f 100644 (file)
@@ -77,12 +77,12 @@ class SMeshStudyTools:
 
     ## This function updates the tools so that it works on the
     #  specified study.
 
     ## This function updates the tools so that it works on the
     #  specified study.
-    def updateStudy(self, studyId=None):
+    def updateStudy(self):
         """
         This function updates the tools so that it works on the
         specified study.
         """
         """
         This function updates the tools so that it works on the
         specified study.
         """
-        self.editor = getStudyEditor(studyId)
+        self.editor = getStudyEditor()
 
     ## Get the mesh item owning the mesh group \em meshGroupItem.
     #  \param  meshGroupItem (SObject) mesh group belonging to the searched mesh.
 
     ## Get the mesh item owning the mesh group \em meshGroupItem.
     #  \param  meshGroupItem (SObject) mesh group belonging to the searched mesh.
@@ -125,7 +125,7 @@ class SMeshStudyTools:
             return None
         import SMESH
         from salome.smesh import smeshBuilder
             return None
         import SMESH
         from salome.smesh import smeshBuilder
-        smesh = smeshBuilder.New(self.editor.study)
+        smesh = smeshBuilder.New()
 
         meshObject=salome.IDToObject(entry)
         return smesh.Mesh( meshObject )
 
         meshObject=salome.IDToObject(entry)
         return smesh.Mesh( meshObject )
@@ -183,17 +183,16 @@ class SMeshStudyTools:
 
 
 def TEST_createBoxMesh():
 
 
 def TEST_createBoxMesh():
-    theStudy = helper.getActiveStudy()
     
     import GEOM
     from salome.geom import geomBuilder
     
     import GEOM
     from salome.geom import geomBuilder
-    geompy = geomBuilder.New(theStudy)
+    geompy = geomBuilder.New()
     
     box = geompy.MakeBoxDXDYDZ(200, 200, 200)
 
     import SMESH, SALOMEDS
     from salome.smesh import smeshBuilder
     
     box = geompy.MakeBoxDXDYDZ(200, 200, 200)
 
     import SMESH, SALOMEDS
     from salome.smesh import smeshBuilder
-    smesh = smeshBuilder.New(theStudy
+    smesh = smeshBuilder.New() 
 
     from salome.StdMeshers import StdMeshersBuilder
     boxmesh = smesh.Mesh(box)
 
     from salome.StdMeshers import StdMeshersBuilder
     boxmesh = smesh.Mesh(box)
@@ -207,7 +206,7 @@ def TEST_createBoxMesh():
 
     smesh.SetName(boxmesh.GetMesh(), 'boxmesh')
     if salome.sg.hasDesktop():
 
     smesh.SetName(boxmesh.GetMesh(), 'boxmesh')
     if salome.sg.hasDesktop():
-        salome.sg.updateObjBrowser(True)
+        salome.sg.updateObjBrowser()
 
 #
 # Definitions:
 
 #
 # Definitions:
index 67f0ba76d2db48cbbee9b419a5462aed508c04e3..86dc130030f23ac57c5443e11380fc9bae3065fa 100755 (executable)
@@ -25,11 +25,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 
 #-----------------------------GEOM----------------------------------------
 
 
 #-----------------------------GEOM----------------------------------------
@@ -103,5 +103,5 @@ print "---------------------Compute the mesh"
 ret = mesh.Compute()
 print ret
 
 ret = mesh.Compute()
 print ret
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
 
 
index a627b543cc78cc65d85e0c99c40f1b6cfc07c663..4f7866cb6f932ce82ff458d85ab847911d54dee2 100755 (executable)
@@ -29,11 +29,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 
 #----------------------------------GEOM
 
 
 #----------------------------------GEOM
@@ -81,4 +81,4 @@ mesh2.Compute()
 
 
 # ---- udate object browser
 
 
 # ---- udate object browser
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 5611f172ed11b6935059ba31a4c66a0bd1fe153b..2485546461c8ce4816fd17e3cd95554949fb1226 100755 (executable)
@@ -29,11 +29,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 
 # create points to build two circles
 
 
 # create points to build two circles
@@ -90,4 +90,4 @@ mesh1.Compute()
 mesh2.Compute()
 
 # ---- update object browser
 mesh2.Compute()
 
 # ---- update object browser
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 7d2ee5a0955f0e9463d71e24fab1bbbd51c78d93..5112ec70aa53340656de6caee56de5f115ef2056 100644 (file)
@@ -25,11 +25,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 import math
 
 
 import math
 
@@ -217,4 +217,4 @@ for i in range(0,nbrs):
     oldnodes = newnodes
     pass
 
     oldnodes = newnodes
     pass
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index cc25ccda9d7af3dbb5f8bcf8a12f679f4f4ffe8b..953ac62f44080192d63b1a9cfde90027b0de6e5c 100644 (file)
@@ -63,4 +63,4 @@ print "anIds = ", anIds
 #anIds = CheckBelongToGeomFilterOld(smesh,mesh.GetMesh(),box,box,anElemType)
 #print "anIds = ", anIds
 
 #anIds = CheckBelongToGeomFilterOld(smesh,mesh.GetMesh(),box,box,anElemType)
 #print "anIds = ", anIds
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 4a197353f142083b2f1e422d601a5a83b501cb60..d6b8ec64b5926a14915d074959d29196a0e8a333 100644 (file)
@@ -31,11 +31,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 ## create a bottom box
 Box_inf = geompy.MakeBox(0., 0., 0., 200., 200., 50.)
 
 ## create a bottom box
 Box_inf = geompy.MakeBox(0., 0., 0., 200., 200., 50.)
@@ -104,4 +104,4 @@ Compound2 = smesh.Concatenate([Mesh_inf.GetMesh(), Mesh_sup.GetMesh()], 1, 0, 1e
 smesh.SetName(Compound2, 'Compound_with_UniteGrps_and_GrpsOfAllElems')
 #end
 
 smesh.SetName(Compound2, 'Compound_with_UniteGrps_and_GrpsOfAllElems')
 #end
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index b0e936b19b7afb223153382a5f2b0a052740889a..4383ab44790b8292afc1285cc5fb0b6f8d12202a 100644 (file)
@@ -47,4 +47,4 @@ geompy.addToStudy(aGeomGroup2, "Group on Edges")
 aSmeshGroup1 = mesh.GroupOnGeom(aGeomGroup1, "SMESHGroup1", SMESH.FACE)
 aSmeshGroup2 = mesh.GroupOnGeom(aGeomGroup2, "SMESHGroup2", SMESH.EDGE)
 
 aSmeshGroup1 = mesh.GroupOnGeom(aGeomGroup1, "SMESHGroup1", SMESH.FACE)
 aSmeshGroup2 = mesh.GroupOnGeom(aGeomGroup2, "SMESHGroup2", SMESH.EDGE)
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 498235198a9ff4316916f83cbed5612832941daa..324ca1d10b997706458ab2e1598e0a0f4ef60492 100755 (executable)
@@ -74,4 +74,4 @@ mesh.Compute()
 print "aGroupOnShell size =", aGroupOnShell.Size()
 print "aGroupOnShell ids :", aGroupOnShell.GetListOfID()
 
 print "aGroupOnShell size =", aGroupOnShell.Size()
 print "aGroupOnShell ids :", aGroupOnShell.GetListOfID()
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 4d7f05901b0b64d63379d94587c98facc5429fc7..f0e56293d43456aef9f2ca08550437efcf0f21ed 100644 (file)
@@ -47,4 +47,4 @@ BuildGroupLyingOn(mesh.GetMesh(), SMESH.FACE, "Group of faces lying on edge #1",
 # Second way
 mesh.MakeGroup("Group of faces lying on edge #2", SMESH.FACE, SMESH.FT_LyingOnGeom, edge)
 
 # Second way
 mesh.MakeGroup("Group of faces lying on edge #2", SMESH.FACE, SMESH.FT_LyingOnGeom, edge)
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 3e27b57ce9bf61c20ce2c6b4cd44cf97a7a10fa3..293a62390f611909bdd59a108af67c6a70449ff3 100755 (executable)
@@ -30,11 +30,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 import os
 import math
 
 import os
 import math
@@ -158,4 +158,4 @@ print "Number of quadrangles : ", mesh.NbQuadrangles()
 print "Number of volumes     : ", mesh.NbVolumes()
 print "Number of tetrahedrons: ", mesh.NbTetras()
 
 print "Number of volumes     : ", mesh.NbVolumes()
 print "Number of tetrahedrons: ", mesh.NbTetras()
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index aee34bb7eb4744debae0ed718d9daa961e1be84d..0b6667fe4b2c80dd61559f959b68c88daacf3ca5 100644 (file)
@@ -29,11 +29,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 from math import sqrt
 
 
 from math import sqrt
 
@@ -43,7 +43,7 @@ from math import sqrt
 barier_height = 7.0
 barier_radius = 5.6 / 2 # Rayon de la bariere
 colis_radius = 1.0 / 2  # Rayon du colis
 barier_height = 7.0
 barier_radius = 5.6 / 2 # Rayon de la bariere
 colis_radius = 1.0 / 2  # Rayon du colis
-colis_step = 2.0        # Distance s\89parant deux colis
+colis_step = 2.0        # Distance s�parant deux colis
 cc_width = 0.11         # Epaisseur du complement de colisage
 
 # --
 cc_width = 0.11         # Epaisseur du complement de colisage
 
 # --
@@ -184,4 +184,4 @@ if ret != 0:
 else:
     print "problem when computing the mesh"
 
 else:
     print "problem when computing the mesh"
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index faadf285e73105204d0242a298bab114e9cd1929..be5e1e24e727528776d14ca1659d28ce129f9b68 100644 (file)
@@ -31,11 +31,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 import math
 
 
 import math
 
@@ -118,4 +118,4 @@ my_hexa.Quadrangle()
 my_hexa.Hexahedron()
 my_hexa.Compute()
 
 my_hexa.Hexahedron()
 my_hexa.Compute()
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index b8a4707e33ade879b411df1acbe2bed645f4a1b3..4d25b4a968c5f50fcbd3aab255de69bd149b2509 100644 (file)
@@ -31,11 +31,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 import math
 
 
 import math
 
@@ -46,4 +46,4 @@ isMeshTest   = 1 # True
 
 GEOM_Spanner.MakeSpanner(geompy, math, isBlocksTest, isMeshTest, smesh)
 
 
 GEOM_Spanner.MakeSpanner(geompy, math, isBlocksTest, isMeshTest, smesh)
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 1d486f24a5f1c8efdb1687bb94dbd2f0e9600166..e7a8947264932abefe3e8d95b1336fd4c2aeab6c 100755 (executable)
@@ -34,11 +34,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 from salome import sg
 
 
 from salome import sg
 
@@ -70,4 +70,4 @@ alg3D.SetName("algo3D")
 
 box_mesh.Compute()
 
 
 box_mesh.Compute()
 
-sg.updateObjBrowser(True)
+sg.updateObjBrowser()
index 6bba8e16502c03fe95aca0aa16d4b33d338fe5f5..6d137e9d8435a8680f1302b14ee8f2ce3fd765d1 100644 (file)
@@ -28,11 +28,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 
 # ---- define 2 boxes box1 and box2
 
 
 # ---- define 2 boxes box1 and box2
@@ -138,4 +138,4 @@ if ret != 0:
 else:
     print "probleme when computing the mesh"
 
 else:
     print "probleme when computing the mesh"
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 6121df448b78d776151cffe1e7fc85196bc1c091..2fa39e644c894b08c0df87f47cabafaff5b9f283 100644 (file)
@@ -29,11 +29,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # ---- define 3 boxes box1, box2 and box3
 
 
 # ---- define 3 boxes box1, box2 and box3
 
@@ -148,4 +148,4 @@ if ret != 0:
 else:
     print "probleme when computing the mesh"
 
 else:
     print "probleme when computing the mesh"
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 4938de61eae577f5ed11bd78fac4e2916cef352e..61538ebf89f30c0a9729dda76f4d5253bcc9f7eb 100644 (file)
@@ -28,11 +28,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # ---- define a boxe
 
 
 # ---- define a boxe
 
@@ -107,4 +107,4 @@ if ret != 0:
 else:
     print "probleme when computing the mesh"
 
 else:
     print "probleme when computing the mesh"
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index dfefee94cb1c4d6fcf07265435d56b37b82aa169..a1d04d21debc762f77749465fbdbd547ecd8279a 100644 (file)
@@ -30,7 +30,7 @@ import SMESH_mechanic
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 mesh = SMESH_mechanic.mesh
 
 # ---- Criterion : AREA > 100
 mesh = SMESH_mechanic.mesh
 
 # ---- Criterion : AREA > 100
@@ -141,4 +141,4 @@ print "Criterion: Element Diameter 2D > 10 Nb = ", len( anIds )
   #print anIds[ i ]
 
 
   #print anIds[ i ]
 
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index ef6ea57c1dc63563aac531a19e54d223e15b7327..9629def074057b6cf510f11bfc5aaa8919cf70b0 100755 (executable)
@@ -36,11 +36,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 import math
 
 
 import math
 
@@ -131,7 +131,7 @@ for i in range(8):
     idEdgeZ.append(geompy.addToStudyInFather(vol,edgeZ[i],"EdgeZ"+str(i+1)))
 
 ### ---------------------------- SMESH --------------------------------------
     idEdgeZ.append(geompy.addToStudyInFather(vol,edgeZ[i],"EdgeZ"+str(i+1)))
 
 ### ---------------------------- SMESH --------------------------------------
-smesh.SetCurrentStudy(salome.myStudy)
+smesh.UpdateStudy()
 
 # ---- init a Mesh with the volume
 
 
 # ---- init a Mesh with the volume
 
@@ -176,7 +176,7 @@ for i in range(8):
     smesh.SetName(algo.GetSubMesh(), "SubMeshEdgeZ_"+str(i+1))
   
 
     smesh.SetName(algo.GetSubMesh(), "SubMeshEdgeZ_"+str(i+1))
   
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
 
 print "-------------------------- compute the mesh of the volume"
 
 
 print "-------------------------- compute the mesh of the volume"
 
@@ -197,4 +197,4 @@ if ret != 0:
 else:
     print "problem when Computing the mesh"
 
 else:
     print "problem when Computing the mesh"
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 6462381c2aefc89f574d6a28d66ca895251aec47..b4a4f72244291ad4b164e37452c5d3e275b91dfb 100644 (file)
@@ -30,7 +30,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import math
 
 
 import math
 
index 7d9245c3b5f908379f52129fed7dcb0f284fbde5..0f464cf4259c10df0c3a05d41b8f025daa30f794 100644 (file)
@@ -30,7 +30,7 @@ import SMESH_fixation
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 compshell = SMESH_fixation.compshell
 idcomp = SMESH_fixation.idcomp
 
 compshell = SMESH_fixation.compshell
 idcomp = SMESH_fixation.idcomp
@@ -50,7 +50,7 @@ status = geompy.CheckShape(compshell)
 print " check status ", status
 
 ### ---------------------------- SMESH --------------------------------------
 print " check status ", status
 
 ### ---------------------------- SMESH --------------------------------------
-smesh.SetCurrentStudy(salome.myStudy)
+smesh.UpdateStudy()
 
 # ---- init a Mesh with the compshell
 shape_mesh = salome.IDToObject( idcomp  )
 
 # ---- init a Mesh with the compshell
 shape_mesh = salome.IDToObject( idcomp  )
@@ -99,4 +99,4 @@ if ret != 0:
 else:
     print "problem when Computing the mesh"
 
 else:
     print "problem when Computing the mesh"
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index ed2c999f4f64480be14a3da4721f4e426ee7b8ac..fbcbc1a18a808d3922d1bc887a8c5679b6c16391 100644 (file)
@@ -30,7 +30,7 @@ import SMESH_fixation
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 compshell = SMESH_fixation.compshell
 idcomp = SMESH_fixation.idcomp
 
 compshell = SMESH_fixation.compshell
 idcomp = SMESH_fixation.idcomp
@@ -50,7 +50,7 @@ status = geompy.CheckShape(compshell)
 print " check status ", status
 
 ### ---------------------------- SMESH --------------------------------------
 print " check status ", status
 
 ### ---------------------------- SMESH --------------------------------------
-smesh.SetCurrentStudy(salome.myStudy)
+smesh.UpdateStudy()
 
 print "-------------------------- create Mesh, algorithm, hypothesis"
 
 
 print "-------------------------- create Mesh, algorithm, hypothesis"
 
@@ -76,4 +76,4 @@ if ret != 0:
 else:
     print "problem when computing the mesh"
 
 else:
     print "problem when computing the mesh"
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 4f578dd0168d1048621624226c4d03d9de4d45bd..dd661d969728a84989950b02bdbe6ccc7aa53d15 100644 (file)
@@ -30,7 +30,7 @@ import SMESH_fixation
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 compshell = SMESH_fixation.compshell
 idcomp = SMESH_fixation.idcomp
 
 compshell = SMESH_fixation.compshell
 idcomp = SMESH_fixation.idcomp
@@ -50,7 +50,7 @@ status = geompy.CheckShape(compshell)
 print " check status ", status
 
 ### ---------------------------- SMESH --------------------------------------
 print " check status ", status
 
 ### ---------------------------- SMESH --------------------------------------
-smesh.SetCurrentStudy(salome.myStudy)
+smesh.UpdateStudy()
 
 # ---- init a Mesh with the compshell
 
 
 # ---- init a Mesh with the compshell
 
@@ -123,4 +123,4 @@ if ret != 0:
 else:
     print "problem when computing the mesh"
 
 else:
     print "problem when computing the mesh"
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 44ca46630e65ef8143cc7c3fbcb535a871c86c7d..122ebabfda8c21b2d566350b53955302ecf22f3d 100644 (file)
@@ -29,11 +29,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 
 # ---------------------------- GEOM --------------------------------------
 
 
 # ---------------------------- GEOM --------------------------------------
@@ -62,7 +62,7 @@ print "number of Edges  in flight : ", len(subEdgeList)
 
 
 ### ---------------------------- SMESH --------------------------------------
 
 
 ### ---------------------------- SMESH --------------------------------------
-smesh.SetCurrentStudy(salome.myStudy)
+smesh.UpdateStudy()
 
 # ---- init a Mesh with the shell
 shape_mesh = salome.IDToObject( idShape )
 
 # ---- init a Mesh with the shell
 shape_mesh = salome.IDToObject( idShape )
@@ -107,4 +107,4 @@ if ret != 0:
 else:
     print "probleme when computing the mesh"
 
 else:
     print "probleme when computing the mesh"
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 7bd4f3a83dcb675d29a79b5e6e96c4bbffe7c93c..a45499144065e1caaac85d520033fd9bc3037536 100644 (file)
@@ -25,11 +25,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 
 # Create box without one plane
 
 
 # Create box without one plane
@@ -48,7 +48,7 @@ idbox = geompy.addToStudy( aBox, "box" )
 aBox  = salome.IDToObject( idbox )
 
 # Create mesh
 aBox  = salome.IDToObject( idbox )
 
 # Create mesh
-smesh.SetCurrentStudy(salome.myStudy)
+smesh.UpdateStudy()
 
 mesh = smesh.Mesh(aBox, "Mesh_freebord")
 
 
 mesh = smesh.Mesh(aBox, "Mesh_freebord")
 
@@ -75,4 +75,4 @@ print "Criterion: Free edges Nb = ", len( anIds )
 for i in range( len( anIds ) ):
   print anIds[ i ]
 
 for i in range( len( anIds ) ):
   print anIds[ i ]
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index a2dd15b9361e916a348f19a3d21b5274fcb94259..6a215780a7b9c1b1135fe343be66c76ab5938e08 100755 (executable)
@@ -24,11 +24,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # -----------------------------------------------------------------------------
 
 
 # -----------------------------------------------------------------------------
 
@@ -58,12 +58,12 @@ idblob = geompy.addToStudy(blob,"blob")
 edgeGroups = geompy.Propagate( blob )
 assert len( edgeGroups ) == 3
 
 edgeGroups = geompy.Propagate( blob )
 assert len( edgeGroups ) == 3
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
 
 # -----------------------------------------------------------------------------
 
 print "-------------------------- mesh"
 
 # -----------------------------------------------------------------------------
 
 print "-------------------------- mesh"
-smesh.SetCurrentStudy(salome.myStudy)
+smesh.UpdateStudy()
 
 # ---- define a mesh on the geom shape 'blob'
 mesh=smesh.Mesh(blob, "MeshBlob")
 
 # ---- define a mesh on the geom shape 'blob'
 mesh=smesh.Mesh(blob, "MeshBlob")
@@ -98,4 +98,4 @@ if ok:
 else:
     print "problem when Computing the mesh"
 
 else:
     print "problem when Computing the mesh"
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index b0445358183578336d58a4b047433b1f82fd6796..e2ba044c4c52d8efec8ef5a6bcfe9077196737d7 100644 (file)
@@ -31,11 +31,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 from salome.StdMeshers import StdMeshersBuilder
 
 
 from salome.StdMeshers import StdMeshersBuilder
 
@@ -127,7 +127,7 @@ name      = geompy.SubShapeName( sub_face4, mechanic )
 Id_SubFace4 = geompy.addToStudyInFather( mechanic, sub_face4, name )
 
 # ---------------------------- SMESH --------------------------------------
 Id_SubFace4 = geompy.addToStudyInFather( mechanic, sub_face4, name )
 
 # ---------------------------- SMESH --------------------------------------
-smesh.SetCurrentStudy(salome.myStudy)
+smesh.UpdateStudy()
 
 # -- Init --
 shape_mesh = salome.IDToObject( Id_mechanic )
 
 # -- Init --
 shape_mesh = salome.IDToObject( Id_mechanic )
@@ -188,4 +188,4 @@ print "Number of quadrangles : ", mesh.NbQuadrangles()
 print "Number of volumes     : ", mesh.NbVolumes()
 print "Number of tetrahedrons: ", mesh.NbTetras()
 
 print "Number of volumes     : ", mesh.NbVolumes()
 print "Number of tetrahedrons: ", mesh.NbTetras()
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index bb340bc9530e72ffa26c1cbe75f5b1150ef7cdcd..741fc38eae4c2c48d56ebe5a1befc1473fbaa56a 100644 (file)
@@ -31,11 +31,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # ---------------------------- GEOM --------------------------------------
 
 
 # ---------------------------- GEOM --------------------------------------
 
@@ -234,4 +234,4 @@ mesh.RotationSweepObject(GroupRotate, axisXYZ, angle45, 4, 1e-5)
 #9 reorientation of the submesh1
 mesh.ReorientObject(submesh1)
 
 #9 reorientation of the submesh1
 mesh.ReorientObject(submesh1)
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 326348b7cc43f1dcf643c4a46be3c0c0576284e3..e824149e89800dbd21f67119d2e830e052583032 100644 (file)
@@ -29,11 +29,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # ---------------------------- GEOM --------------------------------------
 
 
 # ---------------------------- GEOM --------------------------------------
 
@@ -135,4 +135,4 @@ if ret != 0:
 else:
     print "problem when computing the mesh"
 
 else:
     print "problem when computing the mesh"
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 18925dac7983059753770d4ddd1d08ce7e49f172..815ad0d90f0b513411afe9e7548eff0af91c2097 100644 (file)
@@ -30,11 +30,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # ---------------------------- GEOM --------------------------------------
 
 
 # ---------------------------- GEOM --------------------------------------
 
@@ -158,4 +158,4 @@ print "Number of quadrangles: ", mesh.NbQuadrangles()
 print "Number of volumes     : ", mesh.NbVolumes()
 print "Number of tetrahedrons: ", mesh.NbTetras()
 
 print "Number of volumes     : ", mesh.NbVolumes()
 print "Number of tetrahedrons: ", mesh.NbTetras()
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 1ce3e6cbaa2b3b8fb5a0a4d82c96e99d594b95cf..3b852193b77d46e4287a87dc85befaedfc7cd5a8 100644 (file)
@@ -28,11 +28,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 from salome.StdMeshers import StdMeshersBuilder
 
 
 from salome.StdMeshers import StdMeshersBuilder
 
@@ -60,12 +60,12 @@ for f in subShapeList:
   print name
   idedge.append( geompy.addToStudyInFather(box, f, name) )
 
   print name
   idedge.append( geompy.addToStudyInFather(box, f, name) )
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
 
 # ---- launch SMESH
 smeshgui = salome.ImportComponentGUI("SMESH")
 
 # ---- launch SMESH
 smeshgui = salome.ImportComponentGUI("SMESH")
-smeshgui.Init(salome.myStudyId)
-smesh.SetCurrentStudy(salome.myStudy)
+smeshgui.Init()
+smesh.UpdateStudy()
 
 # ---- Creating meshes
 
 
 # ---- Creating meshes
 
@@ -115,5 +115,5 @@ algo = mesh.Triangle()
 algo.MaxElementArea(2500)
 
 
 algo.MaxElementArea(2500)
 
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
 
 
index 9b40d719444a1035a092c8b698bfe7ba23be452b..e8e6f4d1ae574d99e864f1439324f6bdee28e755 100644 (file)
@@ -29,11 +29,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # ---- define a box
 
 
 # ---- define a box
 
@@ -63,7 +63,7 @@ ide = geompy.addToStudyInFather(face, edge, name)
 
 # ---- SMESH
 
 
 # ---- SMESH
 
-smesh.SetCurrentStudy(salome.myStudy)
+smesh.UpdateStudy()
 box = salome.IDToObject(idb)
 mesh = smesh.Mesh(box, "Meshbox")
 
 box = salome.IDToObject(idb)
 mesh = smesh.Mesh(box, "Meshbox")
 
@@ -147,4 +147,4 @@ for a in log:
             ii = ii+1
             print "AddTriangle %i - %i %i %i" % (ind, i1, i2, i3)
 
             ii = ii+1
             print "AddTriangle %i - %i %i %i" % (ind, i1, i2, i3)
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 23339f35ffb226671884e268b7ff734945790f40..625eaafb550d112eae1007317e443a140cc241d7 100644 (file)
@@ -28,11 +28,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # ---- define a box
 
 
 # ---- define a box
 
@@ -63,4 +63,4 @@ name = geompy.SubShapeName(edge, face)
 print name
 idedge = geompy.addToStudyInFather(face, edge, name)
 
 print name
 idedge = geompy.addToStudyInFather(face, edge, name)
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index ffc08c680a0d7d3568709659562b05fa9b4cd13a..bbd3576db3b4518a9c95391362cbc1015e14f8e2 100644 (file)
@@ -28,11 +28,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # ---- define a box
 
 
 # ---- define a box
 
@@ -110,4 +110,4 @@ print hypArea2.GetMaxElementArea()
 smesh.SetName(hypArea2, "MaxElementArea_500")
 
 
 smesh.SetName(hypArea2, "MaxElementArea_500")
 
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 0c510a12925ecee5c85618737c8b3eeba0061895..97ac108267b64832e7ebd2e9586fc85e5639a468 100644 (file)
@@ -28,11 +28,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # ---- define a box
 
 
 # ---- define a box
 
@@ -111,7 +111,7 @@ smesh.SetName(hypArea2, "MaxElementArea_500")
 
 mesh.Compute()
 
 
 mesh.Compute()
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
 
 sg = salome.ImportComponentGUI('SMESH')
 if type(sg) != type(salome.salome_ComponentGUI):
 
 sg = salome.ImportComponentGUI('SMESH')
 if type(sg) != type(salome.salome_ComponentGUI):
index c7dc5b14a6802f6817b52b8a2734683d24256ab8..092cf447d6ceb1e7ae9999e670bec9a03aa5b81f 100644 (file)
@@ -35,4 +35,4 @@ log = mesh.GetLog(0); # no erase trace
 for linelog in log:
     print linelog
 
 for linelog in log:
     print linelog
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index e5209554718ddf37d5bacbadbcaccd522c154ad8..5f9e9c615334b7f8c6d2480cc513645acf6a36dc 100644 (file)
@@ -29,11 +29,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 import math
 
 pi = math.pi
 import math
 
 pi = math.pi
index 6467319a6c6213164c96481e4913b4a6433556b4..c0377cc97c7b83095569b5a69bb872d541e87b1f 100755 (executable)
@@ -25,11 +25,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 
 # ---- GEOM
 
 
 # ---- GEOM
@@ -47,7 +47,7 @@ face = salome.IDToObject(idface)
 
 # ---- SMESH
 
 
 # ---- SMESH
 
-smesh.SetCurrentStudy(salome.myStudy)
+smesh.UpdateStudy()
 mesh = smesh.Mesh(box, "Meshbox")
 
 # Set 1D algorithm/hypotheses to mesh
 mesh = smesh.Mesh(box, "Meshbox")
 
 # Set 1D algorithm/hypotheses to mesh
@@ -77,4 +77,4 @@ if len(faces) > 1:
     group1.Add(faces[:int(len(faces)/2)])
     group2.Add(faces[int(len(faces)/2):])
 
     group1.Add(faces[:int(len(faces)/2)])
     group2.Add(faces[int(len(faces)/2):])
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 0464598cc49f9a684bbde93bec25af1de100e62a..d42b734146a4b9f5e6b4df031ff2ea26388e8958 100644 (file)
@@ -28,11 +28,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 import CORBA
 import os
 
 import CORBA
 import os
@@ -81,4 +81,4 @@ for iFile in range(len(aListDir)) :
         ConvertMED2UNV(aPath,aFileName)
         #break
 
         ConvertMED2UNV(aPath,aFileName)
         #break
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 4fef40fab884171b624d58acd2f477d1db1fa34e..e04d431c22f0b32b53a19b21db88980fafc8abde 100644 (file)
@@ -992,10 +992,9 @@ class StdMeshersBuilder_Prism3D(Mesh_Algorithm):
         if not self.nbLayers is None:
             self.mesh.GetMesh().RemoveHypothesis( self.geom, self.nbLayers )
             self.mesh.GetMesh().AddHypothesis( self.geom, self.distribHyp )
         if not self.nbLayers is None:
             self.mesh.GetMesh().RemoveHypothesis( self.geom, self.nbLayers )
             self.mesh.GetMesh().AddHypothesis( self.geom, self.distribHyp )
-        study = self.mesh.smeshpyD.GetCurrentStudy() # prevents publishing own 1D hypothesis
-        self.mesh.smeshpyD.SetCurrentStudy( None )
+        self.mesh.smeshpyD.SetEnablePublish( False ) # prevents publishing own 1D hypothesis
         hyp = self.mesh.smeshpyD.CreateHypothesis(hypType, so)
         hyp = self.mesh.smeshpyD.CreateHypothesis(hypType, so)
-        self.mesh.smeshpyD.SetCurrentStudy( study ) # enables publishing
+        self.mesh.smeshpyD.SetEnablePublish( True ) # enables publishing
         if not self.distribHyp:
             self.distribHyp = self.Hypothesis("LayerDistribution", UseExisting=0)
         self.distribHyp.SetLayerDistribution( hyp )
         if not self.distribHyp:
             self.distribHyp = self.Hypothesis("LayerDistribution", UseExisting=0)
         self.distribHyp.SetLayerDistribution( hyp )
@@ -1159,10 +1158,9 @@ class StdMeshersBuilder_RadialAlgorithm(Mesh_Algorithm):
             self.distribHyp = self.Hypothesis("LayerDistribution2D", UseExisting=0)
         else:
             self.mesh.GetMesh().AddHypothesis( self.geom, self.distribHyp )
             self.distribHyp = self.Hypothesis("LayerDistribution2D", UseExisting=0)
         else:
             self.mesh.GetMesh().AddHypothesis( self.geom, self.distribHyp )
-        study = self.mesh.smeshpyD.GetCurrentStudy() # prevents publishing own 1D hypothesis
-        self.mesh.smeshpyD.SetCurrentStudy( None )
+        self.mesh.smeshpyD.SetEnablePublish( False )
         hyp = self.mesh.smeshpyD.CreateHypothesis(hypType, so)
         hyp = self.mesh.smeshpyD.CreateHypothesis(hypType, so)
-        self.mesh.smeshpyD.SetCurrentStudy( study ) # enables publishing
+        self.mesh.smeshpyD.SetEnablePublish( True )
         self.distribHyp.SetLayerDistribution( hyp )
         return hyp
 
         self.distribHyp.SetLayerDistribution( hyp )
         return hyp
 
index d2930389803d237054be1e5240fbf9b255b8c8f5..17a4a01f126b0ccf84999e0995b3ff0ddfb90f5a 100644 (file)
@@ -27,11 +27,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # Geometry
 # ========
 
 # Geometry
 # ========
@@ -323,4 +323,4 @@ hexa.Compute()
 # Update object browser
 # ---------------------
 
 # Update object browser
 # ---------------------
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index eca7e708dd6d40810fcd7204c581e8afd27d6d12..e47fde7e70679949cc4ed79d89d4dac19e4e15dd 100644 (file)
@@ -27,11 +27,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # Geometry
 # ========
 
 # Geometry
 # ========
@@ -125,4 +125,4 @@ hexa.Compute()
 # Update object browser
 # ---------------------
 
 # Update object browser
 # ---------------------
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 4d4205988c6b11b477098fdf088ddaae9422d4f2..302256fa1194d4ea6034df2022067f3f74a9b46f 100644 (file)
@@ -27,11 +27,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # Geometry
 # ========
 
 # Geometry
 # ========
@@ -112,4 +112,4 @@ hexa.Compute()
 # Update object browser
 # ---------------------
 
 # Update object browser
 # ---------------------
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 74709a2882291ab0d86215246e0e58c22a874641..96cb23479e23a05f017a75b4ef32f27b5c79f09d 100644 (file)
@@ -27,11 +27,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # Geometry
 # ========
 
 # Geometry
 # ========
@@ -117,4 +117,4 @@ mixed.Compute()
 # Update object browser
 # ---------------------
 
 # Update object browser
 # ---------------------
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 63049972cb12fab9ab79f98f933847d74f2fde80..da8c97525a7855843e9d00b2071ea58169fb6cad 100644 (file)
@@ -27,11 +27,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 import math
 
 
 import math
 
@@ -152,4 +152,4 @@ hexa.Compute()
 # Update object browser
 # ---------------------
 
 # Update object browser
 # ---------------------
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 252b4e896bc3870b265ce2ebfdc2d7b18c57b5da..dc59840dacc8e74e52c6e7f9aff20763e409f2ce 100644 (file)
@@ -27,11 +27,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # Geometry
 # ========
 
 # Geometry
 # ========
@@ -169,4 +169,4 @@ hexa.Compute()
 # Update object browser
 # ---------------------
 
 # Update object browser
 # ---------------------
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 099204117f2a2703a25b934d43984bdaa093f5a4..20de60dec649de490e637fa506663f01430797b1 100644 (file)
@@ -27,11 +27,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # Geometry
 # ========
 
 # Geometry
 # ========
@@ -109,4 +109,4 @@ hexa.Compute()
 # Update object browser
 # ---------------------
 
 # Update object browser
 # ---------------------
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index a9d4579c869f54daee8a19f363e1497bfe569467..d4577d2fab1e5a0c4bda45cd573aa5c274a7df2a 100644 (file)
@@ -27,11 +27,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # Geometry
 # ========
 
 # Geometry
 # ========
@@ -142,4 +142,4 @@ hexa.Compute()
 # Update object browser
 # ---------------------
 
 # Update object browser
 # ---------------------
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 63222cb3695d5165550baa5eb1dc8681ee354c00..b610ac554a54f370e6dd3abb570ff78d8b51f21a 100644 (file)
@@ -27,11 +27,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 import math
 
 
 import math
 
@@ -145,4 +145,4 @@ hexa.Compute()
 # Update object browser
 # ---------------------
 
 # Update object browser
 # ---------------------
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 24cd31d44d1dbb075b7ab35af6c055803c5f6e7d..6fb26f2d5954d2b481af09f634f708e6b0b43f4d 100644 (file)
@@ -27,11 +27,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # Geometry
 # ========
 
 # Geometry
 # ========
@@ -107,4 +107,4 @@ hexa.Compute()
 # Update object browser
 # ---------------------
 
 # Update object browser
 # ---------------------
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 91b6a3d269ec9f1b42bf07a8f58c4f355985ba54..ae75f84c1874b61c15d5ecdecc60a67c9c40a3c2 100644 (file)
@@ -27,11 +27,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # Geometry
 # ========
 
 # Geometry
 # ========
@@ -128,4 +128,4 @@ hexa.Compute()
 # Update object browser
 # ---------------------
 
 # Update object browser
 # ---------------------
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 55164b7778e578751d408f59afa60c92486686ef..02e468333657748d8a6c002f9ffac984ea8e6564 100644 (file)
@@ -27,11 +27,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # Geometry
 # ========
 
 # Geometry
 # ========
@@ -143,4 +143,4 @@ hexa.Compute()
 # Update object browser
 # ---------------------
 
 # Update object browser
 # ---------------------
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 6cb4b1c2ddac575b226a3287c62d7148178b1ff0..6982aa6069f920e5012e789b0a2114e5a3b10993 100644 (file)
@@ -27,11 +27,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # Geometry
 # ========
 
 # Geometry
 # ========
@@ -261,4 +261,4 @@ hexa.Compute()
 # Update object browser
 # ---------------------
 
 # Update object browser
 # ---------------------
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index f908a3d7670c59c5876b208a276feecc3e2a5edd..1167d6390a68d4d63d5a4c9fcd4f148406f713f4 100644 (file)
@@ -27,11 +27,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # Geometrie
 # =========
 
 # Geometrie
 # =========
@@ -146,4 +146,4 @@ hexa.Compute()
 # Update object browser
 # ---------------------
 
 # Update object browser
 # ---------------------
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 42cfbaad7111077bba685412751bf3208b98dd73..46be8da3b275314d27e75cde829d61e1b70c873f 100644 (file)
@@ -27,11 +27,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # Geometrie
 # =========
 
 # Geometrie
 # =========
@@ -205,4 +205,4 @@ hexa.Compute()
 # Update object browser
 # ---------------------
 
 # Update object browser
 # ---------------------
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index d7ec0ea1d6b1890e212e1063dd3d2f31914fe2c3..cb8ce46f02e596e4059e6d1296160dea2e83e993 100644 (file)
@@ -27,11 +27,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # Geometry
 # ========
 
 # Geometry
 # ========
@@ -149,4 +149,4 @@ hexa.Compute()
 # Update object browser
 # ---------------------
 
 # Update object browser
 # ---------------------
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 4d8b06aeb165ae7ff8f0454a384b6e592811bc87..22a9c1d1ebb4692c258e9e0e63c4e0632934dda1 100644 (file)
@@ -27,11 +27,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # Geometrie
 # =========
 
 # Geometrie
 # =========
@@ -107,4 +107,4 @@ hexa.Compute()
 # Update object browser
 # ---------------------
 
 # Update object browser
 # ---------------------
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 3721e9a6b51d4ad8dc91070aa1876fe613ccf17c..afd7dc26f26a99621756ff37450941ddcb3a25f1 100644 (file)
@@ -27,11 +27,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 import math
 
 
 import math
 
@@ -145,4 +145,4 @@ hexa.Compute()
 # Update object browser
 # ---------------------
 
 # Update object browser
 # ---------------------
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 4528d532324e46d8dde196d169ce97fcb1791e20..2bc7abf55c94053d5e4b357dfc90ffe772c5a699 100644 (file)
@@ -27,11 +27,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # Geometrie
 # =========
 
 # Geometrie
 # =========
@@ -190,4 +190,4 @@ hexa_groupe = hexa.Group(groupe)
 # Update object browser
 # ---------------------
 
 # Update object browser
 # ---------------------
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 034037120aa85e62557611344349dd69409abe7e..04e7d4d2b636236e561dd4e390e15529db830dc3 100644 (file)
@@ -27,11 +27,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # Geometry
 # ========
 
 # Geometry
 # ========
@@ -136,4 +136,4 @@ tetra.Group(group)
 # Update object browser
 # ---------------------
 
 # Update object browser
 # ---------------------
 
-salome.sg.updateObjBrowser(True)
\ No newline at end of file
+salome.sg.updateObjBrowser()
\ No newline at end of file
index 87b4cfbe0cd8486a3de616e0ee75f87c574a9da2..57b7c1ff13c4a0fb5f90211b5433a02df5dc44e2 100644 (file)
@@ -26,11 +26,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 geo = geompy
 
 
 geo = geompy
 
@@ -103,7 +103,7 @@ geompy.DifferenceList(group_1, [group_1_box])
 # Mesh the blocks with hexahedral
 # -------------------------------
 
 # Mesh the blocks with hexahedral
 # -------------------------------
 
-smesh.SetCurrentStudy(salome.myStudy)
+smesh.UpdateStudy()
 
 def discretize(x, y, z,  n, s=blocks):
     p = geompy.MakeVertex(x, y, z)
 
 def discretize(x, y, z,  n, s=blocks):
     p = geompy.MakeVertex(x, y, z)
@@ -134,4 +134,4 @@ hexa.Group(group_1)
 # Update object browser
 # ---------------------
 
 # Update object browser
 # ---------------------
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 72e0f631a0faeee7e48106daea43d0edc3cb715c..69754d2b703b63b200dcc54eda8a9e323ae5cd68 100644 (file)
@@ -25,11 +25,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 import os
 
 
 import os
 
@@ -232,4 +232,4 @@ MyMesh.ExportMED(path+str(NbCells4)+"_triangles.med", 0)
 # Update the object browser
 # -------------------------
 
 # Update the object browser
 # -------------------------
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 7b9f96c33994ec3e89b9cd045aef20f9cd0956d1..76a0593fda983e20efa6279dac9a88bd6fae30c0 100755 (executable)
@@ -22,18 +22,18 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 import math
 
 global Face_1
 Face_1 = geompy.MakeFaceHW(100, 100, 1)
 geompy.addToStudy( Face_1, "Face_1" )
 
 import math
 
 global Face_1
 Face_1 = geompy.MakeFaceHW(100, 100, 1)
 geompy.addToStudy( Face_1, "Face_1" )
 
-smesh.SetCurrentStudy(salome.myStudy)
+smesh.UpdateStudy()
 from salome.StdMeshers import StdMeshersBuilder
 pattern = smesh.GetPattern()
 Mesh_1 = smesh.Mesh(Face_1)
 from salome.StdMeshers import StdMeshersBuilder
 pattern = smesh.GetPattern()
 Mesh_1 = smesh.Mesh(Face_1)
@@ -87,5 +87,5 @@ aIntGrp=Mesh_1.IntersectListOfGroups([aRedGroup, aGreenGroup, aBlueGroup], "IntG
 # CutListOfGroups()
 aCutGrp=Mesh_1.CutListOfGroups([aRedGroup],[aGreenGroup,aBlueGroup],"CutGrp")
 
 # CutListOfGroups()
 aCutGrp=Mesh_1.CutListOfGroups([aRedGroup],[aGreenGroup,aBlueGroup],"CutGrp")
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
 
 
index cd8e7bdc1233df24ddd90937b37230d8e5dc1ec7..501b2f5b5bbbc1b835562e3f46639513fcfcecf5 100644 (file)
@@ -26,11 +26,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 # Parameters
 # ----------
 
 # Parameters
 # ----------
@@ -53,7 +53,7 @@ geompy.addToStudy(cylinder, "Cylinder")
 # Define a mesh on a geometry
 # ---------------------------
 
 # Define a mesh on a geometry
 # ---------------------------
 
-smesh.SetCurrentStudy(salome.myStudy)
+smesh.UpdateStudy()
 
 m = smesh.Mesh(cylinder)
 
 
 m = smesh.Mesh(cylinder)
 
@@ -94,4 +94,4 @@ else:
 # Update object browser
 # ---------------------
 
 # Update object browser
 # ---------------------
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 1643ae99ae4da6ef44913bd5ab5bf3611790305e..7be95f2ac4fc92fc89e107209b08aa0ac2185513 100755 (executable)
@@ -22,18 +22,18 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 import math
 
 global Box_1
 Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
 geompy.addToStudy( Box_1, "Box_1" )
 
 import math
 
 global Box_1
 Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
 geompy.addToStudy( Box_1, "Box_1" )
 
-smesh.SetCurrentStudy(salome.myStudy)
+smesh.UpdateStudy()
 from salome.StdMeshers import StdMeshersBuilder
 Mesh_1 = smesh.Mesh(Box_1)
 Regular_1D = Mesh_1.Segment()
 from salome.StdMeshers import StdMeshersBuilder
 Mesh_1 = smesh.Mesh(Box_1)
 Regular_1D = Mesh_1.Segment()
@@ -60,5 +60,5 @@ aGrp1D = Mesh_1.CreateDimGroup( [aGrp3D_1, aGrp3D_2], SMESH.EDGE, "Edges" )
 
 aGrp0D = Mesh_1.CreateDimGroup( [aGrp3D_1, aGrp3D_2], SMESH.NODE, "Nodes" )
 
 
 aGrp0D = Mesh_1.CreateDimGroup( [aGrp3D_1, aGrp3D_2], SMESH.NODE, "Nodes" )
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
 
 
index 7538d91a348e17da76c92a718e85434e0cdea06e..0fdd1aeb339f6ae60c93049367b9a900b25ba976 100644 (file)
@@ -42,7 +42,7 @@ from salome.smesh import smeshBuilder
 try:
     # get instance of class smeshBuilder
     engineSmesh = salome.lcc.FindOrLoadComponent( "FactoryServer", "SMESH" )
 try:
     # get instance of class smeshBuilder
     engineSmesh = salome.lcc.FindOrLoadComponent( "FactoryServer", "SMESH" )
-    smesh = smeshBuilder.New(salome.myStudy, engineSmesh)
+    smesh = smeshBuilder.New(True,engineSmesh)
 except:
     print "exception in smesh.py: instance creation failed"
     smesh = None
 except:
     print "exception in smesh.py: instance creation failed"
     smesh = None
@@ -99,14 +99,13 @@ replace
 -------
 
 import smesh, SMESH
 -------
 
 import smesh, SMESH
-smesh.SetCurrentStudy(theStudy)
 
 with
 ----
 
 import SMESH
 from salome.smesh import smeshBuilder
 
 with
 ----
 
 import SMESH
 from salome.smesh import smeshBuilder
-smesh = smeshBuilder.New(salome.myStudy)
+smesh = smeshBuilder.New()
 
 you also need to modify some lines where smeshBuilder is used instead of smesh
 
 
 you also need to modify some lines where smeshBuilder is used instead of smesh
 
index 88d2b0b1a1ed1f59f26c7f8cb83e33a7829b76d7..2334321177669e32885a2b1b4334b88ece8a9dff 100644 (file)
@@ -189,13 +189,8 @@ def GetName(obj):
         except:
             ior = None
         if ior:
         except:
             ior = None
         if ior:
-            # CORBA object
-            studies = salome.myStudyManager.GetOpenStudies()
-            for sname in studies:
-                s = salome.myStudyManager.GetStudyByName(sname)
-                if not s: continue
-                sobj = s.FindObjectIOR(ior)
-                if not sobj: continue
+            sobj = salome.myStudy.FindObjectIOR(ior)
+            if sobj:
                 return sobj.GetName()
             if hasattr(obj, "GetName"):
                 # unknown CORBA object, having GetName() method
                 return sobj.GetName()
             if hasattr(obj, "GetName"):
                 # unknown CORBA object, having GetName() method
@@ -266,12 +261,7 @@ def TreatHypoStatus(status, hypName, geomName, isAlgo, mesh):
 def AssureGeomPublished(mesh, geom, name=''):
     if not isinstance( geom, geomBuilder.GEOM._objref_GEOM_Object ):
         return
 def AssureGeomPublished(mesh, geom, name=''):
     if not isinstance( geom, geomBuilder.GEOM._objref_GEOM_Object ):
         return
-    if not geom.GetStudyEntry() and \
-           mesh.smeshpyD.GetCurrentStudy():
-        ## set the study
-        studyID = mesh.smeshpyD.GetCurrentStudy()._get_StudyId()
-        if studyID != mesh.geompyD.myStudyId:
-            mesh.geompyD.init_geom( mesh.smeshpyD.GetCurrentStudy())
+    if not geom.GetStudyEntry():
         ## get a name
         if not name and geom.GetShapeType() != geomBuilder.GEOM.COMPOUND:
             # for all groups SubShapeName() return "Compound_-1"
         ## get a name
         if not name and geom.GetShapeType() != geomBuilder.GEOM.COMPOUND:
             # for all groups SubShapeName() return "Compound_-1"
@@ -380,8 +370,8 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen):
     ## Dump component to the Python script
     #  This method overrides IDL function to allow default values for the parameters.
     #  @ingroup l1_auxiliary
     ## Dump component to the Python script
     #  This method overrides IDL function to allow default values for the parameters.
     #  @ingroup l1_auxiliary
-    def DumpPython(self, theStudy, theIsPublished=True, theIsMultiFile=True):
-        return SMESH._objref_SMESH_Gen.DumpPython(self, theStudy, theIsPublished, theIsMultiFile)
+    def DumpPython(self, theIsPublished=True, theIsMultiFile=True):
+        return SMESH._objref_SMESH_Gen.DumpPython(self, theIsPublished, theIsMultiFile)
 
     ## Set mode of DumpPython(), \a historical or \a snapshot.
     #  In the \a historical mode, the Python Dump script includes all commands
 
     ## Set mode of DumpPython(), \a historical or \a snapshot.
     #  In the \a historical mode, the Python Dump script includes all commands
@@ -394,14 +384,14 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen):
         else:            val = "false"
         SMESH._objref_SMESH_Gen.SetOption(self, "historical_python_dump", val)
 
         else:            val = "false"
         SMESH._objref_SMESH_Gen.SetOption(self, "historical_python_dump", val)
 
-    ## Set the current study and Geometry component
+    ## Set Geometry component
     #  @ingroup l1_auxiliary
     #  @ingroup l1_auxiliary
-    def init_smesh(self,theStudy,geompyD = None):
+    def init_smesh(self,isPublished = True,geompyD = None):
         #print "init_smesh"
         #print "init_smesh"
-        self.SetCurrentStudy(theStudy,geompyD)
-        if theStudy:
+        self.UpdateStudy(geompyD)
+        if isPublished:
             global notebook
             global notebook
-            notebook.myStudy = theStudy
+            notebook.myStudy = salome.myStudy
 
     ## Create a mesh. This can be either an empty mesh, possibly having an underlying geometry,
     #  or a mesh wrapping a CORBA mesh given as a parameter.
 
     ## Create a mesh. This can be either an empty mesh, possibly having an underlying geometry,
     #  or a mesh wrapping a CORBA mesh given as a parameter.
@@ -523,34 +513,32 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen):
     #  @ingroup l1_auxiliary
     def IsEmbeddedMode(self):
         return SMESH._objref_SMESH_Gen.IsEmbeddedMode(self)
     #  @ingroup l1_auxiliary
     def IsEmbeddedMode(self):
         return SMESH._objref_SMESH_Gen.IsEmbeddedMode(self)
-
-    ## Set the current study. Calling SetCurrentStudy( None ) allows to
-    #  switch OFF automatic pubilishing in the Study of mesh objects.
+    
+    ## Update the current study. Calling UpdateStudy() allows to 
+    #  update meshes at switching GEOM->SMESH
     #  @ingroup l1_auxiliary
     #  @ingroup l1_auxiliary
-    def SetCurrentStudy( self, theStudy, geompyD = None ):
+    def UpdateStudy( self, geompyD = None  ):
+        #self.UpdateStudy()
         if not geompyD:
             from salome.geom import geomBuilder
             geompyD = geomBuilder.geom
             pass
         self.geompyD=geompyD
         self.SetGeomEngine(geompyD)
         if not geompyD:
             from salome.geom import geomBuilder
             geompyD = geomBuilder.geom
             pass
         self.geompyD=geompyD
         self.SetGeomEngine(geompyD)
-        SMESH._objref_SMESH_Gen.SetCurrentStudy(self,theStudy)
-        global notebook
-        if theStudy:
-            notebook = salome_notebook.NoteBook( theStudy )
-        else:
-            notebook = salome_notebook.NoteBook( salome_notebook.PseudoStudyForNoteBook() )
-        if theStudy:
-            sb = theStudy.NewBuilder()
-            sc = theStudy.FindComponent("SMESH")
-            if sc: sb.LoadWith(sc, self)
-            pass
+        SMESH._objref_SMESH_Gen.UpdateStudy(self)
+        sb = salome.myStudy.NewBuilder()
+        sc = salome.myStudy.FindComponent("SMESH")
+        if sc: sb.LoadWith(sc, self)
         pass
         pass
-
-    ## Get the current study
+        
+    ## Sets enable publishing in the study. Calling SetEnablePublish( false ) allows to
+    #  switch OFF publishing in the Study of mesh objects.
     #  @ingroup l1_auxiliary
     #  @ingroup l1_auxiliary
-    def GetCurrentStudy(self):
-        return SMESH._objref_SMESH_Gen.GetCurrentStudy(self)
+    def SetEnablePublish( self, theIsEnablePublish ):
+        #self.SetEnablePublish(theIsEnablePublish)
+        SMESH._objref_SMESH_Gen.SetEnablePublish(self,theIsEnablePublish)
+        global notebook
+        notebook = salome_notebook.NoteBook( theIsEnablePublish )
 
     ## Create a Mesh object importing data from the given UNV file
     #  @return an instance of Mesh class
 
     ## Create a Mesh object importing data from the given UNV file
     #  @return an instance of Mesh class
@@ -760,7 +748,7 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen):
                     raise ValueError, "Group type mismatches Element type"
                 aCriterion.ThresholdStr = aThreshold.GetName()
                 aCriterion.ThresholdID  = salome.orb.object_to_string( aThreshold )
                     raise ValueError, "Group type mismatches Element type"
                 aCriterion.ThresholdStr = aThreshold.GetName()
                 aCriterion.ThresholdID  = salome.orb.object_to_string( aThreshold )
-                study = self.GetCurrentStudy()
+                study = salome.myStudy
                 if study:
                     so = study.FindObjectIOR( aCriterion.ThresholdID )
                     if so:
                 if study:
                     so = study.FindObjectIOR( aCriterion.ThresholdID )
                     if so:
@@ -1167,13 +1155,13 @@ omniORB.registerObjref(SMESH._objref_SMESH_Gen._NP_RepositoryId, smeshBuilder)
 #    import salome
 #    salome.salome_init()
 #    from salome.smesh import smeshBuilder
 #    import salome
 #    salome.salome_init()
 #    from salome.smesh import smeshBuilder
-#    smesh = smeshBuilder.New(salome.myStudy)
+#    smesh = smeshBuilder.New()
 #  \endcode
 #  \endcode
-#  @param  study     SALOME study, generally obtained by salome.myStudy.
+#  @param  isPublished If False, the notebool will not be used.
 #  @param  instance  CORBA proxy of SMESH Engine. If None, the default Engine is used.
 #  @return smeshBuilder instance
 
 #  @param  instance  CORBA proxy of SMESH Engine. If None, the default Engine is used.
 #  @return smeshBuilder instance
 
-def New( study, instance=None):
+def New( isPublished = True, instance=None):
     """
     Create a new smeshBuilder instance.The smeshBuilder class provides the Python
     interface to create or load meshes.
     """
     Create a new smeshBuilder instance.The smeshBuilder class provides the Python
     interface to create or load meshes.
@@ -1182,10 +1170,10 @@ def New( study, instance=None):
         import salome
         salome.salome_init()
         from salome.smesh import smeshBuilder
         import salome
         salome.salome_init()
         from salome.smesh import smeshBuilder
-        smesh = smeshBuilder.New(salome.myStudy)
+        smesh = smeshBuilder.New()
 
     Parameters:
 
     Parameters:
-        study     SALOME study, generally obtained by salome.myStudy.
+        isPublished If False, the notebool will not be used.
         instance  CORBA proxy of SMESH Engine. If None, the default Engine is used.
     Returns:
         smeshBuilder instance
         instance  CORBA proxy of SMESH Engine. If None, the default Engine is used.
     Returns:
         smeshBuilder instance
@@ -1198,7 +1186,7 @@ def New( study, instance=None):
       doLcc = True
     smeshInst = smeshBuilder()
     assert isinstance(smeshInst,smeshBuilder), "Smesh engine class is %s but should be smeshBuilder.smeshBuilder. Import salome.smesh.smeshBuilder before creating the instance."%smeshInst.__class__
       doLcc = True
     smeshInst = smeshBuilder()
     assert isinstance(smeshInst,smeshBuilder), "Smesh engine class is %s but should be smeshBuilder.smeshBuilder. Import salome.smesh.smeshBuilder before creating the instance."%smeshInst.__class__
-    smeshInst.init_smesh(study)
+    smeshInst.init_smesh(isPublished)
     return smeshInst
 
 
     return smeshInst
 
 
@@ -1237,12 +1225,9 @@ class Mesh:
                 self.geom = obj
                 objHasName = True
                 # publish geom of mesh (issue 0021122)
                 self.geom = obj
                 objHasName = True
                 # publish geom of mesh (issue 0021122)
-                if not self.geom.GetStudyEntry() and smeshpyD.GetCurrentStudy():
+                if not self.geom.GetStudyEntry():
                     objHasName = False
                     objHasName = False
-                    studyID = smeshpyD.GetCurrentStudy()._get_StudyId()
-                    if studyID != geompyD.myStudyId:
-                        geompyD.init_geom( smeshpyD.GetCurrentStudy())
-                        pass
+                    geompyD.init_geom()
                     if name:
                         geo_name = name + " shape"
                     else:
                     if name:
                         geo_name = name + " shape"
                     else:
@@ -1519,12 +1504,12 @@ class Mesh:
                 print msg
                 print allReasons
             pass
                 print msg
                 print allReasons
             pass
-        if salome.sg.hasDesktop() and self.mesh.GetStudyId() >= 0:
+        if salome.sg.hasDesktop():
             if not isinstance( refresh, list): # not a call from subMesh.Compute()
                 smeshgui = salome.ImportComponentGUI("SMESH")
             if not isinstance( refresh, list): # not a call from subMesh.Compute()
                 smeshgui = salome.ImportComponentGUI("SMESH")
-                smeshgui.Init(self.mesh.GetStudyId())
+                smeshgui.Init()
                 smeshgui.SetMeshIcon( salome.ObjectToID( self.mesh ), ok, (self.NbNodes()==0) )
                 smeshgui.SetMeshIcon( salome.ObjectToID( self.mesh ), ok, (self.NbNodes()==0) )
-                if refresh: salome.sg.updateObjBrowser(True)
+                if refresh: salome.sg.updateObjBrowser()
 
         return ok
 
 
         return ok
 
@@ -1549,11 +1534,9 @@ class Mesh:
         try:
             shapeText = ""
             mainIOR  = salome.orb.object_to_string( self.GetShape() )
         try:
             shapeText = ""
             mainIOR  = salome.orb.object_to_string( self.GetShape() )
-            for sname in salome.myStudyManager.GetOpenStudies():
-                s = salome.myStudyManager.GetStudyByName(sname)
-                if not s: continue
-                mainSO = s.FindObjectIOR(mainIOR)
-                if not mainSO: continue
+            s = salome.myStudy
+            mainSO = s.FindObjectIOR(mainIOR)
+            if mainSO:
                 if subShapeID == 1:
                     shapeText = '"%s"' % mainSO.GetName()
                 subIt = s.NewChildIterator(mainSO)
                 if subShapeID == 1:
                     shapeText = '"%s"' % mainSO.GetName()
                 subIt = s.NewChildIterator(mainSO)
@@ -1570,7 +1553,6 @@ class Mesh:
                         continue
                     if ids == subShapeID:
                         shapeText = '"%s"' % subSO.GetName()
                         continue
                     if ids == subShapeID:
                         shapeText = '"%s"' % subSO.GetName()
-                        break
             if not shapeText:
                 shape = self.geompyD.GetSubShape( self.GetShape(), [subShapeID])
                 if shape:
             if not shapeText:
                 shape = self.geompyD.GetSubShape( self.GetShape(), [subShapeID])
                 if shape:
@@ -1641,12 +1623,11 @@ class Mesh:
     #  @ingroup l2_construct
     def Clear(self, refresh=False):
         self.mesh.Clear()
     #  @ingroup l2_construct
     def Clear(self, refresh=False):
         self.mesh.Clear()
-        if ( salome.sg.hasDesktop() and 
-             salome.myStudyManager.GetStudyByID( self.mesh.GetStudyId() ) ):
+        if ( salome.sg.hasDesktop() ):
             smeshgui = salome.ImportComponentGUI("SMESH")
             smeshgui = salome.ImportComponentGUI("SMESH")
-            smeshgui.Init(self.mesh.GetStudyId())
+            smeshgui.Init()
             smeshgui.SetMeshIcon( salome.ObjectToID( self.mesh ), False, True )
             smeshgui.SetMeshIcon( salome.ObjectToID( self.mesh ), False, True )
-            if refresh: salome.sg.updateObjBrowser(True)
+            if refresh: salome.sg.updateObjBrowser()
 
     ## Remove all nodes and elements of indicated shape
     #  @param refresh if @c True, Object browser is automatically updated (when running in GUI)
 
     ## Remove all nodes and elements of indicated shape
     #  @param refresh if @c True, Object browser is automatically updated (when running in GUI)
@@ -1656,9 +1637,9 @@ class Mesh:
         self.mesh.ClearSubMesh(geomId)
         if salome.sg.hasDesktop():
             smeshgui = salome.ImportComponentGUI("SMESH")
         self.mesh.ClearSubMesh(geomId)
         if salome.sg.hasDesktop():
             smeshgui = salome.ImportComponentGUI("SMESH")
-            smeshgui.Init(self.mesh.GetStudyId())
+            smeshgui.Init()
             smeshgui.SetMeshIcon( salome.ObjectToID( self.mesh ), False, True )
             smeshgui.SetMeshIcon( salome.ObjectToID( self.mesh ), False, True )
-            if refresh: salome.sg.updateObjBrowser(True)
+            if refresh: salome.sg.updateObjBrowser()
 
     ## Compute a tetrahedral mesh using AutomaticLength + MEFISTO + Tetrahedron
     #  @param fineness [0.0,1.0] defines mesh fineness
 
     ## Compute a tetrahedral mesh using AutomaticLength + MEFISTO + Tetrahedron
     #  @param fineness [0.0,1.0] defines mesh fineness
@@ -2259,12 +2240,6 @@ class Mesh:
     def GetId(self):
         return self.mesh.GetId()
 
     def GetId(self):
         return self.mesh.GetId()
 
-    ## Get the study Id
-    #  @return integer value, which is the study Id of the mesh
-    #  @ingroup l1_auxiliary
-    def GetStudyId(self):
-        return self.mesh.GetStudyId()
-
     ## Check the group names for duplications.
     #  Consider the maximum group name length stored in MED file.
     #  @return True or False
     ## Check the group names for duplications.
     #  Consider the maximum group name length stored in MED file.
     #  @return True or False
@@ -5094,11 +5069,11 @@ class submeshProxy(SMESH._objref_SMESH_subMesh):
 
         ok = self.mesh.Compute( self.GetSubShape(),refresh=[] )
 
 
         ok = self.mesh.Compute( self.GetSubShape(),refresh=[] )
 
-        if salome.sg.hasDesktop() and self.mesh.GetStudyId() >= 0:
+        if salome.sg.hasDesktop():
             smeshgui = salome.ImportComponentGUI("SMESH")
             smeshgui = salome.ImportComponentGUI("SMESH")
-            smeshgui.Init(self.mesh.GetStudyId())
+            smeshgui.Init()
             smeshgui.SetMeshIcon( salome.ObjectToID( self ), ok, (self.GetNumberOfElements()==0) )
             smeshgui.SetMeshIcon( salome.ObjectToID( self ), ok, (self.GetNumberOfElements()==0) )
-            if refresh: salome.sg.updateObjBrowser(True)
+            if refresh: salome.sg.updateObjBrowser()
             pass
 
         return ok
             pass
 
         return ok
index 3690f76d8f57ace4a10910a25f3ed29a06b83dd7..bc2489436469555d789b449de22a87ed23eb1958 100644 (file)
@@ -70,7 +70,7 @@ class Mesh_Algorithm:
     #  Finds only the hypotheses created in smeshpyD engine.
     #  @return SMESH.SMESH_Hypothesis
     def FindHypothesis (self, hypname, args, CompareMethod, smeshpyD):
     #  Finds only the hypotheses created in smeshpyD engine.
     #  @return SMESH.SMESH_Hypothesis
     def FindHypothesis (self, hypname, args, CompareMethod, smeshpyD):
-        study = smeshpyD.GetCurrentStudy()
+        study = salome.myStudy
         if not study: return None
         #to do: find component by smeshpyD object, not by its data type
         scomp = study.FindComponent(smeshpyD.ComponentDataType())
         if not study: return None
         #to do: find component by smeshpyD object, not by its data type
         scomp = study.FindComponent(smeshpyD.ComponentDataType())
@@ -114,7 +114,7 @@ class Mesh_Algorithm:
     #  Finds only the algorithms, which have been created in smeshpyD engine.
     #  @return SMESH.SMESH_Algo
     def FindAlgorithm (self, algoname, smeshpyD):
     #  Finds only the algorithms, which have been created in smeshpyD engine.
     #  @return SMESH.SMESH_Algo
     def FindAlgorithm (self, algoname, smeshpyD):
-        study = smeshpyD.GetCurrentStudy()
+        study = salome.myStudy
         if not study: return None
         #to do: find component by smeshpyD object, not by its data type
         scomp = study.FindComponent(smeshpyD.ComponentDataType())
         if not study: return None
         #to do: find component by smeshpyD object, not by its data type
         scomp = study.FindComponent(smeshpyD.ComponentDataType())
index 8821880894511da5ab0d3a967a956b111e9f89b0..b2e06bf1fc42abc194f46dad0a08b3b0d7a74b9b 100644 (file)
@@ -28,7 +28,7 @@ sm_gui = libSMESH_Swig.SMESH_Swig()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 import GEOM
 
 
 import GEOM
 
index 8a252507cbe8c7f57b70fd8a1d46b69315c7cff3..ba83411610355aa213aa2ef29f02a616153d04aa 100644 (file)
@@ -52,6 +52,7 @@ ADD_DEFINITIONS(
 SET(_link_LIBRARIES
   ${KERNEL_SalomeGenericObj}
   ${KERNEL_SALOMELocalTrace}
 SET(_link_LIBRARIES
   ${KERNEL_SalomeGenericObj}
   ${KERNEL_SALOMELocalTrace}
+  ${KERNEL_SalomeKernelHelpers}
   ${GUI_CAM}
   ${GUI_suit}
   ${GUI_qtx}
   ${GUI_CAM}
   ${GUI_suit}
   ${GUI_qtx}
index 231dd33b5eb7a132013d734008dc5fdcad81441f..4d7bb2ae15a422f0fbd123af8360d64118c4082d 100644 (file)
@@ -35,6 +35,7 @@
 #include <Utils_ORB_INIT.hxx>
 #include <Utils_SINGLETON.hxx>
 #include <SALOMEDSClient_ClientFactory.hxx>
 #include <Utils_ORB_INIT.hxx>
 #include <Utils_SINGLETON.hxx>
 #include <SALOMEDSClient_ClientFactory.hxx>
+#include <SALOME_KernelServices.hxx>
 
 #include <utilities.h>
 
 
 #include <utilities.h>
 
@@ -202,14 +203,13 @@ namespace
   void
   SetDomain(const char*                       theMeshOrSubMeshEntry,
             const char*                       theDomainEntry,
   void
   SetDomain(const char*                       theMeshOrSubMeshEntry,
             const char*                       theDomainEntry,
-            const SALOMEDS::Study_var&        theStudy,
             const SALOMEDS::StudyBuilder_var& theStudyBuilder,
             long                              theRefOnAppliedDomainTag,
             const QString&                    theAppliedDomainMEN,
             const QString&                    theAppliedDomainICON)
   {
             const SALOMEDS::StudyBuilder_var& theStudyBuilder,
             long                              theRefOnAppliedDomainTag,
             const QString&                    theAppliedDomainMEN,
             const QString&                    theAppliedDomainICON)
   {
-    SALOMEDS::SObject_var aMeshOrSubMeshSO = theStudy->FindObjectID(theMeshOrSubMeshEntry);
-    SALOMEDS::SObject_var    aHypothesisSO = theStudy->FindObjectID(theDomainEntry);
+    SALOMEDS::SObject_var aMeshOrSubMeshSO = KERNEL::getStudyServant()->FindObjectID(theMeshOrSubMeshEntry);
+    SALOMEDS::SObject_var    aHypothesisSO = KERNEL::getStudyServant()->FindObjectID(theDomainEntry);
 
     if(!aMeshOrSubMeshSO->_is_nil() && !aHypothesisSO->_is_nil()){
       //Find or Create Applied Hypothesis root
 
     if(!aMeshOrSubMeshSO->_is_nil() && !aHypothesisSO->_is_nil()){
       //Find or Create Applied Hypothesis root
@@ -245,12 +245,10 @@ namespace
   void
   SetHypothesis(const char*                       theMeshOrSubMeshEntry,
                 const char*                       theDomainEntry,
   void
   SetHypothesis(const char*                       theMeshOrSubMeshEntry,
                 const char*                       theDomainEntry,
-                const SALOMEDS::Study_var&        theStudy,
                 const SALOMEDS::StudyBuilder_var& theStudyBuilder)
   {
     SetDomain(theMeshOrSubMeshEntry,
               theDomainEntry,
                 const SALOMEDS::StudyBuilder_var& theStudyBuilder)
   {
     SetDomain(theMeshOrSubMeshEntry,
               theDomainEntry,
-              theStudy,
               theStudyBuilder,
               SMESH::Tag_RefOnAppliedHypothesis,
               QObject::tr("SMESH_MEN_APPLIED_HYPOTHESIS"),
               theStudyBuilder,
               SMESH::Tag_RefOnAppliedHypothesis,
               QObject::tr("SMESH_MEN_APPLIED_HYPOTHESIS"),
@@ -262,12 +260,10 @@ namespace
   void
   SetAlgorithms(const char*                       theMeshOrSubMeshEntry,
                 const char*                       theDomainEntry,
   void
   SetAlgorithms(const char*                       theMeshOrSubMeshEntry,
                 const char*                       theDomainEntry,
-                const SALOMEDS::Study_var&        theStudy,
                 const SALOMEDS::StudyBuilder_var& theStudyBuilder)
   {
     SetDomain(theMeshOrSubMeshEntry,
               theDomainEntry,
                 const SALOMEDS::StudyBuilder_var& theStudyBuilder)
   {
     SetDomain(theMeshOrSubMeshEntry,
               theDomainEntry,
-              theStudy,
               theStudyBuilder,
               SMESH::Tag_RefOnAppliedAlgorithms,
               QObject::tr("SMESH_MEN_APPLIED_ALGORIHTMS"),
               theStudyBuilder,
               SMESH::Tag_RefOnAppliedAlgorithms,
               QObject::tr("SMESH_MEN_APPLIED_ALGORIHTMS"),
@@ -313,21 +309,15 @@ SMESH_Swig::SMESH_Swig()
 
 //===============================================================
 void
 
 //===============================================================
 void
-SMESH_Swig::Init(int theStudyID)
+SMESH_Swig::Init()
 {
   class TEvent: public SALOME_Event
   {
 {
   class TEvent: public SALOME_Event
   {
-    int                         myStudyID;
-    SALOMEDS::Study_var&        myStudy;
     SALOMEDS::StudyBuilder_var& myStudyBuilder;
     SALOMEDS::SComponent_var&   mySComponentMesh;
   public:
     SALOMEDS::StudyBuilder_var& myStudyBuilder;
     SALOMEDS::SComponent_var&   mySComponentMesh;
   public:
-    TEvent(int                         theStudyID,
-           SALOMEDS::Study_var&        theStudy,
-           SALOMEDS::StudyBuilder_var& theStudyBuilder,
+    TEvent(SALOMEDS::StudyBuilder_var& theStudyBuilder,
            SALOMEDS::SComponent_var&   theSComponentMesh):
            SALOMEDS::SComponent_var&   theSComponentMesh):
-      myStudyID       (theStudyID),
-      myStudy         (theStudy),
       myStudyBuilder  (theStudyBuilder),
       mySComponentMesh(theSComponentMesh)
     {}
       myStudyBuilder  (theStudyBuilder),
       mySComponentMesh(theSComponentMesh)
     {}
@@ -345,26 +335,22 @@ SMESH_Swig::Init(int theStudyID)
       SUIT_Application* anApplication = aSession->activeApplication();
       SalomeApp_Application* anApp    = dynamic_cast<SalomeApp_Application*>(anApplication);
 
       SUIT_Application* anApplication = aSession->activeApplication();
       SalomeApp_Application* anApp    = dynamic_cast<SalomeApp_Application*>(anApplication);
 
-      SALOME_NamingService* aNamingService = anApp->namingService();
-      CORBA::Object_var anObject           = aNamingService->Resolve("/myStudyManager");
-      SALOMEDS::StudyManager_var aStudyMgr = SALOMEDS::StudyManager::_narrow(anObject);
-      myStudy = aStudyMgr->GetStudyByID(myStudyID);
+      SALOMEDS::Study_var aStudy = KERNEL::getStudyServant();
 
       SMESH::SMESH_Gen_var aSMESHGen = SMESHGUI::GetSMESHGen();
 
       SMESH::SMESH_Gen_var aSMESHGen = SMESHGUI::GetSMESHGen();
-      aSMESHGen->SetCurrentStudy( myStudy.in() );
 
 
-      myStudyBuilder = myStudy->NewBuilder();
+      myStudyBuilder = aStudy->NewBuilder();
 
       SALOMEDS::GenericAttribute_var anAttr;
       SALOMEDS::AttributeName_var    aName;
       SALOMEDS::AttributePixMap_var  aPixmap;
 
 
       SALOMEDS::GenericAttribute_var anAttr;
       SALOMEDS::AttributeName_var    aName;
       SALOMEDS::AttributePixMap_var  aPixmap;
 
-      SALOMEDS::SComponent_var aSComponent = myStudy->FindComponent("SMESH");
+      SALOMEDS::SComponent_var aSComponent = aStudy->FindComponent("SMESH");
       if ( aSComponent->_is_nil() )
       {
       if ( aSComponent->_is_nil() )
       {
-        bool aLocked = myStudy->GetProperties()->IsLocked();
+        bool aLocked = aStudy->GetProperties()->IsLocked();
         if (aLocked)
         if (aLocked)
-          myStudy->GetProperties()->SetLocked(false);
+          aStudy->GetProperties()->SetLocked(false);
 
         SMESHGUI* aSMESHGUI = SMESHGUI::GetSMESHGUI();
         //SRN: BugID IPAL9186, load a SMESH gui if it hasn't been loaded
 
         SMESHGUI* aSMESHGUI = SMESHGUI::GetSMESHGUI();
         //SRN: BugID IPAL9186, load a SMESH gui if it hasn't been loaded
@@ -387,13 +373,13 @@ SMESH_Swig::Init(int theStudyID)
         aPixmap->SetPixMap( "ICON_OBJBROWSER_SMESH" );
         aPixmap->UnRegister();
 
         aPixmap->SetPixMap( "ICON_OBJBROWSER_SMESH" );
         aPixmap->UnRegister();
 
-        SALOMEDS::UseCaseBuilder_var useCaseBuilder = myStudy->GetUseCaseBuilder();
+        SALOMEDS::UseCaseBuilder_var useCaseBuilder = KERNEL::getStudyServant()->GetUseCaseBuilder();
         useCaseBuilder->SetRootCurrent();
         useCaseBuilder->Append( aSComponent.in() );
   
         myStudyBuilder->DefineComponentInstance(aSComponent,aSMESHGen);
         if (aLocked)
         useCaseBuilder->SetRootCurrent();
         useCaseBuilder->Append( aSComponent.in() );
   
         myStudyBuilder->DefineComponentInstance(aSComponent,aSMESHGen);
         if (aLocked)
-          myStudy->GetProperties()->SetLocked(true);
+          KERNEL::getStudyServant()->GetProperties()->SetLocked(true);
       }
 
       mySComponentMesh = SALOMEDS::SComponent::_narrow(aSComponent);
       }
 
       mySComponentMesh = SALOMEDS::SComponent::_narrow(aSComponent);
@@ -404,9 +390,7 @@ SMESH_Swig::Init(int theStudyID)
 
   //MESSAGE("Init");
 
 
   //MESSAGE("Init");
 
-  ProcessVoidEvent(new TEvent(theStudyID,
-                              myStudy,
-                              myStudyBuilder,
+  ProcessVoidEvent(new TEvent(myStudyBuilder,
                               mySComponentMesh));
 }
 
                               mySComponentMesh));
 }
 
@@ -423,7 +407,7 @@ const char* SMESH_Swig::AddNewMesh(const char* theIOR)
 {
 
   // VSR: added temporarily - to be removed - objects are published automatically by engine
 {
 
   // VSR: added temporarily - to be removed - objects are published automatically by engine
-  SALOMEDS::SObject_var aSObject = myStudy->FindObjectIOR(theIOR);
+  SALOMEDS::SObject_var aSObject = KERNEL::getStudyServant()->FindObjectIOR(theIOR);
   if (aSObject->_is_nil())
   {
     //Find or Create Hypothesis root
   if (aSObject->_is_nil())
   {
     //Find or Create Hypothesis root
@@ -482,8 +466,8 @@ const char* SMESH_Swig::AddNewAlgorithms(const char* theIOR)
 void SMESH_Swig::SetShape(const char* theShapeEntry,
                           const char* theMeshEntry)
 {
 void SMESH_Swig::SetShape(const char* theShapeEntry,
                           const char* theMeshEntry)
 {
-  SALOMEDS::SObject_var aGeomShapeSO = myStudy->FindObjectID( theShapeEntry );
-  SALOMEDS::SObject_var      aMeshSO = myStudy->FindObjectID( theMeshEntry );
+  SALOMEDS::SObject_var aGeomShapeSO = KERNEL::getStudyServant()->FindObjectID( theShapeEntry );
+  SALOMEDS::SObject_var      aMeshSO = KERNEL::getStudyServant()->FindObjectID( theMeshEntry );
 
   if(!aMeshSO->_is_nil() && !aGeomShapeSO->_is_nil()){
     SALOMEDS::SObject_var aSObject = myStudyBuilder->NewObjectToTag(aMeshSO, SMESH::Tag_RefOnShape);
 
   if(!aMeshSO->_is_nil() && !aGeomShapeSO->_is_nil()){
     SALOMEDS::SObject_var aSObject = myStudyBuilder->NewObjectToTag(aMeshSO, SMESH::Tag_RefOnShape);
@@ -501,7 +485,6 @@ void SMESH_Swig::SetHypothesis(const char* theMeshOrSubMeshEntry,
 {
   ::SetHypothesis(theMeshOrSubMeshEntry,
                   theDomainEntry,
 {
   ::SetHypothesis(theMeshOrSubMeshEntry,
                   theDomainEntry,
-                  myStudy,
                   myStudyBuilder);
 }
 
                   myStudyBuilder);
 }
 
@@ -512,7 +495,6 @@ void SMESH_Swig::SetAlgorithms(const char* theMeshOrSubMeshEntry,
 {
   ::SetAlgorithms(theMeshOrSubMeshEntry,
                   theDomainEntry,
 {
   ::SetAlgorithms(theMeshOrSubMeshEntry,
                   theDomainEntry,
-                  myStudy,
                   myStudyBuilder);
 }
 
                   myStudyBuilder);
 }
 
@@ -521,7 +503,7 @@ void SMESH_Swig::SetAlgorithms(const char* theMeshOrSubMeshEntry,
 void
 SMESH_Swig::UnSetHypothesis(const char* theDomainEntry)
 {
 void
 SMESH_Swig::UnSetHypothesis(const char* theDomainEntry)
 {
-  SALOMEDS::SObject_var aDomainSO = myStudy->FindObjectID(theDomainEntry);
+  SALOMEDS::SObject_var aDomainSO = KERNEL::getStudyServant()->FindObjectID(theDomainEntry);
   if(!aDomainSO->_is_nil())
     myStudyBuilder->RemoveObject(aDomainSO);
 }
   if(!aDomainSO->_is_nil())
     myStudyBuilder->RemoveObject(aDomainSO);
 }
@@ -530,7 +512,7 @@ const char* SMESH_Swig::AddSubMesh(const char* theMeshEntry,
                                    const char* theSubMeshIOR,
                                    int theShapeType)
 {
                                    const char* theSubMeshIOR,
                                    int theShapeType)
 {
-  SALOMEDS::SObject_var aMeshSO = myStudy->FindObjectID(theMeshEntry);
+  SALOMEDS::SObject_var aMeshSO = KERNEL::getStudyServant()->FindObjectID(theMeshEntry);
   if(!aMeshSO->_is_nil()) {
     long aShapeTag;
     QString aSubMeshName;
   if(!aMeshSO->_is_nil()) {
     long aShapeTag;
     QString aSubMeshName;
@@ -593,11 +575,11 @@ const char* SMESH_Swig::AddSubMeshOnShape(const char* theMeshEntry,
                                           const char* theSubMeshIOR,
                                           int         ShapeType)
 {
                                           const char* theSubMeshIOR,
                                           int         ShapeType)
 {
-  SALOMEDS::SObject_var aGeomShapeSO = myStudy->FindObjectID(theGeomShapeEntry);
+  SALOMEDS::SObject_var aGeomShapeSO = KERNEL::getStudyServant()->FindObjectID(theGeomShapeEntry);
   if(!aGeomShapeSO->_is_nil())
   {
     const char *       aSubMeshEntry = AddSubMesh(theMeshEntry,theSubMeshIOR,ShapeType);
   if(!aGeomShapeSO->_is_nil())
   {
     const char *       aSubMeshEntry = AddSubMesh(theMeshEntry,theSubMeshIOR,ShapeType);
-    SALOMEDS::SObject_var aSubMeshSO = myStudy->FindObjectID(aSubMeshEntry);
+    SALOMEDS::SObject_var aSubMeshSO = KERNEL::getStudyServant()->FindObjectID(aSubMeshEntry);
     if ( !aSubMeshSO->_is_nil()) {
       SetShape( theGeomShapeEntry, aSubMeshEntry );
       CORBA::String_var aString = aSubMeshSO->GetID();
     if ( !aSubMeshSO->_is_nil()) {
       SetShape( theGeomShapeEntry, aSubMeshEntry );
       CORBA::String_var aString = aSubMeshSO->GetID();
@@ -818,7 +800,7 @@ void SMESH_Swig::EraseActor( const char* Mesh_Entry, const bool allViewers )
 void SMESH_Swig::SetName(const char* theEntry,
                          const char* theName)
 {
 void SMESH_Swig::SetName(const char* theEntry,
                          const char* theName)
 {
-  SALOMEDS::SObject_var aSObject = myStudy->FindObjectID(theEntry);
+  SALOMEDS::SObject_var aSObject = KERNEL::getStudyServant()->FindObjectID(theEntry);
   SALOMEDS::GenericAttribute_var anAttr;
   SALOMEDS::AttributeName_var aName;
   if(!aSObject->_is_nil()){
   SALOMEDS::GenericAttribute_var anAttr;
   SALOMEDS::AttributeName_var aName;
   if(!aSObject->_is_nil()){
@@ -844,15 +826,12 @@ void SMESH_Swig::SetMeshIcon(const char* theMeshEntry,
 {
   class TEvent: public SALOME_Event
   {
 {
   class TEvent: public SALOME_Event
   {
-    SALOMEDS::Study_var myStudy;
     std::string         myMeshEntry;
     bool                myIsComputed, myIsEmpty;
   public:
     std::string         myMeshEntry;
     bool                myIsComputed, myIsEmpty;
   public:
-    TEvent(const SALOMEDS::Study_var& theStudy,
-           const std::string&         theMeshEntry,
+    TEvent(const std::string&         theMeshEntry,
            const bool                 theIsComputed,
            const bool                 isEmpty):
            const bool                 theIsComputed,
            const bool                 isEmpty):
-      myStudy     (theStudy),
       myMeshEntry (theMeshEntry),
       myIsComputed(theIsComputed),
       myIsEmpty   (isEmpty)
       myMeshEntry (theMeshEntry),
       myIsComputed(theIsComputed),
       myIsEmpty   (isEmpty)
@@ -862,15 +841,14 @@ void SMESH_Swig::SetMeshIcon(const char* theMeshEntry,
     void
     Execute()
     {
     void
     Execute()
     {
-      SALOMEDS::SObject_ptr aMeshSO = myStudy->FindObjectID(myMeshEntry.c_str());
+      SALOMEDS::SObject_ptr aMeshSO = KERNEL::getStudyServant()->FindObjectID(myMeshEntry.c_str());
       if(_PTR(SObject) aMesh = ClientFactory::SObject(aMeshSO))
         SMESH::ModifiedMesh(aMesh,myIsComputed,myIsEmpty);
       // aMeshSO->UnRegister();  ~aMesh() already called UnRegister()!
     }
   };
 
       if(_PTR(SObject) aMesh = ClientFactory::SObject(aMeshSO))
         SMESH::ModifiedMesh(aMesh,myIsComputed,myIsEmpty);
       // aMeshSO->UnRegister();  ~aMesh() already called UnRegister()!
     }
   };
 
-  ProcessVoidEvent(new TEvent(myStudy,
-                              theMeshEntry,
+  ProcessVoidEvent(new TEvent(theMeshEntry,
                               theIsComputed,
                               isEmpty));
 }
                               theIsComputed,
                               isEmpty));
 }
index 86682ff5b79baa3465050fe6d74d9862fefae85e..ae0f32dcfdcfc4edde940d707435827772e20cd9 100644 (file)
@@ -95,7 +95,7 @@ public:
   SMESH_Swig();
   ~SMESH_Swig();
     
   SMESH_Swig();
   ~SMESH_Swig();
     
-  void                       Init( int );
+  void                       Init();
 
   const char*                AddNewMesh( const char* );
 
 
   const char*                AddNewMesh( const char* );
 
@@ -134,7 +134,6 @@ public:
   void select( const char *id, int id1, bool append = false );
 
 private:
   void select( const char *id, int id1, bool append = false );
 
 private:
-  SALOMEDS::Study_var        myStudy;
   SALOMEDS::StudyBuilder_var myStudyBuilder;
   SALOMEDS::SComponent_var   mySComponentMesh;
 };
   SALOMEDS::StudyBuilder_var myStudyBuilder;
   SALOMEDS::SComponent_var   mySComponentMesh;
 };
index ac732d4672e8f64d8626a71b65cd20528cbd8f98..fa59fbeaa8f5d1c3ca04dd97f3df67e806a17e03 100644 (file)
@@ -105,7 +105,7 @@ class SMESH_Swig
   SMESH_Swig();
   ~SMESH_Swig();
 
   SMESH_Swig();
   ~SMESH_Swig();
 
-  void Init(int studyID);
+  void Init();
 
   const char* AddNewMesh(const char* IOR);
   const char* AddNewHypothesis(const char* IOR);
 
   const char* AddNewMesh(const char* IOR);
   const char* AddNewHypothesis(const char* IOR);
index ba2e031ac96c00f8c70f1a5b408b45d1e26a4638..8d98249022e7c0f9b0028b576e6b394ed347d4c8 100644 (file)
@@ -155,7 +155,7 @@ namespace // internal utils
   class AdaptiveAlgo : public StdMeshers_Regular_1D
   {
   public:
   class AdaptiveAlgo : public StdMeshers_Regular_1D
   {
   public:
-    AdaptiveAlgo(int hypId, int studyId, SMESH_Gen* gen);
+    AdaptiveAlgo(int hypId, SMESH_Gen* gen);
     virtual bool Compute(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape );
     virtual bool Evaluate(SMESH_Mesh &         theMesh,
                           const TopoDS_Shape & theShape,
     virtual bool Compute(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape );
     virtual bool Evaluate(SMESH_Mesh &         theMesh,
                           const TopoDS_Shape & theShape,
@@ -916,9 +916,8 @@ namespace // internal utils
 //function : StdMeshers_Adaptive1D
 //purpose  : Constructor
 StdMeshers_Adaptive1D::StdMeshers_Adaptive1D(int         hypId,
 //function : StdMeshers_Adaptive1D
 //purpose  : Constructor
 StdMeshers_Adaptive1D::StdMeshers_Adaptive1D(int         hypId,
-                                             int         studyId,
                                              SMESH_Gen * gen)
                                              SMESH_Gen * gen)
-  :SMESH_Hypothesis(hypId, studyId, gen)
+  :SMESH_Hypothesis(hypId, gen)
 {
   myMinSize       = 1e-10;
   myMaxSize       = 1e+10;
 {
   myMinSize       = 1e-10;
   myMaxSize       = 1e+10;
@@ -1076,7 +1075,7 @@ SMESH_Algo* StdMeshers_Adaptive1D::GetAlgo() const
   if ( !myAlgo )
   {
     AdaptiveAlgo* newAlgo = 
   if ( !myAlgo )
   {
     AdaptiveAlgo* newAlgo = 
-      new AdaptiveAlgo( _gen->GetANewId(), _studyId, _gen );
+      new AdaptiveAlgo( _gen->GetANewId(), _gen );
     newAlgo->SetHypothesis( this );
 
     ((StdMeshers_Adaptive1D*) this)->myAlgo = newAlgo;
     newAlgo->SetHypothesis( this );
 
     ((StdMeshers_Adaptive1D*) this)->myAlgo = newAlgo;
@@ -1091,9 +1090,8 @@ SMESH_Algo* StdMeshers_Adaptive1D::GetAlgo() const
 //================================================================================
 
 AdaptiveAlgo::AdaptiveAlgo(int        hypId,
 //================================================================================
 
 AdaptiveAlgo::AdaptiveAlgo(int        hypId,
-                           int        studyId,
                            SMESH_Gen* gen)
                            SMESH_Gen* gen)
-  : StdMeshers_Regular_1D( hypId, studyId, gen ),
+  : StdMeshers_Regular_1D( hypId, gen ),
     myHyp(NULL)
 {
   _name = "AdaptiveAlgo_1D";
     myHyp(NULL)
 {
   _name = "AdaptiveAlgo_1D";
index 601aeae0b05198156e629cd5a9dbd573efa1e1f6..39ea38e876d641d9d9f7d4f25a593708f0d77b13 100644 (file)
@@ -37,7 +37,7 @@
 class STDMESHERS_EXPORT StdMeshers_Adaptive1D : public SMESH_Hypothesis
 {
  public:
 class STDMESHERS_EXPORT StdMeshers_Adaptive1D : public SMESH_Hypothesis
 {
  public:
-  StdMeshers_Adaptive1D(int hypId, int studyId, SMESH_Gen * gen);
+  StdMeshers_Adaptive1D(int hypId, SMESH_Gen * gen);
   ~StdMeshers_Adaptive1D();
 
   /*!
   ~StdMeshers_Adaptive1D();
 
   /*!
index a06202a8e925228ae6311d830df07c65f16bdfa8..629ade75fa65025f4555b14a9941a2594e882d97 100644 (file)
@@ -48,8 +48,8 @@ using namespace std;
  */
 //=============================================================================
 
  */
 //=============================================================================
 
-StdMeshers_Arithmetic1D::StdMeshers_Arithmetic1D(int hypId, int studyId, SMESH_Gen * gen)
-  :SMESH_Hypothesis(hypId, studyId, gen)
+StdMeshers_Arithmetic1D::StdMeshers_Arithmetic1D(int hypId, SMESH_Gen * gen)
+  :SMESH_Hypothesis(hypId, gen)
 {
   _begLength = 1.;
   _endLength = 10.;
 {
   _begLength = 1.;
   _endLength = 10.;
index 8705897525c16b78a1b2146e5cfe5444de22e87d..7dd89459be51a82dbc8a2f63047af03e44e8f2b6 100644 (file)
@@ -41,7 +41,7 @@ class STDMESHERS_EXPORT StdMeshers_Arithmetic1D:
   public SMESH_Hypothesis
 {
 public:
   public SMESH_Hypothesis
 {
 public:
-  StdMeshers_Arithmetic1D(int hypId, int studyId, SMESH_Gen* gen);
+  StdMeshers_Arithmetic1D(int hypId, SMESH_Gen* gen);
   virtual ~StdMeshers_Arithmetic1D();
 
   void SetLength(double length, bool isStartLength) throw(SALOME_Exception);
   virtual ~StdMeshers_Arithmetic1D();
 
   void SetLength(double length, bool isStartLength) throw(SALOME_Exception);
index ad5f5263f42152e2100bbfa441c0470d718e2e70..f3fb2428f65d1e1cc32d73a808977ad87c1f8f02 100644 (file)
@@ -47,8 +47,8 @@ using namespace std;
  */
 //=============================================================================
 
  */
 //=============================================================================
 
-StdMeshers_AutomaticLength::StdMeshers_AutomaticLength(int hypId, int studyId, SMESH_Gen * gen)
-  :SMESH_Hypothesis(hypId, studyId, gen)
+StdMeshers_AutomaticLength::StdMeshers_AutomaticLength(int hypId, SMESH_Gen * gen)
+  :SMESH_Hypothesis(hypId, gen)
 {
   _name = "AutomaticLength";
   _param_algo_dim = 1; // is used by SMESH_Regular_1D
 {
   _name = "AutomaticLength";
   _param_algo_dim = 1; // is used by SMESH_Regular_1D
index 2e30f8c106f4378a3ea97eb13a558444a3829839..f9188e374c07865f96bcfcd1f091fdd3f211f90c 100644 (file)
@@ -49,7 +49,7 @@ class TopoDS_TShape;
 class STDMESHERS_EXPORT StdMeshers_AutomaticLength:public SMESH_Hypothesis
 {
 public:
 class STDMESHERS_EXPORT StdMeshers_AutomaticLength:public SMESH_Hypothesis
 {
 public:
-  StdMeshers_AutomaticLength(int hypId, int studyId, SMESH_Gen * gen);
+  StdMeshers_AutomaticLength(int hypId, SMESH_Gen * gen);
   virtual ~ StdMeshers_AutomaticLength();
 
   /*!
   virtual ~ StdMeshers_AutomaticLength();
 
   /*!
index f55687ca3ead5a1d620edcf7fa12213d71735f36..ea5f440cc8cca93ae7e1bffa801260ae6ffa0cda 100644 (file)
@@ -61,9 +61,8 @@ using namespace std;
 //=======================================================================
 
 StdMeshers_CartesianParameters3D::StdMeshers_CartesianParameters3D(int         hypId,
 //=======================================================================
 
 StdMeshers_CartesianParameters3D::StdMeshers_CartesianParameters3D(int         hypId,
-                                                                   int         studyId,
                                                                    SMESH_Gen * gen)
                                                                    SMESH_Gen * gen)
-  : SMESH_Hypothesis(hypId, studyId, gen),
+  : SMESH_Hypothesis(hypId, gen),
     _sizeThreshold( 4.0 ), // default according to the customer specification
     _toAddEdges( false )
 {
     _sizeThreshold( 4.0 ), // default according to the customer specification
     _toAddEdges( false )
 {
index f87cd346bc17e602274ef88f4f5e82f4f02049b3..e5ef065ccd75b3942a6701bbc032e1fb95c21621 100644 (file)
@@ -49,7 +49,7 @@ class STDMESHERS_EXPORT StdMeshers_CartesianParameters3D:  public SMESH_Hypothes
 {
 public:
   // Constructor
 {
 public:
   // Constructor
-  StdMeshers_CartesianParameters3D( int hypId, int studyId, SMESH_Gen * gen );
+  StdMeshers_CartesianParameters3D( int hypId, SMESH_Gen * gen );
 
   /*!
    * Sets coordinates of node positions along an axis (countered from 0)
 
   /*!
    * Sets coordinates of node positions along an axis (countered from 0)
index aebd779eea189c77019b1ac01a7b7bc6ea636687..4220d7d18211ae7f39086b4c9a860b2e8d4a681b 100644 (file)
@@ -108,8 +108,8 @@ using namespace std;
  */
 //=============================================================================
 
  */
 //=============================================================================
 
-StdMeshers_Cartesian_3D::StdMeshers_Cartesian_3D(int hypId, int studyId, SMESH_Gen * gen)
-  :SMESH_3D_Algo(hypId, studyId, gen)
+StdMeshers_Cartesian_3D::StdMeshers_Cartesian_3D(int hypId, SMESH_Gen * gen)
+  :SMESH_3D_Algo(hypId, gen)
 {
   _name = "Cartesian_3D";
   _shapeType = (1 << TopAbs_SOLID);       // 1 bit /shape type
 {
   _name = "Cartesian_3D";
   _shapeType = (1 << TopAbs_SOLID);       // 1 bit /shape type
index 2cc4855015a0bad836c02ca2f8cf002939358366..91e0587127116256c9ac7977d17432f1a2330bae 100644 (file)
@@ -41,7 +41,7 @@ class StdMeshers_CartesianParameters3D;
 class STDMESHERS_EXPORT StdMeshers_Cartesian_3D : public SMESH_3D_Algo
 {
 public:
 class STDMESHERS_EXPORT StdMeshers_Cartesian_3D : public SMESH_3D_Algo
 {
 public:
-  StdMeshers_Cartesian_3D(int hypId, int studyId, SMESH_Gen* gen);
+  StdMeshers_Cartesian_3D(int hypId, SMESH_Gen* gen);
 
   virtual bool CheckHypothesis(SMESH_Mesh&         aMesh,
                                const TopoDS_Shape& aShape,
 
   virtual bool CheckHypothesis(SMESH_Mesh&         aMesh,
                                const TopoDS_Shape& aShape,
index d80d072a928b1ff93f40043b8857f985d95e910a..431de7ef9cc0bc1cf66e6e043eda2a246b5bf5cb 100644 (file)
@@ -267,8 +267,8 @@ private:
  */
 //================================================================================
 
  */
 //================================================================================
 
-StdMeshers_CompositeHexa_3D::StdMeshers_CompositeHexa_3D(int hypId, int studyId, SMESH_Gen* gen)
-  :SMESH_3D_Algo(hypId, studyId, gen)
+StdMeshers_CompositeHexa_3D::StdMeshers_CompositeHexa_3D(int hypId, SMESH_Gen* gen)
+  :SMESH_3D_Algo(hypId, gen)
 {
   _name = "CompositeHexa_3D";
   _shapeType = (1 << TopAbs_SHELL) | (1 << TopAbs_SOLID);       // 1 bit /shape type
 {
   _name = "CompositeHexa_3D";
   _shapeType = (1 << TopAbs_SHELL) | (1 << TopAbs_SOLID);       // 1 bit /shape type
index f1082b73f02278a6c628ec363925a5b74f2913b7..0b8e8f80d0a6e8a38325bfde41e609a175c27776 100644 (file)
@@ -42,7 +42,7 @@ struct _QuadFaceGrid;
 class STDMESHERS_EXPORT StdMeshers_CompositeHexa_3D: public SMESH_3D_Algo
 {
 public:
 class STDMESHERS_EXPORT StdMeshers_CompositeHexa_3D: public SMESH_3D_Algo
 {
 public:
-  StdMeshers_CompositeHexa_3D(int hypId, int studyId, SMESH_Gen* gen);
+  StdMeshers_CompositeHexa_3D(int hypId, SMESH_Gen* gen);
   //virtual ~StdMeshers_CompositeHexa_3D();
 
   virtual bool Compute(SMESH_Mesh&         aMesh,
   //virtual ~StdMeshers_CompositeHexa_3D();
 
   virtual bool Compute(SMESH_Mesh&         aMesh,
index 9a66a56334c295bb11f540a4f5269b1fcdc3edfc..3992bc81add4db55f2f1c76d67818ecdc66049dc 100644 (file)
@@ -243,9 +243,8 @@ namespace {
 //=============================================================================
 
 StdMeshers_CompositeSegment_1D::StdMeshers_CompositeSegment_1D(int         hypId,
 //=============================================================================
 
 StdMeshers_CompositeSegment_1D::StdMeshers_CompositeSegment_1D(int         hypId,
-                                                               int         studyId,
                                                                SMESH_Gen * gen)
                                                                SMESH_Gen * gen)
-  :StdMeshers_Regular_1D(hypId, studyId, gen)
+  :StdMeshers_Regular_1D(hypId, gen)
 {
   _name = AlgoName();
 }
 {
   _name = AlgoName();
 }
index 5380a65f551ada40df36f02ec855545f1d43efbd..86436bd1839f727ca631f73ac23504b81d98de43 100644 (file)
@@ -39,7 +39,7 @@ class TopoDS_Face;
 class STDMESHERS_EXPORT StdMeshers_CompositeSegment_1D: public StdMeshers_Regular_1D
 {
 public:
 class STDMESHERS_EXPORT StdMeshers_CompositeSegment_1D: public StdMeshers_Regular_1D
 {
 public:
-  StdMeshers_CompositeSegment_1D(int hypId, int studyId, SMESH_Gen* gen);
+  StdMeshers_CompositeSegment_1D(int hypId, SMESH_Gen* gen);
 
   virtual bool Compute(SMESH_Mesh&         aMesh,
                        const TopoDS_Shape& aShape);
 
   virtual bool Compute(SMESH_Mesh&         aMesh,
                        const TopoDS_Shape& aShape);
index 6181e8cbf2c9e742d2cdaaed52490592ecd45b0e..2db55f223e851bd1e93d654b06e7fd762b79d8d8 100644 (file)
@@ -50,9 +50,8 @@ using namespace std;
 //=============================================================================
 
 StdMeshers_Deflection1D::StdMeshers_Deflection1D(int         hypId,
 //=============================================================================
 
 StdMeshers_Deflection1D::StdMeshers_Deflection1D(int         hypId,
-                                                 int         studyId,
                                                  SMESH_Gen * gen)
                                                  SMESH_Gen * gen)
-     :SMESH_Hypothesis(hypId, studyId, gen)
+     :SMESH_Hypothesis(hypId, gen)
 {
   _value = 1.;
   _name = "Deflection1D";
 {
   _value = 1.;
   _name = "Deflection1D";
index 664a4a094712833deb6fe53de35c317a667e279f..34a2d34ee65c110b8fca2dc58ea4f87725b181a3 100644 (file)
@@ -35,7 +35,7 @@
 class STDMESHERS_EXPORT StdMeshers_Deflection1D:public SMESH_Hypothesis
 {
  public:
 class STDMESHERS_EXPORT StdMeshers_Deflection1D:public SMESH_Hypothesis
 {
  public:
-  StdMeshers_Deflection1D(int hypId, int studyId, SMESH_Gen * gen);
+  StdMeshers_Deflection1D(int hypId, SMESH_Gen * gen);
   virtual ~ StdMeshers_Deflection1D();
 
   void SetDeflection(double value) throw(SALOME_Exception);
   virtual ~ StdMeshers_Deflection1D();
 
   void SetDeflection(double value) throw(SALOME_Exception);
index e316cb11af7bee8039e66d0d8c10d8a935207fa6..9f32b2d862f8196203af2e5d7e31644fb313448d 100644 (file)
@@ -35,9 +35,9 @@ using namespace std;
  */
 //=============================================================================
 
  */
 //=============================================================================
 
-StdMeshers_FixedPoints1D::StdMeshers_FixedPoints1D(int hypId, int studyId,
+StdMeshers_FixedPoints1D::StdMeshers_FixedPoints1D(int hypId,
                                                    SMESH_Gen * gen)
                                                    SMESH_Gen * gen)
-  :SMESH_Hypothesis(hypId, studyId, gen)
+  :SMESH_Hypothesis(hypId, gen)
 {
   _name = "FixedPoints1D";
   _param_algo_dim = 1;
 {
   _name = "FixedPoints1D";
   _param_algo_dim = 1;
index 4855f03074fc8ad227b42f42616cfd3ac390107f..f8d8f6a755962e37aa44bf311a0b8730db669b56 100644 (file)
@@ -38,7 +38,7 @@ class STDMESHERS_EXPORT StdMeshers_FixedPoints1D:
   public SMESH_Hypothesis
 {
 public:
   public SMESH_Hypothesis
 {
 public:
-  StdMeshers_FixedPoints1D(int hypId, int studyId, SMESH_Gen* gen);
+  StdMeshers_FixedPoints1D(int hypId, SMESH_Gen* gen);
   virtual ~StdMeshers_FixedPoints1D();
 
   void SetPoints(std::vector<double>& listParams)
   virtual ~StdMeshers_FixedPoints1D();
 
   void SetPoints(std::vector<double>& listParams)
index 33b091783985e0b21ca881ca7a118ff52eed1511..b7eafade5dd0f93c4e122ff3f09810cd17180009 100644 (file)
@@ -42,8 +42,8 @@
  */
 //=============================================================================
 
  */
 //=============================================================================
 
-StdMeshers_Geometric1D::StdMeshers_Geometric1D(int hypId, int studyId, SMESH_Gen * gen)
-  :StdMeshers_Reversible1D(hypId, studyId, gen)
+StdMeshers_Geometric1D::StdMeshers_Geometric1D(int hypId, SMESH_Gen * gen)
+  :StdMeshers_Reversible1D(hypId, gen)
 {
   _begLength = 1.;
   _ratio = 1.;
 {
   _begLength = 1.;
   _ratio = 1.;
index 1dc38b1e2443a9c9ef07d05db745f22393999826..8810ad9855ffa7c9c629ca1a34a5e1f61ad964ca 100644 (file)
@@ -35,7 +35,7 @@
 class STDMESHERS_EXPORT StdMeshers_Geometric1D: public StdMeshers_Reversible1D
 {
 public:
 class STDMESHERS_EXPORT StdMeshers_Geometric1D: public StdMeshers_Reversible1D
 {
 public:
-  StdMeshers_Geometric1D(int hypId, int studyId, SMESH_Gen* gen);
+  StdMeshers_Geometric1D(int hypId, SMESH_Gen* gen);
 
   void SetStartLength(double length) throw(SALOME_Exception);
   void SetCommonRatio(double factor) throw(SALOME_Exception);
 
   void SetStartLength(double length) throw(SALOME_Exception);
   void SetCommonRatio(double factor) throw(SALOME_Exception);
index 12ae7326fe23332323e1de39f919cb7ae1efed15..13c897d1828ed487c7f44f699420bddea39fbc85 100644 (file)
@@ -1022,8 +1022,8 @@ namespace
 //purpose  : 
 //=======================================================================
 
 //purpose  : 
 //=======================================================================
 
-StdMeshers_HexaFromSkin_3D::StdMeshers_HexaFromSkin_3D(int hypId, int studyId, SMESH_Gen* gen)
-  :SMESH_3D_Algo(hypId, studyId, gen)
+StdMeshers_HexaFromSkin_3D::StdMeshers_HexaFromSkin_3D(int hypId, SMESH_Gen* gen)
+  :SMESH_3D_Algo(hypId, gen)
 {
   _name = "HexaFromSkin_3D";
 }
 {
   _name = "HexaFromSkin_3D";
 }
index d694319772d86165ccc29e939f6e148fd7be17f2..e530ffeb159703b37d3016fdf3215f9573a24484 100644 (file)
@@ -34,7 +34,7 @@
 class STDMESHERS_EXPORT StdMeshers_HexaFromSkin_3D : public SMESH_3D_Algo
 {
 public:
 class STDMESHERS_EXPORT StdMeshers_HexaFromSkin_3D : public SMESH_3D_Algo
 {
 public:
-  StdMeshers_HexaFromSkin_3D(int hypId, int studyId, SMESH_Gen* gen);
+  StdMeshers_HexaFromSkin_3D(int hypId, SMESH_Gen* gen);
   virtual ~StdMeshers_HexaFromSkin_3D();
 
   virtual bool Compute(SMESH_Mesh & aMesh, SMESH_MesherHelper* aHelper);
   virtual ~StdMeshers_HexaFromSkin_3D();
 
   virtual bool Compute(SMESH_Mesh & aMesh, SMESH_MesherHelper* aHelper);
index 335a36a788b8cea444ca57efa21dc221dca77efd..a968121c58e6fda028db3d8c65cee8487daacbef 100644 (file)
@@ -70,8 +70,8 @@ static bool EvaluatePentahedralMesh(SMESH_Mesh &, const TopoDS_Shape &,
  */
 //=============================================================================
 
  */
 //=============================================================================
 
-StdMeshers_Hexa_3D::StdMeshers_Hexa_3D(int hypId, int studyId, SMESH_Gen * gen)
-  :SMESH_3D_Algo(hypId, studyId, gen)
+StdMeshers_Hexa_3D::StdMeshers_Hexa_3D(int hypId, SMESH_Gen * gen)
+  :SMESH_3D_Algo(hypId, gen)
 {
   _name = "Hexa_3D";
   _shapeType = (1 << TopAbs_SHELL) | (1 << TopAbs_SOLID);       // 1 bit /shape type
 {
   _name = "Hexa_3D";
   _shapeType = (1 << TopAbs_SHELL) | (1 << TopAbs_SOLID);       // 1 bit /shape type
@@ -367,7 +367,7 @@ bool StdMeshers_Hexa_3D::Compute(SMESH_Mesh &         aMesh,
   TopExp::MapShapes( aShape, TopAbs_FACE, FF);
   if ( FF.Extent() != 6)
   {
   TopExp::MapShapes( aShape, TopAbs_FACE, FF);
   if ( FF.Extent() != 6)
   {
-    static StdMeshers_CompositeHexa_3D compositeHexa(_gen->GetANewId(), 0, _gen);
+    static StdMeshers_CompositeHexa_3D compositeHexa(_gen->GetANewId(), _gen);
     if ( !compositeHexa.Compute( aMesh, aShape ))
       return error( compositeHexa.GetComputeError() );
     return true;
     if ( !compositeHexa.Compute( aMesh, aShape ))
       return error( compositeHexa.GetComputeError() );
     return true;
@@ -377,7 +377,7 @@ bool StdMeshers_Hexa_3D::Compute(SMESH_Mesh &         aMesh,
   // ---------------------
   
   FaceQuadStructPtr quad[ 6 ];
   // ---------------------
   
   FaceQuadStructPtr quad[ 6 ];
-  StdMeshers_Quadrangle_2D quadAlgo( _gen->GetANewId(), GetStudyId(), _gen);
+  StdMeshers_Quadrangle_2D quadAlgo( _gen->GetANewId(), _gen);
   for ( int i = 0; i < 6; ++i )
   {
     if ( !( quad[i] = FaceQuadStructPtr( quadAlgo.CheckNbEdges( aMesh, FF( i+1 ),
   for ( int i = 0; i < 6; ++i )
   {
     if ( !( quad[i] = FaceQuadStructPtr( quadAlgo.CheckNbEdges( aMesh, FF( i+1 ),
@@ -699,7 +699,7 @@ bool StdMeshers_Hexa_3D::Evaluate(SMESH_Mesh & aMesh,
   }
   if (meshFaces.size() != 6) {
     //return error(COMPERR_BAD_SHAPE, TComm(meshFaces.size())<<" instead of 6 faces in a block");
   }
   if (meshFaces.size() != 6) {
     //return error(COMPERR_BAD_SHAPE, TComm(meshFaces.size())<<" instead of 6 faces in a block");
-    static StdMeshers_CompositeHexa_3D compositeHexa(-10, 0, aMesh.GetGen());
+    static StdMeshers_CompositeHexa_3D compositeHexa(-10, aMesh.GetGen());
     return compositeHexa.Evaluate(aMesh, aShape, aResMap);
   }
   
     return compositeHexa.Evaluate(aMesh, aShape, aResMap);
   }
   
@@ -809,7 +809,7 @@ bool StdMeshers_Hexa_3D::Compute(SMESH_Mesh & aMesh, SMESH_MesherHelper* aHelper
   static StdMeshers_HexaFromSkin_3D * algo = 0;
   if ( !algo ) {
     SMESH_Gen* gen = aMesh.GetGen();
   static StdMeshers_HexaFromSkin_3D * algo = 0;
   if ( !algo ) {
     SMESH_Gen* gen = aMesh.GetGen();
-    algo = new StdMeshers_HexaFromSkin_3D( gen->GetANewId(), 0, gen );
+    algo = new StdMeshers_HexaFromSkin_3D( gen->GetANewId(), gen );
   }
   algo->InitComputeError();
   algo->Compute( aMesh, aHelper );
   }
   algo->InitComputeError();
   algo->Compute( aMesh, aHelper );
@@ -877,7 +877,7 @@ SMESH_ComputeErrorPtr ComputePentahedralMesh(SMESH_Mesh &          aMesh,
     static StdMeshers_Prism_3D * aPrism3D = 0;
     if ( !aPrism3D ) {
       SMESH_Gen* gen = aMesh.GetGen();
     static StdMeshers_Prism_3D * aPrism3D = 0;
     if ( !aPrism3D ) {
       SMESH_Gen* gen = aMesh.GetGen();
-      aPrism3D = new StdMeshers_Prism_3D( gen->GetANewId(), 0, gen );
+      aPrism3D = new StdMeshers_Prism_3D( gen->GetANewId(), gen );
     }
     SMESH_Hypothesis::Hypothesis_Status aStatus;
     if ( aPrism3D->CheckHypothesis( aMesh, aShape, aStatus ) ) {
     }
     SMESH_Hypothesis::Hypothesis_Status aStatus;
     if ( aPrism3D->CheckHypothesis( aMesh, aShape, aStatus ) ) {
@@ -908,7 +908,7 @@ bool EvaluatePentahedralMesh(SMESH_Mesh & aMesh,
     static StdMeshers_Prism_3D * aPrism3D = 0;
     if ( !aPrism3D ) {
       SMESH_Gen* gen = aMesh.GetGen();
     static StdMeshers_Prism_3D * aPrism3D = 0;
     if ( !aPrism3D ) {
       SMESH_Gen* gen = aMesh.GetGen();
-      aPrism3D = new StdMeshers_Prism_3D( gen->GetANewId(), 0, gen );
+      aPrism3D = new StdMeshers_Prism_3D( gen->GetANewId(), gen );
     }
     SMESH_Hypothesis::Hypothesis_Status aStatus;
     if ( aPrism3D->CheckHypothesis( aMesh, aShape, aStatus ) ) {
     }
     SMESH_Hypothesis::Hypothesis_Status aStatus;
     if ( aPrism3D->CheckHypothesis( aMesh, aShape, aStatus ) ) {
index 8b50468b7c37625f48e238987b1709f2de9bc491..2f50e330f7eba7f3ed0246cd679e3faa2f2c2c15 100644 (file)
@@ -40,7 +40,7 @@ class SMESH_MesherHelper;
 class STDMESHERS_EXPORT StdMeshers_Hexa_3D : public SMESH_3D_Algo
 {
 public:
 class STDMESHERS_EXPORT StdMeshers_Hexa_3D : public SMESH_3D_Algo
 {
 public:
-  StdMeshers_Hexa_3D(int hypId, int studyId, SMESH_Gen* gen);
+  StdMeshers_Hexa_3D(int hypId, SMESH_Gen* gen);
   virtual ~StdMeshers_Hexa_3D();
 
   virtual bool CheckHypothesis(SMESH_Mesh& aMesh,
   virtual ~StdMeshers_Hexa_3D();
 
   virtual bool CheckHypothesis(SMESH_Mesh& aMesh,
index 0ee9c4b4130e3c4d3a657be6f6de35863f08739d..b737c57563a678fa75902b47adb47b337181e2e6 100644 (file)
@@ -49,9 +49,8 @@ using namespace std;
 //=============================================================================
 
 StdMeshers_ImportSource1D::StdMeshers_ImportSource1D(int         hypId,
 //=============================================================================
 
 StdMeshers_ImportSource1D::StdMeshers_ImportSource1D(int         hypId,
-                                                     int         studyId,
                                                      SMESH_Gen * gen)
                                                      SMESH_Gen * gen)
-  :SMESH_Hypothesis(hypId, studyId, gen),
+  :SMESH_Hypothesis(hypId, gen),
    _toCopyMesh(false),
    _toCopyGroups(false)
 {
    _toCopyMesh(false),
    _toCopyGroups(false)
 {
@@ -66,9 +65,8 @@ StdMeshers_ImportSource1D::StdMeshers_ImportSource1D(int         hypId,
 //=============================================================================
 
 StdMeshers_ImportSource2D::StdMeshers_ImportSource2D(int         hypId,
 //=============================================================================
 
 StdMeshers_ImportSource2D::StdMeshers_ImportSource2D(int         hypId,
-                                                     int         studyId,
                                                      SMESH_Gen * gen)
                                                      SMESH_Gen * gen)
-  :StdMeshers_ImportSource1D(hypId, studyId, gen)
+  :StdMeshers_ImportSource1D(hypId, gen)
 {
   _name = "ImportSource2D";
   _param_algo_dim = 2; // is used by StdMeshers_Import_2D;
 {
   _name = "ImportSource2D";
   _param_algo_dim = 2; // is used by StdMeshers_Import_2D;
@@ -206,7 +204,7 @@ const std::vector<SMESH_Group*>&  StdMeshers_ImportSource1D::GetGroups(bool load
 {
   // filter off deleted groups
   vector<SMESH_Group*> okGroups = getValidGroups( _groups,
 {
   // filter off deleted groups
   vector<SMESH_Group*> okGroups = getValidGroups( _groups,
-                                                  _gen->GetStudyContext(_studyId),
+                                                  _gen->GetStudyContext(),
                                                   loaded);
   if ( okGroups.size() != _groups.size() )
     ((StdMeshers_ImportSource1D*)this)->_groups = okGroups;
                                                   loaded);
   if ( okGroups.size() != _groups.size() )
     ((StdMeshers_ImportSource1D*)this)->_groups = okGroups;
@@ -247,7 +245,7 @@ std::vector<SMESH_Mesh*> StdMeshers_ImportSource1D::GetSourceMeshes() const
   vector<SMESH_Mesh*> meshes;
   if ( !meshIDs.empty() )
   {
   vector<SMESH_Mesh*> meshes;
   if ( !meshIDs.empty() )
   {
-    StudyContextStruct* studyContext = _gen->GetStudyContext(_studyId);
+    StudyContextStruct* studyContext = _gen->GetStudyContext();
     for ( set<int>::iterator id = meshIDs.begin(); id != meshIDs.end(); ++id )
     {
       map<int, SMESH_Mesh*>::iterator itm = studyContext->mapMesh.begin();
     for ( set<int>::iterator id = meshIDs.begin(); id != meshIDs.end(); ++id )
     {
       map<int, SMESH_Mesh*>::iterator itm = studyContext->mapMesh.begin();
@@ -400,7 +398,7 @@ void StdMeshers_ImportSource1D::RestoreGroups(const std::vector<SMESH_Group*>& g
     int key1 = _resultGroupsStorage[i++];
     int key2 = _resultGroupsStorage[i++];
     pair<int, int> resMapKey( key1, key2 );
     int key1 = _resultGroupsStorage[i++];
     int key2 = _resultGroupsStorage[i++];
     pair<int, int> resMapKey( key1, key2 );
-    SMESH_Mesh* mesh = getTgtMeshByKey( resMapKey, _gen->GetStudyContext(_studyId));
+    SMESH_Mesh* mesh = getTgtMeshByKey( resMapKey, _gen->GetStudyContext());
     // restore mesh ids at least
     _resultGroups.insert( make_pair (resMapKey,vector<SMESH_Group*>() )); 
 
     // restore mesh ids at least
     _resultGroups.insert( make_pair (resMapKey,vector<SMESH_Group*>() )); 
 
@@ -463,7 +461,7 @@ StdMeshers_ImportSource1D::GetResultGroups(const SMESHDS_Mesh& srcMesh,
   if ( key2groups == _resultGroups.end() )
     return 0;
   vector<SMESH_Group*> vec = getValidGroups((*key2groups).second,
   if ( key2groups == _resultGroups.end() )
     return 0;
   vector<SMESH_Group*> vec = getValidGroups((*key2groups).second,
-                                            _gen->GetStudyContext(_studyId) );
+                                            _gen->GetStudyContext() );
   if ( vec.size() != key2groups->second.size())
     key2groups->second = vec;
 
   if ( vec.size() != key2groups->second.size())
     key2groups->second = vec;
 
index c4d40d00586a7abab27740c9dac0af4603dc485a..cb2febf3b8524c74423f439c61bb044f8ed7447a 100644 (file)
@@ -48,7 +48,7 @@ class SMESH_subMesh;
 class STDMESHERS_EXPORT StdMeshers_ImportSource1D : public SMESH_Hypothesis
 {
  public:
 class STDMESHERS_EXPORT StdMeshers_ImportSource1D : public SMESH_Hypothesis
 {
  public:
-  StdMeshers_ImportSource1D(int hypId, int studyId, SMESH_Gen * gen);
+  StdMeshers_ImportSource1D(int hypId, SMESH_Gen * gen);
   virtual ~ StdMeshers_ImportSource1D();
 
   void SetGroups(const std::vector<SMESH_Group*>& groups);
   virtual ~ StdMeshers_ImportSource1D();
 
   void SetGroups(const std::vector<SMESH_Group*>& groups);
@@ -95,6 +95,6 @@ private:
 class STDMESHERS_EXPORT StdMeshers_ImportSource2D : public StdMeshers_ImportSource1D
 {
  public:
 class STDMESHERS_EXPORT StdMeshers_ImportSource2D : public StdMeshers_ImportSource1D
 {
  public:
-  StdMeshers_ImportSource2D(int hypId, int studyId, SMESH_Gen * gen);
+  StdMeshers_ImportSource2D(int hypId, SMESH_Gen * gen);
 };
 #endif
 };
 #endif
index 193448010e2ca3ae596a8d70a97d2678e8215c41..61b6cf65b7bca7c20f4ce2b8ec81256b86d86387 100644 (file)
@@ -60,8 +60,8 @@ using namespace std;
  */
 //=============================================================================
 
  */
 //=============================================================================
 
-StdMeshers_Import_1D::StdMeshers_Import_1D(int hypId, int studyId, SMESH_Gen * gen)
-  :SMESH_1D_Algo(hypId, studyId, gen), _sourceHyp(0)
+StdMeshers_Import_1D::StdMeshers_Import_1D(int hypId, SMESH_Gen * gen)
+  :SMESH_1D_Algo(hypId, gen), _sourceHyp(0)
 {
   _name = "Import_1D";
   _shapeType = (1 << TopAbs_EDGE);
 {
   _name = "Import_1D";
   _shapeType = (1 << TopAbs_EDGE);
index 2c016630848dea419d60d36c62e71b0ff82b25c7..bbd752247c0624b7ac082e73e494cb325d355c3e 100644 (file)
@@ -39,7 +39,7 @@ class StdMeshers_ImportSource1D;
 class STDMESHERS_EXPORT StdMeshers_Import_1D: public SMESH_1D_Algo
 {
 public:
 class STDMESHERS_EXPORT StdMeshers_Import_1D: public SMESH_1D_Algo
 {
 public:
-  StdMeshers_Import_1D(int hypId, int studyId, SMESH_Gen* gen);
+  StdMeshers_Import_1D(int hypId, SMESH_Gen* gen);
 
   virtual bool CheckHypothesis(SMESH_Mesh& aMesh,
                                const TopoDS_Shape& aShape,
 
   virtual bool CheckHypothesis(SMESH_Mesh& aMesh,
                                const TopoDS_Shape& aShape,
index 0d4a369e881b5970018fe4e2d679ea76caefd457..e0e2df6664e4181ebdf98d7e3cc4fc5f1133c272 100644 (file)
@@ -95,8 +95,8 @@ namespace
  */
 //=============================================================================
 
  */
 //=============================================================================
 
-StdMeshers_Import_1D2D::StdMeshers_Import_1D2D(int hypId, int studyId, SMESH_Gen * gen)
-  :SMESH_2D_Algo(hypId, studyId, gen), _sourceHyp(0)
+StdMeshers_Import_1D2D::StdMeshers_Import_1D2D(int hypId, SMESH_Gen * gen)
+  :SMESH_2D_Algo(hypId, gen), _sourceHyp(0)
 {
   _name = "Import_1D2D";
   _shapeType = (1 << TopAbs_FACE);
 {
   _name = "Import_1D2D";
   _shapeType = (1 << TopAbs_FACE);
index a260f1d2d7cd69104b5e465005ca4a79eb89208e..8dc16d87e10e9e289767acab00e42bad821bbea9 100644 (file)
@@ -39,7 +39,7 @@ class StdMeshers_ImportSource1D;
 class STDMESHERS_EXPORT StdMeshers_Import_1D2D: public SMESH_2D_Algo
 {
 public:
 class STDMESHERS_EXPORT StdMeshers_Import_1D2D: public SMESH_2D_Algo
 {
 public:
-  StdMeshers_Import_1D2D(int hypId, int studyId, SMESH_Gen* gen);
+  StdMeshers_Import_1D2D(int hypId, SMESH_Gen* gen);
 
   virtual bool CheckHypothesis(SMESH_Mesh& aMesh,
                                const TopoDS_Shape& aShape,
 
   virtual bool CheckHypothesis(SMESH_Mesh& aMesh,
                                const TopoDS_Shape& aShape,
index 05f0b2fd62e1503d9d1878e190155d364c8ba8c9..8a12ac3d2e3abaa5f9a37a4d6c64a13c8bb497bd 100644 (file)
@@ -40,9 +40,9 @@ using namespace std;
  */
 //=============================================================================
 
  */
 //=============================================================================
 
-StdMeshers_LayerDistribution::StdMeshers_LayerDistribution(int hypId, int studyId,
+StdMeshers_LayerDistribution::StdMeshers_LayerDistribution(int hypId,
                                                            SMESH_Gen * gen)
                                                            SMESH_Gen * gen)
-  : SMESH_Hypothesis(hypId, studyId, gen)
+  : SMESH_Hypothesis(hypId, gen)
 {
   _name = "LayerDistribution"; // used by RadialPrism_3D
   _param_algo_dim = 3; // 3D
 {
   _name = "LayerDistribution"; // used by RadialPrism_3D
   _param_algo_dim = 3; // 3D
index 8f7fb5e970a7aafc81b233d51ad056484026f4d7..7e3fe8384ed5a4c0a85363a497647c1aea98af1b 100644 (file)
@@ -51,7 +51,7 @@ class STDMESHERS_EXPORT StdMeshers_LayerDistribution:  public SMESH_Hypothesis
 {
 public:
   // Constructor
 {
 public:
   // Constructor
-  StdMeshers_LayerDistribution( int hypId, int studyId, SMESH_Gen * gen );
+  StdMeshers_LayerDistribution( int hypId, SMESH_Gen * gen );
   // Destructor
   virtual ~StdMeshers_LayerDistribution();
 
   // Destructor
   virtual ~StdMeshers_LayerDistribution();
 
index 664995684537c90450d3f1f3976160a2d17567bf..75cdd43f962604a927c39420d951d37a814bfa1f 100644 (file)
@@ -36,9 +36,8 @@
 //=============================================================================
 
 StdMeshers_LayerDistribution2D::StdMeshers_LayerDistribution2D(int hypId,
 //=============================================================================
 
 StdMeshers_LayerDistribution2D::StdMeshers_LayerDistribution2D(int hypId,
-                                                               int studyId,
                                                                SMESH_Gen * gen)
                                                                SMESH_Gen * gen)
-  : StdMeshers_LayerDistribution(hypId, studyId, gen)
+  : StdMeshers_LayerDistribution(hypId, gen)
 {
   _name = "LayerDistribution2D"; // used by RadialQuadrangle_1D2D
   _param_algo_dim = 2; // 2D
 {
   _name = "LayerDistribution2D"; // used by RadialQuadrangle_1D2D
   _param_algo_dim = 2; // 2D
index 91510d103d488d6c4f9fba3d4e07165d509e1380..704b59f5e72dfa26ea5228eaf1ebc832c7fa707f 100644 (file)
@@ -43,7 +43,7 @@ class STDMESHERS_EXPORT StdMeshers_LayerDistribution2D
 {
 public:
   // Constructor
 {
 public:
   // Constructor
-  StdMeshers_LayerDistribution2D(int hypId, int studyId, SMESH_Gen* gen);
+  StdMeshers_LayerDistribution2D(int hypId, SMESH_Gen* gen);
   // Destructor
   virtual ~StdMeshers_LayerDistribution2D();
 
   // Destructor
   virtual ~StdMeshers_LayerDistribution2D();
 
index 026d858ae7d0006b03f784608cc4eebc0c436db7..3bcb1f6e5ed69f5ef28c549d765b95ab1238cb7f 100644 (file)
@@ -38,8 +38,8 @@ using namespace std;
  */
 //=============================================================================
 
  */
 //=============================================================================
 
-StdMeshers_LengthFromEdges::StdMeshers_LengthFromEdges(int hypId, int studyId, SMESH_Gen* gen)
-  : SMESH_Hypothesis(hypId, studyId, gen)
+StdMeshers_LengthFromEdges::StdMeshers_LengthFromEdges(int hypId, SMESH_Gen* gen)
+  : SMESH_Hypothesis(hypId, gen)
 {
   _mode =1;
   _name = "LengthFromEdges";
 {
   _mode =1;
   _name = "LengthFromEdges";
index 1d210433cb4937eb4286ff890e4d477d79fdab91..7b7cd162dda6b77657616a1b32205549849e6e20 100644 (file)
@@ -38,7 +38,7 @@ class STDMESHERS_EXPORT StdMeshers_LengthFromEdges:
   public SMESH_Hypothesis
 {
 public:
   public SMESH_Hypothesis
 {
 public:
-  StdMeshers_LengthFromEdges(int hypId, int studyId, SMESH_Gen* gen);
+  StdMeshers_LengthFromEdges(int hypId, SMESH_Gen* gen);
   virtual ~StdMeshers_LengthFromEdges();
 
   void SetMode(int mode)
   virtual ~StdMeshers_LengthFromEdges();
 
   void SetMode(int mode)
index d4ebdfb0afb94f1ac27522bbbc1af8f6ecf312a9..898d940f4ed19d14b6dfa7559b0aaa52112b755b 100644 (file)
@@ -52,8 +52,8 @@ using namespace std;
  */
 //=============================================================================
 
  */
 //=============================================================================
 
-StdMeshers_LocalLength::StdMeshers_LocalLength(int hypId, int studyId, SMESH_Gen * gen)
-  :SMESH_Hypothesis(hypId, studyId, gen)
+StdMeshers_LocalLength::StdMeshers_LocalLength(int hypId, SMESH_Gen * gen)
+  :SMESH_Hypothesis(hypId, gen)
 {
   _length = 1.;
   _precision = Precision::Confusion();
 {
   _length = 1.;
   _precision = Precision::Confusion();
index c6de5797be915781f04442db175dd1b1cb8b5312..29f6b166dd2fd873e2efa8fd4363c91de9b68965 100644 (file)
@@ -37,7 +37,7 @@
 class STDMESHERS_EXPORT StdMeshers_LocalLength: public SMESH_Hypothesis
 {
  public:
 class STDMESHERS_EXPORT StdMeshers_LocalLength: public SMESH_Hypothesis
 {
  public:
-  StdMeshers_LocalLength(int hypId, int studyId, SMESH_Gen * gen);
+  StdMeshers_LocalLength(int hypId, SMESH_Gen * gen);
   virtual ~ StdMeshers_LocalLength();
 
   void SetLength(double length) throw(SALOME_Exception);
   virtual ~ StdMeshers_LocalLength();
 
   void SetLength(double length) throw(SALOME_Exception);
index 972d4b12c04314e0fdf18256625d2a0da1cc0f40..50b79a6cc568381eb920532ff618b3eac746d316 100644 (file)
@@ -79,8 +79,8 @@ using namespace std;
  */
 //=============================================================================
 
  */
 //=============================================================================
 
-StdMeshers_MEFISTO_2D::StdMeshers_MEFISTO_2D(int hypId, int studyId, SMESH_Gen * gen):
-  SMESH_2D_Algo(hypId, studyId, gen)
+StdMeshers_MEFISTO_2D::StdMeshers_MEFISTO_2D(int hypId, SMESH_Gen * gen):
+  SMESH_2D_Algo(hypId, gen)
 {
   _name = "MEFISTO_2D";
   _shapeType = (1 << TopAbs_FACE);
 {
   _name = "MEFISTO_2D";
   _shapeType = (1 << TopAbs_FACE);
index 3c9d69b9be48295a404510ff9ee1812a6a5d9048..bcf22d59e3dff5a6eecff7fa8a1b285cf77dc1ad 100644 (file)
@@ -47,7 +47,7 @@ class StdMeshers_FaceSide;
 class STDMESHERS_EXPORT StdMeshers_MEFISTO_2D: public SMESH_2D_Algo
 {
 public:
 class STDMESHERS_EXPORT StdMeshers_MEFISTO_2D: public SMESH_2D_Algo
 {
 public:
-  StdMeshers_MEFISTO_2D(int hypId, int studyId, SMESH_Gen* gen);
+  StdMeshers_MEFISTO_2D(int hypId, SMESH_Gen* gen);
   virtual ~StdMeshers_MEFISTO_2D();
 
   virtual bool CheckHypothesis(SMESH_Mesh& aMesh,
   virtual ~StdMeshers_MEFISTO_2D();
 
   virtual bool CheckHypothesis(SMESH_Mesh& aMesh,
index 513536da152b8d91226be22ecd21c46d0954a8bf..77cefa46e9e5b34b38af6d445ea800f8767e8847 100644 (file)
@@ -48,8 +48,8 @@ using namespace std;
  */
 //=============================================================================
 
  */
 //=============================================================================
 
-StdMeshers_MaxElementArea::StdMeshers_MaxElementArea(int hypId, int studyId, SMESH_Gen* gen)
-  : SMESH_Hypothesis(hypId, studyId, gen)
+StdMeshers_MaxElementArea::StdMeshers_MaxElementArea(int hypId, SMESH_Gen* gen)
+  : SMESH_Hypothesis(hypId, gen)
 {
   _maxArea =1.;
   _name = "MaxElementArea";
 {
   _maxArea =1.;
   _name = "MaxElementArea";
index 187c514c1d97f382ebb038f443abdf6fe2ad6a2e..10de97599f8ba65105cd46c36d0837b0846747ee 100644 (file)
@@ -37,7 +37,7 @@
 class STDMESHERS_EXPORT StdMeshers_MaxElementArea:public SMESH_Hypothesis
 {
 public:
 class STDMESHERS_EXPORT StdMeshers_MaxElementArea:public SMESH_Hypothesis
 {
 public:
-  StdMeshers_MaxElementArea(int hypId, int studyId, SMESH_Gen * gen);
+  StdMeshers_MaxElementArea(int hypId, SMESH_Gen * gen);
   virtual ~ StdMeshers_MaxElementArea();
 
   void SetMaxArea(double maxArea) throw(SALOME_Exception);
   virtual ~ StdMeshers_MaxElementArea();
 
   void SetMaxArea(double maxArea) throw(SALOME_Exception);
index 7cdb3e488a6b9497011a9f351c037a68e0e284e3..86c4f2aa4e5dbe2fa40f7c306e2c1f7683c3cb1c 100644 (file)
@@ -48,8 +48,8 @@ using namespace std;
  */
 //=============================================================================
 
  */
 //=============================================================================
 
-StdMeshers_MaxElementVolume::StdMeshers_MaxElementVolume(int hypId, int studyId, SMESH_Gen* gen)
-  : SMESH_Hypothesis(hypId, studyId, gen)
+StdMeshers_MaxElementVolume::StdMeshers_MaxElementVolume(int hypId, SMESH_Gen* gen)
+  : SMESH_Hypothesis(hypId, gen)
 {
   _maxVolume = 1.;
   _name = "MaxElementVolume";
 {
   _maxVolume = 1.;
   _name = "MaxElementVolume";
index 88d0218c9cbd2b7e4f5083c53e6e5db87764f3c4..3ad0e6175200924262c29ce408ab2cf7df4f9f00 100644 (file)
@@ -38,7 +38,7 @@ class STDMESHERS_EXPORT StdMeshers_MaxElementVolume:
   public SMESH_Hypothesis
 {
 public:
   public SMESH_Hypothesis
 {
 public:
-  StdMeshers_MaxElementVolume(int hypId, int studyId, SMESH_Gen* gen);
+  StdMeshers_MaxElementVolume(int hypId, SMESH_Gen* gen);
   virtual ~StdMeshers_MaxElementVolume();
 
   void SetMaxVolume(double maxVolume)
   virtual ~StdMeshers_MaxElementVolume();
 
   void SetMaxVolume(double maxVolume)
index a5774bbc7e17516b84ba912f2de133eed84b5769..7b0d7fbb6cae218dddf16434464583a46b5f936a 100644 (file)
@@ -47,8 +47,8 @@ using namespace std;
  */
 //=============================================================================
 
  */
 //=============================================================================
 
-StdMeshers_MaxLength::StdMeshers_MaxLength(int hypId, int studyId, SMESH_Gen * gen)
-  :SMESH_Hypothesis(hypId, studyId, gen)
+StdMeshers_MaxLength::StdMeshers_MaxLength(int hypId, SMESH_Gen * gen)
+  :SMESH_Hypothesis(hypId, gen)
 {
   _length = 1.;
   _preestimated = 0.;
 {
   _length = 1.;
   _preestimated = 0.;
index 1024d6af5c6458a46cb0cc672e71b6b119167a65..575bbaafd0a365924c8f6d530062a00da1fb0a87 100644 (file)
@@ -32,7 +32,7 @@
 class STDMESHERS_EXPORT StdMeshers_MaxLength: public SMESH_Hypothesis
 {
  public:
 class STDMESHERS_EXPORT StdMeshers_MaxLength: public SMESH_Hypothesis
 {
  public:
-  StdMeshers_MaxLength(int hypId, int studyId, SMESH_Gen * gen);
+  StdMeshers_MaxLength(int hypId, SMESH_Gen * gen);
   virtual ~ StdMeshers_MaxLength();
 
   void SetLength(double length) throw(SALOME_Exception);
   virtual ~ StdMeshers_MaxLength();
 
   void SetLength(double length) throw(SALOME_Exception);
index a3ab8278d5e10f65ee0999b6b8d1ac210ce6f499..ca597ee523cea3a1577edaa3a0adac32c06914f9 100644 (file)
@@ -36,8 +36,8 @@ using namespace std;
  */
 //=============================================================================
 
  */
 //=============================================================================
 
-StdMeshers_NotConformAllowed::StdMeshers_NotConformAllowed(int hypId, int studyId, SMESH_Gen* gen)
-  : SMESH_Hypothesis(hypId, studyId, gen)
+StdMeshers_NotConformAllowed::StdMeshers_NotConformAllowed(int hypId, SMESH_Gen* gen)
+  : SMESH_Hypothesis(hypId, gen)
 {
   _name = "NotConformAllowed";
   _param_algo_dim = -1; 
 {
   _name = "NotConformAllowed";
   _param_algo_dim = -1; 
index 79c4d021009ce41c632ff37512e9f0a27915c2a7..2f80da9a5bafde0f35daac85ce766801e15366d9 100644 (file)
@@ -37,7 +37,7 @@ class STDMESHERS_EXPORT StdMeshers_NotConformAllowed:
   public SMESH_Hypothesis
 {
 public:
   public SMESH_Hypothesis
 {
 public:
-  StdMeshers_NotConformAllowed(int hypId, int studyId, SMESH_Gen* gen);
+  StdMeshers_NotConformAllowed(int hypId, SMESH_Gen* gen);
   virtual ~StdMeshers_NotConformAllowed();
 
   virtual std::ostream & SaveTo(std::ostream & save);
   virtual ~StdMeshers_NotConformAllowed();
 
   virtual std::ostream & SaveTo(std::ostream & save);
index 55967940c81e29139fa115333ee4ff1c14c0a74b..e560a6ee63fb97b872e9bc7c19c8e39627b07db8 100644 (file)
@@ -42,9 +42,9 @@ using namespace std;
  */
 //=============================================================================
 
  */
 //=============================================================================
 
-StdMeshers_NumberOfLayers::StdMeshers_NumberOfLayers(int hypId, int studyId,
+StdMeshers_NumberOfLayers::StdMeshers_NumberOfLayers(int hypId,
                                                      SMESH_Gen * gen)
                                                      SMESH_Gen * gen)
-  : SMESH_Hypothesis(hypId, studyId, gen)
+  : SMESH_Hypothesis(hypId, gen)
 {
   _name = "NumberOfLayers"; // used by RadialPrism_3D
   _param_algo_dim = 3; // 3D
 {
   _name = "NumberOfLayers"; // used by RadialPrism_3D
   _param_algo_dim = 3; // 3D
index b8dc0c0d7ca14beac4ddb14781debae58395ea10..b4f7ff2de6e27602ed066a5a218af565c9d7c4ab 100644 (file)
@@ -49,7 +49,7 @@ class STDMESHERS_EXPORT StdMeshers_NumberOfLayers:  public SMESH_Hypothesis
 {
 public:
   // Constructor
 {
 public:
   // Constructor
-  StdMeshers_NumberOfLayers( int hypId, int studyId, SMESH_Gen * gen );
+  StdMeshers_NumberOfLayers( int hypId, SMESH_Gen * gen );
   // Destructor
   virtual ~StdMeshers_NumberOfLayers();
 
   // Destructor
   virtual ~StdMeshers_NumberOfLayers();
 
index 74d6b0c9ac112bb052b4cbb478ebda35036e239f..fef954c5a6f4dd07f51334ca5948e0fb8f2d0871 100644 (file)
@@ -36,9 +36,8 @@
 //=============================================================================
 
 StdMeshers_NumberOfLayers2D::StdMeshers_NumberOfLayers2D(int hypId,
 //=============================================================================
 
 StdMeshers_NumberOfLayers2D::StdMeshers_NumberOfLayers2D(int hypId,
-                                                         int studyId,
                                                          SMESH_Gen * gen)
                                                          SMESH_Gen * gen)
-  : StdMeshers_NumberOfLayers(hypId, studyId, gen)
+  : StdMeshers_NumberOfLayers(hypId, gen)
 {
   _name = "NumberOfLayers2D"; // used by RadialQuadrangle_1D2D
   _param_algo_dim = 2; // 2D
 {
   _name = "NumberOfLayers2D"; // used by RadialQuadrangle_1D2D
   _param_algo_dim = 2; // 2D
index 4514debc561bcd8585232f0db389aa7612db7c3d..d2df75fe9805d91c7949f67767103ca609dfa096 100644 (file)
@@ -43,7 +43,7 @@ class STDMESHERS_EXPORT StdMeshers_NumberOfLayers2D
 {
 public:
   // Constructor
 {
 public:
   // Constructor
-  StdMeshers_NumberOfLayers2D(int hypId, int studyId, SMESH_Gen* gen);
+  StdMeshers_NumberOfLayers2D(int hypId, SMESH_Gen* gen);
   // Destructor
   virtual ~StdMeshers_NumberOfLayers2D();
 };
   // Destructor
   virtual ~StdMeshers_NumberOfLayers2D();
 };
index 2ff7274fc2b0827483a13c14ec9adc555f7477c7..b26904eb231fef34897c9c5519a5e7c35fd208d1 100644 (file)
@@ -66,9 +66,8 @@ const double PRECISION = 1e-7;
 //=============================================================================
 
 StdMeshers_NumberOfSegments::StdMeshers_NumberOfSegments(int         hypId,
 //=============================================================================
 
 StdMeshers_NumberOfSegments::StdMeshers_NumberOfSegments(int         hypId,
-                                                         int         studyId,
                                                          SMESH_Gen * gen)
                                                          SMESH_Gen * gen)
-  : SMESH_Hypothesis(hypId, studyId, gen),
+  : SMESH_Hypothesis(hypId, gen),
     _numberOfSegments(15),//issue 19923
     _distrType(DT_Regular),
     _scaleFactor(1.),
     _numberOfSegments(15),//issue 19923
     _distrType(DT_Regular),
     _scaleFactor(1.),
index 459c286a19e6a36252c1f9c3ce38fc39ccb40613..95273c5fa981c499b7421b77eca8a6773449e3dc 100644 (file)
@@ -45,7 +45,7 @@ class STDMESHERS_EXPORT StdMeshers_NumberOfSegments:
   public SMESH_Hypothesis
 {
 public:
   public SMESH_Hypothesis
 {
 public:
-  StdMeshers_NumberOfSegments(int hypId, int studyId, SMESH_Gen* gen);
+  StdMeshers_NumberOfSegments(int hypId, SMESH_Gen* gen);
   virtual ~StdMeshers_NumberOfSegments();
 
   // Builds point distribution according to passed function
   virtual ~StdMeshers_NumberOfSegments();
 
   // Builds point distribution according to passed function
index 78c4d62e5728cb26ab06988240050b5b413cd1f3..37054e80ec3c706467dc9918b7a1d221676ce03e 100644 (file)
@@ -49,9 +49,8 @@ using namespace std;
 //=======================================================================
 
 StdMeshers_PolygonPerFace_2D::StdMeshers_PolygonPerFace_2D(int        hypId,
 //=======================================================================
 
 StdMeshers_PolygonPerFace_2D::StdMeshers_PolygonPerFace_2D(int        hypId,
-                                                           int        studyId,
                                                            SMESH_Gen* gen)
                                                            SMESH_Gen* gen)
-  :SMESH_2D_Algo(hypId, studyId, gen)
+  :SMESH_2D_Algo(hypId, gen)
 {
   _name = "PolygonPerFace_2D";
 }
 {
   _name = "PolygonPerFace_2D";
 }
index 57a7afc8b49c7a4bfb8db8a9b3527b2bc23465ea..a3ff18e1876375aeeffa6d7e5560155638036254 100644 (file)
@@ -32,7 +32,7 @@
 class STDMESHERS_EXPORT StdMeshers_PolygonPerFace_2D: public SMESH_2D_Algo
 {
  public:
 class STDMESHERS_EXPORT StdMeshers_PolygonPerFace_2D: public SMESH_2D_Algo
 {
  public:
-  StdMeshers_PolygonPerFace_2D(int hypId, int studyId, SMESH_Gen* gen);
+  StdMeshers_PolygonPerFace_2D(int hypId, SMESH_Gen* gen);
 
   virtual bool CheckHypothesis(SMESH_Mesh&                          aMesh,
                                const TopoDS_Shape&                  aShape,
 
   virtual bool CheckHypothesis(SMESH_Mesh&                          aMesh,
                                const TopoDS_Shape&                  aShape,
index 9fc322c753cfc8d2d54424f6d46c12eb9f3cc4e6..d326cd157684bc09e383b123d6c0ac6a1fc6fed8 100644 (file)
@@ -96,15 +96,14 @@ namespace {
    */
   struct TQuadrangleAlgo : public StdMeshers_Quadrangle_2D
   {
    */
   struct TQuadrangleAlgo : public StdMeshers_Quadrangle_2D
   {
-    TQuadrangleAlgo(int studyId, SMESH_Gen* gen)
-      : StdMeshers_Quadrangle_2D( gen->GetANewId(), studyId, gen)
+    TQuadrangleAlgo(SMESH_Gen* gen)
+      : StdMeshers_Quadrangle_2D( gen->GetANewId(), gen)
     {
     }
     static StdMeshers_Quadrangle_2D* instance( SMESH_Algo*         fatherAlgo,
                                                SMESH_MesherHelper* helper=0)
     {
     {
     }
     static StdMeshers_Quadrangle_2D* instance( SMESH_Algo*         fatherAlgo,
                                                SMESH_MesherHelper* helper=0)
     {
-      static TQuadrangleAlgo* algo = new TQuadrangleAlgo( fatherAlgo->GetStudyId(),
-                                                          fatherAlgo->GetGen() );
+      static TQuadrangleAlgo* algo = new TQuadrangleAlgo( fatherAlgo->GetGen() );
       if ( helper &&
            algo->myProxyMesh &&
            algo->myProxyMesh->GetMesh() != helper->GetMesh() )
       if ( helper &&
            algo->myProxyMesh &&
            algo->myProxyMesh->GetMesh() != helper->GetMesh() )
@@ -126,16 +125,15 @@ namespace {
   {
     StdMeshers_ProjectionSource1D myHyp;
 
   {
     StdMeshers_ProjectionSource1D myHyp;
 
-    TProjction1dAlgo(int studyId, SMESH_Gen* gen)
-      : StdMeshers_Projection_1D( gen->GetANewId(), studyId, gen),
-        myHyp( gen->GetANewId(), studyId, gen)
+    TProjction1dAlgo(SMESH_Gen* gen)
+      : StdMeshers_Projection_1D( gen->GetANewId(), gen),
+        myHyp( gen->GetANewId(), gen)
     {
       StdMeshers_Projection_1D::_sourceHypo = & myHyp;
     }
     static TProjction1dAlgo* instance( SMESH_Algo* fatherAlgo )
     {
     {
       StdMeshers_Projection_1D::_sourceHypo = & myHyp;
     }
     static TProjction1dAlgo* instance( SMESH_Algo* fatherAlgo )
     {
-      static TProjction1dAlgo* algo = new TProjction1dAlgo( fatherAlgo->GetStudyId(),
-                                                            fatherAlgo->GetGen() );
+      static TProjction1dAlgo* algo = new TProjction1dAlgo( fatherAlgo->GetGen() );
       return algo;
     }
   };
       return algo;
     }
   };
@@ -147,16 +145,15 @@ namespace {
   {
     StdMeshers_ProjectionSource2D myHyp;
 
   {
     StdMeshers_ProjectionSource2D myHyp;
 
-    TProjction2dAlgo(int studyId, SMESH_Gen* gen)
-      : StdMeshers_Projection_1D2D( gen->GetANewId(), studyId, gen),
-        myHyp( gen->GetANewId(), studyId, gen)
+    TProjction2dAlgo(SMESH_Gen* gen)
+      : StdMeshers_Projection_1D2D( gen->GetANewId(), gen),
+        myHyp( gen->GetANewId(), gen)
     {
       StdMeshers_Projection_2D::_sourceHypo = & myHyp;
     }
     static TProjction2dAlgo* instance( SMESH_Algo* fatherAlgo )
     {
     {
       StdMeshers_Projection_2D::_sourceHypo = & myHyp;
     }
     static TProjction2dAlgo* instance( SMESH_Algo* fatherAlgo )
     {
-      static TProjction2dAlgo* algo = new TProjction2dAlgo( fatherAlgo->GetStudyId(),
-                                                            fatherAlgo->GetGen() );
+      static TProjction2dAlgo* algo = new TProjction2dAlgo( fatherAlgo->GetGen() );
       return algo;
     }
     const NSProjUtils::TNodeNodeMap& GetNodesMap()
       return algo;
     }
     const NSProjUtils::TNodeNodeMap& GetNodesMap()
@@ -567,8 +564,8 @@ namespace {
 //purpose  : 
 //=======================================================================
 
 //purpose  : 
 //=======================================================================
 
-StdMeshers_Prism_3D::StdMeshers_Prism_3D(int hypId, int studyId, SMESH_Gen* gen)
-  :SMESH_3D_Algo(hypId, studyId, gen)
+StdMeshers_Prism_3D::StdMeshers_Prism_3D(int hypId, SMESH_Gen* gen)
+  :SMESH_3D_Algo(hypId, gen)
 {
   _name                    = "Prism_3D";
   _shapeType               = (1 << TopAbs_SOLID); // 1 bit per shape type
 {
   _name                    = "Prism_3D";
   _shapeType               = (1 << TopAbs_SOLID); // 1 bit per shape type
index 62f0b9a14e83de74ec678e8d7f6e6ea08dcbb159..d9103b72b62a999486a72826f0fd14741b86be36 100644 (file)
@@ -479,7 +479,7 @@ private:
 class STDMESHERS_EXPORT StdMeshers_Prism_3D: public SMESH_3D_Algo
 {
 public:
 class STDMESHERS_EXPORT StdMeshers_Prism_3D: public SMESH_3D_Algo
 {
 public:
-  StdMeshers_Prism_3D(int hypId, int studyId, SMESH_Gen* gen);
+  StdMeshers_Prism_3D(int hypId, SMESH_Gen* gen);
   virtual ~StdMeshers_Prism_3D();
 
   virtual bool CheckHypothesis(SMESH_Mesh&                          aMesh,
   virtual ~StdMeshers_Prism_3D();
 
   virtual bool CheckHypothesis(SMESH_Mesh&                          aMesh,
index c3dd4ec00d02ac9616b8711a1653f7559e3dde6c..7dd9a452fb5a1630c1da8e8abfa0b665781b0ee2 100644 (file)
@@ -44,9 +44,9 @@ using namespace std;
  */
 //=============================================================================
 
  */
 //=============================================================================
 
-StdMeshers_ProjectionSource1D::StdMeshers_ProjectionSource1D(int hypId, int studyId,
+StdMeshers_ProjectionSource1D::StdMeshers_ProjectionSource1D(int hypId,
                                                              SMESH_Gen * gen)
                                                              SMESH_Gen * gen)
-  : SMESH_Hypothesis(hypId, studyId, gen)
+  : SMESH_Hypothesis(hypId, gen)
 {
   _name = "ProjectionSource1D"; // used by Projection_1D
   _param_algo_dim = 1; // 1D
 {
   _name = "ProjectionSource1D"; // used by Projection_1D
   _param_algo_dim = 1; // 1D
index 122e7fa31bb716d5923930bfb826aad4b25c324c..d58535e2d60f5eb89fa76f1e5c838882547eb753 100644 (file)
@@ -49,7 +49,7 @@ class STDMESHERS_EXPORT StdMeshers_ProjectionSource1D: public SMESH_Hypothesis
 {
 public:
   // Constructor
 {
 public:
   // Constructor
-  StdMeshers_ProjectionSource1D( int hypId, int studyId, SMESH_Gen * gen );
+  StdMeshers_ProjectionSource1D( int hypId, SMESH_Gen * gen );
   // Destructor
   virtual ~StdMeshers_ProjectionSource1D();
 
   // Destructor
   virtual ~StdMeshers_ProjectionSource1D();
 
index 0a0f3a81a4793523957d2bc3a14af4f3c2fb540f..ded88d4b74f4d92d3fbcd9dd2835a9670a2690a5 100644 (file)
@@ -45,9 +45,9 @@ using namespace std;
  */
 //=============================================================================
 
  */
 //=============================================================================
 
-StdMeshers_ProjectionSource2D::StdMeshers_ProjectionSource2D(int hypId, int studyId,
+StdMeshers_ProjectionSource2D::StdMeshers_ProjectionSource2D(int hypId,
                                                              SMESH_Gen * gen)
                                                              SMESH_Gen * gen)
-  : SMESH_Hypothesis(hypId, studyId, gen)
+  : SMESH_Hypothesis(hypId, gen)
 {
   _name = "ProjectionSource2D"; // used by Projection_2D
   _param_algo_dim = 2; // 2D
 {
   _name = "ProjectionSource2D"; // used by Projection_2D
   _param_algo_dim = 2; // 2D
index b98847ae6bc4c75c5a924e1ca4c7d355162003fe..49e49747d43a64eed4e6d898ac9fef077a7f8dd9 100644 (file)
@@ -49,7 +49,7 @@ class STDMESHERS_EXPORT StdMeshers_ProjectionSource2D: public SMESH_Hypothesis
 {
 public:
   // Constructor
 {
 public:
   // Constructor
-  StdMeshers_ProjectionSource2D( int hypId, int studyId, SMESH_Gen * gen );
+  StdMeshers_ProjectionSource2D( int hypId, SMESH_Gen * gen );
   // Destructor
   virtual ~StdMeshers_ProjectionSource2D();
 
   // Destructor
   virtual ~StdMeshers_ProjectionSource2D();
 
index 868553480bec4a8d907483909607c0c1a8e00b05..bffe39ae3c0398fa13615d0bd7b072ddb68491b6 100644 (file)
@@ -43,9 +43,9 @@ using namespace std;
  */
 //=============================================================================
 
  */
 //=============================================================================
 
-StdMeshers_ProjectionSource3D::StdMeshers_ProjectionSource3D(int hypId, int studyId,
+StdMeshers_ProjectionSource3D::StdMeshers_ProjectionSource3D(int hypId,
                                                              SMESH_Gen * gen)
                                                              SMESH_Gen * gen)
-  : SMESH_Hypothesis(hypId, studyId, gen)
+  : SMESH_Hypothesis(hypId, gen)
 {
   _name = "ProjectionSource3D"; // used by Projection_3D
   _param_algo_dim = 3; // 3D
 {
   _name = "ProjectionSource3D"; // used by Projection_3D
   _param_algo_dim = 3; // 3D
index 54c5395ced97cf3c0192117dda9abb9f18db1120..d4d867e3b06b650ea2cc98893a5a7572db74ae70 100644 (file)
@@ -49,7 +49,7 @@ class STDMESHERS_EXPORT StdMeshers_ProjectionSource3D:  public SMESH_Hypothesis
 {
 public:
   // Constructor
 {
 public:
   // Constructor
-  StdMeshers_ProjectionSource3D( int hypId, int studyId, SMESH_Gen * gen );
+  StdMeshers_ProjectionSource3D( int hypId, SMESH_Gen * gen );
   // Destructor
   virtual ~StdMeshers_ProjectionSource3D();
 
   // Destructor
   virtual ~StdMeshers_ProjectionSource3D();
 
index 976b0311cafac9b3d9f7341765ace65b2b26c953..029719f1b5ace280039965843168f099319f3d0c 100644 (file)
@@ -65,8 +65,8 @@ namespace TAssocTool = StdMeshers_ProjectionUtils;
 //purpose  : 
 //=======================================================================
 
 //purpose  : 
 //=======================================================================
 
-StdMeshers_Projection_1D::StdMeshers_Projection_1D(int hypId, int studyId, SMESH_Gen* gen)
-  :SMESH_1D_Algo(hypId, studyId, gen)
+StdMeshers_Projection_1D::StdMeshers_Projection_1D(int hypId, SMESH_Gen* gen)
+  :SMESH_1D_Algo(hypId, gen)
 {
   _name = "Projection_1D";
   _shapeType = (1 << TopAbs_EDGE);      // 1 bit per shape type
 {
   _name = "Projection_1D";
   _shapeType = (1 << TopAbs_EDGE);      // 1 bit per shape type
index cf7bccb23082c516d1390b637a0a2b9232f2dae0..a0cef0d648dcb81e2fba6d5775a5d5c59aa565a0 100644 (file)
@@ -38,7 +38,7 @@ class StdMeshers_ProjectionSource1D;
 class STDMESHERS_EXPORT StdMeshers_Projection_1D: public SMESH_1D_Algo
 {
 public:
 class STDMESHERS_EXPORT StdMeshers_Projection_1D: public SMESH_1D_Algo
 {
 public:
-  StdMeshers_Projection_1D(int hypId, int studyId, SMESH_Gen* gen);
+  StdMeshers_Projection_1D(int hypId, SMESH_Gen* gen);
   virtual ~StdMeshers_Projection_1D();
 
   virtual bool CheckHypothesis(SMESH_Mesh&                          aMesh,
   virtual ~StdMeshers_Projection_1D();
 
   virtual bool CheckHypothesis(SMESH_Mesh&                          aMesh,
index c0e53ceebc99d2c577aa1c7872bc7e8b4a7959be..607efdfa64ce7894535018ebb4e31feb132f7ff7 100644 (file)
@@ -93,8 +93,8 @@ namespace
 //purpose  : 
 //=======================================================================
 
 //purpose  : 
 //=======================================================================
 
-StdMeshers_Projection_1D2D::StdMeshers_Projection_1D2D(int hypId, int studyId, SMESH_Gen* gen)
-  :StdMeshers_Projection_2D(hypId, studyId, gen)
+StdMeshers_Projection_1D2D::StdMeshers_Projection_1D2D(int hypId, SMESH_Gen* gen)
+  :StdMeshers_Projection_2D(hypId, gen)
 {
   _name = "Projection_1D2D";
   _requireDiscreteBoundary = false;
 {
   _name = "Projection_1D2D";
   _requireDiscreteBoundary = false;
index 58e2ce8cc49d71cc38106527d75aca9f9046c34b..7f72cc8603efb95a0785d312b0fe0953ef008c62 100644 (file)
@@ -31,7 +31,7 @@
 class STDMESHERS_EXPORT StdMeshers_Projection_1D2D: public StdMeshers_Projection_2D
 {
 public:
 class STDMESHERS_EXPORT StdMeshers_Projection_1D2D: public StdMeshers_Projection_2D
 {
 public:
-  StdMeshers_Projection_1D2D(int hypId, int studyId, SMESH_Gen* gen);
+  StdMeshers_Projection_1D2D(int hypId, SMESH_Gen* gen);
 
   virtual bool Compute(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape);
 
 
   virtual bool Compute(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape);
 
index 64ce054c5d9d6a2385c97e980f0d8e6de654156e..03819912493e05f2437f3b1ba925bf543d84dd78 100644 (file)
@@ -85,8 +85,8 @@ namespace TAssocTool = StdMeshers_ProjectionUtils;
 //purpose  : 
 //=======================================================================
 
 //purpose  : 
 //=======================================================================
 
-StdMeshers_Projection_2D::StdMeshers_Projection_2D(int hypId, int studyId, SMESH_Gen* gen)
-  :SMESH_2D_Algo(hypId, studyId, gen)
+StdMeshers_Projection_2D::StdMeshers_Projection_2D(int hypId, SMESH_Gen* gen)
+  :SMESH_2D_Algo(hypId, gen)
 {
   _name = "Projection_2D";
   _compatibleHypothesis.push_back("ProjectionSource2D");
 {
   _name = "Projection_2D";
   _compatibleHypothesis.push_back("ProjectionSource2D");
index 2ccb2172984c0edee262f0ea99f1ad0a2e475c82..98864c3faec2f06e141188024cac60ec4f0fa781 100644 (file)
@@ -37,7 +37,7 @@ class StdMeshers_ProjectionSource2D;
 class STDMESHERS_EXPORT StdMeshers_Projection_2D: public SMESH_2D_Algo
 {
 public:
 class STDMESHERS_EXPORT StdMeshers_Projection_2D: public SMESH_2D_Algo
 {
 public:
-  StdMeshers_Projection_2D(int hypId, int studyId, SMESH_Gen* gen);
+  StdMeshers_Projection_2D(int hypId, SMESH_Gen* gen);
   virtual ~StdMeshers_Projection_2D();
 
   virtual bool CheckHypothesis(SMESH_Mesh&                          aMesh,
   virtual ~StdMeshers_Projection_2D();
 
   virtual bool CheckHypothesis(SMESH_Mesh&                          aMesh,
index 040b2efc4bc8f13afb6f5e596022adbf8ac0f3ab..95bc469136c4636c7d6682bdaf90d31b1a170b8c 100644 (file)
@@ -65,8 +65,8 @@ using namespace std;
 //purpose  : 
 //=======================================================================
 
 //purpose  : 
 //=======================================================================
 
-StdMeshers_Projection_3D::StdMeshers_Projection_3D(int hypId, int studyId, SMESH_Gen* gen)
-  :SMESH_3D_Algo(hypId, studyId, gen)
+StdMeshers_Projection_3D::StdMeshers_Projection_3D(int hypId, SMESH_Gen* gen)
+  :SMESH_3D_Algo(hypId, gen)
 {
   _name = "Projection_3D";
   _shapeType = (1 << TopAbs_SHELL) | (1 << TopAbs_SOLID);  // 1 bit per shape type
 {
   _name = "Projection_3D";
   _shapeType = (1 << TopAbs_SHELL) | (1 << TopAbs_SOLID);  // 1 bit per shape type
index 008ca7429f7b2ca94af6debfb30b933b553f137c..e09f007accd44103f1bb234cbe5b77c0cc5aacf4 100644 (file)
@@ -36,7 +36,7 @@ class StdMeshers_ProjectionSource3D;
 class STDMESHERS_EXPORT StdMeshers_Projection_3D: public SMESH_3D_Algo
 {
 public:
 class STDMESHERS_EXPORT StdMeshers_Projection_3D: public SMESH_3D_Algo
 {
 public:
-  StdMeshers_Projection_3D(int hypId, int studyId, SMESH_Gen* gen);
+  StdMeshers_Projection_3D(int hypId, SMESH_Gen* gen);
   virtual ~StdMeshers_Projection_3D();
 
   virtual bool CheckHypothesis(SMESH_Mesh&                          aMesh,
   virtual ~StdMeshers_Projection_3D();
 
   virtual bool CheckHypothesis(SMESH_Mesh&                          aMesh,
index 56a5887bc3c7bac0b225fde756a7e77b0e12bdc1..3d82126adf50eeba19d875054d7669f3b9da6a72 100644 (file)
@@ -85,16 +85,15 @@ namespace {
  */
 //=============================================================================
 
  */
 //=============================================================================
 
-StdMeshers_Propagation::StdMeshers_Propagation (int hypId, int studyId, SMESH_Gen * gen)
-  : SMESH_Hypothesis(hypId, studyId, gen)
+StdMeshers_Propagation::StdMeshers_Propagation (int hypId, SMESH_Gen * gen)
+  : SMESH_Hypothesis(hypId, gen)
 {
   _name = GetName();
   _param_algo_dim = -1; // 1D auxiliary
 }
 StdMeshers_PropagOfDistribution::StdMeshers_PropagOfDistribution (int hypId,
 {
   _name = GetName();
   _param_algo_dim = -1; // 1D auxiliary
 }
 StdMeshers_PropagOfDistribution::StdMeshers_PropagOfDistribution (int hypId,
-                                                                  int studyId,
                                                                   SMESH_Gen * gen)
                                                                   SMESH_Gen * gen)
-  : StdMeshers_Propagation(hypId, studyId, gen)                        { _name = GetName(); }
+  : StdMeshers_Propagation(hypId, gen)                                 { _name = GetName(); }
 StdMeshers_Propagation::~StdMeshers_Propagation()                      {}
 string StdMeshers_Propagation::GetName ()                              { return "Propagation"; }
 string StdMeshers_PropagOfDistribution::GetName ()                     { return "PropagOfDistribution"; }
 StdMeshers_Propagation::~StdMeshers_Propagation()                      {}
 string StdMeshers_Propagation::GetName ()                              { return "Propagation"; }
 string StdMeshers_PropagOfDistribution::GetName ()                     { return "PropagOfDistribution"; }
index d94608a965769bb2e9bf017838e2c6fcbf99229a..7f76acf0fd6a1a473217fcb6aba312ce7bd41169 100644 (file)
@@ -46,7 +46,7 @@ class SMESH_HypoFilter;
 class STDMESHERS_EXPORT StdMeshers_Propagation : public SMESH_Hypothesis
 {
  public:
 class STDMESHERS_EXPORT StdMeshers_Propagation : public SMESH_Hypothesis
 {
  public:
-  StdMeshers_Propagation(int hypId, int studyId, SMESH_Gen * gen);
+  StdMeshers_Propagation(int hypId, SMESH_Gen * gen);
   virtual ~ StdMeshers_Propagation();
 
   virtual std::ostream & SaveTo(std::ostream & save);
   virtual ~ StdMeshers_Propagation();
 
   virtual std::ostream & SaveTo(std::ostream & save);
@@ -105,7 +105,7 @@ class STDMESHERS_EXPORT StdMeshers_Propagation : public SMESH_Hypothesis
 class STDMESHERS_EXPORT StdMeshers_PropagOfDistribution: public StdMeshers_Propagation
 {
  public:
 class STDMESHERS_EXPORT StdMeshers_PropagOfDistribution: public StdMeshers_Propagation
 {
  public:
-  StdMeshers_PropagOfDistribution(int hypId, int studyId, SMESH_Gen * gen);
+  StdMeshers_PropagOfDistribution(int hypId, SMESH_Gen * gen);
 
   static std::string GetName();
 };
 
   static std::string GetName();
 };
index a4d3ffbdd04d533ae97ba9083fa8df465e3bbfc3..c531c5aaee5881e63bee3c138e68e0b251501c73 100644 (file)
@@ -71,8 +71,8 @@ using namespace std;
 class StdMeshers_QuadFromMedialAxis_1D2D::Algo1D : public StdMeshers_Regular_1D
 {
 public:
 class StdMeshers_QuadFromMedialAxis_1D2D::Algo1D : public StdMeshers_Regular_1D
 {
 public:
-  Algo1D(int studyId, SMESH_Gen* gen):
-    StdMeshers_Regular_1D( gen->GetANewId(), studyId, gen )
+  Algo1D(SMESH_Gen* gen):
+    StdMeshers_Regular_1D( gen->GetANewId(), gen )
   {
   }
   void SetSegmentLength( double len )
   {
   }
   void SetSegmentLength( double len )
@@ -152,9 +152,8 @@ public:
 //================================================================================
 
 StdMeshers_QuadFromMedialAxis_1D2D::StdMeshers_QuadFromMedialAxis_1D2D(int        hypId,
 //================================================================================
 
 StdMeshers_QuadFromMedialAxis_1D2D::StdMeshers_QuadFromMedialAxis_1D2D(int        hypId,
-                                                                       int        studyId,
                                                                        SMESH_Gen* gen)
                                                                        SMESH_Gen* gen)
-  : StdMeshers_Quadrangle_2D(hypId, studyId, gen),
+  : StdMeshers_Quadrangle_2D(hypId, gen),
     _regular1D( 0 )
 {
   _name = "QuadFromMedialAxis_1D2D";
     _regular1D( 0 )
 {
   _name = "QuadFromMedialAxis_1D2D";
@@ -741,7 +740,7 @@ namespace
     }
 
     // cout << "from salome.geom import geomBuilder" << endl;
     }
 
     // cout << "from salome.geom import geomBuilder" << endl;
-    // cout << "geompy = geomBuilder.New(salome.myStudy)" << endl;
+    // cout << "geompy = geomBuilder.New()" << endl;
     Handle(TColgp_HArray1OfPnt) points = new TColgp_HArray1OfPnt(1, pnt.size());
     for ( size_t i = 0; i < pnt.size(); ++i )
     {
     Handle(TColgp_HArray1OfPnt) points = new TColgp_HArray1OfPnt(1, pnt.size());
     for ( size_t i = 0; i < pnt.size(); ++i )
     {
@@ -2166,7 +2165,7 @@ bool StdMeshers_QuadFromMedialAxis_1D2D::Compute(SMESH_Mesh&         theMesh,
     SMESH_MAT2d::MedialAxis ma( F, sinuFace._sinuEdges, minSegLen, /*ignoreCorners=*/true );
 
     if ( !_regular1D )
     SMESH_MAT2d::MedialAxis ma( F, sinuFace._sinuEdges, minSegLen, /*ignoreCorners=*/true );
 
     if ( !_regular1D )
-      _regular1D = new Algo1D( _studyId, _gen );
+      _regular1D = new Algo1D( _gen );
     _regular1D->SetSegmentLength( minSegLen );
 
     vector<double> maParams;
     _regular1D->SetSegmentLength( minSegLen );
 
     vector<double> maParams;
index 43a62debad005690b0203d9ceb2f18da15245d07..0940f15f06dbb748b7c0c4edcb412f728176a450 100644 (file)
@@ -37,7 +37,7 @@
 class STDMESHERS_EXPORT StdMeshers_QuadFromMedialAxis_1D2D: public StdMeshers_Quadrangle_2D
 {
  public:
 class STDMESHERS_EXPORT StdMeshers_QuadFromMedialAxis_1D2D: public StdMeshers_Quadrangle_2D
 {
  public:
-  StdMeshers_QuadFromMedialAxis_1D2D(int hypId, int studyId, SMESH_Gen* gen);
+  StdMeshers_QuadFromMedialAxis_1D2D(int hypId, SMESH_Gen* gen);
   virtual ~StdMeshers_QuadFromMedialAxis_1D2D();
 
   virtual bool CheckHypothesis(SMESH_Mesh&         aMesh,
   virtual ~StdMeshers_QuadFromMedialAxis_1D2D();
 
   virtual bool CheckHypothesis(SMESH_Mesh&         aMesh,
index e45b4cf687f494d50191386feca5db2e70dcc9cb..dc3e692e1ad7edc5c42cdc801a4a652e42f239f6 100644 (file)
@@ -42,9 +42,9 @@ using namespace std;
  *
  */
 //=============================================================================
  *
  */
 //=============================================================================
-StdMeshers_QuadrangleParams::StdMeshers_QuadrangleParams(int hypId, int studyId,
+StdMeshers_QuadrangleParams::StdMeshers_QuadrangleParams(int hypId,
                                                          SMESH_Gen * gen)
                                                          SMESH_Gen * gen)
-  : SMESH_Hypothesis(hypId, studyId, gen)
+  : SMESH_Hypothesis(hypId, gen)
 {
   _name = "QuadrangleParams";
   _param_algo_dim = 2;
 {
   _name = "QuadrangleParams";
   _param_algo_dim = 2;
index 051ec58a23dca00f17441c1da24fdc4015872699..64247e0b63e89918ccd2fcb15282a7a8f3cda87c 100644 (file)
@@ -44,7 +44,7 @@ enum StdMeshers_QuadType
 class STDMESHERS_EXPORT StdMeshers_QuadrangleParams: public SMESH_Hypothesis
 {
 public:
 class STDMESHERS_EXPORT StdMeshers_QuadrangleParams: public SMESH_Hypothesis
 {
 public:
-  StdMeshers_QuadrangleParams(int hypId, int studyId, SMESH_Gen* gen);
+  StdMeshers_QuadrangleParams(int hypId, SMESH_Gen* gen);
   virtual ~StdMeshers_QuadrangleParams();
 
   void SetTriaVertex (int id);
   virtual ~StdMeshers_QuadrangleParams();
 
   void SetTriaVertex (int id);
index b6c49182a35fe246936c364f923bb1bd82b0207b..453b1fd6c7f71b9ecde332e0e25ee33d2d15e0d3 100644 (file)
@@ -36,9 +36,8 @@ using namespace std;
 //=============================================================================
 
 StdMeshers_QuadranglePreference::StdMeshers_QuadranglePreference(int         hypId,
 //=============================================================================
 
 StdMeshers_QuadranglePreference::StdMeshers_QuadranglePreference(int         hypId,
-                                                                 int         studyId,
                                                                  SMESH_Gen * gen)
                                                                  SMESH_Gen * gen)
-     :SMESH_Hypothesis(hypId, studyId, gen)
+     :SMESH_Hypothesis(hypId, gen)
 {
   _name = "QuadranglePreference";
   _param_algo_dim = -2; // auxiliary used by NETGEN 2D
 {
   _name = "QuadranglePreference";
   _param_algo_dim = -2; // auxiliary used by NETGEN 2D
index 6ed0677c1795f410bac361c8cde918f5b3db7715..747ed7e5f45a4addc2eb65ef3e21233b92186bad 100644 (file)
@@ -41,7 +41,7 @@
 class STDMESHERS_EXPORT StdMeshers_QuadranglePreference:public SMESH_Hypothesis
 {
  public:
 class STDMESHERS_EXPORT StdMeshers_QuadranglePreference:public SMESH_Hypothesis
 {
  public:
-  StdMeshers_QuadranglePreference(int hypId, int studyId, SMESH_Gen * gen);
+  StdMeshers_QuadranglePreference(int hypId, SMESH_Gen * gen);
   virtual ~ StdMeshers_QuadranglePreference();
   
   virtual std::ostream & SaveTo(std::ostream & save);
   virtual ~ StdMeshers_QuadranglePreference();
   
   virtual std::ostream & SaveTo(std::ostream & save);
index ef472e49aedb00e20e3801668428cf71439ef8d4..9a51d8a6d1c06002532fcc520a3ff6eea840cb18 100644 (file)
@@ -82,9 +82,9 @@ typedef SMESH_Comment TComm;
  */
 //=============================================================================
 
  */
 //=============================================================================
 
-StdMeshers_Quadrangle_2D::StdMeshers_Quadrangle_2D (int hypId, int studyId,
+StdMeshers_Quadrangle_2D::StdMeshers_Quadrangle_2D (int hypId,
                                                     SMESH_Gen* gen)
                                                     SMESH_Gen* gen)
-  : SMESH_2D_Algo(hypId, studyId, gen),
+  : SMESH_2D_Algo(hypId, gen),
     myQuadranglePreference(false),
     myTrianglePreference(false),
     myTriaVertexID(-1),
     myQuadranglePreference(false),
     myTrianglePreference(false),
     myTriaVertexID(-1),
index b35a1425f6097be692912627de0e30f6a95c1da0..7c121fb1fd9f7c363b583be9296a450fb7082c47 100644 (file)
@@ -135,7 +135,7 @@ struct FaceQuadStruct
 class STDMESHERS_EXPORT StdMeshers_Quadrangle_2D: public SMESH_2D_Algo
 {
  public:
 class STDMESHERS_EXPORT StdMeshers_Quadrangle_2D: public SMESH_2D_Algo
 {
  public:
-  StdMeshers_Quadrangle_2D(int hypId, int studyId, SMESH_Gen* gen);
+  StdMeshers_Quadrangle_2D(int hypId, SMESH_Gen* gen);
   virtual ~StdMeshers_Quadrangle_2D();
 
   virtual bool CheckHypothesis(SMESH_Mesh&         aMesh,
   virtual ~StdMeshers_Quadrangle_2D();
 
   virtual bool CheckHypothesis(SMESH_Mesh&         aMesh,
index e014c36c9ee8e0f6044d482da75d4bf242372985..0203e322b9fb2559a3ec334db6435f4b2d638259 100644 (file)
@@ -36,9 +36,8 @@ using namespace std;
 //=============================================================================
 
 StdMeshers_QuadraticMesh::StdMeshers_QuadraticMesh(int         hypId,
 //=============================================================================
 
 StdMeshers_QuadraticMesh::StdMeshers_QuadraticMesh(int         hypId,
-                                                   int         studyId,
                                                    SMESH_Gen * gen)
                                                    SMESH_Gen * gen)
-     :SMESH_Hypothesis(hypId, studyId, gen)
+     :SMESH_Hypothesis(hypId, gen)
 {
   _name = "QuadraticMesh";
   _param_algo_dim = -1; // it means auxiliary, dim = 1
 {
   _name = "QuadraticMesh";
   _param_algo_dim = -1; // it means auxiliary, dim = 1
index aba0880899cfb6d776a8dd2c1703af8fa77b1db4..5073faa5e6bfeb8a82becd1d4616f42b4e98ef4d 100644 (file)
@@ -43,7 +43,7 @@
 class STDMESHERS_EXPORT StdMeshers_QuadraticMesh:public SMESH_Hypothesis
 {
  public:
 class STDMESHERS_EXPORT StdMeshers_QuadraticMesh:public SMESH_Hypothesis
 {
  public:
-  StdMeshers_QuadraticMesh(int hypId, int studyId, SMESH_Gen * gen);
+  StdMeshers_QuadraticMesh(int hypId, SMESH_Gen * gen);
   virtual ~ StdMeshers_QuadraticMesh();
   
   virtual std::ostream & SaveTo(std::ostream & save);
   virtual ~ StdMeshers_QuadraticMesh();
   
   virtual std::ostream & SaveTo(std::ostream & save);
index bbf339a8b124c022eda732e432df85d6ad46d563..dd533d9b770cdd55c1ea3a64ca6b0a20c669c3a8 100644 (file)
@@ -71,8 +71,8 @@ namespace ProjectionUtils = StdMeshers_ProjectionUtils;
 //purpose  : 
 //=======================================================================
 
 //purpose  : 
 //=======================================================================
 
-StdMeshers_RadialPrism_3D::StdMeshers_RadialPrism_3D(int hypId, int studyId, SMESH_Gen* gen)
-  :SMESH_3D_Algo(hypId, studyId, gen)
+StdMeshers_RadialPrism_3D::StdMeshers_RadialPrism_3D(int hypId, SMESH_Gen* gen)
+  :SMESH_3D_Algo(hypId, gen)
 {
   _name = "RadialPrism_3D";
   _shapeType = (1 << TopAbs_SOLID);     // 1 bit per shape type
 {
   _name = "RadialPrism_3D";
   _shapeType = (1 << TopAbs_SOLID);     // 1 bit per shape type
@@ -338,7 +338,7 @@ public:
     const int myID = -1000;
     TNodeDistributor* myHyp = dynamic_cast<TNodeDistributor*>( aMesh.GetHypothesis( myID ));
     if ( !myHyp )
     const int myID = -1000;
     TNodeDistributor* myHyp = dynamic_cast<TNodeDistributor*>( aMesh.GetHypothesis( myID ));
     if ( !myHyp )
-      myHyp = new TNodeDistributor( myID, 0, aMesh.GetGen() );
+      myHyp = new TNodeDistributor( myID, aMesh.GetGen() );
     return myHyp;
   }
   // -----------------------------------------------------------------------------
     return myHyp;
   }
   // -----------------------------------------------------------------------------
@@ -376,8 +376,8 @@ public:
   }
 protected:
   // -----------------------------------------------------------------------------
   }
 protected:
   // -----------------------------------------------------------------------------
-  TNodeDistributor( int hypId, int studyId, SMESH_Gen* gen)
-    : StdMeshers_Regular_1D( hypId, studyId, gen)
+  TNodeDistributor( int hypId, SMESH_Gen* gen)
+    : StdMeshers_Regular_1D( hypId, gen)
   {
   }
   // -----------------------------------------------------------------------------
   {
   }
   // -----------------------------------------------------------------------------
index 144905e8184b5bd7d063fe793190bf94cac1d124..34561414f2064db67a7b20eb31cfb52611d8d7fe 100644 (file)
@@ -43,7 +43,7 @@ class gp_Pnt;
 class STDMESHERS_EXPORT StdMeshers_RadialPrism_3D: public SMESH_3D_Algo
 {
 public:
 class STDMESHERS_EXPORT StdMeshers_RadialPrism_3D: public SMESH_3D_Algo
 {
 public:
-  StdMeshers_RadialPrism_3D(int hypId, int studyId, SMESH_Gen* gen);
+  StdMeshers_RadialPrism_3D(int hypId, SMESH_Gen* gen);
   virtual ~StdMeshers_RadialPrism_3D();
 
   virtual bool CheckHypothesis(SMESH_Mesh&                          aMesh,
   virtual ~StdMeshers_RadialPrism_3D();
 
   virtual bool CheckHypothesis(SMESH_Mesh&                          aMesh,
index dc573828efbe53b0b3df87d1827214f6deae49d5..9828818f9a20cc5cf25b239ee20fd2828a76a088 100644 (file)
@@ -74,9 +74,8 @@ using namespace std;
 //=======================================================================
 
 StdMeshers_RadialQuadrangle_1D2D::StdMeshers_RadialQuadrangle_1D2D(int        hypId,
 //=======================================================================
 
 StdMeshers_RadialQuadrangle_1D2D::StdMeshers_RadialQuadrangle_1D2D(int        hypId,
-                                                                   int        studyId,
                                                                    SMESH_Gen* gen)
                                                                    SMESH_Gen* gen)
-  :StdMeshers_Quadrangle_2D( hypId, studyId, gen )
+  :StdMeshers_Quadrangle_2D( hypId, gen )
 {
   _name = "RadialQuadrangle_1D2D";
   _shapeType = (1 << TopAbs_FACE);        // 1 bit per shape type
 {
   _name = "RadialQuadrangle_1D2D";
   _shapeType = (1 << TopAbs_FACE);        // 1 bit per shape type
@@ -631,7 +630,7 @@ public:
     const int myID = -1001;
     TNodeDistributor* myHyp = dynamic_cast<TNodeDistributor*>( aMesh.GetHypothesis( myID ));
     if ( !myHyp )
     const int myID = -1001;
     TNodeDistributor* myHyp = dynamic_cast<TNodeDistributor*>( aMesh.GetHypothesis( myID ));
     if ( !myHyp )
-      myHyp = new TNodeDistributor( myID, 0, aMesh.GetGen() );
+      myHyp = new TNodeDistributor( myID, aMesh.GetGen() );
     return myHyp;
   }
   // -----------------------------------------------------------------------------
     return myHyp;
   }
   // -----------------------------------------------------------------------------
@@ -726,8 +725,8 @@ public:
   }
 protected:
   // -----------------------------------------------------------------------------
   }
 protected:
   // -----------------------------------------------------------------------------
-  TNodeDistributor( int hypId, int studyId, SMESH_Gen* gen)
-    : StdMeshers_Regular_1D( hypId, studyId, gen)
+  TNodeDistributor( int hypId, SMESH_Gen* gen)
+    : StdMeshers_Regular_1D( hypId, gen)
   {
   }
   // -----------------------------------------------------------------------------
   {
   }
   // -----------------------------------------------------------------------------
index a029757dde07c258bee719974256ac1b78768377..a53b0285971bfbcc78ca3adbdb0bdc92a53f0cc7 100644 (file)
@@ -39,7 +39,7 @@ class StdMeshers_LayerDistribution;
 class STDMESHERS_EXPORT StdMeshers_RadialQuadrangle_1D2D: public StdMeshers_Quadrangle_2D
 {
 public:
 class STDMESHERS_EXPORT StdMeshers_RadialQuadrangle_1D2D: public StdMeshers_Quadrangle_2D
 {
 public:
-  StdMeshers_RadialQuadrangle_1D2D(int hypId, int studyId, SMESH_Gen* gen);
+  StdMeshers_RadialQuadrangle_1D2D(int hypId, SMESH_Gen* gen);
   virtual ~StdMeshers_RadialQuadrangle_1D2D();
 
   virtual bool CheckHypothesis(SMESH_Mesh&                          aMesh,
   virtual ~StdMeshers_RadialQuadrangle_1D2D();
 
   virtual bool CheckHypothesis(SMESH_Mesh&                          aMesh,
index 6746a502c1daef9cd0bd9655ceae17c87baafcde..d1aa0122d9c53fdaa32d895c8d8506c92ea23749 100644 (file)
@@ -78,9 +78,8 @@ using namespace StdMeshers;
 //=============================================================================
 
 StdMeshers_Regular_1D::StdMeshers_Regular_1D(int         hypId,
 //=============================================================================
 
 StdMeshers_Regular_1D::StdMeshers_Regular_1D(int         hypId,
-                                             int         studyId,
                                              SMESH_Gen * gen)
                                              SMESH_Gen * gen)
-  :SMESH_1D_Algo( hypId, studyId, gen )
+  :SMESH_1D_Algo( hypId, gen )
 {
   _name = "Regular_1D";
   _shapeType = (1 << TopAbs_EDGE);
 {
   _name = "Regular_1D";
   _shapeType = (1 << TopAbs_EDGE);
@@ -629,7 +628,7 @@ void StdMeshers_Regular_1D::redistributeNearVertices (SMESH_Mesh &          theM
         double L = GCPnts_AbscissaPoint::Length( theC3d, *itU, l);
         static StdMeshers_Regular_1D* auxAlgo = 0;
         if ( !auxAlgo ) {
         double L = GCPnts_AbscissaPoint::Length( theC3d, *itU, l);
         static StdMeshers_Regular_1D* auxAlgo = 0;
         if ( !auxAlgo ) {
-          auxAlgo = new StdMeshers_Regular_1D( _gen->GetANewId(), _studyId, _gen );
+          auxAlgo = new StdMeshers_Regular_1D( _gen->GetANewId(), _gen );
           auxAlgo->_hypType = BEG_END_LENGTH;
         }
         auxAlgo->_value[ BEG_LENGTH_IND ] = Lm;
           auxAlgo->_hypType = BEG_END_LENGTH;
         }
         auxAlgo->_value[ BEG_LENGTH_IND ] = Lm;
index d2af675f7d182f892601886c0e53eb4d10975239..bc17cf4f87e8231b168168d7c906cdf8a9db9f90 100644 (file)
@@ -44,7 +44,7 @@ class TopoDS_Vertex;
 class STDMESHERS_EXPORT StdMeshers_Regular_1D: public SMESH_1D_Algo
 {
 public:
 class STDMESHERS_EXPORT StdMeshers_Regular_1D: public SMESH_1D_Algo
 {
 public:
-  StdMeshers_Regular_1D(int hypId, int studyId, SMESH_Gen* gen);
+  StdMeshers_Regular_1D(int hypId, SMESH_Gen* gen);
   virtual ~StdMeshers_Regular_1D();
 
   virtual bool CheckHypothesis(SMESH_Mesh& aMesh,
   virtual ~StdMeshers_Regular_1D();
 
   virtual bool CheckHypothesis(SMESH_Mesh& aMesh,
index b5b20f7af8d79476d889dfb9bd5c71315d7498c6..72c435d904a800673c323524925cc5b6d22e1ba1 100644 (file)
@@ -33,8 +33,8 @@
  */
 //=============================================================================
 
  */
 //=============================================================================
 
-StdMeshers_Reversible1D::StdMeshers_Reversible1D(int hypId, int studyId, SMESH_Gen * gen)
-  :SMESH_Hypothesis(hypId, studyId, gen)
+StdMeshers_Reversible1D::StdMeshers_Reversible1D(int hypId, SMESH_Gen * gen)
+  :SMESH_Hypothesis(hypId, gen)
 {
   _param_algo_dim = 1; 
 }
 {
   _param_algo_dim = 1; 
 }
index c146e1728d95f17be1e08c61319ca347b1698fa2..a8d62257c46479b6bf19231476fe8329483723af 100644 (file)
@@ -38,7 +38,7 @@
 class STDMESHERS_EXPORT StdMeshers_Reversible1D : public SMESH_Hypothesis
 {
 public:
 class STDMESHERS_EXPORT StdMeshers_Reversible1D : public SMESH_Hypothesis
 {
 public:
-  StdMeshers_Reversible1D(int hypId, int studyId, SMESH_Gen* gen);
+  StdMeshers_Reversible1D(int hypId, SMESH_Gen* gen);
 
   void SetReversedEdges( const std::vector<int>& ids);
 
 
   void SetReversedEdges( const std::vector<int>& ids);
 
index f938d28291b9ede29780c4d6e3cc8587dd8275f3..c5bb4fd0dca29db095bef6ccd271015a3aad4f42 100644 (file)
@@ -36,8 +36,8 @@
 //=======================================================================
 
 StdMeshers_SegmentAroundVertex_0D::StdMeshers_SegmentAroundVertex_0D
 //=======================================================================
 
 StdMeshers_SegmentAroundVertex_0D::StdMeshers_SegmentAroundVertex_0D
-                                   (int hypId, int studyId, SMESH_Gen* gen)
-  :SMESH_0D_Algo(hypId, studyId, gen)
+                                   (int hypId, SMESH_Gen* gen)
+  :SMESH_0D_Algo(hypId, gen)
 {
   _name = "SegmentAroundVertex_0D";
   // it is assigned to vertices but influence a state of EDGE submeshes
 {
   _name = "SegmentAroundVertex_0D";
   // it is assigned to vertices but influence a state of EDGE submeshes
index 3e863df4c998309c4fc48aad36ff1d5270b2e931..c8fbe88c1622bb004a4a3481b605ba3e19e3e2ec 100644 (file)
@@ -38,7 +38,7 @@
 class STDMESHERS_EXPORT StdMeshers_SegmentAroundVertex_0D: public SMESH_0D_Algo
 {
 public:
 class STDMESHERS_EXPORT StdMeshers_SegmentAroundVertex_0D: public SMESH_0D_Algo
 {
 public:
-  StdMeshers_SegmentAroundVertex_0D(int hypId, int studyId, SMESH_Gen* gen);
+  StdMeshers_SegmentAroundVertex_0D(int hypId, SMESH_Gen* gen);
   virtual ~StdMeshers_SegmentAroundVertex_0D();
 
   virtual bool CheckHypothesis(SMESH_Mesh&                          aMesh,
   virtual ~StdMeshers_SegmentAroundVertex_0D();
 
   virtual bool CheckHypothesis(SMESH_Mesh&                          aMesh,
index 317d44cbd232d185be35d010e806094d88d8cfe8..1b0dd37cea53e1cb51e079da8022603b43c84d2d 100644 (file)
@@ -50,8 +50,8 @@ using namespace std;
 //=============================================================================
 
 StdMeshers_SegmentLengthAroundVertex::StdMeshers_SegmentLengthAroundVertex
 //=============================================================================
 
 StdMeshers_SegmentLengthAroundVertex::StdMeshers_SegmentLengthAroundVertex
-                                       (int hypId, int studyId, SMESH_Gen * gen)
-  :SMESH_Hypothesis(hypId, studyId, gen)
+                                       (int hypId, SMESH_Gen * gen)
+  :SMESH_Hypothesis(hypId, gen)
 {
   _length = 1.;
   _name = "SegmentLengthAroundVertex";
 {
   _length = 1.;
   _name = "SegmentLengthAroundVertex";
index 66b095c13a8b0ef5b43380481dd09be77c74f5ee..198ba34c6c792d3cd980793ccf375b5d706fb96d 100644 (file)
@@ -40,7 +40,7 @@
 class STDMESHERS_EXPORT StdMeshers_SegmentLengthAroundVertex:public SMESH_Hypothesis
 {
  public:
 class STDMESHERS_EXPORT StdMeshers_SegmentLengthAroundVertex:public SMESH_Hypothesis
 {
  public:
-  StdMeshers_SegmentLengthAroundVertex(int hypId, int studyId, SMESH_Gen * gen);
+  StdMeshers_SegmentLengthAroundVertex(int hypId, SMESH_Gen * gen);
   virtual ~ StdMeshers_SegmentLengthAroundVertex();
 
   void SetLength(double length) throw(SALOME_Exception);
   virtual ~ StdMeshers_SegmentLengthAroundVertex();
 
   void SetLength(double length) throw(SALOME_Exception);
index 5e63f8cae30e7cc24e38607cf00a381468613b5a..a78244733fb87c430df2db85e380ce693b71718e 100644 (file)
@@ -48,9 +48,8 @@ using namespace std;
 //=============================================================================
 
 StdMeshers_StartEndLength::StdMeshers_StartEndLength(int         hypId,
 //=============================================================================
 
 StdMeshers_StartEndLength::StdMeshers_StartEndLength(int         hypId,
-                                                     int         studyId,
                                                      SMESH_Gen * gen)
                                                      SMESH_Gen * gen)
-     :SMESH_Hypothesis(hypId, studyId, gen)
+     :SMESH_Hypothesis(hypId, gen)
 {
   _begLength = 1.;
   _endLength = 10.;
 {
   _begLength = 1.;
   _endLength = 10.;
index 37a442c439b8b57e2edff79c9488683c488e71a6..fed02351aa363a9348c154278c0d5d7f127af0bc 100644 (file)
@@ -37,7 +37,7 @@
 class STDMESHERS_EXPORT StdMeshers_StartEndLength:public SMESH_Hypothesis
 {
  public:
 class STDMESHERS_EXPORT StdMeshers_StartEndLength:public SMESH_Hypothesis
 {
  public:
-  StdMeshers_StartEndLength(int hypId, int studyId, SMESH_Gen * gen);
+  StdMeshers_StartEndLength(int hypId, SMESH_Gen * gen);
   virtual ~ StdMeshers_StartEndLength();
 
   void SetLength(double length, bool isStartLength) throw(SALOME_Exception);
   virtual ~ StdMeshers_StartEndLength();
 
   void SetLength(double length, bool isStartLength) throw(SALOME_Exception);
index 6fcd338dca60bcc217db22a6c525cc05eb45870f..1f8a5b03b21ca5ec4c9f878b3397807b6b571635 100644 (file)
@@ -34,8 +34,8 @@
 //=======================================================================
 
 StdMeshers_UseExisting_1D::StdMeshers_UseExisting_1D
 //=======================================================================
 
 StdMeshers_UseExisting_1D::StdMeshers_UseExisting_1D
-                                   (int hypId, int studyId, SMESH_Gen* gen)
-  :SMESH_1D_Algo(hypId, studyId, gen)
+                                   (int hypId, SMESH_Gen* gen)
+  :SMESH_1D_Algo(hypId, gen)
 {
   _name = "UseExisting_1D";
   _shapeType = (1 << TopAbs_EDGE); // 1 bit per shape type
 {
   _name = "UseExisting_1D";
   _shapeType = (1 << TopAbs_EDGE); // 1 bit per shape type
@@ -89,8 +89,8 @@ bool StdMeshers_UseExisting_1D::Evaluate(SMESH_Mesh&,
 //=======================================================================
 
 StdMeshers_UseExisting_2D::StdMeshers_UseExisting_2D
 //=======================================================================
 
 StdMeshers_UseExisting_2D::StdMeshers_UseExisting_2D
-                                   (int hypId, int studyId, SMESH_Gen* gen)
-  :SMESH_2D_Algo(hypId, studyId, gen)
+                                   (int hypId, SMESH_Gen* gen)
+  :SMESH_2D_Algo(hypId, gen)
 {
   _name = "UseExisting_2D";
   _shapeType = (1 << TopAbs_FACE); // 1 bit per shape type
 {
   _name = "UseExisting_2D";
   _shapeType = (1 << TopAbs_FACE); // 1 bit per shape type
index 9bcb4a0fff2c49c33fd0ff86b47a290881bccde3..307693819f6a433c3d436865a7c34d8ce12749db 100644 (file)
@@ -35,7 +35,7 @@
 class STDMESHERS_EXPORT StdMeshers_UseExisting_2D: public SMESH_2D_Algo
 {
 public:
 class STDMESHERS_EXPORT StdMeshers_UseExisting_2D: public SMESH_2D_Algo
 {
 public:
-  StdMeshers_UseExisting_2D(int hypId, int studyId, SMESH_Gen* gen);
+  StdMeshers_UseExisting_2D(int hypId, SMESH_Gen* gen);
 
   virtual bool CheckHypothesis(SMESH_Mesh&                          aMesh,
                                const TopoDS_Shape&                  aShape,
 
   virtual bool CheckHypothesis(SMESH_Mesh&                          aMesh,
                                const TopoDS_Shape&                  aShape,
@@ -50,7 +50,7 @@ public:
 class STDMESHERS_EXPORT StdMeshers_UseExisting_1D: public SMESH_1D_Algo
 {
 public:
 class STDMESHERS_EXPORT StdMeshers_UseExisting_1D: public SMESH_1D_Algo
 {
 public:
-  StdMeshers_UseExisting_1D(int hypId, int studyId, SMESH_Gen* gen);
+  StdMeshers_UseExisting_1D(int hypId, SMESH_Gen* gen);
 
   virtual bool CheckHypothesis(SMESH_Mesh&                          aMesh,
                                const TopoDS_Shape&                  aShape,
 
   virtual bool CheckHypothesis(SMESH_Mesh&                          aMesh,
                                const TopoDS_Shape&                  aShape,
index 8212b0a8b4d4f407e847ce6376be88d99f9a0162..eafdf22ef132433b1160be9fc79ffb6e3c07ce12 100644 (file)
@@ -1205,8 +1205,8 @@ namespace VISCOUS_3D
 //================================================================================
 // StdMeshers_ViscousLayers hypothesis
 //
 //================================================================================
 // StdMeshers_ViscousLayers hypothesis
 //
-StdMeshers_ViscousLayers::StdMeshers_ViscousLayers(int hypId, int studyId, SMESH_Gen* gen)
-  :SMESH_Hypothesis(hypId, studyId, gen),
+StdMeshers_ViscousLayers::StdMeshers_ViscousLayers(int hypId, SMESH_Gen* gen)
+  :SMESH_Hypothesis(hypId, gen),
    _isToIgnoreShapes(1), _nbLayers(1), _thickness(1), _stretchFactor(1),
    _method( SURF_OFFSET_SMOOTH )
 {
    _isToIgnoreShapes(1), _nbLayers(1), _thickness(1), _stretchFactor(1),
    _method( SURF_OFFSET_SMOOTH )
 {
@@ -1681,8 +1681,8 @@ namespace VISCOUS_3D
       py = _pyStream = new ofstream(fname);
       *py << "import SMESH" << endl
           << "from salome.smesh import smeshBuilder" << endl
       py = _pyStream = new ofstream(fname);
       *py << "import SMESH" << endl
           << "from salome.smesh import smeshBuilder" << endl
-          << "smesh  = smeshBuilder.New(salome.myStudy)" << endl
-          << "meshSO = smesh.GetCurrentStudy().FindObjectID('0:1:2:" << tag <<"')" << endl
+          << "smesh  = smeshBuilder.New()" << endl
+          << "meshSO = salome.myStudy.FindObjectID('0:1:2:" << tag <<"')" << endl
           << "mesh   = smesh.Mesh( meshSO.GetObject() )"<<endl;
       theNbPyFunc = 0;
     }
           << "mesh   = smesh.Mesh( meshSO.GetObject() )"<<endl;
       theNbPyFunc = 0;
     }
index ce01ea208cfc06def8a81eba4e0405aeeda693fa..0eeb07e0b8397295f421e1514bb26ce8ec75ed2f 100644 (file)
@@ -38,7 +38,7 @@
 class STDMESHERS_EXPORT StdMeshers_ViscousLayers : public SMESH_Hypothesis
 {
 public:
 class STDMESHERS_EXPORT StdMeshers_ViscousLayers : public SMESH_Hypothesis
 {
 public:
-  StdMeshers_ViscousLayers(int hypId, int studyId, SMESH_Gen* gen);
+  StdMeshers_ViscousLayers(int hypId, SMESH_Gen* gen);
 
   // Set boundary shapes (faces in 3D, edges in 2D) either to exclude from
   // treatment or to make the Viscous Layers on
 
   // Set boundary shapes (faces in 3D, edges in 2D) either to exclude from
   // treatment or to make the Viscous Layers on
index ecd62abc20462cf179b9dd8fb116eb631d0b7dad..6586e120fb3ddb09e208c94e5febbdfeec9c349a 100644 (file)
@@ -501,8 +501,8 @@ namespace VISCOUS_2D
 //================================================================================
 // StdMeshers_ViscousLayers hypothesis
 //
 //================================================================================
 // StdMeshers_ViscousLayers hypothesis
 //
-StdMeshers_ViscousLayers2D::StdMeshers_ViscousLayers2D(int hypId, int studyId, SMESH_Gen* gen)
-  :StdMeshers_ViscousLayers(hypId, studyId, gen)
+StdMeshers_ViscousLayers2D::StdMeshers_ViscousLayers2D(int hypId, SMESH_Gen* gen)
+  :StdMeshers_ViscousLayers(hypId, gen)
 {
   _name = StdMeshers_ViscousLayers2D::GetHypType();
   _param_algo_dim = -2; // auxiliary hyp used by 2D algos
 {
   _name = StdMeshers_ViscousLayers2D::GetHypType();
   _param_algo_dim = -2; // auxiliary hyp used by 2D algos
@@ -600,7 +600,7 @@ StdMeshers_ViscousLayers2D::CheckHypothesis(SMESH_Mesh&
 // --------------------------------------------------------------------------------
 void StdMeshers_ViscousLayers2D::RestoreListeners() const
 {
 // --------------------------------------------------------------------------------
 void StdMeshers_ViscousLayers2D::RestoreListeners() const
 {
-  StudyContextStruct* sc = _gen->GetStudyContext( _studyId );
+  StudyContextStruct* sc = _gen->GetStudyContext();
   std::map < int, SMESH_Mesh * >::iterator i_smesh = sc->mapMesh.begin();
   for ( ; i_smesh != sc->mapMesh.end(); ++i_smesh )
   {
   std::map < int, SMESH_Mesh * >::iterator i_smesh = sc->mapMesh.begin();
   for ( ; i_smesh != sc->mapMesh.end(); ++i_smesh )
   {
index cff610b17aaa11d6b2f054ea2cbe2b345fa61766..554cee395e67a99efca3fd547c3dce76361c7019 100644 (file)
@@ -35,7 +35,7 @@ class StdMeshers_FaceSide;
 class STDMESHERS_EXPORT StdMeshers_ViscousLayers2D : public StdMeshers_ViscousLayers
 {
 public:
 class STDMESHERS_EXPORT StdMeshers_ViscousLayers2D : public StdMeshers_ViscousLayers
 {
 public:
-  StdMeshers_ViscousLayers2D(int hypId, int studyId, SMESH_Gen* gen);
+  StdMeshers_ViscousLayers2D(int hypId, SMESH_Gen* gen);
   /*!
    * \brief Computes temporary 2D mesh to be used by 2D algorithm.
    *        Return SMESH_ProxyMesh for the given FACE, or NULL in case of error
   /*!
    * \brief Computes temporary 2D mesh to be used by 2D algorithm.
    *        Return SMESH_ProxyMesh for the given FACE, or NULL in case of error
index 1b390d361f1d5083aaa92e7b755d231b327f5e5b..74f46994099a8ac3218d37f78b573dc25040009e 100644 (file)
@@ -63,6 +63,7 @@ SET(_link_LIBRARIES
   ${QWT_LIBRARY}
   SalomeIDLSMESH
   SMESHFiltersSelection
   ${QWT_LIBRARY}
   SalomeIDLSMESH
   SMESHFiltersSelection
+  SMESHEngine
   SMESH
   SMESHObject
 )
   SMESH
   SMESHObject
 )
index 6f243e037dfe83d59999940a95b13acc50ec8df2..9f1de0c28e375fdb4a5b8b21152e210d73ad75a9 100644 (file)
@@ -152,7 +152,7 @@ void StdMeshersGUI_LayerDistributionParamWdg::onHypTypePopup( QAction* a )
   SMESH::SMESH_Gen_var gen = mySMESHGUI->GetSMESHGen();
 
   // avoid publishing a new 1D hyp
   SMESH::SMESH_Gen_var gen = mySMESHGUI->GetSMESHGen();
 
   // avoid publishing a new 1D hyp
-  gen->SetCurrentStudy( SALOMEDS::Study::_nil() );
+  gen->SetEnablePublish( false );
 
   // create a hyp
   HypothesisData* aHypData = 0;
 
   // create a hyp
   HypothesisData* aHypData = 0;
@@ -174,7 +174,7 @@ void StdMeshersGUI_LayerDistributionParamWdg::onHypTypePopup( QAction* a )
   }
 
   // restore current study
   }
 
   // restore current study
-  mySMESHGUI->GetSMESHGen();
+  gen->SetEnablePublish( true );
 
   onEdit();
 }
 
   onEdit();
 }
index 823331951bb1cdcec54112137d1ebdd1c48d4fbd..5b6b5451246f76bd2a9b1d8f857db7cf4caf157d 100644 (file)
@@ -227,9 +227,9 @@ void StdMeshersGUI_ObjectReferenceParamWdg::SetObjects(SMESH::string_array_var&
   
   for ( unsigned i = 0; i < objects->length(); ++i )
   {
   
   for ( unsigned i = 0; i < objects->length(); ++i )
   {
-    _PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
+    _PTR(Study) aStudy = SMESH::getStudy();
     _PTR(SObject) aSObj = aStudy->FindObjectID(objects[i].in());
     _PTR(SObject) aSObj = aStudy->FindObjectID(objects[i].in());
-    CORBA::Object_var anObj = SMESH::SObjectToObject(aSObj,aStudy);
+    CORBA::Object_var anObj = SMESH::SObjectToObject(aSObj);
     if ( !CORBA::is_nil( anObj )) {
       std::string name = aSObj->GetName();
       QString text = myObjNameLineEdit->text();
     if ( !CORBA::is_nil( anObj )) {
       std::string name = aSObj->GetName();
       QString text = myObjNameLineEdit->text();
index a7841c1e5c7203e01d5378874a795cec72d69640..8c49daa2a72e0c917b05f6a4a3af2ed8866a92b1 100644 (file)
@@ -423,10 +423,10 @@ bool StdMeshersGUI_StdHypothesisCreator::checkParams( QString& msg ) const
       GEOM::GEOM_Object_var face = w->GetObject< GEOM::GEOM_Object >();
 
       GEOM::GEOM_Gen_var geomGen = SMESH::GetGEOMGen();
       GEOM::GEOM_Object_var face = w->GetObject< GEOM::GEOM_Object >();
 
       GEOM::GEOM_Gen_var geomGen = SMESH::GetGEOMGen();
-      _PTR(Study)         aStudy = SMESH::GetActiveStudyDocument();
+      _PTR(Study)         aStudy = SMESH::getStudy();
       GEOM::GEOM_IShapesOperations_wrap shapeOp;
       if ( !geomGen->_is_nil() && aStudy )
       GEOM::GEOM_IShapesOperations_wrap shapeOp;
       if ( !geomGen->_is_nil() && aStudy )
-        shapeOp = geomGen->GetIShapesOperations( aStudy->StudyId() );
+        shapeOp = geomGen->GetIShapesOperations();
       if ( !shapeOp->_is_nil() )
       {
         GEOM::ListOfLong_var vertices =
       if ( !shapeOp->_is_nil() )
       {
         GEOM::ListOfLong_var vertices =
index 0518ee07ced03b644f3a84aa120d19bba24d92bc..a3a54de51ca3f9f3547652475d91fc2725c69520 100644 (file)
@@ -578,16 +578,12 @@ void StdMeshersGUI_SubShapeSelectorWdg::updateState()
 GEOM::GEOM_Object_var StdMeshersGUI_SubShapeSelectorWdg::GetGeomObjectByEntry( const QString& theEntry )
 {
   GEOM::GEOM_Object_var aGeomObj;
 GEOM::GEOM_Object_var StdMeshersGUI_SubShapeSelectorWdg::GetGeomObjectByEntry( const QString& theEntry )
 {
   GEOM::GEOM_Object_var aGeomObj;
-  SALOMEDS::Study_var aStudy = SMESHGUI::GetSMESHGen()->GetCurrentStudy();
-  if ( !aStudy->_is_nil() )
+  SALOMEDS::SObject_var aSObj = SMESH_Gen_i::getStudyServant()->FindObjectID( theEntry.toLatin1().data() );
+  if (!aSObj->_is_nil() )
   {
   {
-    SALOMEDS::SObject_var aSObj = aStudy->FindObjectID( theEntry.toLatin1().data() );
-    if (!aSObj->_is_nil() )
-    {
-      CORBA::Object_var obj = aSObj->GetObject();
-      aGeomObj = GEOM::GEOM_Object::_narrow(obj);
-      aSObj->UnRegister();
-    }
+    CORBA::Object_var obj = aSObj->GetObject();
+    aGeomObj = GEOM::GEOM_Object::_narrow(obj);
+    aSObj->UnRegister();
   }
   return aGeomObj._retn();
 }
   }
   return aGeomObj._retn();
 }
index d0439c955f07ca29aaa536f396150e689ed82c28..de799712d3d478c42c018ff1e7301675b9bbbf22 100644 (file)
 //=======================================================================
 
 StdMeshers_Adaptive1D_i::StdMeshers_Adaptive1D_i( PortableServer::POA_ptr thePOA,
 //=======================================================================
 
 StdMeshers_Adaptive1D_i::StdMeshers_Adaptive1D_i( PortableServer::POA_ptr thePOA,
-                                                  int                     theStudyId,
                                                   ::SMESH_Gen*            theGenImpl )
   : SALOME::GenericObj_i( thePOA ), 
     SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_Adaptive1D( theGenImpl->GetANewId(),
                                                   ::SMESH_Gen*            theGenImpl )
   : SALOME::GenericObj_i( thePOA ), 
     SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_Adaptive1D( theGenImpl->GetANewId(),
-                                            theStudyId,
                                             theGenImpl );
 }
 
                                             theGenImpl );
 }
 
index 7aa2c1879f5d19dde43a28423ba6944330341a85..060b8b42af428096df35cce90ebc5c258153566f 100644 (file)
@@ -46,7 +46,6 @@ class STDMESHERS_I_EXPORT StdMeshers_Adaptive1D_i:
  public:
   // Constructor
   StdMeshers_Adaptive1D_i( PortableServer::POA_ptr thePOA,
  public:
   // Constructor
   StdMeshers_Adaptive1D_i( PortableServer::POA_ptr thePOA,
-                           int                     theStudyId,
                            ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_Adaptive1D_i();
                            ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_Adaptive1D_i();
index 824530ec2b2db20ede5d099baee0371fe5bae779..f5a60814429c615766a6e854e47105919834d5de 100644 (file)
@@ -46,14 +46,12 @@ using namespace std;
 //=============================================================================
 
 StdMeshers_Arithmetic1D_i::StdMeshers_Arithmetic1D_i( PortableServer::POA_ptr thePOA,
 //=============================================================================
 
 StdMeshers_Arithmetic1D_i::StdMeshers_Arithmetic1D_i( PortableServer::POA_ptr thePOA,
-                                                    int                     theStudyId,
-                                                    ::SMESH_Gen*            theGenImpl )
+                                                      ::SMESH_Gen*            theGenImpl )
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_Arithmetic1D( theGenImpl->GetANewId(),
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_Arithmetic1D( theGenImpl->GetANewId(),
-                                             theStudyId,
-                                             theGenImpl );
+                                              theGenImpl );
 }
 
 //=============================================================================
 }
 
 //=============================================================================
index 6dece73a47107afb933eed017ccdd8bdc5a71abd..622354e99ca1c846ad5d88f874d13c87d3a85938 100644 (file)
@@ -46,7 +46,6 @@ class STDMESHERS_I_EXPORT StdMeshers_Arithmetic1D_i:
 public:
   // Constructor
   StdMeshers_Arithmetic1D_i( PortableServer::POA_ptr thePOA,
 public:
   // Constructor
   StdMeshers_Arithmetic1D_i( PortableServer::POA_ptr thePOA,
-                            int                     theStudyId,
                              ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_Arithmetic1D_i();
                              ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_Arithmetic1D_i();
index d532e39351b70d0d476c027e3facebdcc83c221d..9121614d6de672ff832a36d89a4c061860e65382 100644 (file)
@@ -47,13 +47,11 @@ using namespace std;
 //=============================================================================
 
 StdMeshers_AutomaticLength_i::StdMeshers_AutomaticLength_i( PortableServer::POA_ptr thePOA,
 //=============================================================================
 
 StdMeshers_AutomaticLength_i::StdMeshers_AutomaticLength_i( PortableServer::POA_ptr thePOA,
-                                                            int                     theStudyId,
                                                             ::SMESH_Gen*            theGenImpl )
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_AutomaticLength( theGenImpl->GetANewId(),
                                                             ::SMESH_Gen*            theGenImpl )
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_AutomaticLength( theGenImpl->GetANewId(),
-                                                 theStudyId,
                                                  theGenImpl );
 }
 
                                                  theGenImpl );
 }
 
index d883d1b0b269e39764c7008b4d992dcd28abe54b..63847bd6d787a39128f10f84a20f6f508b2ea5fe 100644 (file)
@@ -50,7 +50,6 @@ class STDMESHERS_I_EXPORT StdMeshers_AutomaticLength_i:
 public:
   // Constructor
   StdMeshers_AutomaticLength_i( PortableServer::POA_ptr thePOA,
 public:
   // Constructor
   StdMeshers_AutomaticLength_i( PortableServer::POA_ptr thePOA,
-                                int                     theStudyId,
                                 ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_AutomaticLength_i();
                                 ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_AutomaticLength_i();
index 90d4ea4928062f0d2af688fa1410da4b8ff0d739..18c7426e8a3ac44c5b1fc7e8d8c6b59c51626fae 100644 (file)
@@ -59,13 +59,11 @@ namespace
 
 StdMeshers_CartesianParameters3D_i::
 StdMeshers_CartesianParameters3D_i( PortableServer::POA_ptr thePOA,
 
 StdMeshers_CartesianParameters3D_i::
 StdMeshers_CartesianParameters3D_i( PortableServer::POA_ptr thePOA,
-                                    int                     theStudyId,
                                     ::SMESH_Gen*            theGenImpl )
   : SALOME::GenericObj_i( thePOA ), 
     SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_CartesianParameters3D( theGenImpl->GetANewId(),
                                     ::SMESH_Gen*            theGenImpl )
   : SALOME::GenericObj_i( thePOA ), 
     SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_CartesianParameters3D( theGenImpl->GetANewId(),
-                                                       theStudyId,
                                                        theGenImpl );
 }
 
                                                        theGenImpl );
 }
 
index fb1fc91b3839f5b4a947196bb67be0f59e75c158..d9f4d603ab046f60107623980b64f47dd031ac42 100644 (file)
@@ -46,7 +46,6 @@ class STDMESHERS_I_EXPORT StdMeshers_CartesianParameters3D_i:
  public:
   // Constructor
   StdMeshers_CartesianParameters3D_i( PortableServer::POA_ptr thePOA,
  public:
   // Constructor
   StdMeshers_CartesianParameters3D_i( PortableServer::POA_ptr thePOA,
-                                      int                     theStudyId,
                                       ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_CartesianParameters3D_i();
                                       ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_CartesianParameters3D_i();
index 2eeaff8d14adb02798aa8b4f725b886b0e47f97a..b45cb6c0e76424b444c843bdbf34e4024cbe297d 100644 (file)
@@ -38,7 +38,6 @@
 //=============================================================================
 
 StdMeshers_Cartesian_3D_i::StdMeshers_Cartesian_3D_i( PortableServer::POA_ptr thePOA,
 //=============================================================================
 
 StdMeshers_Cartesian_3D_i::StdMeshers_Cartesian_3D_i( PortableServer::POA_ptr thePOA,
-                                                      int                     theStudyId,
                                                       ::SMESH_Gen*            theGenImpl )
   : SALOME::GenericObj_i( thePOA ), 
     SMESH_Hypothesis_i( thePOA ), 
                                                       ::SMESH_Gen*            theGenImpl )
   : SALOME::GenericObj_i( thePOA ), 
     SMESH_Hypothesis_i( thePOA ), 
@@ -46,7 +45,6 @@ StdMeshers_Cartesian_3D_i::StdMeshers_Cartesian_3D_i( PortableServer::POA_ptr th
     SMESH_3D_Algo_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_Cartesian_3D( theGenImpl->GetANewId(),
     SMESH_3D_Algo_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_Cartesian_3D( theGenImpl->GetANewId(),
-                                              theStudyId,
                                               theGenImpl );
 }
 
                                               theGenImpl );
 }
 
index 1eca0a00ee06c5ef91c305f9457d782340991d8b..6376d36d5986e6cba12abe668d7dcd834512aa69 100644 (file)
@@ -45,7 +45,6 @@ class STDMESHERS_I_EXPORT StdMeshers_Cartesian_3D_i:
 public:
   // Constructor
   StdMeshers_Cartesian_3D_i( PortableServer::POA_ptr thePOA,
 public:
   // Constructor
   StdMeshers_Cartesian_3D_i( PortableServer::POA_ptr thePOA,
-                             int                     theStudyId,
                              ::SMESH_Gen*            theGenImpl );
 
   // Destructor
                              ::SMESH_Gen*            theGenImpl );
 
   // Destructor
index 01a579b56c5dd5108eb6f82e7c20fbd269e51d61..482a9f16a866dc14b728c225ea53f672c593c92d 100644 (file)
@@ -43,7 +43,6 @@ using namespace std;
 
 StdMeshers_CompositeSegment_1D_i::StdMeshers_CompositeSegment_1D_i
                                                 ( PortableServer::POA_ptr thePOA,
 
 StdMeshers_CompositeSegment_1D_i::StdMeshers_CompositeSegment_1D_i
                                                 ( PortableServer::POA_ptr thePOA,
-                                                  int                     theStudyId,
                                                   ::SMESH_Gen*            theGenImpl )
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA ), 
                                                   ::SMESH_Gen*            theGenImpl )
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA ), 
@@ -51,7 +50,6 @@ StdMeshers_CompositeSegment_1D_i::StdMeshers_CompositeSegment_1D_i
        SMESH_1D_Algo_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_CompositeSegment_1D( theGenImpl->GetANewId(),
        SMESH_1D_Algo_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_CompositeSegment_1D( theGenImpl->GetANewId(),
-                                                     theStudyId,
                                                      theGenImpl );
 }
 
                                                      theGenImpl );
 }
 
index b7811f6291e795f0651324e8bb59a693562d42fa..b8f9948639d0b78bd86d56d3329254653925eccf 100644 (file)
@@ -44,7 +44,6 @@ class StdMeshers_CompositeSegment_1D_i:
 public:
   // Constructor
   StdMeshers_CompositeSegment_1D_i( PortableServer::POA_ptr thePOA,
 public:
   // Constructor
   StdMeshers_CompositeSegment_1D_i( PortableServer::POA_ptr thePOA,
-                                    int                     theStudyId,
                                     ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_CompositeSegment_1D_i();
                                     ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_CompositeSegment_1D_i();
index add0ede6dd369d9e5f1d8fee54ab2a52368f36ba..a89708793b752c177b9ce25832c4ff16c3b89d50 100644 (file)
@@ -47,14 +47,12 @@ using namespace std;
 //=============================================================================
 
 StdMeshers_Deflection1D_i::StdMeshers_Deflection1D_i( PortableServer::POA_ptr thePOA,
 //=============================================================================
 
 StdMeshers_Deflection1D_i::StdMeshers_Deflection1D_i( PortableServer::POA_ptr thePOA,
-                                          int                     theStudyId,
-                                          ::SMESH_Gen*            theGenImpl )
+                                                      ::SMESH_Gen*            theGenImpl )
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_Deflection1D( theGenImpl->GetANewId(),
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_Deflection1D( theGenImpl->GetANewId(),
-                                        theStudyId,
-                                        theGenImpl );
+                                              theGenImpl );
 }
 
 //=============================================================================
 }
 
 //=============================================================================
index 722da9b4231e6e9799cd26cdf1c6d48c8ebca64d..dfac16e1de009974801bfa35a8a0bde52a94cc89 100644 (file)
@@ -49,8 +49,7 @@ class STDMESHERS_I_EXPORT StdMeshers_Deflection1D_i:
 public:
   // Constructor
   StdMeshers_Deflection1D_i( PortableServer::POA_ptr thePOA,
 public:
   // Constructor
   StdMeshers_Deflection1D_i( PortableServer::POA_ptr thePOA,
-                       int                     theStudyId,
-                       ::SMESH_Gen*            theGenImpl );
+                             ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_Deflection1D_i();
 
   // Destructor
   virtual ~StdMeshers_Deflection1D_i();
 
index fbaa715c6aabe4e899d7c840f3bef6478480ed14..e6323cd314bc9ef29e736a2fe590085d6e438922 100644 (file)
@@ -44,13 +44,11 @@ using namespace std;
 //=============================================================================
 
 StdMeshers_FixedPoints1D_i::StdMeshers_FixedPoints1D_i( PortableServer::POA_ptr thePOA,
 //=============================================================================
 
 StdMeshers_FixedPoints1D_i::StdMeshers_FixedPoints1D_i( PortableServer::POA_ptr thePOA,
-                                                        int                     theStudyId,
                                                         ::SMESH_Gen*            theGenImpl )
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_FixedPoints1D(theGenImpl->GetANewId(),
                                                         ::SMESH_Gen*            theGenImpl )
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_FixedPoints1D(theGenImpl->GetANewId(),
-                                              theStudyId,
                                               theGenImpl);
 }
 
                                               theGenImpl);
 }
 
index 37522382183b177195efaf8e40ac8e52c7d27df1..7261ff7a76d1bd3b8df68e219c83927658aaf180 100644 (file)
@@ -43,7 +43,6 @@ class STDMESHERS_I_EXPORT StdMeshers_FixedPoints1D_i:
 public:
   // Constructor
   StdMeshers_FixedPoints1D_i( PortableServer::POA_ptr thePOA,
 public:
   // Constructor
   StdMeshers_FixedPoints1D_i( PortableServer::POA_ptr thePOA,
-                              int                     theStudyId,
                               ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_FixedPoints1D_i();
                               ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_FixedPoints1D_i();
index cd4d6ec0d37a242f204cd97424972bfbe0274bd3..1530dc26c304afd03f7c10e75f806df2c61c5adb 100644 (file)
 //=============================================================================
 
 StdMeshers_Geometric1D_i::StdMeshers_Geometric1D_i( PortableServer::POA_ptr thePOA,
 //=============================================================================
 
 StdMeshers_Geometric1D_i::StdMeshers_Geometric1D_i( PortableServer::POA_ptr thePOA,
-                                                    int                     theStudyId,
                                                     ::SMESH_Gen*            theGenImpl )
   : SALOME::GenericObj_i( thePOA ), 
     SMESH_Hypothesis_i( thePOA ),
     StdMeshers_Reversible1D_i( this )
 {
   myBaseImpl = new ::StdMeshers_Geometric1D( theGenImpl->GetANewId(),
                                                     ::SMESH_Gen*            theGenImpl )
   : SALOME::GenericObj_i( thePOA ), 
     SMESH_Hypothesis_i( thePOA ),
     StdMeshers_Reversible1D_i( this )
 {
   myBaseImpl = new ::StdMeshers_Geometric1D( theGenImpl->GetANewId(),
-                                             theStudyId,
                                              theGenImpl );
 }
 
                                              theGenImpl );
 }
 
index 38f0b6d8d26db1331db4827657aaf3f93ee03f55..f3a8964be4c912b28d8582b8da1913f11bbc65fe 100644 (file)
@@ -47,7 +47,6 @@ class STDMESHERS_I_EXPORT StdMeshers_Geometric1D_i:
  public:
   // Constructor
   StdMeshers_Geometric1D_i( PortableServer::POA_ptr thePOA,
  public:
   // Constructor
   StdMeshers_Geometric1D_i( PortableServer::POA_ptr thePOA,
-                            int                     theStudyId,
                             ::SMESH_Gen*            theGenImpl );
 
   void SetStartLength(CORBA::Double length) throw(SALOME::SALOME_Exception);
                             ::SMESH_Gen*            theGenImpl );
 
   void SetStartLength(CORBA::Double length) throw(SALOME::SALOME_Exception);
index 88e418edf738164c99184c134d9c2fff833192b6..6a47515cb8a8818e099c8646f8243c6eeee62d7c 100644 (file)
@@ -43,7 +43,6 @@ using namespace std;
 //=============================================================================
 
 StdMeshers_Hexa_3D_i::StdMeshers_Hexa_3D_i( PortableServer::POA_ptr thePOA,
 //=============================================================================
 
 StdMeshers_Hexa_3D_i::StdMeshers_Hexa_3D_i( PortableServer::POA_ptr thePOA,
-                                            int                     theStudyId,
                                             ::SMESH_Gen*            theGenImpl )
   : SALOME::GenericObj_i( thePOA ),
     SMESH_Hypothesis_i( thePOA ),
                                             ::SMESH_Gen*            theGenImpl )
   : SALOME::GenericObj_i( thePOA ),
     SMESH_Hypothesis_i( thePOA ),
@@ -51,7 +50,6 @@ StdMeshers_Hexa_3D_i::StdMeshers_Hexa_3D_i( PortableServer::POA_ptr thePOA,
     SMESH_3D_Algo_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_Hexa_3D( theGenImpl->GetANewId(),
     SMESH_3D_Algo_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_Hexa_3D( theGenImpl->GetANewId(),
-                                         theStudyId,
                                          theGenImpl );
 }
 
                                          theGenImpl );
 }
 
index 98ef012dcd6236b6b40a2322763c31e06a60a4cb..37d38c035c5e310b5bb682e5f36fa899d89c92ac 100644 (file)
@@ -49,8 +49,7 @@ class STDMESHERS_I_EXPORT StdMeshers_Hexa_3D_i:
 public:
   // Constructor
   StdMeshers_Hexa_3D_i( PortableServer::POA_ptr thePOA,
 public:
   // Constructor
   StdMeshers_Hexa_3D_i( PortableServer::POA_ptr thePOA,
-                   int                     theStudyId,
-                   ::SMESH_Gen*            theGenImpl );
+                        ::SMESH_Gen*            theGenImpl );
 
   // Destructor
   virtual ~StdMeshers_Hexa_3D_i();
 
   // Destructor
   virtual ~StdMeshers_Hexa_3D_i();
index 61ec24bd4affaa6d55f584d40b11ce8905359884..9d6f613ea88bb40f81ffee4d07cb7194b624c0de 100644 (file)
@@ -51,13 +51,11 @@ using namespace std;
 //=============================================================================
 
 StdMeshers_ImportSource1D_i::StdMeshers_ImportSource1D_i( PortableServer::POA_ptr thePOA,
 //=============================================================================
 
 StdMeshers_ImportSource1D_i::StdMeshers_ImportSource1D_i( PortableServer::POA_ptr thePOA,
-                                                          int                     theStudyId,
                                                           ::SMESH_Gen*            theGenImpl )
   : SALOME::GenericObj_i( thePOA ), 
     SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_ImportSource1D( theGenImpl->GetANewId(),
                                                           ::SMESH_Gen*            theGenImpl )
   : SALOME::GenericObj_i( thePOA ), 
     SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_ImportSource1D( theGenImpl->GetANewId(),
-                                                theStudyId,
                                                 theGenImpl );
   _groupEntries = new SMESH::string_array();
 }
                                                 theGenImpl );
   _groupEntries = new SMESH::string_array();
 }
@@ -87,7 +85,6 @@ void StdMeshers_ImportSource1D_i::SetSourceEdges(const SMESH::ListOfGroups& grou
   {
     std::vector<SMESH_Group*> smesh_groups;
     std::vector<string> entries;
   {
     std::vector<SMESH_Group*> smesh_groups;
     std::vector<string> entries;
-    SALOMEDS::Study_var study = SMESH_Gen_i::GetSMESHGen()->GetCurrentStudy();
     for ( CORBA::ULong i = 0; i < groups.length(); ++i )
       if ( SMESH_GroupBase_i* gp_i = SMESH::DownCast<SMESH_GroupBase_i*>( groups[i] ))
       {
     for ( CORBA::ULong i = 0; i < groups.length(); ++i )
       if ( SMESH_GroupBase_i* gp_i = SMESH::DownCast<SMESH_GroupBase_i*>( groups[i] ))
       {
@@ -95,7 +92,7 @@ void StdMeshers_ImportSource1D_i::SetSourceEdges(const SMESH::ListOfGroups& grou
           THROW_SALOME_CORBA_EXCEPTION("Wrong group type", SALOME::BAD_PARAM);
         smesh_groups.push_back( gp_i->GetSmeshGroup() );
 
           THROW_SALOME_CORBA_EXCEPTION("Wrong group type", SALOME::BAD_PARAM);
         smesh_groups.push_back( gp_i->GetSmeshGroup() );
 
-        SALOMEDS::SObject_wrap so = SMESH_Gen_i::ObjectToSObject(study, groups[i]);
+        SALOMEDS::SObject_wrap so = SMESH_Gen_i::ObjectToSObject(groups[i]);
         if ( !so->_is_nil())
         {
           CORBA::String_var entry = so->GetID();
         if ( !so->_is_nil())
         {
           CORBA::String_var entry = so->GetID();
@@ -168,14 +165,13 @@ char* StdMeshers_ImportSource1D_i::SaveTo()
   std::ostringstream os;
   os << " " << _groupEntries->length();
 
   std::ostringstream os;
   os << " " << _groupEntries->length();
 
-  SALOMEDS::Study_var study = SMESH_Gen_i::GetSMESHGen()->GetCurrentStudy();
   for ( size_t i = 0; i < _groupEntries->length(); ++i )
   {
     // entry
     os << " " << _groupEntries[i];
 
     // id
   for ( size_t i = 0; i < _groupEntries->length(); ++i )
   {
     // entry
     os << " " << _groupEntries[i];
 
     // id
-    SALOMEDS::SObject_wrap groupSO = study->FindObjectID( _groupEntries[i] );
+    SALOMEDS::SObject_wrap groupSO = SMESH_Gen_i::getStudyServant()->FindObjectID( _groupEntries[i] );
     CORBA::Object_var     groupObj;
     if ( !groupSO->_is_nil() )
       groupObj = groupSO->GetObject();
     CORBA::Object_var     groupObj;
     if ( !groupSO->_is_nil() )
       groupObj = groupSO->GetObject();
index 517549d6a17758fe2fc8d4bec64268519182c60e..2f9dca660ff62de495c31bff514ab9e1f1c29090 100644 (file)
@@ -44,7 +44,6 @@ class STDMESHERS_I_EXPORT StdMeshers_ImportSource1D_i:
  public:
   // Constructor
   StdMeshers_ImportSource1D_i( PortableServer::POA_ptr thePOA,
  public:
   // Constructor
   StdMeshers_ImportSource1D_i( PortableServer::POA_ptr thePOA,
-                               int                     theStudyId,
                                ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_ImportSource1D_i();
                                ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_ImportSource1D_i();
index dc61b9cdd9ea22b3bd8e94e3abc2e418ef1d6665..1027d802a603c503e68c1c6aa74776d85fedccae 100644 (file)
@@ -50,13 +50,11 @@ using namespace std;
 //=============================================================================
 
 StdMeshers_ImportSource2D_i::StdMeshers_ImportSource2D_i( PortableServer::POA_ptr thePOA,
 //=============================================================================
 
 StdMeshers_ImportSource2D_i::StdMeshers_ImportSource2D_i( PortableServer::POA_ptr thePOA,
-                                                          int                     theStudyId,
                                                           ::SMESH_Gen*            theGenImpl )
   : SALOME::GenericObj_i( thePOA ), 
     SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_ImportSource2D( theGenImpl->GetANewId(),
                                                           ::SMESH_Gen*            theGenImpl )
   : SALOME::GenericObj_i( thePOA ), 
     SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_ImportSource2D( theGenImpl->GetANewId(),
-                                                theStudyId,
                                                 theGenImpl );
   _groupEntries = new SMESH::string_array();
 }
                                                 theGenImpl );
   _groupEntries = new SMESH::string_array();
 }
@@ -86,7 +84,6 @@ void StdMeshers_ImportSource2D_i::SetSourceFaces(const SMESH::ListOfGroups& grou
   {
     std::vector<SMESH_Group*> smesh_groups;
     std::vector<string> entries;
   {
     std::vector<SMESH_Group*> smesh_groups;
     std::vector<string> entries;
-    SALOMEDS::Study_var study = SMESH_Gen_i::GetSMESHGen()->GetCurrentStudy();
     for ( CORBA::ULong i = 0; i < groups.length(); ++i )
       if ( SMESH_GroupBase_i* gp_i = SMESH::DownCast<SMESH_GroupBase_i*>( groups[i] ))
       {
     for ( CORBA::ULong i = 0; i < groups.length(); ++i )
       if ( SMESH_GroupBase_i* gp_i = SMESH::DownCast<SMESH_GroupBase_i*>( groups[i] ))
       {
@@ -94,7 +91,7 @@ void StdMeshers_ImportSource2D_i::SetSourceFaces(const SMESH::ListOfGroups& grou
           THROW_SALOME_CORBA_EXCEPTION("Wrong group type", SALOME::BAD_PARAM);
         smesh_groups.push_back( gp_i->GetSmeshGroup() );
 
           THROW_SALOME_CORBA_EXCEPTION("Wrong group type", SALOME::BAD_PARAM);
         smesh_groups.push_back( gp_i->GetSmeshGroup() );
 
-        SALOMEDS::SObject_var so = SMESH_Gen_i::ObjectToSObject(study, groups[i]);
+        SALOMEDS::SObject_var so = SMESH_Gen_i::ObjectToSObject(groups[i]);
         if ( !so->_is_nil())
         {
           CORBA::String_var entry = so->GetID();
         if ( !so->_is_nil())
         {
           CORBA::String_var entry = so->GetID();
@@ -168,14 +165,13 @@ char* StdMeshers_ImportSource2D_i::SaveTo()
   std::ostringstream os;
   os << " " << _groupEntries->length();
 
   std::ostringstream os;
   os << " " << _groupEntries->length();
 
-  SALOMEDS::Study_var study = SMESH_Gen_i::GetSMESHGen()->GetCurrentStudy();
   for ( CORBA::ULong i = 0; i < _groupEntries->length(); ++i )
   {
     // entry
     os << " " << _groupEntries[i];
 
     // id
   for ( CORBA::ULong i = 0; i < _groupEntries->length(); ++i )
   {
     // entry
     os << " " << _groupEntries[i];
 
     // id
-    SALOMEDS::SObject_var groupSO = study->FindObjectID( _groupEntries[i] );
+    SALOMEDS::SObject_var groupSO = SMESH_Gen_i::getStudyServant()->FindObjectID( _groupEntries[i] );
     CORBA::Object_var    groupObj;
     if ( !groupSO->_is_nil() ) {
       groupObj = groupSO->GetObject();
     CORBA::Object_var    groupObj;
     if ( !groupSO->_is_nil() ) {
       groupObj = groupSO->GetObject();
index bfa0e81b36f7d57b55cc7031cf4a118a35845c0e..685dd4febc8070d042ea232289d5bbfbbcbd1292 100644 (file)
@@ -44,7 +44,6 @@ class STDMESHERS_I_EXPORT StdMeshers_ImportSource2D_i:
  public:
   // Constructor
   StdMeshers_ImportSource2D_i( PortableServer::POA_ptr thePOA,
  public:
   // Constructor
   StdMeshers_ImportSource2D_i( PortableServer::POA_ptr thePOA,
-                               int                     theStudyId,
                                ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_ImportSource2D_i();
                                ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_ImportSource2D_i();
index 061257e9f7955238115829df870558551056b5f6..8a84e648b877a6399e25b14bf70c9e3779b12c8b 100644 (file)
@@ -37,7 +37,6 @@ using namespace std;
 //=============================================================================
 
 StdMeshers_Import_1D2D_i::StdMeshers_Import_1D2D_i (PortableServer::POA_ptr thePOA,
 //=============================================================================
 
 StdMeshers_Import_1D2D_i::StdMeshers_Import_1D2D_i (PortableServer::POA_ptr thePOA,
-                                                    int                     theStudyId,
                                                     ::SMESH_Gen*            theGenImpl)
   : SALOME::GenericObj_i( thePOA ), 
     SMESH_Hypothesis_i( thePOA ), 
                                                     ::SMESH_Gen*            theGenImpl)
   : SALOME::GenericObj_i( thePOA ), 
     SMESH_Hypothesis_i( thePOA ), 
@@ -45,7 +44,6 @@ StdMeshers_Import_1D2D_i::StdMeshers_Import_1D2D_i (PortableServer::POA_ptr theP
     SMESH_2D_Algo_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_Import_1D2D(theGenImpl->GetANewId(),
     SMESH_2D_Algo_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_Import_1D2D(theGenImpl->GetANewId(),
-                                            theStudyId,
                                             theGenImpl );
 }
 
                                             theGenImpl );
 }
 
index 5e94f1a9a884b51942d546177ecdd9864241bc42..fa4f3fa0122c79d388b006f7c09b92066d843e0b 100644 (file)
@@ -39,7 +39,6 @@ class StdMeshers_Import_1D2D_i:
 public:
   // Constructor
   StdMeshers_Import_1D2D_i( PortableServer::POA_ptr thePOA,
 public:
   // Constructor
   StdMeshers_Import_1D2D_i( PortableServer::POA_ptr thePOA,
-                            int                     theStudyId,
                             ::SMESH_Gen*            theGenImpl );
 
   // Destructor
                             ::SMESH_Gen*            theGenImpl );
 
   // Destructor
index dfbda1eb99785bee3687587cafd068d9f3245db6..2b3d23412e1db3e275533310d785fd34be6efe55 100644 (file)
@@ -43,7 +43,6 @@ using namespace std;
 //=============================================================================
 
 StdMeshers_Import_1D_i::StdMeshers_Import_1D_i( PortableServer::POA_ptr thePOA,
 //=============================================================================
 
 StdMeshers_Import_1D_i::StdMeshers_Import_1D_i( PortableServer::POA_ptr thePOA,
-                                                int                     theStudyId,
                                                 ::SMESH_Gen*            theGenImpl )
   : SALOME::GenericObj_i( thePOA ), 
     SMESH_Hypothesis_i( thePOA ), 
                                                 ::SMESH_Gen*            theGenImpl )
   : SALOME::GenericObj_i( thePOA ), 
     SMESH_Hypothesis_i( thePOA ), 
@@ -51,7 +50,6 @@ StdMeshers_Import_1D_i::StdMeshers_Import_1D_i( PortableServer::POA_ptr thePOA,
     SMESH_1D_Algo_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_Import_1D( theGenImpl->GetANewId(),
     SMESH_1D_Algo_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_Import_1D( theGenImpl->GetANewId(),
-                                           theStudyId,
                                            theGenImpl );
 }
 
                                            theGenImpl );
 }
 
index fb7641256f5654d951deff8ca4f44d9997dfbb72..9b9fce8830f43e8b922f4187fc211eee2df6346d 100644 (file)
@@ -42,7 +42,6 @@ class STDMESHERS_I_EXPORT StdMeshers_Import_1D_i:
  public:
   // Constructor
   StdMeshers_Import_1D_i( PortableServer::POA_ptr thePOA,
  public:
   // Constructor
   StdMeshers_Import_1D_i( PortableServer::POA_ptr thePOA,
-                          int                     theStudyId,
                           ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_Import_1D_i();
                           ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_Import_1D_i();
index 013db3995da4ea1dc654502303af07c2218d20dc..9b81cd28656cfacfa45f9ac3df2a881d9ee1eaac 100644 (file)
 
 StdMeshers_LayerDistribution2D_i::StdMeshers_LayerDistribution2D_i
                                           (PortableServer::POA_ptr thePOA,
 
 StdMeshers_LayerDistribution2D_i::StdMeshers_LayerDistribution2D_i
                                           (PortableServer::POA_ptr thePOA,
-                                           int                     theStudyId,
                                            ::SMESH_Gen*            theGenImpl )
 :SMESH_Hypothesis_i( thePOA ),
                                            ::SMESH_Gen*            theGenImpl )
 :SMESH_Hypothesis_i( thePOA ),
- StdMeshers_LayerDistribution_i(thePOA,theStudyId,theGenImpl)
+ StdMeshers_LayerDistribution_i(thePOA, theGenImpl)
 {
   myBaseImpl = new ::StdMeshers_LayerDistribution2D(theGenImpl->GetANewId(),
 {
   myBaseImpl = new ::StdMeshers_LayerDistribution2D(theGenImpl->GetANewId(),
-                                                    theStudyId,
                                                     theGenImpl);
 }
 
                                                     theGenImpl);
 }
 
index e95c43317f41d469ba996d7ee985bfd4a4e7ddc6..a5290de0a38b568c747de7e0061afaeff14fe021 100644 (file)
@@ -44,7 +44,6 @@ class StdMeshers_LayerDistribution2D_i:
 public:
   // Constructor
   StdMeshers_LayerDistribution2D_i(PortableServer::POA_ptr thePOA,
 public:
   // Constructor
   StdMeshers_LayerDistribution2D_i(PortableServer::POA_ptr thePOA,
-                                   int                     theStudyId,
                                    ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_LayerDistribution2D_i();
                                    ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_LayerDistribution2D_i();
index d8bb021801de5bdee13585d8c2b7e53b3632aec9..abe9066df65adf24ddf918f3281f4a241906babe 100644 (file)
@@ -45,13 +45,11 @@ using namespace std;
 //=============================================================================
 
 StdMeshers_LayerDistribution_i::StdMeshers_LayerDistribution_i( PortableServer::POA_ptr thePOA,
 //=============================================================================
 
 StdMeshers_LayerDistribution_i::StdMeshers_LayerDistribution_i( PortableServer::POA_ptr thePOA,
-                                                                int                     theStudyId,
                                                                 ::SMESH_Gen*            theGenImpl )
   : SALOME::GenericObj_i( thePOA ),
     SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_LayerDistribution( theGenImpl->GetANewId(),
                                                                 ::SMESH_Gen*            theGenImpl )
   : SALOME::GenericObj_i( thePOA ),
     SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_LayerDistribution( theGenImpl->GetANewId(),
-                                                   theStudyId,
                                                    theGenImpl );
 }
 
                                                    theGenImpl );
 }
 
@@ -90,11 +88,10 @@ void StdMeshers_LayerDistribution_i::SetLayerDistribution(SMESH::SMESH_Hypothesi
     // Remove SO of 1D hypothesis if it was published
     if (SMESH_Gen_i* gen = SMESH_Gen_i::GetSMESHGen())
     {
     // Remove SO of 1D hypothesis if it was published
     if (SMESH_Gen_i* gen = SMESH_Gen_i::GetSMESHGen())
     {
-      SALOMEDS::Study_var study = gen->GetCurrentStudy();
-      SALOMEDS::SObject_var  SO = gen->ObjectToSObject( study, hyp1D );
+      SALOMEDS::SObject_var  SO = gen->ObjectToSObject( hyp1D );
       if ( ! SO->_is_nil() )
       {
       if ( ! SO->_is_nil() )
       {
-        SALOMEDS::StudyBuilder_var builder = study->NewBuilder();
+        SALOMEDS::StudyBuilder_var builder = SMESH_Gen_i::getStudyServant()->NewBuilder();
         builder->RemoveObjectWithChildren( SO );
         SO->UnRegister();
       }
         builder->RemoveObjectWithChildren( SO );
         SO->UnRegister();
       }
@@ -198,8 +195,7 @@ void StdMeshers_LayerDistribution_i::LoadFrom( const char* theStream )
        is >> libName )
   {
     SMESH_Gen_i* gen = SMESH_Gen_i::GetSMESHGen();
        is >> libName )
   {
     SMESH_Gen_i* gen = SMESH_Gen_i::GetSMESHGen();
-    SALOMEDS::Study_var curStudy = gen->GetCurrentStudy();
-    gen->SetCurrentStudy( SALOMEDS::Study::_nil() ); // prevent hypo publishing
+    gen->SetEnablePublish( false ); // prevent hypo publishing
 
     try {
       SMESH::SMESH_Hypothesis_var hyp1D =
 
     try {
       SMESH::SMESH_Hypothesis_var hyp1D =
@@ -221,7 +217,7 @@ void StdMeshers_LayerDistribution_i::LoadFrom( const char* theStream )
     }
     catch (...) {
     }
     }
     catch (...) {
     }
-    gen->SetCurrentStudy( curStudy );  // enable hypo publishing
+    gen->SetEnablePublish( true );  // enable hypo publishing
   }
 }
 
   }
 }
 
index 98947b7cffbfb521f15a2f20ca340dbd6fe493cd..69050ee700967ac7d3e527c6f2a1d8e5654e5ce1 100644 (file)
@@ -50,7 +50,6 @@ class StdMeshers_LayerDistribution_i:
 public:
   // Constructor
   StdMeshers_LayerDistribution_i( PortableServer::POA_ptr thePOA,
 public:
   // Constructor
   StdMeshers_LayerDistribution_i( PortableServer::POA_ptr thePOA,
-                                  int                     theStudyId,
                                   ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_LayerDistribution_i();
                                   ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_LayerDistribution_i();
index 7404b9e133fa6d528ef0e02b202969ae4353e820..94b3417012a19811e3a02e95c7b53621c09765eb 100644 (file)
@@ -44,14 +44,12 @@ using namespace std;
 //=============================================================================
 
 StdMeshers_LengthFromEdges_i::StdMeshers_LengthFromEdges_i( PortableServer::POA_ptr thePOA,
 //=============================================================================
 
 StdMeshers_LengthFromEdges_i::StdMeshers_LengthFromEdges_i( PortableServer::POA_ptr thePOA,
-                                                  int                     theStudyId,
-                                                  ::SMESH_Gen*            theGenImpl )
+                                                            ::SMESH_Gen*            theGenImpl )
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_LengthFromEdges( theGenImpl->GetANewId(),
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_LengthFromEdges( theGenImpl->GetANewId(),
-                                            theStudyId,
-                                            theGenImpl );
+                                                 theGenImpl );
 }
 
 //=============================================================================
 }
 
 //=============================================================================
index 5c88c7dfff3a92fca03046f6d0efeb6586024f84..98495ea098e7d7412c19da35fc46a99ecc5a5b8a 100644 (file)
@@ -48,8 +48,7 @@ class STDMESHERS_I_EXPORT StdMeshers_LengthFromEdges_i:
 public:
   // Constructor
   StdMeshers_LengthFromEdges_i( PortableServer::POA_ptr thePOA,
 public:
   // Constructor
   StdMeshers_LengthFromEdges_i( PortableServer::POA_ptr thePOA,
-                           int                     theStudyId,
-                           ::SMESH_Gen*            theGenImpl );
+                                ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_LengthFromEdges_i();
 
   // Destructor
   virtual ~StdMeshers_LengthFromEdges_i();
 
index af0e63a4895e3368db1063fd2c4a505e7c354430..06270a79336167b694d8803edd3e2dd3a6844a37 100644 (file)
@@ -47,13 +47,11 @@ using namespace std;
 //=============================================================================
 
 StdMeshers_LocalLength_i::StdMeshers_LocalLength_i( PortableServer::POA_ptr thePOA,
 //=============================================================================
 
 StdMeshers_LocalLength_i::StdMeshers_LocalLength_i( PortableServer::POA_ptr thePOA,
-                                                    int                     theStudyId,
                                                     ::SMESH_Gen*            theGenImpl )
      : SALOME::GenericObj_i( thePOA ),
        SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_LocalLength( theGenImpl->GetANewId(),
                                                     ::SMESH_Gen*            theGenImpl )
      : SALOME::GenericObj_i( thePOA ),
        SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_LocalLength( theGenImpl->GetANewId(),
-                                             theStudyId,
                                              theGenImpl );
 }
 
                                              theGenImpl );
 }
 
index e3b30927e309e1bbe658ebdbc13a48f0347f3454..25504ef9fb437af2614da6a4839e0057b10edb31 100644 (file)
@@ -49,8 +49,7 @@ class STDMESHERS_I_EXPORT StdMeshers_LocalLength_i:
 public:
   // Constructor
   StdMeshers_LocalLength_i( PortableServer::POA_ptr thePOA,
 public:
   // Constructor
   StdMeshers_LocalLength_i( PortableServer::POA_ptr thePOA,
-                       int                     theStudyId,
-                       ::SMESH_Gen*            theGenImpl );
+                            ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_LocalLength_i();
 
   // Destructor
   virtual ~StdMeshers_LocalLength_i();
 
index d463a4ebec9f4782cc3e5de8030a6594afc9d51d..dd98b1449503570630a9e3e70d15a2591ce67b86 100644 (file)
@@ -44,16 +44,14 @@ using namespace std;
 //=============================================================================
 
 StdMeshers_MEFISTO_2D_i::StdMeshers_MEFISTO_2D_i( PortableServer::POA_ptr thePOA,
 //=============================================================================
 
 StdMeshers_MEFISTO_2D_i::StdMeshers_MEFISTO_2D_i( PortableServer::POA_ptr thePOA,
-                                        int                     theStudyId,
-                                        ::SMESH_Gen*            theGenImpl )
+                                                  ::SMESH_Gen*            theGenImpl )
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA ), 
        SMESH_Algo_i( thePOA ),
        SMESH_2D_Algo_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_MEFISTO_2D( theGenImpl->GetANewId(),
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA ), 
        SMESH_Algo_i( thePOA ),
        SMESH_2D_Algo_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_MEFISTO_2D( theGenImpl->GetANewId(),
-                                       theStudyId,
-                                       theGenImpl );
+                                            theGenImpl );
 }
 
 //=============================================================================
 }
 
 //=============================================================================
index 09937306403101b0adf1b811383ded6b78c59ae1..1313e4c8d2bddea2f3915bd876c1decccafe1316 100644 (file)
@@ -50,8 +50,7 @@ class STDMESHERS_I_EXPORT StdMeshers_MEFISTO_2D_i:
 public:
   // Constructor
   StdMeshers_MEFISTO_2D_i( PortableServer::POA_ptr thePOA,
 public:
   // Constructor
   StdMeshers_MEFISTO_2D_i( PortableServer::POA_ptr thePOA,
-                      int                     theStudyId,
-                      ::SMESH_Gen*            theGenImpl );
+                           ::SMESH_Gen*            theGenImpl );
 
   // Destructor
   virtual ~StdMeshers_MEFISTO_2D_i();
 
   // Destructor
   virtual ~StdMeshers_MEFISTO_2D_i();
index 017c33bb071eadbdfdccd70501866a92c4e8c12d..c61928156d7b4c91fb17408c57a4e3a8a18337c9 100644 (file)
@@ -47,14 +47,12 @@ using namespace std;
 //=============================================================================
 
 StdMeshers_MaxElementArea_i::StdMeshers_MaxElementArea_i( PortableServer::POA_ptr thePOA,
 //=============================================================================
 
 StdMeshers_MaxElementArea_i::StdMeshers_MaxElementArea_i( PortableServer::POA_ptr thePOA,
-                                                int                     theStudyId,
-                                                ::SMESH_Gen*            theGenImpl )
+                                                          ::SMESH_Gen*            theGenImpl )
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA ) 
 {
   myBaseImpl = new ::StdMeshers_MaxElementArea( theGenImpl->GetANewId(),
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA ) 
 {
   myBaseImpl = new ::StdMeshers_MaxElementArea( theGenImpl->GetANewId(),
-                                           theStudyId,
-                                           theGenImpl );
+                                                theGenImpl );
 }
 
 //=============================================================================
 }
 
 //=============================================================================
index 2e46ff056057328f4faf24cf60d7df5d795c9cc6..b20fb3e57840b6732cd2cc484ba1a8e010a1b279 100644 (file)
@@ -47,8 +47,7 @@ class STDMESHERS_I_EXPORT StdMeshers_MaxElementArea_i:
 public:
   // Constructor
   StdMeshers_MaxElementArea_i( PortableServer::POA_ptr thePOA,
 public:
   // Constructor
   StdMeshers_MaxElementArea_i( PortableServer::POA_ptr thePOA,
-                          int                     theStudyId,
-                          ::SMESH_Gen*            theGenImpl );
+                               ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_MaxElementArea_i();
 
   // Destructor
   virtual ~StdMeshers_MaxElementArea_i();
 
index c9861c1f6d1482fe3aa75cefa989b379d48e0ce8..17c19a25918675d51c0f804489dc8618f45dc0bb 100644 (file)
@@ -47,14 +47,12 @@ using namespace std;
 //=============================================================================
 
 StdMeshers_MaxElementVolume_i::StdMeshers_MaxElementVolume_i( PortableServer::POA_ptr thePOA,
 //=============================================================================
 
 StdMeshers_MaxElementVolume_i::StdMeshers_MaxElementVolume_i( PortableServer::POA_ptr thePOA,
-                                                    int                     theStudyId,
-                                                    ::SMESH_Gen*            theGenImpl )
+                                                              ::SMESH_Gen*            theGenImpl )
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_MaxElementVolume( theGenImpl->GetANewId(),
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_MaxElementVolume( theGenImpl->GetANewId(),
-                                             theStudyId,
-                                             theGenImpl );
+                                                  theGenImpl );
 }
 
 //=============================================================================
 }
 
 //=============================================================================
index 876d8e2c44d208ede4c155e73334b9461b005e2a..1f917e191b68f232f3c58c1ba4e56dc7365413e8 100644 (file)
@@ -47,8 +47,7 @@ class STDMESHERS_I_EXPORT StdMeshers_MaxElementVolume_i:
 public:
   // Constructor
   StdMeshers_MaxElementVolume_i( PortableServer::POA_ptr thePOA,
 public:
   // Constructor
   StdMeshers_MaxElementVolume_i( PortableServer::POA_ptr thePOA,
-                            int                     theStudyId,
-                            ::SMESH_Gen*            theGenImpl );
+                                 ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_MaxElementVolume_i();
 
   // Destructor
   virtual ~StdMeshers_MaxElementVolume_i();
 
index f26732a570ed558efdc4858b997e697f9d82f558..2dbd9019a1d0f9eed4070a7ad7de7481e4fd06d2 100644 (file)
@@ -42,13 +42,11 @@ using namespace std;
 //=============================================================================
 
 StdMeshers_MaxLength_i::StdMeshers_MaxLength_i( PortableServer::POA_ptr thePOA,
 //=============================================================================
 
 StdMeshers_MaxLength_i::StdMeshers_MaxLength_i( PortableServer::POA_ptr thePOA,
-                                                int                     theStudyId,
                                                 ::SMESH_Gen*            theGenImpl )
   : SALOME::GenericObj_i( thePOA ),
     SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_MaxLength( theGenImpl->GetANewId(),
                                                 ::SMESH_Gen*            theGenImpl )
   : SALOME::GenericObj_i( thePOA ),
     SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_MaxLength( theGenImpl->GetANewId(),
-                                           theStudyId,
                                            theGenImpl );
 }
 
                                            theGenImpl );
 }
 
index 4f888e1be3b2347001cf2f759bea1b7b20a0d093..21de81ae343a7f2857b8cf958cbb637267c3308e 100644 (file)
@@ -44,8 +44,7 @@ class STDMESHERS_I_EXPORT StdMeshers_MaxLength_i:
 public:
   // Constructor
   StdMeshers_MaxLength_i( PortableServer::POA_ptr thePOA,
 public:
   // Constructor
   StdMeshers_MaxLength_i( PortableServer::POA_ptr thePOA,
-                       int                     theStudyId,
-                       ::SMESH_Gen*            theGenImpl );
+                          ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_MaxLength_i();
 
   // Destructor
   virtual ~StdMeshers_MaxLength_i();
 
index ba1f768c270dd8d81db18bb8288eed39601a4736..d8507a9dfd7485d667fdeefef6bab28c13c3b0f4 100644 (file)
@@ -42,13 +42,11 @@ using namespace std;
 
 StdMeshers_NotConformAllowed_i::StdMeshers_NotConformAllowed_i
                                 (PortableServer::POA_ptr thePOA,
 
 StdMeshers_NotConformAllowed_i::StdMeshers_NotConformAllowed_i
                                 (PortableServer::POA_ptr thePOA,
-                                 int                     studyId,
                                  ::SMESH_Gen*            genImpl)
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_NotConformAllowed(genImpl->GetANewId(),
                                  ::SMESH_Gen*            genImpl)
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_NotConformAllowed(genImpl->GetANewId(),
-                                                  studyId,
                                                   genImpl);
 }
 
                                                   genImpl);
 }
 
index 2ee4a512dc61c65435b6e02cf7af9b7f8c17aeab..ee4107f10dac60d84816e76e039a7375dc9a31ce 100644 (file)
@@ -44,7 +44,6 @@ class STDMESHERS_I_EXPORT StdMeshers_NotConformAllowed_i:
 {
 public:
   StdMeshers_NotConformAllowed_i(PortableServer::POA_ptr thePOA,
 {
 public:
   StdMeshers_NotConformAllowed_i(PortableServer::POA_ptr thePOA,
-                                 int studyId,
                                  ::SMESH_Gen* genImpl);
   virtual ~StdMeshers_NotConformAllowed_i();
   
                                  ::SMESH_Gen* genImpl);
   virtual ~StdMeshers_NotConformAllowed_i();
   
index 263e4d5c38dc7aea33f7d64f51161cb6c1fa8e52..4b7ff8800f4b1d31a0bde5b185859ba83331ac23 100644 (file)
 
 StdMeshers_NumberOfLayers2D_i::StdMeshers_NumberOfLayers2D_i
                                            (PortableServer::POA_ptr thePOA,
 
 StdMeshers_NumberOfLayers2D_i::StdMeshers_NumberOfLayers2D_i
                                            (PortableServer::POA_ptr thePOA,
-                                            int                     theStudyId,
                                             ::SMESH_Gen*            theGenImpl)
  :SMESH_Hypothesis_i( thePOA ),
                                             ::SMESH_Gen*            theGenImpl)
  :SMESH_Hypothesis_i( thePOA ),
-  StdMeshers_NumberOfLayers_i(thePOA,theStudyId,theGenImpl)
+  StdMeshers_NumberOfLayers_i(thePOA, theGenImpl)
 {
   myBaseImpl = new ::StdMeshers_NumberOfLayers2D(theGenImpl->GetANewId(),
 {
   myBaseImpl = new ::StdMeshers_NumberOfLayers2D(theGenImpl->GetANewId(),
-                                                 theStudyId,
                                                  theGenImpl);
 }
 
                                                  theGenImpl);
 }
 
index e9c9b22f8101240fef623ccb160fb26dc794875f..128cfca3438585b32c842fa2ac506a5f68dcf08a 100644 (file)
@@ -43,7 +43,6 @@ class StdMeshers_NumberOfLayers2D_i:
 public:
   // Constructor
   StdMeshers_NumberOfLayers2D_i( PortableServer::POA_ptr thePOA,
 public:
   // Constructor
   StdMeshers_NumberOfLayers2D_i( PortableServer::POA_ptr thePOA,
-                                 int                     theStudyId,
                                  ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_NumberOfLayers2D_i();
                                  ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_NumberOfLayers2D_i();
index 40905a6725928ec2be1bc2d4c3f24db8854f82fa..bcc1175432290e06f2e6d690cf48046dc492d1bf 100644 (file)
@@ -46,14 +46,12 @@ using namespace std;
 //=============================================================================
 
 StdMeshers_NumberOfLayers_i::StdMeshers_NumberOfLayers_i( PortableServer::POA_ptr thePOA,
 //=============================================================================
 
 StdMeshers_NumberOfLayers_i::StdMeshers_NumberOfLayers_i( PortableServer::POA_ptr thePOA,
-                                                          int                     theStudyId,
                                                           ::SMESH_Gen*            theGenImpl )
   : SALOME::GenericObj_i( thePOA ), 
     SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_NumberOfLayers( theGenImpl->GetANewId(),
                                                           ::SMESH_Gen*            theGenImpl )
   : SALOME::GenericObj_i( thePOA ), 
     SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_NumberOfLayers( theGenImpl->GetANewId(),
-                                                 theStudyId,
-                                                 theGenImpl );
+                                                theGenImpl );
 }
 
 //=============================================================================
 }
 
 //=============================================================================
index b47b10e795ac9c6050d3894ca962b1b3272b577f..6af3b6c14a4be3c28f151541af0c0170221d7c82 100644 (file)
@@ -51,7 +51,6 @@ class StdMeshers_NumberOfLayers_i:
 public:
   // Constructor
   StdMeshers_NumberOfLayers_i( PortableServer::POA_ptr thePOA,
 public:
   // Constructor
   StdMeshers_NumberOfLayers_i( PortableServer::POA_ptr thePOA,
-                               int                     theStudyId,
                                ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_NumberOfLayers_i();
                                ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_NumberOfLayers_i();
index 5a75bf78e45a6b2e7bc3d38b2193532f83a50593..20397181e293bfebbb8a2aaf62587e7971902b22 100644 (file)
@@ -46,14 +46,12 @@ using namespace std;
 //=============================================================================
 
 StdMeshers_NumberOfSegments_i::StdMeshers_NumberOfSegments_i( PortableServer::POA_ptr thePOA,
 //=============================================================================
 
 StdMeshers_NumberOfSegments_i::StdMeshers_NumberOfSegments_i( PortableServer::POA_ptr thePOA,
-                                                    int                     theStudyId,
-                                                    ::SMESH_Gen*            theGenImpl )
+                                                              ::SMESH_Gen*            theGenImpl )
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_NumberOfSegments( theGenImpl->GetANewId(),
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_NumberOfSegments( theGenImpl->GetANewId(),
-                                             theStudyId,
-                                             theGenImpl );
+                                                  theGenImpl );
 }
 
 //=============================================================================
 }
 
 //=============================================================================
index 05be9d24d88e0bca5888bb4c8db903ea7c72ec73..1b8f1ea18d4e99c818e30e7bed4e29325045087a 100644 (file)
@@ -48,8 +48,7 @@ class STDMESHERS_I_EXPORT StdMeshers_NumberOfSegments_i:
 public:
   // Constructor
   StdMeshers_NumberOfSegments_i( PortableServer::POA_ptr thePOA,
 public:
   // Constructor
   StdMeshers_NumberOfSegments_i( PortableServer::POA_ptr thePOA,
-                            int                     theStudyId,
-                            ::SMESH_Gen*            theGenImpl );
+                                 ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_NumberOfSegments_i();
 
   // Destructor
   virtual ~StdMeshers_NumberOfSegments_i();
 
index 89cca0caad9342c425e057005b8cbc4c90e81383..60b0772ab5987c485ebd0c2cecad52da75a0400d 100644 (file)
@@ -59,9 +59,8 @@ StdMeshers_ObjRefUlils::EntryOrShapeToGeomObject (const std::string&  theEntry,
 
   // try by entry
   if (SMESH_Gen_i* gen = SMESH_Gen_i::GetSMESHGen()) {
 
   // try by entry
   if (SMESH_Gen_i* gen = SMESH_Gen_i::GetSMESHGen()) {
-    SALOMEDS::Study_var study = gen->GetCurrentStudy();
-    if ( ! theEntry.empty() && ! study->_is_nil() ) {
-      SALOMEDS::SObject_wrap sobj = study->FindObjectID( theEntry.c_str() );
+    if ( ! theEntry.empty() ) {
+      SALOMEDS::SObject_wrap sobj = SMESH_Gen_i::getStudyServant()->FindObjectID( theEntry.c_str() );
       CORBA::Object_var       obj = gen->SObjectToObject( sobj );
       geom = GEOM::GEOM_Object::_narrow( obj );
     }
       CORBA::Object_var       obj = gen->SObjectToObject( sobj );
       geom = GEOM::GEOM_Object::_narrow( obj );
     }
@@ -88,7 +87,7 @@ void StdMeshers_ObjRefUlils::SaveToStream( const TopoDS_Shape& theShape, ostream
     if (SMESH_Gen_i* gen = SMESH_Gen_i::GetSMESHGen()) {
       GEOM::GEOM_Object_var geom = gen->ShapeToGeomObject( theShape );
       if ( ! geom->_is_nil() ) {
     if (SMESH_Gen_i* gen = SMESH_Gen_i::GetSMESHGen()) {
       GEOM::GEOM_Object_var geom = gen->ShapeToGeomObject( theShape );
       if ( ! geom->_is_nil() ) {
-        SALOMEDS::SObject_wrap sobj = gen->ObjectToSObject( gen->GetCurrentStudy(), geom );
+        SALOMEDS::SObject_wrap sobj = gen->ObjectToSObject( geom );
         if ( !sobj->_is_nil() ) {
           CORBA::String_var entry = sobj->GetID();
           stream << " " << entry.in();
         if ( !sobj->_is_nil() ) {
           CORBA::String_var entry = sobj->GetID();
           stream << " " << entry.in();
@@ -117,13 +116,10 @@ TopoDS_Shape StdMeshers_ObjRefUlils::LoadFromStream( istream &    stream,
     if ( entry )
       * entry = str;
     if (SMESH_Gen_i* gen = SMESH_Gen_i::GetSMESHGen()) {
     if ( entry )
       * entry = str;
     if (SMESH_Gen_i* gen = SMESH_Gen_i::GetSMESHGen()) {
-      SALOMEDS::Study_var study = gen->GetCurrentStudy();
-      if ( ! study->_is_nil() ) {
-        SALOMEDS::SObject_wrap sobj = study->FindObjectID( str.c_str() );
-        CORBA::Object_var       obj = gen->SObjectToObject( sobj );
-        GEOM::GEOM_Object_var  geom = GEOM::GEOM_Object::_narrow( obj );
-        return gen->GeomObjectToShape( geom.in() );
-      }
+      SALOMEDS::SObject_wrap sobj = SMESH_Gen_i::getStudyServant()->FindObjectID( str.c_str() );
+      CORBA::Object_var       obj = gen->SObjectToObject( sobj );
+      GEOM::GEOM_Object_var  geom = GEOM::GEOM_Object::_narrow( obj );
+      return gen->GeomObjectToShape( geom.in() );
     }
   }
   if ( entry )
     }
   }
   if ( entry )
index 63d6714aae56ed76c731593b785e432956b4aed8..c095f95b3c5c8bc95be5e0af5ece0152f8c3c58f 100644 (file)
@@ -110,7 +110,7 @@ public:
     if (SMESH_Gen_i* gen = SMESH_Gen_i::GetSMESHGen()) {
       std::string str;
       if (stream >> str) {
     if (SMESH_Gen_i* gen = SMESH_Gen_i::GetSMESHGen()) {
       std::string str;
       if (stream >> str) {
-        if ( StudyContext* myStudyContext = gen->GetCurrentStudyContext() ) {
+        if ( StudyContext* myStudyContext = gen->GetStudyContext() ) {
           std::string ior = myStudyContext->getIORbyOldId( atoi( str.c_str() ));
           if ( !ior.empty() )
              return TInterface::_narrow(gen->GetORB()->string_to_object( ior.c_str() ));
           std::string ior = myStudyContext->getIORbyOldId( atoi( str.c_str() ));
           if ( !ior.empty() )
              return TInterface::_narrow(gen->GetORB()->string_to_object( ior.c_str() ));
index 4659ab42bc2dc829404052cfb428ccf47aefe43d..54b61812e48a63ec74471ceac5be1fef7f307696 100644 (file)
@@ -36,7 +36,6 @@
 //=============================================================================
 
 StdMeshers_PolygonPerFace_2D_i::StdMeshers_PolygonPerFace_2D_i( PortableServer::POA_ptr thePOA,
 //=============================================================================
 
 StdMeshers_PolygonPerFace_2D_i::StdMeshers_PolygonPerFace_2D_i( PortableServer::POA_ptr thePOA,
-                                                                int                     theStudyId,
                                                                 ::SMESH_Gen*            theGenImpl )
   : SALOME::GenericObj_i( thePOA ),
     SMESH_Hypothesis_i( thePOA ),
                                                                 ::SMESH_Gen*            theGenImpl )
   : SALOME::GenericObj_i( thePOA ),
     SMESH_Hypothesis_i( thePOA ),
@@ -44,7 +43,6 @@ StdMeshers_PolygonPerFace_2D_i::StdMeshers_PolygonPerFace_2D_i( PortableServer::
     SMESH_2D_Algo_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_PolygonPerFace_2D( theGenImpl->GetANewId(),
     SMESH_2D_Algo_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_PolygonPerFace_2D( theGenImpl->GetANewId(),
-                                                   theStudyId,
                                                    theGenImpl );
 }
 
                                                    theGenImpl );
 }
 
index a9f0f314b2fce9517a72448ef0bc2cdb145ecd41..c32bcb737c66097065665f9e7994b6552cd7dd22 100644 (file)
@@ -45,7 +45,6 @@ class STDMESHERS_I_EXPORT StdMeshers_PolygonPerFace_2D_i:
  public:
   // Constructor
   StdMeshers_PolygonPerFace_2D_i( PortableServer::POA_ptr thePOA,
  public:
   // Constructor
   StdMeshers_PolygonPerFace_2D_i( PortableServer::POA_ptr thePOA,
-                                  int                     theStudyId,
                                   ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_PolygonPerFace_2D_i();
                                   ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_PolygonPerFace_2D_i();
index 8f5999d65a3ad6deaa0f2953445ff2c7ed671b39..7d5bd2712d93564364c6dc2e86db0b678d32ff5b 100644 (file)
@@ -41,7 +41,6 @@ using namespace std;
 //=============================================================================
 
 StdMeshers_Prism_3D_i::StdMeshers_Prism_3D_i( PortableServer::POA_ptr thePOA,
 //=============================================================================
 
 StdMeshers_Prism_3D_i::StdMeshers_Prism_3D_i( PortableServer::POA_ptr thePOA,
-                                              int                     theStudyId,
                                               ::SMESH_Gen*            theGenImpl )
   : SALOME::GenericObj_i( thePOA ),
     SMESH_Hypothesis_i( thePOA ),
                                               ::SMESH_Gen*            theGenImpl )
   : SALOME::GenericObj_i( thePOA ),
     SMESH_Hypothesis_i( thePOA ),
@@ -49,7 +48,6 @@ StdMeshers_Prism_3D_i::StdMeshers_Prism_3D_i( PortableServer::POA_ptr thePOA,
     SMESH_3D_Algo_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_Prism_3D( theGenImpl->GetANewId(),
     SMESH_3D_Algo_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_Prism_3D( theGenImpl->GetANewId(),
-                                          theStudyId,
                                           theGenImpl );
 }
 //-----------------------------------------------------------------------------
                                           theGenImpl );
 }
 //-----------------------------------------------------------------------------
@@ -79,7 +77,6 @@ CORBA::Boolean StdMeshers_Prism_3D_i::IsApplicable( const TopoDS_Shape &S,
 //=============================================================================
 
 StdMeshers_RadialPrism_3D_i::StdMeshers_RadialPrism_3D_i( PortableServer::POA_ptr thePOA,
 //=============================================================================
 
 StdMeshers_RadialPrism_3D_i::StdMeshers_RadialPrism_3D_i( PortableServer::POA_ptr thePOA,
-                                                          int                     theStudyId,
                                                           ::SMESH_Gen*            theGenImpl )
   : SALOME::GenericObj_i( thePOA ),
     SMESH_Hypothesis_i( thePOA ),
                                                           ::SMESH_Gen*            theGenImpl )
   : SALOME::GenericObj_i( thePOA ),
     SMESH_Hypothesis_i( thePOA ),
@@ -87,7 +84,6 @@ StdMeshers_RadialPrism_3D_i::StdMeshers_RadialPrism_3D_i( PortableServer::POA_pt
     SMESH_3D_Algo_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_RadialPrism_3D( theGenImpl->GetANewId(),
     SMESH_3D_Algo_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_RadialPrism_3D( theGenImpl->GetANewId(),
-                                                theStudyId,
                                                 theGenImpl );
 }
 //-----------------------------------------------------------------------------
                                                 theGenImpl );
 }
 //-----------------------------------------------------------------------------
index 5cecfcd3be788b4b145f9ed5bb07a204e4f6668d..985b34615ec64ed13b62601d1f3135c832cd672b 100644 (file)
@@ -48,7 +48,6 @@ class StdMeshers_Prism_3D_i:
 public:
   // Constructor
   StdMeshers_Prism_3D_i( PortableServer::POA_ptr thePOA,
 public:
   // Constructor
   StdMeshers_Prism_3D_i( PortableServer::POA_ptr thePOA,
-                         int                     theStudyId,
                          ::SMESH_Gen*            theGenImpl );
 
   // Destructor
                          ::SMESH_Gen*            theGenImpl );
 
   // Destructor
@@ -71,7 +70,6 @@ class StdMeshers_RadialPrism_3D_i:
 public:
   // Constructor
   StdMeshers_RadialPrism_3D_i( PortableServer::POA_ptr thePOA,
 public:
   // Constructor
   StdMeshers_RadialPrism_3D_i( PortableServer::POA_ptr thePOA,
-                               int                     theStudyId,
                                ::SMESH_Gen*            theGenImpl );
 
   // Destructor
                                ::SMESH_Gen*            theGenImpl );
 
   // Destructor
index 6067de55bd7116ce39f241a40dbdfb2cb1742a9d..7b4048662ec682fe71197117b45b25ab1952af9c 100644 (file)
@@ -48,12 +48,10 @@ using namespace std;
 
 StdMeshers_ProjectionSource1D_i::StdMeshers_ProjectionSource1D_i
 ( PortableServer::POA_ptr thePOA,
 
 StdMeshers_ProjectionSource1D_i::StdMeshers_ProjectionSource1D_i
 ( PortableServer::POA_ptr thePOA,
-  int                     theStudyId,
   ::SMESH_Gen*            theGenImpl ) : SALOME::GenericObj_i( thePOA ), 
                                          SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_ProjectionSource1D( theGenImpl->GetANewId(),
   ::SMESH_Gen*            theGenImpl ) : SALOME::GenericObj_i( thePOA ), 
                                          SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_ProjectionSource1D( theGenImpl->GetANewId(),
-                                                    theStudyId,
                                                     theGenImpl );
 }
 
                                                     theGenImpl );
 }
 
index 2a818f201baebf77112db24eafc93f114215ad4d..024ccb63425dbd1ff7b1adf78ca86397d2997b52 100644 (file)
@@ -52,7 +52,6 @@ class StdMeshers_ProjectionSource1D_i:
 public:
   // Constructor
   StdMeshers_ProjectionSource1D_i( PortableServer::POA_ptr thePOA,
 public:
   // Constructor
   StdMeshers_ProjectionSource1D_i( PortableServer::POA_ptr thePOA,
-                                   int                     theStudyId,
                                    ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_ProjectionSource1D_i();
                                    ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_ProjectionSource1D_i();
index 369cc29dfee7cdd46bb10df40e91c1501715443c..ff036460353ccfe8ef201c736a13fe56b159ae29 100644 (file)
@@ -48,12 +48,10 @@ using namespace std;
 
 StdMeshers_ProjectionSource2D_i::StdMeshers_ProjectionSource2D_i
 ( PortableServer::POA_ptr thePOA,
 
 StdMeshers_ProjectionSource2D_i::StdMeshers_ProjectionSource2D_i
 ( PortableServer::POA_ptr thePOA,
-  int                     theStudyId,
   ::SMESH_Gen*            theGenImpl ) : SALOME::GenericObj_i( thePOA ), 
                                          SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_ProjectionSource2D( theGenImpl->GetANewId(),
   ::SMESH_Gen*            theGenImpl ) : SALOME::GenericObj_i( thePOA ), 
                                          SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_ProjectionSource2D( theGenImpl->GetANewId(),
-                                                    theStudyId,
                                                     theGenImpl );
 }
 
                                                     theGenImpl );
 }
 
index eb929dc49a4b64d09ef18d3443dc755ee7ae2a13..add3b78ff8e3a8a9878116e022d0fe50961f4514 100644 (file)
@@ -52,7 +52,6 @@ class StdMeshers_ProjectionSource2D_i:
 public:
   // Constructor
   StdMeshers_ProjectionSource2D_i( PortableServer::POA_ptr thePOA,
 public:
   // Constructor
   StdMeshers_ProjectionSource2D_i( PortableServer::POA_ptr thePOA,
-                                   int                     theStudyId,
                                    ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_ProjectionSource2D_i();
                                    ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_ProjectionSource2D_i();
index 195fafc656e29e7d1f4f836369980cce6f16e28d..062602d89f4f2dce0f7a8db94a482b313f0cb0b8 100644 (file)
@@ -48,12 +48,10 @@ using namespace std;
 
 StdMeshers_ProjectionSource3D_i::StdMeshers_ProjectionSource3D_i
 ( PortableServer::POA_ptr thePOA,
 
 StdMeshers_ProjectionSource3D_i::StdMeshers_ProjectionSource3D_i
 ( PortableServer::POA_ptr thePOA,
-  int                     theStudyId,
   ::SMESH_Gen*            theGenImpl ) : SALOME::GenericObj_i( thePOA ), 
                                          SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_ProjectionSource3D( theGenImpl->GetANewId(),
   ::SMESH_Gen*            theGenImpl ) : SALOME::GenericObj_i( thePOA ), 
                                          SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_ProjectionSource3D( theGenImpl->GetANewId(),
-                                                    theStudyId,
                                                     theGenImpl );
 }
 
                                                     theGenImpl );
 }
 
index 69d658827ce9faba54a0dc8f64fc89db0f8373e3..47458062ea1321fe83beffb55b90762c0bc83bc4 100644 (file)
@@ -53,7 +53,6 @@ class StdMeshers_ProjectionSource3D_i:
 public:
   // Constructor
   StdMeshers_ProjectionSource3D_i( PortableServer::POA_ptr thePOA,
 public:
   // Constructor
   StdMeshers_ProjectionSource3D_i( PortableServer::POA_ptr thePOA,
-                                   int                     theStudyId,
                                    ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_ProjectionSource3D_i();
                                    ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_ProjectionSource3D_i();
index 515b7e85b92bbd065b95c57801e353f35ca53b31..d9b135b0bc71d23dc25f3ca001f341de73b8a369 100644 (file)
@@ -40,7 +40,6 @@ using namespace std;
 //=============================================================================
 
 StdMeshers_Projection_3D_i::StdMeshers_Projection_3D_i( PortableServer::POA_ptr thePOA,
 //=============================================================================
 
 StdMeshers_Projection_3D_i::StdMeshers_Projection_3D_i( PortableServer::POA_ptr thePOA,
-                                                        int                     theStudyId,
                                                         ::SMESH_Gen*            theGenImpl )
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA ), 
                                                         ::SMESH_Gen*            theGenImpl )
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA ), 
@@ -48,8 +47,7 @@ StdMeshers_Projection_3D_i::StdMeshers_Projection_3D_i( PortableServer::POA_ptr
        SMESH_3D_Algo_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_Projection_3D( theGenImpl->GetANewId(),
        SMESH_3D_Algo_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_Projection_3D( theGenImpl->GetANewId(),
-                                    theStudyId,
-                                    theGenImpl );
+                                               theGenImpl );
 }
 //-----------------------------------------------------------------------------
 
 }
 //-----------------------------------------------------------------------------
 
@@ -82,7 +80,6 @@ CORBA::Boolean StdMeshers_Projection_3D_i::IsApplicable(const TopoDS_Shape &S,
 //=============================================================================
 
 StdMeshers_Projection_2D_i::StdMeshers_Projection_2D_i( PortableServer::POA_ptr thePOA,
 //=============================================================================
 
 StdMeshers_Projection_2D_i::StdMeshers_Projection_2D_i( PortableServer::POA_ptr thePOA,
-                                                        int                     theStudyId,
                                                         ::SMESH_Gen*            theGenImpl )
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA ), 
                                                         ::SMESH_Gen*            theGenImpl )
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA ), 
@@ -90,8 +87,7 @@ StdMeshers_Projection_2D_i::StdMeshers_Projection_2D_i( PortableServer::POA_ptr
        SMESH_2D_Algo_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_Projection_2D( theGenImpl->GetANewId(),
        SMESH_2D_Algo_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_Projection_2D( theGenImpl->GetANewId(),
-                                    theStudyId,
-                                    theGenImpl );
+                                               theGenImpl );
 }
 //-----------------------------------------------------------------------------
 
 }
 //-----------------------------------------------------------------------------
 
@@ -113,7 +109,6 @@ StdMeshers_Projection_2D_i::~StdMeshers_Projection_2D_i()
 //=============================================================================
 
 StdMeshers_Projection_1D2D_i::StdMeshers_Projection_1D2D_i( PortableServer::POA_ptr thePOA,
 //=============================================================================
 
 StdMeshers_Projection_1D2D_i::StdMeshers_Projection_1D2D_i( PortableServer::POA_ptr thePOA,
-                                                            int                     theStudyId,
                                                             ::SMESH_Gen*            theGenImpl )
      : SALOME::GenericObj_i( thePOA ),
        SMESH_Hypothesis_i( thePOA ),
                                                             ::SMESH_Gen*            theGenImpl )
      : SALOME::GenericObj_i( thePOA ),
        SMESH_Hypothesis_i( thePOA ),
@@ -121,7 +116,6 @@ StdMeshers_Projection_1D2D_i::StdMeshers_Projection_1D2D_i( PortableServer::POA_
        SMESH_2D_Algo_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_Projection_1D2D( theGenImpl->GetANewId(),
        SMESH_2D_Algo_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_Projection_1D2D( theGenImpl->GetANewId(),
-                                                 theStudyId,
                                                  theGenImpl );
 }
 //-----------------------------------------------------------------------------
                                                  theGenImpl );
 }
 //-----------------------------------------------------------------------------
@@ -144,7 +138,6 @@ StdMeshers_Projection_1D2D_i::~StdMeshers_Projection_1D2D_i()
 //=============================================================================
 
 StdMeshers_Projection_1D_i::StdMeshers_Projection_1D_i( PortableServer::POA_ptr thePOA,
 //=============================================================================
 
 StdMeshers_Projection_1D_i::StdMeshers_Projection_1D_i( PortableServer::POA_ptr thePOA,
-                                                        int                     theStudyId,
                                                         ::SMESH_Gen*            theGenImpl )
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA ), 
                                                         ::SMESH_Gen*            theGenImpl )
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA ), 
@@ -152,8 +145,7 @@ StdMeshers_Projection_1D_i::StdMeshers_Projection_1D_i( PortableServer::POA_ptr
        SMESH_1D_Algo_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_Projection_1D( theGenImpl->GetANewId(),
        SMESH_1D_Algo_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_Projection_1D( theGenImpl->GetANewId(),
-                                    theStudyId,
-                                    theGenImpl );
+                                               theGenImpl );
 }
 //-----------------------------------------------------------------------------
 
 }
 //-----------------------------------------------------------------------------
 
index d56f02c512e9d30ca8b9e8da7e91a1ba48f68cad..1aa53b802413e76e899ad71426e1fa316f109514 100644 (file)
@@ -50,7 +50,6 @@ class StdMeshers_Projection_3D_i:
 public:
   // Constructor
   StdMeshers_Projection_3D_i( PortableServer::POA_ptr thePOA,
 public:
   // Constructor
   StdMeshers_Projection_3D_i( PortableServer::POA_ptr thePOA,
-                              int                     theStudyId,
                               ::SMESH_Gen*            theGenImpl );
 
   // Destructor
                               ::SMESH_Gen*            theGenImpl );
 
   // Destructor
@@ -74,7 +73,6 @@ class StdMeshers_Projection_2D_i:
 public:
   // Constructor
   StdMeshers_Projection_2D_i( PortableServer::POA_ptr thePOA,
 public:
   // Constructor
   StdMeshers_Projection_2D_i( PortableServer::POA_ptr thePOA,
-                              int                     theStudyId,
                               ::SMESH_Gen*            theGenImpl );
 
   // Destructor
                               ::SMESH_Gen*            theGenImpl );
 
   // Destructor
@@ -95,7 +93,6 @@ class StdMeshers_Projection_1D2D_i:
 public:
   // Constructor
   StdMeshers_Projection_1D2D_i( PortableServer::POA_ptr thePOA,
 public:
   // Constructor
   StdMeshers_Projection_1D2D_i( PortableServer::POA_ptr thePOA,
-                                int                     theStudyId,
                                 ::SMESH_Gen*            theGenImpl );
 
   // Destructor
                                 ::SMESH_Gen*            theGenImpl );
 
   // Destructor
@@ -116,7 +113,6 @@ class StdMeshers_Projection_1D_i:
 public:
   // Constructor
   StdMeshers_Projection_1D_i( PortableServer::POA_ptr thePOA,
 public:
   // Constructor
   StdMeshers_Projection_1D_i( PortableServer::POA_ptr thePOA,
-                              int                     theStudyId,
                               ::SMESH_Gen*            theGenImpl );
 
   // Destructor
                               ::SMESH_Gen*            theGenImpl );
 
   // Destructor
index 6d086c514902089c61e7206cc5d74b922025c03b..bbdef0825b779b7560c5a8d981e61641b8bf7c81 100644 (file)
@@ -40,13 +40,11 @@ using namespace std;
  */
 //=============================================================================
 StdMeshers_Propagation_i::StdMeshers_Propagation_i (PortableServer::POA_ptr thePOA,
  */
 //=============================================================================
 StdMeshers_Propagation_i::StdMeshers_Propagation_i (PortableServer::POA_ptr thePOA,
-                                                    int                     theStudyId,
                                                     ::SMESH_Gen*            theGenImpl )
   : SALOME::GenericObj_i( thePOA ),
     SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_Propagation(theGenImpl->GetANewId(),
                                                     ::SMESH_Gen*            theGenImpl )
   : SALOME::GenericObj_i( thePOA ),
     SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_Propagation(theGenImpl->GetANewId(),
-                                            theStudyId,
                                             theGenImpl);
 }
 
                                             theGenImpl);
 }
 
@@ -73,13 +71,11 @@ CORBA::Boolean StdMeshers_Propagation_i::IsDimSupported( SMESH::Dimension type )
 //=============================================================================
 StdMeshers_PropagOfDistribution_i::
 StdMeshers_PropagOfDistribution_i (PortableServer::POA_ptr thePOA,
 //=============================================================================
 StdMeshers_PropagOfDistribution_i::
 StdMeshers_PropagOfDistribution_i (PortableServer::POA_ptr thePOA,
-                                   int                     theStudyId,
                                    ::SMESH_Gen*            theGenImpl )
   : SALOME::GenericObj_i( thePOA ),
     SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_PropagOfDistribution(theGenImpl->GetANewId(),
                                    ::SMESH_Gen*            theGenImpl )
   : SALOME::GenericObj_i( thePOA ),
     SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_PropagOfDistribution(theGenImpl->GetANewId(),
-                                                     theStudyId,
                                                      theGenImpl);
 }
 
                                                      theGenImpl);
 }
 
index 00e07de4ca24d47c24c99a37979110d0c547c2ff..e2696dd3a112b0e01a463220790ec3346d46a885 100644 (file)
@@ -48,7 +48,6 @@ class STDMESHERS_I_EXPORT StdMeshers_Propagation_i:
 public:
   // Constructor
   StdMeshers_Propagation_i (PortableServer::POA_ptr thePOA,
 public:
   // Constructor
   StdMeshers_Propagation_i (PortableServer::POA_ptr thePOA,
-                            int                     theStudyId,
                             ::SMESH_Gen*            theGenImpl);
   
   // Verify whether hypothesis supports given entity type 
                             ::SMESH_Gen*            theGenImpl);
   
   // Verify whether hypothesis supports given entity type 
@@ -66,7 +65,6 @@ class STDMESHERS_I_EXPORT StdMeshers_PropagOfDistribution_i:
 public:
   // Constructor
   StdMeshers_PropagOfDistribution_i (PortableServer::POA_ptr thePOA,
 public:
   // Constructor
   StdMeshers_PropagOfDistribution_i (PortableServer::POA_ptr thePOA,
-                                     int                     theStudyId,
                                      ::SMESH_Gen*            theGenImpl);
   
   // Verify whether hypothesis supports given entity type 
                                      ::SMESH_Gen*            theGenImpl);
   
   // Verify whether hypothesis supports given entity type 
index 1681544faff61bd86766d6c4b0e51985b121377c..78b2841e1575a4d7a3f56809f3faaa3fe1a0ad2a 100644 (file)
@@ -45,13 +45,11 @@ using namespace std;
 
 StdMeshers_QuadrangleParams_i::StdMeshers_QuadrangleParams_i
                                           (PortableServer::POA_ptr thePOA,
 
 StdMeshers_QuadrangleParams_i::StdMeshers_QuadrangleParams_i
                                           (PortableServer::POA_ptr thePOA,
-                                           int                     theStudyId,
                                            ::SMESH_Gen*            theGenImpl )
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_QuadrangleParams(theGenImpl->GetANewId(),
                                            ::SMESH_Gen*            theGenImpl )
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_QuadrangleParams(theGenImpl->GetANewId(),
-                                                 theStudyId,
                                                  theGenImpl);
 }
 
                                                  theGenImpl);
 }
 
index 12c209f409537388be870e10de151b7ecdcd63d5..227dd86af497611380e676cfdaad148e32878931 100644 (file)
@@ -41,7 +41,6 @@ class STDMESHERS_I_EXPORT StdMeshers_QuadrangleParams_i:
 public:
   // Constructor
   StdMeshers_QuadrangleParams_i (PortableServer::POA_ptr thePOA,
 public:
   // Constructor
   StdMeshers_QuadrangleParams_i (PortableServer::POA_ptr thePOA,
-                                 int                     theStudyId,
                                  ::SMESH_Gen*            theGenImpl);
   // Destructor
   virtual ~StdMeshers_QuadrangleParams_i();
                                  ::SMESH_Gen*            theGenImpl);
   // Destructor
   virtual ~StdMeshers_QuadrangleParams_i();
index 9fe0b11cbe69737c7c5b6726b4e0c7cfd44da67b..4752a3524835b11967f2b5b3771aa6d55e8a4def 100644 (file)
@@ -47,12 +47,10 @@ using namespace std;
 
 StdMeshers_QuadranglePreference_i::StdMeshers_QuadranglePreference_i
 ( PortableServer::POA_ptr thePOA,
 
 StdMeshers_QuadranglePreference_i::StdMeshers_QuadranglePreference_i
 ( PortableServer::POA_ptr thePOA,
-  int                     theStudyId,
   ::SMESH_Gen*            theGenImpl ): SALOME::GenericObj_i( thePOA ), 
                                         SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_QuadranglePreference( theGenImpl->GetANewId(),
   ::SMESH_Gen*            theGenImpl ): SALOME::GenericObj_i( thePOA ), 
                                         SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_QuadranglePreference( theGenImpl->GetANewId(),
-                                                      theStudyId,
                                                       theGenImpl );
 }
 
                                                       theGenImpl );
 }
 
index a60e976bd3675c8acf42a713165286f36c1debd0..bce152a6949104b887dd2b5e15ed14af25b7854c 100644 (file)
@@ -49,7 +49,6 @@ class STDMESHERS_I_EXPORT StdMeshers_QuadranglePreference_i:
 public:
   // Constructor
   StdMeshers_QuadranglePreference_i( PortableServer::POA_ptr thePOA,
 public:
   // Constructor
   StdMeshers_QuadranglePreference_i( PortableServer::POA_ptr thePOA,
-                                     int                     theStudyId,
                                      ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_QuadranglePreference_i();
                                      ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_QuadranglePreference_i();
index 0aa84775a6be632e7971a0f51b77d2ba92b84536..c800dabffa1e4bedc7b41fe2cc4b1ace83329cb3 100644 (file)
@@ -45,7 +45,6 @@ using namespace std;
 //=============================================================================
 
 StdMeshers_Quadrangle_2D_i::StdMeshers_Quadrangle_2D_i( PortableServer::POA_ptr thePOA,
 //=============================================================================
 
 StdMeshers_Quadrangle_2D_i::StdMeshers_Quadrangle_2D_i( PortableServer::POA_ptr thePOA,
-                                                        int                     theStudyId,
                                                         ::SMESH_Gen*            theGenImpl )
   : SALOME::GenericObj_i( thePOA ),
     SMESH_Hypothesis_i( thePOA ),
                                                         ::SMESH_Gen*            theGenImpl )
   : SALOME::GenericObj_i( thePOA ),
     SMESH_Hypothesis_i( thePOA ),
@@ -53,7 +52,6 @@ StdMeshers_Quadrangle_2D_i::StdMeshers_Quadrangle_2D_i( PortableServer::POA_ptr
     SMESH_2D_Algo_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_Quadrangle_2D( theGenImpl->GetANewId(),
     SMESH_2D_Algo_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_Quadrangle_2D( theGenImpl->GetANewId(),
-                                               theStudyId,
                                                theGenImpl );
 }
 
                                                theGenImpl );
 }
 
@@ -107,7 +105,6 @@ CORBA::Boolean StdMeshers_Quadrangle_2D_i::IsApplicable( const TopoDS_Shape &S,
 
 StdMeshers_QuadFromMedialAxis_1D2D_i::
 StdMeshers_QuadFromMedialAxis_1D2D_i( PortableServer::POA_ptr thePOA,
 
 StdMeshers_QuadFromMedialAxis_1D2D_i::
 StdMeshers_QuadFromMedialAxis_1D2D_i( PortableServer::POA_ptr thePOA,
-                                      int                     theStudyId,
                                       ::SMESH_Gen*            theGenImpl )
   : SALOME::GenericObj_i( thePOA ),
     SMESH_Hypothesis_i( thePOA ),
                                       ::SMESH_Gen*            theGenImpl )
   : SALOME::GenericObj_i( thePOA ),
     SMESH_Hypothesis_i( thePOA ),
@@ -115,7 +112,6 @@ StdMeshers_QuadFromMedialAxis_1D2D_i( PortableServer::POA_ptr thePOA,
     SMESH_2D_Algo_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_QuadFromMedialAxis_1D2D( theGenImpl->GetANewId(),
     SMESH_2D_Algo_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_QuadFromMedialAxis_1D2D( theGenImpl->GetANewId(),
-                                                         theStudyId,
                                                          theGenImpl );
 }
 
                                                          theGenImpl );
 }
 
index 4cdc9017e426711b8bc3437e411dd07a6ba347f4..83ff12d30f51f4d25678bb24797e99f1c3740bf7 100644 (file)
@@ -49,7 +49,6 @@ class STDMESHERS_I_EXPORT StdMeshers_Quadrangle_2D_i:
  public:
   // Constructor
   StdMeshers_Quadrangle_2D_i( PortableServer::POA_ptr thePOA,
  public:
   // Constructor
   StdMeshers_Quadrangle_2D_i( PortableServer::POA_ptr thePOA,
-                              int                     theStudyId,
                               ::SMESH_Gen*            theGenImpl );
 
   // Destructor
                               ::SMESH_Gen*            theGenImpl );
 
   // Destructor
@@ -72,7 +71,6 @@ class STDMESHERS_I_EXPORT StdMeshers_QuadFromMedialAxis_1D2D_i:
  public:
   // Constructor
   StdMeshers_QuadFromMedialAxis_1D2D_i( PortableServer::POA_ptr thePOA,
  public:
   // Constructor
   StdMeshers_QuadFromMedialAxis_1D2D_i( PortableServer::POA_ptr thePOA,
-                                        int                     theStudyId,
                                         ::SMESH_Gen*            theGenImpl );
 
   // Destructor
                                         ::SMESH_Gen*            theGenImpl );
 
   // Destructor
index 24dd38aa377f75f6c9cc80a570ee319c0ac1991a..5012554125f4fd79ce69087ef9d4fea50de37ece 100644 (file)
@@ -48,12 +48,10 @@ using namespace std;
 
 StdMeshers_QuadraticMesh_i::StdMeshers_QuadraticMesh_i
 ( PortableServer::POA_ptr thePOA,
 
 StdMeshers_QuadraticMesh_i::StdMeshers_QuadraticMesh_i
 ( PortableServer::POA_ptr thePOA,
-  int                     theStudyId,
   ::SMESH_Gen*            theGenImpl )
   : SALOME::GenericObj_i( thePOA ),SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_QuadraticMesh( theGenImpl->GetANewId(),
   ::SMESH_Gen*            theGenImpl )
   : SALOME::GenericObj_i( thePOA ),SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_QuadraticMesh( theGenImpl->GetANewId(),
-                                               theStudyId,
                                                theGenImpl );
 }
 
                                                theGenImpl );
 }
 
index 785934aef3237ece7cc0ea972d2b99dc20f9e036..8788167434933d77a315005751ca54f339db3a9a 100644 (file)
@@ -50,7 +50,6 @@ class STDMESHERS_I_EXPORT StdMeshers_QuadraticMesh_i:
 public:
   // Constructor
   StdMeshers_QuadraticMesh_i( PortableServer::POA_ptr thePOA,
 public:
   // Constructor
   StdMeshers_QuadraticMesh_i( PortableServer::POA_ptr thePOA,
-                              int                     theStudyId,
                               ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_QuadraticMesh_i();
                               ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_QuadraticMesh_i();
index 1bb991a8bbb17523543f70c570d5ca68bd8ed0a6..889d86505d526156daac598c71244aff3e35f901 100644 (file)
@@ -38,7 +38,6 @@ using namespace std;
 
 StdMeshers_RadialQuadrangle_1D2D_i::StdMeshers_RadialQuadrangle_1D2D_i
                                            (PortableServer::POA_ptr thePOA,
 
 StdMeshers_RadialQuadrangle_1D2D_i::StdMeshers_RadialQuadrangle_1D2D_i
                                            (PortableServer::POA_ptr thePOA,
-                                            int                     theStudyId,
                                             ::SMESH_Gen*            theGenImpl)
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA ), 
                                             ::SMESH_Gen*            theGenImpl)
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA ), 
@@ -46,7 +45,6 @@ StdMeshers_RadialQuadrangle_1D2D_i::StdMeshers_RadialQuadrangle_1D2D_i
        SMESH_2D_Algo_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_RadialQuadrangle_1D2D(theGenImpl->GetANewId(),
        SMESH_2D_Algo_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_RadialQuadrangle_1D2D(theGenImpl->GetANewId(),
-                                                      theStudyId,
                                                       theGenImpl );
 }
 
                                                       theGenImpl );
 }
 
index 63242f0f6326b55e334a79e047f79186b4476bc3..24944087f8840259de13820e09dc184bc7828ecf 100644 (file)
@@ -39,7 +39,6 @@ class StdMeshers_RadialQuadrangle_1D2D_i:
 public:
   // Constructor
   StdMeshers_RadialQuadrangle_1D2D_i( PortableServer::POA_ptr thePOA,
 public:
   // Constructor
   StdMeshers_RadialQuadrangle_1D2D_i( PortableServer::POA_ptr thePOA,
-                                      int                     theStudyId,
                                       ::SMESH_Gen*            theGenImpl );
 
   // Destructor
                                       ::SMESH_Gen*            theGenImpl );
 
   // Destructor
index 02f83b3c2f881644c4000a07b1803450016b2af6..05dd3c2ed5f63f2e4fd1fa88430ed30058614793 100644 (file)
@@ -43,7 +43,6 @@ using namespace std;
 //=============================================================================
 
 StdMeshers_Regular_1D_i::StdMeshers_Regular_1D_i( PortableServer::POA_ptr thePOA,
 //=============================================================================
 
 StdMeshers_Regular_1D_i::StdMeshers_Regular_1D_i( PortableServer::POA_ptr thePOA,
-                                                  int                     theStudyId,
                                                   ::SMESH_Gen*            theGenImpl )
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA ), 
                                                   ::SMESH_Gen*            theGenImpl )
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA ), 
@@ -51,7 +50,6 @@ StdMeshers_Regular_1D_i::StdMeshers_Regular_1D_i( PortableServer::POA_ptr thePOA
        SMESH_1D_Algo_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_Regular_1D( theGenImpl->GetANewId(),
        SMESH_1D_Algo_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_Regular_1D( theGenImpl->GetANewId(),
-                                            theStudyId,
                                             theGenImpl );
 }
 
                                             theGenImpl );
 }
 
index 7b83fa961c58f111cb2d7f7196c2e5a5a2e38b2f..8fd4a83e470de29e1fd31d86379dfb635d390700 100644 (file)
@@ -47,8 +47,7 @@ class STDMESHERS_I_EXPORT StdMeshers_Regular_1D_i:
 public:
   // Constructor
   StdMeshers_Regular_1D_i( PortableServer::POA_ptr thePOA,
 public:
   // Constructor
   StdMeshers_Regular_1D_i( PortableServer::POA_ptr thePOA,
-                      int                     theStudyId,
-                      ::SMESH_Gen*            theGenImpl );
+                           ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_Regular_1D_i();
  
   // Destructor
   virtual ~StdMeshers_Regular_1D_i();
  
index 57cbb7071924dfb4aa6149627820d1d837b0f099..9ddfea9c1cc0a36b4cf3ac2d62d294d5f26e720f 100644 (file)
@@ -44,7 +44,6 @@ using namespace std;
 
 StdMeshers_SegmentAroundVertex_0D_i::StdMeshers_SegmentAroundVertex_0D_i
                                                ( PortableServer::POA_ptr thePOA,
 
 StdMeshers_SegmentAroundVertex_0D_i::StdMeshers_SegmentAroundVertex_0D_i
                                                ( PortableServer::POA_ptr thePOA,
-                                                 int                     theStudyId,
                                                  ::SMESH_Gen*            theGenImpl )
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA ), 
                                                  ::SMESH_Gen*            theGenImpl )
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA ), 
@@ -52,7 +51,6 @@ StdMeshers_SegmentAroundVertex_0D_i::StdMeshers_SegmentAroundVertex_0D_i
        SMESH_0D_Algo_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_SegmentAroundVertex_0D( theGenImpl->GetANewId(),
        SMESH_0D_Algo_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_SegmentAroundVertex_0D( theGenImpl->GetANewId(),
-                                                        theStudyId,
                                                         theGenImpl );
 }
 //-----------------------------------------------------------------------------
                                                         theGenImpl );
 }
 //-----------------------------------------------------------------------------
index dea48624a844317f5e32416d6f0f9634178064f5..daba7fde374de23ca2bc2c0f6f8f2de2be20f345 100644 (file)
@@ -43,8 +43,7 @@ class StdMeshers_SegmentAroundVertex_0D_i:
 public:
   // Constructor
   StdMeshers_SegmentAroundVertex_0D_i( PortableServer::POA_ptr thePOA,
 public:
   // Constructor
   StdMeshers_SegmentAroundVertex_0D_i( PortableServer::POA_ptr thePOA,
-                              int                     theStudyId,
-                              ::SMESH_Gen*            theGenImpl );
+                                       ::SMESH_Gen*            theGenImpl );
 
   // Destructor
   virtual ~StdMeshers_SegmentAroundVertex_0D_i();
 
   // Destructor
   virtual ~StdMeshers_SegmentAroundVertex_0D_i();
index 5801115bb8c81ddf1e3853d80b2ebce576255658..b8f52e7fe84e925db42bd916fae5a5847e97a1ec 100644 (file)
@@ -45,13 +45,11 @@ using namespace std;
 
 StdMeshers_SegmentLengthAroundVertex_i::StdMeshers_SegmentLengthAroundVertex_i
                                                     ( PortableServer::POA_ptr thePOA,
 
 StdMeshers_SegmentLengthAroundVertex_i::StdMeshers_SegmentLengthAroundVertex_i
                                                     ( PortableServer::POA_ptr thePOA,
-                                                      int                     theStudyId,
                                                       ::SMESH_Gen*            theGenImpl )
   : SALOME::GenericObj_i( thePOA ), 
     SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_SegmentLengthAroundVertex( theGenImpl->GetANewId(),
                                                       ::SMESH_Gen*            theGenImpl )
   : SALOME::GenericObj_i( thePOA ), 
     SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_SegmentLengthAroundVertex( theGenImpl->GetANewId(),
-                                                           theStudyId,
                                                            theGenImpl );
 }
 
                                                            theGenImpl );
 }
 
index c61971f020bf4221fa95168077b40f0da27c7347..572ed5c81b4d9e4e72e2546d5456e13ebcca5720 100644 (file)
@@ -46,7 +46,6 @@ class StdMeshers_SegmentLengthAroundVertex_i:
 public:
   // Constructor
   StdMeshers_SegmentLengthAroundVertex_i( PortableServer::POA_ptr thePOA,
 public:
   // Constructor
   StdMeshers_SegmentLengthAroundVertex_i( PortableServer::POA_ptr thePOA,
-                                          int                     theStudyId,
                                           ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_SegmentLengthAroundVertex_i();
                                           ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_SegmentLengthAroundVertex_i();
index 8d1edd67f317314a1eb74554bc5b9307f7f7ba75..fdceff6a438d0a67705552cdf05e13e40dc2341f 100644 (file)
@@ -47,14 +47,12 @@ using namespace std;
 //=============================================================================
 
 StdMeshers_StartEndLength_i::StdMeshers_StartEndLength_i( PortableServer::POA_ptr thePOA,
 //=============================================================================
 
 StdMeshers_StartEndLength_i::StdMeshers_StartEndLength_i( PortableServer::POA_ptr thePOA,
-                                                         int                     theStudyId,
-                                                         ::SMESH_Gen*            theGenImpl )
+                                                          ::SMESH_Gen*            theGenImpl )
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_StartEndLength( theGenImpl->GetANewId(),
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_StartEndLength( theGenImpl->GetANewId(),
-                                               theStudyId,
-                                               theGenImpl );
+                                                theGenImpl );
 }
 
 //=============================================================================
 }
 
 //=============================================================================
index 9a9f3a17ba431901ca259cae409d8d86508ee946..50cd8917bd33887c9f1ecf72282ecb67d5770e94 100644 (file)
@@ -49,7 +49,6 @@ class STDMESHERS_I_EXPORT StdMeshers_StartEndLength_i:
 public:
   // Constructor
   StdMeshers_StartEndLength_i(PortableServer::POA_ptr thePOA,
 public:
   // Constructor
   StdMeshers_StartEndLength_i(PortableServer::POA_ptr thePOA,
-                              int                     theStudyId,
                               ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_StartEndLength_i();
                               ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_StartEndLength_i();
index ce339913d6a16898b4dc6fdac2f65f6d77cbdb81..57c4cde50cdd9c16a4c38aaa73c620ece9802045 100644 (file)
@@ -38,7 +38,6 @@
 
 StdMeshers_UseExisting_1D_i::StdMeshers_UseExisting_1D_i
                                                ( PortableServer::POA_ptr thePOA,
 
 StdMeshers_UseExisting_1D_i::StdMeshers_UseExisting_1D_i
                                                ( PortableServer::POA_ptr thePOA,
-                                                 int                     theStudyId,
                                                  ::SMESH_Gen*            theGenImpl )
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA ), 
                                                  ::SMESH_Gen*            theGenImpl )
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA ), 
@@ -46,7 +45,6 @@ StdMeshers_UseExisting_1D_i::StdMeshers_UseExisting_1D_i
        SMESH_1D_Algo_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_UseExisting_1D( theGenImpl->GetANewId(),
        SMESH_1D_Algo_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_UseExisting_1D( theGenImpl->GetANewId(),
-                                                theStudyId,
                                                 theGenImpl );
 }
 //-----------------------------------------------------------------------------
                                                 theGenImpl );
 }
 //-----------------------------------------------------------------------------
@@ -70,7 +68,6 @@ StdMeshers_UseExisting_1D_i::~StdMeshers_UseExisting_1D_i()
 
 StdMeshers_UseExisting_2D_i::StdMeshers_UseExisting_2D_i
                                                ( PortableServer::POA_ptr thePOA,
 
 StdMeshers_UseExisting_2D_i::StdMeshers_UseExisting_2D_i
                                                ( PortableServer::POA_ptr thePOA,
-                                                 int                     theStudyId,
                                                  ::SMESH_Gen*            theGenImpl )
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA ), 
                                                  ::SMESH_Gen*            theGenImpl )
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA ), 
@@ -78,7 +75,6 @@ StdMeshers_UseExisting_2D_i::StdMeshers_UseExisting_2D_i
        SMESH_2D_Algo_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_UseExisting_2D( theGenImpl->GetANewId(),
        SMESH_2D_Algo_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_UseExisting_2D( theGenImpl->GetANewId(),
-                                                theStudyId,
                                                 theGenImpl );
 }
 //-----------------------------------------------------------------------------
                                                 theGenImpl );
 }
 //-----------------------------------------------------------------------------
index 69f1d337dbc4763800778c9472d2f84ec43b1779..fe91a33c5747baadb4e5195ccf56663bff1bc876 100644 (file)
@@ -46,7 +46,6 @@ class StdMeshers_UseExisting_1D_i:
 public:
   // Constructor
   StdMeshers_UseExisting_1D_i( PortableServer::POA_ptr thePOA,
 public:
   // Constructor
   StdMeshers_UseExisting_1D_i( PortableServer::POA_ptr thePOA,
-                               int                     theStudyId,
                                ::SMESH_Gen*            theGenImpl );
 
   // Destructor
                                ::SMESH_Gen*            theGenImpl );
 
   // Destructor
@@ -63,7 +62,6 @@ class StdMeshers_UseExisting_2D_i:
 public:
   // Constructor
   StdMeshers_UseExisting_2D_i( PortableServer::POA_ptr thePOA,
 public:
   // Constructor
   StdMeshers_UseExisting_2D_i( PortableServer::POA_ptr thePOA,
-                               int                     theStudyId,
                                ::SMESH_Gen*            theGenImpl );
 
   // Destructor
                                ::SMESH_Gen*            theGenImpl );
 
   // Destructor
index fb0bbbcfd0e1c470af5c4da19ebac8387cb6fd7d..638d03d9522d378dd9a86f077b3b45b7ec09aac5 100644 (file)
@@ -47,13 +47,11 @@ using namespace std;
 //=============================================================================
 
 StdMeshers_ViscousLayers2D_i::StdMeshers_ViscousLayers2D_i( PortableServer::POA_ptr thePOA,
 //=============================================================================
 
 StdMeshers_ViscousLayers2D_i::StdMeshers_ViscousLayers2D_i( PortableServer::POA_ptr thePOA,
-                                                            int                     theStudyId,
                                                             ::SMESH_Gen*            theGenImpl )
   : SALOME::GenericObj_i( thePOA ),
     SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_ViscousLayers2D( theGenImpl->GetANewId(),
                                                             ::SMESH_Gen*            theGenImpl )
   : SALOME::GenericObj_i( thePOA ),
     SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_ViscousLayers2D( theGenImpl->GetANewId(),
-                                                 theStudyId,
                                                  theGenImpl );
 }
 
                                                  theGenImpl );
 }
 
index e13d2a905feab851c116317e714ff4c56e23d470..0b28e8597a42b6f57a7fbbe3673a2a08e5467057 100644 (file)
@@ -43,8 +43,7 @@ class STDMESHERS_I_EXPORT StdMeshers_ViscousLayers2D_i:
  public:
   // Constructor
   StdMeshers_ViscousLayers2D_i( PortableServer::POA_ptr thePOA,
  public:
   // Constructor
   StdMeshers_ViscousLayers2D_i( PortableServer::POA_ptr thePOA,
-                              int                     theStudyId,
-                              ::SMESH_Gen*            theGenImpl );
+                                ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_ViscousLayers2D_i();
 
   // Destructor
   virtual ~StdMeshers_ViscousLayers2D_i();
 
index ee39c26da774a0b39ea405dacbd9725e1a9f0a43..fc06bfdb39727df353f0f0b5ff953a629080b5c1 100644 (file)
@@ -48,13 +48,11 @@ using namespace std;
 //=============================================================================
 
 StdMeshers_ViscousLayers_i::StdMeshers_ViscousLayers_i( PortableServer::POA_ptr thePOA,
 //=============================================================================
 
 StdMeshers_ViscousLayers_i::StdMeshers_ViscousLayers_i( PortableServer::POA_ptr thePOA,
-                                                        int                     theStudyId,
                                                         ::SMESH_Gen*            theGenImpl )
   : SALOME::GenericObj_i( thePOA ), 
     SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_ViscousLayers( theGenImpl->GetANewId(),
                                                         ::SMESH_Gen*            theGenImpl )
   : SALOME::GenericObj_i( thePOA ), 
     SMESH_Hypothesis_i( thePOA )
 {
   myBaseImpl = new ::StdMeshers_ViscousLayers( theGenImpl->GetANewId(),
-                                               theStudyId,
                                                theGenImpl );
 }
 
                                                theGenImpl );
 }
 
index fe6bef741f341fdda77c6cc919a61ef6f12df9c0..19f5835b0232abdc8d10e1b3000dcef6f6d2db0f 100644 (file)
@@ -43,7 +43,6 @@ class STDMESHERS_I_EXPORT StdMeshers_ViscousLayers_i:
  public:
   // Constructor
   StdMeshers_ViscousLayers_i( PortableServer::POA_ptr thePOA,
  public:
   // Constructor
   StdMeshers_ViscousLayers_i( PortableServer::POA_ptr thePOA,
-                              int                     theStudyId,
                               ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_ViscousLayers_i();
                               ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_ViscousLayers_i();
index b94ca0a0f31a8a05c606ed59ba34d57c50ca70bd..b2f2382201e09a290addb13416f7dd6473750656 100644 (file)
@@ -113,11 +113,10 @@ class QuadrangleParamsCreator : public StdHypothesisCreator_i<StdMeshers_Quadran
 {
 public:
   virtual SMESH_Hypothesis_i* Create (PortableServer::POA_ptr thePOA,
 {
 public:
   virtual SMESH_Hypothesis_i* Create (PortableServer::POA_ptr thePOA,
-                                      int                     theStudyId,
                                       ::SMESH_Gen*            theGenImpl)
   {
     StdMeshers_QuadrangleParams_i* h =
                                       ::SMESH_Gen*            theGenImpl)
   {
     StdMeshers_QuadrangleParams_i* h =
-      new StdMeshers_QuadrangleParams_i( thePOA, theStudyId, theGenImpl);
+      new StdMeshers_QuadrangleParams_i( thePOA, theGenImpl);
     h->SetQuadType( TYPE );
     return h;
   }
     h->SetQuadType( TYPE );
     return h;
   }
index e7a1d5ddd3d178f0ab283397ed94b348ae928c00..e7603d9162d66d08fa4a16910aefe5763c1f3b50 100644 (file)
@@ -157,13 +157,12 @@ class MGCleanerMonPlugDialog(Ui_MGCleanerPlugDialog,QWidget):
     import SMESH
     from salome.kernel import studyedit
     from salome.smesh import smeshBuilder
     import SMESH
     from salome.kernel import studyedit
     from salome.smesh import smeshBuilder
-    smesh = smeshBuilder.New(salome.myStudy)
+    smesh = smeshBuilder.New()
     
     if not os.path.isfile(self.fichierOut):
       QMessageBox.warning(self, "Compute", "Result file "+self.fichierOut+" not found")
 
     
     if not os.path.isfile(self.fichierOut):
       QMessageBox.warning(self, "Compute", "Result file "+self.fichierOut+" not found")
 
-    maStudy=studyedit.getActiveStudy()
-    smesh.SetCurrentStudy(maStudy)
+    maStudy=salome.myStudy
     (outputMesh, status) = smesh.CreateMeshesFromGMF(self.fichierOut)
     name=str(self.LE_MeshSmesh.text())
     initialMeshFile=None
     (outputMesh, status) = smesh.CreateMeshesFromGMF(self.fichierOut)
     name=str(self.LE_MeshSmesh.text())
     initialMeshFile=None
@@ -205,7 +204,7 @@ class MGCleanerMonPlugDialog(Ui_MGCleanerPlugDialog,QWidget):
     newLink=monStudyBuilder.NewObject(SOMesh)
     monStudyBuilder.Addreference(newLink, newStudyIter)
 
     newLink=monStudyBuilder.NewObject(SOMesh)
     monStudyBuilder.Addreference(newLink, newStudyIter)
 
-    if salome.sg.hasDesktop(): salome.sg.updateObjBrowser(False)
+    if salome.sg.hasDesktop(): salome.sg.updateObjBrowser()
     self.num+=1
     return True
 
     self.num+=1
     return True
 
@@ -263,7 +262,7 @@ class MGCleanerMonPlugDialog(Ui_MGCleanerPlugDialog,QWidget):
     ACmt = myBuilder.FindOrCreateAttribute(myObject, "AttributeComment")
     ACmt.SetValue(datai)
 
     ACmt = myBuilder.FindOrCreateAttribute(myObject, "AttributeComment")
     ACmt.SetValue(datai)
 
-    if salome.sg.hasDesktop(): salome.sg.updateObjBrowser(False)
+    if salome.sg.hasDesktop(): salome.sg.updateObjBrowser()
     self.num += 1
     if verbose: print("save %s in Object Browser done: %s\n%s" % (name, myObject.GetID(), datai))
     return True
     self.num += 1
     if verbose: print("save %s in Object Browser done: %s\n%s" % (name, myObject.GetID(), datai))
     return True
@@ -281,10 +280,9 @@ class MGCleanerMonPlugDialog(Ui_MGCleanerPlugDialog,QWidget):
     QMessageBox.warning(self, "Save", "waiting for fix: Object Browser will not display hypothesis")
     
     if verbose: print("save hypothesis in Object Browser")
     QMessageBox.warning(self, "Save", "waiting for fix: Object Browser will not display hypothesis")
     
     if verbose: print("save hypothesis in Object Browser")
-    smesh = smeshBuilder.New(salome.myStudy)
+    smesh = smeshBuilder.New()
 
 
-    maStudy=studyedit.getActiveStudy()
-    smesh.SetCurrentStudy(maStudy)
+    maStudy=salome.myStudy
 
     self.editor = studyedit.getStudyEditor()
     moduleEntry=self.editor.findOrCreateComponent("SMESH","SMESH")
 
     self.editor = studyedit.getStudyEditor()
     moduleEntry=self.editor.findOrCreateComponent("SMESH","SMESH")
@@ -307,7 +305,7 @@ class MGCleanerMonPlugDialog(Ui_MGCleanerPlugDialog,QWidget):
     notebook.set("MGCleaner_%i" % self.num, data)
     """
 
     notebook.set("MGCleaner_%i" % self.num, data)
     """
 
-    if salome.sg.hasDesktop(): salome.sg.updateObjBrowser(False)
+    if salome.sg.hasDesktop(): salome.sg.updateObjBrowser()
     self.num += 1
     if verbose: print("save %s in Object Browser done:\n%s" % (name, data))
     return True
     self.num += 1
     if verbose: print("save %s in Object Browser done:\n%s" % (name, data))
     return True
@@ -497,7 +495,7 @@ class MGCleanerMonPlugDialog(Ui_MGCleanerPlugDialog,QWidget):
     from salome.smesh.smeshstudytools import SMeshStudyTools
     from salome.gui import helper as guihelper
     from salome.smesh import smeshBuilder
     from salome.smesh.smeshstudytools import SMeshStudyTools
     from salome.gui import helper as guihelper
     from salome.smesh import smeshBuilder
-    smesh = smeshBuilder.New(salome.myStudy)
+    smesh = smeshBuilder.New()
 
     mySObject, myEntry = guihelper.getSObjectSelected()
     if CORBA.is_nil(mySObject) or mySObject==None:
 
     mySObject, myEntry = guihelper.getSObjectSelected()
     if CORBA.is_nil(mySObject) or mySObject==None:
@@ -642,7 +640,7 @@ def TEST_standalone():
   import SMESH
   from salome.kernel import studyedit
   salome.salome_init()
   import SMESH
   from salome.kernel import studyedit
   salome.salome_init()
-  maStudy=studyedit.getActiveStudy()
+  maStudy=salome.myStudy
   #etc...a mano...
 
 #
   #etc...a mano...
 
 #
index 89c194f591ab6edab32c5e1afc260aba6965658c..b48777839125a7cb31b0263ec287812a99ff8aed 100644 (file)
@@ -22,9 +22,8 @@
 # if not, copy this file as ${HOME}/Plugins/smesh_plugins.py or ${APPLI}/Plugins/smesh_plugins.py
 
 def MGCleanerLct(context):
 # if not, copy this file as ${HOME}/Plugins/smesh_plugins.py or ${APPLI}/Plugins/smesh_plugins.py
 
 def MGCleanerLct(context):
-  # get context study, studyId, salomeGui
+  # get context study, salomeGui
   study = context.study
   study = context.study
-  studyId = context.studyId
   sg = context.sg
   
   import os
   sg = context.sg
   
   import os
index f7f250637015aa9c43c99583185bd1d73b0495bb..31fd9fb7b4a8be163b4a5061bb102a565841f50d 100644 (file)
@@ -24,7 +24,7 @@
 import math, Config
 
 from salome.geom import geomBuilder
 import math, Config
 
 from salome.geom import geomBuilder
-geompy = geomBuilder.New( Config.theStudy )
+geompy = geomBuilder.New()
 
 def Go(GeoObj, CutPlnLst, OutLvlLst, PrefixLst, Publish):
 
 
 def Go(GeoObj, CutPlnLst, OutLvlLst, PrefixLst, Publish):
 
index 71ac373e9ab98c42285bf1290c495783486266ee..772b3ecf54e84bd313bada3d79c815536ecda488 100644 (file)
@@ -27,10 +27,10 @@ import CutnGroup
 import CompositeBox
 
 from salome.geom import geomBuilder
 import CompositeBox
 
 from salome.geom import geomBuilder
-geompy = geomBuilder.New( Config.theStudy )
+geompy = geomBuilder.New()
 
 from salome.smesh import smeshBuilder
 
 from salome.smesh import smeshBuilder
-smesh = smeshBuilder.New( Config.theStudy )
+smesh = smeshBuilder.New()
 
 ##########################################################################################################
 
 
 ##########################################################################################################
 
index 6589ac8b01e85d0849796f74804ce5b95717df92..9b1aadf9d0d9143ac7ef65e1f3a4e00dced853af 100644 (file)
@@ -241,7 +241,7 @@ class MacObject:
                 import GenFunctions, Config
 
                 from salome.geom import geomBuilder
                 import GenFunctions, Config
 
                 from salome.geom import geomBuilder
-                geompy = geomBuilder.New( Config.theStudy )
+                geompy = geomBuilder.New()
                 
                 if type(Criterion) is str :
                         Crit = {'South'  : lambda : 0,
                 
                 if type(Criterion) is str :
                         Crit = {'South'  : lambda : 0,
index 31f2b73297f9a7b19eb895ec2ed3db91382fcd63..219e0ee56bea7ee223a1c8db6f23cfad6ce135aa 100644 (file)
@@ -23,10 +23,10 @@ import math
 import Config
 
 from salome.geom import geomBuilder
 import Config
 
 from salome.geom import geomBuilder
-geompy = geomBuilder.New( Config.theStudy )
+geompy = geomBuilder.New()
 
 from salome.smesh import smeshBuilder
 
 from salome.smesh import smeshBuilder
-smesh = smeshBuilder.New( Config.theStudy )
+smesh = smeshBuilder.New()
 
 ##########################################################################################################
 
 
 ##########################################################################################################
 
index c5abe768acb477e58d2a1bd835d11b71f7347623..7f47b61a5473f58281584341543a10b4a58c76a7 100644 (file)
@@ -21,9 +21,8 @@
 # if not, copy this file as ${HOME}/Plugins/smesh_plugins.py or ${APPLI}/Plugins/smesh_plugins.py
 
 def MeshCut(context):
 # if not, copy this file as ${HOME}/Plugins/smesh_plugins.py or ${APPLI}/Plugins/smesh_plugins.py
 
 def MeshCut(context):
-  # get context study, studyId, salomeGui
+  # get context study, salomeGui
   study = context.study
   study = context.study
-  studyId = context.studyId
   sg = context.sg
   
   import os
   sg = context.sg
   
   import os
index 29376b600829a2253dec2968f6feb23c6af073af..cd8d02a16cf915a5bf1d98270cf14b97454f8725 100644 (file)
@@ -137,7 +137,7 @@ Modifier les scripts pour les intégrer dans le mécanisme de test
             fichierMedResult = 'fichierMed.med'
             getStatsMaillage(monMaillage,fichierMedResult)
             getStatsGroupes(monMaillage,fichierMedResult)
             fichierMedResult = 'fichierMed.med'
             getStatsMaillage(monMaillage,fichierMedResult)
             getStatsGroupes(monMaillage,fichierMedResult)
-            getStatsCritere(dimMaillage,monMaillage,fichierMedResult,theStudy)
+            getStatsCritere(dimMaillage,monMaillage,fichierMedResult)
 
 Lancement du script de comparaison
 -----------------------------------
 
 Lancement du script de comparaison
 -----------------------------------
index 16239e1701a0e4b17e7ee34ac7da37441a79efcf..6dcc3345b156befaab9044d1cf5f70c33265fa53 100644 (file)
@@ -6,10 +6,10 @@ import salome
 from getStats import getGroupesRef
 from Type_Maille import dicoDimENtite
 
 from getStats import getGroupesRef
 from Type_Maille import dicoDimENtite
 
-def getCritere(dim,NomMesh,acritere,theStudy):
+def getCritere(dim,NomMesh,acritere):
   import SMESH
   from salome.smesh import smeshBuilder
   import SMESH
   from salome.smesh import smeshBuilder
-  smesh = smeshBuilder.New(theStudy)
+  smesh = smeshBuilder.New()
   import numpy
 #  print dim,NomMesh,acritere
   if dim == 2 :
   import numpy
 #  print dim,NomMesh,acritere
   if dim == 2 :
@@ -36,10 +36,10 @@ def getCritere(dim,NomMesh,acritere,theStudy):
   
   return [max,min,Q1,M,Q3,moyenne]
 
   
   return [max,min,Q1,M,Q3,moyenne]
 
-def getCritereGroupe(NomMesh,NomGr,acritere,theStudy):
+def getCritereGroupe(NomMesh,NomGr,acritere):
   import SMESH
   from salome.smesh import smeshBuilder
   import SMESH
   from salome.smesh import smeshBuilder
-  smesh = smeshBuilder.New(theStudy)
+  smesh = smeshBuilder.New()
   import numpy
     
   # on ne traite que les mailles 2D et 3D
   import numpy
     
   # on ne traite que les mailles 2D et 3D
@@ -72,7 +72,7 @@ def getCritereGroupe(NomMesh,NomGr,acritere,theStudy):
   
   return [max,min,Q1,M,Q3,moyenne]
 
   
   return [max,min,Q1,M,Q3,moyenne]
 
-def getObjectsGroupe(Mesh,liste,theStudy):
+def getObjectsGroupe(Mesh,liste):
   import SMESH
   from salome.smesh import smeshBuilder
   dico={}
   import SMESH
   from salome.smesh import smeshBuilder
   dico={}
@@ -83,29 +83,29 @@ def getObjectsGroupe(Mesh,liste,theStudy):
           if name == n :  dico[name]=g
   return dico
 
           if name == n :  dico[name]=g
   return dico
 
-def getStatsCritere(dim,Mesh,fichierMedResult,theStudy):
+def getStatsCritere(dim,Mesh,fichierMedResult):
   fichierStatRatio=fichierMedResult.replace('.med','.ratio')
   fichierStatRatio=fichierMedResult.replace('.med','.ratio')
-  max,min,Q1,M,Q3,moyenne = getCritere(dim,Mesh,"Ratio",theStudy)
+  max,min,Q1,M,Q3,moyenne = getCritere(dim,Mesh,"Ratio")
   f = open(fichierStatRatio, 'w')
   f.write(str(max)+","+str(min)+","+str(Q1)+","+str(M)+","+str(Q3)+","+str(moyenne))
   f.close()
 
   fichierStatRatio=fichierMedResult.replace('.med','.taille')
   f = open(fichierStatRatio, 'w')
   f.write(str(max)+","+str(min)+","+str(Q1)+","+str(M)+","+str(Q3)+","+str(moyenne))
   f.close()
 
   fichierStatRatio=fichierMedResult.replace('.med','.taille')
-  max,min,Q1,M,Q3,moyenne = getCritere(dim,Mesh,"Length",theStudy)
+  max,min,Q1,M,Q3,moyenne = getCritere(dim,Mesh,"Length")
   f = open(fichierStatRatio, 'w')
   f.write(str(max)+","+str(min)+","+str(Q1)+","+str(M)+","+str(Q3)+","+str(moyenne))
   f.close()
 
   liste=getGroupesRef(fichierMedResult)
   f = open(fichierStatRatio, 'w')
   f.write(str(max)+","+str(min)+","+str(Q1)+","+str(M)+","+str(Q3)+","+str(moyenne))
   f.close()
 
   liste=getGroupesRef(fichierMedResult)
-  dicoGroupe=getObjectsGroupe(Mesh,liste,theStudy)
+  dicoGroupe=getObjectsGroupe(Mesh,liste)
   for groupe in liste :
   for groupe in liste :
-      max,min,Q1,M,Q3,moyenne=getCritereGroupe(Mesh,dicoGroupe[groupe],"Ratio",theStudy)
+      max,min,Q1,M,Q3,moyenne=getCritereGroupe(Mesh,dicoGroupe[groupe],"Ratio")
       extension="_"+groupe+'_Ratio.res'
       fichier=fichierMedResult.replace('.med',extension)
       f = open(fichier, 'w')
       f.write(str(max)+","+str(min)+","+str(Q1)+","+str(M)+","+str(Q3)+","+str(moyenne))
       f.close()
       extension="_"+groupe+'_Ratio.res'
       fichier=fichierMedResult.replace('.med',extension)
       f = open(fichier, 'w')
       f.write(str(max)+","+str(min)+","+str(Q1)+","+str(M)+","+str(Q3)+","+str(moyenne))
       f.close()
-      max,min,Q1,M,Q3,moyenne=getCritereGroupe(Mesh,dicoGroupe[groupe],"Length",theStudy)
+      max,min,Q1,M,Q3,moyenne=getCritereGroupe(Mesh,dicoGroupe[groupe],"Length")
       extension="_"+groupe+'_Taille.res'
       fichier=fichierMedResult.replace('.med',extension)
       f = open(fichier, 'w')
       extension="_"+groupe+'_Taille.res'
       fichier=fichierMedResult.replace('.med',extension)
       f = open(fichier, 'w')
index efdaa315438bd6a50f7fa7b029933f9ef6cd985f..29754d4b42173e959610829fadcd914bdafcf91a 100644 (file)
@@ -130,13 +130,13 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget):
     import SMESH
     from salome.kernel import studyedit
     from salome.smesh import smeshBuilder
     import SMESH
     from salome.kernel import studyedit
     from salome.smesh import smeshBuilder
-    smesh = smeshBuilder.New(salome.myStudy)
+    smesh = smeshBuilder.New()
     
     if not os.path.isfile(self.fichierOut):
       QMessageBox.warning(self, "Compute", "Result file "+self.fichierOut+" not found")
 
     
     if not os.path.isfile(self.fichierOut):
       QMessageBox.warning(self, "Compute", "Result file "+self.fichierOut+" not found")
 
-    maStudy=studyedit.getActiveStudy()
-    smesh.SetCurrentStudy(maStudy)
+    maStudy=salome.myStudy
+    smesh.UpdateStudy()
     (outputMesh, status) = smesh.CreateMeshesFromGMF(self.fichierOut)
     name=str(self.LE_MeshSmesh.text())
     initialMeshFile=None
     (outputMesh, status) = smesh.CreateMeshesFromGMF(self.fichierOut)
     name=str(self.LE_MeshSmesh.text())
     initialMeshFile=None
@@ -178,7 +178,7 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget):
     newLink=monStudyBuilder.NewObject(SOMesh)
     monStudyBuilder.Addreference(newLink, newStudyIter)
 
     newLink=monStudyBuilder.NewObject(SOMesh)
     monStudyBuilder.Addreference(newLink, newStudyIter)
 
-    if salome.sg.hasDesktop(): salome.sg.updateObjBrowser(False)
+    if salome.sg.hasDesktop(): salome.sg.updateObjBrowser()
     self.num+=1
     return True
 
     self.num+=1
     return True
 
@@ -236,7 +236,7 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget):
     ACmt = myBuilder.FindOrCreateAttribute(myObject, "AttributeComment")
     ACmt.SetValue(datai)
 
     ACmt = myBuilder.FindOrCreateAttribute(myObject, "AttributeComment")
     ACmt.SetValue(datai)
 
-    if salome.sg.hasDesktop(): salome.sg.updateObjBrowser(False)
+    if salome.sg.hasDesktop(): salome.sg.updateObjBrowser()
     self.num += 1
     if verbose: print("save %s in Object Browser done: %s\n%s" % (name, myObject.GetID(), datai))
     return True
     self.num += 1
     if verbose: print("save %s in Object Browser done: %s\n%s" % (name, myObject.GetID(), datai))
     return True
@@ -254,10 +254,10 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget):
     QMessageBox.warning(self, "Save", "waiting for fix: Object Browser will not display hypothesis")
     
     if verbose: print("save hypothesis in Object Browser")
     QMessageBox.warning(self, "Save", "waiting for fix: Object Browser will not display hypothesis")
     
     if verbose: print("save hypothesis in Object Browser")
-    smesh = smeshBuilder.New(salome.myStudy)
+    smesh = smeshBuilder.New()
 
 
-    maStudy=studyedit.getActiveStudy()
-    smesh.SetCurrentStudy(maStudy)
+    maStudy=salome.myStudy
+    smesh.UpdateStudy()
 
     self.editor = studyedit.getStudyEditor()
     moduleEntry=self.editor.findOrCreateComponent("SMESH","SMESH")
 
     self.editor = studyedit.getStudyEditor()
     moduleEntry=self.editor.findOrCreateComponent("SMESH","SMESH")
@@ -273,7 +273,7 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget):
     data = self.getResumeData(separator=" ; ")
     self.editor.setAttributeValue(newStudyIter, "AttributeComment", data)
     
     data = self.getResumeData(separator=" ; ")
     self.editor.setAttributeValue(newStudyIter, "AttributeComment", data)
     
-    if salome.sg.hasDesktop(): salome.sg.updateObjBrowser(False)
+    if salome.sg.hasDesktop(): salome.sg.updateObjBrowser()
     self.num += 1
     if verbose: print("save %s in Object Browser done:\n%s" % (name, data))
     return True
     self.num += 1
     if verbose: print("save %s in Object Browser done:\n%s" % (name, data))
     return True
@@ -452,7 +452,7 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget):
     from salome.smesh.smeshstudytools import SMeshStudyTools
     from salome.gui import helper as guihelper
     from salome.smesh import smeshBuilder
     from salome.smesh.smeshstudytools import SMeshStudyTools
     from salome.gui import helper as guihelper
     from salome.smesh import smeshBuilder
-    smesh = smeshBuilder.New(salome.myStudy)
+    smesh = smeshBuilder.New()
 
     mySObject, myEntry = guihelper.getSObjectSelected()
     if CORBA.is_nil(mySObject) or mySObject==None:
 
     mySObject, myEntry = guihelper.getSObjectSelected()
     if CORBA.is_nil(mySObject) or mySObject==None:
index 20eea53c69511b767ef3f6a63d4e6275f25983fb..afaa40f3a7fbd1ef483d14d0678f0427e572125d 100755 (executable)
@@ -22,9 +22,8 @@
 # if not, copy this file as ${HOME}/Plugins/smesh_plugins.py or ${APPLI}/Plugins/smesh_plugins.py
 
 def YamsLct(context):
 # if not, copy this file as ${HOME}/Plugins/smesh_plugins.py or ${APPLI}/Plugins/smesh_plugins.py
 
 def YamsLct(context):
-  # get context study, studyId, salomeGui
+  # get context study, salomeGui
   study = context.study
   study = context.study
-  studyId = context.studyId
   sg = context.sg
   
   import os
   sg = context.sg
   
   import os
index 40e34cea8f918ad5a3b27d8476f7543777d3068e..2c91f460a9758d9543cc7829d41237097133046c 100644 (file)
@@ -33,4 +33,4 @@ dicoParams = dict(nomCas            = 'fissTuyau',
 execInstance = casStandard(dicoParams)
 
 if salome.sg.hasDesktop():
 execInstance = casStandard(dicoParams)
 
 if salome.sg.hasDesktop():
-    salome.sg.updateObjBrowser(True)
+    salome.sg.updateObjBrowser()
index dc834acd95e465938c4149c81144eaa1f4a408e2..a8fa04b3d06220e3bdbf533d33bdebed06b102d4 100644 (file)
@@ -33,4 +33,4 @@ dicoParams = dict(nomCas            = 'fissTuyau',
 execInstance = casStandard(dicoParams)
 
 if salome.sg.hasDesktop():
 execInstance = casStandard(dicoParams)
 
 if salome.sg.hasDesktop():
-    salome.sg.updateObjBrowser(True)
+    salome.sg.updateObjBrowser()
index 1b0141f65834f1994ba24b942947e89d4b59d4ac..be2ba7cbd962eefe7c7b0e4766d7e69dc6b33789 100644 (file)
@@ -4,10 +4,8 @@ import sys
 import salome
 
 salome.salome_init()
 import salome
 
 salome.salome_init()
-theStudy = salome.myStudy
 
 import salome_notebook
 
 import salome_notebook
-notebook = salome_notebook.NoteBook(theStudy)
 
 ###
 ### GEOM component
 
 ###
 ### GEOM component
@@ -18,8 +16,7 @@ from salome.geom import geomBuilder
 import math
 import SALOMEDS
 
 import math
 import SALOMEDS
 
-
-geompy = geomBuilder.New(theStudy)
+geompy = geomBuilder.New()
 
 O = geompy.MakeVertex(0, 0, 0)
 OX = geompy.MakeVectorDXDYDZ(1, 0, 0)
 
 O = geompy.MakeVertex(0, 0, 0)
 OX = geompy.MakeVectorDXDYDZ(1, 0, 0)
@@ -49,7 +46,7 @@ geompy.addToStudy( Cut_1, 'Cut_1' )
 import  SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import  SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
-smesh = smeshBuilder.New(theStudy)
+smesh = smeshBuilder.New()
 from salome.StdMeshers import StdMeshersBuilder
 boite = smesh.Mesh(Box_1)
 Regular_1D = boite.Segment()
 from salome.StdMeshers import StdMeshersBuilder
 boite = smesh.Mesh(Box_1)
 Regular_1D = boite.Segment()
@@ -91,4 +88,4 @@ dicoParams = dict(nomCas            = 'angleCube2',
 execInstance = casStandard(dicoParams)
 
 if salome.sg.hasDesktop():
 execInstance = casStandard(dicoParams)
 
 if salome.sg.hasDesktop():
-  salome.sg.updateObjBrowser(True)
+  salome.sg.updateObjBrowser()
index f8b761fabfe5698d1f721434ae388cd8ccc52ad6..4638d9aeb700192475849707a8a59e167c18ff40 100644 (file)
@@ -33,4 +33,4 @@ dicoParams = dict(nomCas            = 'fissTuyau',
 execInstance = casStandard(dicoParams)
 
 if salome.sg.hasDesktop():
 execInstance = casStandard(dicoParams)
 
 if salome.sg.hasDesktop():
-    salome.sg.updateObjBrowser(True)
\ No newline at end of file
+    salome.sg.updateObjBrowser()
\ No newline at end of file
index 8db3cabb04406bcfcda26a20cdefb5dc0535eafd..904e83a721387d0d5a73695f36c2f11430287126 100644 (file)
@@ -333,7 +333,7 @@ def construitFissureGenerale(maillagesSains,
   logging.info("fichier maillage fissure %s", fichierMaillageFissure)
 
   if salome.sg.hasDesktop():
   logging.info("fichier maillage fissure %s", fichierMaillageFissure)
 
   if salome.sg.hasDesktop():
-    salome.sg.updateObjBrowser(True)
+    salome.sg.updateObjBrowser()
 
   logging.info("maillage fissure fini")
   
 
   logging.info("maillage fissure fini")
   
index d4270fceade65e7ed994c0ec8c142385fdace2a8..d119ce0ac6deeb369ce057f74c358b81634adf03 100644 (file)
@@ -21,8 +21,6 @@ def creeZoneDefautDansObjetSain(geometriesSaines, maillagesSains, shapesFissure,
   #TODO: a compléter
   """
   logging.info('start')
   #TODO: a compléter
   """
   logging.info('start')
-  
-  #smesh.SetCurrentStudy(salome.myStudy)
 
   geometrieSaine      = geometriesSaines[0]
   maillageSain        = maillagesSains[0]
 
   geometrieSaine      = geometriesSaines[0]
   maillageSain        = maillagesSains[0]
index 4c61d1b924f821d53c152c7c70b09013a3203fc7..15882b74c634db484a62b9b7fe5e108555b73dde 100644 (file)
@@ -8,10 +8,10 @@ import salome
 salome.salome_init()
 
 from salome.geom import geomBuilder
 salome.salome_init()
 
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 from salome.smesh import smeshBuilder
 
 from salome.smesh import smeshBuilder
-smesh = smeshBuilder.New(salome.myStudy)
+smesh = smeshBuilder.New()
 
 # logging.debug("initialisation de geompy et smesh OK")
 
 
 # logging.debug("initialisation de geompy et smesh OK")
 
index de8fbeb17a232d9fd23c5279562df713f1909d7e..1b0b8abd39928b627cad7bda259d8eac30a3a94d 100644 (file)
@@ -194,6 +194,6 @@ def insereFissureElliptique(geometriesSaines, maillagesSains,
   logging.info("fichier maillage fissure : %s", fichierMaillageFissure)
 
   if salome.sg.hasDesktop():
   logging.info("fichier maillage fissure : %s", fichierMaillageFissure)
 
   if salome.sg.hasDesktop():
-    salome.sg.updateObjBrowser(True)
+    salome.sg.updateObjBrowser()
 
   return maillageComplet
 
   return maillageComplet
index a8619bdda38b8b09cce60634d2a34dacd5270e8b..a475f7c6564dc86bd02d5d9ece741d13e8b88aca 100644 (file)
@@ -1378,7 +1378,7 @@ def insereFissureGenerale(maillagesSains,
   logging.info("fichier maillage fissure %s", fichierMaillageFissure)
 
   if salome.sg.hasDesktop():
   logging.info("fichier maillage fissure %s", fichierMaillageFissure)
 
   if salome.sg.hasDesktop():
-    salome.sg.updateObjBrowser(True)
+    salome.sg.updateObjBrowser()
 
   logging.info("maillage fissure fini")
   
 
   logging.info("maillage fissure fini")
   
index 347fb401c678a5b95caead419dcb7b7ae6d16e30..02fa6b6999358534f41416fd43dccadd2466172a 100644 (file)
@@ -654,6 +654,6 @@ def insereFissureLongue(geometriesSaines, maillagesSains,
   logging.info("fichier maillage fissure %s", fichierMaillageFissure)
 
   if salome.sg.hasDesktop():
   logging.info("fichier maillage fissure %s", fichierMaillageFissure)
 
   if salome.sg.hasDesktop():
-    salome.sg.updateObjBrowser(True)
+    salome.sg.updateObjBrowser()
 
   return  maillageComplet
\ No newline at end of file
 
   return  maillageComplet
\ No newline at end of file
index 30936d50cbabb3a66f838cac69da3373cd34aa4f..fa561d6f31bcf7fd5982da4b2f8d1b3cbb13f9f0 100644 (file)
@@ -27,9 +27,8 @@ import math
 from blocFissure import gmu
 
 def fissureCoudeDlg(context):
 from blocFissure import gmu
 
 def fissureCoudeDlg(context):
-  # get context study, studyId, salomeGui
+  # get context study, salomeGui
   study = context.study
   study = context.study
-  studyId = context.studyId
   sg = context.sg
   
   import os
   sg = context.sg
   
   import os
index 48d962653cb613e999132e5d74814ac52b4a230e..e7582a4f414a008343aa8dc1c720d81632f63371 100644 (file)
@@ -27,9 +27,8 @@ import math
 from blocFissure import gmu
 
 def fissureGeneraleDlg(context):
 from blocFissure import gmu
 
 def fissureGeneraleDlg(context):
-  # get context study, studyId, salomeGui
+  # get context study, salomeGui
   study = context.study
   study = context.study
-  studyId = context.studyId
   sg = context.sg
 
   import os
   sg = context.sg
 
   import os
index 3b0097aa4f90cda8c60a15368821826f3d37d410..b24d86cf728ea17f7626a82270990e980562525d 100644 (file)
@@ -29,4 +29,4 @@ dicoParams = dict(nomCas            = 'casTestCoinTriple',
 execInstance = casStandard(dicoParams)
 
 if salome.sg.hasDesktop():
 execInstance = casStandard(dicoParams)
 
 if salome.sg.hasDesktop():
-  salome.sg.updateObjBrowser(True)
+  salome.sg.updateObjBrowser()
index 89ceb14e7091a1815e5610c3b38bd9a400f4659b..4ffd10a8a03e9c5c0938cca451501de4fa665ae6 100644 (file)
@@ -29,4 +29,4 @@ dicoParams = dict(nomCas            = 'casTestCoinTriple',
 execInstance = casStandard(dicoParams)
 
 if salome.sg.hasDesktop():
 execInstance = casStandard(dicoParams)
 
 if salome.sg.hasDesktop():
-  salome.sg.updateObjBrowser(True)
+  salome.sg.updateObjBrowser()
index 49eeed3ae6a190d82987540a41c57715275e514f..d7789575e21d88730f943aea44406a603b105a4e 100644 (file)
@@ -29,4 +29,4 @@ dicoParams = dict(nomCas            = 'testAubry',
 execInstance = casStandard(dicoParams)
 
 if salome.sg.hasDesktop():
 execInstance = casStandard(dicoParams)
 
 if salome.sg.hasDesktop():
-  salome.sg.updateObjBrowser(True)
+  salome.sg.updateObjBrowser()
index a9c4769aaf1edcbf50f35862b8980362f213a816..9b4f4481cb205547e3b906891b4cfc5909021134 100644 (file)
@@ -4,10 +4,8 @@ import sys
 import salome
 
 salome.salome_init()
 import salome
 
 salome.salome_init()
-theStudy = salome.myStudy
 
 import salome_notebook
 
 import salome_notebook
-notebook = salome_notebook.NoteBook(theStudy)
 
 import os
 from blocFissure import gmu
 
 import os
 from blocFissure import gmu
@@ -22,7 +20,7 @@ import math
 import SALOMEDS
 
 
 import SALOMEDS
 
 
-geompy = geomBuilder.New(theStudy)
+geompy = geomBuilder.New()
 
 O = geompy.MakeVertex(0, 0, 0)
 OX = geompy.MakeVectorDXDYDZ(1, 0, 0)
 
 O = geompy.MakeVertex(0, 0, 0)
 OX = geompy.MakeVectorDXDYDZ(1, 0, 0)
@@ -55,7 +53,7 @@ geompy.addToStudy( Common_1, 'Common_1' )
 import  SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import  SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
-smesh = smeshBuilder.New(theStudy)
+smesh = smeshBuilder.New()
 from salome.StdMeshers import StdMeshersBuilder
 Mesh_1 = smesh.Mesh(Box_1)
 Regular_1D = Mesh_1.Segment()
 from salome.StdMeshers import StdMeshersBuilder
 Mesh_1 = smesh.Mesh(Box_1)
 Regular_1D = Mesh_1.Segment()
@@ -75,4 +73,4 @@ smesh.SetName(Quadrangle_2D.GetAlgorithm(), 'Quadrangle_2D')
 smesh.SetName(Hexa_3D.GetAlgorithm(), 'Hexa_3D')
 
 if salome.sg.hasDesktop():
 smesh.SetName(Hexa_3D.GetAlgorithm(), 'Hexa_3D')
 
 if salome.sg.hasDesktop():
-  salome.sg.updateObjBrowser(True)
+  salome.sg.updateObjBrowser()
index 3eeb130df8e47a9a9da06fbba1beca36f5794664..01feafa56a5be76ea3085c383ae1525c822f6638 100644 (file)
@@ -4,10 +4,8 @@ import sys
 import salome
 
 salome.salome_init()
 import salome
 
 salome.salome_init()
-theStudy = salome.myStudy
 
 import salome_notebook
 
 import salome_notebook
-notebook = salome_notebook.NoteBook(theStudy)
 
 import os
 from blocFissure import gmu
 
 import os
 from blocFissure import gmu
@@ -22,7 +20,7 @@ import math
 import SALOMEDS
 
 
 import SALOMEDS
 
 
-geompy = geomBuilder.New(theStudy)
+geompy = geomBuilder.New()
 
 O = geompy.MakeVertex(0, 0, 0)
 OX = geompy.MakeVectorDXDYDZ(1, 0, 0)
 
 O = geompy.MakeVertex(0, 0, 0)
 OX = geompy.MakeVectorDXDYDZ(1, 0, 0)
@@ -104,7 +102,7 @@ geompy.ExportBREP(cubeFin_Milieu, os.path.join(gmu.pathBloc, "materielCasTests/c
 import  SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import  SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
-smesh = smeshBuilder.New(theStudy)
+smesh = smeshBuilder.New()
 cubeFin_1 = smesh.Mesh(cubeFin)
 Regular_1D = cubeFin_1.Segment()
 Nb_Segments_1 = Regular_1D.NumberOfSegments(20)
 cubeFin_1 = smesh.Mesh(cubeFin)
 Regular_1D = cubeFin_1.Segment()
 Nb_Segments_1 = Regular_1D.NumberOfSegments(20)
@@ -127,4 +125,4 @@ smesh.SetName(Nb_Segments_1, 'Nb. Segments_1')
 cubeFin_1.ExportMED( os.path.join(gmu.pathBloc, "materielCasTests/cubeFin.med"), 0, SMESH.MED_V2_2, 1 )
 
 if salome.sg.hasDesktop():
 cubeFin_1.ExportMED( os.path.join(gmu.pathBloc, "materielCasTests/cubeFin.med"), 0, SMESH.MED_V2_2, 1 )
 
 if salome.sg.hasDesktop():
-  salome.sg.updateObjBrowser(True)
+  salome.sg.updateObjBrowser()
index c43889c94f2d48ddd522e8e6b8464e1b50af0451..6fc4193884c3b3639cf3d6c8d80ce4613128c922 100644 (file)
@@ -22,7 +22,7 @@ import math
 import SALOMEDS
 
 
 import SALOMEDS
 
 
-geompy = geomBuilder.New(theStudy)
+geompy = geomBuilder.New()
 
 O = geompy.MakeVertex(0, 0, 0)
 OX = geompy.MakeVectorDXDYDZ(1, 0, 0)
 
 O = geompy.MakeVertex(0, 0, 0)
 OX = geompy.MakeVectorDXDYDZ(1, 0, 0)
@@ -125,7 +125,7 @@ geompy.addToStudy( FissInCylindre2, 'FissInCylindre2' )
 import  SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import  SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
-smesh = smeshBuilder.New(theStudy)
+smesh = smeshBuilder.New()
 from salome.StdMeshers import StdMeshersBuilder
 smeshObj_1 = smesh.CreateHypothesis('NumberOfSegments')
 smeshObj_1.SetNumberOfSegments( 5 )
 from salome.StdMeshers import StdMeshersBuilder
 smeshObj_1 = smesh.CreateHypothesis('NumberOfSegments')
 smeshObj_1.SetNumberOfSegments( 5 )
@@ -164,4 +164,4 @@ smesh.SetName(SubMesh_1, 'SubMesh_1')
 smesh.SetName(SubMesh_2, 'SubMesh_2')
 
 if salome.sg.hasDesktop():
 smesh.SetName(SubMesh_2, 'SubMesh_2')
 
 if salome.sg.hasDesktop():
-  salome.sg.updateObjBrowser(True)
+  salome.sg.updateObjBrowser()
index 7fc7173dc5a91282b806a48314b5ab48b61b5a49..43640c422ccd5e89d0ea42241595bd8ae11f952b 100644 (file)
@@ -4,7 +4,6 @@ import sys
 import salome
 
 salome.salome_init()
 import salome
 
 salome.salome_init()
-theStudy = salome.myStudy
 
 import salome_notebook
 notebook = salome_notebook.notebook
 
 import salome_notebook
 notebook = salome_notebook.notebook
@@ -23,7 +22,7 @@ import math
 import SALOMEDS
 
 
 import SALOMEDS
 
 
-geompy = geomBuilder.New(theStudy)
+geompy = geomBuilder.New()
 
 O = geompy.MakeVertex(0, 0, 0)
 OX = geompy.MakeVectorDXDYDZ(1, 0, 0)
 
 O = geompy.MakeVertex(0, 0, 0)
 OX = geompy.MakeVectorDXDYDZ(1, 0, 0)
@@ -56,7 +55,7 @@ geompy.addToStudyInFather( Disque, Compound_4, 'Compound_4' )
 import  SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import  SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
-smesh = smeshBuilder.New(theStudy)
+smesh = smeshBuilder.New()
 from salome.StdMeshers import StdMeshersBuilder
 Disque_1 = smesh.Mesh(Disque)
 Regular_1D = Disque_1.Segment()
 from salome.StdMeshers import StdMeshersBuilder
 Disque_1 = smesh.Mesh(Disque)
 Regular_1D = Disque_1.Segment()
@@ -86,4 +85,4 @@ smesh.SetName(SubMesh_1, 'SubMesh_1')
 smesh.SetName(SubMesh_2, 'SubMesh_2')
 
 if salome.sg.hasDesktop():
 smesh.SetName(SubMesh_2, 'SubMesh_2')
 
 if salome.sg.hasDesktop():
-  salome.sg.updateObjBrowser(True)
+  salome.sg.updateObjBrowser()
index e55e913cf5097ba2f3d07387e9693eb04e0ee094..8a57b3aa1d6ac18e351ed7a9408d839b5bebc841 100644 (file)
@@ -4,7 +4,6 @@ import sys
 import salome
 
 salome.salome_init()
 import salome
 
 salome.salome_init()
-theStudy = salome.myStudy
 
 import salome_notebook
 notebook = salome_notebook.notebook
 
 import salome_notebook
 notebook = salome_notebook.notebook
@@ -22,7 +21,7 @@ import math
 import SALOMEDS
 
 
 import SALOMEDS
 
 
-geompy = geomBuilder.New(theStudy)
+geompy = geomBuilder.New()
 
 O = geompy.MakeVertex(0, 0, 0)
 OX = geompy.MakeVectorDXDYDZ(1, 0, 0)
 
 O = geompy.MakeVertex(0, 0, 0)
 OX = geompy.MakeVectorDXDYDZ(1, 0, 0)
@@ -58,4 +57,4 @@ geompy.ExportBREP(ellipse1, os.path.join(gmu.pathBloc, "materielCasTests/ellipse
 
 
 if salome.sg.hasDesktop():
 
 
 if salome.sg.hasDesktop():
-  salome.sg.updateObjBrowser(True)
+  salome.sg.updateObjBrowser()
index b0b1d37f3d1558d4676b80605f9b09e201710262..56f2861a437652e705227eca9608d43f7606b60a 100644 (file)
@@ -4,10 +4,8 @@ import sys
 import salome
 
 salome.salome_init()
 import salome
 
 salome.salome_init()
-theStudy = salome.myStudy
 
 import salome_notebook
 
 import salome_notebook
-notebook = salome_notebook.NoteBook(theStudy)
 
 import os
 from blocFissure import gmu
 
 import os
 from blocFissure import gmu
@@ -22,7 +20,7 @@ import math
 import SALOMEDS
 
 
 import SALOMEDS
 
 
-geompy = geomBuilder.New(theStudy)
+geompy = geomBuilder.New()
 
 O = geompy.MakeVertex(0, 0, 0)
 OX = geompy.MakeVectorDXDYDZ(1, 0, 0)
 
 O = geompy.MakeVertex(0, 0, 0)
 OX = geompy.MakeVectorDXDYDZ(1, 0, 0)
@@ -50,4 +48,4 @@ geompy.addToStudy( Ellipse_disque, 'Ellipse_disque' )
 
 
 if salome.sg.hasDesktop():
 
 
 if salome.sg.hasDesktop():
-  salome.sg.updateObjBrowser(True)
+  salome.sg.updateObjBrowser()
index 5b01a500d1f4700cee579956239d6ec25459ecb1..b607f7c78b4c7ab3a20898853a16858303b8c7a6 100644 (file)
@@ -4,7 +4,6 @@ import sys
 import salome
 
 salome.salome_init()
 import salome
 
 salome.salome_init()
-theStudy = salome.myStudy
 
 import salome_notebook
 notebook = salome_notebook.notebook
 
 import salome_notebook
 notebook = salome_notebook.notebook
@@ -22,7 +21,7 @@ from salome.geom import geomBuilder
 import math
 import SALOMEDS
 
 import math
 import SALOMEDS
 
-geompy = geomBuilder.New(theStudy)
+geompy = geomBuilder.New()
 
 Disk_1 = geompy.MakeDiskR(100, 1)
 O = geompy.MakeVertex(0, 0, 0)
 
 Disk_1 = geompy.MakeDiskR(100, 1)
 O = geompy.MakeVertex(0, 0, 0)
@@ -56,4 +55,4 @@ geompy.ExportBREP(ellipse1, os.path.join(gmu.pathBloc, "materielCasTests/ellipse
 
 
 if salome.sg.hasDesktop():
 
 
 if salome.sg.hasDesktop():
-  salome.sg.updateObjBrowser(True)
+  salome.sg.updateObjBrowser()
index 3430703529a7497a3ba9ace8bdd03893ed100640..40cb7c8d5f841536401311c31856037e5a29211d 100644 (file)
@@ -4,7 +4,6 @@ import sys
 import salome
 
 salome.salome_init()
 import salome
 
 salome.salome_init()
-theStudy = salome.myStudy
 
 import salome_notebook
 notebook = salome_notebook.notebook
 
 import salome_notebook
 notebook = salome_notebook.notebook
@@ -22,7 +21,7 @@ import math
 import SALOMEDS
 
 
 import SALOMEDS
 
 
-geompy = geomBuilder.New(theStudy)
+geompy = geomBuilder.New()
 
 O = geompy.MakeVertex(0, 0, 0)
 OX = geompy.MakeVectorDXDYDZ(1, 0, 0)
 
 O = geompy.MakeVertex(0, 0, 0)
 OX = geompy.MakeVectorDXDYDZ(1, 0, 0)
@@ -72,7 +71,7 @@ geompy.addToStudyInFather( EprouvetteCourbe, Compound_x, 'Compound_x' )
 import  SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import  SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
-smesh = smeshBuilder.New(theStudy)
+smesh = smeshBuilder.New()
 from salome.StdMeshers import StdMeshersBuilder
 EprouvetteCourbe_1 = smesh.Mesh(EprouvetteCourbe)
 Regular_1D = EprouvetteCourbe_1.Segment()
 from salome.StdMeshers import StdMeshersBuilder
 EprouvetteCourbe_1 = smesh.Mesh(EprouvetteCourbe)
 Regular_1D = EprouvetteCourbe_1.Segment()
@@ -104,4 +103,4 @@ smesh.SetName(SubMesh_1, 'SubMesh_1')
 smesh.SetName(SubMesh_2, 'SubMesh_2')
 
 if salome.sg.hasDesktop():
 smesh.SetName(SubMesh_2, 'SubMesh_2')
 
 if salome.sg.hasDesktop():
-  salome.sg.updateObjBrowser(True)
+  salome.sg.updateObjBrowser()
index 1b2ef1c477434e45780c2e3f03d23e23fe5300be..2f6bcff204c1eb71036b66dccff419ed34ecca6e 100644 (file)
@@ -4,10 +4,8 @@ import sys
 import salome
 
 salome.salome_init()
 import salome
 
 salome.salome_init()
-theStudy = salome.myStudy
 
 import salome_notebook
 
 import salome_notebook
-notebook = salome_notebook.NoteBook(theStudy)
 
 import os
 from blocFissure import gmu
 
 import os
 from blocFissure import gmu
@@ -22,7 +20,7 @@ import math
 import SALOMEDS
 
 
 import SALOMEDS
 
 
-geompy = geomBuilder.New(theStudy)
+geompy = geomBuilder.New()
 
 O = geompy.MakeVertex(0, 0, 0)
 OX = geompy.MakeVectorDXDYDZ(1, 0, 0)
 
 O = geompy.MakeVertex(0, 0, 0)
 OX = geompy.MakeVectorDXDYDZ(1, 0, 0)
@@ -107,7 +105,7 @@ geompy.addToStudy( Face_2, 'Face_2' )
 import  SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import  SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
-smesh = smeshBuilder.New(theStudy)
+smesh = smeshBuilder.New()
 from salome.StdMeshers import StdMeshersBuilder
 eprouvetteDroite_1 = smesh.Mesh(eprouvetteDroite)
 Regular_1D = eprouvetteDroite_1.Segment()
 from salome.StdMeshers import StdMeshersBuilder
 eprouvetteDroite_1 = smesh.Mesh(eprouvetteDroite)
 Regular_1D = eprouvetteDroite_1.Segment()
@@ -139,4 +137,4 @@ smesh.SetName(SubMesh_1, 'SubMesh_1')
 smesh.SetName(SubMesh_2, 'SubMesh_2')
 
 if salome.sg.hasDesktop():
 smesh.SetName(SubMesh_2, 'SubMesh_2')
 
 if salome.sg.hasDesktop():
-  salome.sg.updateObjBrowser(True)
+  salome.sg.updateObjBrowser()
index a6d4e3999e3548d2d3c789721bc88a09c090ff21..18796848d2d8e4e159350424c5a1f6b54e4eb2f9 100644 (file)
@@ -4,7 +4,6 @@ import sys
 import salome
 
 salome.salome_init()
 import salome
 
 salome.salome_init()
-theStudy = salome.myStudy
 
 import salome_notebook
 notebook = salome_notebook.notebook
 
 import salome_notebook
 notebook = salome_notebook.notebook
@@ -22,7 +21,7 @@ import math
 import SALOMEDS
 
 
 import SALOMEDS
 
 
-geompy = geomBuilder.New(theStudy)
+geompy = geomBuilder.New()
 
 O = geompy.MakeVertex(0, 0, 0)
 OX = geompy.MakeVectorDXDYDZ(1, 0, 0)
 
 O = geompy.MakeVertex(0, 0, 0)
 OX = geompy.MakeVectorDXDYDZ(1, 0, 0)
@@ -101,7 +100,7 @@ geompy.addToStudyInFather( objetSain, Compound_6, 'Compound_6' )
 import  SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import  SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
-smesh = smeshBuilder.New(theStudy)
+smesh = smeshBuilder.New()
 from salome.StdMeshers import StdMeshersBuilder
 objetSain_1 = smesh.Mesh(objetSain)
 Regular_1D = objetSain_1.Segment()
 from salome.StdMeshers import StdMeshersBuilder
 objetSain_1 = smesh.Mesh(objetSain)
 Regular_1D = objetSain_1.Segment()
@@ -133,4 +132,4 @@ smesh.SetName(SubMesh_1, 'SubMesh_1')
 smesh.SetName(SubMesh_2, 'SubMesh_2')
 
 if salome.sg.hasDesktop():
 smesh.SetName(SubMesh_2, 'SubMesh_2')
 
 if salome.sg.hasDesktop():
-  salome.sg.updateObjBrowser(True)
+  salome.sg.updateObjBrowser()
index 0f08fd71511cb041694fbd65967741455cf11875..c2fcbb0c45bfb5a42899f01e3bd9d74985d9e503 100644 (file)
@@ -4,7 +4,6 @@ import sys
 import salome
 
 salome.salome_init()
 import salome
 
 salome.salome_init()
-theStudy = salome.myStudy
 
 import salome_notebook
 notebook = salome_notebook.notebook
 
 import salome_notebook
 notebook = salome_notebook.notebook
@@ -22,7 +21,7 @@ import math
 import SALOMEDS
 
 
 import SALOMEDS
 
 
-geompy = geomBuilder.New(theStudy)
+geompy = geomBuilder.New()
 
 O = geompy.MakeVertex(0, 0, 0)
 OX = geompy.MakeVectorDXDYDZ(1, 0, 0)
 
 O = geompy.MakeVertex(0, 0, 0)
 OX = geompy.MakeVectorDXDYDZ(1, 0, 0)
@@ -75,7 +74,7 @@ geompy.addToStudy( FaceFissExtCoupe, 'FaceFissExtCoupe' )
 import  SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import  SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
-smesh = smeshBuilder.New(theStudy)
+smesh = smeshBuilder.New()
 from salome.StdMeshers import StdMeshersBuilder
 Mesh_1 = smesh.Mesh(objetSain)
 Regular_1D = Mesh_1.Segment()
 from salome.StdMeshers import StdMeshersBuilder
 Mesh_1 = smesh.Mesh(objetSain)
 Regular_1D = Mesh_1.Segment()
@@ -95,4 +94,4 @@ smesh.SetName(Quadrangle_2D.GetAlgorithm(), 'Quadrangle_2D')
 smesh.SetName(Hexa_3D.GetAlgorithm(), 'Hexa_3D')
 
 if salome.sg.hasDesktop():
 smesh.SetName(Hexa_3D.GetAlgorithm(), 'Hexa_3D')
 
 if salome.sg.hasDesktop():
-  salome.sg.updateObjBrowser(True)
+  salome.sg.updateObjBrowser()
index ce9aa6805295a5858864a99da8f4d88088d7362c..67983ac1be282720f241ad8a14846dc61d457162 100644 (file)
@@ -4,7 +4,6 @@ import sys
 import salome
 
 salome.salome_init()
 import salome
 
 salome.salome_init()
-theStudy = salome.myStudy
 
 import salome_notebook
 notebook = salome_notebook.notebook
 
 import salome_notebook
 notebook = salome_notebook.notebook
@@ -22,7 +21,7 @@ import math
 import SALOMEDS
 
 
 import SALOMEDS
 
 
-geompy = geomBuilder.New(theStudy)
+geompy = geomBuilder.New()
 O = geompy.MakeVertex(0, 0, 0)
 OX = geompy.MakeVectorDXDYDZ(1, 0, 0)
 OY = geompy.MakeVectorDXDYDZ(0, 1, 0)
 O = geompy.MakeVertex(0, 0, 0)
 OX = geompy.MakeVectorDXDYDZ(1, 0, 0)
 OY = geompy.MakeVectorDXDYDZ(0, 1, 0)
@@ -167,7 +166,7 @@ geompy.addToStudyInFather( Fissure, fondFiss, 'fondFiss' )
 import  SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
 import  SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
-smesh = smeshBuilder.New(theStudy)
+smesh = smeshBuilder.New()
 coupe_vis_1 = smesh.Mesh(coupe_vis)
 Regular_1D = coupe_vis_1.Segment()
 Nb_Segments_1 = Regular_1D.NumberOfSegments(10)
 coupe_vis_1 = smesh.Mesh(coupe_vis)
 Regular_1D = coupe_vis_1.Segment()
 Nb_Segments_1 = Regular_1D.NumberOfSegments(10)
@@ -245,4 +244,4 @@ smesh.SetName(tige_haute_2, 'tige_haute')
 
 
 if salome.sg.hasDesktop():
 
 
 if salome.sg.hasDesktop():
-  salome.sg.updateObjBrowser(True)
+  salome.sg.updateObjBrowser()
index a0b78faaa5a85ef402f98d4bf6af9e0c6dc100ee..f84c83b4bf1b03eaad9ee71f9ae3de344ede3856 100644 (file)
@@ -40,7 +40,7 @@ module SPADDERPluginTest {
   {
     void demo(in double a,in double b,out double c) raises (SALOME::SALOME_Exception);
     boolean testkernel() raises (SALOME::SALOME_Exception);
   {
     void demo(in double a,in double b,out double c) raises (SALOME::SALOME_Exception);
     boolean testkernel() raises (SALOME::SALOME_Exception);
-    boolean testsmesh(in long studyId) raises (SALOME::SALOME_Exception);
+    boolean testsmesh() raises (SALOME::SALOME_Exception);
   };
 };
 
   };
 };
 
index 10b5b94c86575930175ac602b2969033f1aaae46..220f73727c76939e4fb797cbb532f9c656b9c46e 100644 (file)
@@ -118,16 +118,15 @@ bool SPADDERPluginTester_i::testkernel()
  * This test checks the constructor of the basic classes of the SMESH
  * plugin for PADDER.
  */
  * This test checks the constructor of the basic classes of the SMESH
  * plugin for PADDER.
  */
-bool SPADDERPluginTester_i::testsmesh(CORBA::Long studyId)
+bool SPADDERPluginTester_i::testsmesh()
 {
   beginService("SPADDERPluginTester_i::testsmesh");
 
   // Resolve the SMESH engine and the SALOME study
   // _WARN_ The SMESH engine should have been loaded first
   SMESH_Gen_i* smeshGen_i = SMESH_Gen_i::GetSMESHGen();
 {
   beginService("SPADDERPluginTester_i::testsmesh");
 
   // Resolve the SMESH engine and the SALOME study
   // _WARN_ The SMESH engine should have been loaded first
   SMESH_Gen_i* smeshGen_i = SMESH_Gen_i::GetSMESHGen();
-  CORBA::Object_var anObject = smeshGen_i->GetNS()->Resolve("/myStudyManager");
-  SALOMEDS::StudyManager_var aStudyMgr = SALOMEDS::StudyManager::_narrow(anObject);
-  SALOMEDS::Study_var myStudy = aStudyMgr->GetStudyByID(studyId);
+  CORBA::Object_var anObject = smeshGen_i->GetNS()->Resolve("/Study");
+  SALOMEDS::Study_var aStudy = SALOMEDS::Study::_narrow(anObject);
 
   //
   // _MEM_ CAUTION: SMESH_Gen define a data structure for local usage
 
   //
   // _MEM_ CAUTION: SMESH_Gen define a data structure for local usage
index 9a2193d556c2669274b0a55df51daa6a1a9aed73..c6eea5ec45870646c4231f2a6e457fe7965c2016 100644 (file)
@@ -50,7 +50,7 @@ public:
   
   void demo(CORBA::Double a,CORBA::Double b,CORBA::Double& c);
   bool testkernel();
   
   void demo(CORBA::Double a,CORBA::Double b,CORBA::Double& c);
   bool testkernel();
-  bool testsmesh(CORBA::Long studyId);
+  bool testsmesh();
 
 };
 
 
 };
 
index b279695dac9d74ed980697779e9c8abccc73b1db..d4ce4adaa70fd3e72497181cd885a4a7d92b9e5e 100755 (executable)
@@ -22,7 +22,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 filename="/home/gboulant/development/projets/salome/SPADDER/spadder/resources/padderexe/REF_spheres.dat.xyz"
 file=open(filename,'rb')
 
 filename="/home/gboulant/development/projets/salome/SPADDER/spadder/resources/padderexe/REF_spheres.dat.xyz"
 file=open(filename,'rb')
index 2ca9f8fc9a3c0319778dbcccff7af8b3622fe027..6824a94485b7ef035bc7a5e919e510127fa2c2c3 100644 (file)
@@ -178,7 +178,7 @@ class InputDialog(GenericDialog):
             self.__selectedMesh = None
             return
 
             self.__selectedMesh = None
             return
 
-        self.smeshStudyTool.updateStudy(studyedit.getActiveStudyId())
+        self.smeshStudyTool.updateStudy()
         self.__selectedMesh = self.smeshStudyTool.getMeshObjectFromSObject(mySObject)
         if CORBA.is_nil(self.__selectedMesh):
             self.__ui.txtSmeshObject.setText("The selected object is not a mesh")
         self.__selectedMesh = self.smeshStudyTool.getMeshObjectFromSObject(mySObject)
         if CORBA.is_nil(self.__selectedMesh):
             self.__ui.txtSmeshObject.setText("The selected object is not a mesh")
index 4fec4e8d375a091325aa6d7f703ee01b3c5216b8..fff90b9fb9c986539c1785b6668c57090591188c 100644 (file)
@@ -38,7 +38,7 @@ from salome.kernel.uiexception import AdminException
 from omniORB import CORBA
 import SMESH
 from salome.smesh import smeshBuilder
 from omniORB import CORBA
 import SMESH
 from salome.smesh import smeshBuilder
-smesh = smeshBuilder.New(salome.myStudy)
+smesh = smeshBuilder.New()
 import MESHJOB
 
 gui_states = ["CAN_SELECT", "CAN_COMPUTE", "CAN_REFRESH", "CAN_PUBLISH"]
 import MESHJOB
 
 gui_states = ["CAN_SELECT", "CAN_COMPUTE", "CAN_REFRESH", "CAN_PUBLISH"]
@@ -368,7 +368,7 @@ class PluginDialog(QDialog):
         medfilename = os.path.join(meshJobResults.results_dirname,
                                    meshJobResults.outputmesh_filename)
 
         medfilename = os.path.join(meshJobResults.results_dirname,
                                    meshJobResults.outputmesh_filename)
 
-        smesh.SetCurrentStudy(studyedit.getActiveStudy())
+        smesh.UpdateStudy()
         ([outputMesh], status) = smesh.CreateMeshesFromMED(medfilename)
 
         # By convention, the name of the output mesh in the study is
         ([outputMesh], status) = smesh.CreateMeshesFromMED(medfilename)
 
         # By convention, the name of the output mesh in the study is
@@ -376,7 +376,7 @@ class PluginDialog(QDialog):
         meshname = 'padder_'+str(self.__jobid)
         smesh.SetName(outputMesh.GetMesh(), meshname)
         if salome.sg.hasDesktop():
         meshname = 'padder_'+str(self.__jobid)
         smesh.SetName(outputMesh.GetMesh(), meshname)
         if salome.sg.hasDesktop():
-            salome.sg.updateObjBrowser(False)
+            salome.sg.updateObjBrowser()
 
         self.__ui.lblStatusBar.setText("Publication OK")
         self.__setGuiState(["CAN_SELECT"])
 
         self.__ui.lblStatusBar.setText("Publication OK")
         self.__setGuiState(["CAN_SELECT"])
index 65566eb4eb461ad04ff69e79980abbd7e19ae68a..511c5d1f5bb2315b385252b953d723f6539924b5 100644 (file)
@@ -47,6 +47,6 @@ c.testkernel()
 print "Test of usage of SMESH engine from the test component"
 import SMESH
 salome.lcc.FindOrLoadComponent("FactoryServer","SMESH")
 print "Test of usage of SMESH engine from the test component"
 import SMESH
 salome.lcc.FindOrLoadComponent("FactoryServer","SMESH")
-c.testsmesh(salome.myStudyId)
+c.testsmesh()
 
 print "Test completed : OK"
 
 print "Test completed : OK"