Salome HOME
Merge V9_dev branch into master
authorrnv <rnv@opencascade.com>
Wed, 6 Jun 2018 11:48:41 +0000 (14:48 +0300)
committerrnv <rnv@opencascade.com>
Thu, 14 Jun 2018 11:40:29 +0000 (14:40 +0300)
431 files changed:
bin/geom_setenv.py
doc/salome/examples/3dsketcher.py
doc/salome/examples/GEOM_Field.py
doc/salome/examples/GEOM_box.py
doc/salome/examples/advanced_geom_objs_ex01.py
doc/salome/examples/advanced_geom_objs_ex02.py
doc/salome/examples/advanced_geom_objs_ex03.py
doc/salome/examples/advanced_geom_objs_smoothingsurface.py
doc/salome/examples/angle.py
doc/salome/examples/arranging_study_objects.py
doc/salome/examples/basic_geom_objs_ex01.py
doc/salome/examples/basic_geom_objs_ex02.py
doc/salome/examples/basic_geom_objs_ex03.py
doc/salome/examples/basic_geom_objs_ex04.py
doc/salome/examples/basic_geom_objs_ex05.py
doc/salome/examples/basic_geom_objs_ex06.py
doc/salome/examples/basic_geom_objs_ex07.py
doc/salome/examples/basic_geom_objs_ex08.py
doc/salome/examples/basic_geom_objs_ex09.py
doc/salome/examples/basic_geom_objs_ex10.py
doc/salome/examples/basic_operations_ex01.py
doc/salome/examples/basic_operations_ex02.py
doc/salome/examples/basic_operations_ex03.py
doc/salome/examples/basic_operations_ex04.py
doc/salome/examples/basic_properties.py
doc/salome/examples/blocks_operations_ex01.py
doc/salome/examples/blocks_operations_ex02.py
doc/salome/examples/blocks_operations_ex03.py
doc/salome/examples/boolean_operations_ex01.py
doc/salome/examples/boolean_operations_ex02.py
doc/salome/examples/boolean_operations_ex03.py
doc/salome/examples/boolean_operations_ex04.py
doc/salome/examples/bounding_box.py
doc/salome/examples/building_by_blocks_ex01.py
doc/salome/examples/building_by_blocks_ex02.py
doc/salome/examples/center_of_mass.py
doc/salome/examples/check_compound_of_blocks.py
doc/salome/examples/check_self_intersections.py
doc/salome/examples/check_self_intersections_fast.py
doc/salome/examples/check_shape.py
doc/salome/examples/complex_objs_ex01.py
doc/salome/examples/complex_objs_ex02.py
doc/salome/examples/complex_objs_ex03.py
doc/salome/examples/complex_objs_ex04.py
doc/salome/examples/complex_objs_ex05.py
doc/salome/examples/complex_objs_ex06.py
doc/salome/examples/complex_objs_ex07.py
doc/salome/examples/complex_objs_ex08.py
doc/salome/examples/complex_objs_ex09.py
doc/salome/examples/complex_objs_ex10.py
doc/salome/examples/complex_objs_ex11.py
doc/salome/examples/fast_intersection.py
doc/salome/examples/free_boundaries.py
doc/salome/examples/free_faces.py
doc/salome/examples/get_non_blocks.py
doc/salome/examples/import_export.py
doc/salome/examples/inertia.py
doc/salome/examples/min_distance.py
doc/salome/examples/normal_face.py
doc/salome/examples/notebook_geom.py
doc/salome/examples/point_coordinates.py
doc/salome/examples/polyline.py
doc/salome/examples/primitives_ex01.py
doc/salome/examples/primitives_ex02.py
doc/salome/examples/primitives_ex03.py
doc/salome/examples/primitives_ex04.py
doc/salome/examples/primitives_ex05.py
doc/salome/examples/primitives_ex06.py
doc/salome/examples/primitives_ex07.py
doc/salome/examples/repairing_operations_ex01.py
doc/salome/examples/repairing_operations_ex02.py
doc/salome/examples/repairing_operations_ex03.py
doc/salome/examples/repairing_operations_ex04.py
doc/salome/examples/repairing_operations_ex05.py
doc/salome/examples/repairing_operations_ex06.py
doc/salome/examples/repairing_operations_ex07.py
doc/salome/examples/repairing_operations_ex08.py
doc/salome/examples/repairing_operations_ex09.py
doc/salome/examples/repairing_operations_ex10.py
doc/salome/examples/repairing_operations_ex11.py
doc/salome/examples/repairing_operations_ex12.py
doc/salome/examples/sketcher.py
doc/salome/examples/testme.py
doc/salome/examples/tolerance.py
doc/salome/examples/topological_geom_objs_ex01.py
doc/salome/examples/topological_geom_objs_ex02.py
doc/salome/examples/topological_geom_objs_ex03.py
doc/salome/examples/topological_geom_objs_ex04.py
doc/salome/examples/topological_geom_objs_ex05.py
doc/salome/examples/topological_geom_objs_ex06.py
doc/salome/examples/topological_geom_objs_ex07.py
doc/salome/examples/transformation_operations_ex01.py
doc/salome/examples/transformation_operations_ex02.py
doc/salome/examples/transformation_operations_ex03.py
doc/salome/examples/transformation_operations_ex04.py
doc/salome/examples/transformation_operations_ex05.py
doc/salome/examples/transformation_operations_ex06.py
doc/salome/examples/transformation_operations_ex07.py
doc/salome/examples/transformation_operations_ex08.py
doc/salome/examples/transformation_operations_ex09.py
doc/salome/examples/transformation_operations_ex10.py
doc/salome/examples/transformation_operations_ex11.py
doc/salome/examples/transformation_operations_ex12.py
doc/salome/examples/transformation_operations_ex13.py
doc/salome/examples/transformation_operations_ex14.py
doc/salome/examples/viewing_geom_objs_ex01.py
doc/salome/examples/viewing_geom_objs_ex02.py
doc/salome/examples/viewing_geom_objs_ex03.py
doc/salome/examples/viewing_geom_objs_ex04.py
doc/salome/examples/whatis.py
doc/salome/examples/working_with_groups_ex01.py
doc/salome/examples/working_with_groups_ex02.py
doc/salome/examples/working_with_groups_ex03.py
doc/salome/examples/working_with_groups_ex04.py
doc/salome/examples/working_with_groups_ex05.py
doc/salome/examples/working_with_groups_ex06.py
doc/salome/gui/GEOM/collect_geom_methods.py
doc/salome/gui/GEOM/input/geometrical_object_properties.doc
doc/salome/gui/GEOM/input/geompy_migration.doc
doc/salome/gui/GEOM/input/tui_execution_distribution.doc
doc/salome/gui/GEOM/input/tui_importexport_geom_objs.doc
idl/GEOM_Gen.idl
idl/GEOM_Superv.idl
resources/GEOMCatalog.xml.in
src/AdvancedEngine/AdvancedEngine_IOperations.cxx
src/AdvancedEngine/AdvancedEngine_IOperations.hxx
src/AdvancedEngine/AdvancedEngine_OperationsCreator.cxx
src/AdvancedEngine/AdvancedEngine_OperationsCreator.hxx
src/AdvancedGUI/AdvancedGUI_DividedCylinderDlg.cxx
src/AdvancedGUI/AdvancedGUI_DividedDiskDlg.cxx
src/AdvancedGUI/AdvancedGUI_PipeTShapeDlg.cxx
src/AdvancedGUI/AdvancedGUI_PipeTShapeDlg.h
src/AdvancedGUI/AdvancedGUI_SmoothingSurfaceDlg.cxx
src/BREPPlugin/BREPPlugin_GUI.cxx
src/BREPPlugin/BREPPlugin_IECallBack.cxx
src/BREPPlugin/BREPPlugin_IECallBack.hxx
src/BREPPlugin/BREPPlugin_IOperations.cxx
src/BREPPlugin/BREPPlugin_IOperations.hxx
src/BREPPlugin/BREPPlugin_OperationsCreator.cxx
src/BREPPlugin/BREPPlugin_OperationsCreator.hxx
src/BasicGUI/BasicGUI_ArcDlg.cxx
src/BasicGUI/BasicGUI_CircleDlg.cxx
src/BasicGUI/BasicGUI_CurveDlg.cxx
src/BasicGUI/BasicGUI_EllipseDlg.cxx
src/BasicGUI/BasicGUI_LineDlg.cxx
src/BasicGUI/BasicGUI_MarkerDlg.cxx
src/BasicGUI/BasicGUI_PlaneDlg.cxx
src/BasicGUI/BasicGUI_PointDlg.cxx
src/BasicGUI/BasicGUI_VectorDlg.cxx
src/BasicGUI/BasicGUI_WorkingPlaneDlg.cxx
src/BlocksGUI/BlocksGUI_BlockDlg.cxx
src/BlocksGUI/BlocksGUI_ExplodeDlg.cxx
src/BlocksGUI/BlocksGUI_PropagateDlg.cxx
src/BlocksGUI/BlocksGUI_QuadFaceDlg.cxx
src/BlocksGUI/BlocksGUI_TrsfDlg.cxx
src/BooleanGUI/BooleanGUI_Dialog.cxx
src/BooleanGUI/BooleanGUI_Dialog.h
src/BuildGUI/BuildGUI_CompoundDlg.cxx
src/BuildGUI/BuildGUI_CompoundDlg.h
src/BuildGUI/BuildGUI_EdgeDlg.cxx
src/BuildGUI/BuildGUI_FaceDlg.cxx
src/BuildGUI/BuildGUI_ShellDlg.cxx
src/BuildGUI/BuildGUI_SolidDlg.cxx
src/BuildGUI/BuildGUI_WireDlg.cxx
src/DependencyTree/DependencyTree_Object.cxx
src/DependencyTree/DependencyTree_Selector.cxx
src/DependencyTree/DependencyTree_View.cxx
src/DependencyTree/DependencyTree_View.h
src/DependencyTree/DependencyTree_ViewModel.cxx
src/DisplayGUI/DisplayGUI.cxx
src/EntityGUI/EntityGUI_3DSketcherDlg.cxx
src/EntityGUI/EntityGUI_FeatureDetectorDlg.cxx
src/EntityGUI/EntityGUI_FieldDlg.cxx
src/EntityGUI/EntityGUI_IsolineDlg.cxx
src/EntityGUI/EntityGUI_PictureImportDlg.cxx
src/EntityGUI/EntityGUI_PolylineDlg.cxx
src/EntityGUI/EntityGUI_SketcherDlg.cxx
src/EntityGUI/EntityGUI_SubShapeDlg.cxx
src/EntityGUI/EntityGUI_SurfFromFaceDlg.cxx
src/GEOM/GEOM_BaseDriver.cxx
src/GEOM/GEOM_BaseDriver.hxx
src/GEOM/GEOM_BaseObject.cxx
src/GEOM/GEOM_BaseObject.hxx
src/GEOM/GEOM_Engine.cxx
src/GEOM/GEOM_Engine.hxx
src/GEOM/GEOM_Field.cxx
src/GEOM/GEOM_IOperations.cxx
src/GEOM/GEOM_IOperations.hxx
src/GEOM/GEOM_Solver.cxx
src/GEOM/GEOM_Solver.hxx
src/GEOMBase/GEOMBase.cxx
src/GEOMBase/GEOMBase_Helper.cxx
src/GEOMBase/GEOMBase_Helper.h
src/GEOMBase/GEOMBase_Skeleton.cxx
src/GEOMGUI/GEOMGUI_DimensionProperty.cxx
src/GEOMGUI/GEOMGUI_DimensionProperty.h
src/GEOMGUI/GEOMGUI_Selection.cxx
src/GEOMGUI/GEOMGUI_TextTreeWdg.cxx
src/GEOMGUI/GEOM_Displayer.cxx
src/GEOMGUI/GEOM_Displayer.h
src/GEOMGUI/GeometryGUI.cxx
src/GEOMGUI/GeometryGUI.h
src/GEOMImpl/GEOMImpl_ExportDriver.cxx
src/GEOMImpl/GEOMImpl_Gen.cxx
src/GEOMImpl/GEOMImpl_Gen.hxx
src/GEOMImpl/GEOMImpl_I3DPrimOperations.cxx
src/GEOMImpl/GEOMImpl_I3DPrimOperations.hxx
src/GEOMImpl/GEOMImpl_IBaseIEOperations.cxx
src/GEOMImpl/GEOMImpl_IBaseIEOperations.hxx
src/GEOMImpl/GEOMImpl_IBasicOperations.cxx
src/GEOMImpl/GEOMImpl_IBasicOperations.hxx
src/GEOMImpl/GEOMImpl_IBlocksOperations.cxx
src/GEOMImpl/GEOMImpl_IBlocksOperations.hxx
src/GEOMImpl/GEOMImpl_IBooleanOperations.cxx
src/GEOMImpl/GEOMImpl_IBooleanOperations.hxx
src/GEOMImpl/GEOMImpl_ICurvesOperations.cxx
src/GEOMImpl/GEOMImpl_ICurvesOperations.hxx
src/GEOMImpl/GEOMImpl_IECallBack.cxx
src/GEOMImpl/GEOMImpl_IECallBack.hxx
src/GEOMImpl/GEOMImpl_IFieldOperations.cxx
src/GEOMImpl/GEOMImpl_IFieldOperations.hxx
src/GEOMImpl/GEOMImpl_IGroupOperations.cxx
src/GEOMImpl/GEOMImpl_IGroupOperations.hxx
src/GEOMImpl/GEOMImpl_IHealingOperations.cxx
src/GEOMImpl/GEOMImpl_IHealingOperations.hxx
src/GEOMImpl/GEOMImpl_IInsertOperations.cxx
src/GEOMImpl/GEOMImpl_IInsertOperations.hxx
src/GEOMImpl/GEOMImpl_ILocalOperations.cxx
src/GEOMImpl/GEOMImpl_ILocalOperations.hxx
src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx
src/GEOMImpl/GEOMImpl_IMeasureOperations.hxx
src/GEOMImpl/GEOMImpl_IShapesOperations.cxx
src/GEOMImpl/GEOMImpl_IShapesOperations.hxx
src/GEOMImpl/GEOMImpl_ITransformOperations.cxx
src/GEOMImpl/GEOMImpl_ITransformOperations.hxx
src/GEOMImpl/GEOMImpl_ImportDriver.cxx
src/GEOMToolsGUI/GEOMToolsGUI.cxx
src/GEOMToolsGUI/GEOMToolsGUI.h
src/GEOMToolsGUI/GEOMToolsGUI_1.cxx
src/GEOMToolsGUI/GEOMToolsGUI_MarkerDlg.cxx
src/GEOMToolsGUI/GEOMToolsGUI_PublishDlg.cxx
src/GEOMToolsGUI/GEOMToolsGUI_PublishDlg.h
src/GEOMToolsGUI/GEOMToolsGUI_ReduceStudyDlg.cxx
src/GEOMToolsGUI/GEOMToolsGUI_ReduceStudyDlg.h
src/GEOM_I/GEOM_BaseObject_i.cc
src/GEOM_I/GEOM_BaseObject_i.hh
src/GEOM_I/GEOM_DumpPython.cc
src/GEOM_I/GEOM_Field_i.cc
src/GEOM_I/GEOM_Gen_i.cc
src/GEOM_I/GEOM_Gen_i.hh
src/GEOM_I/GEOM_IOperations_i.cc
src/GEOM_I/GEOM_IOperations_i.hh
src/GEOM_I/GEOM_Object_i.cc
src/GEOM_I_Superv/GEOM_Superv_i.cc
src/GEOM_I_Superv/GEOM_Superv_i.hh
src/GEOM_PY/geomtools.py
src/GEOM_PY/sketcher.py
src/GEOM_PY/structelem/__init__.py
src/GEOM_PY/structelem/orientation.py
src/GEOM_PY/structelem/parts.py
src/GEOM_SWIG/AdvancedGEOMBuilder.py
src/GEOM_SWIG/BREPPluginBuilder.py
src/GEOM_SWIG/GEOM_Nut.py
src/GEOM_SWIG/GEOM_ObjectInfo.py
src/GEOM_SWIG/GEOM_Partition1.py
src/GEOM_SWIG/GEOM_Partition2.py
src/GEOM_SWIG/GEOM_Partition3.py
src/GEOM_SWIG/GEOM_Partition4.py
src/GEOM_SWIG/GEOM_Partition5.py
src/GEOM_SWIG/GEOM_Sketcher.py
src/GEOM_SWIG/GEOM_Spanner.py
src/GEOM_SWIG/GEOM_TestAll.py
src/GEOM_SWIG/GEOM_TestField.py
src/GEOM_SWIG/GEOM_TestHealing.py
src/GEOM_SWIG/GEOM_TestMeasures.py
src/GEOM_SWIG/GEOM_TestOthers.py
src/GEOM_SWIG/GEOM_blocks.py
src/GEOM_SWIG/GEOM_cyl2complementary.py
src/GEOM_SWIG/GEOM_example.py
src/GEOM_SWIG/GEOM_example2.py
src/GEOM_SWIG/GEOM_example3.py
src/GEOM_SWIG/GEOM_example4.py
src/GEOM_SWIG/GEOM_example5.py
src/GEOM_SWIG/GEOM_example6.py
src/GEOM_SWIG/GEOM_example7.py
src/GEOM_SWIG/GEOM_moteur.py
src/GEOM_SWIG/GEOM_shared_modules.py
src/GEOM_SWIG/GEOM_shellSolid.py
src/GEOM_SWIG/GEOM_tube_geom.py
src/GEOM_SWIG/GEOM_tube_geom_gg2.py
src/GEOM_SWIG/GEOM_usinggeom.py
src/GEOM_SWIG/IGESPluginBuilder.py
src/GEOM_SWIG/PAL_MESH_019_020_geometry.py
src/GEOM_SWIG/PAL_MESH_028_geometry.py
src/GEOM_SWIG/PAL_MESH_030_geometry.py
src/GEOM_SWIG/PAL_MESH_033_geometry.py
src/GEOM_SWIG/PAL_MESH_035_geometry.py
src/GEOM_SWIG/STEPPluginBuilder.py
src/GEOM_SWIG/STLPluginBuilder.py
src/GEOM_SWIG/VTKPluginBuilder.py
src/GEOM_SWIG/XAOPluginBuilder.py
src/GEOM_SWIG/geomBuilder.py
src/GEOM_SWIG/geompy.py
src/GEOM_SWIG/gsketcher.py
src/GEOM_SWIG_WITHIHM/CMakeLists.txt
src/GEOM_SWIG_WITHIHM/libGEOM_Swig.cxx
src/GenerationGUI/GenerationGUI_FillingDlg.cxx
src/GenerationGUI/GenerationGUI_PipeDlg.cxx
src/GenerationGUI/GenerationGUI_PipeDlg.h
src/GenerationGUI/GenerationGUI_PipePathDlg.cxx
src/GenerationGUI/GenerationGUI_PrismDlg.cxx
src/GenerationGUI/GenerationGUI_RevolDlg.cxx
src/GenerationGUI/GenerationGUI_ThicknessDlg.cxx
src/GroupGUI/GroupGUI_BooleanDlg.cxx
src/GroupGUI/GroupGUI_GroupDlg.cxx
src/IGESPlugin/IGESPlugin_GUI.cxx
src/IGESPlugin/IGESPlugin_IECallBack.cxx
src/IGESPlugin/IGESPlugin_IECallBack.hxx
src/IGESPlugin/IGESPlugin_IOperations.cxx
src/IGESPlugin/IGESPlugin_IOperations.hxx
src/IGESPlugin/IGESPlugin_OperationsCreator.cxx
src/IGESPlugin/IGESPlugin_OperationsCreator.hxx
src/MeasureGUI/MeasureGUI.cxx
src/MeasureGUI/MeasureGUI_AnnotationDlg.cxx
src/MeasureGUI/MeasureGUI_BndBoxDlg.cxx
src/MeasureGUI/MeasureGUI_CenterMassDlg.cxx
src/MeasureGUI/MeasureGUI_CheckCompoundOfBlocksDlg.cxx
src/MeasureGUI/MeasureGUI_CheckSelfIntersectionsDlg.cxx
src/MeasureGUI/MeasureGUI_CheckShapeDlg.cxx
src/MeasureGUI/MeasureGUI_DistanceDlg.cxx
src/MeasureGUI/MeasureGUI_FastCheckIntersectionsDlg.cxx
src/MeasureGUI/MeasureGUI_GetNonBlocksDlg.cxx
src/MeasureGUI/MeasureGUI_ManageDimensionsDlg.cxx
src/MeasureGUI/MeasureGUI_NormaleDlg.cxx
src/MeasureGUI/MeasureGUI_ShapeStatisticsDlg.cxx
src/MeasureGUI/MeasureGUI_Skeleton.cxx
src/OperationGUI/OperationGUI_ArchimedeDlg.cxx
src/OperationGUI/OperationGUI_ChamferDlg.cxx
src/OperationGUI/OperationGUI_ExtractionDlg.cxx
src/OperationGUI/OperationGUI_ExtrudedFeatureDlg.cxx
src/OperationGUI/OperationGUI_Fillet1d2dDlg.cxx
src/OperationGUI/OperationGUI_FilletDlg.cxx
src/OperationGUI/OperationGUI_GetShapesOnShapeDlg.cxx
src/OperationGUI/OperationGUI_GetSharedShapesDlg.cxx
src/OperationGUI/OperationGUI_PartitionDlg.cxx
src/OperationGUI/OperationGUI_PartitionDlg.h
src/OperationGUI/OperationGUI_TransferDataDlg.cxx
src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx
src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx
src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx
src/PrimitiveGUI/PrimitiveGUI_DiskDlg.cxx
src/PrimitiveGUI/PrimitiveGUI_FaceDlg.cxx
src/PrimitiveGUI/PrimitiveGUI_SphereDlg.cxx
src/PrimitiveGUI/PrimitiveGUI_TorusDlg.cxx
src/RepairGUI/RepairGUI_ChangeOrientationDlg.cxx
src/RepairGUI/RepairGUI_CloseContourDlg.cxx
src/RepairGUI/RepairGUI_DivideEdgeDlg.cxx
src/RepairGUI/RepairGUI_FreeBoundDlg.cxx
src/RepairGUI/RepairGUI_FreeFacesDlg.cxx
src/RepairGUI/RepairGUI_FuseEdgesDlg.cxx
src/RepairGUI/RepairGUI_GlueDlg.cxx
src/RepairGUI/RepairGUI_GlueDlg.h
src/RepairGUI/RepairGUI_InspectObjectDlg.cxx
src/RepairGUI/RepairGUI_LimitToleranceDlg.cxx
src/RepairGUI/RepairGUI_LimitToleranceDlg.h
src/RepairGUI/RepairGUI_RemoveExtraEdgesDlg.cxx
src/RepairGUI/RepairGUI_RemoveExtraEdgesDlg.h
src/RepairGUI/RepairGUI_RemoveHolesDlg.cxx
src/RepairGUI/RepairGUI_RemoveIntWiresDlg.cxx
src/RepairGUI/RepairGUI_RemoveWebsDlg.cxx
src/RepairGUI/RepairGUI_RemoveWebsDlg.h
src/RepairGUI/RepairGUI_SewingDlg.cxx
src/RepairGUI/RepairGUI_ShapeProcessDlg.cxx
src/RepairGUI/RepairGUI_SuppressFacesDlg.cxx
src/RepairGUI/RepairGUI_SuppressFacesDlg.h
src/RepairGUI/RepairGUI_UnionFacesDlg.cxx
src/RepairGUI/RepairGUI_UnionFacesDlg.h
src/STEPPlugin/STEPPlugin_GUI.cxx
src/STEPPlugin/STEPPlugin_IECallBack.cxx
src/STEPPlugin/STEPPlugin_IECallBack.hxx
src/STEPPlugin/STEPPlugin_IOperations.cxx
src/STEPPlugin/STEPPlugin_IOperations.hxx
src/STEPPlugin/STEPPlugin_OperationsCreator.cxx
src/STEPPlugin/STEPPlugin_OperationsCreator.hxx
src/STLPlugin/STLPlugin_GUI.cxx
src/STLPlugin/STLPlugin_IECallBack.cxx
src/STLPlugin/STLPlugin_IECallBack.hxx
src/STLPlugin/STLPlugin_IOperations.cxx
src/STLPlugin/STLPlugin_IOperations.hxx
src/STLPlugin/STLPlugin_OperationsCreator.cxx
src/STLPlugin/STLPlugin_OperationsCreator.hxx
src/Tools/geom_plugins.py
src/Tools/t_shape/t_shape_builder.py
src/Tools/t_shape/t_shape_dialog.py
src/Tools/t_shape/t_shape_progress.py
src/TransformationGUI/TransformationGUI.cxx
src/TransformationGUI/TransformationGUI_ExtensionDlg.cxx
src/TransformationGUI/TransformationGUI_MirrorDlg.cxx
src/TransformationGUI/TransformationGUI_MirrorDlg.h
src/TransformationGUI/TransformationGUI_MultiRotationDlg.cxx
src/TransformationGUI/TransformationGUI_MultiRotationDlg.h
src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx
src/TransformationGUI/TransformationGUI_MultiTranslationDlg.h
src/TransformationGUI/TransformationGUI_OffsetDlg.cxx
src/TransformationGUI/TransformationGUI_OffsetDlg.h
src/TransformationGUI/TransformationGUI_PositionDlg.cxx
src/TransformationGUI/TransformationGUI_PositionDlg.h
src/TransformationGUI/TransformationGUI_ProjectionDlg.cxx
src/TransformationGUI/TransformationGUI_ProjectionOnCylDlg.cxx
src/TransformationGUI/TransformationGUI_RotationDlg.cxx
src/TransformationGUI/TransformationGUI_RotationDlg.h
src/TransformationGUI/TransformationGUI_ScaleDlg.cxx
src/TransformationGUI/TransformationGUI_ScaleDlg.h
src/TransformationGUI/TransformationGUI_TranslationDlg.cxx
src/TransformationGUI/TransformationGUI_TranslationDlg.h
src/VTKPlugin/VTKPlugin_GUI.cxx
src/VTKPlugin/VTKPlugin_IECallBack.cxx
src/VTKPlugin/VTKPlugin_IECallBack.hxx
src/VTKPlugin/VTKPlugin_IOperations.cxx
src/VTKPlugin/VTKPlugin_IOperations.hxx
src/VTKPlugin/VTKPlugin_OperationsCreator.cxx
src/VTKPlugin/VTKPlugin_OperationsCreator.hxx
src/XAOPlugin/XAOPlugin_ExportDlg.cxx
src/XAOPlugin/XAOPlugin_IECallBack.cxx
src/XAOPlugin/XAOPlugin_IECallBack.hxx
src/XAOPlugin/XAOPlugin_IOperations.cxx
src/XAOPlugin/XAOPlugin_IOperations.hxx
src/XAOPlugin/XAOPlugin_ImportDlg.cxx
src/XAOPlugin/XAOPlugin_OperationsCreator.cxx
src/XAOPlugin/XAOPlugin_OperationsCreator.hxx
src/XAO_Swig/CMakeLists.txt

index 198196e6e07e97e422668b0b05209ca3a68fc667..45a90d7944ec922489bf2d2b41b516703fa492d4 100644 (file)
@@ -1,5 +1,4 @@
-#! /usr/bin/env python
-#  -*- coding: iso-8859-1 -*-
+#! /usr/bin/env python3
 # Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # This library is free software; you can redistribute it and/or
@@ -58,7 +57,7 @@ def set_env( args ):
     plugin_list.append("AdvancedGEOM")
 
     # find additional plugins
-    for env_var in os.environ.keys():
+    for env_var in os.environ:
         value = os.environ[env_var]
         if env_var[-9:] == "_ROOT_DIR" and value:
             plugin_root = value
@@ -84,7 +83,7 @@ def set_env( args ):
                         plugin_list.append(plugin)
 
                         # add paths of plugin
-                        if not os.environ.has_key("SALOME_"+plugin+"Resources"):
+                        if "SALOME_"+plugin+"Resources" not in os.environ:
                             resource_path = os.path.join(plugin_root, "share", salome_subdir, "resources", plugin.lower())
                             os.environ["SALOME_"+plugin+"Resources"] = resource_path
                             resource_path_list.append(resource_path)
index 29f88e7108e24b0ff5b8d85c4665c4b1310aeb7c..913c7d51d7f9e56546dc4b4d65b4b09151fb5069 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # Create a 3D sketcher (wire) on the given points coordinates
index 930ce1c313d84a3cf4937f77ba2da28976af729c..537e21ef2d760af40d82a01407fb4109b2ed9223 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # a box
index 7469790b3a7498b37934b73e18e3d581d1340e74..b697e6f792c5db9d1a1a2ffb618f2a5f3335b0ed 100644 (file)
@@ -5,7 +5,7 @@ salome.salome_init()
 # --- geom Python interface
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 # --- Create a box and publish it into the salome study
 Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
@@ -13,4 +13,4 @@ geompy.addToStudy( Box_1, 'Box_1' )
 
 # --- update the study object browser
 if salome.sg.hasDesktop():
-  salome.sg.updateObjBrowser(True)
+  salome.sg.updateObjBrowser()
index b2499e90618bf923ae15e3b39500ac575228deb6..fea605c3d8ea2d7e07ddd2c432b6ee8103fe2a21 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create PipeTShape object
index 442af631e3518d8d68043bdecc3c8c0730ba517f..452728a5ac21e3ad09078299749f8f90b5e58332 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create DividedDisk object
index 915ee15866f85260ea832b225a64e6981679f682..d49d5db3710220ff788b0e9cb9e20f2f6601af8c 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create DividedCylinder object
index 0ad32ced819937db49ce8f68b69a6bbeb552b7ea..a29818294f61223a1ef95f3db96aa536b79f672c 100644 (file)
@@ -1,6 +1,6 @@
 import salome, GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 # create a could of points
 points = [
index 1fd60440fff9e41fe384f6676e397fcff490248f..0c787acd6862c35fb3a6fe977e12fdd631624d50 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 import math
 
 OX  = geompy.MakeVectorDXDYDZ(10, 0,0)
@@ -13,39 +13,39 @@ OXY = geompy.MakeVectorDXDYDZ(10,10,0)
 # in one plane
 Angle = geompy.GetAngle(OX, OXY)
 
-print "\nAngle between OX and OXY = ", Angle
+print("\nAngle between OX and OXY = ", Angle)
 if math.fabs(Angle - 45.0) > 1e-05:
-    print "  Error: returned angle is", Angle, "while must be 45.0"
+    print("  Error: returned angle is", Angle, "while must be 45.0")
     pass
 
 Angle = geompy.GetAngleRadians(OX, OXY)
 
-print "\nAngle between OX and OXY in radians = ", Angle
+print("\nAngle between OX and OXY in radians = ", Angle)
 if math.fabs(Angle - math.pi/4) > 1e-05:
-    print "  Error: returned angle is", Angle, "while must be pi/4"
+    print("  Error: returned angle is", Angle, "while must be pi/4")
     pass
 
 Angle = geompy.GetAngleVectors(OX, OXY, True)
 
-print "\nAngle between vectors OX and OXY = ", Angle
+print("\nAngle between vectors OX and OXY = ", Angle)
 if math.fabs(Angle - 45.0) > 1e-05:
-    print "  Error: returned angle is", Angle, "while must be 45.0"
+    print("  Error: returned angle is", Angle, "while must be 45.0")
     pass
 
 Angle = geompy.GetAngleRadiansVectors(OX, OXY, False)
 
-print "\nBig angle between vectors OX and OXY in radians = ", Angle
+print("\nBig angle between vectors OX and OXY in radians = ", Angle)
 if math.fabs(Angle - math.pi*7./4.) > 1e-05:
-    print "  Error: returned angle is", Angle, "while must be 7*pi/4"
+    print("  Error: returned angle is", Angle, "while must be 7*pi/4")
     pass
 
 # not in one plane
 OXY_shift = geompy.MakeTranslation(OXY,10,-10,20)
 Angle = geompy.GetAngle(OX, OXY_shift)
 
-print "\nAngle between OX and OXY_shift = ", Angle
+print("\nAngle between OX and OXY_shift = ", Angle)
 if math.fabs(Angle - 45.0) > 1e-05:
-    print "  Error: returned angle is", Angle, "while must be 45.0"
+    print("  Error: returned angle is", Angle, "while must be 45.0")
     pass
 
 # not linear
index 149cff480e57dfa7a094ec64b3d73afc38b17ba7..f131d6b1c5e1095fea905a6497e0707df75c7d22 100644 (file)
@@ -5,7 +5,7 @@ salome.salome_init()
 
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 Circle_1 = geompy.MakeCircle(None, None, 100)
 Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
@@ -22,4 +22,4 @@ geompy.PutListToFolder([Box_1, Cylinder_1], Primitives)
 
 
 if salome.sg.hasDesktop():
-  salome.sg.updateObjBrowser(True)
+  salome.sg.updateObjBrowser()
index 1501633ca2d09ab4037715412022da115a4e6a21..22c5236cffe374d62dabc0e3ff8f86bdde8657ca 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create vertices
index 858548f2327766b6e864de4c7f84172171902837..3175f2ee05cb87beb5687ac4c818cf28bee7e4d4 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create vertices
index d7bdf2febe19c85e0db94f76a9e4a485e71df0a3..0e01764db75c058bc90e01f48cafdd82e3c9cfaf 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create vertices
index 51a1304d4cd6db88340285531b2d02a98e35a50e..0cef7779fa1c37d3c7db1e36705c95400354f9e1 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create vertices
index fe24424ccd2af9c52897ef836d63edddf0cb140c..ff0f80139f5d65645d343b8f68243449cf67a0b8 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create vertices
index ecaec0ed58364c8dfbfd051f724c1560636f2409..ad115fc134270d31016bb7fa48a686cd46d292c4 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create vertices and vectors
index 04673b1f4073cfacc5b08ba2b68afbe6c9c43783..1bceed5687b363eca99b81c6840e4197e8393038 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create vertices
index 707540a06e90f47ce297777d57cce92f459e60e2..5826e52d062209f53467ba4872e239e890beb3a2 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create vertices
index 91fa3ce6dfa09fbdf8ffc5d7f4e33dcf643c756f..c1afcfc7f52232472cf24fe857c422e75bf2ac40 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 import math
 import SALOMEDS
 
index f9f7f0165295c2971d7cafc8f04f274ba22383b0..2b994f8a72f47b0dfaffa5d0e003b79eee8d1a57 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 import math
 import SALOMEDS
 
index 912c8eb034c4fa2d3e6f9121e5689a1caff09b4f..b0c63593b2e587964c6e3e45e1a318d37338040a 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create a vertex and a vector
index ff102f0d5bd6a11e72a27738c1148385769476da..a9a76e8837a211009ff61198bb8cfe2761466302 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create a vertex and a vector
index 5fa0e9e0ad94545c2dbafbfae219b69e4e00c8ae..2f7c4e3507e5e0584da3923b042eb2e75c989d65 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 import SALOMEDS
 
 # create a box and a cylinder
index 287ce39caf48aec4ee2cd7c2b63f195a7c3f122a..61d8e2454e4ef3e0bd9af93611dd487ece8ce2db 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 import SALOMEDS
 
 # create a box and partigion it by two planes
index ce6e45a9c1c3dfaf830c4a598b5f3359d2daef51..b00a2d6a62b11e9cf342339904c0bdefc8028b84 100644 (file)
@@ -4,21 +4,21 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 import math
 
 # create a box
 box = geompy.MakeBoxDXDYDZ(100,30,100)
 props = geompy.BasicProperties(box)
-print "\nBox 100x30x100 Basic Properties:"
-print " Wires length: ", props[0]
-print " Surface area: ", props[1]
-print " Volume      : ", props[2]
+print("\nBox 100x30x100 Basic Properties:")
+print(" Wires length: ", props[0])
+print(" Surface area: ", props[1])
+print(" Volume      : ", props[2])
 length = math.sqrt((props[0] - 1840)*(props[0] - 1840))
 area = math.sqrt((props[1] - 32000)*(props[1] - 32000))
 volume = math.sqrt((props[2] - 300000)*(props[2] - 300000))
 if length > 1e-7 or area > 1e-7 or volume > 1e-7:
-    print "While must be:"
-    print " Wires length: ", 1840
-    print " Surface area: ", 32000
-    print " Volume      : ", 300000.
+    print("While must be:")
+    print(" Wires length: ", 1840)
+    print(" Surface area: ", 32000)
+    print(" Volume      : ", 300000.)
index d8040637c4466ef64f2175076e985255cdb5828a..46264a62fdd3f08b3f529b5696cabd2d326567d5 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create vertices
index 03deab0a68237348b6b724be35f8705f57a0ea9a..41f0c1f44bcb4d5c70ebca9f1327313dd8ab3b2d 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create a box and a sphere
index 384c4e1aeb26fe2b5b5d3304af3d6bcb1e65c930..e74bb5af153f5d352870df207c11c114d7344948 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 # create a box
 check_box = geompy.MakeBoxDXDYDZ(200, 200, 200)
@@ -16,8 +16,8 @@ listChains = geompy.Propagate(check_box)
 geompy.addToStudy(check_box, "Box")
 ii = 1
 for chain in listChains:
-    geompy.addToStudyInFather(check_box, chain, "propagation chain " + `ii`)
+    geompy.addToStudyInFather(check_box, chain, "propagation chain " + repr(ii))
     ii = ii + 1
     pass
 
-salome.sg.updateObjBrowser(True
+salome.sg.updateObjBrowser() 
index 7c365d7eb6980c5cd8f7ca4e90292e3672f8fa54..2557639e011058a26c968ea95aed5cc9d2ea83b8 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create a vertex and a vector
index 212e313d479b59008c8c268418095d3b5711e18d..58d5bb6f2ccd98f602fe8a82c1568fc3faa33308 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create a vertex and a vector
index fdb7545f1e2a2b113409d88869b8f563216a8602..d0a80b3882ccdd35620d3d6f62434f159c32faa2 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create a vertex and a vector
index a7da6a9af157f6aca0098177b7687b18de1606b5..e5bbb1c50417f63951f87a647c4595f8c56ecd0e 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create a vertex and a vector
index ed8736b98fa2fde1b275d2c9e88819c01a4e9b79..337c62e561973de95a4c573aeba600021361aefc 100644 (file)
@@ -4,16 +4,16 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 # create a box
 box = geompy.MakeBoxDXDYDZ(100,30,100)
 
 bb = geompy.BoundingBox(box)
-print "\nBounding Box of box 100x30x100:"
-print " Xmin = ", bb[0], ", Xmax = ", bb[1]
-print " Ymin = ", bb[2], ", Ymax = ", bb[3]
-print " Zmin = ", bb[4], ", Zmax = ", bb[5]
+print("\nBounding Box of box 100x30x100:")
+print(" Xmin = ", bb[0], ", Xmax = ", bb[1])
+print(" Ymin = ", bb[2], ", Ymax = ", bb[3])
+print(" Zmin = ", bb[4], ", Zmax = ", bb[5])
 
 aBB = geompy.MakeBoundingBox(box)
 
index fe93e7c4c3e8067e7fd48f9d3d80bde78876c509..b7f32c3232835c911a1ea537782d98f32dd4523b 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create vertices
index 8d40beec5a85c3b85bd553b6c16fa674320a5768..724381b72f0e8e510c6f2e33d6e76eecab440177 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create vertices
index 9e570f3180ee3a8a0d1e741641a34a17205b02a0..bec926a82ebdb02923abaee41249e0da92bcd1e0 100644 (file)
@@ -4,20 +4,20 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 import math
 
 # create a box
 box = geompy.MakeBoxDXDYDZ(100,30,100)
 cm = geompy.MakeCDG(box)
 if cm is None:
-    raise RuntimeError, "MakeCDG(box) failed"
+    raise RuntimeError("MakeCDG(box) failed")
 else:
-    print "\nCentre of gravity of box has been successfully obtained:"
+    print("\nCentre of gravity of box has been successfully obtained:")
     coords = geompy.PointCoordinates(cm)
-    print "(", coords[0], ", ", coords[1], ", ", coords[2], ")"
+    print("(", coords[0], ", ", coords[1], ", ", coords[2], ")")
     dx = math.sqrt((coords[0] - 50)*(coords[0] - 50))
     dy = math.sqrt((coords[1] - 15)*(coords[1] - 15))
     dz = math.sqrt((coords[2] - 50)*(coords[2] - 50))
     if dx > 1e-7 or dy > 1e-7 or dz > 1e-7:
-        print "But must be (50, 15, 50)"
+        print("But must be (50, 15, 50)")
index 26f7c3012ae79064cb71317eb73e981612ecf07e..c2a9a04d6b84143a8aabbb94b1fc269f77570831 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create boxes
@@ -19,6 +19,6 @@ tolerance = 1e-5
 glue = geompy.MakeGlueFaces(compound, tolerance)
 IsValid = geompy.CheckCompoundOfBlocks(glue)
 if IsValid == 0:
-    raise RuntimeError, "Invalid compound created"
+    raise RuntimeError("Invalid compound created")
 else:
-    print "\nCompound is valid"
+    print("\nCompound is valid")
index f70a545408742406726db20a2cda0181fba96cc9..c8aefd38359b2d9bf140e96a2073960d07f5d3e0 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 # create a box
 box = geompy.MakeBoxDXDYDZ(100,100,100)
@@ -16,6 +16,6 @@ compound = geompy.MakeCompound([box, cylinder])
 # check self-intersection
 IsValid = geompy.CheckSelfIntersections(compound)
 if not IsValid:
-    print "Shape is self-intersected!"
+    print("Shape is self-intersected!")
 else:
-    print "No self-intersection detected in a shape"
+    print("No self-intersection detected in a shape")
index 83c8a741e5673cd5bd3271802b12c0e034aadb84..5d72d91bdcbc8af83e9904a7c4695d03584b453b 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 # create a box
 box = geompy.MakeBoxDXDYDZ(100,100,100)
@@ -16,6 +16,6 @@ compound = geompy.MakeCompound([box, cylinder])
 # check self-intersection
 IsValid = geompy.CheckSelfIntersectionsFast(compound)
 if not IsValid:
-    print "Shape is self-intersected!"
+    print("Shape is self-intersected!")
 else:
-    print "No self-intersection detected in a shape"
+    print("No self-intersection detected in a shape")
index f10f31c8a44f91e9e6e4bfcf958c364202174a79..da0a107b01314fb9ef964c27392364fc02ae4296 100644 (file)
@@ -4,13 +4,13 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 # create a box
 box = geompy.MakeBoxDXDYDZ(100,30,100)
 (IsValid, err) = geompy.CheckShape(box, 0, 2)
 if IsValid == 0:
     geompy.PrintShapeErrors(box, err)
-    raise RuntimeError, "Invalid box created"
+    raise RuntimeError("Invalid box created")
 else:
-    print "\nBox is valid"
+    print("\nBox is valid")
index 5a04f3a76b4ab29838cd42aeccbdc03a942dec96..1eb8c4f80076efb8abd331369da08d7da67e444f 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create a vertex and a vector
index ec9f8572919f7d8c999223f7c62ed2778f7bc4fb..046ddbb18a870bfbda5f6b4b6983052e4925c390 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create a vertex and a vector
index 0c56c81e8bb5c352c312ce992393653e1462c1c5..5edd9725e83487ef9eb52390097a9832f1b180a2 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 mindeg = 2
index 4bff05d17c5a2f3b53da8fbe8edc43bb91929a14..de7e29421b7e66d67308788856dcd3742cd0ceae 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create vertices
index f6681b587c798827bfd27ca6722e22db4fba2c3c..c1017173ec9572d5e1eb274c36582f33f4f43ca5 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 Wire_1 = geompy.MakeSketcher("Sketcher:F 0 0:TT 100 0:R 0:C 100 90:T 0 200", [0, 0, 0, 0, 0, 1, 1, 0, -0])
index caa68c4c04808edbb6c36850bdbea86266840568..019b13a44ed0ed462ce09e586ae72744a7a8dabd 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 import math
 gg = salome.ImportComponentGUI("GEOM")
 
index b3b5b8551cfa9e6772e5efcf4bdf55905e65e963..f1f3a76925c07a91fa7e3f964deb493e1150b4ba 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 import salome
 gg = salome.ImportComponentGUI("GEOM")
 
index bb4cac595aa01ea202b6b8565d4922facc75eeae..17536dbfa51909bd2fcc114aa261abb723655534 100644 (file)
@@ -3,7 +3,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 def MakeHelix(radius, height, rotation, direction):
     #  - create a helix -
index 9615ad1ef7659276eb3f788120f5d40b2b1924bf..6c6c3d868cdcf21f6e2e488fee79586f4375b688 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 # Create a box
 Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
index b5128150594c7444354e4472faa21b6301a177f2..ad5c8c8e9950655b7c90c14bc420f06210ae7de0 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 # Create Vertexes for curve
 Vertex_1 = geompy.MakeVertex(0, 0, 0)
index 63242331ac3537eefaa9e5df7a43de53f008585e..6f5295a183da84c2eeb3372f86944b97d47ef682 100755 (executable)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create box
index 4854a579ff98bde56c365961791a642772dc21e3..407c993d519e1fd6665c5d74d6f4867d200cca75 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 # create a box
 box = geompy.MakeBoxDXDYDZ(100,100,100)
@@ -13,10 +13,10 @@ cylinder = geompy.MakeCylinderRH(100, 300)
 
 isOk, res1, res2 = geompy.FastIntersect(box, cylinder)
 if isOk == 0:
-    raise RuntimeError, "No intersection!"
+    raise RuntimeError("No intersection!")
 else:
-    print "\nTwo lists of indexes of sub-shapes localize the intersection:"
-    print res1, res2
+    print("\nTwo lists of indexes of sub-shapes localize the intersection:")
+    print(res1, res2)
 
 # create two boxes with gap
 Ver1 = geompy.MakeVertex(0, 0, 0)
@@ -28,7 +28,7 @@ box2 = geompy.MakeBoxTwoPnt(Ver3, Ver4)
 
 isOk1, aRes1, aRes2 = geompy.FastIntersect(box1, box2, 1.)
 if isOk1 == 0:
-    raise RuntimeError, "No gaps!"
+    raise RuntimeError("No gaps!")
 else:
-    print "\nTwo lists of indexes of sub-shapes localize the gap:"
-    print aRes1, aRes2
+    print("\nTwo lists of indexes of sub-shapes localize the gap:")
+    print(aRes1, aRes2)
index 361739a91ab126274def583f7cb9f10ac250449c..1ae412a8e23dbd747e0a045b7e0641046bc87ea9 100644 (file)
@@ -3,7 +3,7 @@
 import salome
 salome.salome_init()
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 # create a shape
 box1 = geompy.MakeBox(0,   0,   0, 100, 100, 100)
@@ -19,17 +19,17 @@ for fi in range(len(faces)):
     fid = geompy.addToStudyInFather(cut, faces[fi], "Face %d" % (fi+1))
     isSuccess, closedWires, openWires = geompy.GetFreeBoundary(faces[fi])
     if isSuccess:
-        print "Check free boundaries in face %d: OK" % (fi+1)
-        print "-- Nb of closed boundaries = %d" % len(closedWires)
+        print("Check free boundaries in face %d: OK" % (fi+1))
+        print("-- Nb of closed boundaries = %d" % len(closedWires))
         for wi in range(len(closedWires)):
             wid = geompy.addToStudyInFather(faces[fi], closedWires[wi], "Closed wire %d" % (wi+1))
             pass
-        print "-- Nb of open boundaries = %d" % len(openWires)
+        print("-- Nb of open boundaries = %d" % len(openWires))
         for wi in range(len(openWires)):
             wid = geompy.addToStudyInFather(faces[fi], openWires[wi], "Open wire %d" % (wi+1))
             pass
         pass
     else:
-        print "Check free boundaries in face %d: KO" % (fi+1)
+        print("Check free boundaries in face %d: KO" % (fi+1))
         pass
     pass
index 2d1de5a007a919515c7a6274c83c341566d82fe5..c1d79c96416d0300a5c1076045af72bfdefbc960 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create a vertex and a vector
@@ -31,7 +31,7 @@ cut_without_f_2 = geompy.SuppressFaces(cut, [f_2])
 
 # suppress the specified wire
 result = geompy.GetFreeFacesIDs(cut_without_f_2)
-print "A number of free faces is ", len(result)
+print("A number of free faces is ", len(result))
 
 # add objects in the study
 all_faces = geompy.SubShapeAllSortedCentres(cut_without_f_2, geompy.ShapeType["FACE"])
index 87bf934a6b5dbca8f7aa1f5009b5accc569d5832..6886506fe518643047f0bc2ebe085f34b7139c71 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 # create solids
 box = geompy.MakeBoxDXDYDZ(100, 100, 100)
index e7ed69c374507f7a113dbf58cc1abe5c24a52e51..18db876093d87ee79c054a2a78ce783adcd17ac3 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import tempfile, os
 
index a63608c12623a27533b2481663d9be0cc45c6a0c..e237fc5c76b57931b2267d64cca779d9a0e42bfe 100644 (file)
@@ -4,14 +4,14 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 # create a box
 box = geompy.MakeBoxDXDYDZ(100,30,100)
 In = geompy.Inertia(box)
-print "\nInertia matrix of box 100x30x100:"
-print " (", In[0], ", ", In[1], ", ", In[2], ")"
-print " (", In[3], ", ", In[4], ", ", In[5], ")"
-print " (", In[6], ", ", In[7], ", ", In[8], ")"
-print "Main moments of inertia of box 100x30x100:"
-print " Ix = ", In[9], ", Iy = ", In[10], ", Iz = ", In[11]
+print("\nInertia matrix of box 100x30x100:")
+print(" (", In[0], ", ", In[1], ", ", In[2], ")")
+print(" (", In[3], ", ", In[4], ", ", In[5], ")")
+print(" (", In[6], ", ", In[7], ", ", In[8], ")")
+print("Main moments of inertia of box 100x30x100:")
+print(" Ix = ", In[9], ", Iy = ", In[10], ", Iz = ", In[11])
index e48804b308cc6f10700772995bd2978764ab2fd6..f6229cadaa77e682f058d0f203e59bf43e7757ce 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 # Create two curves with three closest points
 Vertex_1 = geompy.MakeVertex(0, 0, 0)
@@ -46,8 +46,8 @@ for i in range(nbSols):
   geompy.addToStudy(v2, 'MinDist_%d_Curve_b'%(i+1))
 
 # Get minimum distance
-print "Minimal distance between Curve_a and Curve_b is", geompy.MinDistance(Curve_a, Curve_b)
+print("Minimal distance between Curve_a and Curve_b is", geompy.MinDistance(Curve_a, Curve_b))
 
 # Get minimum distance with components along axes
 [aDist, DX, DY, DZ] = geompy.MinDistanceComponents(Curve_a, Curve_b)
-print "Minimal distance between Curve_a and Curve_b is (", DX, ",", DY, ",", DZ, ")"
+print("Minimal distance between Curve_a and Curve_b is (", DX, ",", DY, ",", DZ, ")")
index 91eac0b5a3876befb0be8cf8942d592f2ba51043..2b6e34e024a1023dd4f7be65ce56a36819018025 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 import math
 
 # create a box
@@ -14,8 +14,8 @@ faces = geompy.SubShapeAllSortedCentres(box, geompy.ShapeType["FACE"])
 face0 = faces[0]
 vnorm = geompy.GetNormal(face0)
 if vnorm is None:
-  raise RuntimeError, "GetNormal(face0) failed"
+  raise RuntimeError("GetNormal(face0) failed")
 else:
   geompy.addToStudy(face0, "Face0")
   geompy.addToStudy(vnorm, "Normale to Face0")
-  print "\nNormale of face has been successfully obtained"
+  print("\nNormale of face has been successfully obtained")
index 5b52d9f2c3b0c78d597c78227b61ad9a6fee3e37..5143579839112d1f4e54fff9cac4d407db3be0f4 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 import salome_notebook
 gg = salome.ImportComponentGUI("GEOM")
 
index e31569b69e96b12f96524b30d99d0e89356f1ab1..08f3ed133731dca46885a49f71d7d73c1ec91792 100644 (file)
@@ -5,7 +5,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 # create a point
 point = geompy.MakeVertex(15., 23., 80.)
@@ -18,8 +18,8 @@ tolerance = 1.e-07
 def IsEqual(val1, val2): return (math.fabs(val1 - val2) < tolerance)
 
 if IsEqual(coords[0], 15.) and IsEqual(coords[1], 23.) and IsEqual(coords[2], 80.):
-    print "All values are OK."
+    print("All values are OK.")
 else :
-    print "Coordinates of point must be (15, 23, 80), but returned (",
-    print coords[0], ", ", coords[1], ", ", coords[2], ")"
+    print("Coordinates of point must be (15, 23, 80), but returned (", end=' ')
+    print(coords[0], ", ", coords[1], ", ", coords[2], ")")
     pass
index 8b79256075139b9c2c17da641f5c7e31a293b81a..eae5272b5d0c42caa0b75294f9e0c2cad0ee72e5 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create vertices
index 41590a5443fb3f7c947f536ce88bbb741c3642d8..d13fa571f6a527b16323beaad57b8364fe57b12d 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create vertices
index 82cf5e4490459ffc5c6b81230eb00143b44ecc49..6136ddbdf696eacc594e6a16955d34599b8a016f 100644 (file)
@@ -6,7 +6,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 gg = salome.ImportComponentGUI("GEOM")
 
index 4f07701efe3d68685687d700135134e48db7eb97..8f93750c589f3054e11b171097e6d656e54e99b1 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create a vertex
index 4e27ac41c53bbef9bbe372ac34b3f4d6b9da6b95..4f51dd6d43ed880fd6c4a8f100c5c3b968fd86c2 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create a vertex and a vector
index 61fcc3846d85a9dc5c945f018059c964311369a1..bb3b245f1e9100436f5fef49eda20c9a72baf515 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create a vertex and a vector
index b639ec0ca885482825af33f7df0673b90ecfa719..977fe4fb9feb9f6cfd9788b2fe44cf2299329710 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create vertices
index e5989dfe4ed97baa4fb72872a71b819dfe4332a9..a4de96ea6d1b54996ed9861b41e1e3f27f56e9a8 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create vertices
index dc937caf00863d4903a37170ef26c1888d06ebd4..0e7d55aa830b6580d71ba734f13d30686d9c5f33 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create vertices, an edge, an arc, a wire, a face and a prism
@@ -18,12 +18,12 @@ face = geompy.MakeFace(wire, 1)
 theShape = geompy.MakePrismVecH(face, edge, 130)
 
 # check the shape at the beginning
-print "Before ProcessShape:"
+print("Before ProcessShape:")
 isValid = geompy.CheckShape(theShape)
 if isValid == 0:
-    print "The shape is not valid"
+    print("The shape is not valid")
 else:
-    print "The shape seems to be valid"
+    print("The shape seems to be valid")
 
 # process the Shape
 Operators = ["FixShape"]
@@ -32,13 +32,13 @@ Values = ["1e-7"]
 PS = geompy.ProcessShape(theShape, Operators, Parameters, Values)
 
 # check the shape at the end
-print "After ProcessShape:"
+print("After ProcessShape:")
 isValid = geompy.CheckShape(PS)
 if isValid == 0:
-    print "The shape is not valid"
-    raise RuntimeError, "It seems, that the ProcessShape() has failed"
+    print("The shape is not valid")
+    raise RuntimeError("It seems, that the ProcessShape() has failed")
 else:
-    print "The shape seems to be valid"
+    print("The shape seems to be valid")
 
 # add in the study and display
 Id_Shape = geompy.addToStudy(theShape, "Invalid Shape")
index 344ec4bff18bc686d598f25a2a9db5761278204d..6dc223afbd6ad65abc96200d2e22580b77724ea6 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create a box
index 8b8baedbd7ff845a6c1519a99205725333e3d384..a0854226c0bc837fe1bb67059051a0dfe8fa47fc 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create vertices and vectors
index 242b17231d3ed3385b654857ac5add74fc82d674..55971195d295de9323d3ec2834ceb0eff5025f08 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create a vertex and a vector
index e5fef2bb59719405501b7e052afb10ebe5681211..c8da39d130bbb5bb57e75c4eeb3e4035ae4f82f0 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create a vertex and a vector
index 5f6014e740ad0228ce6ee5875fe59167c47b4ea8..95168fc4a04b25168f8d727cad8aef9115fea562 100644 (file)
@@ -4,7 +4,7 @@ import salome, math
 salome.salome_init()
 from salome.geom import geomBuilder
 
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg     = salome.ImportComponentGUI("GEOM")
 
 # create base points
index 1a7ff79a472fa97d0778d7ccff6514386a46c261..66a0c0e9412006681b42a8f82c75a983cd9438dd 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create boxes
index 5266bc3a672be55668be6a8410257d95b05bc422..046332af4be4779fa1b85989ed50406a9ae849f9 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create boxes
@@ -30,4 +30,4 @@ geompy.addToStudy(glue1, "Glue all edges")
 geompy.addToStudy(glue2, "Glue two edges")
 
 if salome.sg.hasDesktop():
-  salome.sg.updateObjBrowser(True)
+  salome.sg.updateObjBrowser()
index 2875051d269ea1db06769cd0e0d0ace843088a2c..5d97eef92492cf6f62e48a6b9a33d3ed19c06162 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # import initial topology with bad tolerances (more than 1e-07)
index bf823db92066611446114f27f3de6a60c1f2f197..399a22f93c6dcddb505a2406be9ea69c21d2f6f6 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 # Variant 1: using DivideEdge()
 
@@ -40,4 +40,4 @@ edge = geompy.GetEdgeNearPoint( box, p1, theName="edge to split")
 div  = geompy.DivideEdgeByPoint( box, edge, [p1, p2], theName="box (edge divided)")
 
 
-salome.sg.updateObjBrowser(True
+salome.sg.updateObjBrowser() 
index c243e5118dea4b1e169078fc59cce9217bec94e8..6aae32a81e3bdbb2f6aacca660f37f6dac0be2e3 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 # create vertices
 p1 = geompy.MakeVertex(0, 0, 0)
@@ -49,4 +49,4 @@ for wire in wires:
     ii = ii + 1
     pass
 
-salome.sg.updateObjBrowser(True
+salome.sg.updateObjBrowser() 
index 4075e1bc17575c05798dca7e7a0408383e42ae60..4218d85d4ed5633746eecf31127e071a2dcb88f9 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 # create solids with some coincident faces
 Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
@@ -23,4 +23,4 @@ geompy.addToStudy(Partition_1, 'Partition_1')
 Joined_1 = geompy.RemoveInternalFaces(Partition_1)
 geompy.addToStudy(Joined_1, 'Joined_1')
 
-salome.sg.updateObjBrowser(True
+salome.sg.updateObjBrowser() 
index a4f20a1ce88d8aef9a2e3d35824ac445ef899848..197ecd01eaf721259c8a9322ec7a0cbea0f94a19 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create vertices
index 6e3903fbcad91e9703947e831d795184d3e28501..342c496fee0dd8328f68dfec651bd89fca9812b7 100755 (executable)
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
 # Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # This library is free software; you can redistribute it and/or
@@ -17,7 +18,6 @@
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-#!/usr/bin/env python
 
 import unittest, sys, os
 
index ac72a303119ece6a456f42204b7d18462a94cb12..9f001e8371e42a4e7bbbf814b3b8f74323dc3af6 100644 (file)
@@ -4,15 +4,15 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 # create a box
 box = geompy.MakeBoxDXDYDZ(100,30,100)
 Toler = geompy.Tolerance(box)
-print "\nBox 100x30x100 tolerance:"
-print " Face min. tolerance: ", Toler[0]
-print " Face max. tolerance: ", Toler[1]
-print " Edge min. tolerance: ", Toler[2]
-print " Edge max. tolerance: ", Toler[3]
-print " Vertex min. tolerance: ", Toler[4]
-print " Vertex max. tolerance: ", Toler[5]
+print("\nBox 100x30x100 tolerance:")
+print(" Face min. tolerance: ", Toler[0])
+print(" Face max. tolerance: ", Toler[1])
+print(" Edge min. tolerance: ", Toler[2])
+print(" Edge max. tolerance: ", Toler[3])
+print(" Vertex min. tolerance: ", Toler[4])
+print(" Vertex max. tolerance: ", Toler[5])
index 257819c3d14311675335836436f662035ebbe05d..ead4e3a8e3ae0cdb0eac805aacec64e5d5d1b7cd 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 #
index eb12ea6a5541a89a42fb878dd063fccb82ac0d22..b3b1c8e70e65ed41ab1dbf12532594d8934f3a8e 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create vertices
index 6d9d5d43ff77f369cdd9dd250730e26e313e70f5..1f03e625162181cc6e37017c03c830f457b50cf5 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create vertices
index 31a938dda55d61215a1c8ef3cf2653f9c324923c..727e428e429452470fc798b54a789b91a1903247 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 #create vertices
index 67bf79084cc0d75a53e421939f8c853dc9735ec8..891ffe7a4abf8f64d6c59e20691c0149b21bd4e2 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 #create vertices
index 3c9190cb1836e5a3a2d6ddecd94507f36ef5dbd8..819ad31c573fe0c59ca8ed2926f854cb9353338b 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create a vertex and a vector
index f1e646a746b032967484dd6e447e3e161f11bf49..f3d6954b0c14d570f276d2c1f51748f46728f38f 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create a box 
index 5a01039fd0989a0eade93e689341603eda67b6ed..1de25e6ccac8e97da69c115cd42de593daf1e81c 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create a vertex and a vector
index 564e1409d7b871871390bd0f59ebba86d1e41e32..5be970784efdc7fd5a7931000370bc3f57cbb80a 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 import math
 gg = salome.ImportComponentGUI("GEOM")
 
index 6870a352958d5405dff9c316d7668464ed9c3a8e..56c74285715b19f9eab2643b1f451489a487158a 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 import math
 gg = salome.ImportComponentGUI("GEOM")
 
index ebcd1f48d103ab8aa5532796b19e6fdf62f753e6..8748d11e2159a8273b5ce7a4bcd06d482405469e 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create a box
index 948fa0087bf667e7c0ae7aebbeb3417642556175..dc495043372759ff023f4eb4b8a2ad4a08a80780 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create a box and a sphere
index f448d4a4e777293eef53f9d3f532b78af7273f75..54871e6c1cd5d25c2b0d095b236237733cccda65 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create a box and a sphere
index d323cf0b7bd4aa9e8cb5badc529990943c63bc7f..d134c1dfa5ce476f1f1a32ec76038739afcbc4e0 100644 (file)
@@ -3,7 +3,7 @@
 import salome
 salome.salome_init()
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 # create a cylindric face and a curve(edge)
 cylinder = geompy.MakeCylinderRH(100, 300)
index c26774d6630eee5eb3bd323573eb34695da07582..b4428a9798dc587895bec13023f80f6db4df6e65 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create vertices and vectors
index 3467b5be654c521642a34fe2fadd8bdbeadf303a..ee64361d36443c6c912d0cfba2a6cc428992a923 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 import math
 
index 17747db1bbaa9dd0bbea1a62db7b9493d4c763f4..d05d7026cb5b2c0def1e0d5e621537eab44626f1 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create a face in OXY plane
index a5b6e5b3a030181af212dc8c07161aa6ea968290..7d60f45e9317838007523bca94f1f7d4fd358f66 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create box
index a59eda05f9f788ae3c2e4f4e1b4a80b95aadb4df..b7c8646372dfbe648b76fd353a6aa708bba71af1 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 radius  = 10.
 ShapeTypeEdge = geompy.ShapeType["EDGE"]
index ba857a05b74560affa1729547e1adf3cfc94be8f..66d9ef4213f4740e17c2b26c1187e397802eb861 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 d1 = 10.
 d2 = 10.
index e8bc167edf9b3f2d3066150e814f2e3b4673dcef..4d3b4f24db30ac3cf4a38c946bfa1f1e33dcaa9f 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create vertices
index 8a6d13e9351aae1b58ea7cd8bd20da663b101521..3a21aec0c70a2ea07e01e2e47d8f5c5a360fcc8d 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 box = geompy.MakeBox(0,0,0, 50,50,50)
 box2 = geompy.MakeBox(-50,-50,-50, 0,0,0)
 
index b8629d61c5f72842c1030c4fcb97bd04030670c1..44859418e88ad898ba686950afd248f7b3c7d488 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 box = geompy.MakeBox(0,0,0, 50,50,50)
 
 sphere = geompy.MakeSphere(50,50,50, 30)
index 9932eeec68fdf4e107eb14ab5d908774d83ef3a5..e7c5f404957290b370dfb4b40018e64921b8f44c 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 box = geompy.MakeBox(0,0,0, 50,50,50)
 sphere = geompy.MakeSphere(50,50,50, 30)
index 093fdfbe112962945e527500b0ce6ffdae89b7d1..c0d4f5f1f9ed5cad4223606046eea4aafcf6bd9f 100644 (file)
@@ -5,7 +5,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 texture_file = os.path.join(os.getenv("GEOM_ROOT_DIR"), "share", "salome", "resources", "geom", "textures", "texture1.dat")
 texture = geompy.LoadTexture(texture_file)
index 632ab6226abb635c59fe07decd37206d745c3421..9443f2a6c21f50ac6f50a68c9725dff323fbb413 100644 (file)
@@ -4,10 +4,10 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 # create a box
 box = geompy.MakeBoxDXDYDZ(100,30,100)
 Descr = geompy.WhatIs(box)
-print "\nBox 100x30x100 description:"
-print Descr
+print("\nBox 100x30x100 description:")
+print(Descr)
index 4133965f455bb39e1183b8eb3f925b3dfb7c0954..c9b7e9b4051e23a48cad954c5bd8e34f2044d355 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create two vertices
@@ -37,4 +37,4 @@ id_group1 = geompy.addToStudy(group, "Group1")
 
 # display the contents of the group
 gg.createAndDisplayGO(id_group1)
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 773043b88c7f8e1f43a881757d630c07bd4f52f5..1bf857fc93d1444cb0a9a95532a6363b7270f2f8 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create two vertices
@@ -26,4 +26,4 @@ id_group1 = geompy.addToStudy(group, "Group1")
 
 # display the contents of the group
 gg.createAndDisplayGO(id_group1)
-salome.sg.updateObjBrowser(True
+salome.sg.updateObjBrowser() 
index a9637afc7f883224b0069240837216de64681bcd..1d3cf53eb6bfb7fd7c7ff7f3f7bf76c9ecb0c080 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create two vertices
@@ -33,4 +33,4 @@ id_group1 = geompy.addToStudy(group, "Group1")
 
 # display the contents of the group
 gg.createAndDisplayGO(id_group1)
-salome.sg.updateObjBrowser(True
+salome.sg.updateObjBrowser() 
index f48fef7259b6fd92bff72496b4bd940076eec3ed..cdf1ac0459ed5b99c7140235631a945e40dc5aae 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 # create a box and some groups of faces on it
 Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
@@ -29,4 +29,4 @@ geompy.addToStudyInFather(Box_1, Group_3, 'Group_3')
 geompy.addToStudyInFather(Box_1, Group_4, 'Group_4')
 geompy.addToStudyInFather(Box_1, Group_U_1_2, 'Group_U_1_2')
 geompy.addToStudyInFather(Box_1, Group_UL_3_4, 'Group_UL_3_4')
-salome.sg.updateObjBrowser(True
+salome.sg.updateObjBrowser() 
index 551f8475528fb6e3350f0c3e872ed80341677a6a..477cb19a9a0d8d3ec1e03481bbdb6a29a543ac6d 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 # create a box and some groups of faces on it
 Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
@@ -29,4 +29,4 @@ geompy.addToStudyInFather(Box_1, Group_3, 'Group_3')
 geompy.addToStudyInFather(Box_1, Group_4, 'Group_4')
 geompy.addToStudyInFather(Box_1, Group_I_1_3, 'Group_I_1_3')
 geompy.addToStudyInFather(Box_1, Group_IL_1_3, 'Group_IL_1_3')
-salome.sg.updateObjBrowser(True
+salome.sg.updateObjBrowser() 
index 155c4a115633c6827e8af68aa7f1d4e8ba39e615..0a3f13f57f4b00ed6ad575580751fa2ca256dc41 100644 (file)
@@ -4,7 +4,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 # create a box and some groups of faces on it
 Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
@@ -29,4 +29,4 @@ geompy.addToStudyInFather(Box_1, Group_3, 'Group_3')
 geompy.addToStudyInFather(Box_1, Group_4, 'Group_4')
 geompy.addToStudyInFather(Box_1, Group_C_2_4, 'Group_C_2_4')
 geompy.addToStudyInFather(Box_1, Group_CL_2_4, 'Group_CL_2_4')
-salome.sg.updateObjBrowser(True
+salome.sg.updateObjBrowser() 
index 374e18071b3948618d2a1fc33817da77f0486e11..38e41194799dff6a50ea012cf8d956221885c14e 100644 (file)
@@ -1,5 +1,4 @@
-#!/usr/bin/env python
-#  -*- coding: utf-8 -*-
+#!/usr/bin/env python3
 # Copyright (C) 2012-2016  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # This library is free software; you can redistribute it and/or
@@ -49,106 +48,102 @@ import sys
 import inspect
 
 def generate(plugin_name, output):
-    plugin_module_name  = plugin_name + "Builder"
-    plugin_module       = "salome.%s.%s" % (plugin_name, plugin_module_name)
-    import_str          = "from salome.%s import %s" % (plugin_name, plugin_module_name)
-    exec( import_str )
-    exec( "import %s" % plugin_module )
-    exec( "mod = %s" % plugin_module )
-    functions = []
-    for attr in dir( mod ):
-        if attr.startswith( '_' ): continue # skip an internal methods 
-        item = getattr( mod, attr )
-        if type( item ).__name__ == 'function':
-            if item not in functions: 
-                functions.append( item )
-                pass
-            pass
-        pass
-    if functions:
-        for function in functions:
-            comments = inspect.getcomments(function)
-            if comments:
-                comments = comments.strip().split("\n")
-                comments = "\t" + "\n\t".join(comments)
-                output.append(comments)
-                pass                
-            sources = inspect.getsource(function)
-            if sources is not None:
-                sources_list = sources.split("\n")
-                sources_new_list = []
-                found = False
-                for item in sources_list:
-                    if '"""' in item:
-                        if found == True:
-                            found = False                                
-                            continue
-                        else:
-                            found = True
-                            continue
-                            pass
-                        pass                
-                    if found == False :
-                        sources_new_list.append(item)
+    def get_functions(amodule):
+        for attr in dir(amodule):
+          if attr.startswith( '_' ): continue # skip an internal methods
+          item = getattr(amodule, attr)
+          if inspect.isfunction(item):
+              yield item
+              pass
+          pass
+
+    plugin_module_name = plugin_name + "Builder"
+    plugin_module = "salome.{}.{}".format(plugin_name, plugin_module_name)
+    import_str = "from salome.{} import {}".format(plugin_name, plugin_module_name)
+    execLine = "from salome.{} import {}\n" \
+               "import {}\n" \
+               "mod = {}".format(plugin_name, plugin_module_name, plugin_module, plugin_module)
+    print(execLine)
+    namespace = {}
+    exec(execLine , namespace)
+
+    for function in get_functions(namespace["mod"]):
+        comments = inspect.getcomments(function)
+        if comments:
+            comments = comments.strip().split("\n")
+            comments = "\t" + "\n\t".join(comments)
+            output.append(comments)
+            pass                
+        sources = inspect.getsource(function)
+        if sources is not None:
+            sources_list = sources.split("\n")
+            sources_new_list = []
+            found = False
+            for item in sources_list:
+                if '"""' in item:
+                    if found == True:
+                        found = False                                
+                        continue
+                    else:
+                        found = True
+                        continue
                         pass
+                    pass                
+                if found == False:
+                    sources_new_list.append(item)
                     pass
-                sources = "\n".join(sources_new_list)
-                sources = "\t" + sources.replace("\n", "\n\t")
-                output.append(sources)
                 pass
+            sources = "\n".join(sources_new_list)
+            sources = "\t" + sources.replace("\n", "\n\t")
+            output.append(sources)
             pass
         pass
     pass
 
 if __name__ == "__main__":
-    import optparse
-    parser = optparse.OptionParser(usage="%prog [options] plugin")
+    import argparse
+    parser = argparse.ArgumentParser()
     h  = "Output file (geomBuilder.py by default)"
-    parser.add_option("-o", "--output", dest="output",
-                      action="store", default=None, metavar="file",
-                      help=h)
+    parser.add_argument("-o", "--output", dest="output",
+                        action="store", default='geomBuilder.py', metavar="file",
+                        help=h)
     h  = "If this option is True, dummy help for geomBuiler class is added. "
     h += "This option should be False (default) when building documentation for Geometry module "
     h += "and True when building documentation for Geometry module plug-ins."
-    parser.add_option("-d", "--dummy-geom-help", dest="dummygeomhelp",
-                      action="store_true", default=False,
-                      help=h)
-    (options, args) = parser.parse_args()
-    if len( args ) < 1: sys.exit("Plugin name is not specified")
-
-    f = open(options.output, "w")
+    parser.add_argument("-d", "--dummy-geom-help", dest="dummygeomhelp",
+                        action="store_true", default=False,
+                        help=h)
+    parser.add_argument("plugin", nargs='+', help='Name of plugin')
+    args = parser.parse_args()
 
-    if len(args) > 1:
-        plugins_names = " ".join(args) + " plugins"
-    elif len(args) == 1:
-        plugins_names = args[0] + " plugin"
-    else:
-        plugins_names = ""
+    plugins_names = " ".join(args.plugin) + 'plugin'
+    if len(args.plugin) > 1:
+        plugins_names += 's'
     output = []
-    if options.dummygeomhelp:
-        output.append( "## @package geomBuilder" )
-        output.append( "#  Documentation of the methods dynamically added by the " + plugins_names + " to the @b %geomBuilder class." )
+    if args.dummygeomhelp:
+        output.append("## @package geomBuilder")
+        output.append("#  Documentation of the methods dynamically added by the " + plugins_names + " to the @b %geomBuilder class.")
         # Add dummy Geometry help
         # This is supposed to be done when generating documentation for Geometry module plug-ins
-        output.append( "#  @note The documentation below does not provide complete description of class @b %geomBuilder" )
-        output.append( "#  from @b geomBuilder package. This documentation provides only information about" )
-        output.append( "#  the methods dynamically added to the %geomBuilder class by the " + plugins_names + "." )
-        output.append( "#  For more details on the %geomBuilder class, please refer to the SALOME %Geometry module" )
-        output.append( "#  documentation." )
+        output.append("#  @note The documentation below does not provide complete description of class @b %geomBuilder")
+        output.append("#  from @b geomBuilder package. This documentation provides only information about")
+        output.append("#  the methods dynamically added to the %geomBuilder class by the " + plugins_names + ".")
+        output.append("#  For more details on the %geomBuilder class, please refer to the SALOME %Geometry module")
+        output.append("#  documentation.")
         pass
     else:
         # Extend documentation for geomBuilder class with information about dynamically added methods.
         # This is supposed to be done only when building documentation for Geometry module
-        output.append( "## @package geomBuilder" )
-        output.append( "#  @note Some methods are dynamically added to the @b %geomBuilder class in runtime by the" )
-        output.append( "#  plug-in modules. If you fail to find help on some methods in the documentation of Geometry module, " )
-        output.append( "#  try to look into the documentation for the Geometry module plug-ins." )
+        output.append("## @package geomBuilder")
+        output.append("#  @note Some methods are dynamically added to the @b %geomBuilder class in runtime by the")
+        output.append("#  plug-in modules. If you fail to find help on some methods in the documentation of Geometry module, ")
+        output.append("#  try to look into the documentation for the Geometry module plug-ins.")
         pass
     output.append("class geomBuilder():")
     
-    for arg in args:
-       generate( arg, output )
-    pass
+    for plugin_name in args.plugin:
+       generate( plugin_name, output )
+       pass
 
-    for line in output: f.write( line + "\n" )
-    f.close()    
+    with open(args.output, "w", encoding='utf8') as f:
+        f.write('\n'.join(output))
index 2d96537163c8143ceeae7d1cef1a231c1969928d..1f390cb1edbbb6f8cc3503cce1be5e5e3f321c06 100644 (file)
@@ -77,7 +77,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 box = geompy.MakeBoxDXDYDZ(10,10,10)
 type = geompy.ShapeIdToType(box.GetType())
@@ -103,7 +103,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 box = geompy.MakeBoxDXDYDZ(10,10,10)
 type = box.GetShapeType()
index 83fdfc23dfe48d500b63f8b77e2c027ec1905995..d449cb54b5287b2586592caad4d70c91230acb06 100644 (file)
@@ -23,13 +23,13 @@ salome.salome_init()
 \n the old mode:
 \code
 import geompy
-geompy.init_geom(theStudy)
+geompy.init_geom()
 \endcode
 \n the new mode:
 \code
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 \endcode
 
 
index 4d36e4efb4521e6939de41e0bed831c11465a1be..8c2c37565380b34f63d098ea29d96e8acdb65a1a 100644 (file)
@@ -16,7 +16,7 @@ import salome
 salome.salome_init()
 
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(theStudy)
+geompy = geomBuilder.New()
 \endcode
 
 With this initialization, the geometry engine runs in the default container,
@@ -30,7 +30,7 @@ For instance:
 from salome.geom import geomBuilder
 lcc = salome.lcc
 engineGeom = lcc.FindOrLoadComponent("myServer", "GEOM")
-geompy = geomBuilder.New(theStudy, engineGeom)
+geompy = geomBuilder.New(engineGeom)
 \endcode
 
 Or, within a Distributed Python Node of a YACS Schema, where the container
@@ -38,8 +38,8 @@ is already provided in the Python context of the node, with <em>my_container</em
 \code
 from salome.geom import geomBuilder
 my_container.load_component_Library("GEOM")
-engineGeom = my_container.create_component_instance("GEOM", 0)
-geompy = geomBuilder.New(theStudy, engineGeom)
+engineGeom = my_container.create_component_instance("GEOM")
+geompy = geomBuilder.New(engineGeom)
 \endcode
 
 
index 59587b82583a711693e1b02a45cae2ce246f5e64..12c30a1ee0ae6ff3eb83559e6da8560adb062d66 100644 (file)
@@ -5,7 +5,7 @@
 import salome
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 gg = salome.ImportComponentGUI("GEOM")
 
index f8776a9ddd5e577d27eba965fdda369cb93334b4..e48b26a09198fa06a39d2f6cbec36c009f3ec035 100644 (file)
@@ -293,11 +293,6 @@ module GEOM
      */
     string GetEntry();
 
-    /*!
-     *  \brief Get ID of study, where the object is created.
-     */
-    long GetStudyID();
-
     /*!
      *  \brief Get internal type of operation created this object (POINT, BOX, CYLINDER, EXTRUSION...).
      *  \note To get topological information on the object, use \ref GEOM_IMeasureOperations::WhatIs() "WhatIs()"
@@ -692,11 +687,6 @@ module GEOM
      */
     string GetErrorCode();
 
-    /*!
-     *  \brief Get ID of study, where the operation is defined
-     */
-    long GetStudyID();
-
     /*!
      *  \brief Opens a new transaction
      */
@@ -4886,9 +4876,9 @@ module GEOM
      *  \brief Undo/Redo Management
      */
 
-    void Undo (in long theStudyID);
+    void Undo ();
 
-    void Redo (in long theStudyID);
+    void Redo ();
 
     /*!
      * \brief Publishing management
@@ -4897,8 +4887,7 @@ module GEOM
      * if theFather is not NULL the object is placed under thFather's SObject.
      * Returns a SObject where theObject is placed
      */
-    SALOMEDS::SObject AddInStudy (in SALOMEDS::Study theStudy,
-                                  in GEOM_BaseObject theObject,
+    SALOMEDS::SObject AddInStudy (in GEOM_BaseObject theObject,
                                   in string          theName,
                                   in GEOM_BaseObject theFather);
 
@@ -4906,8 +4895,6 @@ module GEOM
      *  \brief Publish sub-shapes, standing for arguments and sub-shapes of arguments
      *
      *  To be used from python scripts out of geompy.addToStudy (non-default usage)
-     *  \param theStudy  the study, in which theObject is published already,
-     *                   and in which the arguments will be published
      *  \param theObject published GEOM_Object, arguments of which will be published
      *  \param theArgs   list of GEOM_Object, operation arguments to be published.
      *                   If this list is empty, all operation arguments will be published
@@ -4926,8 +4913,7 @@ module GEOM
      *                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
      *  \return list of published sub-shapes
      */
-    ListOfGO RestoreSubShapesO (in SALOMEDS::Study   theStudy,
-                                in GEOM_Object       theObject,
+    ListOfGO RestoreSubShapesO (in GEOM_Object       theObject,
                                 in ListOfGO          theArgs,
                                 in find_shape_method theFindMethod,
                                 in boolean           theInheritFirstArg,
@@ -4937,8 +4923,6 @@ module GEOM
      *  \brief Publish sub-shapes, standing for arguments and sub-shapes of arguments
      *
      *  To be used from python scripts out of geompy.addToStudy (non-default usage)
-     *  \param theStudy  the study, in which theObject is published already,
-     *                   and in which the arguments will be published
      *  \param theObject published GEOM_Object, arguments of which will be published
      *  \param theArgs   list of GEOM_Object, operation arguments to be published.
      *                   If this list is empty, all operation arguments will be published
@@ -4957,8 +4941,7 @@ module GEOM
      *                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
      *  \return list of published sub-shapes
      */
-    ListOfGO RestoreGivenSubShapesO (in SALOMEDS::Study   theStudy,
-                                     in GEOM_Object       theObject,
+    ListOfGO RestoreGivenSubShapesO (in GEOM_Object       theObject,
                                      in ListOfGO          theArgs,
                                      in find_shape_method theFindMethod,
                                      in boolean           theInheritFirstArg,
@@ -4969,8 +4952,6 @@ module GEOM
      *
      *  To be used from GUI and from geompy.addToStudy.
      *  Work like the above method, but accepts study object theSObject instead of GEOM_Object.
-     *  \param theStudy  the study, in which theObject is published already,
-     *                   and in which the arguments will be published
      *  \param theSObject study object, referencing GEOM_Object, arguments of which will be published
      *  \param theArgs   list of GEOM_Object, operation arguments to be published.
      *                   If this list is empty, all operation arguments will be published
@@ -4988,8 +4969,7 @@ module GEOM
      *  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
      *                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
      */
-    ListOfGO RestoreSubShapesSO (in SALOMEDS::Study   theStudy,
-                                 in SALOMEDS::SObject theSObject,
+    ListOfGO RestoreSubShapesSO (in SALOMEDS::SObject theSObject,
                                  in ListOfGO          theArgs,
                                  in find_shape_method theFindMethod,
                                  in boolean           theInheritFirstArg,
@@ -4997,22 +4977,21 @@ module GEOM
 
     // #  Methods to access interfaces for objects creation and transformation
 
-    GEOM_IBasicOperations     GetIBasicOperations    (in long theStudyID) raises (SALOME::SALOME_Exception);
-    GEOM_ITransformOperations GetITransformOperations(in long theStudyID) raises (SALOME::SALOME_Exception);
-    GEOM_I3DPrimOperations    GetI3DPrimOperations   (in long theStudyID) raises (SALOME::SALOME_Exception);
-    GEOM_IShapesOperations    GetIShapesOperations   (in long theStudyID) raises (SALOME::SALOME_Exception);
-    GEOM_IBooleanOperations   GetIBooleanOperations  (in long theStudyID) raises (SALOME::SALOME_Exception);
-    GEOM_ICurvesOperations    GetICurvesOperations   (in long theStudyID) raises (SALOME::SALOME_Exception);
-    GEOM_ILocalOperations     GetILocalOperations    (in long theStudyID) raises (SALOME::SALOME_Exception);
-    GEOM_IHealingOperations   GetIHealingOperations  (in long theStudyID) raises (SALOME::SALOME_Exception);
-    GEOM_IInsertOperations    GetIInsertOperations   (in long theStudyID) raises (SALOME::SALOME_Exception);
-    GEOM_IMeasureOperations   GetIMeasureOperations  (in long theStudyID) raises (SALOME::SALOME_Exception);
-    GEOM_IBlocksOperations    GetIBlocksOperations   (in long theStudyID) raises (SALOME::SALOME_Exception);
-    GEOM_IGroupOperations     GetIGroupOperations    (in long theStudyID) raises (SALOME::SALOME_Exception);
-    GEOM_IFieldOperations     GetIFieldOperations    (in long theStudyID) raises (SALOME::SALOME_Exception);
-
-    GEOM_IOperations GetPluginOperations (in long   theStudyID,
-                                          in string theLibName) raises (SALOME::SALOME_Exception);
+    GEOM_IBasicOperations     GetIBasicOperations    () raises (SALOME::SALOME_Exception);
+    GEOM_ITransformOperations GetITransformOperations() raises (SALOME::SALOME_Exception);
+    GEOM_I3DPrimOperations    GetI3DPrimOperations   () raises (SALOME::SALOME_Exception);
+    GEOM_IShapesOperations    GetIShapesOperations   () raises (SALOME::SALOME_Exception);
+    GEOM_IBooleanOperations   GetIBooleanOperations  () raises (SALOME::SALOME_Exception);
+    GEOM_ICurvesOperations    GetICurvesOperations   () raises (SALOME::SALOME_Exception);
+    GEOM_ILocalOperations     GetILocalOperations    () raises (SALOME::SALOME_Exception);
+    GEOM_IHealingOperations   GetIHealingOperations  () raises (SALOME::SALOME_Exception);
+    GEOM_IInsertOperations    GetIInsertOperations   () raises (SALOME::SALOME_Exception);
+    GEOM_IMeasureOperations   GetIMeasureOperations  () raises (SALOME::SALOME_Exception);
+    GEOM_IBlocksOperations    GetIBlocksOperations   () raises (SALOME::SALOME_Exception);
+    GEOM_IGroupOperations     GetIGroupOperations    () raises (SALOME::SALOME_Exception);
+    GEOM_IFieldOperations     GetIFieldOperations    () raises (SALOME::SALOME_Exception);
+
+    GEOM_IOperations GetPluginOperations (in string theLibName) raises (SALOME::SALOME_Exception);
 
     // # Objects Management
 
@@ -5025,11 +5004,10 @@ module GEOM
 
     /*!
      *  \brief Returns an object defined by the study and its entry in the GEOM component
-     *  \param theStudyID is a SALOMEDS Study ID
      *  \param theEntry is an entry of the requested GEOM_Object in the GEOM component
      *  \note if the object has not previously been created a NULL GEOM_Object is returned
      */
-    GEOM_BaseObject GetObject (in long theStudyID, in string theEntry);
+    GEOM_BaseObject GetObject (in string theEntry);
 
     /*!
      *  \brief Add a sub-shape defined by indices in \a theIndices
@@ -5068,11 +5046,9 @@ module GEOM
 
     /*!
      *  \brief Publishes the named sub-shapes of given object in the study.
-     *  \param theStudy    The study in which the object is published
      *  \param theObject   The object which named sub-shapes are published
      */
-    ListOfGO PublishNamedShapesInStudy(in SALOMEDS::Study theStudy,
-                                       //in SObject theSObject,
+    ListOfGO PublishNamedShapesInStudy(//in SObject theSObject,
                                        in Object theObject);
 
     /*!
@@ -5125,31 +5101,27 @@ module GEOM
 
     /*!
      * \brief Collects dependencies of the given objects from other ones
-     * \param theStudy The study in which the object is published
      * \param theListOfEntries List of GEOM object entries in OCAF tree (not in study)
      * \return Struct of dependent entries and its links as a byte array
      * \note This method is supposed to be used by GUI only.
      */
-    SALOMEDS::TMPFile GetDependencyTree(in SALOMEDS::Study theStudy,
-                                       in string_array theListOfEntries);
+    SALOMEDS::TMPFile GetDependencyTree(in string_array theListOfEntries);
 
     /*!
      * \brief Fills 3 lists that is used to reduce study of redundant objects:
      *  - dependencies of the given objects from other ones;
      *  - children of the given objects;
      *  - all other objects in study.
-     * \param theStudy The study in which the object was published
      * \param theSelectedEntries List of GEOM object entries in OCAF tree
      * \param theParentEntries List of GEOM object entries on which the given objects depend
      * \param theSubEntries Children entries list of the given objects
      * \param theOtherEntries List of GEOM object entries which are in the study, but not in parents and children lists
      * \note This method is supposed to be used by GUI only.
      */
-    void GetEntriesToReduceStudy(in SALOMEDS::Study theStudy,
-                                inout string_array theSelectedEntries,
-                                inout string_array theParentEntries,
-                                inout string_array theSubEntries,
-                                inout string_array theOtherEntries);
+    void GetEntriesToReduceStudy(inout string_array theSelectedEntries,
+                                                inout string_array theParentEntries,
+                                                inout string_array theSubEntries,
+                                                inout string_array theOtherEntries);
 
   };
 };
index 003c8210bbe23f5a204ea42710331cbcff0f23e0..568946fb7d61f2efc60b1939252f0c14151e76e8 100644 (file)
@@ -35,11 +35,6 @@ module GEOM
 
   interface GEOM_Superv : Engines::EngineComponent,SALOMEDS::Driver
   {
-    //-----------------------------------------------------------//
-    // Set current study ID                                      //
-    //-----------------------------------------------------------//
-    void SetStudyID (in long theStudyID) ;
-
     //-----------------------------------------------------------//
     // Create ListOfGO and add items to it                       //
     //-----------------------------------------------------------//
index fceb7674a4e8c60ad52a146b45a4f4ad22c5a5a2..dc67e147891dec59baa56de0bb36d31f97c8b6cb 100644 (file)
             <service-version>@SALOMEGEOM_VERSION@</service-version>
             <service-comment>unknown</service-comment>
             <service-by-default>0</service-by-default>
-            <inParameter-list>
-              <inParameter>
-                <inParameter-name>theStudyID</inParameter-name>
-                <inParameter-type>long</inParameter-type>
-                <inParameter-comment>unknown</inParameter-comment>
-              </inParameter>
-            </inParameter-list>
+            <inParameter-list></inParameter-list>
             <outParameter-list></outParameter-list>
             <DataStream-list></DataStream-list>
           </component-service>
             <service-version>@SALOMEGEOM_VERSION@</service-version>
             <service-comment>unknown</service-comment>
             <service-by-default>0</service-by-default>
-            <inParameter-list>
-              <inParameter>
-                <inParameter-name>theStudyID</inParameter-name>
-                <inParameter-type>long</inParameter-type>
-                <inParameter-comment>unknown</inParameter-comment>
-              </inParameter>
-            </inParameter-list>
+            <inParameter-list></inParameter-list>
             <outParameter-list></outParameter-list>
             <DataStream-list></DataStream-list>
           </component-service>
             <service-comment>unknown</service-comment>
             <service-by-default>0</service-by-default>
             <inParameter-list>
-              <inParameter>
-                <inParameter-name>theStudy</inParameter-name>
-                <inParameter-type>Study</inParameter-type>
-                <inParameter-comment>unknown</inParameter-comment>
-              </inParameter>
               <inParameter>
                 <inParameter-name>theObject</inParameter-name>
                 <inParameter-type>GEOM/GEOM_BaseObject</inParameter-type>
             <service-comment>unknown</service-comment>
             <service-by-default>0</service-by-default>
             <inParameter-list>
-              <inParameter>
-                <inParameter-name>theStudy</inParameter-name>
-                <inParameter-type>Study</inParameter-type>
-                <inParameter-comment>unknown</inParameter-comment>
-              </inParameter>
               <inParameter>
                 <inParameter-name>theObject</inParameter-name>
                 <inParameter-type>GEOM/GEOM_Object</inParameter-type>
             <service-comment>unknown</service-comment>
             <service-by-default>0</service-by-default>
             <inParameter-list>
-              <inParameter>
-                <inParameter-name>theStudy</inParameter-name>
-                <inParameter-type>Study</inParameter-type>
-                <inParameter-comment>unknown</inParameter-comment>
-              </inParameter>
               <inParameter>
                 <inParameter-name>theObject</inParameter-name>
                 <inParameter-type>GEOM/GEOM_Object</inParameter-type>
             <service-comment>unknown</service-comment>
             <service-by-default>0</service-by-default>
             <inParameter-list>
-              <inParameter>
-                <inParameter-name>theStudy</inParameter-name>
-                <inParameter-type>Study</inParameter-type>
-                <inParameter-comment>unknown</inParameter-comment>
-              </inParameter>
               <inParameter>
                 <inParameter-name>theSObject</inParameter-name>
                 <inParameter-type>SObject</inParameter-type>
             <service-version>@SALOMEGEOM_VERSION@</service-version>
             <service-comment>unknown</service-comment>
             <service-by-default>0</service-by-default>
-            <inParameter-list>
-              <inParameter>
-                <inParameter-name>theStudyID</inParameter-name>
-                <inParameter-type>long</inParameter-type>
-                <inParameter-comment>unknown</inParameter-comment>
-              </inParameter>
-            </inParameter-list>
+            <inParameter-list></inParameter-list>
             <outParameter-list>
               <outParameter>
                 <outParameter-name>return</outParameter-name>
             <service-version>@SALOMEGEOM_VERSION@</service-version>
             <service-comment>unknown</service-comment>
             <service-by-default>0</service-by-default>
-            <inParameter-list>
-              <inParameter>
-                <inParameter-name>theStudyID</inParameter-name>
-                <inParameter-type>long</inParameter-type>
-                <inParameter-comment>unknown</inParameter-comment>
-              </inParameter>
-            </inParameter-list>
+            <inParameter-list></inParameter-list>
             <outParameter-list>
               <outParameter>
                 <outParameter-name>return</outParameter-name>
             <service-version>@SALOMEGEOM_VERSION@</service-version>
             <service-comment>unknown</service-comment>
             <service-by-default>0</service-by-default>
-            <inParameter-list>
-              <inParameter>
-                <inParameter-name>theStudyID</inParameter-name>
-                <inParameter-type>long</inParameter-type>
-                <inParameter-comment>unknown</inParameter-comment>
-              </inParameter>
-            </inParameter-list>
+            <inParameter-list></inParameter-list>
             <outParameter-list>
               <outParameter>
                 <outParameter-name>return</outParameter-name>
             <service-version>@SALOMEGEOM_VERSION@</service-version>
             <service-comment>unknown</service-comment>
             <service-by-default>0</service-by-default>
-            <inParameter-list>
-              <inParameter>
-                <inParameter-name>theStudyID</inParameter-name>
-                <inParameter-type>long</inParameter-type>
-                <inParameter-comment>unknown</inParameter-comment>
-              </inParameter>
-            </inParameter-list>
+            <inParameter-list></inParameter-list>
             <outParameter-list>
               <outParameter>
                 <outParameter-name>return</outParameter-name>
             <service-version>@SALOMEGEOM_VERSION@</service-version>
             <service-comment>unknown</service-comment>
             <service-by-default>0</service-by-default>
-            <inParameter-list>
-              <inParameter>
-                <inParameter-name>theStudyID</inParameter-name>
-                <inParameter-type>long</inParameter-type>
-                <inParameter-comment>unknown</inParameter-comment>
-              </inParameter>
-            </inParameter-list>
+            <inParameter-list></inParameter-list>
             <outParameter-list>
               <outParameter>
                 <outParameter-name>return</outParameter-name>
             <service-version>@SALOMEGEOM_VERSION@</service-version>
             <service-comment>unknown</service-comment>
             <service-by-default>0</service-by-default>
-            <inParameter-list>
-              <inParameter>
-                <inParameter-name>theStudyID</inParameter-name>
-                <inParameter-type>long</inParameter-type>
-                <inParameter-comment>unknown</inParameter-comment>
-              </inParameter>
-            </inParameter-list>
+            <inParameter-list></inParameter-list>
             <outParameter-list>
               <outParameter>
                 <outParameter-name>return</outParameter-name>
             <service-version>@SALOMEGEOM_VERSION@</service-version>
             <service-comment>unknown</service-comment>
             <service-by-default>0</service-by-default>
-            <inParameter-list>
-              <inParameter>
-                <inParameter-name>theStudyID</inParameter-name>
-                <inParameter-type>long</inParameter-type>
-                <inParameter-comment>unknown</inParameter-comment>
-              </inParameter>
-            </inParameter-list>
+            <inParameter-list></inParameter-list>
             <outParameter-list>
               <outParameter>
                 <outParameter-name>return</outParameter-name>
             <service-version>@SALOMEGEOM_VERSION@</service-version>
             <service-comment>unknown</service-comment>
             <service-by-default>0</service-by-default>
-            <inParameter-list>
-              <inParameter>
-                <inParameter-name>theStudyID</inParameter-name>
-                <inParameter-type>long</inParameter-type>
-                <inParameter-comment>unknown</inParameter-comment>
-              </inParameter>
-            </inParameter-list>
+            <inParameter-list></inParameter-list>
             <outParameter-list>
               <outParameter>
                 <outParameter-name>return</outParameter-name>
             <service-version>@SALOMEGEOM_VERSION@</service-version>
             <service-comment>unknown</service-comment>
             <service-by-default>0</service-by-default>
-            <inParameter-list>
-              <inParameter>
-                <inParameter-name>theStudyID</inParameter-name>
-                <inParameter-type>long</inParameter-type>
-                <inParameter-comment>unknown</inParameter-comment>
-              </inParameter>
-            </inParameter-list>
+            <inParameter-list></inParameter-list>
             <outParameter-list>
               <outParameter>
                 <outParameter-name>return</outParameter-name>
             <service-version>@SALOMEGEOM_VERSION@</service-version>
             <service-comment>unknown</service-comment>
             <service-by-default>0</service-by-default>
-            <inParameter-list>
-              <inParameter>
-                <inParameter-name>theStudyID</inParameter-name>
-                <inParameter-type>long</inParameter-type>
-                <inParameter-comment>unknown</inParameter-comment>
-              </inParameter>
-            </inParameter-list>
+            <inParameter-list></inParameter-list>
             <outParameter-list>
               <outParameter>
                 <outParameter-name>return</outParameter-name>
             <service-version>@SALOMEGEOM_VERSION@</service-version>
             <service-comment>unknown</service-comment>
             <service-by-default>0</service-by-default>
-            <inParameter-list>
-              <inParameter>
-                <inParameter-name>theStudyID</inParameter-name>
-                <inParameter-type>long</inParameter-type>
-                <inParameter-comment>unknown</inParameter-comment>
-              </inParameter>
-            </inParameter-list>
+            <inParameter-list></inParameter-list>
             <outParameter-list>
               <outParameter>
                 <outParameter-name>return</outParameter-name>
             <service-version>@SALOMEGEOM_VERSION@</service-version>
             <service-comment>unknown</service-comment>
             <service-by-default>0</service-by-default>
-            <inParameter-list>
-              <inParameter>
-                <inParameter-name>theStudyID</inParameter-name>
-                <inParameter-type>long</inParameter-type>
-                <inParameter-comment>unknown</inParameter-comment>
-              </inParameter>
-            </inParameter-list>
+            <inParameter-list></inParameter-list>
             <outParameter-list>
               <outParameter>
                 <outParameter-name>return</outParameter-name>
             <service-version>@SALOMEGEOM_VERSION@</service-version>
             <service-comment>unknown</service-comment>
             <service-by-default>0</service-by-default>
-            <inParameter-list>
-              <inParameter>
-                <inParameter-name>theStudyID</inParameter-name>
-                <inParameter-type>long</inParameter-type>
-                <inParameter-comment>unknown</inParameter-comment>
-              </inParameter>
-            </inParameter-list>
+            <inParameter-list></inParameter-list>
             <outParameter-list>
               <outParameter>
                 <outParameter-name>return</outParameter-name>
             <service-comment>unknown</service-comment>
             <service-by-default>0</service-by-default>
             <inParameter-list>
-              <inParameter>
-                <inParameter-name>theStudyID</inParameter-name>
-                <inParameter-type>long</inParameter-type>
-                <inParameter-comment>unknown</inParameter-comment>
-              </inParameter>
               <inParameter>
                 <inParameter-name>theLibName</inParameter-name>
                 <inParameter-type>string</inParameter-type>
             <service-comment>unknown</service-comment>
             <service-by-default>0</service-by-default>
             <inParameter-list>
-              <inParameter>
-                <inParameter-name>theStudyID</inParameter-name>
-                <inParameter-type>long</inParameter-type>
-                <inParameter-comment>unknown</inParameter-comment>
-              </inParameter>
               <inParameter>
                 <inParameter-name>theEntry</inParameter-name>
                 <inParameter-type>string</inParameter-type>
             <service-version>@SALOMEGEOM_VERSION@</service-version>
             <service-comment>unknown</service-comment>
             <service-by-default>0</service-by-default>
-            <inParameter-list>
-              <inParameter>
-                <inParameter-name>theStudyEntry</inParameter-name>
-                <inParameter-type>string</inParameter-type>
-                <inParameter-comment>unknown</inParameter-comment>
-              </inParameter>
-            </inParameter-list>
+            <inParameter-list></inParameter-list>
             <outParameter-list>
               <outParameter>
                 <outParameter-name>return</outParameter-name>
             <service-comment>unknown</service-comment>
             <service-by-default>0</service-by-default>
             <inParameter-list>
-              <inParameter>
-                <inParameter-name>theStudy</inParameter-name>
-                <inParameter-type>Study</inParameter-type>
-                <inParameter-comment>unknown</inParameter-comment>
-              </inParameter>
               <inParameter>
                 <inParameter-name>theObject</inParameter-name>
                 <inParameter-type>CORBA/Object</inParameter-type>
         <component-interface-comment>unknown</component-interface-comment>
        <!-- interface services list -->
         <component-service-list>
-          <component-service>
-            <service-name>SetStudyID</service-name>
-            <service-author>SALOME team</service-author>
-            <service-version>@SALOMEGEOM_VERSION@</service-version>
-            <service-comment>unknown</service-comment>
-            <service-by-default>0</service-by-default>
-            <inParameter-list>
-              <inParameter>
-                <inParameter-name>theStudyID</inParameter-name>
-                <inParameter-type>long</inParameter-type>
-                <inParameter-comment>unknown</inParameter-comment>
-              </inParameter>
-            </inParameter-list>
-            <outParameter-list></outParameter-list>
-            <DataStream-list></DataStream-list>
-          </component-service>
           <component-service>
             <service-name>CreateListOfGO</service-name>
             <service-author>SALOME team</service-author>
index 1641097db0e5cf5ed9ef55fa599ef290a2358b03..e1fb912915d1eeb297e0756d7b8903be9aa70b8e 100644 (file)
  *  Constructor
  */
 //=============================================================================
-AdvancedEngine_IOperations::AdvancedEngine_IOperations(GEOM_Engine* theEngine, int theDocID) :
-  GEOM_IOperations(theEngine, theDocID)
+AdvancedEngine_IOperations::AdvancedEngine_IOperations(GEOM_Engine* theEngine) :
+  GEOM_IOperations(theEngine)
 {
   MESSAGE("AdvancedEngine_IOperations::AdvancedEngine_IOperations");
-  myBasicOperations     = new GEOMImpl_IBasicOperations(GetEngine(), GetDocID());
-  myBooleanOperations   = new GEOMImpl_IBooleanOperations(GetEngine(), GetDocID());
-  myShapesOperations    = new GEOMImpl_IShapesOperations(GetEngine(), GetDocID());
-  myTransformOperations = new GEOMImpl_ITransformOperations(GetEngine(), GetDocID());
-  myBlocksOperations    = new GEOMImpl_IBlocksOperations(GetEngine(), GetDocID());
-  my3DPrimOperations    = new GEOMImpl_I3DPrimOperations(GetEngine(), GetDocID());
-  myLocalOperations     = new GEOMImpl_ILocalOperations(GetEngine(), GetDocID());
-  myHealingOperations   = new GEOMImpl_IHealingOperations(GetEngine(), GetDocID());
-  myGroupOperations     = new GEOMImpl_IGroupOperations(GetEngine(), GetDocID());
+  myBasicOperations     = new GEOMImpl_IBasicOperations(GetEngine());
+  myBooleanOperations   = new GEOMImpl_IBooleanOperations(GetEngine());
+  myShapesOperations    = new GEOMImpl_IShapesOperations(GetEngine());
+  myTransformOperations = new GEOMImpl_ITransformOperations(GetEngine());
+  myBlocksOperations    = new GEOMImpl_IBlocksOperations(GetEngine());
+  my3DPrimOperations    = new GEOMImpl_I3DPrimOperations(GetEngine());
+  myLocalOperations     = new GEOMImpl_ILocalOperations(GetEngine());
+  myHealingOperations   = new GEOMImpl_IHealingOperations(GetEngine());
+  myGroupOperations     = new GEOMImpl_IGroupOperations(GetEngine());
 }
 
 //=============================================================================
@@ -1073,7 +1073,7 @@ bool AdvancedEngine_IOperations::MakeInternalGroup
   // Get faces that are laying on conical faces.
   if (aConicalFaces.IsEmpty() == Standard_False) {
     Handle(GEOM_Object) aCone =
-      GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
+      GetEngine()->AddObject(GEOM_TSHAPE);
     Handle(GEOM_Function) aFunction =
       aCone->AddFunction(AdvancedEngine_PipeTShapeDriver::GetID(), TSHAPE_BASIC);
     TopTools_ListIteratorOfListOfShape aFIter(aConicalFaces);
@@ -1911,7 +1911,7 @@ Handle(TColStd_HSequenceOfTransient)
   MESSAGE("AdvancedEngine_IOperations::MakePipeTShape");
   SetErrorCode(KO);
   //Add a new object
-  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
+  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_TSHAPE);
 
   //Add a new shape function with parameters
   Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_PipeTShapeDriver::GetID(), TSHAPE_BASIC);
@@ -2064,7 +2064,7 @@ AdvancedEngine_IOperations::MakePipeTShapeWithPosition
 {
   SetErrorCode(KO);
   //Add a new object
-  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
+  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_TSHAPE);
   /////////////////
   // TSHAPE CODE
   /////////////////
@@ -2230,7 +2230,7 @@ AdvancedEngine_IOperations::MakePipeTShapeChamfer
 {
   SetErrorCode(KO);
   //Add a new object
-  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
+  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_TSHAPE);
   //Add a new shape function with parameters
   Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_PipeTShapeDriver::GetID(), TSHAPE_CHAMFER);
   if (aFunction.IsNull()) return NULL;
@@ -2456,7 +2456,7 @@ AdvancedEngine_IOperations::MakePipeTShapeChamferWithPosition
 {
   SetErrorCode(KO);
   //Add a new object
-  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
+  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_TSHAPE);
   //Add a new shape function with parameters
   Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_PipeTShapeDriver::GetID(), TSHAPE_CHAMFER);
   if (aFunction.IsNull()) return NULL;
@@ -2683,7 +2683,7 @@ AdvancedEngine_IOperations::MakePipeTShapeFillet
 {
   SetErrorCode(KO);
   //Add a new object
-  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
+  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_TSHAPE);
   //Add a new shape function with parameters
   Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_PipeTShapeDriver::GetID(), TSHAPE_FILLET);
   if (aFunction.IsNull()) return NULL;
@@ -2931,7 +2931,7 @@ AdvancedEngine_IOperations::MakePipeTShapeFilletWithPosition
 {
   SetErrorCode(KO);
   //Add a new object
-  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
+  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_TSHAPE);
   //Add a new shape function with parameters
   Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_PipeTShapeDriver::GetID(), TSHAPE_FILLET);
   if (aFunction.IsNull()) return NULL;
@@ -3178,7 +3178,7 @@ Handle(GEOM_Object) AdvancedEngine_IOperations::MakeDividedDisk (double theR, do
     return NULL;
   }
   //Add a new object
-  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_DIVIDEDDISK);
+  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_DIVIDEDDISK);
 
   //Add a new shape function with parameters
   Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_DividedDiskDriver::GetID(), DIVIDEDDISK_R_RATIO);
@@ -3245,7 +3245,7 @@ Handle(GEOM_Object) AdvancedEngine_IOperations::MakeDividedDiskPntVecR (Handle(G
   SetErrorCode(KO);
 
   //Add a new object
-  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_DIVIDEDDISK);
+  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_DIVIDEDDISK);
 
   //Add a new shape function with parameters
   Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_DividedDiskDriver::GetID(), DIVIDEDDISK_R_VECTOR_PNT);
@@ -3317,7 +3317,7 @@ Handle(GEOM_Object) AdvancedEngine_IOperations::MakeDividedCylinder (double theR
   SetErrorCode(KO);
   
   //Add a new object
-  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_DIVIDEDCYLINDER);
+  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_DIVIDEDCYLINDER);
 
   Handle(GEOM_Object) aBaseShape = MakeDividedDisk(theR, 67.0, 1, thePattern);
   aBaseShape->GetLastFunction()->SetDescription("");   // Erase dump of MakeDividedDisk
@@ -3365,7 +3365,7 @@ Handle(GEOM_Object) AdvancedEngine_IOperations::MakeSmoothingSurface (std::list<
   SetErrorCode(KO);
 
   //Add a new object
-  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_SMOOTHINGSURFACE);
+  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_SMOOTHINGSURFACE);
 
   //Add a new shape function with parameters
   Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_SmoothingSurfaceDriver::GetID(), SMOOTHINGSURFACE_LPOINTS);
index 8a28dded39f65272c8e8dabec5e26c415e3fa2e6..58c3a269e0215862b0e40d7ecec4a64b0a567b92 100644 (file)
@@ -165,7 +165,7 @@ public:
                                              bool fuse);
   
 public:
-  AdvancedEngine_IOperations(GEOM_Engine* theEngine, int theDocID);
+  AdvancedEngine_IOperations(GEOM_Engine* theEngine);
   ~AdvancedEngine_IOperations();
 
   Handle(TColStd_HSequenceOfTransient) 
index f7d3603fa2bb105bd9062df2338cc26cb53b1d27..40c79e2101906a97fe4dc6a1b36a94b8e54f0313 100644 (file)
@@ -33,7 +33,7 @@
 #include "Utils_ExceptHandlers.hxx"
 #include "utilities.h"
 
-std::map <int, AdvancedEngine_IOperations*>  AdvancedEngine_OperationsCreator::_mapOfOperations;
+AdvancedEngine_IOperations* AdvancedEngine_OperationsCreator::_operation;
 
 AdvancedEngine_OperationsCreator::AdvancedEngine_OperationsCreator()
 {
@@ -51,19 +51,17 @@ AdvancedEngine_OperationsCreator::~AdvancedEngine_OperationsCreator()
 }
 
 GEOM_IOperations_i* AdvancedEngine_OperationsCreator::Create (PortableServer::POA_ptr thePOA,
-                                                              int                     theStudyId,
                                                               GEOM::GEOM_Gen_ptr      theEngine,
                                                               ::GEOMImpl_Gen*         theGenImpl)
 {
   Unexpect aCatch(SALOME_SalomeException);
   MESSAGE( "AdvancedEngine_OperationsCreator::Create" );
-  return new AdvancedEngine_IOperations_i( thePOA, theEngine, get( theGenImpl, theStudyId ) );
+  return new AdvancedEngine_IOperations_i( thePOA, theEngine, get( theGenImpl ) );
 }
 
-AdvancedEngine_IOperations* AdvancedEngine_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl,
-                                                                  int             theStudyId )
+AdvancedEngine_IOperations* AdvancedEngine_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl )
 {
-  if (_mapOfOperations.find( theStudyId ) == _mapOfOperations.end() )
-    _mapOfOperations[theStudyId] = new AdvancedEngine_IOperations( theGenImpl, theStudyId );
-  return _mapOfOperations[theStudyId];
+  if( !_operation )
+    _operation = new AdvancedEngine_IOperations( theGenImpl );
+  return _operation;
 }
index 9d5e6a9f03a9a34c142bd2a5e07e07129d44dff9..b1b3b3c047c773f8bcab90288513f4dabd87738b 100755 (executable)
@@ -41,15 +41,13 @@ public:
   ~AdvancedEngine_OperationsCreator();
 
   GEOM_IOperations_i* Create (PortableServer::POA_ptr thePOA,
-                             int                     theStudyId,
-                             GEOM::GEOM_Gen_ptr      theEngine,
-                             ::GEOMImpl_Gen*         theGenImpl);
+                                         GEOM::GEOM_Gen_ptr      theEngine,
+                                         ::GEOMImpl_Gen*         theGenImpl);
 
 private:
-  static AdvancedEngine_IOperations* get( ::GEOMImpl_Gen* theGenImpl,
-                                         int             theStudyId );
+  static AdvancedEngine_IOperations* get(::GEOMImpl_Gen* theGenImpl);
 private:
-  static std::map <int, AdvancedEngine_IOperations*>  _mapOfOperations;
+  static AdvancedEngine_IOperations* _operation;
 };
 
 #endif
index aef497ee06df2302464ef0d81f5caadcf566f333..353bb7b36485dc34eea48dc884b93a4c5558e7e3 100644 (file)
@@ -216,7 +216,7 @@ void AdvancedGUI_DividedCylinderDlg::ValueChangedInSpinBox()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr AdvancedGUI_DividedCylinderDlg::createOperation()
 {
-  return getGeomEngine()->GetPluginOperations(getStudyId(), "AdvancedEngine");
+  return getGeomEngine()->GetPluginOperations("AdvancedEngine");
 }
 
 //=================================================================================
index 1a50ca61323af21ccf28078e72ab008f055e6e59..557a0666b956d1aec2a653d4760e5e5f88d61800 100644 (file)
@@ -392,7 +392,7 @@ void AdvancedGUI_DividedDiskDlg::ValueChangedInSpinBox()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr AdvancedGUI_DividedDiskDlg::createOperation()
 {
-  return getGeomEngine()->GetPluginOperations(getStudyId(), "AdvancedEngine");
+  return getGeomEngine()->GetPluginOperations("AdvancedEngine");
 }
 
 //=================================================================================
index b8a3904b780d526d28c40c6d739cef79f05555da..5216a5b1fb2865ddfda5fbac2f1b0584d90eb2f1 100644 (file)
@@ -555,7 +555,7 @@ void AdvancedGUI_PipeTShapeDlg::SelectionIntoArgument()
 
           if (aFindedObject->_is_nil()) { // Object not found in study
             GEOM::GEOM_IShapesOperations_var aShapesOp =
-              getGeomEngine()->GetIShapesOperations(getStudyId());
+              getGeomEngine()->GetIShapesOperations();
             aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
           }
           else {
@@ -847,7 +847,7 @@ void AdvancedGUI_PipeTShapeDlg::DisplayPreview (const bool activate, const bool
 //=================================================================================
 GEOM::GEOM_IOperations_ptr AdvancedGUI_PipeTShapeDlg::createOperation()
 {
-  return getGeomEngine()->GetPluginOperations(getStudyId(), "AdvancedEngine");
+  return getGeomEngine()->GetPluginOperations("AdvancedEngine");
 }
 
 //=================================================================================
@@ -1217,8 +1217,7 @@ bool AdvancedGUI_PipeTShapeDlg::executeNoCheck (ObjectList& objects)
 // function : restoreSubShapes
 // purpose  :
 //=================================================================================
-void AdvancedGUI_PipeTShapeDlg::restoreSubShapes (SALOMEDS::Study_ptr theStudy,
-                                                  SALOMEDS::SObject_ptr theSObject)
+void AdvancedGUI_PipeTShapeDlg::restoreSubShapes (SALOMEDS::SObject_ptr theSObject)
 {
   SALOMEDS::GenericAttribute_var anAttr;
   if (!theSObject->FindAttribute(anAttr, "AttributeIOR"))
@@ -1236,7 +1235,7 @@ void AdvancedGUI_PipeTShapeDlg::restoreSubShapes (SALOMEDS::Study_ptr theStudy,
   ObjectList::iterator it = pipeTShapeGroupObjects.begin();
 
   for (int i = 0; it != pipeTShapeGroupObjects.end(); it++, i++) {
-    getGeomEngine()->AddInStudy(theStudy, (*it), tr((*it)->GetName()).toStdString().c_str(), theFather);
+    getGeomEngine()->AddInStudy((*it), tr((*it)->GetName()).toStdString().c_str(), theFather);
   }
 }
 
index ad188a489464b9a25dd596a546822b575a4e1924..7518c36fded4b177fbd26ed03edd9f97120ca94c 100644 (file)
@@ -78,7 +78,7 @@ protected:
   virtual GEOM::GEOM_IOperations_ptr createOperation();
   virtual bool isValid (QString&);
   virtual bool execute (ObjectList&);
-  virtual void restoreSubShapes (SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr);
+  virtual void restoreSubShapes (SALOMEDS::SObject_ptr);
   virtual QList<GEOM::GeomObjPtr> getSourceObjects();
 
 private:
index 75f688d365e5f6aa7cece94b1d663a392c07c86d..c4e94322efb730bf044e24ff2a0b9d556a91f03f 100644 (file)
@@ -195,7 +195,7 @@ void AdvancedGUI_SmoothingSurfaceDlg::enterEvent (QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr AdvancedGUI_SmoothingSurfaceDlg::createOperation()
 {
-  return getGeomEngine()->GetPluginOperations(getStudyId(), "AdvancedEngine");
+  return getGeomEngine()->GetPluginOperations("AdvancedEngine");
 }
 
 //=================================================================================
index 83cca591d366a6c177388eec23c4d581954dd3ce..bb1a0699f9763e4fbeae22190cc2d4545d0d656a 100644 (file)
@@ -109,11 +109,8 @@ bool BREPPlugin_GUI::importBREP( SUIT_Desktop* parent )
 {
   SalomeApp_Application* app = getGeometryGUI()->getApp();
   if ( !app ) return false;
-  SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*> ( app->activeStudy() );
-  if ( !study ) return false;
 
-  SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
-  GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "BREPPluginEngine" );
+  GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( "BREPPluginEngine" );
   BREPOpPtr brepOp = GEOM::IBREPOperations::_narrow( op );
   if ( brepOp.isNull() ) return false;
   
@@ -133,35 +130,34 @@ bool BREPPlugin_GUI::importBREP( SUIT_Desktop* parent )
       
       try
       {
-       app->putInfo( tr( "GEOM_PRP_LOADING" ).arg( fileName ) );
-       transaction.start();
-       GEOM::ListOfGO_var result = brepOp->ImportBREP( fileName.toUtf8().constData() );
-       if ( result->length() > 0 && brepOp->IsDone() )
-       {
-         GEOM::GEOM_Object_var main = result[0];
-         QString publishName = GEOMBase::GetDefaultName( SUIT_Tools::file( fileName, true ) );
-         SALOMEDS::SObject_var so = GeometryGUI::GetGeomGen()->PublishInStudy( dsStudy,
-                                                                               SALOMEDS::SObject::_nil(),
-                                                                               main.in(),
-                                                                               publishName.toUtf8().constData() );
+        app->putInfo( tr( "GEOM_PRP_LOADING" ).arg( fileName ) );
+        transaction.start();
+        GEOM::ListOfGO_var result = brepOp->ImportBREP( fileName.toUtf8().constData() );
+        if ( result->length() > 0 && brepOp->IsDone() )
+        {
+          GEOM::GEOM_Object_var main = result[0];
+          QString publishName = GEOMBase::GetDefaultName( SUIT_Tools::file( fileName, true ) );
+          SALOMEDS::SObject_var so = GeometryGUI::GetGeomGen()->PublishInStudy( SALOMEDS::SObject::_nil(),
+                                                                                                                       main.in(),
+                                                                                                                       publishName.toUtf8().constData() );
          
-         entryList.append( so->GetID() );
-         transaction.commit();
-         GEOM_Displayer( study ).Display( main.in() );
+          entryList.append( so->GetID() );
+          transaction.commit();
+          GEOM_Displayer().Display( main.in() );
           main->UnRegister();
-       }
-       else
-       {
-         transaction.abort();
-         errors.append( QString( "%1 : %2" ).arg( fileName ).arg( brepOp->GetErrorCode() ) );
-       }
+        }
+        else
+        {
+          transaction.abort();
+          errors.append( QString( "%1 : %2" ).arg( fileName ).arg( brepOp->GetErrorCode() ) );
+        }
       }
       catch( const SALOME::SALOME_Exception& e )
       {
-       transaction.abort();
+        transaction.abort();
       }
     }
-    getGeometryGUI()->updateObjBrowser( true );
+    getGeometryGUI()->updateObjBrowser();
     app->browseObjects( entryList );
     
     if ( errors.count() > 0 )
@@ -182,11 +178,8 @@ bool BREPPlugin_GUI::exportBREP( SUIT_Desktop* parent )
 {
   SalomeApp_Application* app = getGeometryGUI()->getApp();
   if ( !app ) return false;
-  SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*> ( app->activeStudy() );
-  if ( !study ) return false;
 
-  SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
-  GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "BREPPluginEngine" );
+  GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( "BREPPluginEngine" );
   BREPOpPtr brepOp = GEOM::IBREPOperations::_narrow( op );
   if ( brepOp.isNull() ) return false;
 
index dd8c271972e4a62b2cb12d2f03ef74c58c146b9d..0d5461955d637ca8ebddcc61aee5a6f2d9bc310a 100755 (executable)
@@ -46,12 +46,11 @@ BREPPlugin_IECallBack::~BREPPlugin_IECallBack()
  */
 //=============================================================================
 bool 
-BREPPlugin_IECallBack::Export( int                            theDocId,
-                              const Handle(GEOM_Object)      theOriginal,
-                              const TCollection_AsciiString& theFileName,
-                              const TCollection_AsciiString& theFormatName )
+BREPPlugin_IECallBack::Export( const Handle(GEOM_Object)      theOriginal,
+                                          const TCollection_AsciiString& theFileName,
+                                          const TCollection_AsciiString& theFormatName )
 {
-  BREPPlugin_IOperations* aPluginOperations = BREPPlugin_OperationsCreator::get( GetEngine(), theDocId );
+  BREPPlugin_IOperations* aPluginOperations = BREPPlugin_OperationsCreator::get( GetEngine() );
   aPluginOperations->ExportBREP( theOriginal, theFileName );
   return true;
 }
@@ -62,11 +61,10 @@ BREPPlugin_IECallBack::Export( int                            theDocId,
  */
 //=============================================================================
 Handle(TColStd_HSequenceOfTransient)
-BREPPlugin_IECallBack::Import( int                            theDocId,
-                              const TCollection_AsciiString& theFormatName,
-                              const TCollection_AsciiString& theFileName )
+BREPPlugin_IECallBack::Import( const TCollection_AsciiString& theFormatName,
+                                          const TCollection_AsciiString& theFileName )
 {
-  BREPPlugin_IOperations* aPluginOperations = BREPPlugin_OperationsCreator::get( GetEngine(), theDocId );
+  BREPPlugin_IOperations* aPluginOperations = BREPPlugin_OperationsCreator::get( GetEngine() );
   return aPluginOperations->ImportBREP( theFileName );
 }
 
index a718d0f8b9faf677ecfa75f98ac20ada742a7c5a..9d59d79bc060a8fa068a850818431595d93e65d7 100644 (file)
@@ -36,14 +36,12 @@ public:
   BREPPlugin_IECallBack();
   ~BREPPlugin_IECallBack();
   
-  bool Export( int                            theDocId,
-              const Handle(GEOM_Object)      theOriginal,
-              const TCollection_AsciiString& theFileName,
-              const TCollection_AsciiString& theFormatName );
+  bool Export( const Handle(GEOM_Object)      theOriginal,
+                  const TCollection_AsciiString& theFileName,
+                  const TCollection_AsciiString& theFormatName );
 
-  Handle(TColStd_HSequenceOfTransient) Import( int                            theDocId,
-                                              const TCollection_AsciiString& theFormatName,
-                                              const TCollection_AsciiString& theFileName );
+  Handle(TColStd_HSequenceOfTransient) Import( const TCollection_AsciiString& theFormatName,
+                                                                  const TCollection_AsciiString& theFileName );
 };
 
 #endif
index 589d93759b3e9ce9f4578508dc9fd3db87757d46..952f9ca78c9a8ff3a829f3e7e89b14f53423d978 100644 (file)
@@ -38,8 +38,8 @@
  *  Constructor
  */
 //=============================================================================
-BREPPlugin_IOperations::BREPPlugin_IOperations( GEOM_Engine* theEngine, int theDocID )
-: GEOMImpl_IBaseIEOperations( theEngine, theDocID )
+BREPPlugin_IOperations::BREPPlugin_IOperations( GEOM_Engine* theEngine )
+: GEOMImpl_IBaseIEOperations( theEngine )
 {
   MESSAGE( "BREPPlugin_IOperations::BREPPlugin_IOperations" );
 }
@@ -74,7 +74,7 @@ void BREPPlugin_IOperations::ExportBREP( const Handle(GEOM_Object)      theOrigi
   if( aRefFunction.IsNull() ) return;  //There is no function which creates an object to be exported
 
   //Add a new result object
-  Handle(GEOM_Object) result = GetEngine()->AddObject( GetDocID(), GEOM_IMPORT);
+  Handle(GEOM_Object) result = GetEngine()->AddObject( GEOM_IMPORT);
 
   //Add an Export function
   Handle(GEOM_Function) aFunction = result->AddFunction( BREPPlugin_ExportDriver::GetID(), EXPORT_SHAPE );
@@ -123,7 +123,7 @@ BREPPlugin_IOperations::ImportBREP( const TCollection_AsciiString& theFileName )
   if( theFileName.IsEmpty() ) return NULL;
 
   //Add a new result object
-  Handle(GEOM_Object) anImported = GetEngine()->AddObject( GetDocID(), GEOM_IMPORT );
+  Handle(GEOM_Object) anImported = GetEngine()->AddObject( GEOM_IMPORT );
 
   //Add an Import function
   Handle(GEOM_Function) aFunction =
index d2eaebd503c561b57fdad39a7ef460a170d53b0f..831b1c792305442ac1def9c87f66448d986f217d 100644 (file)
@@ -30,7 +30,7 @@
 class BREPPLUGINENGINE_EXPORT BREPPlugin_IOperations: public GEOMImpl_IBaseIEOperations
 {
 public:
-  BREPPlugin_IOperations( GEOM_Engine*, int );
+  BREPPlugin_IOperations( GEOM_Engine* );
   ~BREPPlugin_IOperations();
 
   void ExportBREP( const Handle(GEOM_Object),
index 7e55ee0443fb06468d15962e7e185d06b3efd0aa..f1b96159bdb0e4dc63a5f2e4b94445e43b8fea34 100644 (file)
@@ -32,7 +32,7 @@
 // OCCT includes
 #include <TFunction_DriverTable.hxx>
 
-std::map <int, BREPPlugin_IOperations*> BREPPlugin_OperationsCreator::_mapOfOperations;
+BREPPlugin_IOperations* BREPPlugin_OperationsCreator::_operation;
 
 BREPPlugin_OperationsCreator::BREPPlugin_OperationsCreator()
 {
@@ -51,19 +51,17 @@ BREPPlugin_OperationsCreator::~BREPPlugin_OperationsCreator()
 }
 
 GEOM_IOperations_i* BREPPlugin_OperationsCreator::Create( PortableServer::POA_ptr thePOA,
-                                                          int                     theStudyId,
                                                           GEOM::GEOM_Gen_ptr      theEngine,
                                                           ::GEOMImpl_Gen*         theGenImpl )
 {
   Unexpect aCatch( SALOME_SalomeException );
   MESSAGE( "BREPPlugin_OperationsCreator::Create" );
-  return new BREPPlugin_IOperations_i( thePOA, theEngine, get( theGenImpl, theStudyId ) );
+  return new BREPPlugin_IOperations_i( thePOA, theEngine, get( theGenImpl ) );
 }
 
-BREPPlugin_IOperations* BREPPlugin_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl,
-                                                          int             theStudyId )
+BREPPlugin_IOperations* BREPPlugin_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl )
 {
-  if (_mapOfOperations.find( theStudyId ) == _mapOfOperations.end() )
-    _mapOfOperations[theStudyId] = new BREPPlugin_IOperations( theGenImpl, theStudyId );
-  return _mapOfOperations[theStudyId];
+  if( !_operation )
+    _operation = new BREPPlugin_IOperations( theGenImpl );
+  return _operation;
 }
index f2deb8646d74cc8403995f60f0730aa3baa79230..e49c6cb533b769b914a7815c0aaef0e0f9aaf0d2 100755 (executable)
@@ -41,15 +41,13 @@ public:
   ~BREPPlugin_OperationsCreator();
 
   GEOM_IOperations_i* Create( PortableServer::POA_ptr thePOA,
-                             int                     theStudyId,
-                             GEOM::GEOM_Gen_ptr      theEngine,
-                             ::GEOMImpl_Gen*         theGenImpl );
+                                         GEOM::GEOM_Gen_ptr      theEngine,
+                                         ::GEOMImpl_Gen*         theGenImpl );
 private:
-  static BREPPlugin_IOperations* get( ::GEOMImpl_Gen*         theGenImpl,
-                                     int                     theStudyId );
+  static BREPPlugin_IOperations* get(::GEOMImpl_Gen* theGenImpl);
 
 private:
-  static std::map <int, BREPPlugin_IOperations*>  _mapOfOperations;
+  static BREPPlugin_IOperations* _operation;
 
   friend class BREPPlugin_IECallBack;
 };
index 506b486066cdd6f876617eedabb6e8d64ee680fb..93da18e31f49ec52a8276120f9865b30c9993875 100644 (file)
@@ -452,7 +452,7 @@ void BasicGUI_ArcDlg::enterEvent( QEvent* )
 //=================================================================================
 GEOM::GEOM_IOperations_ptr BasicGUI_ArcDlg::createOperation()
 {
-  return myGeomGUI->GetGeomGen()->GetICurvesOperations( getStudyId() );
+  return myGeomGUI->GetGeomGen()->GetICurvesOperations();
 }
 
 //=================================================================================
index 9b43abc0a5647b07045bbde603eab5e54c913f63..a94c7fcbef9f7e9cd962caf9b45b69fe92f4704d 100644 (file)
@@ -543,7 +543,7 @@ double BasicGUI_CircleDlg::getRadius() const
 //=================================================================================
 GEOM::GEOM_IOperations_ptr BasicGUI_CircleDlg::createOperation()
 {
-  return myGeomGUI->GetGeomGen()->GetICurvesOperations( getStudyId() );
+  return myGeomGUI->GetGeomGen()->GetICurvesOperations();
 }
 
 //=================================================================================
index 89866fc8f452ca0ab560acc475e8909efeec8bd3..2a363b49d23637c90a264a385253f6200e2e69a0 100644 (file)
@@ -418,7 +418,7 @@ void BasicGUI_CurveDlg::enterEvent (QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr BasicGUI_CurveDlg::createOperation()
 {
-  return myGeomGUI->GetGeomGen()->GetICurvesOperations(getStudyId());
+  return myGeomGUI->GetGeomGen()->GetICurvesOperations();
 }
 
 //=================================================================================
index 9ef110a6463a59a65204c65c4b99318c585dc6e8..4fdea1811e89d9d80e6b32bb87a4679691a46c98 100644 (file)
@@ -371,7 +371,7 @@ void BasicGUI_EllipseDlg::ValueChangedInSpinBox( double newValue )
 //=================================================================================
 GEOM::GEOM_IOperations_ptr BasicGUI_EllipseDlg::createOperation()
 {
-  return myGeomGUI->GetGeomGen()->GetICurvesOperations( getStudyId() );
+  return myGeomGUI->GetGeomGen()->GetICurvesOperations();
 }
 
 //=================================================================================
index c520f9af680c69621b6cee6f918fb8f68905cebd..288062c80f7cb8b84b3291545d23840b918d3841 100644 (file)
@@ -364,7 +364,7 @@ void BasicGUI_LineDlg::enterEvent( QEvent* )
 //=================================================================================
 GEOM::GEOM_IOperations_ptr BasicGUI_LineDlg::createOperation()
 {
-  return myGeomGUI->GetGeomGen()->GetIBasicOperations( getStudyId() );
+  return myGeomGUI->GetGeomGen()->GetIBasicOperations();
 }
 
 //=================================================================================
index 56bb4eb6e066520859905359b756a9c2eeb563d1..ee6448c35fadf887ce58c1ba46b03a1d9f1ca859 100644 (file)
@@ -511,7 +511,7 @@ void BasicGUI_MarkerDlg::enterEvent( QEvent* )
 //=================================================================================
 GEOM::GEOM_IOperations_ptr BasicGUI_MarkerDlg::createOperation()
 {
-  return myGeomGUI->GetGeomGen()->GetIBasicOperations( getStudyId() );
+  return myGeomGUI->GetGeomGen()->GetIBasicOperations();
 }
 
 //=================================================================================
index 05ac56dc867d39083356259f9800a522ecbeb6c2..17d431515e24e1ebc19560190084a94a430499fa 100644 (file)
@@ -675,7 +675,7 @@ QString BasicGUI_PlaneDlg::getSizeAsString() const
 //=================================================================================
 GEOM::GEOM_IOperations_ptr BasicGUI_PlaneDlg::createOperation()
 {
-  return myGeomGUI->GetGeomGen()->GetIBasicOperations( getStudyId() );
+  return myGeomGUI->GetGeomGen()->GetIBasicOperations();
 }
 
 //=================================================================================
index 5d7668a8a59bb12a4a6153c44a72877c84d763da..196a624b6f49e11157ac41f8bdfdbb532dafc5fe 100644 (file)
@@ -733,7 +733,7 @@ void BasicGUI_PointDlg::OnPointSelected(const gp_Pnt& thePnt)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr BasicGUI_PointDlg::createOperation()
 {
-  return myGeomGUI->GetGeomGen()->GetIBasicOperations(getStudyId());
+  return myGeomGUI->GetGeomGen()->GetIBasicOperations();
 }
 
 //=================================================================================
index 7d4d41923babac4132a534ab8f947c4aca42f96a..d0eaa03aec095d9a8e336bfb728a71007bb557b2 100644 (file)
@@ -395,7 +395,7 @@ void BasicGUI_VectorDlg::ReverseVector( int state )
 //=================================================================================
 GEOM::GEOM_IOperations_ptr BasicGUI_VectorDlg::createOperation()
 {
-  return myGeomGUI->GetGeomGen()->GetIBasicOperations( getStudyId() );
+  return myGeomGUI->GetGeomGen()->GetIBasicOperations();
 }
 
 //=================================================================================
index a623ab2cf15c000c224e32d1ecebbbff2235b9df..bb337df3fccc1386376e3d8a438b0ee0429c801a 100644 (file)
@@ -335,7 +335,7 @@ void BasicGUI_WorkingPlaneDlg::SelectionIntoArgument()
           aName = aName + ":edge_" + QString::number( anIndex );
 
           GEOM::GEOM_IShapesOperations_var aShapesOp =
-            getGeomEngine()->GetIShapesOperations( getStudyId() );
+            getGeomEngine()->GetIShapesOperations();
           if ( myEditCurrentArgument == Group2->LineEdit1 )
             myVectX = aShapesOp->GetSubShape( aSelectedObject, anIndex );
           else
@@ -489,7 +489,7 @@ bool BasicGUI_WorkingPlaneDlg::updateWPlane( const bool showPreview )
     Zz = Xx = 1.;
 
     GEOM::GEOM_IMeasureOperations_ptr aMeasureOp =
-      myGeomGUI->GetGeomGen()->GetIMeasureOperations( getStudyId() );
+      myGeomGUI->GetGeomGen()->GetIMeasureOperations();
     aMeasureOp->GetPosition( myFace, Ox, Oy, Oz, Zx, Zy, Zz, Xx, Xy, Xz);
 
     if ( aMeasureOp->IsDone() ) {
@@ -582,7 +582,7 @@ bool BasicGUI_WorkingPlaneDlg::updateWPlane( const bool showPreview )
   }
 
   if ( showPreview ) {
-    GEOM::GEOM_IBasicOperations_var aBasicOp = getGeomEngine()->GetIBasicOperations( getStudyId() );
+    GEOM::GEOM_IBasicOperations_var aBasicOp = getGeomEngine()->GetIBasicOperations();
     GEOM::GEOM_Object_var anObj = aBasicOp->MakeMarker
       ( myWPlane.Location().X(),   myWPlane.Location().Y(),   myWPlane.Location().Z(),
         myWPlane.XDirection().X(), myWPlane.XDirection().Y(), myWPlane.XDirection().Z(),
index 6f8c2ac0b0e29dabeda7af7ff40a2a5feb1eee77..178ed57f441d40e292ad292e97251a6f47b0c515 100644 (file)
@@ -422,7 +422,7 @@ void BlocksGUI_BlockDlg::enterEvent (QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr BlocksGUI_BlockDlg::createOperation()
 {
-  return getGeomEngine()->GetIBlocksOperations(getStudyId());
+  return getGeomEngine()->GetIBlocksOperations();
 }
 
 //=================================================================================
index 984bb22ec01294794b8c8ef46ab5ecf3abf56855..f9f543b0f870870494941786159d3aa5e7f358c9 100644 (file)
@@ -360,7 +360,7 @@ bool BlocksGUI_ExplodeDlg::isAllSubShapes() const
 //=================================================================================
 GEOM::GEOM_IOperations_ptr BlocksGUI_ExplodeDlg::createOperation()
 {
-  return getGeomEngine()->GetIBlocksOperations( getStudyId() );
+  return getGeomEngine()->GetIBlocksOperations();
 }
 
 //=================================================================================
index c585745f5ff30459456991fb2a33765a94a6da08..041e57f4e77c39e1c20b652ae11a68766dcf5d92 100644 (file)
@@ -222,7 +222,7 @@ void BlocksGUI_PropagateDlg::enterEvent( QEvent* )
 //=================================================================================
 GEOM::GEOM_IOperations_ptr BlocksGUI_PropagateDlg::createOperation()
 {
-  return getGeomEngine()->GetIBlocksOperations( getStudyId() );
+  return getGeomEngine()->GetIBlocksOperations();
 }
 
 //=================================================================================
index b1b01f88db13062408e8649c3148ca237e3bff71..116327bfe9827dac60617b170b469b800847f3a2 100644 (file)
@@ -482,7 +482,7 @@ void BlocksGUI_QuadFaceDlg::activateSelection()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr BlocksGUI_QuadFaceDlg::createOperation()
 {
-  return getGeomEngine()->GetIBlocksOperations(getStudyId());
+  return getGeomEngine()->GetIBlocksOperations();
 }
 
 //=================================================================================
index d326adab0a9ea562362b4e7420b967d0976f3da0..d4e285aed87580777555a389eb8e0b48e09bf569 100644 (file)
@@ -543,7 +543,7 @@ void BlocksGUI_TrsfDlg::enableWidgets()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr BlocksGUI_TrsfDlg::createOperation()
 {
-  return getGeomEngine()->GetIBlocksOperations(getStudyId());
+  return getGeomEngine()->GetIBlocksOperations();
 }
 
 //=================================================================================
index b766e214b69947d665c3ea99d28b0ce1884f66db..c2d1d97da8433872da5c1a1dab68e1ee058a0ce6 100644 (file)
@@ -378,7 +378,7 @@ void BooleanGUI_Dialog::enterEvent (QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr BooleanGUI_Dialog::createOperation()
 {
-  return getGeomEngine()->GetIBooleanOperations(getStudyId());
+  return getGeomEngine()->GetIBooleanOperations();
 }
 
 //=================================================================================
@@ -457,12 +457,11 @@ bool BooleanGUI_Dialog::execute (ObjectList& objects)
 // function : restoreSubShapes
 // purpose  :
 //=================================================================================
-void BooleanGUI_Dialog::restoreSubShapes (SALOMEDS::Study_ptr   theStudy,
-                                          SALOMEDS::SObject_ptr theSObject)
+void BooleanGUI_Dialog::restoreSubShapes (SALOMEDS::SObject_ptr theSObject)
 {
   if (mainFrame()->CheckBoxRestoreSS->isChecked()) {
     // empty list of arguments means that all arguments should be restored
-    getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, GEOM::ListOfGO(),
+    getGeomEngine()->RestoreSubShapesSO( theSObject, GEOM::ListOfGO(),
                                          /*theFindMethod=*/GEOM::FSM_GetInPlace, // ? GEOM::FSM_GetSame
                                          /*theInheritFirstArg=*/myOperation == BooleanGUI::CUT,
                                          mainFrame()->CheckBoxAddPrefix->isChecked()); // ? false
index e2f535595fbd64ed1a68b57341272d8e191777e4..a009ddecb8d643591f8f1572b11b9a158031fda7 100644 (file)
@@ -50,7 +50,7 @@ protected:
   virtual GEOM::GEOM_IOperations_ptr createOperation();
   virtual bool                       isValid( QString& );
   virtual bool                       execute( ObjectList& );
-  virtual void                       restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr );
+  virtual void                       restoreSubShapes( SALOMEDS::SObject_ptr );
   virtual void                       addSubshapesToStudy();
   virtual QList<GEOM::GeomObjPtr>    getSourceObjects();
 
index 17d4a3bda4e7797b2c6171dba8b1f943a73ae20e..f64a92bf7f70802cc3d636389fd063525a922e50 100644 (file)
@@ -207,7 +207,7 @@ void BuildGUI_CompoundDlg::enterEvent(QEvent* e)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr BuildGUI_CompoundDlg::createOperation()
 {
-  return getGeomEngine()->GetIShapesOperations( getStudyId() );
+  return getGeomEngine()->GetIShapesOperations();
 }
 
 //=================================================================================
@@ -244,12 +244,11 @@ bool BuildGUI_CompoundDlg::execute( ObjectList& objects )
 // function : restoreSubShapes
 // purpose  :
 //=================================================================================
-void BuildGUI_CompoundDlg::restoreSubShapes( SALOMEDS::Study_ptr   theStudy,
-                                             SALOMEDS::SObject_ptr theSObject )
+void BuildGUI_CompoundDlg::restoreSubShapes( SALOMEDS::SObject_ptr theSObject )
 {
   if ( mainFrame()->CheckBoxRestoreSS->isChecked() ) {
     // empty list of arguments means that all arguments should be restored
-    getGeomEngine()->RestoreSubShapesSO( theStudy, theSObject, GEOM::ListOfGO(),
+    getGeomEngine()->RestoreSubShapesSO( theSObject, GEOM::ListOfGO(),
                                          /*theFindMethod=*/GEOM::FSM_GetInPlace, // ? GEOM::FSM_GetSame
                                          /*theInheritFirstArg=*/false,
                                          mainFrame()->CheckBoxAddPrefix->isChecked() );
index 280737050c31d43d84b186b6e6148a775395e539..75737c1ad12b2a7f2b8ad3e1c5ef13496876a27f 100644 (file)
@@ -49,7 +49,7 @@ protected:
   virtual GEOM::GEOM_IOperations_ptr createOperation();
   virtual bool                       isValid( QString& );
   virtual bool                       execute( ObjectList& );
-  virtual void                       restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr );
+  virtual void                       restoreSubShapes( SALOMEDS::SObject_ptr );
   virtual QList<GEOM::GeomObjPtr>    getSourceObjects();
 
 private:
index 57e6169fbcf31d6d406132e0882ea988286fd4c9..ff807392be6ec0760fc747cd9795044e010a52eb 100644 (file)
@@ -416,7 +416,7 @@ void BuildGUI_EdgeDlg::ValueChangedInSpinBox(double newValue)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr BuildGUI_EdgeDlg::createOperation()
 {
-  return getGeomEngine()->GetIShapesOperations(getStudyId());
+  return getGeomEngine()->GetIShapesOperations();
 }
 
 //=================================================================================
index 88ff45f0d2a5579e6e04244c1931e1bfc9ca6041..2a312415b0feb3a91e3bbc2e9e6a989aa219c0cd 100644 (file)
@@ -585,7 +585,7 @@ void BuildGUI_FaceDlg::enterEvent( QEvent* )
 //=================================================================================
 GEOM::GEOM_IOperations_ptr BuildGUI_FaceDlg::createOperation()
 {
-  return getGeomEngine()->GetIShapesOperations( getStudyId() );
+  return getGeomEngine()->GetIShapesOperations();
 }
 
 //=================================================================================
index e32a0ac0e72e0cae7dc73687be1d29b1311fd984..2cd4b281d76c06391a0993e55d5c370499c26d66 100644 (file)
@@ -234,7 +234,7 @@ void BuildGUI_ShellDlg::enterEvent( QEvent* )
 //=================================================================================
 GEOM::GEOM_IOperations_ptr BuildGUI_ShellDlg::createOperation()
 {
-  return getGeomEngine()->GetIShapesOperations( getStudyId() );
+  return getGeomEngine()->GetIShapesOperations();
 }
 
 //=================================================================================
index d564e61ceccbe03318adcff29197b78b32bf8de3..331f481be0cb2aa1e95b0916a94787ea32e9456f 100644 (file)
@@ -296,7 +296,7 @@ void  BuildGUI_SolidDlg::EnableNameField( bool toEnable )
 //=================================================================================
 GEOM::GEOM_IOperations_ptr BuildGUI_SolidDlg::createOperation()
 {
-  return getGeomEngine()->GetIShapesOperations( getStudyId() );
+  return getGeomEngine()->GetIShapesOperations();
 }
 
 //=================================================================================
@@ -308,7 +308,7 @@ bool BuildGUI_SolidDlg::isValid (QString& msg)
   bool ok = !myShells.isEmpty();
 
   GEOM::MeasureOpPtr anOp;
-  anOp.take(myGeomGUI->GetGeomGen()->GetIMeasureOperations(getStudyId()));
+  anOp.take(myGeomGUI->GetGeomGen()->GetIMeasureOperations());
   if (getConstructorId() == 0 && (!GroupSolid->CheckButton1->isChecked() || myShells.count() == 1)) {
        for (int i = 0, n = myShells.count(); i < n && ok; i++) {
          CORBA::String_var aRes = anOp->IsGoodForSolid(myShells[i].get());
@@ -336,7 +336,7 @@ bool BuildGUI_SolidDlg::isClosed( GEOM::GEOM_Object_ptr shell )
 
   if ( !CORBA::is_nil( shell ) ) {
     GEOM::MeasureOpPtr anOp;
-    anOp.take( myGeomGUI->GetGeomGen()->GetIMeasureOperations( getStudyId() ) );
+    anOp.take( myGeomGUI->GetGeomGen()->GetIMeasureOperations() );
 
     // Detect kind of shape and parameters
     aKind = anOp->KindOfShape(shell, anInts, aDbls);
index ee0c055dac4abf9d2fa40c7b232fea695ab8257c..3085a9fefde2112898430fe3061ffecb245a008d 100644 (file)
@@ -263,7 +263,7 @@ void BuildGUI_WireDlg::enterEvent( QEvent* )
 //=================================================================================
 GEOM::GEOM_IOperations_ptr BuildGUI_WireDlg::createOperation()
 {
-  return getGeomEngine()->GetIShapesOperations( getStudyId() );
+  return getGeomEngine()->GetIShapesOperations();
 }
 
 //=================================================================================
index 3f06d4611cf4417e94915aa4cf17a4b065cec21d..91196cb63dede8fb4833f53b6dceb791395f7151 100644 (file)
@@ -59,13 +59,7 @@ myIsMainObject( false )
   myTextItem->setFont( textFont );
 
   myEntry = theEntry;
-
-  SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
-  if ( !app ) return;
-  SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>(app->activeStudy());
-  SALOMEDS::Study_var aStudyDS = GeometryGUI::ClientStudyToStudy( study->studyDS() );
-  int studyId = aStudyDS->StudyId();
-  myGeomObject = GeometryGUI::GetGeomGen()->GetObject( studyId, myEntry.c_str() );
+  myGeomObject = GeometryGUI::GetGeomGen()->GetObject( myEntry.c_str() );
 
   updateName();
 
index 73a24840298f9de399cf2dc36fd644df68a0955d..1b94c1f93bde8d7027559f0da61169199ccb45d4 100644 (file)
@@ -50,8 +50,7 @@ void DependencyTree_Selector::getSelection( SUIT_DataOwnerPtrList& theList ) con
     if( DependencyTree_Object* treeObject = dynamic_cast<DependencyTree_Object*>( myView->selectedObject() ) ) {
       QString studyEntry;
       QString name;
-      GEOM::GEOM_BaseObject_var anObj = GeometryGUI::GetGeomGen()->GetObject( myView->getStudyId(),
-                                                                              treeObject->getEntry().c_str() );
+      GEOM::GEOM_BaseObject_var anObj = GeometryGUI::GetGeomGen()->GetObject( treeObject->getEntry().c_str() );
       if( anObj->_is_nil() )
         continue;
          CORBA::String_var studyEntryVar = anObj->GetStudyEntry();
index 2164574db669c68983c5514d8d984bb2765872aa..f782cd16f88ff3164a8918843cbdcbee9646e202 100644 (file)
@@ -48,9 +48,6 @@ myIsUpdate( true )
   SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
   if ( !app ) return;
 
-  SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
-  myStudy = GeometryGUI::ClientStudyToStudy( study->studyDS());
-
   mySelectionMgr = app->selectionMgr();
   if ( !mySelectionMgr ) return;
 
@@ -183,15 +180,6 @@ QString DependencyTree_View::getViewName() const
   return tr( "DEPENDENCY_TREE" );
 }
 
-//=================================================================================
-// function : getStudyId()
-// purpose  : return Id of current study
-//=================================================================================
-int DependencyTree_View::getStudyId() const
-{
-  return myStudy->StudyId();
-}
-
 //=================================================================================
 // function : getObjectByEntry()
 // purpose  : return DependencyTree_Object by entry
@@ -799,7 +787,7 @@ void DependencyTree_View::getNewTreeModel( bool theUseSelectedObject, bool theUs
 
   // get string which describes dependency tree structure
   SALOMEDS::TMPFile_var SeqFile =
-    GeometryGUI::GetGeomGen()->GetDependencyTree( myStudy, myMainEntries );
+    GeometryGUI::GetGeomGen()->GetDependencyTree( myMainEntries );
   char* buf = (char*)&SeqFile[0];
 
   clearView( true );
index a32526e4419ab0d1fe0ea6b95a4756a071f3be1e..66143bc8dda5f7fbbc4dcb3d0e54448ec803ef85 100644 (file)
@@ -60,7 +60,6 @@ public:
   void                    wheelEvent( QWheelEvent* event );
 
   QString                 getViewName() const;
-  int                     getStudyId() const;
 
   DependencyTree_Object*  getObjectByEntry( const std::string& );
 
@@ -129,7 +128,6 @@ private:
   QCheckBox*              myDisplayDescendants;
   QPushButton*            updateButton;
 
-  SALOMEDS::Study_var     myStudy;
   LightApp_SelectionMgr*  mySelectionMgr;
   GEOM::string_array_var  myMainEntries;
 
index 1b3d58c3f86cd0d69a0196b58459d9d8e2c36ded..aae7fe5fb72512ef92913a6d4360d0b8c284d540 100644 (file)
@@ -66,8 +66,7 @@ void DependencyTree_ViewModel::onShowSelected()
   SALOME_ListIO aSelList;
   aSelMgr->selectedObjects(aSelList);
 
-  SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
-  GEOM_Displayer disp( appStudy );
+  GEOM_Displayer disp;
 
   OCCViewer_ViewManager* anOCCVM = ( OCCViewer_ViewManager* ) app->getViewManager( OCCViewer_Viewer::Type(), /*create=*/ true );
 
@@ -96,8 +95,7 @@ void DependencyTree_ViewModel::onShowOnlySelected()
   SALOME_ListIO aSelList;
   aSelMgr->selectedObjects( aSelList );
 
-  SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
-  GEOM_Displayer disp( appStudy );
+  GEOM_Displayer disp;
 
   OCCViewer_ViewManager* anOCCVM = (OCCViewer_ViewManager*) app->getViewManager( OCCViewer_Viewer::Type(), /*create=*/ true );
 
index f1c83f1fb7f30078e914a2de6484b172605f01c8..19339c6ea1399894a6038d7a93ecdedcbdc4e554 100644 (file)
@@ -87,9 +87,6 @@ bool DisplayGUI::OnGUIEvent(int theCommandID, SUIT_Desktop* parent)
   SalomeApp_Application* app = getGeometryGUI()->getApp();
   if (!app) return false;
 
-  SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
-  if ( !appStudy ) return false;
-
   LightApp_SelectionMgr *Sel = app->selectionMgr();
   SALOME_ListIO selected;
   Sel->selectedObjects( selected );
@@ -173,7 +170,7 @@ bool DisplayGUI::OnGUIEvent(int theCommandID, SUIT_Desktop* parent)
     break;
   }
   Sel->setSelectedObjects( selected );
-  GEOM_Displayer( appStudy ).UpdateColorScale();
+  GEOM_Displayer().UpdateColorScale();
   return true;
 }
 
@@ -183,12 +180,7 @@ bool DisplayGUI::OnGUIEvent(int theCommandID, SUIT_Desktop* parent)
 //=====================================================================================
 void DisplayGUI::DisplayAll()
 {
-  SalomeApp_Application* app = getGeometryGUI()->getApp();
-  if ( !app ) return;
-
-  SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
-  if ( !appStudy ) return;
-  _PTR(Study) aStudy = appStudy->studyDS();
+  _PTR(Study) aStudy = SalomeApp_Application::getStudy();
   if ( !aStudy ) return;
   _PTR(SComponent) SC ( aStudy->FindComponent( "GEOM" ) );
   if ( !SC )
@@ -210,7 +202,7 @@ void DisplayGUI::DisplayAll()
     } 
     anIter->Next();
   }
-  GEOM_Displayer( appStudy ).Display( listIO, true );
+  GEOM_Displayer().Display( listIO, true );
 }
 
 //=====================================================================================
@@ -225,11 +217,10 @@ void DisplayGUI::EraseAll()
   if ( app ) {
     SUIT_ViewWindow* vw = app->desktop()->activeWindow();
     if ( vw ) {
-      SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
       SUIT_ViewManager* vman = vw->getViewManager();
       if ( vman->getType() == OCCViewer_Viewer::Type() || 
            vman->getType() == SVTK_Viewer::Type() ) {
-        GEOM_Displayer( appStudy ).EraseAll(true);
+        GEOM_Displayer().EraseAll(true);
       }
     }
   }
@@ -258,8 +249,8 @@ void DisplayGUI::DisplayOnlyChildren()
   SalomeApp_Application* app = getGeometryGUI()->getApp();
   if (!app) return;
 
-  SalomeApp_Study* anActiveStudy = dynamic_cast<SalomeApp_Study*>(app->activeStudy());
-  if (!anActiveStudy) return;
+  SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>(app->activeStudy());
+  if (!aStudy) return;
 
   LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
   if (!aSelMgr) return;
@@ -275,14 +266,14 @@ void DisplayGUI::DisplayOnlyChildren()
   for (; It.More(); It.Next()) {
     Handle(SALOME_InteractiveObject) anIObject = It.Value();
     if (anIObject->hasEntry()) {
-      _PTR(SObject) SO (anActiveStudy->studyDS()->FindObjectID(anIObject->getEntry()));
+      _PTR(SObject) SO (aStudy->studyDS()->FindObjectID(anIObject->getEntry()));
       if (SO) {
         _PTR(SComponent) SC (SO->GetFatherComponent());
         if (QString(SO->GetID().c_str()) == QString(SO->GetFatherComponent()->GetID().c_str())) {
           // if component is selected, pass it
         }
         else {
-          _PTR(ChildIterator) anIter (anActiveStudy->studyDS()->NewChildIterator(SO));
+          _PTR(ChildIterator) anIter (aStudy->studyDS()->NewChildIterator(SO));
           anIter->InitEx(true);
           while (anIter->More()) {
             _PTR(SObject) valSO (anIter->Value());
@@ -298,7 +289,7 @@ void DisplayGUI::DisplayOnlyChildren()
       }
     }
   }
-  GEOM_Displayer(anActiveStudy).Display(listIO, true);
+  GEOM_Displayer().Display(listIO, true);
 }
 
 //=====================================================================================
@@ -312,8 +303,8 @@ void DisplayGUI::Display()
   SalomeApp_Application* app = getGeometryGUI()->getApp();
   if ( !app ) return;
 
-  SalomeApp_Study* anActiveStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
-  if ( !anActiveStudy ) return;
+  SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
+  if ( !aStudy ) return;
 
   //get SalomeApp selection manager
   LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
@@ -328,12 +319,12 @@ void DisplayGUI::Display()
   for( ;It.More();It.Next() ) {
     Handle(SALOME_InteractiveObject) anIObject = It.Value();
     if ( anIObject->hasEntry() ) {
-      _PTR(SObject) SO ( anActiveStudy->studyDS()->FindObjectID( anIObject->getEntry() ) );
+      _PTR(SObject) SO ( aStudy->studyDS()->FindObjectID( anIObject->getEntry() ) );
       if ( SO && QString(SO->GetID().c_str()) == QString(SO->GetFatherComponent()->GetID().c_str()) ) {
         _PTR(SComponent) SC ( SO->GetFatherComponent() );
         // if component is selected
         listIO.Clear();
-        _PTR(ChildIterator) anIter ( anActiveStudy->studyDS()->NewChildIterator( SO ) );
+        _PTR(ChildIterator) anIter ( aStudy->studyDS()->NewChildIterator( SO ) );
         anIter->InitEx( true );
         while( anIter->More() ) {
           _PTR(SObject) valSO ( anIter->Value() );
@@ -355,7 +346,7 @@ void DisplayGUI::Display()
       listIO.Append( anIObject );
     }
   }
-  GEOM_Displayer( anActiveStudy ).Display( listIO, true );
+  GEOM_Displayer().Display( listIO, true );
 }
 
 
@@ -370,8 +361,8 @@ void DisplayGUI::Erase()
   SalomeApp_Application* app = getGeometryGUI()->getApp();
   if ( !app ) return;
 
-  SalomeApp_Study* anActiveStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
-  if ( !anActiveStudy ) return;
+  SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
+  if ( !aStudy ) return;
 
   //get SalomeApp selection manager
   LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
@@ -386,12 +377,12 @@ void DisplayGUI::Erase()
   for( ; It.More(); It.Next() ) {
     Handle(SALOME_InteractiveObject) anIObject = It.Value();
     if ( anIObject->hasEntry() ) {
-      _PTR(SObject) SO ( anActiveStudy->studyDS()->FindObjectID( anIObject->getEntry() ) );
+      _PTR(SObject) SO ( aStudy->studyDS()->FindObjectID( anIObject->getEntry() ) );
       if ( SO && QString(SO->GetID().c_str()) == QString(SO->GetFatherComponent()->GetID().c_str()) ) {
         _PTR(SComponent) SC ( SO->GetFatherComponent() );
         // if component is selected
         listIO.Clear();
-        _PTR(ChildIterator) anIter ( anActiveStudy->studyDS()->NewChildIterator( SO ) );
+        _PTR(ChildIterator) anIter ( aStudy->studyDS()->NewChildIterator( SO ) );
         anIter->InitEx( true );
         while( anIter->More() ) {
           _PTR(SObject) valSO ( anIter->Value() );
@@ -419,7 +410,7 @@ void DisplayGUI::Erase()
   if(viewWindow->getViewManager()->getType() == SVTK_Viewer::Type())
     aIsForced = false;
 
-  GEOM_Displayer(anActiveStudy).Erase( listIO, aIsForced);
+  GEOM_Displayer().Erase( listIO, aIsForced);
   getGeometryGUI()->getApp()->selectionMgr()->clearSelected();
 }
 
@@ -440,7 +431,7 @@ void DisplayGUI::SetDisplayMode( const int mode, SUIT_ViewWindow* viewWindow )
   SalomeApp_Study* aStudy = dynamic_cast< SalomeApp_Study* >( app->activeStudy() );
   if ( !aStudy ) return;
 
-  GEOM_Displayer displayer( aStudy );
+  GEOM_Displayer displayer;
 
   int mgrId = viewWindow->getViewManager()->getGlobalId();
 
@@ -476,7 +467,7 @@ void DisplayGUI::SetVectorMode( const bool mode, SUIT_ViewWindow* viewWindow )
   if ( !viewWindow ) 
     viewWindow = app->desktop()->activeWindow();
 
-  GEOM_Displayer displayer( aStudy );
+  GEOM_Displayer displayer;
 
   viewWindow->setProperty( "VectorsMode", mode );
 
@@ -525,7 +516,7 @@ void DisplayGUI::SetVerticesMode( const bool mode, SUIT_ViewWindow* viewWindow )
   if ( !viewWindow ) 
     viewWindow = app->desktop()->activeWindow();
 
-  GEOM_Displayer displayer( aStudy );
+  GEOM_Displayer displayer;
 
   viewWindow->setProperty( "VerticesMode", mode );
 
@@ -576,7 +567,7 @@ void DisplayGUI::SetNameMode( const bool mode, SUIT_ViewWindow* viewWindow )
 
   viewWindow->setProperty( "NameMode", mode );
 
-  GEOM_Displayer displayer( aStudy );
+  GEOM_Displayer displayer;
 
   int aMgrId = viewWindow->getViewManager()->getGlobalId();
 
@@ -631,7 +622,7 @@ void DisplayGUI::ChangeDisplayMode( const int mode, SUIT_ViewWindow* viewWindow
   aSelMgr->selectedObjects( selected );
   if ( selected.IsEmpty() ) return;
 
-  GEOM_Displayer displayer( aStudy );
+  GEOM_Displayer displayer;
 
   int mgrId = viewWindow->getViewManager()->getGlobalId();
 
index 18221df3eb216c7f6b2fb310df82d6b450c17ee9..060c0c17e2c7419cb33fb94c6af91d60c2f1cd08 100755 (executable)
@@ -754,7 +754,7 @@ void EntityGUI_3DSketcherDlg::SelectionIntoArgument()
         aSelMgr->GetIndexes(aSelList.First(), aMap);
         if (aMap.Extent() == 1) {
           int anIndex = aMap(1);
-          GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations(getStudyId());
+          GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations();
           aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
         }
       }
@@ -941,7 +941,7 @@ void EntityGUI_3DSketcherDlg::enterEvent (QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr EntityGUI_3DSketcherDlg::createOperation()
 {
-  return getGeomEngine()->GetICurvesOperations(getStudyId());
+  return getGeomEngine()->GetICurvesOperations();
 }
 
 //=================================================================================
index 95bc2cc6820be15f432d06bee79819cd28aaf761..4a1ea5788a1229d3ac50b8ebd547f54195737a9a 100644 (file)
@@ -720,7 +720,7 @@ void EntityGUI_FeatureDetectorDlg::showImageSample()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr EntityGUI_FeatureDetectorDlg::createOperation()
 {
-  return myGeomGUI->GetGeomGen()->GetIShapesOperations( getStudyId() );
+  return myGeomGUI->GetGeomGen()->GetIShapesOperations();
 }
 
 //=================================================================================
@@ -731,7 +731,7 @@ bool EntityGUI_FeatureDetectorDlg::execute( ObjectList& objects )
 {
   bool res = false;
   
-  GEOM::GEOM_IBasicOperations_var  aBasicOperations  = myGeomGUI->GetGeomGen()->GetIBasicOperations( getStudyId() );
+  GEOM::GEOM_IBasicOperations_var  aBasicOperations  = myGeomGUI->GetGeomGen()->GetIBasicOperations();
   GEOM::GEOM_IShapesOperations_var aShapesOperations = GEOM::GEOM_IShapesOperations::_narrow( getOperation() );
 
   ShapeRec_Parameters* parameters = parametersChanged();
@@ -792,7 +792,7 @@ bool EntityGUI_FeatureDetectorDlg::execute( ObjectList& objects )
     }
     else if (myConstructorId == CONTOURS)
     {    
-      GEOM::GEOM_ICurvesOperations_var aCurveOperations = myGeomGUI->GetGeomGen()->GetICurvesOperations( getStudyId() );
+      GEOM::GEOM_ICurvesOperations_var aCurveOperations = myGeomGUI->GetGeomGen()->GetICurvesOperations();
 
       myDetector->ComputeContours( useROI, parameters );
       std::vector< std::vector<cv::Point> >   contours  = myDetector->GetContours();
index f74de4a98a51d0af7193694ce86ac3c766df9b0d..5deec627aca6c4cb4346890bf27b27fb5ae1176e 100644 (file)
@@ -1765,7 +1765,7 @@ void EntityGUI_FieldDlg::highlightSubShapes()
   SALOME_ListIO aSelList;
 
   // To highlight the selected sub-shape in Object Browser, if it's already published under the main shape
-  GEOM::GEOM_ILocalOperations_var aLocOp = getGeomEngine()->GetILocalOperations(getStudyId());
+  GEOM::GEOM_ILocalOperations_var aLocOp = getGeomEngine()->GetILocalOperations();
   QMap<int, QString> childsMap;
   SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>(app->activeStudy());
   if (appStudy) {
@@ -1818,7 +1818,7 @@ void EntityGUI_FieldDlg::highlightSubShapes()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr EntityGUI_FieldDlg::createOperation()
 {
-  return getGeomEngine()->GetIFieldOperations(getStudyId());
+  return getGeomEngine()->GetIFieldOperations();
 }
 
 #define RETURN_WITH_MSG(a, b) \
@@ -1857,7 +1857,7 @@ bool EntityGUI_FieldDlg::isValid(QString& theMessage)
 //=================================================================================
 bool EntityGUI_FieldDlg::execute()
 {
-  SALOMEDS::Study_var aStudyDS = GeometryGUI::ClientStudyToStudy( getStudy()->studyDS() );
+  SALOMEDS::Study_var aStudyDS = GeometryGUI::getStudyServant();
   SALOMEDS::StudyBuilder_var aBuilder = aStudyDS->NewBuilder();
 
   QString aName = getNewObjectName().trimmed();
@@ -1882,7 +1882,7 @@ bool EntityGUI_FieldDlg::execute()
       return false;
     
     SALOMEDS::SObject_wrap aSO =
-      getGeomEngine()->AddInStudy( aStudyDS, myField, aName.toLatin1().constData(), myShape );
+      getGeomEngine()->AddInStudy( myField, aName.toLatin1().constData(), myShape );
     if ( !aSO->_is_nil() ) {
       myField->UnRegister();
       CORBA::String_var entry = aSO->GetID();
@@ -1918,7 +1918,7 @@ bool EntityGUI_FieldDlg::execute()
         step = myField->AddStep( tbl->getStepID(), tbl->getStamp() );
 
         SALOMEDS::SObject_wrap aSO =
-          getGeomEngine()->AddInStudy( aStudyDS, step, stepName.toLatin1().constData(), myField );
+          getGeomEngine()->AddInStudy( step, stepName.toLatin1().constData(), myField );
         if ( /*!myIsCreation &&*/ !aSO->_is_nil() ) {
           step->UnRegister();
           CORBA::String_var entry = aSO->GetID();
index 8bd115db3691b972ddae8214b799bcb8e0f6e604..9d9ad5e81fd6d387251ee0bb143d5f203337c1ac 100755 (executable)
@@ -190,7 +190,7 @@ void EntityGUI_IsolineDlg::TypeChanged(int)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr EntityGUI_IsolineDlg::createOperation()
 {
-  return myGeomGUI->GetGeomGen()->GetICurvesOperations( getStudyId() );
+  return myGeomGUI->GetGeomGen()->GetICurvesOperations();
 }
 
 //=================================================================================
index ec39c0d147329f0584936905c4043e4ebcc5dc8f..e93a97dfa9576473c4978541bf842159f46fb31b 100644 (file)
@@ -163,7 +163,7 @@ bool EntityGUI_PictureImportDlg::ClickOnApply()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr EntityGUI_PictureImportDlg::createOperation()
 {
-  return myGeomGUI->GetGeomGen()->GetIBlocksOperations( getStudyId() );
+  return myGeomGUI->GetGeomGen()->GetIBlocksOperations();
 }
 
 //=================================================================================
@@ -175,7 +175,7 @@ bool EntityGUI_PictureImportDlg::execute( ObjectList& objects )
   bool res = false;
   
   GEOM::GEOM_Object_var anObj;
-  GEOM::GEOM_IBasicOperations_var aBasicOperations = myGeomGUI->GetGeomGen()->GetIBasicOperations( getStudyId() );
+  GEOM::GEOM_IBasicOperations_var aBasicOperations = myGeomGUI->GetGeomGen()->GetIBasicOperations();
   GEOM::GEOM_IBlocksOperations_var aBlocksOperations = GEOM::GEOM_IBlocksOperations::_narrow( getOperation() );
   QString theImgFileName = myLineEdit->text();
   if ( theImgFileName.isEmpty() )
index e79e0aa6d29e361bae442ab9afab9fd74cc3854e..b31a3ace523b158783da918759d023ff6c976f08 100644 (file)
@@ -286,7 +286,7 @@ void EntityGUI_PolylineDlg::GetCurveParams(GEOM::ListOfListOfDouble &theCoords,
 //=================================================================================
 GEOM::GEOM_IOperations_ptr EntityGUI_PolylineDlg::createOperation()
 {
-  return getGeomEngine()->GetICurvesOperations( getStudyId() );
+  return getGeomEngine()->GetICurvesOperations();
 }
 
 //=================================================================================
@@ -678,7 +678,7 @@ gp_Ax3 EntityGUI_PolylineDlg::WPlaneToLCS(GEOM::GeomObjPtr theGeomObj)
 
   if (aShape.ShapeType() == TopAbs_FACE) {
     GEOM::GEOM_IMeasureOperations_ptr aMeasureOp =
-      myGeomGUI->GetGeomGen()->GetIMeasureOperations(getStudyId());
+      myGeomGUI->GetGeomGen()->GetIMeasureOperations();
     double Ox, Oy, Oz, Zx, Zy, Zz, Xx, Xy, Xz;
 
     aMeasureOp->GetPosition(theGeomObj.get(), Ox, Oy, Oz, Zx, Zy, Zz, Xx, Xy, Xz);
index 8cc523c62df4f501d5b0dc01354894207a5fe1b7..6f4b43a41ea2e3a60ceb8ccfc490398a0ec1bd8e 100644 (file)
@@ -462,7 +462,7 @@ void EntityGUI_SketcherDlg::Init()
 
   myHelpFileName = "create_sketcher_page.html";
   
-  GEOM::GEOM_IBasicOperations_var aBasicOp = getGeomEngine()->GetIBasicOperations( getStudyId() );
+  GEOM::GEOM_IBasicOperations_var aBasicOp = getGeomEngine()->GetIBasicOperations();
   myGlobalCS = aBasicOp->MakeMarker( 0,0,0,
                                      1,0,0,
                                      0,1,0 ); 
@@ -2270,7 +2270,7 @@ QString EntityGUI_SketcherDlg::GetNewCommand( QString& theParameters )
 //=================================================================================
 GEOM::GEOM_IOperations_ptr EntityGUI_SketcherDlg::createOperation()
 {
-  return getGeomEngine()->GetICurvesOperations( getStudyId() );
+  return getGeomEngine()->GetICurvesOperations();
 }
 
 //=================================================================================
@@ -2794,7 +2794,7 @@ gp_Ax3 EntityGUI_SketcherDlg::WPlaneToLCS( GEOM::GEOM_Object_var geomObj )
   if (aShape.ShapeType() == TopAbs_FACE) 
   {
     GEOM::GEOM_IMeasureOperations_ptr aMeasureOp =
-    myGeometryGUI->GetGeomGen()->GetIMeasureOperations( getStudyId() );
+    myGeometryGUI->GetGeomGen()->GetIMeasureOperations();
     double Ox, Oy, Oz, Zx, Zy, Zz, Xx, Xy, Xz;
     aMeasureOp->GetPosition( geomObj, Ox, Oy, Oz, Zx, Zy, Zz, Xx, Xy, Xz);
     if ( aMeasureOp->IsDone() )
index 5afbdda1823f801f861c37544f0caf8f0a8c86ea..5230c6ac5b62b271de2e56b5df0dfcff518394fd 100644 (file)
@@ -810,7 +810,7 @@ void EntityGUI_SubShapeDlg::activateSelection()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr EntityGUI_SubShapeDlg::createOperation()
 {
-  return getGeomEngine()->GetIShapesOperations(getStudyId());
+  return getGeomEngine()->GetIShapesOperations();
 }
 
 //=================================================================================
index 0929f1c10e24b89bcbf1c59aef2328c92d9ea351..fd723302a6d937c920564bc4c2b3a68f41e65292 100644 (file)
@@ -169,7 +169,7 @@ void EntityGUI_SurfFromFaceDlg::enterEvent (QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr EntityGUI_SurfFromFaceDlg::createOperation()
 {
-  return myGeomGUI->GetGeomGen()->GetIShapesOperations(getStudyId());
+  return myGeomGUI->GetGeomGen()->GetIShapesOperations();
 }
 
 //=================================================================================
index 8a7c726792b0ac51e7aef61bc15e9babad16fb5c..d7127bc0ebb77d04fb8bf5699183275e907f0591 100644 (file)
 
 IMPLEMENT_STANDARD_RTTIEXT(GEOM_BaseDriver,TFunction_Driver);
 
-//================================================================================
-/*!
- * Returns document id
- */
-//================================================================================
-int GEOM_BaseDriver::GetDocID() const
-{
-  int docId = 0;
-  if (!Label().IsNull()) {
-    Handle(TDocStd_Document) aDoc = TDocStd_Owner::GetDocument(Label().Data());
-    docId = GEOM_Engine::GetEngine()->GetDocID(aDoc);
-  }
-  return docId;
-}
-
 //================================================================================
 /*!
  * \brief Returns a name of creation operation and names and values of creation parameters
index 72ecad69a1d377612eeee75efe415dcbcd4aae4a..00df81bc9781495e9a82e8fd58d4b6bb24b0a390 100644 (file)
@@ -68,8 +68,6 @@ struct GEOM_Param
 class GEOM_BaseDriver : public TFunction_Driver
 {
 public:
-  // Returns document id
-  Standard_EXPORT int GetDocID() const;
   
   // Returns a name of creation operation and names and values of creation parameters
   // (Use AddParam() methods declared below to fill params vector while implementing
index aa56b107f36ecec11da60f5a361e500beec3705b..6b0813b3e3bd18be2831354d348e155560f6959f 100644 (file)
@@ -85,15 +85,9 @@ Handle(GEOM_BaseObject) GEOM_BaseObject::GetObject(const TDF_Label& theLabel)
   TCollection_AsciiString anEntry;
   TDF_Tool::Entry(theLabel, anEntry);
 
-  Handle(TDocStd_Document) aDoc = TDocStd_Owner::GetDocument(theLabel.Data());
-  if(aDoc.IsNull()) return NULL;
-
-  Handle(TDataStd_Integer) anID;
-  if(!aDoc->Main().FindAttribute(TDataStd_Integer::GetID(), anID)) return NULL;
-
   GEOM_Engine* anEngine = GEOM_Engine::GetEngine();
   if(anEngine == NULL) return NULL;
-  return anEngine->GetObject(anID->Get(), anEntry.ToCString());
+  return anEngine->GetObject(anEntry.ToCString());
 }
 
 //=============================================================================
@@ -167,14 +161,8 @@ int GEOM_BaseObject::GetType(const TDF_Label& theLabel)
  */
 //=============================================================================
 GEOM_BaseObject::GEOM_BaseObject(const TDF_Label& theEntry)
-  : _label(theEntry), _ior(""), _docID(-1)
+  : _label(theEntry), _ior("")
 {
-  Handle(TDocStd_Document) aDoc = TDocStd_Owner::GetDocument(_label.Data());
-  if(!aDoc.IsNull()) {
-    Handle(TDataStd_Integer) anID;
-    if(aDoc->Main().FindAttribute(TDataStd_Integer::GetID(), anID)) _docID = anID->Get();
-  }
-
   if(!theEntry.FindAttribute(TDataStd_TreeNode::GetDefaultTreeID(), _root))
     _root = TDataStd_TreeNode::Set(theEntry);
 }
@@ -185,14 +173,8 @@ GEOM_BaseObject::GEOM_BaseObject(const TDF_Label& theEntry)
  */
 //=============================================================================
 GEOM_BaseObject::GEOM_BaseObject(const TDF_Label& theEntry, int theType)
-: _label(theEntry), _ior(""), _docID(-1)
+: _label(theEntry), _ior("")
 {
-  Handle(TDocStd_Document) aDoc = TDocStd_Owner::GetDocument(_label.Data());
-  if(!aDoc.IsNull()) {
-    Handle(TDataStd_Integer) anID;
-    if(aDoc->Main().FindAttribute(TDataStd_Integer::GetID(), anID)) _docID = anID->Get();
-  }
-
   theEntry.ForgetAllAttributes(Standard_True);
 
   if(!theEntry.FindAttribute(TDataStd_TreeNode::GetDefaultTreeID(), _root))
@@ -288,17 +270,6 @@ void GEOM_BaseObject::IncrementTic()
   TDataStd_Integer::Set(aTicLabel, aTic + 1);
 }
 
-
-//=============================================================================
-/*!
- *  GetDocID
- */
-//=============================================================================
-int GEOM_BaseObject::GetDocID()
-{
-  return _docID;
-}
-
 //=============================================================================
 /*!
  *  SetName
index 464e0f6a01e359298738da68b0868caa9aaff021..f282d099e7a8cd18f58b4c60ef42a43733512dd6 100644 (file)
@@ -92,9 +92,6 @@ public:
   Standard_EXPORT void SetTic(int theTic);
   Standard_EXPORT void IncrementTic();
 
-  //Returns an ID of the OCAF document where this GEOM_BaseObject is stored
-  Standard_EXPORT int GetDocID();
-
   //Sets a name of this GEOM_BaseObject
   Standard_EXPORT void SetName(const char* theName);
 
@@ -163,7 +160,6 @@ public:
   TDF_Label                 _label;
   TCollection_AsciiString   _ior;
   TCollection_AsciiString   _parameters;
-  int                       _docID;
 
 public:
   DEFINE_STANDARD_RTTIEXT(GEOM_BaseObject,Standard_Transient)
index dd4bc10126af391032cf63bed182c38951086002..d8ad0eb92f1a2512a81d6ecf1c4748879db98cbe 100644 (file)
@@ -104,24 +104,9 @@ static GEOM_Engine* TheEngine = NULL;
 
 static TCollection_AsciiString BuildIDFromObject(Handle(GEOM_BaseObject)& theObject)
 {
-  TCollection_AsciiString anID(theObject->GetDocID()), anEntry;
+  TCollection_AsciiString anEntry;
   TDF_Tool::Entry(theObject->GetEntry(), anEntry);
-  anID+=(TCollection_AsciiString("_")+anEntry);
-  return anID;
-}
-
-static TCollection_AsciiString BuildID(Standard_Integer theDocID, const char* theEntry)
-{
-  TCollection_AsciiString anID(theDocID);
-  anID+=(TCollection_AsciiString("_")+theEntry);
-  return anID;
-}
-
-static Standard_Integer ExtractDocID(TCollection_AsciiString& theID)
-{
-  TCollection_AsciiString aDocID = theID.Token("_");
-  if(aDocID.Length() < 1) return -1;
-  return aDocID.IntegerValue();
+  return anEntry;
 }
 
 bool ProcessFunction(Handle(GEOM_Function)&             theFunction,
@@ -150,11 +135,10 @@ void ReplaceEntriesByNames (TCollection_AsciiString&                  theScript,
                             Standard_Integer&                         objectCounter,
                             Resource_DataMapOfAsciiStringAsciiString& aNameToEntry);
 
-void AddObjectColors (int                      theDocID,
-                      TCollection_AsciiString& theScript,
+void AddObjectColors (TCollection_AsciiString& theScript,
                       const TSting2ObjDataMap& theEntry2ObjData);
 
-void AddTextures (int theDocID, TCollection_AsciiString& theScript);
+void AddTextures (TCollection_AsciiString& theScript);
 
 void PublishObject (TObjectData&                              theObjectData,
                     TSting2ObjDataMap&                        theEntry2ObjData,
@@ -256,14 +240,8 @@ GEOM_Engine::~GEOM_Engine()
   for(objit = objs.begin(); objit != objs.end(); ++objit)
     RemoveObject(*objit);
 
-  //Close all documents not closed
-  TColStd_DataMapIteratorOfDataMapOfIntegerTransient anItr (_mapIDDocument);
-  for (; anItr.More(); anItr.Next())
-  {
-    Close(anItr.Key());
-    anItr.Initialize( _mapIDDocument ); // anItr becomes invalid at _mapIDDocument.UnBind(docId)
-  }
-  _mapIDDocument.Clear();
+  //Close document
+  Close();
   _objects.Clear();
 }
 
@@ -272,53 +250,35 @@ GEOM_Engine::~GEOM_Engine()
  *  GetDocument
  */
 //=============================================================================
-Handle(TDocStd_Document) GEOM_Engine::GetDocument(int theDocID, bool force)
+Handle(TDocStd_Document) GEOM_Engine::GetDocument(bool force)
 {
   Handle(TDocStd_Document) aDoc;
-  if(_mapIDDocument.IsBound(theDocID)) {
-    aDoc = Handle(TDocStd_Document)::DownCast(_mapIDDocument(theDocID));
+  if (_document) {
+    aDoc = _document;
   }
   else if (force) {
     _OCAFApp->NewDocument("BinOcaf", aDoc);
     aDoc->SetUndoLimit(_UndoLimit);
-    _mapIDDocument.Bind(theDocID, aDoc);
-    TDataStd_Integer::Set(aDoc->Main(), theDocID);
+    _document = aDoc;
   }
   return aDoc;
 }
 
-//=============================================================================
-/*!
- *  GetDocID
- */
-//=============================================================================
-int GEOM_Engine::GetDocID(Handle(TDocStd_Document) theDocument)
-{
-  if (theDocument.IsNull()) return -1;
-  TColStd_DataMapIteratorOfDataMapOfIntegerTransient anItr (_mapIDDocument);
-  for (; anItr.More(); anItr.Next())
-    if (anItr.Value() == theDocument) return anItr.Key();
-
-  return -1;
-}
-
 //=============================================================================
 /*!
  *  GetObject
  */
 //=============================================================================
 
-Handle(GEOM_BaseObject) GEOM_Engine::GetObject(int theDocID, const char* theEntry, bool force)
+Handle(GEOM_BaseObject) GEOM_Engine::GetObject(const char* theEntry, bool force)
 {
   Handle(GEOM_BaseObject) anObject;
 
-  TCollection_AsciiString anID = BuildID(theDocID, theEntry);
-
-  if (_objects.IsBound(anID)) {
-    anObject = Handle(GEOM_BaseObject)::DownCast(_objects(anID));
+  if (_objects.IsBound(theEntry)) {
+    anObject = Handle(GEOM_BaseObject)::DownCast(_objects(theEntry));
   }
   else if (force) {
-    Handle(TDocStd_Document) aDoc = GetDocument(theDocID, force);
+    Handle(TDocStd_Document) aDoc = GetDocument(force);
     if ( !aDoc.IsNull()) {
       TDF_Label aLabel;
       TDF_Tool::Label(aDoc->Main().Data(), theEntry, aLabel, Standard_True);
@@ -329,7 +289,7 @@ Handle(GEOM_BaseObject) GEOM_Engine::GetObject(int theDocID, const char* theEntr
         case GEOM_FIELD_STEP_OBJTYPE: anObject = new GEOM_FieldStep(aLabel); break;
         default:                      anObject = new GEOM_Object   (aLabel);
         }
-        _objects.Bind(anID, anObject);
+        _objects.Bind(theEntry, anObject);
       }
     }
   }
@@ -343,22 +303,19 @@ Handle(GEOM_BaseObject) GEOM_Engine::GetObject(int theDocID, const char* theEntr
  */
 //=============================================================================
 
-Handle(GEOM_BaseObject) GEOM_Engine::AddBaseObject(int theDocID, int theType)
+Handle(GEOM_BaseObject) GEOM_Engine::AddBaseObject(int theType)
 {
-  Handle(TDocStd_Document) aDoc = GetDocument(theDocID);
+  Handle(TDocStd_Document) aDoc = GetDocument();
   Handle(TDataStd_TreeNode) aRoot = TDataStd_TreeNode::Set(aDoc->Main());
 
   // NPAL18604: use existing label to decrease memory usage,
   //            if this label has been freed (object deleted)
   bool useExisting = false;
   TDF_Label aChild;
-  if (_freeLabels.find(theDocID) != _freeLabels.end()) {
-    std::list<TDF_Label>& aFreeLabels = _freeLabels[theDocID];
-    if (!aFreeLabels.empty()) {
-      useExisting = true;
-      aChild = aFreeLabels.front();
-      aFreeLabels.pop_front();
-    }
+  if (!_freeLabels.empty()) {
+    useExisting = true;
+    aChild = _freeLabels.front();
+    _freeLabels.pop_front();
   }
   if (!useExisting) {
     // create new label
@@ -386,9 +343,9 @@ Handle(GEOM_BaseObject) GEOM_Engine::AddBaseObject(int theDocID, int theType)
  */
 //================================================================================
 
-Handle(GEOM_Object) GEOM_Engine::AddObject(int theDocID, int theType)
+Handle(GEOM_Object) GEOM_Engine::AddObject(int theType)
 {
-  return Handle(GEOM_Object)::DownCast( AddBaseObject(theDocID, theType) );
+  return Handle(GEOM_Object)::DownCast( AddBaseObject(theType) );
 }
 
 //=============================================================================
@@ -403,21 +360,17 @@ Handle(GEOM_Object) GEOM_Engine::AddSubShape(Handle(GEOM_Object)              th
 {
   if (theMainShape.IsNull() || theIndices.IsNull()) return NULL;
 
-  Handle(TDocStd_Document) aDoc = GetDocument(theMainShape->GetDocID());
+  Handle(TDocStd_Document) aDoc = GetDocument();
   Handle(TDataStd_TreeNode) aRoot = TDataStd_TreeNode::Set(aDoc->Main());
 
   // NPAL18604: use existing label to decrease memory usage,
   //            if this label has been freed (object deleted)
   bool useExisting = false;
-  TDF_Label aChild;
-  int aDocID = theMainShape->GetDocID();
-  if (_freeLabels.find(aDocID) != _freeLabels.end()) {
-    std::list<TDF_Label>& aFreeLabels = _freeLabels[aDocID];
-    if (!aFreeLabels.empty()) {
-      useExisting = true;
-      aChild = aFreeLabels.front();
-      aFreeLabels.pop_front();
-    }
+  TDF_Label aChild;;
+  if (!_freeLabels.empty()) {
+    useExisting = true;
+    aChild = _freeLabels.front();
+    _freeLabels.pop_front();
   }
   if (!useExisting) {
     // create new label
@@ -478,8 +431,7 @@ bool GEOM_Engine::RemoveObject(Handle(GEOM_BaseObject)& theObject)
 {
   if (theObject.IsNull()) return false;
 
-  int aDocID = theObject->GetDocID();
-  if(!_mapIDDocument.IsBound(aDocID))
+  if(!_document)
     return false;  // document is closed...
 
   //Remove an object from the map of available objects
@@ -514,16 +466,14 @@ bool GEOM_Engine::RemoveObject(Handle(GEOM_BaseObject)& theObject)
   aLabel.ForgetAllAttributes(Standard_True);
 
   // Remember the label to reuse it then
-  std::list<TDF_Label>& aFreeLabels = _freeLabels[aDocID];
-  if ( aFreeLabels.empty() || aFreeLabels.back() != aLabel )
-    aFreeLabels.push_back(aLabel);
+  if ( _freeLabels.empty() || _freeLabels.back() != aLabel )
+    _freeLabels.push_back(aLabel);
 
   // we can't explicitly delete theObject. At least prevent its functioning
   // as an alive object when aLabel is reused for a new object
   theObject->_label = aLabel.Root();
   theObject->_ior.Clear();
-  theObject->_parameters.Clear();
-  theObject->_docID = -1;
+  theObject->_parameters.Clear();;
 
   theObject.Nullify();
 
@@ -535,9 +485,9 @@ bool GEOM_Engine::RemoveObject(Handle(GEOM_BaseObject)& theObject)
  *  Undo
  */
 //=============================================================================
-void GEOM_Engine::Undo(int theDocID)
+void GEOM_Engine::Undo()
 {
-  GetDocument(theDocID)->Undo();
+  GetDocument()->Undo();
 }
 
 //=============================================================================
@@ -545,9 +495,9 @@ void GEOM_Engine::Undo(int theDocID)
  *  Redo
  */
 //=============================================================================
-void GEOM_Engine::Redo(int theDocID)
+void GEOM_Engine::Redo()
 {
-  GetDocument(theDocID)->Redo();
+  GetDocument()->Redo();
 }
 
 //=============================================================================
@@ -555,12 +505,11 @@ void GEOM_Engine::Redo(int theDocID)
  *  Save
  */
 //=============================================================================
-bool GEOM_Engine::Save(int theDocID, const char* theFileName)
+bool GEOM_Engine::Save(const char* theFileName)
 {
-  if(!_mapIDDocument.IsBound(theDocID)) return false;
-  Handle(TDocStd_Document) aDoc = Handle(TDocStd_Document)::DownCast(_mapIDDocument(theDocID));
+  if(!_document) return false;
 
-  _OCAFApp->SaveAs(aDoc, theFileName);
+  _OCAFApp->SaveAs(_document, theFileName);
 
   return true;
 }
@@ -570,7 +519,7 @@ bool GEOM_Engine::Save(int theDocID, const char* theFileName)
  *  Load
  */
 //=============================================================================
-bool GEOM_Engine::Load(int theDocID, const char* theFileName)
+bool GEOM_Engine::Load(const char* theFileName)
 {
   Handle(TDocStd_Document) aDoc;
   if (_OCAFApp->Open(theFileName, aDoc) != PCDM_RS_OK) {
@@ -584,10 +533,7 @@ bool GEOM_Engine::Load(int theDocID, const char* theFileName)
 
   aDoc->SetUndoLimit(_UndoLimit);
 
-  if(_mapIDDocument.IsBound(theDocID)) _mapIDDocument.UnBind(theDocID);
-  _mapIDDocument.Bind(theDocID, aDoc);
-
-  TDataStd_Integer::Set(aDoc->Main(), theDocID);
+  _document = aDoc;
 
   return true;
 }
@@ -597,30 +543,24 @@ bool GEOM_Engine::Load(int theDocID, const char* theFileName)
  *  Close
  */
 //=============================================================================
-void GEOM_Engine::Close(int theDocID)
+void GEOM_Engine::Close()
 {
-  if (_mapIDDocument.IsBound(theDocID)) {
-    Handle(TDocStd_Document) aDoc = Handle(TDocStd_Document)::DownCast(_mapIDDocument(theDocID));
-
-    //Remove all GEOM Objects associated to the given document
+  if (_document) {
+    //Remove all GEOM Objects associated to the document
     TColStd_SequenceOfAsciiString aSeq;
     GEOM_DataMapIteratorOfDataMapOfAsciiStringTransient It (_objects);
     for (; It.More(); It.Next()) {
-      TCollection_AsciiString anObjID (It.Key());
-      Standard_Integer anID = ExtractDocID(anObjID);
-      if (theDocID == anID) aSeq.Append(It.Key());
+      aSeq.Append(It.Key());
     }
-    for (Standard_Integer i=1; i<=aSeq.Length(); i++) _objects.UnBind(aSeq.Value(i));
-
-    // Forget free labels for this document
-    TFreeLabelsList::iterator anIt = _freeLabels.find(theDocID);
-    if (anIt != _freeLabels.end()) {
-      _freeLabels.erase(anIt);
+    for (Standard_Integer i=1; i<=aSeq.Length(); i++) {
+      _objects.UnBind(aSeq.Value(i));
     }
 
-    _mapIDDocument.UnBind(theDocID);
-    _OCAFApp->Close(aDoc);
-    aDoc.Nullify();
+    // Forget free labels for document
+    _freeLabels.clear();
+
+    _OCAFApp->Close(_document);
+    _document.Nullify();
   }
 }
 
@@ -629,8 +569,7 @@ void GEOM_Engine::Close(int theDocID)
  *  DumpPython
  */
 //=============================================================================
-TCollection_AsciiString GEOM_Engine::DumpPython(int theDocID,
-                                                std::vector<TObjectData>& theObjectData,
+TCollection_AsciiString GEOM_Engine::DumpPython(std::vector<TObjectData>& theObjectData,
                                                 TVariablesList theVariables,
                                                 bool isPublished,
                                                 bool isMultiFile, 
@@ -640,26 +579,29 @@ TCollection_AsciiString GEOM_Engine::DumpPython(int theDocID,
   Kernel_Utils::Localizer loc;
 
   TCollection_AsciiString aScript;
-  Handle(TDocStd_Document) aDoc = GetDocument(theDocID);
+  Handle(TDocStd_Document) aDoc = GetDocument();
 
   if (aDoc.IsNull())
   {
     TCollection_AsciiString anEmptyScript;
     if( isMultiFile )
-      anEmptyScript = "def RebuildData(theStudy): pass\n";
+      anEmptyScript = "def RebuildData(): pass\n";
     return anEmptyScript;
   }
+  
+  if( isMultiFile )
+    aScript  = "import salome\n";
 
-  aScript  = "import GEOM\n";
+  aScript += "import GEOM\n";
   aScript += "from salome.geom import geomBuilder\n";
   aScript += "import math\n";
   aScript += "import SALOMEDS\n\n";
   if( isMultiFile )
-    aScript += "def RebuildData(theStudy):";
+    aScript += "def RebuildData():";
 
-  aScript += "\n\tgeompy = geomBuilder.New(theStudy)\n";
+  aScript += "\n\tgeompy = geomBuilder.New()\n";
 
-  AddTextures(theDocID, aScript);
+  AddTextures(aScript);
 
   Standard_Integer posToInsertGlobalVars = aScript.Length() + 1;
 
@@ -795,7 +737,7 @@ TCollection_AsciiString GEOM_Engine::DumpPython(int theDocID,
   aScript += aFuncScript;
 
   // ouv : NPAL12872
-  AddObjectColors( theDocID, aScript, aEntry2ObjData );
+  AddObjectColors(aScript, aEntry2ObjData );
 
   // Make script to publish in study
   TSting2ObjDataPtrMap::iterator aStEntry2ObjDataPtrIt;
@@ -910,24 +852,21 @@ Handle(TColStd_HSequenceOfAsciiString) GEOM_Engine::GetAllDumpNames() const
 #define TEXTURE_LABEL_HEIGHT   4
 #define TEXTURE_LABEL_DATA     5
 
-int GEOM_Engine::addTexture(int theDocID, int theWidth, int theHeight,
+int GEOM_Engine::addTexture(int theWidth, int theHeight,
                             const Handle(TColStd_HArray1OfByte)& theTexture,
                             const TCollection_AsciiString& theFileName)
 {
-  Handle(TDocStd_Document) aDoc = GetDocument(theDocID);
+  Handle(TDocStd_Document) aDoc = GetDocument();
   Handle(TDataStd_TreeNode) aRoot = TDataStd_TreeNode::Set(aDoc->Main());
 
   // NPAL18604: use existing label to decrease memory usage,
   //            if this label has been freed (object deleted)
   bool useExisting = false;
   TDF_Label aChild;
-  if (_freeLabels.find(theDocID) != _freeLabels.end()) {
-    std::list<TDF_Label>& aFreeLabels = _freeLabels[theDocID];
-    if (!aFreeLabels.empty()) {
-      useExisting = true;
-      aChild = aFreeLabels.front();
-      aFreeLabels.pop_front();
-    }
+  if (!_freeLabels.empty()) {
+    useExisting = true;
+    aChild = _freeLabels.front();
+    _freeLabels.pop_front();
   }
   if (!useExisting) {
     // create new label
@@ -956,14 +895,14 @@ int GEOM_Engine::addTexture(int theDocID, int theWidth, int theHeight,
   return aTextureID;
 }
 
-Handle(TColStd_HArray1OfByte) GEOM_Engine::getTexture(int theDocID, int theTextureID,
+Handle(TColStd_HArray1OfByte) GEOM_Engine::getTexture(int theTextureID,
                                                       int& theWidth, int& theHeight,
                                                       TCollection_AsciiString& theFileName)
 {
   Handle(TColStd_HArray1OfByte) anArray;
   theWidth = theHeight = 0;
 
-  Handle(TDocStd_Document) aDoc = GetDocument(theDocID);
+  Handle(TDocStd_Document) aDoc = GetDocument();
 
   TDF_ChildIterator anIterator(aDoc->Main(), Standard_True);
   bool found = false;
@@ -997,11 +936,11 @@ Handle(TColStd_HArray1OfByte) GEOM_Engine::getTexture(int theDocID, int theTextu
   return anArray;
 }
 
-std::list<int> GEOM_Engine::getAllTextures(int theDocID)
+std::list<int> GEOM_Engine::getAllTextures()
 {
   std::list<int> id_list;
 
-  Handle(TDocStd_Document) aDoc = GetDocument(theDocID);
+  Handle(TDocStd_Document) aDoc = GetDocument();
 
   TDF_ChildIterator anIterator(aDoc->Main(), Standard_True);
   for (; anIterator.More(); anIterator.Next()) {
@@ -1016,17 +955,6 @@ std::list<int> GEOM_Engine::getAllTextures(int theDocID)
   return id_list;
 }
 
-void GEOM_Engine::DocumentModified(const int theDocId, const bool isModified)
-{
-  if (isModified) _mapModifiedDocs.Add(theDocId);
-  else _mapModifiedDocs.Remove(theDocId);
-}
-bool GEOM_Engine::DocumentModified(const int theDocId)
-{
-  return _mapModifiedDocs.Contains(theDocId);
-}
-
 //===========================================================================
 //                     Internal functions
 //===========================================================================
@@ -1667,12 +1595,11 @@ void ReplaceEntriesByNames (TCollection_AsciiString&                  theScript,
  *  AddObjectColors: Add color to objects
  */
 //=============================================================================
-void AddObjectColors (int                      theDocID,
-                      TCollection_AsciiString& theScript,
+void AddObjectColors (TCollection_AsciiString& theScript,
                       const TSting2ObjDataMap& theEntry2ObjData)
 {
   GEOM_Engine* engine = GEOM_Engine::GetEngine();
-  Handle(TDocStd_Document) aDoc = engine->GetDocument(theDocID);
+  Handle(TDocStd_Document) aDoc = engine->GetDocument();
 
   TSting2ObjDataMap::const_iterator anEntryToNameIt;
   for (anEntryToNameIt = theEntry2ObjData.begin();
@@ -1776,10 +1703,10 @@ static TCollection_AsciiString pack_data (const Handle(TColStd_HArray1OfByte)& a
   return stream;
 }
 
-void AddTextures (int theDocID, TCollection_AsciiString& theScript)
+void AddTextures (TCollection_AsciiString& theScript)
 {
   GEOM_Engine* engine = GEOM_Engine::GetEngine();
-  std::list<int> allTextures = engine->getAllTextures(theDocID);
+  std::list<int> allTextures = engine->getAllTextures();
   std::list<int>::const_iterator it;
 
   if (allTextures.size() > 0) {
@@ -1790,7 +1717,7 @@ void AddTextures (int theDocID, TCollection_AsciiString& theScript)
       Standard_Integer aWidth, aHeight;
       TCollection_AsciiString aFileName;
       Handle(TColStd_HArray1OfByte) aTexture =
-        engine->getTexture(theDocID, *it, aWidth, aHeight, aFileName);
+        engine->getTexture(*it, aWidth, aHeight, aFileName);
       if (aWidth > 0 && aHeight > 0 && !aTexture.IsNull() && aTexture->Length() > 0 ) {
         TCollection_AsciiString aCommand = "\n\t";
         aCommand += "texture_map["; aCommand += *it; aCommand += "] = ";
index 7353ccb5011d878453ed28d51738f0fa4df9d0f6..21a213287cd0d1d9f97caf1da073a4fa43486b61 100644 (file)
@@ -97,53 +97,48 @@ public:
   Standard_EXPORT static GEOM_Engine* GetEngine();   
 
   //Returns the OCAF document by its ID, if document doesn't exists it will be created
-  Standard_EXPORT Handle(TDocStd_Document) GetDocument(int theDocID, bool force=true);
-
-  //Returns the ID of the given OCAF document
-  Standard_EXPORT int GetDocID(Handle(TDocStd_Document) theDocument);
+  Standard_EXPORT Handle(TDocStd_Document) GetDocument(bool force=true);
   
   //Returns the OCAF appliaction
   Standard_EXPORT Handle(TDocStd_Application) GetApplication() { return _OCAFApp; }
 
   //Returns a pointer to GEOM_BaseObject defined by a document and the entry
-  Standard_EXPORT Handle(GEOM_BaseObject) GetObject(int         theDocID,
-                                                    const char* theEntry,
+  Standard_EXPORT Handle(GEOM_BaseObject) GetObject(const char* theEntry,
                                                     bool        force=true);
 
   //Adds a new object of the type theType in the OCAF document
-  Standard_EXPORT Handle(GEOM_BaseObject) AddBaseObject(int theDocID, int theType);
+  Standard_EXPORT Handle(GEOM_BaseObject) AddBaseObject(int theType);
 
   //Adds a new object of the type theType in the OCAF document
-  Standard_EXPORT Handle(GEOM_Object) AddObject(int theDocID, int theType);
+  Standard_EXPORT Handle(GEOM_Object) AddObject(int theType);
 
   //Removes the object from the OCAF document
   Standard_EXPORT bool RemoveObject(Handle(GEOM_BaseObject)& theObject);  
 
-  //Saves the OCAF document with ID = theDocID with file with name theFileName
-  Standard_EXPORT bool Save(int theDocID, const char* theFileName);
+  //Saves the OCAF document with file with name theFileName
+  Standard_EXPORT bool Save(const char* theFileName);
   
-  //Loads the OCAF document into the application and assigns to it an ID = theDocID
-  Standard_EXPORT bool Load(int theDocID, const char* theFileName);
+  //Loads the OCAF document into the application
+  Standard_EXPORT bool Load(const char* theFileName);
 
-  //Closes the document with ID =  theDocID
-  Standard_EXPORT void Close(int theDocID);
+  //Closes the document
+  Standard_EXPORT void Close();
 
   //Sets the number of Undos (default value = 10)
   Standard_EXPORT void SetUndoLimit(int theLimit) { _UndoLimit = theLimit; }
 
-  //Applies an Undo to document with ID = theDocID
-  Standard_EXPORT void Undo(int theDocID);
+  //Applies an Undo to document
+  Standard_EXPORT void Undo();
 
-  //Applies an Redo to document with ID = theDocID
-  Standard_EXPORT void Redo(int theDocID);
+  //Applies an Redo to document
+  Standard_EXPORT void Redo();
 
   //Adds a new sub-shape object of the MainShape object
   Standard_EXPORT Handle(GEOM_Object) AddSubShape(Handle(GEOM_Object) theMainShape, 
                                                   Handle(TColStd_HArray1OfInteger) theIndices,
                                                   bool isStandaloneOperation = false);
 
-  Standard_EXPORT TCollection_AsciiString DumpPython(int theDocID, 
-                                                     std::vector<TObjectData>& theObjectData,
+  Standard_EXPORT TCollection_AsciiString DumpPython(std::vector<TObjectData>& theObjectData,
                                                      TVariablesList theVariables,
                                                      bool isPublished, 
                                                      bool isMultiFile, 
@@ -153,15 +148,15 @@ public:
 
   Standard_EXPORT Handle(TColStd_HSequenceOfAsciiString) GetAllDumpNames() const;
 
-  Standard_EXPORT int addTexture(int theDocID, int theWidth, int theHeight,
+  Standard_EXPORT int addTexture(int theWidth, int theHeight,
                                  const Handle(TColStd_HArray1OfByte)& theTexture,
                                  const TCollection_AsciiString& theFileName = "");
 
-  Standard_EXPORT Handle(TColStd_HArray1OfByte) getTexture(int  theDocID, int theTextureID,
+  Standard_EXPORT Handle(TColStd_HArray1OfByte) getTexture(int theTextureID,
                                                            int& theWidth, int& theHeight,
                                                            TCollection_AsciiString& theFileName);
 
-  Standard_EXPORT std::list<int> getAllTextures(int theDocID);
+  Standard_EXPORT std::list<int> getAllTextures();
 
   static const Standard_GUID& GetTextureGUID();
 
@@ -169,25 +164,20 @@ public:
                                    const TCollection_AsciiString&            anEntry,
                                    Resource_DataMapOfAsciiStringAsciiString& aNameToEntry);
 
-  Standard_EXPORT void DocumentModified(const int theDocId, const bool isModified);
-  
-  Standard_EXPORT bool DocumentModified(const int theDocId);
-
 protected:
   Standard_EXPORT static void SetEngine(GEOM_Engine* theEngine);       
   
 private:
 
   Handle(GEOM_Application)  _OCAFApp;
-  TColStd_DataMapOfIntegerTransient _mapIDDocument;
-  TColStd_MapOfInteger _mapModifiedDocs; // keeps the identifiers of the modified document ids
+  Handle(TDocStd_Document) _document;
 
   int _UndoLimit;
   GEOM_DataMapOfAsciiStringTransient _objects;
 
   Resource_DataMapOfAsciiStringAsciiString _studyEntry2NameMap;
 
-  TFreeLabelsList                          _freeLabels;
+  std::list<TDF_Label>  _freeLabels;
 };
 
 #endif
index 4ff07261d6201441bcb786292c949df42eceb729..78b31ae13ce1e82c2d8b0beb6371b6243a35a429 100644 (file)
@@ -364,7 +364,7 @@ Handle(GEOM_FieldStep) GEOM_Field::AddStep(const int stepID, const int stamp)
   if(anEngine == NULL) return NULL;
 
   step = Handle(GEOM_FieldStep)::DownCast
-    ( anEngine->AddBaseObject( GetDocID(),GEOM_FIELD_STEP_OBJTYPE ));
+    ( anEngine->AddBaseObject( GEOM_FIELD_STEP_OBJTYPE ));
   if ( step.IsNull())
     return step;
 
index 66fe4791bf56777f9737d350afe854c078d452a2..0ca233d0a4eca30a75b9a93074d7a2336f479cb0 100644 (file)
@@ -38,8 +38,8 @@
  */
 //=============================================================================
 
-GEOM_IOperations::GEOM_IOperations(GEOM_Engine* theEngine, int theDocID)
-: _engine(theEngine), _docID(theDocID)
+GEOM_IOperations::GEOM_IOperations(GEOM_Engine* theEngine)
+: _engine(theEngine)
 {
   _solver = new GEOM_Solver(theEngine);
 }
@@ -64,7 +64,7 @@ GEOM_IOperations::~GEOM_IOperations()
 //=============================================================================   
 void GEOM_IOperations::StartOperation()
 {
-  Handle(TDocStd_Document) aDoc = _engine->GetDocument(_docID);
+  Handle(TDocStd_Document) aDoc = _engine->GetDocument();
   if(aDoc->GetUndoLimit() > 0) 
     aDoc->NewCommand();
 }
@@ -76,10 +76,9 @@ void GEOM_IOperations::StartOperation()
 //=============================================================================      
 void GEOM_IOperations::FinishOperation()
 {
-  Handle(TDocStd_Document) aDoc = _engine->GetDocument(_docID);
+  Handle(TDocStd_Document) aDoc = _engine->GetDocument();
   if(aDoc->GetUndoLimit() > 0) 
     aDoc->CommitCommand();
-  _engine->DocumentModified(_docID, true);
 }
 
 //=============================================================================
@@ -89,7 +88,7 @@ void GEOM_IOperations::FinishOperation()
 //=============================================================================   
 void GEOM_IOperations::AbortOperation()
 {
-  Handle(TDocStd_Document) aDoc = _engine->GetDocument(_docID);
+  Handle(TDocStd_Document) aDoc = _engine->GetDocument();
   aDoc->AbortCommand();
 }
    
index 098587a85f234521bc35c9b758e8c40b8ea5f52a..a4e16776e14317eb4352940d7a0d0e7f663977c2 100644 (file)
@@ -39,7 +39,7 @@
 class GEOM_IOperations
 {
  public:
-  Standard_EXPORT GEOM_IOperations(GEOM_Engine* theEngine, int theDocID);
+  Standard_EXPORT GEOM_IOperations(GEOM_Engine* theEngine);
   Standard_EXPORT ~GEOM_IOperations();
 
   //Starts a new operation (opens a tansaction)
@@ -73,15 +73,11 @@ class GEOM_IOperations
   //Return a pointer to Solver associated with this operation interface
   Standard_EXPORT GEOM_Solver* GetSolver() { return _solver; }
 
-  //Returns an ID of the OCAF document where this operation stores the data
-  Standard_EXPORT int GetDocID() { return _docID; }
-
  private:
   
   TCollection_AsciiString _errorCode;
   GEOM_Engine*   _engine;
   GEOM_Solver*   _solver;
-  int                     _docID;
 
 };
 
index d8e07e7148f6bbbe944074b94a6737cbe7260744..6d3eb65a463a7e2aa025e0d253224aa015819135 100644 (file)
@@ -34,7 +34,7 @@
  *  Update
  */
 //=============================================================================
-bool GEOM_Solver::Update(int theDocID, TDF_LabelSequence& theSeq)
+bool GEOM_Solver::Update(TDF_LabelSequence& theSeq)
 {
   return false;
 } 
index 8d6b84c15e8b71b386f9a2d80f5bec748336b16a..c3518ca3449695332cf1559661f4539503ba3021 100644 (file)
@@ -35,9 +35,9 @@ class GEOM_Solver
   Standard_EXPORT GEOM_Solver(GEOM_Engine* theEngine) :_engine(theEngine) {}
   Standard_EXPORT ~GEOM_Solver() {}
 
-  //Update the values of all GEOM_Object in the document theDocID, theSeq will contain a list of touched labels
+  //Update the values of all GEOM_Object in the document, theSeq will contain a list of touched labels
   //Note: not Implemented
-  Standard_EXPORT bool Update(int theDocID, TDF_LabelSequence& theSeq); 
+  Standard_EXPORT bool Update(TDF_LabelSequence& theSeq);
  
   //Updates a value of theObject, theSeq will contain a list of touched labels
   //Note: not implemented
index 847240088261e15c92a1f2bdef7e72dbe804f6f7..d5862ced2fed7b02d79732e162f943c6ab66918e 100644 (file)
@@ -869,8 +869,7 @@ void GEOMBase::PublishSubObject( GEOM::GEOM_Object_ptr object, const QString& na
     QString fatherEntry = GetEntry( father );
     if ( entry.isEmpty() && !CORBA::is_nil( father ) && !fatherEntry.isEmpty() ) {
       QString aName = !name.isEmpty() ? name : GetName( object );
-      GeometryGUI::GetGeomGen()->AddInStudy( GeometryGUI::ClientStudyToStudy( studyDS ),
-                                             object, aName.toLatin1().data(), father.in() );
+      GeometryGUI::GetGeomGen()->AddInStudy( object, aName.toLatin1().data(), father.in() );
     }
   }
 }
index fa682ffc516c2a2a21fd6ab52fe69bdc3f762d74..0e920345d705eb0d275fccb195100cd787c85dc2 100755 (executable)
@@ -608,12 +608,10 @@ QString GEOMBase_Helper::addInStudy( GEOM::GEOM_Object_ptr theObj, const char* t
   if ( !aStudy || theObj->_is_nil() )
     return QString();
 
-  SALOMEDS::Study_var aStudyDS = GeometryGUI::ClientStudyToStudy(aStudy);
-
   GEOM::GEOM_Object_ptr aFatherObj = getFather( theObj );
 
   SALOMEDS::SObject_var aSO =
-    getGeomEngine()->AddInStudy(aStudyDS, theObj, theName, aFatherObj);
+    getGeomEngine()->AddInStudy(theObj, theName, aFatherObj);
 
   QString anEntry;
   if ( !aSO->_is_nil() ) {
@@ -622,7 +620,7 @@ QString GEOMBase_Helper::addInStudy( GEOM::GEOM_Object_ptr theObj, const char* t
   }
   // Each dialog is responsible for this method implementation,
   // default implementation does nothing
-  restoreSubShapes(aStudyDS, aSO);
+  restoreSubShapes(aSO);
   aSO->UnRegister();
 
   return anEntry;
@@ -632,15 +630,14 @@ QString GEOMBase_Helper::addInStudy( GEOM::GEOM_Object_ptr theObj, const char* t
 // Function : restoreSubShapes
 // Purpose  : restore tree of argument's sub-shapes under the resulting shape
 //================================================================
-void GEOMBase_Helper::restoreSubShapes (SALOMEDS::Study_ptr   /*theStudy*/,
-                                        SALOMEDS::SObject_ptr /*theSObject*/)
+void GEOMBase_Helper::restoreSubShapes (SALOMEDS::SObject_ptr /*theSObject*/)
 {
   // do nothing by default
 
   // example of implementation in particular dialog:
   // GEOM::ListOfGO anArgs;
   // anArgs.length(0); // empty list means that all arguments should be restored
-  // getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, anArgs,
+  // getGeomEngine()->RestoreSubShapesSO(theSObject, anArgs,
   //                                     /*theFindMethod=*/GEOM::FSM_GetInPlace,
   //                                     /*theInheritFirstArg=*/false);
 }
@@ -656,7 +653,7 @@ void GEOMBase_Helper::updateObjBrowser() const
     CAM_Module* module = app->module( "Geometry" );
     SalomeApp_Module* appMod = dynamic_cast<SalomeApp_Module*>( module );
     if ( appMod ) {
-      appMod->updateObjBrowser( true );
+      appMod->updateObjBrowser();
     }
   }
 }
@@ -670,18 +667,6 @@ void GEOMBase_Helper::updateViewer()
   getDisplayer()->UpdateViewer();
 }
 
-//================================================================
-// Function : getStudyId
-// Purpose  : Get study Id
-//================================================================
-int GEOMBase_Helper::getStudyId() const
-{
-  int anId = -1;
-  if ( getStudy() )
-    anId = getStudy()->id();
-  return anId;
-}
-
 //================================================================
 // Function : getStudy
 // Purpose  : Returns the active study. It is recommended to use
@@ -732,7 +717,7 @@ QString GEOMBase_Helper::getEntry( GEOM::GEOM_Object_ptr object ) const
 GEOM_Displayer* GEOMBase_Helper::getDisplayer()
 {
   if ( !myDisplayer )
-    myDisplayer = new GEOM_Displayer( getStudy() );
+    myDisplayer = new GEOM_Displayer();
   return myDisplayer;
 }
 
@@ -1378,7 +1363,7 @@ QList<GEOM::GeomObjPtr> GEOMBase_Helper::getSelected( const QList<TopAbs_ShapeEn
               GEOM::GeomObjPtr subShape = findObjectInFather( object.get(), idx );
               if ( !subShape ) {
                 // sub-shape is not yet published in the study
-                GEOM::ShapesOpPtr shapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() );
+                GEOM::ShapesOpPtr shapesOp = getGeomEngine()->GetIShapesOperations();
                 subShape.take( shapesOp->GetSubShape( object.get(), idx ) ); // take ownership!
               }
               if ( typeInList( (TopAbs_ShapeEnum)(subShape->GetShapeType()), types ) ) {
index feaf74a836a404fb494e0b920a4414d5c3e764a3..dbca01463fa0accddb3dd5f921e0ff3ae94b7b9d 100755 (executable)
@@ -124,7 +124,6 @@ protected:
   bool hasCommand      () const;
 
   void updateObjBrowser() const;
-  int  getStudyId      () const;
   SalomeApp_Study* getStudy  () const;
   bool checkViewWindow ();
 
@@ -166,7 +165,7 @@ protected:
   // It should perform the required operation and put all new or modified objects into
   // <objects> argument.Should return <false> if some error occurs during its execution.
 
-  virtual void restoreSubShapes( SALOMEDS::Study_ptr theStudy, SALOMEDS::SObject_ptr theSObject );
+  virtual void restoreSubShapes( SALOMEDS::SObject_ptr theSObject );
   // This method is called by addInStudy().
 
   virtual GEOM::GEOM_Object_ptr getFather( GEOM::GEOM_Object_ptr theObj );
index 486aff4daf81c5afbdee186ac07a402ce05cad1e..7a412c622617445d6b509741e5a725340342b550 100644 (file)
@@ -187,7 +187,7 @@ void GEOMBase_Skeleton::initSpinBox( SalomeApp_DoubleSpinBox* spinBox,
 void GEOMBase_Skeleton::updateAttributes( GEOM::GEOM_Object_ptr theObj,
                                           const QStringList& theParameters)
 {
-  SALOMEDS::Study_var aStudy = GeometryGUI::ClientStudyToStudy(getStudy()->studyDS());
+  SALOMEDS::Study_var aStudy = GeometryGUI::getStudyServant();
   SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
   SALOMEDS::SObject_var aSObject = aStudy->FindObjectID(theObj->GetStudyEntry());
   SALOMEDS::GenericAttribute_var anAttr = aStudyBuilder->FindOrCreateAttribute(aSObject, "AttributeString");
index 215035a2f2c8a891a1582594d14ac4d87ed9c7f5..7910c3d6b322f0dbb1a69e953d8f971e9a0da0dd 100644 (file)
@@ -30,7 +30,7 @@
 #include <Standard_ProgramError.hxx>
 #include <gp_Trsf.hxx>
 
-#include <SalomeApp_Study.h>
+#include <SalomeApp_Application.h>
 
 // Static patterns for casting value-to-string & value-from-string. The patterns are:
 //  ITEM: { name[string] : visibility : type : values[composite] };
@@ -590,9 +590,9 @@ GEOMGUI_DimensionProperty::GEOMGUI_DimensionProperty( const GEOMGUI_DimensionPro
 // function : Init constructor
 // purpose  : 
 //=================================================================================
-GEOMGUI_DimensionProperty::GEOMGUI_DimensionProperty( SalomeApp_Study* theStudy, const std::string& theEntry )
+GEOMGUI_DimensionProperty::GEOMGUI_DimensionProperty( const std::string& theEntry )
 {
-  LoadFromAttribute( theStudy, theEntry );
+  LoadFromAttribute( theEntry );
 }
 
 //=================================================================================
@@ -1018,18 +1018,17 @@ int GEOMGUI_DimensionProperty::GetType( const int theIndex ) const
 // function : LoadFromAttribute
 // purpose  : 
 //=================================================================================
-void GEOMGUI_DimensionProperty::LoadFromAttribute( SalomeApp_Study* theStudy,
-                                                   const std::string& theEntry )
+void GEOMGUI_DimensionProperty::LoadFromAttribute( const std::string& theEntry )
 {
   Clear();
 
-  _PTR(SObject) aSObj = theStudy->studyDS()->FindObjectID( theEntry );
+  _PTR(SObject) aSObj = SalomeApp_Application::getStudy()->FindObjectID( theEntry );
   if ( !aSObj )
   {
     return;
   }
 
-  _PTR(StudyBuilder) aBuilder = theStudy->studyDS()->NewBuilder();
+  _PTR(StudyBuilder) aBuilder = SalomeApp_Application::getStudy()->NewBuilder();
 
   _PTR(GenericAttribute) aSeekAtt;
   _PTR(AttributeTableOfReal) aRecordsAtt;
@@ -1076,16 +1075,15 @@ void GEOMGUI_DimensionProperty::LoadFromAttribute( SalomeApp_Study* theStudy,
 // function : SaveToAttribute
 // purpose  : 
 //=================================================================================
-void GEOMGUI_DimensionProperty::SaveToAttribute( SalomeApp_Study *theStudy,
-                                                 const std::string &theEntry )
+void GEOMGUI_DimensionProperty::SaveToAttribute( const std::string &theEntry )
 {
-  _PTR(SObject) aSObj = theStudy->studyDS()->FindObjectID( theEntry );
+  _PTR(SObject) aSObj = SalomeApp_Application::getStudy()->FindObjectID( theEntry );
   if ( !aSObj )
   {
     return;
   }
 
-  _PTR(StudyBuilder) aBuilder = theStudy->studyDS()->NewBuilder();
+  _PTR(StudyBuilder) aBuilder = SalomeApp_Application::getStudy()->NewBuilder();
 
   _PTR(AttributeTableOfReal) aRecordsAtt;
 
index a074da4940b8661932bd67c627460c3be343323b..ecca16fb8c5f0a20a3402250c502fdc039f968ff 100644 (file)
@@ -329,7 +329,7 @@ public:
    /*!
    * \brief Constructor. Inits property from attribute.
    */
-  GEOMGUI_DimensionProperty( SalomeApp_Study* theStudy, const std::string& theEntry );
+  GEOMGUI_DimensionProperty( const std::string& theEntry );
 
    /*!
    * \brief Constructor. Inits property from formatted QString.
@@ -459,17 +459,15 @@ public:
 
   /*!
    * \brief Loads properties data from attribute "AttributeTableOfReal".
-   * \param theStudy [in] the study.
    * \param theEntry [in] the entry of GEOM object to operate with.
    */
-  void LoadFromAttribute( SalomeApp_Study* theStudy, const std::string& theEntry );
+  void LoadFromAttribute( const std::string& theEntry );
 
   /*!
    * \brief Saves properties data to attribute "AttributeTableOfReal".
-   * \param theStudy [in] the study.
    * \param theEntry [in] the entry of GEOM object to operate with.
    */
-  void SaveToAttribute( SalomeApp_Study* theStudy, const std::string& theEntry );
+  void SaveToAttribute( const std::string& theEntry );
 
 private:
 
index 0644ff317015fe5f28cdcde47e4db086dde88495..351bb017ea9cd83a6ae08e8febf2a1adaa07c33c 100644 (file)
@@ -539,7 +539,7 @@ bool GEOMGUI_Selection::isNameMode( const int index ) const
 bool GEOMGUI_Selection::hasChildren( const _PTR(SObject)& obj )
 {
   // as soon as Use Case browser data tree was added
-  return obj ? obj->GetStudy()->GetUseCaseBuilder()->HasChildren( obj ) : false;
+  return obj ? SalomeApp_Application::getStudy()->GetUseCaseBuilder()->HasChildren( obj ) : false;
 }
 
 bool GEOMGUI_Selection::expandable( const _PTR(SObject)& obj )
@@ -601,8 +601,8 @@ int GEOMGUI_Selection::nbChildren( const int index ) const
     _PTR(Study) study = appStudy->studyDS();
     if ( study && !anEntry.isEmpty() ) {
       _PTR(SObject) aSO( study->FindObjectID( anEntry.toStdString() ) );
-      if ( aSO && aSO->GetStudy()->GetUseCaseBuilder()->IsUseCaseNode(aSO) ) {
-        _PTR(UseCaseIterator) it = aSO->GetStudy()->GetUseCaseBuilder()->GetUseCaseIterator( aSO ); 
+      if ( aSO && study->GetUseCaseBuilder()->IsUseCaseNode(aSO) ) {
+        _PTR(UseCaseIterator) it = study->GetUseCaseBuilder()->GetUseCaseIterator( aSO );
         for (it->Init(false); it->More(); it->Next()) nb++;
       }
     }
@@ -808,21 +808,13 @@ bool GEOMGUI_Selection::isFolder( const int index ) const
 
 bool GEOMGUI_Selection::hasDimensions( const int theIndex, bool& theHidden, bool& theVisible ) const
 {
-  SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( study() );
-
-  if ( !appStudy )
-  {
-    return false;
-  }
-
   QString anEntry = entry( theIndex );
-  _PTR(Study) aStudy = appStudy->studyDS();
-  if ( !aStudy || anEntry.isNull() )
+  if ( anEntry.isNull() )
   {
     return false;
   }
 
-  GEOMGUI_DimensionProperty aDimensions( appStudy, anEntry.toStdString() );
+  GEOMGUI_DimensionProperty aDimensions( anEntry.toStdString() );
 
   theHidden  = false;
   theVisible = false;
@@ -878,13 +870,13 @@ bool GEOMGUI_Selection::hasAnnotations( const int theIndex, bool& theHidden, boo
   if ( !aStudy || anEntry.isNull() )
     return false;
 
-  _PTR(SObject) aSObj = appStudy->studyDS()->FindObjectID( anEntry.toStdString() );\r
+  _PTR(SObject) aSObj = appStudy->studyDS()->FindObjectID( anEntry.toStdString() );
 
-  const Handle(GEOMGUI_AnnotationAttrs)\r
-    aShapeAnnotations = GEOMGUI_AnnotationAttrs::FindAttributes( aSObj );\r
+  const Handle(GEOMGUI_AnnotationAttrs)
+    aShapeAnnotations = GEOMGUI_AnnotationAttrs::FindAttributes( aSObj );
 
-  if ( aShapeAnnotations.IsNull() )\r
-    return false;\r
+  if ( aShapeAnnotations.IsNull() )
+    return false;
 
   theHidden  = false;
   theVisible = false;
index 70d7547656edb23f988cd8c5c8b36e47ff3ec0e1..93181d8f950542387dc0fc3a610d7b5b32a42a4e 100755 (executable)
@@ -61,9 +61,9 @@ namespace
   {
   public:
 
-    DimensionsProperty( SalomeApp_Study* theStudy, const std::string& theEntry ) :
-      myStudy( theStudy ), myEntry( theEntry ) {
-      myAttr.LoadFromAttribute( theStudy, theEntry );
+    DimensionsProperty( const std::string& theEntry ) :
+      myEntry( theEntry ) {
+      myAttr.LoadFromAttribute( theEntry );
     }
     virtual int GetNumber() Standard_OVERRIDE {
       return myAttr.GetNumber();
@@ -78,13 +78,12 @@ namespace
       myAttr.SetVisible( theIndex, theIsVisible );
     }
     virtual void Save() Standard_OVERRIDE {
-      myAttr.SaveToAttribute( myStudy, myEntry );
+      myAttr.SaveToAttribute( myEntry );
     }
     GEOMGUI_DimensionProperty& Attr() { return myAttr; }
 
   private:
     GEOMGUI_DimensionProperty myAttr;
-    SalomeApp_Study* myStudy;
     std::string myEntry;
   };
 
@@ -93,10 +92,9 @@ namespace
   {
   public:
 
-    AnnotationsProperty( SalomeApp_Study* theStudy, const std::string& theEntry ) {
+    AnnotationsProperty( const std::string& theEntry ) {
       myEntry = theEntry.c_str();
-      myStudy = theStudy;
-      _PTR(SObject) aSObj = theStudy->studyDS()->FindObjectID( theEntry );
+      _PTR(SObject) aSObj = SalomeApp_Application::getStudy()->FindObjectID( theEntry );
       if ( aSObj ) {
         myAttr = GEOMGUI_AnnotationAttrs::FindAttributes( aSObj );
       }
@@ -132,7 +130,7 @@ namespace
 protected:
     GEOMGUI_AnnotationMgr* annotationMgr() const
     {
-      CAM_Application* anApp = dynamic_cast<CAM_Application*>(myStudy->application());
+      CAM_Application* anApp = dynamic_cast<CAM_Application*>(SUIT_Session::session()->activeApplication());
       GeometryGUI* aModule = dynamic_cast<GeometryGUI*>(anApp->activeModule());
       if (!aModule) {
         return NULL;
@@ -143,7 +141,6 @@ protected:
 private:
     QString myEntry;
     Handle(GEOMGUI_AnnotationAttrs) myAttr;
-    SalomeApp_Study* myStudy;
   };
 }
 
@@ -156,10 +153,9 @@ private:
 // purpose  :
 //=================================================================================
 GEOMGUI_TextTreeWdg::GEOMGUI_TextTreeWdg( SalomeApp_Application* app )
-  : myDisplayer(NULL)
 {
   myStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
-  myDisplayer = GEOM_Displayer( myStudy );
+  myDisplayer = GEOM_Displayer();
 
   SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
   myVisibleIcon = QIcon( resMgr->loadPixmap( "SUIT", tr( "ICON_DATAOBJ_VISIBLE" ) ) );
@@ -407,8 +403,8 @@ QSharedPointer<GEOMGUI_TextTreeWdg::VisualProperty>
 {
   switch ( theBranchType )
   {
-    case DimensionShape  : return QSharedPointer<VisualProperty>( new DimensionsProperty( theStudy, theEntry ) );
-    case AnnotationShape : return QSharedPointer<VisualProperty>( new AnnotationsProperty( theStudy, theEntry ) );
+    case DimensionShape  : return QSharedPointer<VisualProperty>( new DimensionsProperty( theEntry ) );
+    case AnnotationShape : return QSharedPointer<VisualProperty>( new AnnotationsProperty( theEntry ) );
     default: break;
   }
   return QSharedPointer<VisualProperty>();
@@ -448,7 +444,8 @@ void GEOMGUI_TextTreeWdg::onItemClicked( QTreeWidgetItem* theItem, int theColumn
 
   QSharedPointer<VisualProperty> aProp = getVisualProperty( aBranchType, myStudy, anEntry );
 
-  CAM_Application* anApp = dynamic_cast<CAM_Application*>(myStudy->application());
+  SalomeApp_Application* anApp =
+    dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
   GeometryGUI* aModule = dynamic_cast<GeometryGUI*>(anApp->activeModule());
   if ( aProp->GetIsVisible( aDimIndex ) ) {
     aModule->GetAnnotationMgr()->Erase(anEntry.c_str(), aDimIndex);
index 64943f7419a994cc91a348ce121e68841c66222a..0311bf0f27663341b61b8640fba1114345ab90b2 100755 (executable)
@@ -461,16 +461,13 @@ static std::string getName( GEOM::GEOM_BaseObject_ptr object )
  *  Constructor
  */
 //=================================================================
-GEOM_Displayer::GEOM_Displayer( SalomeApp_Study* st )
-  : myUpdateColorScale( true ), myIsRedisplayed( false )
+GEOM_Displayer::GEOM_Displayer()
+  : myUpdateColorScale(true), myIsRedisplayed( false )
 {
-  if( st )
-    myApp = dynamic_cast<SalomeApp_Application*>( st->application() );
-  else
-    myApp = 0;
+  SUIT_Session* session = SUIT_Session::session();
+  myApp = dynamic_cast<SalomeApp_Application*>( session->activeApplication() );
 
   /* Shading Color */
-  SUIT_Session* session = SUIT_Session::session();
   SUIT_ResourceMgr* resMgr = session->resourceMgr();
 
   QColor col = resMgr->colorValue( "Geometry", "shading_color", QColor( 255, 0, 0 ) );
@@ -794,7 +791,7 @@ void GEOM_Displayer::updateShapeProperties( const Handle(GEOM_AISShape)& AISShap
   int aMgrId = !anIO.IsNull() ? getViewManagerId( myViewFrame ) : -1;
 
   // get presentation properties
-  PropMap propMap = getObjectProperties( study, entry, myViewFrame );
+  PropMap propMap = getObjectProperties( entry, myViewFrame );
 
   // Temporary staff: vertex must be infinite for correct visualization
   AISShape->SetInfiniteState( myShape.Infinite() ); // || myShape.ShapeType() == TopAbs_VERTEX // VSR: 05/04/2010: Fix 20668 (Fit All for points & lines)
@@ -939,14 +936,14 @@ void GEOM_Displayer::updateShapeProperties( const Handle(GEOM_AISShape)& AISShap
     aImagePath = GetTexture().c_str();
     if ( ! entry.isEmpty() ) {
       // check that study is active
-      SalomeApp_Study* study = getActiveStudy();
+      SalomeApp_Study* study = getStudy();
       if ( study ) {
         // Store the texture in object properties for next displays
         study->setObjectProperty( aMgrId, entry, GEOM::propertyName( GEOM::Texture ), QString( GetTexture().c_str() ) );
         study->setObjectProperty( aMgrId, entry, GEOM::propertyName( GEOM::DisplayMode ), 3 );
         
         // Update properties map
-        propMap = getObjectProperties( study, entry, myViewFrame );
+        propMap = getObjectProperties( entry, myViewFrame );
       }
     }
   }
@@ -1001,7 +998,7 @@ void GEOM_Displayer::updateShapeProperties( const Handle(GEOM_AISShape)& AISShap
       int textureId = aList[0].toInt();
       Standard_Integer aWidth, aHeight;
       Handle(TColStd_HArray1OfByte) aTexture =
-        GeometryGUI::getTexture( study, textureId, aWidth, aHeight );
+        GeometryGUI::getTexture( textureId, aWidth, aHeight );
       if ( !aTexture.IsNull() ) {
         Handle(Prs3d_PointAspect) aTextureAspect =
           new Prs3d_PointAspect( HasColor() ? 
@@ -1064,7 +1061,7 @@ void GEOM_Displayer::updateActorProperties( GEOM_Actor* actor, bool create )
   int aMgrId = !anIO.IsNull() ? getViewManagerId( myViewFrame ) : -1;
 
   // get presentation properties
-  PropMap propMap = getObjectProperties( study, entry, myViewFrame );
+  PropMap propMap = getObjectProperties( entry, myViewFrame );
   QColor c;
 
   /////////////////////////////////////////////////////////////////////////
@@ -1278,7 +1275,7 @@ void GEOM_Displayer::updateDimensions( const Handle(SALOME_InteractiveObject)& t
   }
   else
   {
-    aRecords.LoadFromAttribute( getStudy(), theIO->getEntry() );
+    aRecords.LoadFromAttribute( theIO->getEntry() );
   }
   
   // create up-to-date dimension presentations
@@ -1753,50 +1750,44 @@ SALOME_Prs* GEOM_Displayer::buildPresentation( const QString& entry,
         // set interactive object
         setIO( theIO );
         //  Find SOBject (because shape should be published previously)
-        SUIT_Session* session = SUIT_Session::session();
-        SUIT_Application* app = session->activeApplication();
-        if ( app )
+        if ( getStudy() )
         {
-          SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
-          if ( study )
+          _PTR(SObject) SO ( getStudy()->studyDS()->FindObjectID( theIO->getEntry() ) );
+          if ( SO )
           {
-            _PTR(SObject) SO ( study->studyDS()->FindObjectID( theIO->getEntry() ) );
-            if ( SO )
+            // get CORBA reference to data object
+            CORBA::Object_var object = GeometryGUI::ClientSObjectToObject(SO);
+            if ( !CORBA::is_nil( object ) )
             {
-              // get CORBA reference to data object
-              CORBA::Object_var object = GeometryGUI::ClientSObjectToObject(SO);
-              if ( !CORBA::is_nil( object ) )
+              // downcast to GEOM base object
+              GEOM::GEOM_BaseObject_var GeomBaseObject = GEOM::GEOM_BaseObject::_narrow( object );
+              if ( !GeomBaseObject->_is_nil() )
               {
-                // downcast to GEOM base object
-                GEOM::GEOM_BaseObject_var GeomBaseObject = GEOM::GEOM_BaseObject::_narrow( object );
-                if ( !GeomBaseObject->_is_nil() )
-                {
-                  myType = GeomBaseObject->GetType();
+                myType = GeomBaseObject->GetType();
 
-                  // downcast to GEOM object
-                  GEOM::GEOM_Object_var GeomObject = GEOM::GEOM_Object::_narrow( GeomBaseObject );
-                  if ( myType == GEOM_FIELD_STEP )
+                // downcast to GEOM object
+                GEOM::GEOM_Object_var GeomObject = GEOM::GEOM_Object::_narrow( GeomBaseObject );
+                if ( myType == GEOM_FIELD_STEP )
+                {
+                  // get the GEOM object from the field's shape
+                  GEOM::GEOM_FieldStep_var GeomFieldStep = GEOM::GEOM_FieldStep::_narrow( GeomBaseObject );
+                  if ( !GeomFieldStep->_is_nil() )
                   {
-                    // get the GEOM object from the field's shape
-                    GEOM::GEOM_FieldStep_var GeomFieldStep = GEOM::GEOM_FieldStep::_narrow( GeomBaseObject );
-                    if ( !GeomFieldStep->_is_nil() )
-                    {
-                      GEOM::GEOM_Field_var GeomField = GeomFieldStep->GetField();
-                      if ( !GeomField->_is_nil() )
-                        GeomObject = GeomField->GetShape();
-                    }
-
-                    // read the field step information
-                    readFieldStepInfo( GeomFieldStep );
+                    GEOM::GEOM_Field_var GeomField = GeomFieldStep->GetField();
+                    if ( !GeomField->_is_nil() )
+                      GeomObject = GeomField->GetShape();
                   }
 
-                  if ( !GeomObject->_is_nil() )
-                  {
+                  // read the field step information
+                  readFieldStepInfo( GeomFieldStep );
+                }
+
+                if ( !GeomObject->_is_nil() )
+                {
                     CORBA::String_var name = GeomObject->GetName();
                     theIO->setName( name );
                     // finally set shape
                     setShape( GEOM_Client::get_client().GetShape( GeometryGUI::GetGeomGen(), GeomObject ) );
-                  }
                 }
               }
             }
@@ -2496,21 +2487,20 @@ SALOMEDS::Color GEOM_Displayer::getUniqueColor( const QList<SALOMEDS::Color>& th
   return aSColor;
 }
 
-PropMap GEOM_Displayer::getObjectProperties( SalomeApp_Study* study,
-                                             const QString& entry,
+PropMap GEOM_Displayer::getObjectProperties( const QString& entry,
                                              SALOME_View* view )
 {
   // get default properties for the explicitly specified default view type
   PropMap propMap = GEOM_Displayer::getDefaultPropertyMap();
 
-  if ( study && view ) {
+  if ( getStudy() && view ) {
     SUIT_ViewModel* viewModel = dynamic_cast<SUIT_ViewModel*>( view );
     SUIT_ViewManager* viewMgr = ( viewModel != 0 ) ? viewModel->getViewManager() : 0;
     int viewId = ( viewMgr != 0 ) ? viewMgr->getGlobalId() : -1;
   
     if ( viewModel && viewId != -1 ) {
       // get properties from the study
-      PropMap storedMap = study->getObjectProperties( viewId, entry );
+      PropMap storedMap = getStudy()->getObjectProperties( viewId, entry );
       // overwrite default properties from stored ones (that are specified)
       for ( int prop = GEOM::Visibility; prop <= GEOM::LastProperty; prop++ ) {
         if ( storedMap.contains( GEOM::propertyName( (GEOM::Property)prop ) ) )
@@ -2530,7 +2520,7 @@ PropMap GEOM_Displayer::getObjectProperties( SalomeApp_Study* study,
 
       if ( !entry.isEmpty() ) {
         // get CORBA reference to geom object
-        _PTR(SObject) SO( study->studyDS()->FindObjectID( entry.toStdString() ) );
+        _PTR(SObject) SO( getStudy()->studyDS()->FindObjectID( entry.toStdString() ) );
         if ( SO ) {
           CORBA::Object_var object = GeometryGUI::ClientSObjectToObject( SO );
           if ( !CORBA::is_nil( object ) ) {
@@ -2728,16 +2718,9 @@ SALOMEDS::Color GEOM_Displayer::getColor(GEOM::GEOM_Object_var theGeomObject, bo
 
 
 void GEOM_Displayer::EraseWithChildren(const Handle(SALOME_InteractiveObject)& theIO,
-                                       const bool eraseOnlyChildren) {
-  SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
-  if ( !app )
-    return;
-
-  SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
-  if ( !appStudy )
-    return;
-
-  LightApp_DataObject* parent = appStudy->findObjectByEntry(theIO->getEntry());
+                                       const bool eraseOnlyChildren)
+{
+  LightApp_DataObject* parent = getStudy()->findObjectByEntry(theIO->getEntry());
 
   if( !parent)
     return;
@@ -2745,7 +2728,7 @@ void GEOM_Displayer::EraseWithChildren(const Handle(SALOME_InteractiveObject)& t
   // Erase from all views
   QList<SALOME_View*> views;
   SALOME_View* view;
-  ViewManagerList vmans = app->viewManagers();
+  ViewManagerList vmans = myApp->viewManagers();
   SUIT_ViewManager* vman;
   foreach ( vman, vmans ) {
     SUIT_ViewModel* vmod = vman->getViewModel();
index 712fe8316ab3aa04dc4b15d3cd6e2a61e3d93326..c01dadf05adbacd9f3f340a863833e819dde1ff4 100755 (executable)
@@ -72,7 +72,7 @@ class GEOMGUI_EXPORT GEOM_Displayer : public LightApp_Displayer
 
 public:
   /* Constructor */
-  GEOM_Displayer( SalomeApp_Study* app );
+  GEOM_Displayer();
   /* Destructor */
   virtual ~GEOM_Displayer();
 
@@ -262,7 +262,7 @@ protected:
   void           updateDimensions( const Handle(SALOME_InteractiveObject)&, SALOME_OCCPrs*, const gp_Ax3& );
   void           updateShapeAnnotations( const Handle(SALOME_InteractiveObject)&, SALOME_OCCPrs*, const gp_Ax3& );
 
-  PropMap getObjectProperties( SalomeApp_Study*, const QString&, SALOME_View* = 0 );
+  PropMap getObjectProperties( const QString&, SALOME_View* = 0 );
   PropMap getDefaultPropertyMap();
 
   /* Methods for reading the field step information */
index 7dd7a7eb3f25a0d966b386070f35fb1b5b88c8eb..27995b8fe3a95ac46b6bca7c0432fe5fe3bc3c87 100755 (executable)
@@ -138,7 +138,7 @@ extern "C" {
   }
 }
 
-GeometryGUI::StudyTextureMap GeometryGUI::myTextureMap;
+GeometryGUI::TextureMap GeometryGUI::myTextureMap;
 
 GEOM::GEOM_Gen_var GeometryGUI::myComponentGeom = GEOM::GEOM_Gen::_nil();
 
@@ -178,17 +178,15 @@ CORBA::Object_var GeometryGUI::ClientSObjectToObject (_PTR(SObject) theSObject)
 }
 
 //=======================================================================
-// function : ClientStudyToStudy
+// function : GetStudy
 // purpose  :
 //=======================================================================
-SALOMEDS::Study_var GeometryGUI::ClientStudyToStudy (_PTR(Study) theStudy)
+SALOMEDS::Study_var GeometryGUI::getStudyServant()
 {
   SALOME_NamingService *aNamingService = SalomeApp_Application::namingService();
-  CORBA::Object_var aSMObject = aNamingService->Resolve("/myStudyManager");
-  SALOMEDS::StudyManager_var aStudyManager = SALOMEDS::StudyManager::_narrow(aSMObject);
-  int aStudyID = theStudy->StudyId();
-  SALOMEDS::Study_var aDSStudy = aStudyManager->GetStudyByID(aStudyID);
-  return aDSStudy._retn();
+  CORBA::Object_var aStudyObject = aNamingService->Resolve("/Study");
+  SALOMEDS::Study_var aStudy = SALOMEDS::Study::_narrow(aStudyObject);
+  return aStudy._retn();
 }
 
 void GeometryGUI::Modified (bool theIsUpdateActions)
@@ -926,9 +924,8 @@ void GeometryGUI::createOriginAndBaseVectors()
     return;
   }
   if ( appStudy ) {
-    _PTR(Study) studyDS = appStudy->studyDS();
-    if ( studyDS && !CORBA::is_nil( GetGeomGen() ) ) {
-      GEOM::GEOM_IBasicOperations_var aBasicOperations = GetGeomGen()->GetIBasicOperations( studyDS->StudyId() );
+    if ( !CORBA::is_nil( GetGeomGen() ) ) {
+      GEOM::GEOM_IBasicOperations_var aBasicOperations = GetGeomGen()->GetIBasicOperations();
       if ( !aBasicOperations->_is_nil() ) {
         SUIT_ResourceMgr* aResourceMgr = SUIT_Session::session()->resourceMgr();
         double aLength = aResourceMgr->doubleValue( "Geometry", "base_vectors_length", 1.0 );
@@ -937,11 +934,10 @@ void GeometryGUI::createOriginAndBaseVectors()
         GEOM::GEOM_Object_var anOY = aBasicOperations->MakeVectorDXDYDZ( 0.0, aLength, 0.0 );
         GEOM::GEOM_Object_var anOZ = aBasicOperations->MakeVectorDXDYDZ( 0.0, 0.0, aLength );
 
-        SALOMEDS::Study_var aDSStudy = ClientStudyToStudy( studyDS );
-        GetGeomGen()->PublishInStudy( aDSStudy, SALOMEDS::SObject::_nil(), anOrigin, "O" );
-        GetGeomGen()->PublishInStudy( aDSStudy, SALOMEDS::SObject::_nil(), anOX, "OX" );
-        GetGeomGen()->PublishInStudy( aDSStudy, SALOMEDS::SObject::_nil(), anOY, "OY" );
-        GetGeomGen()->PublishInStudy( aDSStudy, SALOMEDS::SObject::_nil(), anOZ, "OZ" );
+        GetGeomGen()->PublishInStudy( SALOMEDS::SObject::_nil(), anOrigin, "O" );
+        GetGeomGen()->PublishInStudy( SALOMEDS::SObject::_nil(), anOX, "OX" );
+        GetGeomGen()->PublishInStudy( SALOMEDS::SObject::_nil(), anOY, "OY" );
+        GetGeomGen()->PublishInStudy( SALOMEDS::SObject::_nil(), anOZ, "OZ" );
         anOrigin->UnRegister();
         anOX->UnRegister();
         anOY->UnRegister();
@@ -2167,7 +2163,7 @@ void GeometryGUI::onAutoBringToFront()
   SalomeApp_Study* appStudy = dynamic_cast< SalomeApp_Study* >( getApp()->activeStudy() );
   if (!appStudy) return;
 
-  GEOM_Displayer displayer( appStudy );
+  GEOM_Displayer displayer;
   
   SALOME_View* window = displayer.GetActiveView();
   if ( !window ) return;
@@ -2210,10 +2206,8 @@ void GeometryGUI::onAutoBringToFront()
 
 void GeometryGUI::updateFieldColorScale()
 {
-  if( SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( getApp()->activeStudy() ) )
-  {
-    GEOM_Displayer( aStudy ).UpdateColorScale();
-  }
+  GEOM_Displayer aDisplayer;
+  aDisplayer.UpdateColorScale();
 }
 
 QString GeometryGUI::engineIOR() const
@@ -2223,31 +2217,27 @@ QString GeometryGUI::engineIOR() const
   return "";
 }
 
-Handle(TColStd_HArray1OfByte) GeometryGUI::getTexture
-      (SalomeApp_Study* theStudy, int theId, int& theWidth, int& theHeight)
+Handle(TColStd_HArray1OfByte) GeometryGUI::getTexture (int theId, int& theWidth, int& theHeight)
 {
   theWidth = theHeight = 0;
 
   Handle(TColStd_HArray1OfByte) aTexture;
 
-  if (theStudy) {
-    TextureMap aTextureMap = myTextureMap[ theStudy->studyDS()->StudyId() ];
-    aTexture = aTextureMap[ theId ];
-    if ( aTexture.IsNull() ) {
-      GEOM::GEOM_IInsertOperations_var aInsOp = GeometryGUI::GetGeomGen()->GetIInsertOperations( theStudy->studyDS()->StudyId() );
-      if ( !aInsOp->_is_nil() ) {
-        CORBA::Long aWidth, aHeight;
-        SALOMEDS::TMPFile_var aStream = aInsOp->GetTexture( theId, aWidth, aHeight );
-        if ( aWidth > 0 && aHeight > 0 && aStream->length() > 0 ) {
-          theWidth  = aWidth;
-          theHeight = aHeight;
-
-          aTexture  = new TColStd_HArray1OfByte (1, aStream->length());
-
-          for ( CORBA::ULong i = 0; i < aStream->length(); i++)
-            aTexture->SetValue( i+1, (Standard_Byte)aStream[i] );
-          aTextureMap[ theId ] = aTexture;
-        }
+  aTexture = myTextureMap[ theId ];
+  if ( aTexture.IsNull() ) {
+    GEOM::GEOM_IInsertOperations_var aInsOp = GeometryGUI::GetGeomGen()->GetIInsertOperations();
+    if ( !aInsOp->_is_nil() ) {
+      CORBA::Long aWidth, aHeight;
+      SALOMEDS::TMPFile_var aStream = aInsOp->GetTexture( theId, aWidth, aHeight );
+      if ( aWidth > 0 && aHeight > 0 && aStream->length() > 0 ) {
+        theWidth  = aWidth;
+        theHeight = aHeight;
+
+        aTexture  = new TColStd_HArray1OfByte (1, aStream->length());
+
+        for ( CORBA::ULong i = 0; i < aStream->length(); i++)
+          aTexture->SetValue( i+1, (Standard_Byte)aStream[i] );
+        myTextureMap[ theId ] = aTexture;
       }
     }
   }
@@ -2820,10 +2810,7 @@ void GeometryGUI::preferencesChanged( const QString& section, const QString& par
              param == QString("scalar_bar_height") ||
              param == QString("scalar_bar_text_height") ||
              param == QString("scalar_bar_nb_intervals")) {
-      if( /*SalomeApp_Study* aStudy = */dynamic_cast<SalomeApp_Study*>( getApp()->activeStudy() ) )
-      {
-        updateFieldColorScale();
-      }
+      updateFieldColorScale();
     }
     else if ( param == QString("dimensions_color")            ||
               param == QString("dimensions_line_width")       ||
@@ -2848,13 +2835,7 @@ void GeometryGUI::preferencesChanged( const QString& section, const QString& par
         return;
       }
 
-      SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( anApp->activeStudy() );
-      if ( !aStudy )
-      {
-        return;
-      }
-
-      GEOM_Displayer aDisplayer( aStudy );
+      GEOM_Displayer aDisplayer;
 
       ViewManagerList aVMs;
       anApp->viewManagers( OCCViewer_Viewer::Type(), aVMs );
@@ -2911,7 +2892,7 @@ void GeometryGUI::preferencesChanged( const QString& section, const QString& par
 LightApp_Displayer* GeometryGUI::displayer()
 {
   if ( !myDisplayer )
-    myDisplayer = new GEOM_Displayer( dynamic_cast<SalomeApp_Study*>( getApp()->activeStudy() ) );
+    myDisplayer = new GEOM_Displayer();
   return myDisplayer;
 }
 
@@ -3114,7 +3095,7 @@ void GeometryGUI::storeVisualParameters (int savePoint)
     std::string aStoreEntry = ip->encodeEntry( aStudyEntry, componentName );
 
     // store dimension parameters
-    GEOMGUI_DimensionProperty aDimensions( appStudy, aStudyEntry );
+    GEOMGUI_DimensionProperty aDimensions( aStudyEntry );
     if ( aDimensions.GetNumber() != 0 ) {
       ip->setParameter( aStoreEntry, aDimensionParam.toStdString(), ((QString)aDimensions).toLatin1().data() );
     }
@@ -3204,7 +3185,7 @@ void GeometryGUI::restoreVisualParameters (int savePoint)
         if ( aParamNameStr == GEOM::propertyName( GEOM::Dimensions ) )
         {
           GEOMGUI_DimensionProperty aDimensionProp( aValuesStr );
-          aDimensionProp.SaveToAttribute( appStudy, entry.toLatin1().data() );
+          aDimensionProp.SaveToAttribute( entry.toLatin1().data() );
         }
         else if ( aParamNameStr == GEOM::propertyName( GEOM::ShapeAnnotations ) )
         {
@@ -3328,7 +3309,7 @@ void UpdateNameMode( SalomeApp_Application* app )
   bool isMode = false;
   SalomeApp_Study* aStudy = dynamic_cast< SalomeApp_Study* >( app->activeStudy() );
   SUIT_ViewWindow* viewWindow = app->desktop()->activeWindow();
-  GEOM_Displayer displayer( aStudy );
+  GEOM_Displayer displayer;
   int aMgrId = viewWindow->getViewManager()->getGlobalId();
 
   SALOME_View* window = displayer.GetActiveView();
@@ -3431,12 +3412,14 @@ void GeometryGUI::ClearShapeBuffer( GEOM::GEOM_Object_ptr theObj )
   TCollection_AsciiString asciiIOR( (char *)IOR.in() );
   GEOM_Client::get_client().RemoveShapeFromBuffer( asciiIOR );
 
-  SALOMEDSClient_StudyManager *aManager = SalomeApp_Application::studyMgr();
+  SalomeApp_Application* app =
+    dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication());
+  SalomeApp_Study* appStudy = app ? dynamic_cast<SalomeApp_Study*>( app->activeStudy() ) : 0;
 
-  if (!aManager)
+  if (!appStudy)
     return;
 
-  _PTR(Study) aStudy = aManager->GetStudyByID(theObj->GetStudyID());
+  _PTR(Study) aStudy = appStudy->studyDS();
 
   if ( !aStudy )
     return;
@@ -3603,7 +3586,7 @@ bool GeometryGUI::isDraggable( const SUIT_DataObject* what ) const
       _PTR(SObject) aSO = dataObj->object();
       if ( aSO ) {
         _PTR(GenericAttribute) anAttr;
-        _PTR(SObject) aFatherSO = aSO->GetStudy()->GetUseCaseBuilder()->GetFather( aSO );
+        _PTR(SObject) aFatherSO = SalomeApp_Application::getStudy()->GetUseCaseBuilder()->GetFather( aSO );
         if ( aFatherSO && aFatherSO->FindAttribute(anAttr, "AttributeLocalID") ) {
           _PTR(AttributeLocalID) aLocalID( anAttr );
           anObjectInFolder = aLocalID->Value() == 999;
@@ -3680,7 +3663,7 @@ void GeometryGUI::dropObjects( const DataObjectList& what, SUIT_DataObject* wher
   _PTR(SObject) parentObj = dataObj->object();
 
   // Find the current Study and StudyBuilder
-  _PTR(Study) aStudy = parentObj->GetStudy();
+  _PTR(Study) aStudy = SalomeApp_Application::getStudy();
   _PTR(UseCaseBuilder) aUseCaseBuilder = aStudy->GetUseCaseBuilder();
   // collect all parents of the target node
   QStringList parentIDs;
index 2f9c592ae7533bd8d113fa22f014eaa5a3d57069..9d6165611624c622f62b18d7098f72e858f06150 100644 (file)
@@ -85,14 +85,14 @@ public:
   virtual void                initialize( CAM_Application* );
   virtual QString             engineIOR() const;
 
-  static Handle(TColStd_HArray1OfByte) getTexture (SalomeApp_Study*, int, int&, int&);
+  static Handle(TColStd_HArray1OfByte) getTexture (int, int&, int&);
 
   static bool                 InitGeomGen();
 
   static  GEOM::GEOM_Gen_var  GetGeomGen();
 
   static CORBA::Object_var    ClientSObjectToObject (_PTR(SObject) theSObject);
-  static SALOMEDS::Study_var  ClientStudyToStudy (_PTR(Study) theStudy);
+  static SALOMEDS::Study_var  getStudyServant();
 
   static void                 Modified( bool = true );
 
@@ -213,32 +213,31 @@ private:
 
   typedef QMap<long, Handle(TColStd_HArray1OfByte)> TextureMap;
 
-  typedef QMap<long, TextureMap> StudyTextureMap;
   typedef QMap<QString, GEOMGUI*> GUIMap;
 
   typedef QPair<QString, QString> PluginAction;
 
-  GUIMap                      myGUIMap;          // GUI libraries map
-  QDialog*                    myActiveDialogBox; // active dialog box
-  gp_Ax3                      myWorkingPlane;
-  //QMap<int,QString>           myRules;           // popup rules
-  static StudyTextureMap      myTextureMap;      // texture map
+  GUIMap                       myGUIMap;          // GUI libraries map
+  QDialog*                     myActiveDialogBox; // active dialog box
+  gp_Ax3                       myWorkingPlane;
+  //QMap<int,QString>          myRules;           // popup rules
+  static TextureMap            myTextureMap;      // texture map
 
-  QMap<int, PluginAction>      myPluginActions; // plugin actions
-  QMap<QString, QString>       myPluginLibs;    // plugin name to plugin client library
+  QMap<int, PluginAction>      myPluginActions;   // plugin actions
+  QMap<QString, QString>       myPluginLibs;      // plugin name to plugin client library
 
   QList<GEOMGUI_OCCSelector*>  myOCCSelectors;
   QList<LightApp_VTKSelector*> myVTKSelectors;
 
-  LightApp_Displayer*         myDisplayer;
-  int                         myLocalSelectionMode; //Select Only
+  LightApp_Displayer*          myDisplayer;
+  int                          myLocalSelectionMode; //Select Only
 
-  GEOMGUI_CreationInfoWdg*    myCreationInfoWdg;
+  GEOMGUI_CreationInfoWdg*     myCreationInfoWdg;
   
   GEOMGUI_TextTreeWdg*        myTextTreeWdg;
   GEOMGUI_AnnotationMgr*      myAnnotationMgr;
   
-  SALOME_ListIO               myTopLevelIOList;               
+  SALOME_ListIO                myTopLevelIOList;
 
   friend class DisplayGUI;
 };
index 8f574c85f5df5cd787eab4389b01bbfe80b242e6..bb51dcf6a59a00478db47021f12e42711b2ff2fe 100644 (file)
@@ -85,7 +85,7 @@ Standard_Integer GEOMImpl_ExportDriver::Execute(Handle(TFunction_Logbook)& log)
   if (aFileName.IsEmpty() || aFormatName.IsEmpty() || aLibName.IsEmpty())
     return 0;
 
-  if( !GEOMImpl_IECallBack::GetCallBack( aFormatName )->Export( GetDocID(), obj, aFileName, aFormatName ) );
+  if( !GEOMImpl_IECallBack::GetCallBack( aFormatName )->Export( obj, aFileName, aFormatName ) );
     return 0;
 
   log->SetTouched(Label());
index d3a54575db1999a795a98425fe2ca20cf721f449..eb91f194ef519a1502a2facd6587e5a08acc4499 100644 (file)
@@ -93,7 +93,6 @@
 GEOMImpl_Gen::GEOMImpl_Gen()
 {
    MESSAGE("GEOMImpl_Gen::GEOMImpl_Gen");
-   _mapOfBasicOperations.clear();
 
    // Basic elements
    TFunction_DriverTable::Get()->AddDriver(GEOMImpl_PointDriver::GetID(), new GEOMImpl_PointDriver());
@@ -170,6 +169,20 @@ GEOMImpl_Gen::GEOMImpl_Gen()
    /*@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@*/
 
    SetEngine(this);
+
+   _BasicOperations = new GEOMImpl_IBasicOperations( this );
+   _TransformOperations = new GEOMImpl_ITransformOperations( this );
+   _3DPrimOperations = new GEOMImpl_I3DPrimOperations( this );
+   _ShapesOperations = new GEOMImpl_IShapesOperations( this );
+   _BlocksOperations = new GEOMImpl_IBlocksOperations( this );
+   _BooleanOperations = new GEOMImpl_IBooleanOperations( this );
+   _HealingOperations = new GEOMImpl_IHealingOperations( this );
+   _CurvesOperations = new GEOMImpl_ICurvesOperations( this );
+   _LocalOperations = new GEOMImpl_ILocalOperations( this );
+   _InsertOperations = new GEOMImpl_IInsertOperations( this );
+   _MeasureOperations = new GEOMImpl_IMeasureOperations( this );
+   _GroupOperations = new GEOMImpl_IGroupOperations( this );
+   _FieldOperations = new GEOMImpl_IFieldOperations( this );
 }
 
 //=============================================================================
@@ -182,57 +195,19 @@ GEOMImpl_Gen::~GEOMImpl_Gen()
 {
   MESSAGE("GEOMImpl_Gen::~GEOMImpl_Gen");
 
-  std::map<int, GEOMImpl_IBasicOperations*>::iterator aBasicIter = _mapOfBasicOperations.begin();
-  for (; aBasicIter != _mapOfBasicOperations.end(); aBasicIter++)
-    delete (*aBasicIter).second;
-
-  std::map<int, GEOMImpl_ITransformOperations*>::iterator aTransformIter = _mapOfTransformOperations.begin();
-  for (; aTransformIter != _mapOfTransformOperations.end(); aTransformIter++)
-    delete (*aTransformIter).second;
-
-  std::map<int, GEOMImpl_I3DPrimOperations*>::iterator a3DPrimIter = _mapOf3DPrimOperations.begin();
-  for (; a3DPrimIter != _mapOf3DPrimOperations.end(); a3DPrimIter++)
-    delete (*a3DPrimIter).second;
-
-  std::map<int, GEOMImpl_IShapesOperations*>::iterator aShapesIter = _mapOfShapesOperations.begin();
-  for (; aShapesIter != _mapOfShapesOperations.end(); aShapesIter++)
-    delete (*aShapesIter).second;
-
-  std::map<int, GEOMImpl_IBlocksOperations*>::iterator aBlocksIter = _mapOfBlocksOperations.begin();
-  for (; aBlocksIter != _mapOfBlocksOperations.end(); aBlocksIter++)
-    delete (*aBlocksIter).second;
-
-  std::map<int, GEOMImpl_IBooleanOperations*>::iterator aBooleanIter = _mapOfBooleanOperations.begin();
-  for (; aBooleanIter != _mapOfBooleanOperations.end(); aBooleanIter++)
-    delete (*aBooleanIter).second;
-
-  std::map<int, GEOMImpl_IHealingOperations*>::iterator aHealingIter = _mapOfHealingOperations.begin();
-  for (; aHealingIter != _mapOfHealingOperations.end(); aHealingIter++)
-    delete (*aHealingIter).second;
-
-  std::map<int, GEOMImpl_ICurvesOperations*>::iterator aCurvesIter = _mapOfCurvesOperations.begin();
-  for (; aCurvesIter != _mapOfCurvesOperations.end(); aCurvesIter++)
-    delete (*aCurvesIter).second;
-
-  std::map<int, GEOMImpl_ILocalOperations*>::iterator aLocalIter = _mapOfLocalOperations.begin();
-  for (; aLocalIter != _mapOfLocalOperations.end(); aLocalIter++)
-    delete (*aLocalIter).second;
-
-  std::map<int, GEOMImpl_IInsertOperations*>::iterator aInsertIter = _mapOfInsertOperations.begin();
-  for (; aInsertIter != _mapOfInsertOperations.end(); aInsertIter++)
-    delete (*aInsertIter).second;
-
-  std::map<int, GEOMImpl_IMeasureOperations*>::iterator aMeasureIter = _mapOfMeasureOperations.begin();
-  for (; aMeasureIter != _mapOfMeasureOperations.end(); aMeasureIter++)
-    delete (*aMeasureIter).second;
-
-  std::map<int, GEOMImpl_IGroupOperations*>::iterator aGroupIter = _mapOfGroupOperations.begin();
-  for (; aGroupIter != _mapOfGroupOperations.end(); aGroupIter++)
-    delete (*aGroupIter).second;
-
-  std::map<int, GEOMImpl_IFieldOperations*>::iterator aFieldIter = _mapOfFieldOperations.begin();
-  for (; aFieldIter != _mapOfFieldOperations.end(); aFieldIter++)
-    delete (*aFieldIter).second;
+  delete _BasicOperations;
+  delete _TransformOperations;
+  delete _3DPrimOperations;
+  delete _ShapesOperations;
+  delete _BlocksOperations;
+  delete _BooleanOperations;
+  delete _HealingOperations;
+  delete _CurvesOperations;
+  delete _LocalOperations;
+  delete _InsertOperations;
+  delete _MeasureOperations;
+  delete _GroupOperations;
+  delete _FieldOperations;
 }
 
 //=============================================================================
@@ -240,13 +215,9 @@ GEOMImpl_Gen::~GEOMImpl_Gen()
  * GetIBasicOperations
  */
 //=============================================================================
-GEOMImpl_IBasicOperations* GEOMImpl_Gen::GetIBasicOperations(int theDocID)
+GEOMImpl_IBasicOperations* GEOMImpl_Gen::GetIBasicOperations()
 {
-  if(_mapOfBasicOperations.find(theDocID) == _mapOfBasicOperations.end()) {
-    _mapOfBasicOperations[theDocID] = new GEOMImpl_IBasicOperations(this, theDocID);
-  }
-
-  return _mapOfBasicOperations[theDocID];
+  return _BasicOperations;
 }
 
 //=============================================================================
@@ -254,13 +225,9 @@ GEOMImpl_IBasicOperations* GEOMImpl_Gen::GetIBasicOperations(int theDocID)
  * GetITransformOperations
  */
 //=============================================================================
-GEOMImpl_ITransformOperations* GEOMImpl_Gen::GetITransformOperations(int theDocID)
+GEOMImpl_ITransformOperations* GEOMImpl_Gen::GetITransformOperations()
 {
-  if(_mapOfTransformOperations.find(theDocID) == _mapOfTransformOperations.end()) {
-    _mapOfTransformOperations[theDocID] = new GEOMImpl_ITransformOperations(this, theDocID);
-  }
-
-  return _mapOfTransformOperations[theDocID];
+  return _TransformOperations;
 }
 
 //=============================================================================
@@ -268,13 +235,9 @@ GEOMImpl_ITransformOperations* GEOMImpl_Gen::GetITransformOperations(int theDocI
  * GetIBooleanOperations
  */
 //=============================================================================
-GEOMImpl_IBooleanOperations* GEOMImpl_Gen::GetIBooleanOperations(int theDocID)
+GEOMImpl_IBooleanOperations* GEOMImpl_Gen::GetIBooleanOperations()
 {
-  if(_mapOfBooleanOperations.find(theDocID) == _mapOfBooleanOperations.end()) {
-    _mapOfBooleanOperations[theDocID] = new GEOMImpl_IBooleanOperations(this, theDocID);
-  }
-
-  return _mapOfBooleanOperations[theDocID];
+  return _BooleanOperations;
 }
 
 //=============================================================================
@@ -282,13 +245,9 @@ GEOMImpl_IBooleanOperations* GEOMImpl_Gen::GetIBooleanOperations(int theDocID)
  * GetIHealingOperations
  */
 //=============================================================================
-GEOMImpl_IHealingOperations* GEOMImpl_Gen::GetIHealingOperations(int theDocID)
+GEOMImpl_IHealingOperations* GEOMImpl_Gen::GetIHealingOperations()
 {
-  if(_mapOfHealingOperations.find(theDocID) == _mapOfHealingOperations.end()) {
-    _mapOfHealingOperations[theDocID] = new GEOMImpl_IHealingOperations(this, theDocID);
-  }
-
-  return _mapOfHealingOperations[theDocID];
+  return _HealingOperations;
 }
 
 //=============================================================================
@@ -296,13 +255,9 @@ GEOMImpl_IHealingOperations* GEOMImpl_Gen::GetIHealingOperations(int theDocID)
  * GetI3DPrimOperations
  */
 //=============================================================================
-GEOMImpl_I3DPrimOperations* GEOMImpl_Gen::GetI3DPrimOperations(int theDocID)
+GEOMImpl_I3DPrimOperations* GEOMImpl_Gen::GetI3DPrimOperations()
 {
-  if(_mapOf3DPrimOperations.find(theDocID) == _mapOf3DPrimOperations.end()) {
-    _mapOf3DPrimOperations[theDocID] = new GEOMImpl_I3DPrimOperations(this, theDocID);
-  }
-
-  return _mapOf3DPrimOperations[theDocID];
+  return _3DPrimOperations;
 }
 
 //=============================================================================
@@ -310,13 +265,9 @@ GEOMImpl_I3DPrimOperations* GEOMImpl_Gen::GetI3DPrimOperations(int theDocID)
  * GetIShapesOperations
  */
 //=============================================================================
-GEOMImpl_IShapesOperations* GEOMImpl_Gen::GetIShapesOperations(int theDocID)
+GEOMImpl_IShapesOperations* GEOMImpl_Gen::GetIShapesOperations()
 {
-  if(_mapOfShapesOperations.find(theDocID) == _mapOfShapesOperations.end()) {
-    _mapOfShapesOperations[theDocID] = new GEOMImpl_IShapesOperations(this, theDocID);
-  }
-
-  return _mapOfShapesOperations[theDocID];
+  return _ShapesOperations;
 }
 
 //=============================================================================
@@ -324,13 +275,9 @@ GEOMImpl_IShapesOperations* GEOMImpl_Gen::GetIShapesOperations(int theDocID)
  * GetIBlocksOperations
  */
 //=============================================================================
-GEOMImpl_IBlocksOperations* GEOMImpl_Gen::GetIBlocksOperations(int theDocID)
+GEOMImpl_IBlocksOperations* GEOMImpl_Gen::GetIBlocksOperations()
 {
-  if(_mapOfBlocksOperations.find(theDocID) == _mapOfBlocksOperations.end()) {
-    _mapOfBlocksOperations[theDocID] = new GEOMImpl_IBlocksOperations(this, theDocID);
-  }
-
-  return _mapOfBlocksOperations[theDocID];
+  return _BlocksOperations;
 }
 
 //=============================================================================
@@ -338,13 +285,9 @@ GEOMImpl_IBlocksOperations* GEOMImpl_Gen::GetIBlocksOperations(int theDocID)
  * GetICurvesOperations
  */
 //=============================================================================
-GEOMImpl_ICurvesOperations* GEOMImpl_Gen::GetICurvesOperations(int theDocID)
+GEOMImpl_ICurvesOperations* GEOMImpl_Gen::GetICurvesOperations()
 {
-  if(_mapOfCurvesOperations.find(theDocID) == _mapOfCurvesOperations.end()) {
-    _mapOfCurvesOperations[theDocID] = new GEOMImpl_ICurvesOperations(this, theDocID);
-  }
-
-  return _mapOfCurvesOperations[theDocID];
+  return _CurvesOperations;
 }
 
 //=============================================================================
@@ -352,13 +295,9 @@ GEOMImpl_ICurvesOperations* GEOMImpl_Gen::GetICurvesOperations(int theDocID)
  * GetILocalOperations
  */
 //=============================================================================
-GEOMImpl_ILocalOperations* GEOMImpl_Gen::GetILocalOperations(int theDocID)
+GEOMImpl_ILocalOperations* GEOMImpl_Gen::GetILocalOperations()
 {
-  if(_mapOfLocalOperations.find(theDocID) == _mapOfLocalOperations.end()) {
-    _mapOfLocalOperations[theDocID] = new GEOMImpl_ILocalOperations(this, theDocID);
-  }
-
-  return _mapOfLocalOperations[theDocID];
+  return _LocalOperations;
 }
 
 //=============================================================================
@@ -366,13 +305,9 @@ GEOMImpl_ILocalOperations* GEOMImpl_Gen::GetILocalOperations(int theDocID)
  * GetIInsertOperations
  */
 //=============================================================================
-GEOMImpl_IInsertOperations* GEOMImpl_Gen::GetIInsertOperations(int theDocID)
+GEOMImpl_IInsertOperations* GEOMImpl_Gen::GetIInsertOperations()
 {
-  if(_mapOfInsertOperations.find(theDocID) == _mapOfInsertOperations.end()) {
-    _mapOfInsertOperations[theDocID] = new GEOMImpl_IInsertOperations(this, theDocID);
-  }
-
-  return _mapOfInsertOperations[theDocID];
+  return _InsertOperations;
 }
 
 //=============================================================================
@@ -380,13 +315,9 @@ GEOMImpl_IInsertOperations* GEOMImpl_Gen::GetIInsertOperations(int theDocID)
  * GetIMeasureOperations
  */
 //=============================================================================
-GEOMImpl_IMeasureOperations* GEOMImpl_Gen::GetIMeasureOperations(int theDocID)
+GEOMImpl_IMeasureOperations* GEOMImpl_Gen::GetIMeasureOperations()
 {
-  if(_mapOfMeasureOperations.find(theDocID) == _mapOfMeasureOperations.end()) {
-    _mapOfMeasureOperations[theDocID] = new GEOMImpl_IMeasureOperations(this, theDocID);
-  }
-
-  return _mapOfMeasureOperations[theDocID];
+  return _MeasureOperations;
 }
 
 //=============================================================================
@@ -394,13 +325,9 @@ GEOMImpl_IMeasureOperations* GEOMImpl_Gen::GetIMeasureOperations(int theDocID)
  * GetIGroupOperations
  */
 //=============================================================================
-GEOMImpl_IGroupOperations* GEOMImpl_Gen::GetIGroupOperations(int theDocID)
+GEOMImpl_IGroupOperations* GEOMImpl_Gen::GetIGroupOperations()
 {
-  if(_mapOfGroupOperations.find(theDocID) == _mapOfGroupOperations.end()) {
-    _mapOfGroupOperations[theDocID] = new GEOMImpl_IGroupOperations(this, theDocID);
-  }
-
-  return _mapOfGroupOperations[theDocID];
+  return _GroupOperations;
 }
 
 //=============================================================================
@@ -408,11 +335,7 @@ GEOMImpl_IGroupOperations* GEOMImpl_Gen::GetIGroupOperations(int theDocID)
  * GetIFieldOperations
  */
 //=============================================================================
-GEOMImpl_IFieldOperations* GEOMImpl_Gen::GetIFieldOperations(int theDocID)
+GEOMImpl_IFieldOperations* GEOMImpl_Gen::GetIFieldOperations()
 {
-  if(_mapOfFieldOperations.find(theDocID) == _mapOfFieldOperations.end()) {
-    _mapOfFieldOperations[theDocID] = new GEOMImpl_IFieldOperations(this, theDocID);
-  }
-
-  return _mapOfFieldOperations[theDocID];
+  return _FieldOperations;
 }
index a6ba04777fe7dc78594589cc910a381bfbf09443..48b1463cc0774c8e2803df9a971bceee89b47d27 100644 (file)
@@ -48,47 +48,47 @@ class GEOMIMPL_EXPORT GEOMImpl_Gen : public GEOM_Engine
   GEOMImpl_Gen();
   ~GEOMImpl_Gen();
 
-  GEOMImpl_IBasicOperations* GetIBasicOperations(int theDocID);
+  GEOMImpl_IBasicOperations* GetIBasicOperations();
 
-  GEOMImpl_ITransformOperations* GetITransformOperations(int theDocID);
+  GEOMImpl_ITransformOperations* GetITransformOperations();
 
-  GEOMImpl_I3DPrimOperations* GetI3DPrimOperations(int theDocID);
+  GEOMImpl_I3DPrimOperations* GetI3DPrimOperations();
 
-  GEOMImpl_IShapesOperations* GetIShapesOperations(int theDocID);
+  GEOMImpl_IShapesOperations* GetIShapesOperations();
 
-  GEOMImpl_IBlocksOperations* GetIBlocksOperations(int theDocID);
+  GEOMImpl_IBlocksOperations* GetIBlocksOperations();
 
-  GEOMImpl_IMeasureOperations* GetIMeasureOperations(int theDocID);
+  GEOMImpl_IMeasureOperations* GetIMeasureOperations();
 
-  GEOMImpl_IBooleanOperations* GetIBooleanOperations(int theDocID);
+  GEOMImpl_IBooleanOperations* GetIBooleanOperations();
 
-  GEOMImpl_ICurvesOperations* GetICurvesOperations(int theDocID);
+  GEOMImpl_ICurvesOperations* GetICurvesOperations();
 
-  GEOMImpl_ILocalOperations* GetILocalOperations(int theDocID);
+  GEOMImpl_ILocalOperations* GetILocalOperations();
 
-  GEOMImpl_IInsertOperations* GetIInsertOperations(int theDocID);
+  GEOMImpl_IInsertOperations* GetIInsertOperations();
 
-  GEOMImpl_IHealingOperations* GetIHealingOperations(int theDocID);
+  GEOMImpl_IHealingOperations* GetIHealingOperations();
 
-  GEOMImpl_IGroupOperations* GetIGroupOperations(int theDocID);
+  GEOMImpl_IGroupOperations* GetIGroupOperations();
 
-  GEOMImpl_IFieldOperations* GetIFieldOperations(int theDocID);
+  GEOMImpl_IFieldOperations* GetIFieldOperations();
 
  private:
 
-  std::map <int, GEOMImpl_IBasicOperations*>     _mapOfBasicOperations;
-  std::map <int, GEOMImpl_ITransformOperations*> _mapOfTransformOperations;
-  std::map <int, GEOMImpl_I3DPrimOperations*>    _mapOf3DPrimOperations;
-  std::map <int, GEOMImpl_IShapesOperations*>    _mapOfShapesOperations;
-  std::map <int, GEOMImpl_IBlocksOperations*>    _mapOfBlocksOperations;
-  std::map <int, GEOMImpl_IBooleanOperations*>   _mapOfBooleanOperations;
-  std::map <int, GEOMImpl_IHealingOperations*>   _mapOfHealingOperations;
-  std::map <int, GEOMImpl_ICurvesOperations*>    _mapOfCurvesOperations;
-  std::map <int, GEOMImpl_ILocalOperations*>     _mapOfLocalOperations;
-  std::map <int, GEOMImpl_IInsertOperations*>    _mapOfInsertOperations;
-  std::map <int, GEOMImpl_IMeasureOperations*>   _mapOfMeasureOperations;
-  std::map <int, GEOMImpl_IGroupOperations*>     _mapOfGroupOperations;
-  std::map <int, GEOMImpl_IFieldOperations*>     _mapOfFieldOperations;
+  GEOMImpl_IBasicOperations*     _BasicOperations;
+  GEOMImpl_ITransformOperations* _TransformOperations;
+  GEOMImpl_I3DPrimOperations*    _3DPrimOperations;
+  GEOMImpl_IShapesOperations*    _ShapesOperations;
+  GEOMImpl_IBlocksOperations*    _BlocksOperations;
+  GEOMImpl_IBooleanOperations*   _BooleanOperations;
+  GEOMImpl_IHealingOperations*   _HealingOperations;
+  GEOMImpl_ICurvesOperations*    _CurvesOperations;
+  GEOMImpl_ILocalOperations*     _LocalOperations;
+  GEOMImpl_IInsertOperations*    _InsertOperations;
+  GEOMImpl_IMeasureOperations*   _MeasureOperations;
+  GEOMImpl_IGroupOperations*     _GroupOperations;
+  GEOMImpl_IFieldOperations*     _FieldOperations;
 };
 
 #endif
index 0bd20827096b7a6f67233a73b38ee314b62d0198..98e66e3b34e437b45674efb132605d56c0ce1f54 100644 (file)
  *   constructor:
  */
 //=============================================================================
-GEOMImpl_I3DPrimOperations::GEOMImpl_I3DPrimOperations (GEOM_Engine* theEngine, int theDocID)
-: GEOM_IOperations(theEngine, theDocID)
+GEOMImpl_I3DPrimOperations::GEOMImpl_I3DPrimOperations (GEOM_Engine* theEngine)
+: GEOM_IOperations(theEngine)
 {
   MESSAGE("GEOMImpl_I3DPrimOperations::GEOMImpl_I3DPrimOperations");
-  myGroupOperations = new GEOMImpl_IGroupOperations(GetEngine(), GetDocID());
+  myGroupOperations = new GEOMImpl_IGroupOperations(GetEngine());
 }
 
 //=============================================================================
@@ -112,7 +112,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeBoxDXDYDZ (double theDX, dou
   SetErrorCode(KO);
 
   //Add a new Box object
-  Handle(GEOM_Object) aBox = GetEngine()->AddObject(GetDocID(), GEOM_BOX);
+  Handle(GEOM_Object) aBox = GetEngine()->AddObject(GEOM_BOX);
 
   //Add a new Box function with DX_DY_DZ parameters
   Handle(GEOM_Function) aFunction = aBox->AddFunction(GEOMImpl_BoxDriver::GetID(), BOX_DX_DY_DZ);
@@ -162,7 +162,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeBoxTwoPnt (Handle(GEOM_Objec
   if (thePnt1.IsNull() || thePnt2.IsNull()) return NULL;
 
   //Add a new Box object
-  Handle(GEOM_Object) aBox = GetEngine()->AddObject(GetDocID(), GEOM_BOX);
+  Handle(GEOM_Object) aBox = GetEngine()->AddObject(GEOM_BOX);
 
   //Add a new Box function for creation a box relatively to two points
   Handle(GEOM_Function) aFunction = aBox->AddFunction(GEOMImpl_BoxDriver::GetID(), BOX_TWO_PNT);
@@ -214,7 +214,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeFaceHW (double theH, double
   if (theH == 0 || theW == 0) return NULL;
 
   //Add a new Face object
-  Handle(GEOM_Object) aFace = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
+  Handle(GEOM_Object) aFace = GetEngine()->AddObject(GEOM_FACE);
 
   //Add a new Box function for creation a box relatively to two points
   Handle(GEOM_Function) aFunction = aFace->AddFunction(GEOMImpl_FaceDriver::GetID(), FACE_H_W);
@@ -263,7 +263,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeFaceObjHW (Handle(GEOM_Objec
   if (theObj.IsNull()) return NULL;
 
   //Add a new Face object
-  Handle(GEOM_Object) aFace = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
+  Handle(GEOM_Object) aFace = GetEngine()->AddObject(GEOM_FACE);
 
   //Add a new Box function for creation a box relatively to two points
   Handle(GEOM_Function) aFunction = aFace->AddFunction(GEOMImpl_FaceDriver::GetID(), FACE_OBJ_H_W);
@@ -317,7 +317,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeDiskPntVecR
   if (thePnt.IsNull() || theVec.IsNull()) return NULL;
 
   //Add a new Disk object
-  Handle(GEOM_Object) aDisk = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
+  Handle(GEOM_Object) aDisk = GetEngine()->AddObject(GEOM_FACE);
 
   //Add a new Disk function for creation a disk relatively to point and vector
   Handle(GEOM_Function) aFunction =
@@ -373,7 +373,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeDiskThreePnt (Handle(GEOM_Ob
   if (thePnt1.IsNull() || thePnt2.IsNull() || thePnt3.IsNull()) return NULL;
 
   //Add a new Disk object
-  Handle(GEOM_Object) aDisk = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
+  Handle(GEOM_Object) aDisk = GetEngine()->AddObject(GEOM_FACE);
 
   //Add a new Disk function for creation a disk relatively to three points
   Handle(GEOM_Function) aFunction =
@@ -428,7 +428,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeDiskR (double theR, int theO
   if (theR == 0 ) return NULL;
 
   //Add a new Disk object
-  Handle(GEOM_Object) aDisk = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
+  Handle(GEOM_Object) aDisk = GetEngine()->AddObject(GEOM_FACE);
 
   //Add a new Box function for creation a box relatively to two points
   Handle(GEOM_Function) aFunction = aDisk->AddFunction(GEOMImpl_DiskDriver::GetID(), DISK_R);
@@ -473,7 +473,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeCylinderRH (double theR, dou
   SetErrorCode(KO);
 
   //Add a new Cylinder object
-  Handle(GEOM_Object) aCylinder = GetEngine()->AddObject(GetDocID(), GEOM_CYLINDER);
+  Handle(GEOM_Object) aCylinder = GetEngine()->AddObject(GEOM_CYLINDER);
 
   //Add a new Cylinder function with R and H parameters
   Handle(GEOM_Function) aFunction = aCylinder->AddFunction(GEOMImpl_CylinderDriver::GetID(), CYLINDER_R_H);
@@ -518,7 +518,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeCylinderRHA (double theR, do
   SetErrorCode(KO);
 
   //Add a new Cylinder object
-  Handle(GEOM_Object) aCylinder = GetEngine()->AddObject(GetDocID(), GEOM_CYLINDER);
+  Handle(GEOM_Object) aCylinder = GetEngine()->AddObject(GEOM_CYLINDER);
 
   //Add a new Cylinder function with R and H parameters
   Handle(GEOM_Function) aFunction = aCylinder->AddFunction(GEOMImpl_CylinderDriver::GetID(), CYLINDER_R_H_A);
@@ -568,7 +568,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeCylinderPntVecRH (Handle(GEO
   if (thePnt.IsNull() || theVec.IsNull()) return NULL;
 
   //Add a new Cylinder object
-  Handle(GEOM_Object) aCylinder = GetEngine()->AddObject(GetDocID(), GEOM_CYLINDER);
+  Handle(GEOM_Object) aCylinder = GetEngine()->AddObject(GEOM_CYLINDER);
 
   //Add a new Cylinder function for creation a cylinder relatively to point and vector
   Handle(GEOM_Function) aFunction =
@@ -625,7 +625,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeCylinderPntVecRHA (Handle(GE
   if (thePnt.IsNull() || theVec.IsNull()) return NULL;
 
   //Add a new Cylinder object
-  Handle(GEOM_Object) aCylinder = GetEngine()->AddObject(GetDocID(), GEOM_CYLINDER);
+  Handle(GEOM_Object) aCylinder = GetEngine()->AddObject(GEOM_CYLINDER);
 
   //Add a new Cylinder function for creation a cylinder relatively to point and vector
   Handle(GEOM_Function) aFunction =
@@ -681,7 +681,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeConeR1R2H (double theR1, dou
   SetErrorCode(KO);
 
   //Add a new Cone object
-  Handle(GEOM_Object) aCone = GetEngine()->AddObject(GetDocID(), GEOM_CONE);
+  Handle(GEOM_Object) aCone = GetEngine()->AddObject(GEOM_CONE);
 
   //Add a new Cone function with R and H parameters
   Handle(GEOM_Function) aFunction =
@@ -734,7 +734,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeConePntVecR1R2H (Handle(GEOM
   if (thePnt.IsNull() || theVec.IsNull()) return NULL;
 
   //Add a new Cone object
-  Handle(GEOM_Object) aCone = GetEngine()->AddObject(GetDocID(), GEOM_CONE);
+  Handle(GEOM_Object) aCone = GetEngine()->AddObject(GEOM_CONE);
 
   //Add a new Cone function for creation a cone relatively to point and vector
   Handle(GEOM_Function) aFunction =
@@ -789,7 +789,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeSphereR (double theR)
   SetErrorCode(KO);
 
   //Add a new Sphere object
-  Handle(GEOM_Object) aSphere = GetEngine()->AddObject(GetDocID(), GEOM_SPHERE);
+  Handle(GEOM_Object) aSphere = GetEngine()->AddObject(GEOM_SPHERE);
 
   //Add a new Sphere function with R parameter
   Handle(GEOM_Function) aFunction = aSphere->AddFunction(GEOMImpl_SphereDriver::GetID(), SPHERE_R);
@@ -836,7 +836,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeSpherePntR (Handle(GEOM_Obje
   if (thePnt.IsNull()) return NULL;
 
   //Add a new Point object
-  Handle(GEOM_Object) aSphere = GetEngine()->AddObject(GetDocID(), GEOM_SPHERE);
+  Handle(GEOM_Object) aSphere = GetEngine()->AddObject(GEOM_SPHERE);
 
   //Add a new Sphere function for creation a sphere relatively to point
   Handle(GEOM_Function) aFunction = aSphere->AddFunction(GEOMImpl_SphereDriver::GetID(), SPHERE_PNT_R);
@@ -887,7 +887,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeTorusRR
   SetErrorCode(KO);
 
   //Add a new Torus object
-  Handle(GEOM_Object) anEll = GetEngine()->AddObject(GetDocID(), GEOM_TORUS);
+  Handle(GEOM_Object) anEll = GetEngine()->AddObject(GEOM_TORUS);
 
   //Add a new Torus function
   Handle(GEOM_Function) aFunction =
@@ -937,7 +937,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeTorusPntVecRR
   if (thePnt.IsNull() || theVec.IsNull()) return NULL;
 
   //Add a new Torus object
-  Handle(GEOM_Object) anEll = GetEngine()->AddObject(GetDocID(), GEOM_TORUS);
+  Handle(GEOM_Object) anEll = GetEngine()->AddObject(GEOM_TORUS);
 
   //Add a new Torus function
   Handle(GEOM_Function) aFunction =
@@ -995,7 +995,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakePrismVecH (Handle(GEOM_Objec
   if (theBase.IsNull() || theVec.IsNull()) return NULL;
 
   //Add a new Prism object
-  Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GetDocID(), GEOM_PRISM);
+  Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GEOM_PRISM);
 
   //Add a new Prism function for creation a Prism relatively to vector
   Handle(GEOM_Function) aFunction =
@@ -1057,7 +1057,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakePrismVecH2Ways (Handle(GEOM_
   if (theBase.IsNull() || theVec.IsNull()) return NULL;
 
   //Add a new Prism object
-  Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GetDocID(), GEOM_PRISM);
+  Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GEOM_PRISM);
 
   //Add a new Prism function for creation a Prism relatively to vector
   Handle(GEOM_Function) aFunction =
@@ -1115,7 +1115,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakePrismTwoPnt
   if (theBase.IsNull() || thePoint1.IsNull() || thePoint2.IsNull()) return NULL;
 
   //Add a new Prism object
-  Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GetDocID(), GEOM_PRISM);
+  Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GEOM_PRISM);
 
   //Add a new Prism function for creation a Prism relatively to two points
   Handle(GEOM_Function) aFunction =
@@ -1178,7 +1178,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakePrismTwoPnt2Ways
   if (theBase.IsNull() || thePoint1.IsNull() || thePoint2.IsNull()) return NULL;
 
   //Add a new Prism object
-  Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GetDocID(), GEOM_PRISM);
+  Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GEOM_PRISM);
 
   //Add a new Prism function for creation a Prism relatively to two points
   Handle(GEOM_Function) aFunction =
@@ -1236,7 +1236,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakePrismDXDYDZ
   if (theBase.IsNull()) return NULL;
 
   //Add a new Prism object
-  Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GetDocID(), GEOM_PRISM);
+  Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GEOM_PRISM);
 
   //Add a new Prism function for creation a Prism by DXDYDZ
   Handle(GEOM_Function) aFunction =
@@ -1297,7 +1297,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakePrismDXDYDZ2Ways
   if (theBase.IsNull()) return NULL;
 
   //Add a new Prism object
-  Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GetDocID(), GEOM_PRISM);
+  Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GEOM_PRISM);
 
   //Add a new Prism function for creation a Prism by DXDYDZ
   Handle(GEOM_Function) aFunction =
@@ -1356,12 +1356,12 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeDraftPrism
   if ( theFuse )
   {
     //Add a new Extruded Boss object  
-    aPrism = GetEngine()->AddObject(GetDocID(), GEOM_EXTRUDED_BOSS);
+    aPrism = GetEngine()->AddObject(GEOM_EXTRUDED_BOSS);
   }
   else
   { 
     //Add a new Extruded Cut object  
-    aPrism = GetEngine()->AddObject(GetDocID(), GEOM_EXTRUDED_CUT);
+    aPrism = GetEngine()->AddObject(GEOM_EXTRUDED_CUT);
   }
   
   //Add a new Prism function for the creation of a Draft Prism feature
@@ -1438,7 +1438,7 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_I3DPrimOperations::MakePipe
   if (theBase.IsNull() || thePath.IsNull()) return NULL;
 
   //Add a new Pipe object
-  Handle(GEOM_Object) aPipe = GetEngine()->AddObject(GetDocID(), GEOM_PIPE);
+  Handle(GEOM_Object) aPipe = GetEngine()->AddObject(GEOM_PIPE);
 
   //Add a new Pipe function
   Handle(GEOM_Function) aFunction =
@@ -1514,7 +1514,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeRevolutionAxisAngle (Handle(
   if (theBase.IsNull() || theAxis.IsNull()) return NULL;
 
   //Add a new Revolution object
-  Handle(GEOM_Object) aRevolution = GetEngine()->AddObject(GetDocID(), GEOM_REVOLUTION);
+  Handle(GEOM_Object) aRevolution = GetEngine()->AddObject(GEOM_REVOLUTION);
 
   //Add a new Revolution function for creation a revolution relatively to axis
   Handle(GEOM_Function) aFunction =
@@ -1569,7 +1569,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeRevolutionAxisAngle2Ways
   if (theBase.IsNull() || theAxis.IsNull()) return NULL;
 
   //Add a new Revolution object
-  Handle(GEOM_Object) aRevolution = GetEngine()->AddObject(GetDocID(), GEOM_REVOLUTION);
+  Handle(GEOM_Object) aRevolution = GetEngine()->AddObject(GEOM_REVOLUTION);
 
   //Add a new Revolution function for creation a revolution relatively to axis
   Handle(GEOM_Function) aFunction =
@@ -1630,7 +1630,7 @@ GEOMImpl_I3DPrimOperations::MakeFilling (std::list< Handle(GEOM_Object)> & theCo
     return NULL;
   }
   //Add a new Filling object
-  Handle(GEOM_Object) aFilling = GetEngine()->AddObject(GetDocID(), GEOM_FILLING);
+  Handle(GEOM_Object) aFilling = GetEngine()->AddObject(GEOM_FILLING);
 
   //Add a new Filling function for creation a filling  from a compound
   Handle(GEOM_Function) aFunction = aFilling->AddFunction(GEOMImpl_FillingDriver::GetID(), BASIC_FILLING);
@@ -1705,7 +1705,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeThruSections(
     return anObj;
 
   //Add a new ThruSections object
-  Handle(GEOM_Object) aThruSect = GetEngine()->AddObject(GetDocID(), GEOM_THRUSECTIONS);
+  Handle(GEOM_Object) aThruSect = GetEngine()->AddObject(GEOM_THRUSECTIONS);
 
 
   //Add a new ThruSections function
@@ -1809,7 +1809,7 @@ Handle(TColStd_HSequenceOfTransient)
 
   Standard_Integer nbLocs =  (theLocations.IsNull() ? 0 :theLocations->Length());
   //Add a new Pipe object
-  Handle(GEOM_Object) aPipeDS = GetEngine()->AddObject(GetDocID(), GEOM_PIPE);
+  Handle(GEOM_Object) aPipeDS = GetEngine()->AddObject(GEOM_PIPE);
 
   //Add a new Pipe function
 
@@ -1984,7 +1984,7 @@ Handle(TColStd_HSequenceOfTransient)
   Standard_Integer nbLocs =  (theLocations.IsNull() ? 0 :theLocations->Length());
 
   //Add a new Pipe object
-  Handle(GEOM_Object) aPipeDS = GetEngine()->AddObject(GetDocID(), GEOM_PIPE);
+  Handle(GEOM_Object) aPipeDS = GetEngine()->AddObject(GEOM_PIPE);
 
   //Add a new Pipe function
 
@@ -2172,7 +2172,7 @@ Handle(TColStd_HSequenceOfTransient)
   Standard_Integer nbLocs =  (theLocations.IsNull() ? 0 :theLocations->Length());
 
   //Add a new Pipe object
-  Handle(GEOM_Object) aPipeDS = GetEngine()->AddObject(GetDocID(), GEOM_PIPE);
+  Handle(GEOM_Object) aPipeDS = GetEngine()->AddObject(GEOM_PIPE);
 
   //Add a new Pipe function
 
@@ -2314,7 +2314,7 @@ Handle(TColStd_HSequenceOfTransient)
   if (theBase.IsNull() || thePath.IsNull() || theVec.IsNull()) return NULL;
 
   //Add a new Pipe object
-  Handle(GEOM_Object) aPipe = GetEngine()->AddObject(GetDocID(), GEOM_PIPE);
+  Handle(GEOM_Object) aPipe = GetEngine()->AddObject(GEOM_PIPE);
 
   //Add a new Pipe function
   Handle(GEOM_Function) aFunction =
@@ -2403,7 +2403,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeThickening
   if (isCopy)
   { 
     //Add a new Copy object
-    aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType());
+    aCopy = GetEngine()->AddObject(theObject->GetType());
     aFunction = aCopy->AddFunction(GEOMImpl_OffsetDriver::GetID(), OFFSET_THICKENING_COPY);
   }
   else
@@ -2485,7 +2485,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::RestorePath (Handle(GEOM_Object)
   if (theShape.IsNull() || theBase1.IsNull() || theBase2.IsNull()) return NULL;
 
   // Add a new Path object
-  Handle(GEOM_Object) aPath = GetEngine()->AddObject(GetDocID(), GEOM_PIPE_PATH);
+  Handle(GEOM_Object) aPath = GetEngine()->AddObject(GEOM_PIPE_PATH);
 
   // Add a new Path function
   Handle(GEOM_Function) aFunction =
@@ -2549,7 +2549,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::RestorePath
     return NULL;
 
   // Add a new Path object
-  Handle(GEOM_Object) aPath = GetEngine()->AddObject(GetDocID(), GEOM_PIPE_PATH);
+  Handle(GEOM_Object) aPath = GetEngine()->AddObject(GEOM_PIPE_PATH);
 
   // Add a new Path function
   Handle(GEOM_Function) aFunction =
index a65ac384a654fc5a6d8c7f9ae553198a257b2e28..7bf581c67caba3af8ce029b723f3ddb999ea25cd 100644 (file)
@@ -36,7 +36,7 @@ class GEOMImpl_IPipe;
 
 class GEOMImpl_I3DPrimOperations : public GEOM_IOperations {
  public:
-  Standard_EXPORT GEOMImpl_I3DPrimOperations(GEOM_Engine* theEngine, int theDocID);
+  Standard_EXPORT GEOMImpl_I3DPrimOperations(GEOM_Engine* theEngine);
   Standard_EXPORT ~GEOMImpl_I3DPrimOperations();
 
   Standard_EXPORT Handle(GEOM_Object) MakeBoxDXDYDZ (double theDX, double theDY, double theDZ);
index ce1f610685dde222dd40f63349ef246ea20933f5..25ceb6d3fd47bef8969f11722d0bb066867d0e90 100755 (executable)
@@ -39,12 +39,12 @@ typedef NCollection_DataMap< TCollection_ExtendedString, NCollection_List<TopoDS
  *  constructor
  */
 //=============================================================================
-GEOMImpl_IBaseIEOperations::GEOMImpl_IBaseIEOperations(GEOM_Engine* theEngine, int theDocID)
-: GEOM_IOperations(theEngine, theDocID)
+GEOMImpl_IBaseIEOperations::GEOMImpl_IBaseIEOperations(GEOM_Engine* theEngine)
+: GEOM_IOperations(theEngine)
 {
-  myGroupOperations = new GEOMImpl_IGroupOperations( GetEngine(), GetDocID() );
-  myFieldOperations = new GEOMImpl_IFieldOperations( GetEngine(), GetDocID() );
-  myShapesOperations = new GEOMImpl_IShapesOperations( GetEngine(), GetDocID() );
+  myGroupOperations = new GEOMImpl_IGroupOperations( GetEngine() );
+  myFieldOperations = new GEOMImpl_IFieldOperations( GetEngine() );
+  myShapesOperations = new GEOMImpl_IShapesOperations( GetEngine() );
 }
 
 //=============================================================================
index c891b5f7622c8b4846e4acfb81225fd058217b52..7f4c0700122cc8b74ac377ea75432c703b93a3c1 100644 (file)
@@ -33,7 +33,7 @@ class GEOMImpl_IShapesOperations;
 class GEOMImpl_IBaseIEOperations : public GEOM_IOperations
 {
 public:
-  Standard_EXPORT GEOMImpl_IBaseIEOperations(GEOM_Engine* theEngine, int theDocID);
+  Standard_EXPORT GEOMImpl_IBaseIEOperations(GEOM_Engine* theEngine);
   Standard_EXPORT ~GEOMImpl_IBaseIEOperations();
   
 protected:
index 8e14834ac20c31cc204da3d4bba9ccd537c31ad8..200a4eec53724c3d38c7c409cda0901499a25921 100644 (file)
@@ -57,8 +57,8 @@
  *   constructor:
  */
 //=============================================================================
-GEOMImpl_IBasicOperations::GEOMImpl_IBasicOperations(GEOM_Engine* theEngine, int theDocID)
-: GEOM_IOperations(theEngine, theDocID)
+GEOMImpl_IBasicOperations::GEOMImpl_IBasicOperations(GEOM_Engine* theEngine)
+: GEOM_IOperations(theEngine)
 {
   MESSAGE("GEOMImpl_IBasicOperations::GEOMImpl_IBasicOperations");
 }
@@ -85,7 +85,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePointXYZ
   SetErrorCode(KO);
 
   //Add a new Point object
-  Handle(GEOM_Object) aPoint = GetEngine()->AddObject(GetDocID(), GEOM_POINT);
+  Handle(GEOM_Object) aPoint = GetEngine()->AddObject(GEOM_POINT);
 
   //Add a new Point function with XYZ parameters
   Handle(GEOM_Function) aFunction =
@@ -135,7 +135,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePointWithReference
   if (theReference.IsNull()) return NULL;
 
   //Add a new Point object
-  Handle(GEOM_Object) aPoint = GetEngine()->AddObject(GetDocID(), GEOM_POINT);
+  Handle(GEOM_Object) aPoint = GetEngine()->AddObject(GEOM_POINT);
 
   //Add a new Point function for creation a point relativley another point
   Handle(GEOM_Function) aFunction = aPoint->AddFunction(GEOMImpl_PointDriver::GetID(), POINT_XYZ_REF);
@@ -193,7 +193,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::makePointOnGeom
   if (theGeomObj.IsNull()) return NULL;
 
   //Add a new Point object
-  Handle(GEOM_Object) aPoint = GetEngine()->AddObject(GetDocID(), GEOM_POINT);
+  Handle(GEOM_Object) aPoint = GetEngine()->AddObject(GEOM_POINT);
 
   //Add a new Point function for creation a point relativley another point
   int fType = POINT_CURVE_PAR;
@@ -398,7 +398,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePointOnLinesIntersection
   if (theLine1.IsNull() || theLine2.IsNull()) return NULL;
 
   //Add a new Point object
-  Handle(GEOM_Object) aPoint = GetEngine()->AddObject(GetDocID(), GEOM_POINT);
+  Handle(GEOM_Object) aPoint = GetEngine()->AddObject(GEOM_POINT);
 
   //Add a new Point function for creation a point relativley another point
   Handle(GEOM_Function) aFunction = aPoint->AddFunction(GEOMImpl_PointDriver::GetID(), POINT_LINES_INTERSECTION);
@@ -449,7 +449,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeTangentOnCurve
   if (theCurve.IsNull()) return NULL;
 
   //Add a new Vector object
-  Handle(GEOM_Object) aVec = GetEngine()->AddObject(GetDocID(), GEOM_VECTOR);
+  Handle(GEOM_Object) aVec = GetEngine()->AddObject(GEOM_VECTOR);
 
   //Add a new Point function for creation a point relativley another point
   Handle(GEOM_Function) aFunction = aVec->AddFunction(GEOMImpl_VectorDriver::GetID(), VECTOR_TANGENT_CURVE_PAR);
@@ -497,7 +497,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeVectorDXDYDZ
   SetErrorCode(KO);
 
   //Add a new Vector object
-  Handle(GEOM_Object) aVector = GetEngine()->AddObject(GetDocID(), GEOM_VECTOR);
+  Handle(GEOM_Object) aVector = GetEngine()->AddObject(GEOM_VECTOR);
 
   //Add a new Vector function with DXDYDZ parameters
   Handle(GEOM_Function) aFunction =
@@ -547,7 +547,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeVectorTwoPnt
   if (thePnt1.IsNull() || thePnt2.IsNull()) return NULL;
 
   //Add a new Vector object
-  Handle(GEOM_Object) aVector = GetEngine()->AddObject(GetDocID(), GEOM_VECTOR);
+  Handle(GEOM_Object) aVector = GetEngine()->AddObject(GEOM_VECTOR);
 
   //Add a new Vector function
   Handle(GEOM_Function) aFunction =
@@ -600,7 +600,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeLine
   if (thePnt.IsNull() || theDir.IsNull()) return NULL;
 
   //Add a new Line object
-  Handle(GEOM_Object) aLine = GetEngine()->AddObject(GetDocID(), GEOM_LINE);
+  Handle(GEOM_Object) aLine = GetEngine()->AddObject(GEOM_LINE);
 
   //Add a new Line function
   Handle(GEOM_Function) aFunction =
@@ -652,7 +652,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeLineTwoPnt
   if (thePnt1.IsNull() || thePnt2.IsNull()) return NULL;
 
   //Add a new Line object
-  Handle(GEOM_Object) aLine = GetEngine()->AddObject(GetDocID(), GEOM_LINE);
+  Handle(GEOM_Object) aLine = GetEngine()->AddObject(GEOM_LINE);
 
   //Add a new Line function
   Handle(GEOM_Function) aFunction =
@@ -704,7 +704,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeLineTwoFaces
   if (theFace1.IsNull() || theFace2.IsNull()) return NULL;
 
   //Add a new Line object
-  Handle(GEOM_Object) aLine = GetEngine()->AddObject(GetDocID(), GEOM_LINE);
+  Handle(GEOM_Object) aLine = GetEngine()->AddObject(GEOM_LINE);
 
   //Add a new Line function
   Handle(GEOM_Function) aFunction =
@@ -757,7 +757,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePlaneThreePnt
   if (thePnt1.IsNull() || thePnt2.IsNull() || thePnt3.IsNull()) return NULL;
 
   //Add a new Plane object
-  Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GetDocID(), GEOM_PLANE);
+  Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GEOM_PLANE);
 
   //Add a new Plane function
   Handle(GEOM_Function) aFunction =
@@ -813,7 +813,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePlanePntVec
   if (thePnt.IsNull() || theVec.IsNull()) return NULL;
 
   //Add a new Plane object
-  Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GetDocID(), GEOM_PLANE);
+  Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GEOM_PLANE);
 
   //Add a new Plane function
   Handle(GEOM_Function) aFunction =
@@ -866,7 +866,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePlaneFace
   if (theFace.IsNull()) return NULL;
 
   //Add a new Plane object
-  Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GetDocID(), GEOM_PLANE);
+  Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GEOM_PLANE);
 
   //Add a new Plane function
   Handle(GEOM_Function) aFunction =
@@ -918,7 +918,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePlane2Vec
   if (theVec1.IsNull() || theVec2.IsNull()) return NULL;
 
   //Add a new Plane object
-  Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GetDocID(), GEOM_PLANE);
+  Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GEOM_PLANE);
 
   //Add a new Plane function
   Handle(GEOM_Function) aFunction =
@@ -969,7 +969,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePlaneLCS
   SetErrorCode(KO);
 
   //Add a new Plane object
-  Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GetDocID(), GEOM_PLANE);
+  Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GEOM_PLANE);
 
   //Add a new Plane function
   Handle(GEOM_Function) aFunction =
@@ -1023,7 +1023,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeMarker
   SetErrorCode(KO);
 
   //Add a new Marker object
-  Handle(GEOM_Object) aMarker = GetEngine()->AddObject(GetDocID(), GEOM_MARKER);
+  Handle(GEOM_Object) aMarker = GetEngine()->AddObject(GEOM_MARKER);
 
   //Add a new Marker function
   Handle(GEOM_Function) aFunction =
@@ -1073,7 +1073,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeMarkerFromShape
   SetErrorCode(KO);
 
   //Add a new Marker object
-  Handle(GEOM_Object) aMarker = GetEngine()->AddObject(GetDocID(), GEOM_MARKER);
+  Handle(GEOM_Object) aMarker = GetEngine()->AddObject(GEOM_MARKER);
 
   //Add a new Marker function
   Handle(GEOM_Function) aFunction =
@@ -1123,7 +1123,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeMarkerPntTwoVec
   SetErrorCode(KO);
 
   //Add a new Marker object
-  Handle(GEOM_Object) aMarker = GetEngine()->AddObject(GetDocID(), GEOM_MARKER);
+  Handle(GEOM_Object) aMarker = GetEngine()->AddObject(GEOM_MARKER);
 
   //Add a new Marker function
   Handle(GEOM_Function) aFunction =
@@ -1181,7 +1181,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeTangentPlaneOnFace(const Hand
   if (theFace.IsNull()) return NULL;
 
   //Add a new Plane object
-  Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GetDocID(), GEOM_PLANE);
+  Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GEOM_PLANE);
 
   //Add a new Plane function
   Handle(GEOM_Function) aFunction =
index d19f875ef744280a762dc720001ab7a31149bfef..89329c61eee0c46aad5f154b46fd50c39b7be4d8 100644 (file)
@@ -31,7 +31,7 @@
 
 class GEOMImpl_IBasicOperations : public GEOM_IOperations {
  public:
-  Standard_EXPORT GEOMImpl_IBasicOperations(GEOM_Engine* theEngine, int theDocID);
+  Standard_EXPORT GEOMImpl_IBasicOperations(GEOM_Engine* theEngine);
   Standard_EXPORT ~GEOMImpl_IBasicOperations();
 
   // Point
index f4362361f7aee6d439fba877116ec170c2f9a5dc..48e84bf3b3f6fc8af5da59757418a155eb1243e9 100644 (file)
@@ -247,8 +247,8 @@ static Standard_Boolean IsQuadrangle(const TopoDS_Face   &theFace,
  *   constructor:
  */
 //=============================================================================
-GEOMImpl_IBlocksOperations::GEOMImpl_IBlocksOperations (GEOM_Engine* theEngine, int theDocID)
-: GEOM_IOperations(theEngine, theDocID)
+GEOMImpl_IBlocksOperations::GEOMImpl_IBlocksOperations (GEOM_Engine* theEngine)
+: GEOM_IOperations(theEngine)
 {
   MESSAGE("GEOMImpl_IBlocksOperations::GEOMImpl_IBlocksOperations");
 }
@@ -279,7 +279,7 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeQuad
       theEdge3.IsNull() || theEdge4.IsNull()) return NULL;
 
   //Add a new Face object
-  Handle(GEOM_Object) aFace = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
+  Handle(GEOM_Object) aFace = GetEngine()->AddObject(GEOM_FACE);
 
   //Add a new Face function
   Handle(GEOM_Function) aFunction =
@@ -339,7 +339,7 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeQuad2Edges
   if (theEdge1.IsNull() || theEdge2.IsNull()) return NULL;
 
   //Add a new Face object
-  Handle(GEOM_Object) aFace = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
+  Handle(GEOM_Object) aFace = GetEngine()->AddObject(GEOM_FACE);
 
   //Add a new Face function
   Handle(GEOM_Function) aFunction =
@@ -396,7 +396,7 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeQuad4Vertices
       thePnt3.IsNull() || thePnt4.IsNull()) return NULL;
 
   //Add a new Face object
-  Handle(GEOM_Object) aFace = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
+  Handle(GEOM_Object) aFace = GetEngine()->AddObject(GEOM_FACE);
 
   //Add a new Face function
   Handle(GEOM_Function) aFunction =
@@ -460,7 +460,7 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeHexa
       theFace5.IsNull() || theFace6.IsNull()) return NULL;
 
   //Add a new Solid object
-  Handle(GEOM_Object) aBlock = GetEngine()->AddObject(GetDocID(), GEOM_BLOCK);
+  Handle(GEOM_Object) aBlock = GetEngine()->AddObject(GEOM_BLOCK);
 
   //Add a new Block function
   Handle(GEOM_Function) aFunction =
@@ -526,7 +526,7 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeHexa2Faces
   if (theFace1.IsNull() || theFace2.IsNull()) return NULL;
 
   //Add a new Solid object
-  Handle(GEOM_Object) aBlock = GetEngine()->AddObject(GetDocID(), GEOM_BLOCK);
+  Handle(GEOM_Object) aBlock = GetEngine()->AddObject(GEOM_BLOCK);
 
   //Add a new Block function
   Handle(GEOM_Function) aFunction =
@@ -581,7 +581,7 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeBlockCompound
   if (theCompound.IsNull()) return NULL;
 
   //Add a new object
-  Handle(GEOM_Object) aBlockComp = GetEngine()->AddObject(GetDocID(), GEOM_COMPOUND);
+  Handle(GEOM_Object) aBlockComp = GetEngine()->AddObject(GEOM_COMPOUND);
 
   //Add a new BlocksComp function
   Handle(GEOM_Function) aFunction =
@@ -2413,7 +2413,7 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::RemoveExtraEdges
   if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be fixed
 
   //Add a new Copy object
-  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
+  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
 
   //Add a function
   Handle(GEOM_Function) aFunction =
@@ -2464,7 +2464,7 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::UnionFaces
   if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be fixed
 
   //Add a new Copy object
-  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
+  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
 
   //Add a function
   Handle(GEOM_Function) aFunction =
@@ -2513,7 +2513,7 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::CheckAndImprove
   if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be fixed
 
   //Add a new Copy object
-  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
+  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
 
   //Add a function
   Handle(GEOM_Function) aFunction =
@@ -3067,7 +3067,7 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeMultiTransformation1D
   if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be moved
 
   //Add a new Copy object
-  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
+  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
 
   //Add a translate function
   Handle(GEOM_Function) aFunction =
@@ -3125,7 +3125,7 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeMultiTransformation2D
   if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be moved
 
   //Add a new Copy object
-  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
+  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
 
   //Add a translate function
   Handle(GEOM_Function) aFunction =
index 37d69f74e714ab3d4967a7581e1749795caa7fa1..a11a4a311782a26b74a36e1ef5579832bd4d59b8 100644 (file)
@@ -36,7 +36,7 @@ class GEOM_Object;
 
 class GEOMImpl_IBlocksOperations : public GEOM_IOperations {
  public:
-  Standard_EXPORT GEOMImpl_IBlocksOperations(GEOM_Engine* theEngine, int theDocID);
+  Standard_EXPORT GEOMImpl_IBlocksOperations(GEOM_Engine* theEngine);
   Standard_EXPORT ~GEOMImpl_IBlocksOperations();
 
   // Creation of blocks and block faces
index 7da07e48d5e5d15f0ff21fabdab7d66e9552257b..3cd0f6b40e899e38f996bbdc97f6ad6140d7f330 100644 (file)
@@ -47,8 +47,8 @@
  *   constructor:
  */
 //=============================================================================
-GEOMImpl_IBooleanOperations::GEOMImpl_IBooleanOperations (GEOM_Engine* theEngine, int theDocID)
-: GEOM_IOperations(theEngine, theDocID)
+GEOMImpl_IBooleanOperations::GEOMImpl_IBooleanOperations (GEOM_Engine* theEngine)
+: GEOM_IOperations(theEngine)
 {
   MESSAGE("GEOMImpl_IBooleanOperations::GEOMImpl_IBooleanOperations");
 }
@@ -80,7 +80,7 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakeBoolean
   if (theShape1.IsNull() || theShape2.IsNull()) return NULL;
 
   //Add a new Boolean object
-  Handle(GEOM_Object) aBool = GetEngine()->AddObject(GetDocID(), GEOM_BOOLEAN);
+  Handle(GEOM_Object) aBool = GetEngine()->AddObject(GEOM_BOOLEAN);
 
   //Add a new Boolean function
   Handle(GEOM_Function) aFunction;
@@ -159,7 +159,7 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakeFuse
   if (theShape1.IsNull() || theShape2.IsNull()) return NULL;
 
   //Add a new Boolean object
-  Handle(GEOM_Object) aBool = GetEngine()->AddObject(GetDocID(), GEOM_BOOLEAN);
+  Handle(GEOM_Object) aBool = GetEngine()->AddObject(GEOM_BOOLEAN);
 
   //Add a new Boolean function
   Handle(GEOM_Function) aFunction =
@@ -221,7 +221,7 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakeFuseList
   if (theShapes.IsNull()) return NULL;
 
   //Add a new Boolean object
-  Handle(GEOM_Object) aBool = GetEngine()->AddObject(GetDocID(), GEOM_BOOLEAN);
+  Handle(GEOM_Object) aBool = GetEngine()->AddObject(GEOM_BOOLEAN);
 
   //Add a new Boolean function
   Handle(GEOM_Function) aFunction =
@@ -281,7 +281,7 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakeCommonList
   if (theShapes.IsNull()) return NULL;
 
   //Add a new Boolean object
-  Handle(GEOM_Object) aBool = GetEngine()->AddObject(GetDocID(), GEOM_BOOLEAN);
+  Handle(GEOM_Object) aBool = GetEngine()->AddObject(GEOM_BOOLEAN);
 
   //Add a new Boolean function
   Handle(GEOM_Function) aFunction =
@@ -347,7 +347,7 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakeCutList
   if (theShapes.IsNull()) return NULL;
 
   //Add a new Boolean object
-  Handle(GEOM_Object) aBool = GetEngine()->AddObject(GetDocID(), GEOM_BOOLEAN);
+  Handle(GEOM_Object) aBool = GetEngine()->AddObject(GEOM_BOOLEAN);
 
   //Add a new Boolean function
   Handle(GEOM_Function) aFunction =
@@ -422,7 +422,7 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakePartition
   SetErrorCode(KO);
 
   //Add a new Partition object
-  Handle(GEOM_Object) aPartition = GetEngine()->AddObject(GetDocID(), GEOM_PARTITION);
+  Handle(GEOM_Object) aPartition = GetEngine()->AddObject(GEOM_PARTITION);
 
   //Add a new Partition function
   Handle(GEOM_Function) aFunction;
@@ -557,7 +557,7 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakeHalfPartition
   if (theShape.IsNull() || thePlane.IsNull()) return NULL;
 
   //Add a new Boolean object
-  Handle(GEOM_Object) aPart = GetEngine()->AddObject(GetDocID(), GEOM_PARTITION);
+  Handle(GEOM_Object) aPart = GetEngine()->AddObject(GEOM_PARTITION);
 
   //Add a new Partition function
   Handle(GEOM_Function) aFunction =
index af3e46d3bb6e1f3d6e7804da88010f2e41fa99a1..602f0132fd5c438d937133d4e7993e52445854cd 100644 (file)
@@ -33,7 +33,7 @@ class GEOM_Object;
 
 class GEOMImpl_IBooleanOperations : public GEOM_IOperations {
  public:
-  Standard_EXPORT GEOMImpl_IBooleanOperations(GEOM_Engine* theEngine, int theDocID);
+  Standard_EXPORT GEOMImpl_IBooleanOperations(GEOM_Engine* theEngine);
   Standard_EXPORT ~GEOMImpl_IBooleanOperations();
 
   Standard_EXPORT Handle(GEOM_Object) MakeBoolean
index d25a5f2168e4df630857ec29159dd483ee491688..52d9cb6f95825fb27934ce52742a38b6b7498b7c 100644 (file)
@@ -94,8 +94,7 @@ namespace
   PyStdOut_write(PyStdOut* self, PyObject* args)
   {
     char *c;
-    int l;
-    if (!PyArg_ParseTuple(args, "t#:write", &c, &l))
+    if (!PyArg_ParseTuple(args, "s", &c))
       return NULL;
     
     *(self->out) = *(self->out) + c;
@@ -119,8 +118,8 @@ namespace
   static PyTypeObject PyStdOut_Type = {
     /* The ob_type field must be initialized in the module init function
      * to be portable to Windows without using C++. */
-    PyObject_HEAD_INIT(NULL)
-    0,                            /*ob_size*/
+    PyVarObject_HEAD_INIT(NULL, 0)
+    /* 0, */                           /*ob_size*/
     "PyOut",                      /*tp_name*/
     sizeof(PyStdOut),             /*tp_basicsize*/
     0,                            /*tp_itemsize*/
@@ -162,6 +161,14 @@ namespace
     0,                            /*tp_new*/
     0,                            /*tp_free*/
     0,                            /*tp_is_gc*/
+    0,                            /*tp_bases*/
+    0,                            /*tp_mro*/
+    0,                            /*tp_cache*/
+    0,                            /*tp_subclasses*/
+    0,                            /*tp_weaklist*/
+    0,                            /*tp_del*/
+    0,                            /*tp_version_tag*/
+    0,                            /*tp_finalize*/
   };
   
   PyObject* newPyStdOut( std::string& out )
@@ -181,8 +188,8 @@ namespace
  *   constructor:
  */
 //=============================================================================
-GEOMImpl_ICurvesOperations::GEOMImpl_ICurvesOperations (GEOM_Engine* theEngine, int theDocID)
-: GEOM_IOperations(theEngine, theDocID)
+GEOMImpl_ICurvesOperations::GEOMImpl_ICurvesOperations (GEOM_Engine* theEngine)
+: GEOM_IOperations(theEngine)
 {
   MESSAGE("GEOMImpl_ICurvesOperations::GEOMImpl_ICurvesOperations");
 }
@@ -212,7 +219,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeCircleThreePnt (Handle(GEOM_
   if (thePnt1.IsNull() || thePnt2.IsNull() || thePnt3.IsNull()) return NULL;
 
   //Add a new Circle object
-  Handle(GEOM_Object) aCircle = GetEngine()->AddObject(GetDocID(), GEOM_CIRCLE);
+  Handle(GEOM_Object) aCircle = GetEngine()->AddObject(GEOM_CIRCLE);
 
   //Add a new Circle function for creation a circle relatively to three points
   Handle(GEOM_Function) aFunction =
@@ -269,7 +276,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeCircleCenter2Pnt (Handle(GEO
   if (thePnt1.IsNull() || thePnt2.IsNull() || thePnt3.IsNull()) return NULL;
 
   //Add a new Circle object
-  Handle(GEOM_Object) aCircle = GetEngine()->AddObject(GetDocID(), GEOM_CIRCLE);
+  Handle(GEOM_Object) aCircle = GetEngine()->AddObject(GEOM_CIRCLE);
 
   //Add a new Circle function for creation a circle relatively to center and 2 points
   Handle(GEOM_Function) aFunction =
@@ -327,7 +334,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeCirclePntVecR
   //if (thePnt.IsNull() || theVec.IsNull()) return NULL;
 
   //Add a new Circle object
-  Handle(GEOM_Object) aCircle = GetEngine()->AddObject(GetDocID(), GEOM_CIRCLE);
+  Handle(GEOM_Object) aCircle = GetEngine()->AddObject(GEOM_CIRCLE);
 
   //Add a new Circle function for creation a circle relatively to point and vector
   Handle(GEOM_Function) aFunction =
@@ -392,7 +399,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeEllipse
   //if (thePnt.IsNull() || theVec.IsNull()) return NULL;
 
   //Add a new Ellipse object
-  Handle(GEOM_Object) anEll = GetEngine()->AddObject(GetDocID(), GEOM_ELLIPSE);
+  Handle(GEOM_Object) anEll = GetEngine()->AddObject(GEOM_ELLIPSE);
 
   //Add a new Ellipse function
   Handle(GEOM_Function) aFunction =
@@ -467,7 +474,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeArc (Handle(GEOM_Object) the
   if (thePnt1.IsNull() || thePnt2.IsNull() || thePnt3.IsNull()) return NULL;
 
   //Add a new Circle Arc object
-  Handle(GEOM_Object) anArc = GetEngine()->AddObject(GetDocID(), GEOM_CIRC_ARC);
+  Handle(GEOM_Object) anArc = GetEngine()->AddObject(GEOM_CIRC_ARC);
 
   //Add a new Circle Arc function
   Handle(GEOM_Function) aFunction =
@@ -524,7 +531,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeArcCenter (Handle(GEOM_Objec
   if (thePnt1.IsNull() || thePnt2.IsNull() || thePnt3.IsNull()) return NULL;
 
   //Add a new Circle Arc object
-  Handle(GEOM_Object) anArc = GetEngine()->AddObject(GetDocID(), GEOM_CIRC_ARC);
+  Handle(GEOM_Object) anArc = GetEngine()->AddObject(GEOM_CIRC_ARC);
 
   //Add a new Circle Arc function
   Handle(GEOM_Function) aFunction =
@@ -581,7 +588,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeArcOfEllipse (Handle(GEOM_Ob
   if (thePnt1.IsNull() || thePnt2.IsNull() || thePnt3.IsNull()) return NULL;
 
   //Add a new Circle Arc object
-  Handle(GEOM_Object) anArc = GetEngine()->AddObject(GetDocID(), GEOM_ELLIPSE_ARC);
+  Handle(GEOM_Object) anArc = GetEngine()->AddObject(GEOM_ELLIPSE_ARC);
 
   //Add a new Circle Arc function
   Handle(GEOM_Function) aFunction =
@@ -635,7 +642,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakePolyline (std::list<Handle(G
   SetErrorCode(KO);
 
   //Add a new Polyline object
-  Handle(GEOM_Object) aPolyline = GetEngine()->AddObject(GetDocID(), GEOM_POLYLINE);
+  Handle(GEOM_Object) aPolyline = GetEngine()->AddObject(GEOM_POLYLINE);
 
   //Add a new Polyline function for creation a polyline relatively to points set
   Handle(GEOM_Function) aFunction =
@@ -704,7 +711,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeSplineBezier
   SetErrorCode(KO);
 
   //Add a new Spline object
-  Handle(GEOM_Object) aSpline = GetEngine()->AddObject(GetDocID(), GEOM_SPLINE);
+  Handle(GEOM_Object) aSpline = GetEngine()->AddObject(GEOM_SPLINE);
 
   //Add a new Spline function for creation a bezier curve relatively to points set
   Handle(GEOM_Function) aFunction =
@@ -773,7 +780,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeSplineInterpolation
   SetErrorCode(KO);
 
   //Add a new Spline object
-  Handle(GEOM_Object) aSpline = GetEngine()->AddObject(GetDocID(), GEOM_SPLINE);
+  Handle(GEOM_Object) aSpline = GetEngine()->AddObject(GEOM_SPLINE);
 
   //Add a new Spline function for interpolation type
   Handle(GEOM_Function) aFunction =
@@ -843,7 +850,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeSplineInterpolWithTangents
   SetErrorCode(KO);
 
   //Add a new Spline object
-  Handle(GEOM_Object) aSpline = GetEngine()->AddObject(GetDocID(), GEOM_SPLINE);
+  Handle(GEOM_Object) aSpline = GetEngine()->AddObject(GEOM_SPLINE);
 
   //Add a new Spline function for interpolation type
   Handle(GEOM_Function) aFunction =
@@ -1056,7 +1063,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeCurveParametric
   switch(theCurveType) {
   case Polyline: {
     //Add a new Polyline object
-    aCurve = GetEngine()->AddObject(GetDocID(), GEOM_POLYLINE);
+    aCurve = GetEngine()->AddObject(GEOM_POLYLINE);
 
     //Add a new Polyline function for creation a polyline relatively to points set
     aFunction = aCurve->AddFunction(GEOMImpl_PolylineDriver::GetID(), POLYLINE_POINTS);
@@ -1076,7 +1083,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeCurveParametric
   }
   case Bezier: {
     //Add a new Spline object
-    aCurve = GetEngine()->AddObject(GetDocID(), GEOM_SPLINE);
+    aCurve = GetEngine()->AddObject(GEOM_SPLINE);
     //Add a new Spline function for creation a bezier curve relatively to points set
     aFunction =
       aCurve->AddFunction(GEOMImpl_SplineDriver::GetID(), SPLINE_BEZIER);
@@ -1095,7 +1102,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeCurveParametric
   }
   case Interpolation: {
     //Add a new Spline object
-    aCurve = GetEngine()->AddObject(GetDocID(), GEOM_SPLINE);
+    aCurve = GetEngine()->AddObject(GEOM_SPLINE);
 
     //Add a new Spline function for creation a bezier curve relatively to points set
     aFunction = aCurve->AddFunction(GEOMImpl_SplineDriver::GetID(), SPLINE_INTERPOLATION);
@@ -1171,7 +1178,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeSketcher (const char* theCom
   if (!theCommand || strcmp(theCommand, "") == 0) return NULL;
 
   //Add a new Sketcher object
-  Handle(GEOM_Object) aSketcher = GetEngine()->AddObject(GetDocID(), GEOM_SKETCHER);
+  Handle(GEOM_Object) aSketcher = GetEngine()->AddObject(GEOM_SKETCHER);
 
   //Add a new Sketcher function
   Handle(GEOM_Function) aFunction =
@@ -1233,7 +1240,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeSketcherOnPlane
   if (!theCommand || strcmp(theCommand, "") == 0) return NULL;
 
   //Add a new Sketcher object
-  Handle(GEOM_Object) aSketcher = GetEngine()->AddObject(GetDocID(), GEOM_SKETCHER);
+  Handle(GEOM_Object) aSketcher = GetEngine()->AddObject(GEOM_SKETCHER);
 
   //Add a new Sketcher function
   Handle(GEOM_Function) aFunction =
@@ -1285,7 +1292,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::Make3DSketcherCommand (const cha
   if (!theCommand || strcmp(theCommand, "") == 0) return NULL;
 
   //Add a new Sketcher object
-  Handle(GEOM_Object) aSketcher = GetEngine()->AddObject(GetDocID(), GEOM_3DSKETCHER);
+  Handle(GEOM_Object) aSketcher = GetEngine()->AddObject(GEOM_3DSKETCHER);
 
   //Add a new Sketcher function
   Handle(GEOM_Function) aFunction =
@@ -1331,7 +1338,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::Make3DSketcher (std::list<double
   SetErrorCode(KO);
 
   //Add a new Sketcher object
-  Handle(GEOM_Object) a3DSketcher = GetEngine()->AddObject(GetDocID(), GEOM_3DSKETCHER);
+  Handle(GEOM_Object) a3DSketcher = GetEngine()->AddObject(GEOM_3DSKETCHER);
 
   //Add a new Sketcher function
   Handle(GEOM_Function) aFunction =
@@ -1403,7 +1410,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeIsoline
 
   //Add a new Spline object
   Handle(GEOM_Object) anIsoline =
-    GetEngine()->AddObject(GetDocID(), GEOM_ISOLINE);
+    GetEngine()->AddObject(GEOM_ISOLINE);
 
   //Add a new Spline function for interpolation type
   Handle(GEOM_Function) aFunction =
@@ -1471,7 +1478,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakePolyline2D
 
   // Add a new Polyline object
   Handle(GEOM_Object)   aResult   =
-    GetEngine()->AddObject(GetDocID(), GEOM_POLYLINE2D);
+    GetEngine()->AddObject(GEOM_POLYLINE2D);
   Handle(GEOM_Function) aFunction = aResult->AddFunction
     (GEOMImpl_PolylineDriver::GetID(), POLYLINE2D_PLN_COORDS);
 
@@ -1541,7 +1548,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakePolyline2DOnPlane
 
   //Add a new Polyline object
   Handle(GEOM_Object) aResult =
-    GetEngine()->AddObject(GetDocID(), GEOM_POLYLINE2D);
+    GetEngine()->AddObject(GEOM_POLYLINE2D);
   Handle(GEOM_Function) aFunction = aResult->AddFunction
     (GEOMImpl_PolylineDriver::GetID(), POLYLINE2D_PLN_OBJECT);
 
index 2eb9459aaac56c10d6a6dbb95b28fbecd0756094..2d7c58fe10b8b686f7d25e44336be978ac957a6c 100644 (file)
@@ -38,7 +38,7 @@ class GEOMImpl_ICurvesOperations : public GEOM_IOperations {
 
   enum CurveType { Polyline, Bezier, Interpolation };
 
-  Standard_EXPORT GEOMImpl_ICurvesOperations(GEOM_Engine* theEngine, int theDocID);
+  Standard_EXPORT GEOMImpl_ICurvesOperations(GEOM_Engine* theEngine);
   Standard_EXPORT ~GEOMImpl_ICurvesOperations();
 
   Standard_EXPORT Handle(GEOM_Object) MakeCircleThreePnt (Handle(GEOM_Object) thePnt1,
index 77575f7e195d6a9db044cc5a003c3db2169d4ea3..6fccfba52e56f7b90058f076c8af62dc42beee83 100755 (executable)
@@ -56,8 +56,7 @@ GEOMImpl_Gen* GEOMImpl_IECallBack::GetEngine()
  *  Export
  */
 //=============================================================================
-bool GEOMImpl_IECallBack::Export( int                            /*theDocId*/,
-                                 const Handle(GEOM_Object)      /*theOriginal*/,
+bool GEOMImpl_IECallBack::Export( const Handle(GEOM_Object)      /*theOriginal*/,
                                   const TCollection_AsciiString& /*theFileName*/,
                                   const TCollection_AsciiString& /*theFormatName*/ )
 {
@@ -70,8 +69,7 @@ bool GEOMImpl_IECallBack::Export( int                            /*theDocId*/,
  */
 //=============================================================================
 Handle(TColStd_HSequenceOfTransient)
-GEOMImpl_IECallBack::Import( int                            /*theDocId*/,
-                            const TCollection_AsciiString& /*theFormatName*/,
+GEOMImpl_IECallBack::Import( const TCollection_AsciiString& /*theFormatName*/,
                              const TCollection_AsciiString& /*theFileName*/ )
 {
   return NULL;
@@ -83,8 +81,7 @@ GEOMImpl_IECallBack::Import( int                            /*theDocId*/,
  */
 //=============================================================================
 TCollection_AsciiString
-GEOMImpl_IECallBack::ReadValue( int                            /*theDocId*/,
-                               const TCollection_AsciiString& /*theFileName*/,
+GEOMImpl_IECallBack::ReadValue( const TCollection_AsciiString& /*theFileName*/,
                                 const TCollection_AsciiString& /*theFormatName*/,
                                 const TCollection_AsciiString& /*theParameterName*/ )
 {
index ef7a7d06d55ae0043306d1475a2c1d6d8cf6b72d..6373aa6002da909cd741e8ce3e07f129456e8feb 100644 (file)
@@ -37,21 +37,18 @@ class GEOMImpl_IECallBack
   Standard_EXPORT GEOMImpl_IECallBack();
   Standard_EXPORT ~GEOMImpl_IECallBack();
   
-  Standard_EXPORT virtual bool Export( int                            theDocId,
-                                      const Handle(GEOM_Object)      theOriginal,
+  Standard_EXPORT virtual bool Export( const Handle(GEOM_Object)      theOriginal,
                                        const TCollection_AsciiString& theFileName,
                                        const TCollection_AsciiString& theFormatName );
 
   Standard_EXPORT virtual
-  Handle(TColStd_HSequenceOfTransient) Import( int                            theDocId,
-                                              const TCollection_AsciiString& theFormatName,
-                                              const TCollection_AsciiString& theFileName );
+  Handle(TColStd_HSequenceOfTransient) Import( const TCollection_AsciiString& theFormatName,
+                                                                  const TCollection_AsciiString& theFileName );
 
   Standard_EXPORT virtual
-  TCollection_AsciiString  ReadValue( int                            theDocId,
-                                     const TCollection_AsciiString& theFileName,
-                                     const TCollection_AsciiString& theFormatName,
-                                     const TCollection_AsciiString& theParameterName );
+  TCollection_AsciiString  ReadValue( const TCollection_AsciiString& theFileName,
+                                                     const TCollection_AsciiString& theFormatName,
+                                                     const TCollection_AsciiString& theParameterName );
 
   Standard_EXPORT static void Register( const TCollection_AsciiString& theFormatName, GEOMImpl_IECallBack* theCallBack );
 
index c0b219e2951429c1b7860505db6332a6004595b6..f6ad9f49340d468e0e822342f687220a51a58abd 100644 (file)
@@ -39,8 +39,8 @@
  *   constructor:
  */
 //=============================================================================
-GEOMImpl_IFieldOperations::GEOMImpl_IFieldOperations (GEOM_Engine* theEngine, int theDocID)
-: GEOM_IOperations(theEngine, theDocID)
+GEOMImpl_IFieldOperations::GEOMImpl_IFieldOperations (GEOM_Engine* theEngine)
+: GEOM_IOperations(theEngine)
 {
   MESSAGE("GEOMImpl_IFieldOperations::GEOMImpl_IFieldOperations");
 }
@@ -96,7 +96,7 @@ CreateField( const Handle(GEOM_Object)&                     theShape,
 
   // make a field
   Handle(GEOM_Field) aField = Handle(GEOM_Field)::DownCast
-    ( GetEngine()->AddBaseObject( GetDocID(), GEOM_FIELD ));
+    ( GetEngine()->AddBaseObject( GEOM_FIELD ));
 
   // set field data
   aField->Init( theShape, theName, theType, theDimension, theComponentNames );
@@ -142,7 +142,7 @@ int GEOMImpl_IFieldOperations::CountFields( const Handle(GEOM_Object)& theShape
   for (; anIt.More(); anIt.Next()) {
     TCollection_ExtendedString& anEntry = anIt.Value();
     anEntry.ToUTF8CString( (Standard_PCharacter&) pentry );
-    Handle(GEOM_BaseObject) anObj = GetEngine()->GetObject(GetDocID(), entry, false);
+    Handle(GEOM_BaseObject) anObj = GetEngine()->GetObject(entry, false);
     nbFields += ( !anObj.IsNull() && anObj->IsKind(STANDARD_TYPE(GEOM_Field)) );
   }
 
@@ -178,7 +178,7 @@ GEOMImpl_IFieldOperations::GetFields( const Handle(GEOM_Object)& theShape )
   for (; anIt.More(); anIt.Next()) {
     TCollection_ExtendedString& anEntry = anIt.Value();
     anEntry.ToUTF8CString( (Standard_PCharacter&) pentry );
-    Handle(GEOM_BaseObject) anObj = GetEngine()->GetObject(GetDocID(), entry, false);
+    Handle(GEOM_BaseObject) anObj = GetEngine()->GetObject(entry, false);
     if ( !anObj.IsNull() && anObj->IsKind(STANDARD_TYPE(GEOM_Field)) )
     {
         Handle(GEOM_Field) field = Handle(GEOM_Field)::DownCast( anObj );
@@ -222,7 +222,7 @@ GEOMImpl_IFieldOperations::GetField( const Handle(GEOM_Object)& theShape,
   for (; anIt.More(); anIt.Next()) {
     TCollection_ExtendedString& anEntry = anIt.Value();
     anEntry.ToUTF8CString( (Standard_PCharacter&) pentry );
-    field = Handle(GEOM_Field)::DownCast( GetEngine()->GetObject( GetDocID(), entry, false ));
+    field = Handle(GEOM_Field)::DownCast( GetEngine()->GetObject( entry, false ));
     if ( !field.IsNull() && field->GetName() == theName ) {
       SetErrorCode(OK);
       break;
index 4a4cd3ae2947612f262e6cb59aa31e3bced9675b..4358141eb68a9f45cd5afbfe5f6020488af11832 100644 (file)
@@ -34,7 +34,7 @@ class GEOM_Object;
 
 class GEOMImpl_IFieldOperations : public GEOM_IOperations {
  public:
-  Standard_EXPORT GEOMImpl_IFieldOperations(GEOM_Engine* theEngine, int theDocID);
+  Standard_EXPORT GEOMImpl_IFieldOperations(GEOM_Engine* theEngine);
   Standard_EXPORT ~GEOMImpl_IFieldOperations();
 
   Standard_EXPORT Handle(GEOM_Field)
index 4e6965c4fb52aab370b8cdb8e21ac22f52bfe847..46f57fac89310d0bae76230413a512323e614596 100644 (file)
@@ -53,8 +53,8 @@
  *   constructor:
  */
 //=============================================================================
-GEOMImpl_IGroupOperations::GEOMImpl_IGroupOperations (GEOM_Engine* theEngine, int theDocID)
-: GEOM_IOperations(theEngine, theDocID)
+GEOMImpl_IGroupOperations::GEOMImpl_IGroupOperations (GEOM_Engine* theEngine)
+: GEOM_IOperations(theEngine)
 {
   MESSAGE("GEOMImpl_IGroupOperations::GEOMImpl_IGroupOperations");
 }
index 68556eb138a9e4aac79defec4e55ba3521264819..3145e799c91e877276545ec0521eb50a9eca3fc8 100644 (file)
@@ -34,7 +34,7 @@
 
 class GEOMImpl_IGroupOperations : public GEOM_IOperations {
  public:
-  Standard_EXPORT GEOMImpl_IGroupOperations(GEOM_Engine* theEngine, int theDocID);
+  Standard_EXPORT GEOMImpl_IGroupOperations(GEOM_Engine* theEngine);
   Standard_EXPORT ~GEOMImpl_IGroupOperations();
 
   Standard_EXPORT Handle(GEOM_Object) CreateGroup(Handle(GEOM_Object) theMainShape, TopAbs_ShapeEnum  theShapeType);
index 32860022181eb3091fd9737ba14f93eadca79179..2a62a4d33ccf74f2c6dc23cfca62ffbfa9835ea8 100644 (file)
@@ -58,8 +58,8 @@
  *   constructor:
  */
 //=============================================================================
-GEOMImpl_IHealingOperations::GEOMImpl_IHealingOperations (GEOM_Engine* theEngine, int theDocID)
-: GEOM_IOperations(theEngine, theDocID)
+GEOMImpl_IHealingOperations::GEOMImpl_IHealingOperations (GEOM_Engine* theEngine)
+: GEOM_IOperations(theEngine)
 {
   myModifStats = new ShHealOper_ModifStats;
   MESSAGE("GEOMImpl_IHealingOperations::GEOMImpl_IHealingOperations");
@@ -115,7 +115,7 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::ShapeProcess (Handle(GEOM_Objec
   if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be processed
 
   // Add a new object
-  Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GetDocID(), GEOM_COPY );
+  Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GEOM_COPY );
 
   //Add the function
   aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), SHAPE_PROCESS);
@@ -331,7 +331,7 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::SuppressFaces
   if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be processed
 
   // Add a new object
-  Handle(GEOM_Object) aNewObject = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
+  Handle(GEOM_Object) aNewObject = GetEngine()->AddObject(GEOM_COPY);
 
   //Add the function
   aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), SUPPRESS_FACES);
@@ -398,7 +398,7 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::CloseContour
   if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be processed
 
   // Add a new object
-  Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GetDocID(), GEOM_COPY );
+  Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GEOM_COPY );
 
   //Add the function
   aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), CLOSE_CONTOUR);
@@ -466,7 +466,7 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::RemoveIntWires
   if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be processed
 
   // Add a new object
-  Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GetDocID(), GEOM_COPY );
+  Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GEOM_COPY );
 
   //Add the function
   aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), REMOVE_INT_WIRES);
@@ -532,7 +532,7 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::FillHoles (Handle(GEOM_Object)
   if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be processed
 
   // Add a new object
-  Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GetDocID(), GEOM_COPY );
+  Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GEOM_COPY );
 
   //Add the function
   aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), FILL_HOLES);
@@ -604,7 +604,7 @@ GEOMImpl_IHealingOperations::Sew (std::list<Handle(GEOM_Object)>& theObjects,
   }
 
   // Add a new object
-  Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GetDocID(), GEOM_COPY );
+  Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GEOM_COPY );
 
   //Add the function
   int aFunctionType = (isAllowNonManifold ? SEWING_NON_MANIFOLD : SEWING);
@@ -672,7 +672,7 @@ GEOMImpl_IHealingOperations::RemoveInternalFaces (std::list< Handle(GEOM_Object)
   }
 
   // Add a new object
-  Handle(GEOM_Object) aNewObject = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
+  Handle(GEOM_Object) aNewObject = GetEngine()->AddObject(GEOM_COPY);
 
   //Add the function
   Handle(GEOM_Function)
@@ -729,7 +729,7 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::DivideEdge (Handle(GEOM_Object)
   if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be processed
 
   // Add a new object
-  Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GetDocID(), GEOM_COPY );
+  Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GEOM_COPY );
 
   //Add the function
   aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), DIVIDE_EDGE);
@@ -795,7 +795,7 @@ GEOMImpl_IHealingOperations::DivideEdgeByPoint (Handle(GEOM_Object)
   }
 
   // Add a new object
-  Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GetDocID(), GEOM_COPY );
+  Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GEOM_COPY );
 
   //Add the function
   aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), DIVIDE_EDGE_BY_POINT);
@@ -849,7 +849,7 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::FuseCollinearEdgesWithinWire
   if (theWire.IsNull()) return NULL;
 
   // Add a new object
-  Handle(GEOM_Object) aRes = GetEngine()->AddObject(GetDocID(), theWire->GetType());
+  Handle(GEOM_Object) aRes = GetEngine()->AddObject(theWire->GetType());
 
   // Add a new function
   Handle(GEOM_Function) aFunction;
@@ -961,7 +961,7 @@ bool GEOMImpl_IHealingOperations::GetFreeBoundary (Handle(TColStd_HSequenceOfTra
   TopExp_Explorer anExp;
   for ( anExp.Init( aClosed, TopAbs_WIRE ); anExp.More(); anExp.Next() )
   {
-    anObj = GetEngine()->AddObject( GetDocID(), GEOM_FREE_BOUNDS );
+    anObj = GetEngine()->AddObject( GEOM_FREE_BOUNDS );
     aFunction = anObj->AddFunction( GEOMImpl_CopyDriver::GetID(), COPY_WITHOUT_REF );
     TopoDS_Shape aValueShape = anExp.Current();
     aFunction->SetValue( aValueShape );
@@ -969,7 +969,7 @@ bool GEOMImpl_IHealingOperations::GetFreeBoundary (Handle(TColStd_HSequenceOfTra
   }
   for ( anExp.Init( anOpen, TopAbs_WIRE ); anExp.More(); anExp.Next() )
   {
-    anObj = GetEngine()->AddObject( GetDocID(), GEOM_FREE_BOUNDS );
+    anObj = GetEngine()->AddObject( GEOM_FREE_BOUNDS );
     aFunction = anObj->AddFunction( GEOMImpl_CopyDriver::GetID(), COPY_WITHOUT_REF );
     TopoDS_Shape aValueShape = anExp.Current();
     aFunction->SetValue( aValueShape );
@@ -1103,7 +1103,7 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::ChangeOrientationCopy (Handle(G
     return NULL; //There is no function which creates an object to be processed
 
   // Add a new object
-  Handle(GEOM_Object) aNewObject = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
+  Handle(GEOM_Object) aNewObject = GetEngine()->AddObject(GEOM_COPY);
 
   if (theObject->GetType() == GEOM_VECTOR) { // Mantis issue 21066
     //Add the function
@@ -1175,7 +1175,7 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::LimitTolerance (Handle(GEOM_Obj
     return NULL; // There is no function which creates an object to be processed
 
   // Add a new object
-  Handle(GEOM_Object) aNewObject = GetEngine()->AddObject(GetDocID(), theObject->GetType());
+  Handle(GEOM_Object) aNewObject = GetEngine()->AddObject(theObject->GetType());
 
   // Add the function
   aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), LIMIT_TOLERANCE);
index 8412c79f8b96a1619cc2baa58548c2dc0ab8a246..d29456e89f2ec7c3d6ca808932413cec3413c955 100644 (file)
@@ -37,7 +37,7 @@ class ShHealOper_ModifStats;
 
 class GEOMImpl_IHealingOperations : public GEOM_IOperations {
  public:
-  Standard_EXPORT GEOMImpl_IHealingOperations(GEOM_Engine* theEngine, int theDocID);
+  Standard_EXPORT GEOMImpl_IHealingOperations(GEOM_Engine* theEngine);
   Standard_EXPORT ~GEOMImpl_IHealingOperations();
 
   // Apply Shape Processing to the selected Object
index 39d713281ddd43567827b817606251385c331b32..8e4bf188e68fb2ee3dd64ebf4565948c3b226353 100644 (file)
  *  constructor
  */
 //=============================================================================
-GEOMImpl_IInsertOperations::GEOMImpl_IInsertOperations(GEOM_Engine* theEngine, int theDocID)
-: GEOM_IOperations(theEngine, theDocID)
+GEOMImpl_IInsertOperations::GEOMImpl_IInsertOperations(GEOM_Engine* theEngine)
+: GEOM_IOperations(theEngine)
 {
   MESSAGE("GEOMImpl_IInsertOperations::GEOMImpl_IInsertOperations");
-  myShapesOperations = new GEOMImpl_IShapesOperations(GetEngine(), GetDocID());
-  myGroupOperations = new GEOMImpl_IGroupOperations(GetEngine(), GetDocID());
-  myFieldOperations = new GEOMImpl_IFieldOperations(GetEngine(), GetDocID());
+  myShapesOperations = new GEOMImpl_IShapesOperations(GetEngine());
+  myGroupOperations = new GEOMImpl_IGroupOperations(GetEngine());
+  myFieldOperations = new GEOMImpl_IFieldOperations(GetEngine());
 }
 
 //=============================================================================
@@ -105,7 +105,7 @@ Handle(GEOM_Object) GEOMImpl_IInsertOperations::MakeCopy (Handle(GEOM_Object) th
   if (theOriginal.IsNull()) return NULL;
 
   //Add a new Copy object
-  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
+  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
 
   //Add a Copy function for creation a copy object
   Handle(GEOM_Function) aFunction = aCopy->AddFunction(GEOMImpl_CopyDriver::GetID(), COPY_WITH_REF);
@@ -154,7 +154,7 @@ void GEOMImpl_IInsertOperations::Export
 
   if (theOriginal.IsNull()) return;
 
-  if ( !GEOMImpl_IECallBack::GetCallBack( theFormatName )->Export( GetDocID(), theOriginal, theFileName, theFormatName ) )
+  if ( !GEOMImpl_IECallBack::GetCallBack( theFormatName )->Export( theOriginal, theFileName, theFormatName ) )
     return;
   SetErrorCode(OK);
 }
@@ -173,7 +173,7 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IInsertOperations::Import
   if (theFileName.IsEmpty() || theFormatName.IsEmpty()) return NULL;
 
   Handle(TColStd_HSequenceOfTransient) aSeq =
-    GEOMImpl_IECallBack::GetCallBack( theFormatName )->Import( GetDocID(), theFormatName, theFileName );
+    GEOMImpl_IECallBack::GetCallBack( theFormatName )->Import( theFormatName, theFileName );
   SetErrorCode(OK);
   return aSeq;
 }
@@ -192,7 +192,7 @@ TCollection_AsciiString GEOMImpl_IInsertOperations::ReadValue
   TCollection_AsciiString aValue;
   if (theFileName.IsEmpty() || theFormatName.IsEmpty() || theParameterName.IsEmpty()) return aValue;
 
-  aValue = GEOMImpl_IECallBack::GetCallBack( theFormatName )->ReadValue( GetDocID(), theFileName, theFormatName, theParameterName );
+  aValue = GEOMImpl_IECallBack::GetCallBack( theFormatName )->ReadValue( theFileName, theFormatName, theParameterName );
 
   SetErrorCode(OK);
   return aValue;
@@ -208,7 +208,7 @@ Handle(GEOM_Object) GEOMImpl_IInsertOperations::RestoreShape (std::istringstream
   SetErrorCode(KO);
 
   //Add a new result object
-  Handle(GEOM_Object) result = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
+  Handle(GEOM_Object) result = GetEngine()->AddObject(GEOM_COPY);
 
   //Add a Copy function
   Handle(GEOM_Function) aFunction = result->AddFunction(GEOMImpl_CopyDriver::GetID(), COPY_WITHOUT_REF);
@@ -302,7 +302,7 @@ int GEOMImpl_IInsertOperations::LoadTexture(const TCollection_AsciiString& theTe
   for (i = 1, bdit = bytedata.begin(); bdit != bytedata.end(); ++bdit, ++i)
     aTexture->SetValue(i, (Standard_Byte)(*bdit));
 
-  int aTextureId = GetEngine()->addTexture(GetDocID(), lenbytes*8, lines.size(), aTexture, theTextureFile);
+  int aTextureId = GetEngine()->addTexture(lenbytes*8, lines.size(), aTexture, theTextureFile);
   if (aTextureId > 0) SetErrorCode(OK);
   return aTextureId;
 }
@@ -311,7 +311,7 @@ int GEOMImpl_IInsertOperations::AddTexture(int theWidth, int theHeight,
                                            const Handle(TColStd_HArray1OfByte)& theTexture)
 {
   SetErrorCode(KO);
-  int aTextureId = GetEngine()->addTexture(GetDocID(), theWidth, theHeight, theTexture);
+  int aTextureId = GetEngine()->addTexture(theWidth, theHeight, theTexture);
   if (aTextureId > 0) SetErrorCode(OK);
   return aTextureId;
 }
@@ -329,7 +329,7 @@ Handle(TColStd_HArray1OfByte) GEOMImpl_IInsertOperations::GetTexture(int theText
   if (theTextureId <= 0)
     return aTexture;
 
-  aTexture = GetEngine()->getTexture(GetDocID(), theTextureId, theWidth, theHeight, aFileName);
+  aTexture = GetEngine()->getTexture(theTextureId, theWidth, theHeight, aFileName);
 
   if (theWidth > 0 && theHeight > 0 && aTexture->Length() > 0) SetErrorCode(OK);
 
@@ -339,7 +339,7 @@ Handle(TColStd_HArray1OfByte) GEOMImpl_IInsertOperations::GetTexture(int theText
 std::list<int> GEOMImpl_IInsertOperations::GetAllTextures()
 {
   SetErrorCode(KO);
-  std::list<int> id_list = GetEngine()->getAllTextures(GetDocID());
+  std::list<int> id_list = GetEngine()->getAllTextures();
   SetErrorCode(OK);
   return id_list;
 }
@@ -363,7 +363,7 @@ bool GEOMImpl_IInsertOperations::TransferData
 
   //Add a new Transfer Data object object
   Handle(GEOM_Object) aTDObj =
-    GetEngine()->AddObject(GetDocID(), GEOM_TRANSFER_DATA);
+    GetEngine()->AddObject(GEOM_TRANSFER_DATA);
 
   //Add a Transfer Data function for created object
   Handle(GEOM_Function) aFunction =
index def40028c7adcdc86ac804705bbedde015a773c9..26bf962862a4fc8caecba0ec8d1a73986aa27020 100644 (file)
@@ -54,7 +54,7 @@ class GEOMImpl_IInsertOperations : public GEOM_IOperations {
     long                    myMaxNumber;
   };
 
-  Standard_EXPORT GEOMImpl_IInsertOperations(GEOM_Engine* theEngine, int theDocID);
+  Standard_EXPORT GEOMImpl_IInsertOperations(GEOM_Engine* theEngine);
   Standard_EXPORT ~GEOMImpl_IInsertOperations();
 
 
index d78a1b2169f056d2aea38f457a7042d0a5a13c06..94e1b4c98e02c8c0e59bde3122f0a863e448ac82 100644 (file)
@@ -65,8 +65,8 @@
  *   constructor:
  */
 //=============================================================================
-GEOMImpl_ILocalOperations::GEOMImpl_ILocalOperations (GEOM_Engine* theEngine, int theDocID)
-: GEOM_IOperations(theEngine, theDocID)
+GEOMImpl_ILocalOperations::GEOMImpl_ILocalOperations (GEOM_Engine* theEngine)
+: GEOM_IOperations(theEngine)
 {
   MESSAGE("GEOMImpl_ILocalOperations::GEOMImpl_ILocalOperations");
 }
@@ -93,7 +93,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFilletAll
   SetErrorCode(KO);
 
   //Add a new Fillet object
-  Handle(GEOM_Object) aFillet = GetEngine()->AddObject(GetDocID(), GEOM_FILLET);
+  Handle(GEOM_Object) aFillet = GetEngine()->AddObject(GEOM_FILLET);
 
   //Add a new Fillet function
   Handle(GEOM_Function) aFunction =
@@ -143,7 +143,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFilletEdges
   SetErrorCode(KO);
 
   //Add a new Fillet object
-  Handle(GEOM_Object) aFillet = GetEngine()->AddObject(GetDocID(), GEOM_FILLET);
+  Handle(GEOM_Object) aFillet = GetEngine()->AddObject(GEOM_FILLET);
 
   //Add a new Fillet function
   Handle(GEOM_Function) aFunction =
@@ -209,7 +209,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFilletEdgesR1R2
   SetErrorCode(KO);
 
   //Add a new Fillet object
-  Handle(GEOM_Object) aFillet = GetEngine()->AddObject(GetDocID(), GEOM_FILLET);
+  Handle(GEOM_Object) aFillet = GetEngine()->AddObject(GEOM_FILLET);
 
   //Add a new Fillet function
   Handle(GEOM_Function) aFunction =
@@ -277,7 +277,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFilletFaces
   SetErrorCode(KO);
 
   //Add a new Fillet object
-  Handle(GEOM_Object) aFillet = GetEngine()->AddObject(GetDocID(), GEOM_FILLET);
+  Handle(GEOM_Object) aFillet = GetEngine()->AddObject(GEOM_FILLET);
 
   //Add a new Fillet function
   Handle(GEOM_Function) aFunction =
@@ -343,7 +343,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFilletFacesR1R2
   SetErrorCode(KO);
 
   //Add a new Fillet object
-  Handle(GEOM_Object) aFillet = GetEngine()->AddObject(GetDocID(), GEOM_FILLET);
+  Handle(GEOM_Object) aFillet = GetEngine()->AddObject(GEOM_FILLET);
 
   //Add a new Fillet function
   Handle(GEOM_Function) aFunction =
@@ -410,7 +410,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFillet2D
   SetErrorCode(KO);
 
   //Add a new Fillet object
-  Handle(GEOM_Object) aFillet2D = GetEngine()->AddObject(GetDocID(), GEOM_FILLET_2D);
+  Handle(GEOM_Object) aFillet2D = GetEngine()->AddObject(GEOM_FILLET_2D);
 
   //Add a new Fillet function
   Handle(GEOM_Function) aFunction =
@@ -477,7 +477,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFillet1D
   SetErrorCode(KO);
 
   //Add a new Fillet object
-  Handle(GEOM_Object) aFillet1D = GetEngine()->AddObject(GetDocID(), GEOM_FILLET_1D);
+  Handle(GEOM_Object) aFillet1D = GetEngine()->AddObject(GEOM_FILLET_1D);
 
   //Add a new Fillet function
   Handle(GEOM_Function) aFunction =
@@ -544,7 +544,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferAll (Handle(GEOM_Objec
   SetErrorCode(KO);
 
   //Add a new Chamfer object
-  Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GetDocID(), GEOM_CHAMFER);
+  Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GEOM_CHAMFER);
 
   //Add a new Chamfer function
   Handle(GEOM_Function) aFunction =
@@ -595,7 +595,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferEdge
   SetErrorCode(KO);
 
   //Add a new Chamfer object
-  Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GetDocID(), GEOM_CHAMFER);
+  Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GEOM_CHAMFER);
 
   //Add a new Chamfer function
   Handle(GEOM_Function) aFunction =
@@ -650,7 +650,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferEdgeAD
   SetErrorCode(KO);
 
   //Add a new Chamfer object
-  Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GetDocID(), GEOM_CHAMFER);
+  Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GEOM_CHAMFER);
 
   //Add a new Chamfer function
   Handle(GEOM_Function) aFunction =
@@ -704,7 +704,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferFaces
   SetErrorCode(KO);
 
   //Add a new Chamfer object
-  Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GetDocID(), GEOM_CHAMFER);
+  Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GEOM_CHAMFER);
 
   //Add a new Chamfer function
   Handle(GEOM_Function) aFunction =
@@ -772,7 +772,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferFacesAD
   SetErrorCode(KO);
 
   //Add a new Chamfer object
-  Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GetDocID(), GEOM_CHAMFER);
+  Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GEOM_CHAMFER);
 
   //Add a new Chamfer function
   Handle(GEOM_Function) aFunction =
@@ -840,7 +840,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferEdges
   SetErrorCode(KO);
 
   //Add a new Chamfer object
-  Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GetDocID(), GEOM_CHAMFER);
+  Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GEOM_CHAMFER);
 
   //Add a new Chamfer function
   Handle(GEOM_Function) aFunction =
@@ -909,7 +909,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferEdgesAD
   SetErrorCode(KO);
 
   //Add a new Chamfer object
-  Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GetDocID(), GEOM_CHAMFER);
+  Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GEOM_CHAMFER);
 
   //Add a new Chamfer function
   Handle(GEOM_Function) aFunction =
@@ -979,7 +979,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeArchimede (Handle(GEOM_Object
   SetErrorCode(KO);
 
   //Add a new Archimede object
-  Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GetDocID(), GEOM_ARCHIMEDE);
+  Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GEOM_ARCHIMEDE);
 
   //Add a new Archimede function
   Handle(GEOM_Function) aFunction = aChamfer->AddFunction(GEOMImpl_ArchimedeDriver::GetID(), ARCHIMEDE_TYPE);
@@ -1056,7 +1056,7 @@ Standard_Integer GEOMImpl_ILocalOperations::GetSubShapeIndex (Handle(GEOM_Object
 
   if (aGen) {
     GEOMImpl_IShapesOperations* anIShapesOperations =
-      aGen->GetIShapesOperations(GetDocID());
+      aGen->GetIShapesOperations();
     anInd = anIShapesOperations->GetSubShapeIndex(theShape, theSubShape);
     SetErrorCode(anIShapesOperations->GetErrorCode());
   }
index 672e7daf45c64f1af060983f109be040847e5b68..371671f4005d084ca0ce25475a42882dedc61549 100644 (file)
@@ -33,7 +33,7 @@
 
 class GEOMImpl_ILocalOperations : public GEOM_IOperations {
  public:
-  Standard_EXPORT GEOMImpl_ILocalOperations(GEOM_Engine* theEngine, int theDocID);
+  Standard_EXPORT GEOMImpl_ILocalOperations(GEOM_Engine* theEngine);
   Standard_EXPORT ~GEOMImpl_ILocalOperations();
 
   Standard_EXPORT Handle(GEOM_Object) MakeFilletAll   (Handle(GEOM_Object) theShape, double theR);
index d6f255812028b4b13e2e8cd0e36ecfb8e00aa17a..ebb5d83d3b0ff0d85eb2a95d40643d3d96841829 100644 (file)
@@ -83,8 +83,8 @@
  *  Constructor
  */
 //=============================================================================
-GEOMImpl_IMeasureOperations::GEOMImpl_IMeasureOperations (GEOM_Engine* theEngine, int theDocID)
-: GEOM_IOperations(theEngine, theDocID)
+GEOMImpl_IMeasureOperations::GEOMImpl_IMeasureOperations (GEOM_Engine* theEngine)
+: GEOM_IOperations(theEngine)
 {
   MESSAGE("GEOMImpl_IMeasureOperations::GEOMImpl_IMeasureOperations");
 }
@@ -806,7 +806,7 @@ Handle(GEOM_Object) GEOMImpl_IMeasureOperations::GetCentreOfMass
   if (theShape.IsNull()) return NULL;
 
   //Add a new CentreOfMass object
-  Handle(GEOM_Object) aCDG = GetEngine()->AddObject(GetDocID(), GEOM_CDG);
+  Handle(GEOM_Object) aCDG = GetEngine()->AddObject(GEOM_CDG);
 
   //Add a new CentreOfMass function
   Handle(GEOM_Function) aFunction =
@@ -860,7 +860,7 @@ Handle(GEOM_Object) GEOMImpl_IMeasureOperations::GetVertexByIndex
   if (aRefShape.IsNull()) return NULL;
 
   //Add a new Vertex object
-  Handle(GEOM_Object) aVertex = GetEngine()->AddObject(GetDocID(), GEOM_POINT);
+  Handle(GEOM_Object) aVertex = GetEngine()->AddObject(GEOM_POINT);
 
   //Add a function
   Handle(GEOM_Function) aFunction =
@@ -908,7 +908,7 @@ Handle(GEOM_Object) GEOMImpl_IMeasureOperations::GetNormal
   if (theFace.IsNull()) return NULL;
 
   //Add a new Normale object
-  Handle(GEOM_Object) aNorm = GetEngine()->AddObject(GetDocID(), GEOM_VECTOR);
+  Handle(GEOM_Object) aNorm = GetEngine()->AddObject(GEOM_VECTOR);
 
   //Add a new Normale function
   Handle(GEOM_Function) aFunction =
@@ -1146,7 +1146,7 @@ Handle(GEOM_Object) GEOMImpl_IMeasureOperations::GetBoundingBox
   if (theShape.IsNull()) return NULL;
 
   //Add a new BoundingBox object
-  Handle(GEOM_Object) aBnd = GetEngine()->AddObject(GetDocID(), GEOM_BOX);
+  Handle(GEOM_Object) aBnd = GetEngine()->AddObject(GEOM_BOX);
 
   //Add a new BoundingBox function
   const int aType = (precise ? BND_BOX_MEASURE_PRECISE : BND_BOX_MEASURE);
index 7767daa14728d3d606fefade8dd563da5fe67ae0..6c7175bc2a661c55ca5d213a94ae8a97ca2f383d 100644 (file)
@@ -41,7 +41,7 @@ class GEOM_Object;
 
 class GEOMImpl_IMeasureOperations : public GEOM_IOperations {
  public:
-  Standard_EXPORT GEOMImpl_IMeasureOperations(GEOM_Engine* theEngine, int theDocID);
+  Standard_EXPORT GEOMImpl_IMeasureOperations(GEOM_Engine* theEngine);
   Standard_EXPORT ~GEOMImpl_IMeasureOperations();
 
   enum ShapeKind {
index bd1464bbf1ba421df43bd68a85aaa9303d3917cb..46a9c78a44e5ca1ee026c89ff5c108ea76319c4a 100644 (file)
@@ -176,8 +176,8 @@ namespace
  *   constructor:
  */
 //=============================================================================
-GEOMImpl_IShapesOperations::GEOMImpl_IShapesOperations (GEOM_Engine* theEngine, int theDocID)
-: GEOM_IOperations(theEngine, theDocID)
+GEOMImpl_IShapesOperations::GEOMImpl_IShapesOperations (GEOM_Engine* theEngine)
+: GEOM_IOperations(theEngine)
 {
   MESSAGE("GEOMImpl_IShapesOperations::GEOMImpl_IShapesOperations");
 }
@@ -205,7 +205,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeEdge
   if (thePnt1.IsNull() || thePnt2.IsNull()) return NULL;
 
   //Add a new Edge object
-  Handle(GEOM_Object) anEdge = GetEngine()->AddObject(GetDocID(), GEOM_EDGE);
+  Handle(GEOM_Object) anEdge = GetEngine()->AddObject(GEOM_EDGE);
 
   //Add a new Vector function
   Handle(GEOM_Function) aFunction =
@@ -259,7 +259,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeEdgeOnCurveByLength
   if (theRefCurve.IsNull()) return NULL;
 
   //Add a new Edge object
-  Handle(GEOM_Object) anEdge = GetEngine()->AddObject(GetDocID(), GEOM_EDGE);
+  Handle(GEOM_Object) anEdge = GetEngine()->AddObject(GEOM_EDGE);
 
   //Add a new Vector function
   Handle(GEOM_Function) aFunction =
@@ -317,7 +317,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeEdgeWire
   if (theWire.IsNull()) return NULL;
 
   //Add a new Edge object
-  Handle(GEOM_Object) anEdge = GetEngine()->AddObject(GetDocID(), GEOM_EDGE);
+  Handle(GEOM_Object) anEdge = GetEngine()->AddObject(GEOM_EDGE);
 
   //Add a new Vector function
   Handle(GEOM_Function) aFunction =
@@ -382,7 +382,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeWire
   SetErrorCode(KO);
 
   //Add a new object
-  Handle(GEOM_Object) aWire = GetEngine()->AddObject(GetDocID(), GEOM_WIRE);
+  Handle(GEOM_Object) aWire = GetEngine()->AddObject(GEOM_WIRE);
 
   //Add a new function
   Handle(GEOM_Function) aFunction =
@@ -453,7 +453,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeFace (Handle(GEOM_Object) th
   if (theWire.IsNull()) return NULL;
 
   //Add a new Face object
-  Handle(GEOM_Object) aFace = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
+  Handle(GEOM_Object) aFace = GetEngine()->AddObject(GEOM_FACE);
 
   //Add a new Shape function for creation of a face from a wire
   Handle(GEOM_Function) aFunction =
@@ -512,7 +512,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeFaceWires
   SetErrorCode(KO);
 
   //Add a new object
-  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
+  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_FACE);
 
   //Add a new function
   Handle(GEOM_Function) aFunction =
@@ -590,7 +590,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeFaceFromSurface
   SetErrorCode(KO);
 
   //Add a new object
-  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
+  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_FACE);
 
   //Add a new function
   Handle(GEOM_Function) aFunction =
@@ -659,7 +659,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeFaceWithConstraints
   SetErrorCode(KO);
 
   //Add a new object
-  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_FILLING);
+  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_FILLING);
 
   //Add a new function
   Handle(GEOM_Function) aFunction =
@@ -799,7 +799,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeShape
   SetErrorCode(KO);
 
   //Add a new object
-  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), theObjectType);
+  Handle(GEOM_Object) aShape = GetEngine()->AddObject(theObjectType);
 
   //Add a new function
   Handle(GEOM_Function) aFunction =
@@ -868,7 +868,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeSolidFromConnectedFaces
   SetErrorCode(KO);
 
   //Add a new object
-  Handle(GEOM_Object) aSolid = GetEngine()->AddObject(GetDocID(), GEOM_SOLID);
+  Handle(GEOM_Object) aSolid = GetEngine()->AddObject(GEOM_SOLID);
 
   //Add a new function
   Handle(GEOM_Function) aFunction =
@@ -945,7 +945,7 @@ GEOMImpl_IShapesOperations::MakeGlueFaces (std::list< Handle(GEOM_Object) >& the
   }
 
   //Add a new Glued object
-  Handle(GEOM_Object) aGlued = GetEngine()->AddObject(GetDocID(), GEOM_GLUED);
+  Handle(GEOM_Object) aGlued = GetEngine()->AddObject(GEOM_GLUED);
 
   //Add a new Glue function
   Handle(GEOM_Function) aFunction;
@@ -1092,7 +1092,7 @@ GEOMImpl_IShapesOperations::MakeGlueFacesByList(std::list< Handle(GEOM_Object) >
   }
 
   //Add a new Glued object
-  Handle(GEOM_Object) aGlued = GetEngine()->AddObject(GetDocID(), GEOM_GLUED);
+  Handle(GEOM_Object) aGlued = GetEngine()->AddObject(GEOM_GLUED);
 
   //Add a new Glue function
   Handle(GEOM_Function) aFunction;
@@ -1159,7 +1159,7 @@ GEOMImpl_IShapesOperations::MakeGlueEdges (std::list< Handle(GEOM_Object) >& the
   }
 
   //Add a new Glued object
-  Handle(GEOM_Object) aGlued = GetEngine()->AddObject(GetDocID(), GEOM_GLUED);
+  Handle(GEOM_Object) aGlued = GetEngine()->AddObject(GEOM_GLUED);
 
   //Add a new Glue function
   Handle(GEOM_Function) aFunction;
@@ -1339,7 +1339,7 @@ GEOMImpl_IShapesOperations::MakeGlueEdgesByList (std::list< Handle(GEOM_Object)
     return NULL;
   }
   //Add a new Glued object
-  Handle(GEOM_Object) aGlued = GetEngine()->AddObject(GetDocID(), GEOM_GLUED);
+  Handle(GEOM_Object) aGlued = GetEngine()->AddObject(GEOM_GLUED);
 
   //Add a new Glue function
   Handle(GEOM_Function) aFunction;
@@ -1446,7 +1446,7 @@ GEOMImpl_IShapesOperations::GetExistingSubObjects(Handle(GEOM_Object)    theShap
     Standard_Integer aStrLen = anEntry.LengthOfCString();
     char* anEntryStr = new char[aStrLen+1];
     anEntry.ToUTF8CString(anEntryStr);
-    Handle(GEOM_BaseObject) anObj = GetEngine()->GetObject(GetDocID(), anEntryStr, false);
+    Handle(GEOM_BaseObject) anObj = GetEngine()->GetObject(anEntryStr, false);
     if (!anObj.IsNull() ) {
       bool isGroup    = anObj->IsKind(STANDARD_TYPE(GEOM_Object)) && anObj->GetType() == GEOM_GROUP;
       bool isSubShape = anObj->IsKind(STANDARD_TYPE(GEOM_Object)) && anObj->GetType() != GEOM_GROUP;
@@ -1546,7 +1546,7 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::MakeExplode
 
     //anObj = GetEngine()->AddSubShape(theShape, anArray);
     {
-      anObj = GetEngine()->AddObject(GetDocID(), GEOM_SUBSHAPE);
+      anObj = GetEngine()->AddObject(GEOM_SUBSHAPE);
       Handle(GEOM_Function) aFunction = anObj->AddFunction(GEOM_Object::GetSubShapeID(), 1);
       if (aFunction.IsNull()) return aSeq;
 
@@ -1762,7 +1762,7 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::MakeSubShapes
       anArray = new TColStd_HArray1OfInteger(1,1);
       anArray->SetValue(1, id);
 
-      anObj = GetEngine()->AddObject(GetDocID(), GEOM_SUBSHAPE);
+      anObj = GetEngine()->AddObject(GEOM_SUBSHAPE);
       if (!anObj.IsNull()) {
         Handle(GEOM_Function) aFunction = anObj->AddFunction(GEOM_Object::GetSubShapeID(), 1);
         if (aFunction.IsNull()) return aSeq;
@@ -2150,7 +2150,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::ReverseShape(Handle(GEOM_Object)
 
   /*
   //Add a new reversed object
-  Handle(GEOM_Object) aReversed = GetEngine()->AddObject(GetDocID(), theShape->GetType());
+  Handle(GEOM_Object) aReversed = GetEngine()->AddObject(theShape->GetType());
 
   //Add a new Revese function
   Handle(GEOM_Function) aFunction;
@@ -2195,7 +2195,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::ReverseShape(Handle(GEOM_Object)
 
   if (aGen) {
     GEOMImpl_IHealingOperations* anIHealingOperations =
-      aGen->GetIHealingOperations(GetDocID());
+      aGen->GetIHealingOperations();
     aReversed = anIHealingOperations->ChangeOrientationCopy(theShape);
     SetErrorCode(anIHealingOperations->GetErrorCode());
   }
@@ -3003,7 +3003,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::GetShapesOnShapeAsCompound
   }
 
   //Add a new result object
-  Handle(GEOM_Object) aRes = GetEngine()->AddObject(GetDocID(), GEOM_SHAPES_ON_SHAPE);
+  Handle(GEOM_Object) aRes = GetEngine()->AddObject(GEOM_SHAPES_ON_SHAPE);
   Handle(GEOM_Function) aFunction =
     aRes->AddFunction(GEOMImpl_ShapeDriver::GetID(), SHAPES_ON_SHAPE);
   aFunction->SetValue(aCompound);
@@ -3185,7 +3185,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeExtraction
 
   //Add a new Result object
   Handle(GEOM_Object) aResult =
-              GetEngine()->AddObject(GetDocID(), GEOM_EXTRACTION);
+              GetEngine()->AddObject(GEOM_EXTRACTION);
 
   //Add a new Extraction function
   Handle(GEOM_Function) aFunction =
@@ -5161,7 +5161,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::ExtendEdge
   }
 
   //Add a new Edge object
-  Handle(GEOM_Object) aResEdge = GetEngine()->AddObject(GetDocID(), GEOM_EDGE);
+  Handle(GEOM_Object) aResEdge = GetEngine()->AddObject(GEOM_EDGE);
 
   //Add a new Vector function
   Handle(GEOM_Function) aFunction =
@@ -5227,7 +5227,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::ExtendFace
   }
 
   //Add a new Face object
-  Handle(GEOM_Object) aResFace = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
+  Handle(GEOM_Object) aResFace = GetEngine()->AddObject(GEOM_FACE);
 
   //Add a new Vector function
   Handle(GEOM_Function) aFunction =
@@ -5292,7 +5292,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeSurfaceFromFace
   }
 
   //Add a new Face object
-  Handle(GEOM_Object) aResFace = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
+  Handle(GEOM_Object) aResFace = GetEngine()->AddObject(GEOM_FACE);
 
   //Add a new Vector function
   Handle(GEOM_Function) aFunction =
index 1e0b008b3fa6961500d339ca127a14a2b8ab080e..838583f87ab6746f55f69d2d0fa2a2538c6e6b62 100644 (file)
@@ -78,7 +78,7 @@ class GEOMImpl_IShapesOperations : public GEOM_IOperations
     std::list<Standard_Integer> indices; ///< Shape indices touched by this type of modification.
   };
 
-  Standard_EXPORT GEOMImpl_IShapesOperations(GEOM_Engine* theEngine, int theDocID);
+  Standard_EXPORT GEOMImpl_IShapesOperations(GEOM_Engine* theEngine);
   Standard_EXPORT ~GEOMImpl_IShapesOperations();
 
   Standard_EXPORT Handle(GEOM_Object) MakeEdge (Handle(GEOM_Object) thePoint1,
index 2e3f57ba21d3d0205ac5cbf2e31b7012daa739c5..cb0c09c5b2083987127b9b75d5ae637dd4380146 100644 (file)
@@ -75,8 +75,8 @@
  */
 //=============================================================================
 
-GEOMImpl_ITransformOperations::GEOMImpl_ITransformOperations (GEOM_Engine* theEngine, int theDocID)
-: GEOM_IOperations(theEngine, theDocID)
+GEOMImpl_ITransformOperations::GEOMImpl_ITransformOperations (GEOM_Engine* theEngine)
+: GEOM_IOperations(theEngine)
 {
   MESSAGE("GEOMImpl_ITransformOperations::GEOMImpl_ITransformOperations");
 }
@@ -213,7 +213,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::TranslateTwoPointsCopy
   if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be moved
 
   //Add a new Copy object
-  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
+  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
 
   //Add a translate function
   Handle(GEOM_Function) aFunction =
@@ -265,7 +265,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::TranslateDXDYDZCopy
   if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be moved
 
   //Add a new Copy object
-  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
+  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
 
   //Add a translate function
   Handle(GEOM_Function) aFunction =
@@ -368,7 +368,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::TranslateVectorCopy
   if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be moved
 
   //Add a new Copy object
-  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
+  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
 
   //Add a translate function
   Handle(GEOM_Function) aFunction =
@@ -423,7 +423,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::TranslateVectorDistance
 
   //Add a translate function
   if (theCopy) {
-    aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType());
+    aCopy = GetEngine()->AddObject(theObject->GetType());
     aFunction = aCopy->AddFunction(GEOMImpl_TranslateDriver::GetID(), TRANSLATE_VECTOR_DISTANCE);
   }
   else {
@@ -484,7 +484,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::Translate1D
   if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be moved
 
   //Add a new Copy object
-  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType());
+  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(theObject->GetType());
 
   //Add a translate function
   Handle(GEOM_Function) aFunction =
@@ -542,7 +542,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::Translate2D (Handle(GEOM_Obje
   if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be moved
 
   //Add a new Copy object
-  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType());
+  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(theObject->GetType());
 
   //Add a translate function
   Handle(GEOM_Function) aFunction =
@@ -794,7 +794,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::MirrorPlaneCopy
   if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be mirrored
 
   //Add a new Copy object
-  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
+  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
 
   //Add a mirror function
   Handle(GEOM_Function) aFunction =
@@ -895,7 +895,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::MirrorPointCopy
   if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be mirrored
 
   //Add a new Copy object
-  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
+  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
 
   //Add a mirror function
   Handle(GEOM_Function) aFunction =
@@ -996,7 +996,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::MirrorAxisCopy
   if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be mirrored
 
   //Add a new Copy object
-  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
+  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
 
   //Add a mirror function
   Handle(GEOM_Function) aFunction =
@@ -1100,7 +1100,7 @@ GEOMImpl_ITransformOperations::OffsetShapeCopy( Handle(GEOM_Object) theObject,
   if (anOriginal.IsNull()) return NULL; //There is no function which creates an object to be offset
 
   //Add a new Copy object
-  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
+  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
 
   //Add a new Offset function
   Handle(GEOM_Function) aFunction =
@@ -1171,7 +1171,7 @@ GEOMImpl_ITransformOperations::ProjectShapeCopy (Handle(GEOM_Object) theSource,
   else
   {
     //Add a new Projection object
-    aCopy = GetEngine()->AddObject(GetDocID(), GEOM_PROJECTION);
+    aCopy = GetEngine()->AddObject(GEOM_PROJECTION);
 
     //Add a Projection function
     Handle(GEOM_Function) aFunction =
@@ -1234,7 +1234,7 @@ Standard_Real GEOMImpl_ITransformOperations::ProjectPointOnWire
   }
 
   //Add a new Projection object
-  thePointOnEdge = GetEngine()->AddObject(GetDocID(), GEOM_PROJECTION);
+  thePointOnEdge = GetEngine()->AddObject(GEOM_PROJECTION);
 
   //Add a Projection function
   Handle(GEOM_Function) aFunction = thePointOnEdge->AddFunction
@@ -1347,7 +1347,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::ScaleShapeCopy
   if (anOriginal.IsNull()) return NULL; //There is no function which creates an object to be scaled
 
   //Add a new Copy object
-  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
+  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
 
   //Add a scale function
   Handle(GEOM_Function) aFunction =
@@ -1412,7 +1412,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::ScaleShapeAlongAxes (Handle(G
   Handle(GEOM_Object) aCopy;   //Add a new Copy object
   Handle(GEOM_Function) aFunction;
   if (doCopy) {
-    aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType());
+    aCopy = GetEngine()->AddObject(theObject->GetType());
     aFunction = aCopy->AddFunction(GEOMImpl_ScaleDriver::GetID(), SCALE_SHAPE_AXES_COPY);
   }
   else {
@@ -1535,7 +1535,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::PositionShapeCopy
   if (anOriginal.IsNull()) return NULL; //There is no function which creates an object to be set in position
 
   //Add a new Copy object
-  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
+  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
 
   //Add a position function
   Standard_Integer aType = POSITION_SHAPE_COPY;
@@ -1596,7 +1596,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::PositionAlongPath
   Handle(GEOM_Object) aCopy;
 
   if (theCopy) {
-    aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType());
+    aCopy = GetEngine()->AddObject(theObject->GetType());
     aFunction = aCopy->AddFunction(GEOMImpl_PositionDriver::GetID(), POSITION_ALONG_PATH);
   }
   else
@@ -1711,7 +1711,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::RotateCopy (Handle(GEOM_Objec
   if (aLastFunction.IsNull()) return NULL;  //There is no function which creates an object to be rotated
 
   //Add a new Copy object
-  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
+  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
 
   //Add a rotate function
   aFunction = aCopy->AddFunction(GEOMImpl_RotateDriver::GetID(), ROTATE_COPY);
@@ -1763,7 +1763,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::Rotate1D (Handle(GEOM_Object)
   if (aLastFunction.IsNull()) return NULL;  //There is no function which creates an object to be rotated
 
   //Add a new Copy object
-  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType());
+  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(theObject->GetType());
 
   //Add a rotate function
   aFunction = aCopy->AddFunction(GEOMImpl_RotateDriver::GetID(), ROTATE_1D);
@@ -1817,7 +1817,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::Rotate1D (Handle(GEOM_Object)
   if (aLastFunction.IsNull()) return NULL;  //There is no function which creates an object to be rotated
 
   //Add a new Copy object
-  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType());
+  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(theObject->GetType());
 
   //Add a rotate function
   aFunction = aCopy->AddFunction(GEOMImpl_RotateDriver::GetID(), ROTATE_1D_STEP);
@@ -1877,7 +1877,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::Rotate2D (Handle(GEOM_Object)
   if (aLastFunction.IsNull()) return NULL;  //There is no function which creates an object to be rotated
 
   //Add a new Copy object
-  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType());
+  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(theObject->GetType());
 
   //Add a rotate function
   aFunction = aCopy->AddFunction(GEOMImpl_RotateDriver::GetID(), ROTATE_2D);
@@ -1939,7 +1939,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::Rotate2D (Handle(GEOM_Object)
   if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be rotated
 
   //Add a new Copy object
-  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType());
+  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(theObject->GetType());
 
   //Add a rotate function
   aFunction = aCopy->AddFunction(GEOMImpl_RotateDriver::GetID(), ROTATE_2D);
@@ -2059,7 +2059,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::RotateThreePointsCopy (Handle
   if (aLastFunction.IsNull()) return NULL;  //There is no function which creates an object to be rotated
 
   //Add a new Copy object
-  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
+  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
 
   //Add a rotate function
   aFunction = aCopy->AddFunction(GEOMImpl_RotateDriver::GetID(), ROTATE_THREE_POINTS_COPY);
@@ -2115,7 +2115,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::TransformLikeOtherCopy
   if (aSampleFunc.IsNull()) return NULL; // There is no function which creates a sample object
 
   // Add a new Copy object
-  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
+  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
 
   // Add a transform function (depends on theSample function)
   Handle(GEOM_Function) aFunction =
@@ -2265,7 +2265,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::MakeProjectionOnCylinder
 
   //Add a new Projection object
   Handle(GEOM_Object) aResult =
-    GetEngine()->AddObject(GetDocID(), GEOM_PROJECTION);
+    GetEngine()->AddObject(GEOM_PROJECTION);
 
   //Add a Projection function
   Handle(GEOM_Function) aFunction = aResult->AddFunction
index db5adae667584ed09024ec42d08f8b95502b3385..a55349b05bf35620ed8bee4d5f8aa731b59241d8 100644 (file)
@@ -37,7 +37,7 @@ class GEOMImpl_IRotate;
 class GEOMImpl_ITransformOperations : public GEOM_IOperations
 {
  public:
-  Standard_EXPORT GEOMImpl_ITransformOperations(GEOM_Engine* theEngine, int theDocID);
+  Standard_EXPORT GEOMImpl_ITransformOperations(GEOM_Engine* theEngine);
   Standard_EXPORT ~GEOMImpl_ITransformOperations();
 
   Standard_EXPORT Handle(GEOM_Object) TranslateTwoPoints (Handle(GEOM_Object) theObject,
index 3a7159a2f1c949a5504018c76c3b9d43d2825ef3..52a4cf00f2dbc748cc7bcd6d993bb0dae865371c 100644 (file)
@@ -69,7 +69,7 @@ Standard_Integer GEOMImpl_ImportDriver::Execute(Handle(TFunction_Logbook)& log)
     return 0;
 
   Handle(TColStd_HSequenceOfTransient) aSeq =
-    GEOMImpl_IECallBack::GetCallBack( aFormatName )->Import( GetDocID(), aFormatName, aFileName );
+    GEOMImpl_IECallBack::GetCallBack( aFormatName )->Import( aFormatName, aFileName );
   if( aSeq.IsNull() )
     return 0;
 
index d79a68e10f9eaa4a42fbcd7a6a818f2ebb9e0957..1f5bc409dae02e4379c860e8a8196d2ced5d6a15 100644 (file)
@@ -80,8 +80,9 @@ static QString getParentComponent( _PTR( SObject ) obj )
 // purpose  : check if the object(s) passed as the second arguments are used
 //            by the other objects in the study
 //=====================================================================================
-static bool inUse( _PTR(Study) study, const QString& component, const QMap<QString,QString>& objects )
+static bool inUse( const QString& component, const QMap<QString,QString>& objects )
 {
+  _PTR(Study) study = SalomeApp_Application::getStudy();
   _PTR(SObject) comp = study->FindObjectID( component.toLatin1().data() );
   if ( !comp )
     return false;
@@ -161,7 +162,7 @@ static void getGeomChildrenAndFolders( _PTR(SObject) theSO,
                                        QMap<QString,QString>& geomObjList,
                                        QMap<QString,QString>& folderList ) {
   if ( !theSO ) return;
-  _PTR(Study) aStudy = theSO->GetStudy();
+  _PTR(Study) aStudy = SalomeApp_Application::getStudy();
   if ( !aStudy ) return;
   _PTR(UseCaseBuilder) aUseCaseBuilder = aStudy->GetUseCaseBuilder();
 
@@ -362,8 +363,7 @@ void GEOMToolsGUI::OnEditDelete()
     return;
 
   LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
-  SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
-  if ( !aSelMgr || !appStudy )
+  if ( !aSelMgr )
     return;
 
   // get selection
@@ -371,7 +371,7 @@ void GEOMToolsGUI::OnEditDelete()
   if ( selected.IsEmpty() )
     return;
 
-  _PTR(Study) aStudy = appStudy->studyDS();
+  _PTR(Study) aStudy = SalomeApp_Application::getStudy();
   _PTR(UseCaseBuilder) aUseCaseBuilder = aStudy->GetUseCaseBuilder();
 
   // check if study is locked
@@ -466,7 +466,7 @@ void GEOMToolsGUI::OnEditDelete()
   }
 
   _PTR(StudyBuilder) aStudyBuilder (aStudy->NewBuilder());
-  GEOM_Displayer disp( appStudy );
+  GEOM_Displayer disp;
   bool toUpdateColorScale = disp.SetUpdateColorScale( false ); // IPAL54049
 
   if ( isComponentSelected ) {
@@ -479,7 +479,7 @@ void GEOMToolsGUI::OnEditDelete()
     for ( it->InitEx( false ); it->More(); it->Next() ) {
       _PTR(SObject) child( it->Value() );
       // remove object from GEOM engine
-      removeObjectWithChildren( child, aStudy, views, &disp );
+      removeObjectWithChildren( child, views, &disp );
       // remove object from study
       aStudyBuilder->RemoveObjectWithChildren( child );
       // remove object from use case tree
@@ -488,7 +488,7 @@ void GEOMToolsGUI::OnEditDelete()
   }
   else {
     // GEOM component is not selected: check if selected objects are in use
-    if ( inUse( aStudy, geomComp, allDeleted ) && 
+    if ( inUse( geomComp, allDeleted ) &&
          SUIT_MessageBox::question( app->desktop(),
                                     QObject::tr("WRN_WARNING"),
                                     QObject::tr("DEP_OBJECT"),
@@ -501,7 +501,7 @@ void GEOMToolsGUI::OnEditDelete()
     for ( it = toBeDeleted.begin(); it != toBeDeleted.end(); ++it ) {
       _PTR(SObject) obj ( aStudy->FindObjectID( it.key().toLatin1().data() ) );
       // remove object from GEOM engine
-      removeObjectWithChildren( obj, aStudy, views, &disp );
+      removeObjectWithChildren( obj, views, &disp );
       // remove objects from study
       aStudyBuilder->RemoveObjectWithChildren( obj );
       // remove object from use case tree
@@ -511,7 +511,7 @@ void GEOMToolsGUI::OnEditDelete()
     for ( it = toBeDelFolders.begin(); it != toBeDelFolders.end(); ++it ) {
       _PTR(SObject) obj ( aStudy->FindObjectID( it.key().toLatin1().data() ) );
       // remove object from GEOM engine
-      removeObjectWithChildren( obj, aStudy, views, &disp );
+      removeObjectWithChildren( obj, views, &disp );
       // remove objects from study
       aStudyBuilder->RemoveObjectWithChildren( obj );
       // remove object from use case tree
@@ -531,15 +531,15 @@ void GEOMToolsGUI::OnEditDelete()
 // purpose  : used by OnEditDelete() method
 //=====================================================================================
 void GEOMToolsGUI::removeObjectWithChildren(_PTR(SObject) obj,
-                                            _PTR(Study) aStudy,
                                             QList<SALOME_View*> views,
                                             GEOM_Displayer* disp)
 {
+  _PTR(Study) aStudy = SalomeApp_Application::getStudy();
   // iterate through all children of obj
   for (_PTR(ChildIterator) it (aStudy->NewChildIterator(obj)); it->More(); it->Next()) {
   // for (_PTR(UseCaseIterator) it (aStudy->GetUseCaseBuilder()->GetUseCaseIterator(obj)); it->More(); it->Next()) {
     _PTR(SObject) child (it->Value());
-    removeObjectWithChildren(child, aStudy, views, disp);
+    removeObjectWithChildren(child, views, disp);
   }
 
   // erase object and remove it from engine
@@ -583,8 +583,7 @@ void GEOMToolsGUI::deactivate()
 {
   SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
   if ( app ) {
-    SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
-    GEOM_Displayer aDisp (appStudy);
+    GEOM_Displayer aDisp;
     aDisp.GlobalSelection();
     getGeometryGUI()->setLocalSelectionMode(GEOM_ALLOBJECTS);
   }
index c01c580d685375cdacff806cb07e8ed06437b3f2..23557233b8e01677b811d8fa11d7332895c138fa 100644 (file)
@@ -97,7 +97,6 @@ private:
 
   // Recursive deletion of object with children
   void         removeObjectWithChildren( _PTR(SObject),
-                                         _PTR(Study),
                                          QList<SALOME_View*>,
                                          GEOM_Displayer* );
 };
index 723dd270d9d154824c3fb9d8ed4fc79acc174572..bbce1f2427baf45a11f3dcf973f5a997eb7e91a8 100644 (file)
@@ -166,7 +166,7 @@ void GEOMToolsGUI::OnAutoColor()
 
   QList<SALOMEDS::Color> aReservedColors;
 
-  GEOM_Displayer displayer ( appStudy );
+  GEOM_Displayer displayer;
 
   SALOME_View* window = displayer.GetActiveView();
   if ( !window ) return;
@@ -254,7 +254,7 @@ void GEOMToolsGUI::OnColor()
   aSelMgr->selectedObjects( selected );
   if ( selected.IsEmpty() ) return;
 
-  GEOM_Displayer displayer( appStudy );
+  GEOM_Displayer displayer;
 
   // get active view
   SALOME_View* window = displayer.GetActiveView();
@@ -306,7 +306,7 @@ void GEOMToolsGUI::OnTexture()
   aSelMgr->selectedObjects( selected );
   if ( selected.IsEmpty() ) return;
 
-  GEOM_Displayer displayer( appStudy );
+  GEOM_Displayer displayer;
   SALOME_View* window = displayer.GetActiveView();
   if ( !window ) return;
 
@@ -349,7 +349,7 @@ void GEOMToolsGUI::OnChangeTransparency( bool increase )
   aSelMgr->selectedObjects( selected );
   if ( selected.IsEmpty() ) return;
 
-  GEOM_Displayer displayer( appStudy );
+  GEOM_Displayer displayer;
   SALOME_View* window = displayer.GetActiveView();
   if ( !window ) return;
 
@@ -394,7 +394,7 @@ void GEOMToolsGUI::OnNbIsos( ActionType actionType )
   aSelMgr->selectedObjects( selected );
   if ( selected.IsEmpty() ) return;
 
-  GEOM_Displayer displayer( appStudy );
+  GEOM_Displayer displayer;
   SALOME_View* window = displayer.GetActiveView();
   if ( !window ) return;
  
@@ -464,7 +464,7 @@ void GEOMToolsGUI::OnDeflection()
   aSelMgr->selectedObjects( selected );
   if ( selected.IsEmpty() ) return;
 
-  GEOM_Displayer displayer( appStudy );
+  GEOM_Displayer displayer;
   SALOME_View* window = displayer.GetActiveView();
   if ( !window ) return;
 
@@ -494,8 +494,7 @@ void GEOMToolsGUI::OnSelectOnly(int mode)
 {
   SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
   if ( app ) {
-    SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
-    GEOM_Displayer aDisp (appStudy);
+    GEOM_Displayer aDisp;
     aDisp.GlobalSelection(mode);
     getGeometryGUI()->setLocalSelectionMode(mode);
   }
@@ -668,7 +667,7 @@ void GEOMToolsGUI::OnEdgeWidth()
   aSelMgr->selectedObjects( selected );
   if ( selected.IsEmpty() ) return;
 
-  GEOM_Displayer displayer( appStudy );
+  GEOM_Displayer displayer;
 
   SALOME_View* window = displayer.GetActiveView();
   if ( !window ) return;
@@ -711,7 +710,7 @@ void GEOMToolsGUI::OnIsosWidth() {
   aSelMgr->selectedObjects( selected );
   if ( selected.IsEmpty() ) return;
 
-  GEOM_Displayer displayer( appStudy );
+  GEOM_Displayer displayer;
 
   SALOME_View* window = displayer.GetActiveView();
   if ( !window ) return;
@@ -753,7 +752,7 @@ void GEOMToolsGUI::OnBringToFront() {
   aSelMgr->selectedObjects( selected );
   if ( selected.IsEmpty() ) return;
 
-  GEOM_Displayer displayer( appStudy );
+  GEOM_Displayer displayer;
 
   SALOME_View* window = displayer.GetActiveView();
   if ( !window ) return;
@@ -779,7 +778,7 @@ void GEOMToolsGUI::OnClsBringToFront() {
   SalomeApp_Study* appStudy = dynamic_cast< SalomeApp_Study* >( app->activeStudy() );
   if ( !appStudy ) return;
 
-  GEOM_Displayer displayer( appStudy );
+  GEOM_Displayer displayer;
 
   SALOME_View* window = displayer.GetActiveView();
   if ( !window ) return;
@@ -818,7 +817,7 @@ void GEOMToolsGUI::OnSetMaterial( const QVariant& theParam )
 
   if ( selected.IsEmpty() ) return;
   
-  GEOM_Displayer displayer( study );
+  GEOM_Displayer displayer;
 
   SALOME_View* window = displayer.GetActiveView();
   if ( !window ) return;
index 24571515223be349ff3518812bfa0ca2fba314c1..62177da188ac250ff81541e18f70436d4b9078e5 100644 (file)
@@ -235,7 +235,7 @@ void GEOMToolsGUI_MarkerDlg::accept()
               }
             }
           }
-          GEOM_Displayer displayer( getStudy() );
+          GEOM_Displayer displayer;
           displayer.Redisplay( selected, true );
           selMgr->setSelectedObjects( selected );
         }
@@ -275,7 +275,7 @@ void GEOMToolsGUI_MarkerDlg::init()
   // ---
   
   GEOM::GEOM_Gen_var engine = GeometryGUI::GetGeomGen();
-  myOperation = engine->GetIInsertOperations( getStudy()->id() );
+  myOperation = engine->GetIInsertOperations();
   GEOM::ListOfLong_var ids = myOperation->GetAllTextures();
   for ( int i = 0; i < ids->length(); i++ )
     addTexture( ids[i] );
@@ -337,7 +337,7 @@ void GEOMToolsGUI_MarkerDlg::addTexture( int id, bool select ) const
   if ( id > 0 && myCustomTypeCombo->index( id ) == -1 ) {
     int tWidth, tHeight;
 
-    Handle(TColStd_HArray1OfByte) texture = GeometryGUI::getTexture(getStudy(), id, tWidth, tHeight);
+    Handle(TColStd_HArray1OfByte) texture = GeometryGUI::getTexture(id, tWidth, tHeight);
 
     if ( !texture.IsNull() && texture->Length() == tWidth*tHeight/8 ) {
       QImage image( tWidth, tHeight, QImage::Format_Mono );
index ec83532bcbae3bd2d4dadc7309d08e8a8fb8bc60..baedb674070511932c792209d60f542afc4400c7 100644 (file)
@@ -141,22 +141,22 @@ GEOMToolsGUI_PublishDlg::~GEOMToolsGUI_PublishDlg()
     if ( appStudy ) {
       _PTR(Study) aStudy = appStudy->studyDS();
       if ( aStudy ) {
-        GEOM_Displayer displayer ( appStudy );
-        QTreeWidgetItemIterator it( myTreeWidget );
-        while ( *it ) {
-          QString entry = myEntryToItem.key( *it );
-          _PTR(SObject) SO ( aStudy->FindObjectID( qPrintable( entry ) ) );
-          if ( SO ) {
-            GEOM::GEOM_Object_var aGeomObject = GEOM::GEOM_Object::_narrow( GeometryGUI::ClientSObjectToObject( SO ) );
-            if ( CORBA::is_nil( aGeomObject ) ) continue;
-            if ( displayer.IsDisplayed( aGeomObject->GetStudyEntry() ) ) {
-              Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject( aGeomObject->GetStudyEntry(), "GEOM", "" );
-              displayer.Erase( io );
-            }
-          }
-          ++it;
-        }
-        displayer.UpdateViewer();
+        GEOM_Displayer displayer;
+           QTreeWidgetItemIterator it( myTreeWidget );
+           while ( *it ) {
+             QString entry = myEntryToItem.key( *it );
+             _PTR(SObject) SO ( aStudy->FindObjectID( qPrintable( entry ) ) );
+             if ( SO ) {
+               GEOM::GEOM_Object_var aGeomObject = GEOM::GEOM_Object::_narrow( GeometryGUI::ClientSObjectToObject( SO ) );
+               if ( CORBA::is_nil( aGeomObject ) ) continue;
+               if ( displayer.IsDisplayed( aGeomObject->GetStudyEntry() ) ) {
+                 Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject( aGeomObject->GetStudyEntry(), "GEOM", "" );
+                 displayer.Erase( io );
+               }
+             }
+             ++it;
+           }
+           displayer.UpdateViewer();
       }
     }
   }
@@ -185,15 +185,7 @@ void GEOMToolsGUI_PublishDlg::initData() {
   if(!myGeomRoot)
     return;
 
-  SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
-  if(!appStudy ) 
-    return;
-
-  _PTR(Study) aStudy = appStudy->studyDS();
-  if(!aStudy)
-    return;
-
-  buildTree(aStudy, myGeomRoot);
+  buildTree(myGeomRoot);
 
   myTreeWidget->resizeColumnToContents(0);
   myTreeWidget->resizeColumnToContents(1);
@@ -231,7 +223,7 @@ QTreeWidgetItem* GEOMToolsGUI_PublishDlg::createItem(QTreeWidgetItem* theParent,
 // function : findParentItem()
 // purpose  :
 //=================================================================================
-QTreeWidgetItem* GEOMToolsGUI_PublishDlg::findParentItem(_PTR(Study) theStudy, SalomeApp_DataObject* theObject, BufferedList& theList ) {
+QTreeWidgetItem* GEOMToolsGUI_PublishDlg::findParentItem(SalomeApp_DataObject* theObject, BufferedList& theList ) {
   
   QTreeWidgetItem* aResult = NULL;
   SalomeApp_DataObject* aParrent = dynamic_cast<SalomeApp_DataObject*>(theObject->parent());
@@ -240,14 +232,14 @@ QTreeWidgetItem* GEOMToolsGUI_PublishDlg::findParentItem(_PTR(Study) theStudy, S
     if( !(aResult = myEntryToItem.value(targetEntry)) ) {
       if( aParrent != myGeomRoot ) {
         QString aName;
-        _PTR(SObject) aSO ( theStudy->FindObjectID(qPrintable(aParrent->entry())));
+        _PTR(SObject) aSO ( SalomeApp_Application::getStudy()->FindObjectID(qPrintable(aParrent->entry())));
         _PTR(GenericAttribute) anAttr;
         if ( aSO->FindAttribute(anAttr, "AttributeName") ) {
           _PTR(AttributeName) anAttrName (anAttr);
           aName = anAttrName->Value().c_str();
         }
         theList.push_front(qMakePair(targetEntry, aName));
-        aResult = findParentItem(theStudy,aParrent,theList);
+        aResult = findParentItem(aParrent,theList);
       } else {
         //Publish List
         for(int i = 0; i < theList.size(); i++ ) {
@@ -270,7 +262,7 @@ QTreeWidgetItem* GEOMToolsGUI_PublishDlg::findParentItem(_PTR(Study) theStudy, S
 // function : buildTree()
 // purpose  :
 //=================================================================================
-void GEOMToolsGUI_PublishDlg::buildTree(_PTR(Study) theStudy, SalomeApp_DataObject* theItem) {
+void GEOMToolsGUI_PublishDlg::buildTree(SalomeApp_DataObject* theItem) {
   if(!theItem || theItem->isReference())
     return;
   
@@ -278,7 +270,7 @@ void GEOMToolsGUI_PublishDlg::buildTree(_PTR(Study) theStudy, SalomeApp_DataObje
 
     //If object hasn't "AttributeDrawable" => it visible
     bool isDrawable = true;
-    _PTR(SObject) SO ( theStudy->FindObjectID(qPrintable(theItem->entry())));
+    _PTR(SObject) SO ( SalomeApp_Application::getStudy()->FindObjectID(qPrintable(theItem->entry())));
     _PTR(GenericAttribute) anAttr;
     if ( SO && SO->FindAttribute(anAttr, "AttributeDrawable") ) {
       _PTR(AttributeDrawable) aDrw (anAttr);
@@ -292,7 +284,7 @@ void GEOMToolsGUI_PublishDlg::buildTree(_PTR(Study) theStudy, SalomeApp_DataObje
         aName = aAttrName->Value().c_str();
       }
       BufferedList aList;
-      QTreeWidgetItem* parentItem = findParentItem(theStudy, theItem, aList);
+      QTreeWidgetItem* parentItem = findParentItem(theItem, aList);
       createItem(parentItem,qMakePair(theItem->entry(),aName),true);
     }
   }
@@ -300,7 +292,7 @@ void GEOMToolsGUI_PublishDlg::buildTree(_PTR(Study) theStudy, SalomeApp_DataObje
   DataObjectList listObj = theItem->children( false );
   DataObjectList::iterator itr = listObj.begin();
   while( itr != listObj.end()) {
-    buildTree(theStudy, dynamic_cast<SalomeApp_DataObject*>(*itr));
+    buildTree(dynamic_cast<SalomeApp_DataObject*>(*itr));
     itr++;
   }
 }
@@ -458,7 +450,7 @@ void GEOMToolsGUI_PublishDlg::onItemClicked(QTreeWidgetItem* theItem, int theCol
     if ( !SO ) return;
     GEOM::GEOM_Object_var aGeomObject = GEOM::GEOM_Object::_narrow( GeometryGUI::ClientSObjectToObject( SO ) );
     if ( CORBA::is_nil( aGeomObject ) ) return;
-    GEOM_Displayer displayer ( appStudy );
+    GEOM_Displayer displayer;
     SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
     Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject( aGeomObject->GetStudyEntry(), "GEOM", "" );
     if ( displayer.IsDisplayed( aGeomObject->GetStudyEntry() ) ) {
index e36392bbfe80d0e6fef38e8e456ce7424e67f3a9..6b68eb01f7ee894b81ee323d982f58587f29bc2e 100644 (file)
@@ -59,8 +59,8 @@ public:
 
 protected:
   void               initData();
-  void               buildTree(_PTR(Study) theStudy, SalomeApp_DataObject* theItem);
-  QTreeWidgetItem*   findParentItem(_PTR(Study) theStudy, SalomeApp_DataObject* theItem, BufferedList& theList);
+  void               buildTree(SalomeApp_DataObject* theItem);
+  QTreeWidgetItem*   findParentItem(SalomeApp_DataObject* theItem, BufferedList& theList);
   QTreeWidgetItem*   createItem(QTreeWidgetItem* theItem, Pair theAttributes, bool isCheckable);
   void               getDrawableList(QTreeWidgetItem* theItem, QList<QTreeWidgetItem*>& theList);
   void               getTails(QTreeWidgetItem* theItem, QList<QTreeWidgetItem*>& theList);
index d5b11a3fc18728322e33a51d65caea203d236362..9ef66592a70801a173b45fe14f556d7c4d937a66 100644 (file)
@@ -42,8 +42,7 @@
 #include <QMessageBox>
 
 GEOMToolsGUI_ReduceStudyDlg::GEOMToolsGUI_ReduceStudyDlg( QWidget* parent )
-:QDialog( parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint ),
-myDisplayer(NULL)
+:QDialog( parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint )
 {
   SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
   myVisible = QIcon( resMgr->loadPixmap( "SUIT", tr( "ICON_DATAOBJ_VISIBLE" ) ) );
@@ -51,9 +50,8 @@ myDisplayer(NULL)
 
   myApp = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
   if ( !myApp ) return;
-  SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( myApp->activeStudy() );
-  myStudy = dynamic_cast<SalomeApp_Study*>( myApp->activeStudy() )->studyDS();
-  myDisplayer = GEOM_Displayer( study );
+
+  myDisplayer = GEOM_Displayer();
 
   setWindowTitle( tr( "GEOM_REDUCE_STUDY_TITLE" ) );
   setAttribute(Qt::WA_DeleteOnClose);
@@ -164,9 +162,8 @@ void GEOMToolsGUI_ReduceStudyDlg::init( const std::set<std::string>& theObjectEn
   GEOM::string_array_var subObjects = new GEOM::string_array();
   GEOM::string_array_var otherObjects = new GEOM::string_array();
 
-  GeometryGUI::GetGeomGen()->GetEntriesToReduceStudy( GeometryGUI::ClientStudyToStudy( myStudy ),
-                                                             keptObjects, parentsObjects,
-                                                             subObjects, otherObjects );
+  GeometryGUI::GetGeomGen()->GetEntriesToReduceStudy( keptObjects, parentsObjects,
+                                                             subObjects, otherObjects );
 
   for ( int i = 0; i < keptObjects->length(); i++ )
     myKeptObjects.insert( keptObjects[i].in() );
@@ -269,7 +266,7 @@ void GEOMToolsGUI_ReduceStudyDlg::addObjectsToTree( QTreeWidget* theWidget, std:
   std::set<std::string>::iterator it;
   for( it = theObjects.begin(); it != theObjects.end(); ++it ) {
     std::string objectEntry = *it;
-    GEOM::GEOM_BaseObject_var GeomBaseObject = GeometryGUI::GetGeomGen()->GetObject( myStudy->StudyId(), objectEntry.c_str() );
+    GEOM::GEOM_BaseObject_var GeomBaseObject = GeometryGUI::GetGeomGen()->GetObject( objectEntry.c_str() );
     GEOM::GEOM_Object_var GeomObject = GEOM::GEOM_Object::_narrow( GeomBaseObject );
     QString studyEntry = GeomBaseObject->GetStudyEntry();
     if( GeomObject->_is_nil() || studyEntry.isEmpty() || !isObjectDrawable( studyEntry.toStdString() ) )
@@ -372,10 +369,11 @@ void GEOMToolsGUI_ReduceStudyDlg::checkVisibleIcon( QTreeWidget* theWidget )
 //=================================================================================
 bool GEOMToolsGUI_ReduceStudyDlg::isObjectDrawable( std::string theStudyEntry )
 {
-  _PTR(StudyBuilder) aStudyBuilder = myStudy->NewBuilder();
+  _PTR(Study) aStudy = SalomeApp_Application::getStudy();
+  _PTR(StudyBuilder) aStudyBuilder = aStudy->NewBuilder();
   //If object hasn't "AttributeDrawable" => it visible
   bool isDrawable = true;
-  _PTR(SObject) SO ( myStudy->FindObjectID( theStudyEntry ) );
+  _PTR(SObject) SO ( aStudy->FindObjectID( theStudyEntry ) );
   _PTR(GenericAttribute) anAttr;
   if ( SO && SO->FindAttribute( anAttr, "AttributeDrawable" ) ) {
     _PTR(AttributeDrawable) aDrw (anAttr);
@@ -390,23 +388,23 @@ bool GEOMToolsGUI_ReduceStudyDlg::isObjectDrawable( std::string theStudyEntry )
 //=================================================================================
 void GEOMToolsGUI_ReduceStudyDlg::unpublishObjects( std::set<std::string>& theObjects )
 {
-  _PTR(StudyBuilder) aStudyBuilder = myStudy->NewBuilder();
+  _PTR(Study) aStudy = SalomeApp_Application::getStudy();
+  _PTR(StudyBuilder) aStudyBuilder = aStudy->NewBuilder();
   std::set<std::string>::iterator it;
   for( it = theObjects.begin(); it != theObjects.end(); ++it ) {
     std::string objectEntry = *it;
-    GEOM::GEOM_BaseObject_var GeomBaseObject = GeometryGUI::GetGeomGen()->GetObject( myStudy->StudyId(),
-                                                                                     objectEntry.c_str() );
+    GEOM::GEOM_BaseObject_var GeomBaseObject = GeometryGUI::GetGeomGen()->GetObject( objectEntry.c_str() );
     std::string studyEntry = GeomBaseObject->GetStudyEntry();
     if ( studyEntry == "" || !isObjectDrawable( studyEntry ) )
       continue;
-    _PTR(SObject) obj ( myStudy->FindObjectID( studyEntry.c_str() ) );
+    _PTR(SObject) obj ( aStudy->FindObjectID( studyEntry.c_str() ) );
     _PTR(GenericAttribute) anAttr;
     if ( obj ) {
       _PTR(AttributeDrawable) aDrw = aStudyBuilder->FindOrCreateAttribute( obj, "AttributeDrawable" );
       aDrw->SetDrawable( false );
       myDisplayer.EraseWithChildren( new SALOME_InteractiveObject( studyEntry.c_str(), "GEOM", "TEMP_IO" ) );
       // hide references if any
-      std::vector< _PTR(SObject) > vso = myStudy->FindDependances(obj);
+      std::vector< _PTR(SObject) > vso = aStudy->FindDependances(obj);
       for ( int i = 0; i < vso.size(); i++ ) {
         _PTR(SObject) refObj = vso[i];
         aDrw = aStudyBuilder->FindOrCreateAttribute( refObj, "AttributeDrawable" );
@@ -427,8 +425,7 @@ void GEOMToolsGUI_ReduceStudyDlg::removeObjects( std::set<std::string>& theObjec
   std::set<std::string>::iterator it;
   for( it = theObjects.begin(); it != theObjects.end(); ++it ) {
     std::string objectEntry = *it;
-    GEOM::GEOM_BaseObject_var GeomBaseObject = GeometryGUI::GetGeomGen()->GetObject( myStudy->StudyId(),
-                                                                                     objectEntry.c_str() );
+    GEOM::GEOM_BaseObject_var GeomBaseObject = GeometryGUI::GetGeomGen()->GetObject( objectEntry.c_str() );
     std::string studyEntry = GeomBaseObject->GetStudyEntry();
     if ( studyEntry == "" )
       GeometryGUI::GetGeomGen()->RemoveObject( GeomBaseObject );
@@ -449,10 +446,11 @@ void GEOMToolsGUI_ReduceStudyDlg::removeObjects( std::set<std::string>& theObjec
 void GEOMToolsGUI_ReduceStudyDlg::removeObject( std::string& theStudyEntry )
 {
   SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( myApp->activeStudy() );
-  _PTR(StudyBuilder) aStudyBuilder = myStudy->NewBuilder();
-  _PTR(UseCaseBuilder) aUseCaseBuilder = myStudy->GetUseCaseBuilder();
+  _PTR(Study) aStudy = SalomeApp_Application::getStudy();
+  _PTR(StudyBuilder) aStudyBuilder = aStudy->NewBuilder();
+  _PTR(UseCaseBuilder) aUseCaseBuilder = aStudy->GetUseCaseBuilder();
 
-  _PTR(SObject) obj ( myStudy->FindObjectID( theStudyEntry.c_str() ) );
+  _PTR(SObject) obj ( aStudy->FindObjectID( theStudyEntry.c_str() ) );
   if ( obj ) {
     // remove visual properties of the object
     appStudy->removeObjectProperties(obj->GetID().c_str());
@@ -474,10 +472,11 @@ void GEOMToolsGUI_ReduceStudyDlg::removeEmptyFolders()
 {
   std::set<std::string> emptyFolders;
 
-  _PTR(SComponent) SC ( myStudy->FindComponent( "GEOM" ) );
+  _PTR(Study) aStudy = SalomeApp_Application::getStudy();
+  _PTR(SComponent) SC ( aStudy->FindComponent( "GEOM" ) );
   if ( !SC )
     return;
-  _PTR(ChildIterator) anIter ( myStudy->NewChildIterator( SC ) );
+  _PTR(ChildIterator) anIter ( aStudy->NewChildIterator( SC ) );
   anIter->InitEx( true );
   while( anIter->More() ) {
     _PTR(SObject) valSO ( anIter->Value() );
@@ -502,7 +501,7 @@ void GEOMToolsGUI_ReduceStudyDlg::removeEmptyFolders()
 //=================================================================================
 void GEOMToolsGUI_ReduceStudyDlg::getEmptyFolders( _PTR(SObject) theSO, std::set<std::string>& theFolders )
 {
-  _PTR(UseCaseBuilder) aUseCaseBuilder = myStudy->GetUseCaseBuilder();
+  _PTR(UseCaseBuilder) aUseCaseBuilder = SalomeApp_Application::getStudy()->GetUseCaseBuilder();
 
   bool isFolder = false;
   _PTR(GenericAttribute) anAttr;
index f27efa5a1c7f8568fdfc0c5840c3015b25d82cf1..a5a17ae0cdb2da89a4ae50c0d4a1321293e42844 100644 (file)
@@ -120,7 +120,6 @@ private:
 
   GEOM_Displayer                myDisplayer;
   SalomeApp_Application*        myApp;
-  _PTR(Study)                   myStudy;
 
 };
 
index 5dce2cc262fd2ac3ce5f440da1663eb70f1d547c..e6d2bb8372d69c2b091051477c8f2ad0568ac20a 100644 (file)
@@ -83,17 +83,6 @@ char* GEOM_BaseObject_i::GetEntry()
   return CORBA::string_dup(anEntstr);
 }
 
-//=============================================================================
-/*!
- *  GetStudyID
- */
-//=============================================================================
-
-CORBA::Long GEOM_BaseObject_i::GetStudyID()
-{
-   return _impl->GetDocID();
-}
-
 //=============================================================================
 /*!
  *  GetType
@@ -184,7 +173,7 @@ GEOM::ListOfGBO* GEOM_BaseObject_i::GetDependency()
     Handle(::GEOM_BaseObject) anObj = Handle(::GEOM_BaseObject)::DownCast(aSeq->Value(i));
     if (anObj.IsNull()) continue;
     TDF_Tool::Entry(anObj->GetEntry(), anEntry);
-    GEOM::GEOM_BaseObject_var obj = _engine->GetObject(anObj->GetDocID(), (char*) anEntry.ToCString());
+    GEOM::GEOM_BaseObject_var obj = _engine->GetObject((char*) anEntry.ToCString());
     aList[i-1] = obj;
   }
 
@@ -213,8 +202,7 @@ GEOM::ListOfGBO* GEOM_BaseObject_i::GetLastDependency()
   for (int i = 1; i<=aLength; i++) {
      Handle(::GEOM_BaseObject) anObj = Handle(::GEOM_BaseObject)::DownCast(aSeq->Value(i));
      if (anObj.IsNull()) continue;
-     GEOM::GEOM_BaseObject_var obj = _engine->GetObject(anObj->GetDocID(),
-                                                        anObj->GetEntryString().ToCString());
+     GEOM::GEOM_BaseObject_var obj = _engine->GetObject(anObj->GetEntryString().ToCString());
      aList[i-1] = GEOM::GEOM_BaseObject::_duplicate( obj );
   }
 
index f3875eb0c8693d1a5c398ab7504c55cac8914d62..a396e8b3bed5e69f9367d05103062822acdb32aa 100644 (file)
@@ -42,8 +42,6 @@ class GEOM_I_EXPORT GEOM_BaseObject_i : public virtual POA_GEOM::GEOM_BaseObject
 
   virtual char* GetEntry();
 
-  virtual CORBA::Long GetStudyID();
-
   virtual CORBA::Long GetType();
 
   virtual CORBA::Long GetTick();
index 72c6b7000b66f37b22d76e7be4095c9b84cd6853..1006b30b509f11efac76816658b5ee294ec38091 100644 (file)
@@ -83,12 +83,11 @@ void ConvertV6toV7( TCollection_AsciiString& theScript )
 //purpose  : 
 //=======================================================================
 
-Engines::TMPFile* GEOM_Gen_i::DumpPython(CORBA::Object_ptr theStudy, 
-                                        CORBA::Boolean isPublished, 
-                                        CORBA::Boolean isMultiFile,
+Engines::TMPFile* GEOM_Gen_i::DumpPython(CORBA::Boolean isPublished,
+                                         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);   
 
@@ -151,7 +150,7 @@ Engines::TMPFile* GEOM_Gen_i::DumpPython(CORBA::Object_ptr theStudy,
   }
   
   TCollection_AsciiString aScript;
-  aScript += _impl->DumpPython(aStudy->StudyId(), objectDataVec, aVariableMap, isPublished, isMultiFile, isValidScript);
+  aScript += _impl->DumpPython(objectDataVec, aVariableMap, isPublished, isMultiFile, isValidScript);
 
   if (isPublished)
   {
index 48a7858c34d7239370f7a2dc636d1aad87dbc731..0d1aa810d84402085ba14b947115dc2128e26725 100644 (file)
@@ -69,8 +69,7 @@ GEOM::GEOM_Object_ptr GEOM_Field_i::GetShape()
   Handle(::GEOM_Object) shape = _impl->GetShape();
   if ( !shape.IsNull() )
   {
-    GEOM::GEOM_BaseObject_var obj = _engine->GetObject( shape->GetDocID(),
-                                                        shape->GetEntryString().ToCString());
+    GEOM::GEOM_BaseObject_var obj = _engine->GetObject( shape->GetEntryString().ToCString());
     shapeVar = GEOM::GEOM_Object::_narrow( obj );
   }
   return shapeVar._retn();
@@ -138,8 +137,7 @@ GEOM::GEOM_FieldStep_ptr GEOM_Field_i::AddStep(::CORBA::Long stepID, ::CORBA::Lo
   Handle(::GEOM_FieldStep) step = _impl->AddStep( stepID, stamp );
   if ( !step.IsNull() )
   {
-    GEOM::GEOM_BaseObject_var obj = _engine->GetObject( step->GetDocID(),
-                                                        step->GetEntryString().ToCString());
+    GEOM::GEOM_BaseObject_var obj = _engine->GetObject( step->GetEntryString().ToCString());
     stepVar = GEOM::GEOM_FieldStep::_narrow( obj );
   }
   return stepVar._retn();
@@ -201,8 +199,7 @@ GEOM::GEOM_FieldStep_ptr GEOM_Field_i::GetStep(CORBA::Long stepID)
   Handle(::GEOM_FieldStep) step = _impl->GetStep(stepID);
   if ( !step.IsNull() )
   {
-    GEOM::GEOM_BaseObject_var obj = _engine->GetObject( step->GetDocID(),
-                                                        step->GetEntryString().ToCString());
+    GEOM::GEOM_BaseObject_var obj = _engine->GetObject( step->GetEntryString().ToCString());
     stepVar = GEOM::GEOM_FieldStep::_narrow( obj );
   }
   return stepVar._retn();
@@ -291,8 +288,7 @@ GEOM::GEOM_Field_ptr GEOM_FieldStep_i::GetField()
   Handle(::GEOM_Field) field = _impl->GetField();
   if ( !field.IsNull() )
   {
-    GEOM::GEOM_BaseObject_var obj = _engine->GetObject( field->GetDocID(),
-                                                        field->GetEntryString().ToCString());
+    GEOM::GEOM_BaseObject_var obj = _engine->GetObject( field->GetEntryString().ToCString());
     fieldVar = GEOM::GEOM_Field::_narrow( obj );
   }
   return fieldVar._retn();
index fc6cee5c4398886e6ed1dd76b387a26ce36ca0ee..b94e8619eac09ed5b19af20c1e51b9dc1cc132b4 100644 (file)
@@ -66,6 +66,7 @@
 #include <SALOMEDS_Tool.hxx>
 #include <SALOMEDS_wrap.hxx>
 #include <Basics_DirUtils.hxx>
+#include <Basics_Utils.hxx>
 
 #include <set>
 #include <sstream>
@@ -176,15 +177,13 @@ char* GEOM_Gen_i::LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject,
                                          CORBA::Boolean isMultiFile,
                                          CORBA::Boolean isASCII)
 {
-  SALOMEDS::Study_var aStudy = theSObject->GetStudy();
-
   Handle(::GEOM_BaseObject) anObject =
-    _impl->GetObject(aStudy->StudyId(), aLocalPersistentID);
+    _impl->GetObject(aLocalPersistentID);
   if ( !anObject.IsNull() )
   {
     TCollection_AsciiString anEntry;
     TDF_Tool::Entry(anObject->GetEntry(), anEntry);
-    GEOM::GEOM_BaseObject_var obj = GetObject(anObject->GetDocID(), anEntry.ToCString());
+    GEOM::GEOM_BaseObject_var obj = GetObject(anEntry.ToCString());
 
     CORBA::String_var aPersRefString = _orb->object_to_string(obj);
     return CORBA::string_dup(aPersRefString);
@@ -210,24 +209,24 @@ bool GEOM_Gen_i::CanPublishInStudy(CORBA::Object_ptr theIOR)
 // function : PublishInStudy
 // purpose  :
 //============================================================================
-SALOMEDS::SObject_ptr GEOM_Gen_i::PublishInStudy(SALOMEDS::Study_ptr   theStudy,
-                                                 SALOMEDS::SObject_ptr theSObject,
+SALOMEDS::SObject_ptr GEOM_Gen_i::PublishInStudy(SALOMEDS::SObject_ptr theSObject,
                                                  CORBA::Object_ptr     theObject,
                                                  const char*           theName)
   throw (SALOME::SALOME_Exception)
 {
   Unexpect aCatch(SALOME_SalomeException);
   SALOMEDS::SObject_var aResultSO;
-  if(CORBA::is_nil(theObject) || theStudy->_is_nil()) return aResultSO;
+  SALOMEDS::Study_var aStudy = getStudyServant();
+  if(CORBA::is_nil(theObject) || aStudy->_is_nil()) return aResultSO;
   GEOM::GEOM_BaseObject_var aBaseObj = GEOM::GEOM_BaseObject::_narrow(theObject);
   GEOM::GEOM_Object_var       aShape = GEOM::GEOM_Object::_narrow(theObject);
   if(aBaseObj->_is_nil()) return aResultSO;
 
   SALOMEDS::GenericAttribute_var anAttr;
-  SALOMEDS::StudyBuilder_var     aStudyBuilder = theStudy->NewBuilder();
-  SALOMEDS::UseCaseBuilder_wrap  useCaseBuilder = theStudy->GetUseCaseBuilder();
+  SALOMEDS::StudyBuilder_var     aStudyBuilder = aStudy->NewBuilder();
+  SALOMEDS::UseCaseBuilder_wrap  useCaseBuilder = aStudy->GetUseCaseBuilder();
 
-  SALOMEDS::SComponent_var       aFather = theStudy->FindComponent("GEOM");
+  SALOMEDS::SComponent_var       aFather = aStudy->FindComponent("GEOM");
   if (aFather->_is_nil()) {
     aFather = aStudyBuilder->NewComponent("GEOM");
     anAttr = aStudyBuilder->FindOrCreateAttribute(aFather, "AttributeName");
@@ -265,7 +264,7 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PublishInStudy(SALOMEDS::Study_ptr   theStudy,
     // receive current TopoDS shape
     CORBA::String_var entry = aShape->GetEntry();
     Handle(::GEOM_Object) aGShape = Handle(::GEOM_Object)::DownCast
-      ( _impl->GetObject( aShape->GetStudyID(), entry ));
+      ( _impl->GetObject( entry ));
     TopoDS_Shape TopoSh = aGShape->GetValue();
     // find label of main shape
     GEOM::GEOM_Object_var aMainSh = aShape;
@@ -273,7 +272,7 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PublishInStudy(SALOMEDS::Study_ptr   theStudy,
       aMainSh = aMainSh->GetMainShape();
     }
     entry = aMainSh->GetEntry();
-    Handle(::GEOM_BaseObject) anObj = _impl->GetObject( aMainSh->GetStudyID(), entry );
+    Handle(::GEOM_BaseObject) anObj = _impl->GetObject( entry );
     TDF_Label aMainLbl = anObj->GetFunction(1)->GetNamingEntry();
 
     // check all named shapes using iterator
@@ -295,7 +294,7 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PublishInStudy(SALOMEDS::Study_ptr   theStudy,
   // END: try to find existed name for current shape
 
   if ( mytype == GEOM_GROUP ) {
-    GEOM::GEOM_IGroupOperations_var anOp = GetIGroupOperations( theStudy->StudyId() );
+    GEOM::GEOM_IGroupOperations_var anOp = GetIGroupOperations();
     switch ( (TopAbs_ShapeEnum)anOp->GetType( aShape )) {
     case TopAbs_VERTEX:
       aResultSO->SetAttrString("AttributePixMap","ICON_OBJBROWSER_GROUP_PNT" );
@@ -405,7 +404,7 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PublishInStudy(SALOMEDS::Study_ptr   theStudy,
       SALOMEDS::SObject_var obj;
       do {
         anObjectName = aNamePrefix + TCollection_AsciiString(++i);
-        obj = theStudy->FindObject( anObjectName.ToCString() );
+        obj = aStudy->FindObject( anObjectName.ToCString() );
       }
       while ( !obj->_is_nil() );
     }
@@ -424,11 +423,11 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PublishInStudy(SALOMEDS::Study_ptr   theStudy,
   //Set NoteBook variables used in the object creation
   TCollection_AsciiString aVars;
   CORBA::String_var aString=aBaseObj->GetParameters();
-  SALOMEDS::ListOfListOfStrings_var aSections = theStudy->ParseVariables(aString);
+  SALOMEDS::ListOfListOfStrings_var aSections = aStudy->ParseVariables(aString);
   for(int i = 0, n = aSections->length(); i < n; i++) {
     SALOMEDS::ListOfStrings aListOfVars = aSections[i];
     for(int j = 0, m = aListOfVars.length(); j < m; j++) {
-      if(theStudy->IsVariable(aListOfVars[j].in()))
+      if(aStudy->IsVariable(aListOfVars[j].in()))
         aVars += aListOfVars[j].in();
       if(j != m-1)
         aVars += ":";
@@ -454,8 +453,7 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PublishInStudy(SALOMEDS::Study_ptr   theStudy,
 // function : CreateAndPublishGroup
 // purpose  : auxiliary for PublishNamedShapesInStudy
 //============================================================================
-void GEOM_Gen_i::CreateAndPublishGroup(SALOMEDS::Study_ptr theStudy,
-                                       GEOM::GEOM_Object_var theMainShape,
+void GEOM_Gen_i::CreateAndPublishGroup(GEOM::GEOM_Object_var theMainShape,
                                        const TopTools_IndexedMapOfShape& anIndices,
                                        const TopTools_SequenceOfShape& SeqS,
                                        const TColStd_SequenceOfAsciiString& SeqN,
@@ -463,15 +461,15 @@ void GEOM_Gen_i::CreateAndPublishGroup(SALOMEDS::Study_ptr theStudy,
                                        GEOM::ListOfGO_var aResList)
 {
   CORBA::String_var entry = theMainShape->GetEntry();
-  //Handle(::GEOM_Object) aMainShape = _impl->GetObject(theMainShape->GetStudyID(), entry);
+  //Handle(::GEOM_Object) aMainShape = _impl->GetObject(entry);
   Handle(TColStd_HArray1OfInteger) anArray;
   if(SeqS.Length()>0) {
     // create a group
-    GEOM::GEOM_IGroupOperations_var GOp = GetIGroupOperations(theStudy->StudyId());
+    GEOM::GEOM_IGroupOperations_var GOp = GetIGroupOperations();
     GEOM::GEOM_Object_wrap GrObj = GOp->CreateGroup( theMainShape, SeqS(1).ShapeType() );
-    AddInStudy(theStudy, GrObj, GrName, theMainShape._retn());
+    AddInStudy(GrObj, GrName, theMainShape._retn());
     //CORBA::String_var GrEntry = GrObj->GetEntry();
-    //Handle(::GEOM_Object) HGrObj = _impl->GetObject(GrObj->GetStudyID(), GrEntry);
+    //Handle(::GEOM_Object) HGrObj = _impl->GetObject(GrEntry);
     // add named objects
     //Handle(::GEOM_Object) anObj;
     for(int i=1; i<=SeqS.Length(); i++) {
@@ -480,7 +478,7 @@ void GEOM_Gen_i::CreateAndPublishGroup(SALOMEDS::Study_ptr theStudy,
       Standard_Integer anIndex = anIndices.FindIndex(aValue);
       //anArray->SetValue(1, anIndex);
       GOp->AddObject(GrObj,anIndex);
-      //anObj = GEOM_Engine::GetEngine()->AddObject(aMainShape->GetDocID(), GEOM_SUBSHAPE);
+      //anObj = GEOM_Engine::GetEngine()->AddObject(GEOM_SUBSHAPE);
       //if (anObj.IsNull()) continue;
       //Handle(::GEOM_Function) aFunction = anObj->AddFunction(GEOM_Object::GetSubShapeID(), 1);
       //if (aFunction.IsNull()) continue;
@@ -492,8 +490,8 @@ void GEOM_Gen_i::CreateAndPublishGroup(SALOMEDS::Study_ptr theStudy,
       //SALOMEDS::SObject_var aResultSO;
       //TCollection_AsciiString anEntry;
       //TDF_Tool::Entry(anObj->GetEntry(),anEntry);
-      //GEOM::GEOM_Object_var aGObj = GetObject(anObj->GetDocID(), anEntry.ToCString());
-      //AddInStudy(theStudy, aGObj._retn(), SeqN.Value(i).ToCString(), GrObj);
+      //GEOM::GEOM_Object_var aGObj = GetObject(anEntry.ToCString());
+      //AddInStudy(aGObj._retn(), SeqN.Value(i).ToCString(), GrObj);
     }
   }
 }
@@ -504,8 +502,7 @@ void GEOM_Gen_i::CreateAndPublishGroup(SALOMEDS::Study_ptr theStudy,
 // purpose  :
 //============================================================================
 GEOM::ListOfGO* GEOM_Gen_i::
-            PublishNamedShapesInStudy(SALOMEDS::Study_ptr theStudy,
-                                      //SALOMEDS::SObject_ptr theSObject,
+            PublishNamedShapesInStudy(//SALOMEDS::SObject_ptr theSObject,
                                       CORBA::Object_ptr theObject)
 {
   //Unexpect aCatch(SALOME_SalomeException);
@@ -517,7 +514,7 @@ GEOM::ListOfGO* GEOM_Gen_i::
 
   CORBA::String_var entry = theMainShape->GetEntry();
   Handle(::GEOM_Object) aMainShape = Handle(::GEOM_Object)::DownCast
-    ( _impl->GetObject( theMainShape->GetStudyID(), entry ));
+    ( _impl->GetObject( entry ));
   if (aMainShape.IsNull()) return aResList._retn();
   TopoDS_Shape MainSh = aMainShape->GetValue();
 
@@ -557,16 +554,16 @@ GEOM::ListOfGO* GEOM_Gen_i::
   TopTools_IndexedMapOfShape anIndices;
   TopExp::MapShapes(MainSh, anIndices);
 
-  CreateAndPublishGroup(theStudy, theMainShape, anIndices, SolidSeqS, SolidSeqN,
+  CreateAndPublishGroup(theMainShape, anIndices, SolidSeqS, SolidSeqN,
                         "Group_Of_Named_Solids", aResList);
 
-  CreateAndPublishGroup(theStudy, theMainShape, anIndices, FaceSeqS, FaceSeqN,
+  CreateAndPublishGroup(theMainShape, anIndices, FaceSeqS, FaceSeqN,
                         "Group_Of_Named_Faces", aResList);
 
-  CreateAndPublishGroup(theStudy, theMainShape, anIndices, EdgeSeqS, EdgeSeqN,
+  CreateAndPublishGroup(theMainShape, anIndices, EdgeSeqS, EdgeSeqN,
                         "Group_Of_Named_Edges", aResList);
 
-  CreateAndPublishGroup(theStudy, theMainShape, anIndices, VertSeqS, VertSeqN,
+  CreateAndPublishGroup(theMainShape, anIndices, VertSeqS, VertSeqN,
                         "Group_Of_Named_Vertices", aResList);
 
   return aResList._retn();
@@ -595,23 +592,23 @@ SALOMEDS::TMPFile* GEOM_Gen_i::Save(SALOMEDS::SComponent_ptr theComponent,
   }
 
   // Create a list to store names of created files
-  SALOMEDS::ListOfFileNames_var aSeq = new SALOMEDS::ListOfFileNames;
-  aSeq->length(1);
+  SALOMEDS_Tool::ListOfFiles aSeq;
+  aSeq.reserve(1);
   // Prepare a file name to open
   TCollection_AsciiString aNameWithExt("");
-  if (isMultiFile)
-    aNameWithExt = TCollection_AsciiString((char*)(SALOMEDS_Tool::GetNameFromPath
-                                                   (theComponent->GetStudy()->URL())).c_str());
+  if (isMultiFile) 
+    aNameWithExt = TCollection_AsciiString((char*)(SALOMEDS_Tool::GetNameFromPath(
+                         Kernel_Utils::encode(getStudyServant()->URL())).c_str()));
   aNameWithExt += TCollection_AsciiString("_GEOM.cbf");
-  aSeq[0] = CORBA::string_dup(aNameWithExt.ToCString());
+  aSeq.push_back(CORBA::string_dup(aNameWithExt.ToCString()));
   // Build a full file name of temporary file
   TCollection_AsciiString aFullName = TCollection_AsciiString((char*)aTmpDir.c_str()) + aNameWithExt;
   // Save GEOM component in this file
-  _impl->Save(theComponent->GetStudy()->StudyId(),(char*) aFullName.ToCString());
+  _impl->Save((char*) aFullName.ToCString());
   // Conver a file to the byte stream
-  aStreamFile = SALOMEDS_Tool::PutFilesToStream(aTmpDir.c_str(), aSeq.in(), isMultiFile);
+  aStreamFile = SALOMEDS_Tool::PutFilesToStream(aTmpDir.c_str(), aSeq, isMultiFile);
   // Remove the created file and tmp directory
-  if (!isMultiFile) SALOMEDS_Tool::RemoveTemporaryFiles(aTmpDir.c_str(), aSeq.in(), true);
+  if (!isMultiFile) SALOMEDS_Tool::RemoveTemporaryFiles(aTmpDir.c_str(), aSeq, true);
 
   // Return the created byte stream
   return aStreamFile._retn();
@@ -658,16 +655,16 @@ CORBA::Boolean GEOM_Gen_i::Load(SALOMEDS::SComponent_ptr theComponent,
   }
 
   // Conver the byte stream theStream to a file and place it in tmp directory
-  SALOMEDS::ListOfFileNames_var aSeq =
+  SALOMEDS_Tool::ListOfFiles aSeq =
     SALOMEDS_Tool::PutStreamToFiles(theStream, aTmpDir.c_str(), isMultiFile);
 
   // Prepare a file name to open
   TCollection_AsciiString aNameWithExt("");
-  SALOMEDS::Study_var study = theComponent->GetStudy();
+  SALOMEDS::Study_var study = getStudyServant();
 
   // Get the file name.
   int         i;
-  int         aLength  = aSeq->length();
+  int         aLength  = aSeq.size();
   const char *aGeomSgd = "_GEOM.sgd";
   const char *aGeomcbf = "_GEOM.cbf";
 
@@ -684,10 +681,10 @@ CORBA::Boolean GEOM_Gen_i::Load(SALOMEDS::SComponent_ptr theComponent,
   TCollection_AsciiString aFullName = (TCollection_AsciiString((char*)aTmpDir.c_str()) + aNameWithExt);
 
   // Open document
-  if (!_impl->Load(study->StudyId(),(char*) aFullName.ToCString())) return false;
+  if (!_impl->Load((char*) aFullName.ToCString())) return false;
 
   // Remove the created file and tmp directory
-  if (!isMultiFile) SALOMEDS_Tool::RemoveTemporaryFiles(aTmpDir.c_str(), aSeq.in(), true);
+  if (!isMultiFile) SALOMEDS_Tool::RemoveTemporaryFiles(aTmpDir.c_str(), aSeq, true);
 
   // creation of tree nodes for all data objects in the study
   // to support tree representation customization and drag-n-drop:
@@ -726,8 +723,7 @@ CORBA::Boolean GEOM_Gen_i::LoadASCII(SALOMEDS::SComponent_ptr theComponent,
 //============================================================================
 void GEOM_Gen_i::Close(SALOMEDS::SComponent_ptr theComponent)
 {
-  SALOMEDS::Study_var aStudy= theComponent->GetStudy();
-  _impl->Close(aStudy->StudyId());
+  _impl->Close();
 }
 
 //============================================================================
@@ -794,7 +790,7 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PasteInto(const SALOMEDS::TMPFile& theStream,
                                             CORBA::Long theObjectID,
                                             SALOMEDS::SObject_ptr theObject) {
   // Find the current Study and StudyBuilder
-  SALOMEDS::Study_var aStudy = theObject->GetStudy();
+  SALOMEDS::Study_var aStudy = getStudyServant();
   SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
   SALOMEDS::UseCaseBuilder_var anUseCaseBuilder = aStudy->GetUseCaseBuilder();
   SALOMEDS::SObject_var aNewSO;
@@ -815,13 +811,13 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PasteInto(const SALOMEDS::TMPFile& theStream,
 
 
   //Create a new GEOM_Object
-  Handle(::GEOM_Object) anObj = _impl->AddObject(aNewSO->GetStudy()->StudyId(), theObjectID);
+  Handle(::GEOM_Object) anObj = _impl->AddObject(theObjectID);
   Handle(::GEOM_Function) aFunction = anObj->AddFunction(GEOMImpl_CopyDriver::GetID(), COPY_WITHOUT_REF);
   aFunction->SetValue(aTopology);
 
   TCollection_AsciiString anEntry;
   TDF_Tool::Entry(anObj->GetEntry(), anEntry);
-  GEOM::GEOM_BaseObject_var obj = GetObject(anObj->GetDocID(), anEntry.ToCString());
+  GEOM::GEOM_BaseObject_var obj = GetObject(anEntry.ToCString());
 
   //Set the study entry of the published GEOM_Object
   obj->SetStudyEntry(aNewSO->GetID());
@@ -854,26 +850,26 @@ char* GEOM_Gen_i::ComponentDataType()
 // function : AddInStudy
 // purpose  :
 //============================================================================
-SALOMEDS::SObject_ptr GEOM_Gen_i::AddInStudy (SALOMEDS::Study_ptr       theStudy,
-                                              GEOM::GEOM_BaseObject_ptr theObject,
+SALOMEDS::SObject_ptr GEOM_Gen_i::AddInStudy (GEOM::GEOM_BaseObject_ptr theObject,
                                               const char*               theName,
                                               GEOM::GEOM_BaseObject_ptr theFather)
 {
   SALOMEDS::SObject_var aResultSO;
-  if(theObject->_is_nil() || theStudy->_is_nil()) return aResultSO;
+  SALOMEDS::Study_var aStudy = getStudyServant();
+  if(theObject->_is_nil() || aStudy->_is_nil()) return aResultSO;
 
-  SALOMEDS::StudyBuilder_var aStudyBuilder = theStudy->NewBuilder();
+  SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
   CORBA::String_var IOR;
 
   if(!theFather->_is_nil()) {
     IOR = _orb->object_to_string(theFather);
-    SALOMEDS::SObject_wrap aFatherSO = theStudy->FindObjectIOR(IOR.in());
+    SALOMEDS::SObject_wrap aFatherSO = aStudy->FindObjectIOR(IOR.in());
     if(aFatherSO->_is_nil()) return aResultSO._retn();
     aResultSO = aStudyBuilder->NewObject(aFatherSO);
     //aStudyBuilder->Addreference(aResultSO, aResultSO);
   }
 
-  aResultSO = PublishInStudy(theStudy, aResultSO, theObject, theName);
+  aResultSO = PublishInStudy(aResultSO, theObject, theName);
   if(aResultSO->_is_nil()) return aResultSO._retn();
 
   GEOM::ListOfGBO_var aList = theObject->GetDependency();
@@ -886,14 +882,14 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::AddInStudy (SALOMEDS::Study_ptr       theStudy
     GEOM::GEOM_BaseObject_var anObject = aList[i];
     if(anObject->_is_nil()) continue;
     IOR = _orb->object_to_string(anObject);
-    SALOMEDS::SObject_wrap aSO =  theStudy->FindObjectIOR(IOR.in());
+    SALOMEDS::SObject_wrap aSO =  aStudy->FindObjectIOR(IOR.in());
     if(aSO->_is_nil()) continue;
     CORBA::String_var anID = aSO->GetID();
     if ( aPrevID == anID.in() ) continue;
     aPrevID = anID.in();
     SALOMEDS::SObject_wrap aSubSO = aStudyBuilder->NewObject(aResultSO);
     aStudyBuilder->Addreference(aSubSO, aSO);
-    theStudy->GetUseCaseBuilder()->AppendTo( aResultSO, aSubSO );
+    aStudy->GetUseCaseBuilder()->AppendTo( aResultSO, aSubSO );
   }
 
   return aResultSO._retn();
@@ -904,26 +900,26 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::AddInStudy (SALOMEDS::Study_ptr       theStudy
 // purpose  : Publish sub-shapes, standing for arguments and sub-shapes of arguments.
 //            To be used from python scripts out of geompy.addToStudy (non-default usage)
 //============================================================================
-GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapesO (SALOMEDS::Study_ptr     theStudy,
-                                               GEOM::GEOM_Object_ptr   theObject,
+GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapesO (GEOM::GEOM_Object_ptr   theObject,
                                                const GEOM::ListOfGO&   theArgs,
                                                GEOM::find_shape_method theFindMethod,
                                                CORBA::Boolean          theInheritFirstArg,
                                                CORBA::Boolean          theAddPrefix)
 {
   GEOM::ListOfGO_var aParts = new GEOM::ListOfGO;
-  if (CORBA::is_nil(theStudy) || CORBA::is_nil(theObject))
+  SALOMEDS::Study_var aStudy = getStudyServant();
+  if (CORBA::is_nil(aStudy) || CORBA::is_nil(theObject))
     return aParts._retn();
 
   // find SObject in the study if it is already published
   CORBA::String_var anIORo = _orb->object_to_string(theObject);
-  SALOMEDS::SObject_var aSO = theStudy->FindObjectIOR(anIORo.in());
+  SALOMEDS::SObject_var aSO = aStudy->FindObjectIOR(anIORo.in());
   //PTv, IMP 0020001, The salome object <aSO>
   // is not obligatory in case of invocation from script
   // if (CORBA::is_nil(aSO))
   //  return aParts._retn();
 
-  aParts = RestoreSubShapes(theStudy, theObject, aSO, theArgs,
+  aParts = RestoreSubShapes(theObject, aSO, theArgs,
                             theFindMethod, theInheritFirstArg, theAddPrefix);
   if (!CORBA::is_nil(aSO)) aSO->UnRegister();
   return aParts._retn();
@@ -934,26 +930,25 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapesO (SALOMEDS::Study_ptr     theStudy,
 // purpose  : Publish sub-shapes, standing for arguments and sub-shapes of arguments.
 //            To be used from python scripts, generated by Dump Python.
 //============================================================================
-GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapesO (SALOMEDS::Study_ptr     theStudy,
-                                                    GEOM::GEOM_Object_ptr   theObject,
+GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapesO (GEOM::GEOM_Object_ptr   theObject,
                                                     const GEOM::ListOfGO&   theArgs,
                                                     GEOM::find_shape_method theFindMethod,
                                                     CORBA::Boolean          theInheritFirstArg,
                                                     CORBA::Boolean          theAddPrefix)
 {
   GEOM::ListOfGO_var aParts = new GEOM::ListOfGO;
-  if (CORBA::is_nil(theStudy) || CORBA::is_nil(theObject))
+  if (CORBA::is_nil(getStudyServant()) || CORBA::is_nil(theObject))
     return aParts._retn();
 
   // find SObject in the study if it is already published
   CORBA::String_var anIORo = _orb->object_to_string(theObject);
-  SALOMEDS::SObject_var aSO = theStudy->FindObjectIOR(anIORo.in());
+  SALOMEDS::SObject_var aSO = getStudyServant()->FindObjectIOR(anIORo.in());
   //PTv, IMP 0020001, The salome object <aSO>
   // is not obligatory in case of invocation from script
   // if (CORBA::is_nil(aSO))
   //  return aParts._retn();
 
-  aParts = RestoreGivenSubShapes(theStudy, theObject, aSO, theArgs,
+  aParts = RestoreGivenSubShapes(theObject, aSO, theArgs,
                                  theFindMethod, theInheritFirstArg, theAddPrefix);
   if (!CORBA::is_nil(aSO)) aSO->UnRegister();
   return aParts._retn();
@@ -964,15 +959,14 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapesO (SALOMEDS::Study_ptr     theS
 // purpose  : Publish sub-shapes, standing for arguments and sub-shapes of arguments.
 //            To be used from GUI and from geompy.addToStudy
 //============================================================================
-GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapesSO (SALOMEDS::Study_ptr     theStudy,
-                                                SALOMEDS::SObject_ptr   theSObject,
+GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapesSO (SALOMEDS::SObject_ptr   theSObject,
                                                 const GEOM::ListOfGO&   theArgs,
                                                 GEOM::find_shape_method theFindMethod,
                                                 CORBA::Boolean          theInheritFirstArg,
                                                 CORBA::Boolean          theAddPrefix)
 {
   GEOM::ListOfGO_var aParts = new GEOM::ListOfGO;
-  if (CORBA::is_nil(theStudy) || CORBA::is_nil(theSObject))
+  if (CORBA::is_nil(getStudyServant()) || CORBA::is_nil(theSObject))
     return aParts._retn();
 
   SALOMEDS::GenericAttribute_var anAttr;
@@ -987,7 +981,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapesSO (SALOMEDS::Study_ptr     theStudy
   if (CORBA::is_nil(anO))
     return aParts._retn();
 
-  aParts = RestoreSubShapes(theStudy, anO, theSObject, theArgs,
+  aParts = RestoreSubShapes(anO, theSObject, theArgs,
                             theFindMethod, theInheritFirstArg, theAddPrefix);
   return aParts._retn();
 }
@@ -1023,8 +1017,7 @@ static void addToListOfGO( const GEOM::ListOfGO& theSrcList,
 // purpose  : Private method. Works only if both theObject and theSObject
 //            are defined, and does not check, if they correspond to each other.
 //============================================================================
-GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapes(SALOMEDS::Study_ptr     theStudy,
-                                             GEOM::GEOM_Object_ptr   theObject,
+GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapes(GEOM::GEOM_Object_ptr   theObject,
                                              SALOMEDS::SObject_ptr   theSObject,
                                              const GEOM::ListOfGO&   theArgs,
                                              GEOM::find_shape_method theFindMethod,
@@ -1032,9 +1025,10 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapes(SALOMEDS::Study_ptr     theStudy,
                                              CORBA::Boolean          theAddPrefix)
 {
   GEOM::ListOfGO_var aParts = new GEOM::ListOfGO;
+  SALOMEDS::Study_var aStudy = getStudyServant();
   //PTv, IMP 0020001, The salome object <theSObject>
   //     is not obligatory in case of invocation from script
-  if (CORBA::is_nil(theStudy) || CORBA::is_nil(theObject) /*|| CORBA::is_nil(theSObject)*/)
+  if (CORBA::is_nil(aStudy) || CORBA::is_nil(theObject) /*|| CORBA::is_nil(theSObject)*/)
     return aParts._retn();
 
   // For Dump Python (mantis issue 0020768)
@@ -1073,12 +1067,12 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapes(SALOMEDS::Study_ptr     theStudy,
     // but only reconstruct its published sub-shapes
 
     CORBA::String_var anIOR = _orb->object_to_string(aList[0]);
-    SALOMEDS::SObject_var anArgSO = theStudy->FindObjectIOR(anIOR.in());
+    SALOMEDS::SObject_var anArgSO = aStudy->FindObjectIOR(anIOR.in());
 
     // remember restored objects for Python Dump
     addToListOfGO(aList[0], anOutArgs);
 
-    aParts = RestoreSubShapesOneLevel(theStudy, anArgSO, theSObject, theObject,
+    aParts = RestoreSubShapesOneLevel(anArgSO, theSObject, theObject,
                                       anOutArgs, theFindMethod, theAddPrefix);
 
     // set the color of the transformed shape to the color of initial shape
@@ -1089,27 +1083,27 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapes(SALOMEDS::Study_ptr     theStudy,
       if (aList[0]->GetMarkerType() == GEOM::MT_USER)
         theObject->SetMarkerTexture(aList[0]->GetMarkerTexture());
     }
-
-    anArgSO->UnRegister();
+    if (!CORBA::is_nil(anArgSO))
+      anArgSO->UnRegister();
   }
   else {
     // Get interface, containing method, which we will use to reconstruct sub-shapes
-    GEOM::GEOM_IShapesOperations_var  aShapesOp = GetIShapesOperations(theStudy->StudyId());
-    GEOM::GEOM_IGroupOperations_var    aGroupOp = GetIGroupOperations(theStudy->StudyId());
-    GEOM::GEOM_ITransformOperations_var aTrsfOp = GetITransformOperations(theStudy->StudyId());
+    GEOM::GEOM_IShapesOperations_var  aShapesOp = GetIShapesOperations();
+    GEOM::GEOM_IGroupOperations_var    aGroupOp = GetIGroupOperations();
+    GEOM::GEOM_ITransformOperations_var aTrsfOp = GetITransformOperations();
 
     PortableServer::Servant aServant = _poa->reference_to_servant(aTrsfOp.in());
     GEOM_ITransformOperations_i*      aTrsfOpSv = dynamic_cast<GEOM_ITransformOperations_i*>(aServant);
 
     // Reconstruct arguments and tree of sub-shapes of the arguments
     CORBA::String_var anIOR;
-    SALOMEDS::StudyBuilder_var aStudyBuilder = theStudy->NewBuilder();
+    SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
     for (Standard_Integer i = 0; i < aLength; i++)
     {
       GEOM::GEOM_Object_var anArgO = aList[i];
       if (!CORBA::is_nil(anArgO)) {
         anIOR = _orb->object_to_string(anArgO);
-        SALOMEDS::SObject_var anArgSO = theStudy->FindObjectIOR(anIOR.in());
+        SALOMEDS::SObject_var anArgSO = aStudy->FindObjectIOR(anIOR.in());
         TCollection_AsciiString anArgName;
         if (CORBA::is_nil(anArgSO)) {
           anArgName = "arg_";
@@ -1134,7 +1128,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapes(SALOMEDS::Study_ptr     theStudy,
             GEOM::GEOM_Object_var anArgOTrsf = aTrsfOpSv->TransformLikeOtherCopy(anArgO, theObject);
             if (!CORBA::is_nil(anArgOTrsf)) {
               CORBA::String_var anArgOTrsfEntry = anArgOTrsf->GetEntry();
-              Handle(::GEOM_BaseObject) anArgOTrsfImpl = _impl->GetObject(anArgOTrsf->GetStudyID(), anArgOTrsfEntry);
+              Handle(::GEOM_BaseObject) anArgOTrsfImpl = _impl->GetObject(anArgOTrsfEntry);
               Handle(::GEOM_Function) anArgOTrsfFun = anArgOTrsfImpl->GetLastFunction();
               anArgOTrsfFun->SetDescription("");
               aSubO = aShapesOp->GetInPlace(theObject, anArgOTrsf);
@@ -1143,7 +1137,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapes(SALOMEDS::Study_ptr     theStudy,
             Handle(::GEOM_Function) anOFun = theObject->GetLastFunction();
             if (!anOFun.IsNull()) {
               CORBA::String_var entryArg = anArgO->GetEntry();
-              Handle(::GEOM_Object) anArgOImpl = _impl->GetObject(anArgO->GetStudyID(), entryArg);
+              Handle(::GEOM_Object) anArgOImpl = _impl->GetObject(entryArg);
               if (!anArgOImpl.IsNull()) {
                 TopoDS_Shape anArgOShape = anArgOImpl->GetValue();
                 TopoDS_Shape aMultiArgShape;
@@ -1241,7 +1235,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapes(SALOMEDS::Study_ptr     theStudy,
             }
             aSubName += anArgName;
             aSubSO = aStudyBuilder->NewObject(theSObject);
-            aSubSO = PublishInStudy(theStudy, aSubSO, aSubO, aSubName.ToCString());
+            aSubSO = PublishInStudy(aSubSO, aSubO, aSubName.ToCString());
             // Restore color
             aSubO->SetColor(anArgO->GetColor());
             // set the texture
@@ -1257,10 +1251,10 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapes(SALOMEDS::Study_ptr     theStudy,
             GEOM::ListOfGO_var aSubParts;
             if (theFindMethod == GEOM::FSM_GetInPlaceByHistory)
               // pass theObject, because only it has the history
-              aSubParts = RestoreSubShapesOneLevel(theStudy, anArgSO, aSubSO,
+              aSubParts = RestoreSubShapesOneLevel(anArgSO, aSubSO,
                                                    theObject, anOutArgs, theFindMethod, theAddPrefix);
             else
-              aSubParts = RestoreSubShapesOneLevel(theStudy, anArgSO, aSubSO,
+              aSubParts = RestoreSubShapesOneLevel(anArgSO, aSubSO,
                                                    aSubO, anOutArgs, theFindMethod, theAddPrefix);
             // add to parts list
             addToListOfGO( aSubParts, aParts );
@@ -1274,7 +1268,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapes(SALOMEDS::Study_ptr     theStudy,
 
             // Restore published sub-shapes of the argument
             GEOM::ListOfGO_var aSubParts =
-              RestoreSubShapesOneLevel(theStudy, anArgSO, aSubSO,
+              RestoreSubShapesOneLevel(anArgSO, aSubSO,
                                        theObject, anOutArgs, theFindMethod, theAddPrefix);
 
             // add to parts list
@@ -1301,7 +1295,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapes(SALOMEDS::Study_ptr     theStudy,
                   aSubName = "from_parts_of_";
                 }
                 aSubName += anArgName;
-                aSubSO = PublishInStudy(theStudy, aSubSO, aSubO, aSubName.ToCString());
+                aSubSO = PublishInStudy(aSubSO, aSubO, aSubName.ToCString());
                 // Restore color
                 aSubO->SetColor(anArgO->GetColor());
                 // set the texture
@@ -1318,7 +1312,8 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapes(SALOMEDS::Study_ptr     theStudy,
             }
           }
         } // try to build from published parts
-        anArgSO->UnRegister();
+       if (!CORBA::is_nil(anArgSO))
+          anArgSO->UnRegister();
       }
     } // process arguments
   }
@@ -1329,7 +1324,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapes(SALOMEDS::Study_ptr     theStudy,
   aResParts->length(nb);
   if (nb > 0)
   {
-    Handle(::GEOM_BaseObject) aMainObj = _impl->GetObject(theObject->GetStudyID(), theObject->GetEntry());
+    Handle(::GEOM_BaseObject) aMainObj = _impl->GetObject(theObject->GetEntry());
     Handle(::GEOM_Function) aFunction = aMainObj->GetLastFunction();
     GEOM::TPythonDump pd (aFunction, true);
     pd <<"[";
@@ -1345,7 +1340,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapes(SALOMEDS::Study_ptr     theStudy,
       anObjEntryMap.insert(anEntry);
       aResParts[nbRes++] = anObj;
       // clear python dump of object
-      Handle(::GEOM_BaseObject) aGeomObj = _impl->GetObject(anObj->GetStudyID(), anEntry);
+      Handle(::GEOM_BaseObject) aGeomObj = _impl->GetObject(anEntry);
       Handle(::GEOM_Function)   anObjFun = aGeomObj->GetLastFunction();
       if ( !anObjFun.IsNull() )
         anObjFun->SetDescription( "" );
@@ -1363,7 +1358,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapes(SALOMEDS::Study_ptr     theStudy,
       GEOM::GEOM_Object_var anObj = anOutArgs[ i ];
       if (CORBA::is_nil(anObj))
         continue;
-      Handle(::GEOM_BaseObject) aGeomObj = _impl->GetObject(anObj->GetStudyID(), anObj->GetEntry());
+      Handle(::GEOM_BaseObject) aGeomObj = _impl->GetObject(anObj->GetEntry());
       if ( j > 0 )
         pd << ", ";
       pd << aGeomObj;
@@ -1395,8 +1390,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapes(SALOMEDS::Study_ptr     theStudy,
 // function : RestoreSubShapesOneLevel
 // purpose  : Private method
 //============================================================================
-GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapesOneLevel (SALOMEDS::Study_ptr     theStudy,
-                                                      SALOMEDS::SObject_ptr   theOldSO,
+GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapesOneLevel (SALOMEDS::SObject_ptr   theOldSO,
                                                       SALOMEDS::SObject_ptr   theNewSO,
                                                       GEOM::GEOM_Object_ptr   theNewO,
                                                       GEOM::ListOfGO&         theOutArgs,
@@ -1404,24 +1398,25 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapesOneLevel (SALOMEDS::Study_ptr     th
                                                       CORBA::Boolean          theAddPrefix)
 {
   int i = 0;
+  SALOMEDS::Study_var aStudy = getStudyServant();
   GEOM::ListOfGO_var aParts = new GEOM::ListOfGO;
   GEOM::ListOfGO_var aNewParts = new GEOM::ListOfGO;
-  if (CORBA::is_nil(theStudy) || CORBA::is_nil(theOldSO) ||
+  if (CORBA::is_nil(aStudy) || CORBA::is_nil(theOldSO) ||
       CORBA::is_nil(theNewO) /*|| CORBA::is_nil(theNewSO)*/)
     return aParts._retn();
 
-  SALOMEDS::StudyBuilder_var aStudyBuilder = theStudy->NewBuilder();
+  SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
 
   // Get interface, containing method, which we will use to reconstruct sub-shapes
-  GEOM::GEOM_IShapesOperations_var  aShapesOp = GetIShapesOperations(theStudy->StudyId());
-  GEOM::GEOM_IGroupOperations_var    aGroupOp = GetIGroupOperations(theStudy->StudyId());
-  GEOM::GEOM_ITransformOperations_var aTrsfOp = GetITransformOperations(theStudy->StudyId());
+  GEOM::GEOM_IShapesOperations_var  aShapesOp = GetIShapesOperations();
+  GEOM::GEOM_IGroupOperations_var    aGroupOp = GetIGroupOperations();
+  GEOM::GEOM_ITransformOperations_var aTrsfOp = GetITransformOperations();
 
   PortableServer::Servant aServant = _poa->reference_to_servant(aTrsfOp.in());
   GEOM_ITransformOperations_i*      aTrsfOpSv = dynamic_cast<GEOM_ITransformOperations_i*>(aServant);
 
   // Reconstruct published sub-shapes
-  SALOMEDS::ChildIterator_var it = theStudy->NewChildIterator(theOldSO);
+  SALOMEDS::ChildIterator_var it = aStudy->NewChildIterator(theOldSO);
 
   int aLen = 0;
   for (it->Init(); it->More(); it->Next()) {
@@ -1455,7 +1450,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapesOneLevel (SALOMEDS::Study_ptr     th
             GEOM::GEOM_Object_var anArgOTrsf = aTrsfOpSv->TransformLikeOtherCopy(anOldSubO, theNewO);
             if (!CORBA::is_nil(anArgOTrsf)) {
               CORBA::String_var anArgOTrsfEntry = anArgOTrsf->GetEntry();
-              Handle(::GEOM_BaseObject) anArgOTrsfImpl = _impl->GetObject(anArgOTrsf->GetStudyID(), anArgOTrsfEntry);
+              Handle(::GEOM_BaseObject) anArgOTrsfImpl = _impl->GetObject(anArgOTrsfEntry);
               Handle(::GEOM_Function) anArgOTrsfFun = anArgOTrsfImpl->GetLastFunction();
               anArgOTrsfFun->SetDescription("");
               aNewSubO = aShapesOp->GetInPlace(theNewO, anArgOTrsf);
@@ -1520,7 +1515,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapesOneLevel (SALOMEDS::Study_ptr     th
             }
             aSubName += anArgName;
             aNewSubSO = aStudyBuilder->NewObject(theNewSO);
-            aNewSubSO = PublishInStudy(theStudy, aNewSubSO, aNewSubO, aSubName.ToCString());
+            aNewSubSO = PublishInStudy(aNewSubSO, aNewSubO, aSubName.ToCString());
             // Restore color
             aNewSubO->SetColor(anOldSubO->GetColor());
             // set the texture
@@ -1534,10 +1529,10 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapesOneLevel (SALOMEDS::Study_ptr     th
           GEOM::ListOfGO_var aSubParts;
           if (theFindMethod == GEOM::FSM_GetInPlaceByHistory)
             // pass the main shape as Object, because only it has the history
-            aSubParts = RestoreSubShapesOneLevel(theStudy, anOldSubSO, aNewSubSO,
+            aSubParts = RestoreSubShapesOneLevel(anOldSubSO, aNewSubSO,
                                                  theNewO, theOutArgs, theFindMethod, theAddPrefix);
           else
-            aSubParts = RestoreSubShapesOneLevel(theStudy, anOldSubSO, aNewSubSO,
+            aSubParts = RestoreSubShapesOneLevel(anOldSubSO, aNewSubSO,
                                                  aNewSubO, theOutArgs, theFindMethod, theAddPrefix);
           // add to parts list
           addToListOfGO( aSubParts, aNewParts );
@@ -1549,7 +1544,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapesOneLevel (SALOMEDS::Study_ptr     th
 
           // Restore published sub-shapes of the argument
           GEOM::ListOfGO_var aSubParts =
-            RestoreSubShapesOneLevel(theStudy, anOldSubSO, aNewSubSO,
+            RestoreSubShapesOneLevel(anOldSubSO, aNewSubSO,
                                      theNewO, theOutArgs, theFindMethod, theAddPrefix);
           // add to parts list
           addToListOfGO( aSubParts, aNewParts );
@@ -1581,7 +1576,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapesOneLevel (SALOMEDS::Study_ptr     th
                   aSubName = "from_parts_of_";
                 }
                 aSubName += anArgName;
-                aNewSubSO = PublishInStudy(theStudy, aNewSubSO, aNewSubO, aSubName.ToCString());
+                aNewSubSO = PublishInStudy(aNewSubSO, aNewSubO, aSubName.ToCString());
                 // Restore color
                 aNewSubO->SetColor(anOldSubO->GetColor());
                 // set the texture
@@ -1615,8 +1610,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapesOneLevel (SALOMEDS::Study_ptr     th
 //            List theArgs in this case contains not only operation arguments,
 //            but also all subshapes, which must be published.
 //============================================================================
-GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapes(SALOMEDS::Study_ptr     theStudy,
-                                                  GEOM::GEOM_Object_ptr   theObject,
+GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapes(GEOM::GEOM_Object_ptr   theObject,
                                                   SALOMEDS::SObject_ptr   theSObject,
                                                   const GEOM::ListOfGO&   theArgs,
                                                   GEOM::find_shape_method theFindMethod,
@@ -1624,9 +1618,10 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapes(SALOMEDS::Study_ptr     theStu
                                                   CORBA::Boolean          theAddPrefix)
 {
   GEOM::ListOfGO_var aParts = new GEOM::ListOfGO;
+  SALOMEDS::Study_var aStudy = getStudyServant();
   //PTv, IMP 0020001, The salome object <theSObject>
   //     is not obligatory in case of invocation from script
-  if (CORBA::is_nil(theStudy) || CORBA::is_nil(theObject) /*|| CORBA::is_nil(theSObject)*/)
+  if (CORBA::is_nil(aStudy) || CORBA::is_nil(theObject) /*|| CORBA::is_nil(theSObject)*/)
     return aParts._retn();
 
   // If theArgs list is empty, nothing to do
@@ -1673,9 +1668,9 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapes(SALOMEDS::Study_ptr     theStu
     // but only reconstruct its published sub-shapes
 
     CORBA::String_var anIOR = _orb->object_to_string(aList[0]);
-    SALOMEDS::SObject_var anArgSO = theStudy->FindObjectIOR(anIOR.in());
+    SALOMEDS::SObject_var anArgSO = aStudy->FindObjectIOR(anIOR.in());
 
-    aParts = RestoreGivenSubShapesOneLevel(theStudy, anArgSO, theSObject, theObject,
+    aParts = RestoreGivenSubShapesOneLevel(anArgSO, theSObject, theObject,
                                            anArgs, theFindMethod, theAddPrefix);
 
     // set the color of the transformed shape to the color of initial shape
@@ -1691,22 +1686,22 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapes(SALOMEDS::Study_ptr     theStu
   }
   else {
     // Get interface, containing method, which we will use to reconstruct sub-shapes
-    GEOM::GEOM_IShapesOperations_var  aShapesOp = GetIShapesOperations(theStudy->StudyId());
-    GEOM::GEOM_IGroupOperations_var    aGroupOp = GetIGroupOperations(theStudy->StudyId());
-    GEOM::GEOM_ITransformOperations_var aTrsfOp = GetITransformOperations(theStudy->StudyId());
+    GEOM::GEOM_IShapesOperations_var  aShapesOp = GetIShapesOperations();
+    GEOM::GEOM_IGroupOperations_var    aGroupOp = GetIGroupOperations();
+    GEOM::GEOM_ITransformOperations_var aTrsfOp = GetITransformOperations();
 
     PortableServer::Servant aServant = _poa->reference_to_servant(aTrsfOp.in());
     GEOM_ITransformOperations_i*      aTrsfOpSv = dynamic_cast<GEOM_ITransformOperations_i*>(aServant);
 
     // Reconstruct arguments and tree of sub-shapes of the arguments
     CORBA::String_var anIOR;
-    SALOMEDS::StudyBuilder_var aStudyBuilder = theStudy->NewBuilder();
+    SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
     for (Standard_Integer i = 0; i < nbArgsActual; i++)
     {
       GEOM::GEOM_Object_var anArgO = aList[i];
       if (!CORBA::is_nil(anArgO)) {
         anIOR = _orb->object_to_string(anArgO);
-        SALOMEDS::SObject_var anArgSO = theStudy->FindObjectIOR(anIOR.in());
+        SALOMEDS::SObject_var anArgSO = aStudy->FindObjectIOR(anIOR.in());
         TCollection_AsciiString anArgName;
         if (CORBA::is_nil(anArgSO)) {
           anArgName = "arg_";
@@ -1731,7 +1726,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapes(SALOMEDS::Study_ptr     theStu
             GEOM::GEOM_Object_var anArgOTrsf = aTrsfOpSv->TransformLikeOtherCopy(anArgO, theObject);
             if (!CORBA::is_nil(anArgOTrsf)) {
               CORBA::String_var anArgOTrsfEntry = anArgOTrsf->GetEntry();
-              Handle(::GEOM_BaseObject) anArgOTrsfImpl = _impl->GetObject(anArgOTrsf->GetStudyID(), anArgOTrsfEntry);
+              Handle(::GEOM_BaseObject) anArgOTrsfImpl = _impl->GetObject(anArgOTrsfEntry);
               Handle(::GEOM_Function) anArgOTrsfFun = anArgOTrsfImpl->GetLastFunction();
               anArgOTrsfFun->SetDescription("");
               aSubO = aShapesOp->GetInPlace(theObject, anArgOTrsf);
@@ -1790,7 +1785,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapes(SALOMEDS::Study_ptr     theStu
             }
             aSubName += anArgName;
             aSubSO = aStudyBuilder->NewObject(theSObject);
-            aSubSO = PublishInStudy(theStudy, aSubSO, aSubO, aSubName.ToCString());
+            aSubSO = PublishInStudy(aSubSO, aSubO, aSubName.ToCString());
             // Restore color
             aSubO->SetColor(anArgO->GetColor());
             // set the texture
@@ -1806,10 +1801,10 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapes(SALOMEDS::Study_ptr     theStu
             GEOM::ListOfGO_var aSubParts;
             if (theFindMethod == GEOM::FSM_GetInPlaceByHistory)
               // pass theObject, because only it has the history
-              aSubParts = RestoreGivenSubShapesOneLevel(theStudy, anArgSO, aSubSO,
+              aSubParts = RestoreGivenSubShapesOneLevel(anArgSO, aSubSO,
                                                         theObject, anArgs, theFindMethod, theAddPrefix);
             else
-              aSubParts = RestoreGivenSubShapesOneLevel(theStudy, anArgSO, aSubSO,
+              aSubParts = RestoreGivenSubShapesOneLevel(anArgSO, aSubSO,
                                                         aSubO, anArgs, theFindMethod, theAddPrefix);
             // add to parts list
             addToListOfGO( aSubParts, aParts );
@@ -1823,7 +1818,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapes(SALOMEDS::Study_ptr     theStu
 
             // Restore published sub-shapes of the argument
             GEOM::ListOfGO_var aSubParts =
-              RestoreGivenSubShapesOneLevel(theStudy, anArgSO, aSubSO,
+              RestoreGivenSubShapesOneLevel(anArgSO, aSubSO,
                                             theObject, anArgs, theFindMethod, theAddPrefix);
 
             // add to parts list
@@ -1847,7 +1842,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapes(SALOMEDS::Study_ptr     theStu
                   aSubName = "from_parts_of_";
                 }
                 aSubName += anArgName;
-                aSubSO = PublishInStudy(theStudy, aSubSO, aSubO, aSubName.ToCString());
+                aSubSO = PublishInStudy(aSubSO, aSubO, aSubName.ToCString());
                 // Restore color
                 aSubO->SetColor(anArgO->GetColor());
                 // set the texture
@@ -1875,7 +1870,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapes(SALOMEDS::Study_ptr     theStu
   aResParts->length(nb);
   if (nb > 0)
   {
-    Handle(::GEOM_BaseObject) aMainObj = _impl->GetObject(theObject->GetStudyID(), theObject->GetEntry());
+    Handle(::GEOM_BaseObject) aMainObj = _impl->GetObject(theObject->GetEntry());
     Handle(::GEOM_Function) aFunction = aMainObj->GetLastFunction();
     GEOM::TPythonDump pd (aFunction, true);
     pd <<"[";
@@ -1891,7 +1886,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapes(SALOMEDS::Study_ptr     theStu
       anObjEntryMap.insert(anEntry);
       aResParts[nbRes++] = anObj;
       // clear python dump of object
-      Handle(::GEOM_BaseObject) aGeomObj = _impl->GetObject(anObj->GetStudyID(), anEntry);
+      Handle(::GEOM_BaseObject) aGeomObj = _impl->GetObject(anEntry);
       Handle(::GEOM_Function)   anObjFun = aGeomObj->GetLastFunction();
       if ( !anObjFun.IsNull() )
         anObjFun->SetDescription( "" );
@@ -1907,7 +1902,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapes(SALOMEDS::Study_ptr     theStu
       GEOM::GEOM_Object_var anObj = theArgs[ i ];
       if (CORBA::is_nil(anObj))
         continue;
-      Handle(::GEOM_BaseObject) aGeomObj = _impl->GetObject(anObj->GetStudyID(), anObj->GetEntry());
+      Handle(::GEOM_BaseObject) aGeomObj = _impl->GetObject(anObj->GetEntry());
       if ( j > 0 )
         pd << ", ";
       pd << aGeomObj;
@@ -1939,8 +1934,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapes(SALOMEDS::Study_ptr     theStu
 // function : RestoreGivenSubShapesOneLevel
 // purpose  : Private method
 //============================================================================
-GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapesOneLevel (SALOMEDS::Study_ptr     theStudy,
-                                                           SALOMEDS::SObject_ptr   theOldSO,
+GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapesOneLevel (SALOMEDS::SObject_ptr   theOldSO,
                                                            SALOMEDS::SObject_ptr   theNewSO,
                                                            GEOM::GEOM_Object_ptr   theNewO,
                                                            std::set<std::string>   theArgs,
@@ -1948,24 +1942,25 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapesOneLevel (SALOMEDS::Study_ptr
                                                            CORBA::Boolean          theAddPrefix)
 {
   int i = 0;
+  SALOMEDS::Study_var aStudy = getStudyServant();
   GEOM::ListOfGO_var aParts = new GEOM::ListOfGO;
   GEOM::ListOfGO_var aNewParts = new GEOM::ListOfGO;
-  if (CORBA::is_nil(theStudy) || CORBA::is_nil(theOldSO) ||
+  if (CORBA::is_nil(aStudy) || CORBA::is_nil(theOldSO) ||
       CORBA::is_nil(theNewO) /*|| CORBA::is_nil(theNewSO)*/)
     return aParts._retn();
 
-  SALOMEDS::StudyBuilder_var aStudyBuilder = theStudy->NewBuilder();
+  SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
 
   // Get interface, containing method, which we will use to reconstruct sub-shapes
-  GEOM::GEOM_IShapesOperations_var  aShapesOp = GetIShapesOperations(theStudy->StudyId());
-  GEOM::GEOM_IGroupOperations_var    aGroupOp = GetIGroupOperations(theStudy->StudyId());
-  GEOM::GEOM_ITransformOperations_var aTrsfOp = GetITransformOperations(theStudy->StudyId());
+  GEOM::GEOM_IShapesOperations_var  aShapesOp = GetIShapesOperations();
+  GEOM::GEOM_IGroupOperations_var    aGroupOp = GetIGroupOperations();
+  GEOM::GEOM_ITransformOperations_var aTrsfOp = GetITransformOperations();
 
   PortableServer::Servant aServant = _poa->reference_to_servant(aTrsfOp.in());
   GEOM_ITransformOperations_i*      aTrsfOpSv = dynamic_cast<GEOM_ITransformOperations_i*>(aServant);
 
   // Reconstruct published sub-shapes
-  SALOMEDS::ChildIterator_var it = theStudy->NewChildIterator(theOldSO);
+  SALOMEDS::ChildIterator_var it = aStudy->NewChildIterator(theOldSO);
 
   int aLen = 0;
   for (it->Init(); it->More(); it->Next()) {
@@ -2007,7 +2002,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapesOneLevel (SALOMEDS::Study_ptr
             GEOM::GEOM_Object_var anArgOTrsf = aTrsfOpSv->TransformLikeOtherCopy(anOldSubO, theNewO);
             if (!CORBA::is_nil(anArgOTrsf)) {
               CORBA::String_var anArgOTrsfEntry = anArgOTrsf->GetEntry();
-              Handle(::GEOM_BaseObject) anArgOTrsfImpl = _impl->GetObject(anArgOTrsf->GetStudyID(), anArgOTrsfEntry);
+              Handle(::GEOM_BaseObject) anArgOTrsfImpl = _impl->GetObject(anArgOTrsfEntry);
               Handle(::GEOM_Function) anArgOTrsfFun = anArgOTrsfImpl->GetLastFunction();
               anArgOTrsfFun->SetDescription("");
               aNewSubO = aShapesOp->GetInPlace(theNewO, anArgOTrsf);
@@ -2069,7 +2064,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapesOneLevel (SALOMEDS::Study_ptr
             }
             aSubName += anArgName;
             aNewSubSO = aStudyBuilder->NewObject(theNewSO);
-            aNewSubSO = PublishInStudy(theStudy, aNewSubSO, aNewSubO, aSubName.ToCString());
+            aNewSubSO = PublishInStudy(aNewSubSO, aNewSubO, aSubName.ToCString());
             // Restore color
             aNewSubO->SetColor(anOldSubO->GetColor());
             // set the texture
@@ -2083,10 +2078,10 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapesOneLevel (SALOMEDS::Study_ptr
           GEOM::ListOfGO_var aSubParts;
           if (theFindMethod == GEOM::FSM_GetInPlaceByHistory)
             // pass the main shape as Object, because only it has the history
-            aSubParts = RestoreGivenSubShapesOneLevel(theStudy, anOldSubSO, aNewSubSO,
+            aSubParts = RestoreGivenSubShapesOneLevel(anOldSubSO, aNewSubSO,
                                                       theNewO, theArgs, theFindMethod, theAddPrefix);
           else
-            aSubParts = RestoreGivenSubShapesOneLevel(theStudy, anOldSubSO, aNewSubSO,
+            aSubParts = RestoreGivenSubShapesOneLevel(anOldSubSO, aNewSubSO,
                                                       aNewSubO, theArgs, theFindMethod, theAddPrefix);
           // add to parts list
           addToListOfGO( aSubParts, aNewParts );
@@ -2098,7 +2093,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapesOneLevel (SALOMEDS::Study_ptr
 
           // Restore published sub-shapes of the argument
           GEOM::ListOfGO_var aSubParts =
-            RestoreGivenSubShapesOneLevel(theStudy, anOldSubSO, aNewSubSO,
+            RestoreGivenSubShapesOneLevel(anOldSubSO, aNewSubSO,
                                           theNewO, theArgs, theFindMethod, theAddPrefix);
           // add to parts list
           addToListOfGO( aSubParts, aNewParts );
@@ -2127,7 +2122,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapesOneLevel (SALOMEDS::Study_ptr
                   aSubName = "from_parts_of_";
                 }
                 aSubName += anArgName;
-                aNewSubSO = PublishInStudy(theStudy, aNewSubSO, aNewSubO, aSubName.ToCString());
+                aNewSubSO = PublishInStudy(aNewSubSO, aNewSubO, aSubName.ToCString());
                 // Restore color
                 aNewSubO->SetColor(anOldSubO->GetColor());
                 // set the texture
@@ -2164,29 +2159,43 @@ void GEOM_Gen_i::register_name(char * name)
   name_service->Register(g, name);
 }
 
+//============================================================================
+// function : getStudyServant()
+// purpose  : Get Study
+//============================================================================
+SALOMEDS::Study_var GEOM_Gen_i::getStudyServant()
+{
+  static SALOMEDS::Study_var aStudy;
+  if(CORBA::is_nil(aStudy)){
+    CORBA::Object_ptr anObject = name_service->Resolve("/Study");
+    aStudy = SALOMEDS::Study::_narrow(anObject);
+  }
+  return aStudy;
+}
+
 //============================================================================
 // function : Undo
 // purpose  :
 //============================================================================
-void GEOM_Gen_i::Undo(CORBA::Long theStudyID)
+void GEOM_Gen_i::Undo()
 {
-  _impl->Undo(theStudyID);
+  _impl->Undo();
 }
 
 //============================================================================
 // function : Redo
 // purpose  :
 //============================================================================
-void GEOM_Gen_i::Redo(CORBA::Long theStudyID)
+void GEOM_Gen_i::Redo()
 {
-  _impl->Redo(theStudyID);
+  _impl->Redo();
 }
 
 //============================================================================
 // function : GetIBasicOperations
 // purpose  :
 //============================================================================
-GEOM::GEOM_IBasicOperations_ptr GEOM_Gen_i::GetIBasicOperations(CORBA::Long theStudyID)
+GEOM::GEOM_IBasicOperations_ptr GEOM_Gen_i::GetIBasicOperations()
      throw ( SALOME::SALOME_Exception )
 {
   Unexpect aCatch(SALOME_SalomeException);
@@ -2196,7 +2205,7 @@ GEOM::GEOM_IBasicOperations_ptr GEOM_Gen_i::GetIBasicOperations(CORBA::Long theS
 
   //transfer reference on engine
   GEOM_IBasicOperations_i* aServant =
-    new GEOM_IBasicOperations_i(_poa, engine, _impl->GetIBasicOperations(theStudyID));
+    new GEOM_IBasicOperations_i(_poa, engine, _impl->GetIBasicOperations());
 
   PortableServer::ObjectId_var id = _poa->activate_object(aServant);
   // activate the CORBA servant
@@ -2208,7 +2217,7 @@ GEOM::GEOM_IBasicOperations_ptr GEOM_Gen_i::GetIBasicOperations(CORBA::Long theS
 // function : GetITransformOperations
 // purpose  :
 //============================================================================
-GEOM::GEOM_ITransformOperations_ptr GEOM_Gen_i::GetITransformOperations(CORBA::Long theStudyID)
+GEOM::GEOM_ITransformOperations_ptr GEOM_Gen_i::GetITransformOperations()
      throw ( SALOME::SALOME_Exception )
 {
   Unexpect aCatch(SALOME_SalomeException);
@@ -2217,7 +2226,7 @@ GEOM::GEOM_ITransformOperations_ptr GEOM_Gen_i::GetITransformOperations(CORBA::L
   GEOM::GEOM_Gen_ptr engine = _this();
 
   GEOM_ITransformOperations_i* aServant =
-    new GEOM_ITransformOperations_i(_poa, engine, _impl->GetITransformOperations(theStudyID));
+    new GEOM_ITransformOperations_i(_poa, engine, _impl->GetITransformOperations());
 
   // activate the CORBA servant
   GEOM::GEOM_ITransformOperations_var operations = aServant->_this();
@@ -2228,7 +2237,7 @@ GEOM::GEOM_ITransformOperations_ptr GEOM_Gen_i::GetITransformOperations(CORBA::L
 // function : GetI3DPrimOperations
 // purpose  :
 //============================================================================
-GEOM::GEOM_I3DPrimOperations_ptr GEOM_Gen_i::GetI3DPrimOperations(CORBA::Long theStudyID)
+GEOM::GEOM_I3DPrimOperations_ptr GEOM_Gen_i::GetI3DPrimOperations()
      throw ( SALOME::SALOME_Exception )
 {
   Unexpect aCatch(SALOME_SalomeException);
@@ -2237,7 +2246,7 @@ GEOM::GEOM_I3DPrimOperations_ptr GEOM_Gen_i::GetI3DPrimOperations(CORBA::Long th
   GEOM::GEOM_Gen_ptr engine = _this();
 
   GEOM_I3DPrimOperations_i* aServant =
-    new GEOM_I3DPrimOperations_i(_poa, engine, _impl->GetI3DPrimOperations(theStudyID));
+    new GEOM_I3DPrimOperations_i(_poa, engine, _impl->GetI3DPrimOperations());
   PortableServer::ObjectId_var id = _poa->activate_object(aServant);
 
   // activate the CORBA servant
@@ -2249,7 +2258,7 @@ GEOM::GEOM_I3DPrimOperations_ptr GEOM_Gen_i::GetI3DPrimOperations(CORBA::Long th
 // function : GetIShapesOperations
 // purpose  :
 //============================================================================
-GEOM::GEOM_IShapesOperations_ptr GEOM_Gen_i::GetIShapesOperations(CORBA::Long theStudyID)
+GEOM::GEOM_IShapesOperations_ptr GEOM_Gen_i::GetIShapesOperations()
      throw ( SALOME::SALOME_Exception )
 {
   Unexpect aCatch(SALOME_SalomeException);
@@ -2258,7 +2267,7 @@ GEOM::GEOM_IShapesOperations_ptr GEOM_Gen_i::GetIShapesOperations(CORBA::Long th
   GEOM::GEOM_Gen_ptr engine = _this();
 
   GEOM_IShapesOperations_i* aServant =
-    new GEOM_IShapesOperations_i(_poa, engine, _impl->GetIShapesOperations(theStudyID));
+    new GEOM_IShapesOperations_i(_poa, engine, _impl->GetIShapesOperations());
 
   // activate the CORBA servant
   GEOM::GEOM_IShapesOperations_var operations = aServant->_this();
@@ -2269,7 +2278,7 @@ GEOM::GEOM_IShapesOperations_ptr GEOM_Gen_i::GetIShapesOperations(CORBA::Long th
 // function : GetIBlocksOperations
 // purpose  :
 //============================================================================
-GEOM::GEOM_IBlocksOperations_ptr GEOM_Gen_i::GetIBlocksOperations(CORBA::Long theStudyID)
+GEOM::GEOM_IBlocksOperations_ptr GEOM_Gen_i::GetIBlocksOperations()
      throw ( SALOME::SALOME_Exception )
 {
   Unexpect aCatch(SALOME_SalomeException);
@@ -2278,7 +2287,7 @@ GEOM::GEOM_IBlocksOperations_ptr GEOM_Gen_i::GetIBlocksOperations(CORBA::Long th
   GEOM::GEOM_Gen_ptr engine = _this();
 
   GEOM_IBlocksOperations_i* aServant =
-    new GEOM_IBlocksOperations_i(_poa, engine, _impl->GetIBlocksOperations(theStudyID));
+    new GEOM_IBlocksOperations_i(_poa, engine, _impl->GetIBlocksOperations());
 
   // activate the CORBA servant
   GEOM::GEOM_IBlocksOperations_var operations = aServant->_this();
@@ -2289,7 +2298,7 @@ GEOM::GEOM_IBlocksOperations_ptr GEOM_Gen_i::GetIBlocksOperations(CORBA::Long th
 // function : GetIBooleanOperations
 // purpose  :
 //============================================================================
-GEOM::GEOM_IBooleanOperations_ptr GEOM_Gen_i::GetIBooleanOperations(CORBA::Long theStudyID)
+GEOM::GEOM_IBooleanOperations_ptr GEOM_Gen_i::GetIBooleanOperations()
      throw ( SALOME::SALOME_Exception )
 {
   Unexpect aCatch(SALOME_SalomeException);
@@ -2298,7 +2307,7 @@ GEOM::GEOM_IBooleanOperations_ptr GEOM_Gen_i::GetIBooleanOperations(CORBA::Long
   GEOM::GEOM_Gen_ptr engine = _this();
 
   GEOM_IBooleanOperations_i* aServant =
-    new GEOM_IBooleanOperations_i(_poa, engine, _impl->GetIBooleanOperations(theStudyID));
+    new GEOM_IBooleanOperations_i(_poa, engine, _impl->GetIBooleanOperations());
 
   // activate the CORBA servant
   GEOM::GEOM_IBooleanOperations_var operations = aServant->_this();
@@ -2309,7 +2318,7 @@ GEOM::GEOM_IBooleanOperations_ptr GEOM_Gen_i::GetIBooleanOperations(CORBA::Long
 // function : GetICurvesOperations
 // purpose  :
 //============================================================================
-GEOM::GEOM_ICurvesOperations_ptr GEOM_Gen_i::GetICurvesOperations(CORBA::Long theStudyID)
+GEOM::GEOM_ICurvesOperations_ptr GEOM_Gen_i::GetICurvesOperations()
      throw ( SALOME::SALOME_Exception )
 {
   Unexpect aCatch(SALOME_SalomeException);
@@ -2318,7 +2327,7 @@ GEOM::GEOM_ICurvesOperations_ptr GEOM_Gen_i::GetICurvesOperations(CORBA::Long th
   GEOM::GEOM_Gen_ptr engine = _this();
 
   GEOM_ICurvesOperations_i* aServant =
-    new GEOM_ICurvesOperations_i(_poa, engine, _impl->GetICurvesOperations(theStudyID));
+    new GEOM_ICurvesOperations_i(_poa, engine, _impl->GetICurvesOperations());
 
   // activate the CORBA servant
   GEOM::GEOM_ICurvesOperations_var operations = aServant->_this();
@@ -2329,7 +2338,7 @@ GEOM::GEOM_ICurvesOperations_ptr GEOM_Gen_i::GetICurvesOperations(CORBA::Long th
 // function : GetILocalOperations
 // purpose  :
 //============================================================================
-GEOM::GEOM_ILocalOperations_ptr GEOM_Gen_i::GetILocalOperations(CORBA::Long theStudyID)
+GEOM::GEOM_ILocalOperations_ptr GEOM_Gen_i::GetILocalOperations()
      throw ( SALOME::SALOME_Exception )
 {
   Unexpect aCatch(SALOME_SalomeException);
@@ -2338,7 +2347,7 @@ GEOM::GEOM_ILocalOperations_ptr GEOM_Gen_i::GetILocalOperations(CORBA::Long theS
   GEOM::GEOM_Gen_ptr engine = _this();
 
   GEOM_ILocalOperations_i* aServant =
-    new GEOM_ILocalOperations_i(_poa, engine, _impl->GetILocalOperations(theStudyID));
+    new GEOM_ILocalOperations_i(_poa, engine, _impl->GetILocalOperations());
 
   // activate the CORBA servant
   GEOM::GEOM_ILocalOperations_var operations = aServant->_this();
@@ -2349,7 +2358,7 @@ GEOM::GEOM_ILocalOperations_ptr GEOM_Gen_i::GetILocalOperations(CORBA::Long theS
 // function : GetIHealingOperations
 // purpose  :
 //============================================================================
-GEOM::GEOM_IHealingOperations_ptr GEOM_Gen_i::GetIHealingOperations(CORBA::Long theStudyID)
+GEOM::GEOM_IHealingOperations_ptr GEOM_Gen_i::GetIHealingOperations()
      throw ( SALOME::SALOME_Exception )
 {
   Unexpect aCatch(SALOME_SalomeException);
@@ -2358,7 +2367,7 @@ GEOM::GEOM_IHealingOperations_ptr GEOM_Gen_i::GetIHealingOperations(CORBA::Long
   GEOM::GEOM_Gen_ptr engine = _this();
 
   GEOM_IHealingOperations_i* aServant =
-    new GEOM_IHealingOperations_i(_poa, engine, _impl->GetIHealingOperations(theStudyID));
+    new GEOM_IHealingOperations_i(_poa, engine, _impl->GetIHealingOperations());
 
   // activate the CORBA servant
   GEOM::GEOM_IHealingOperations_var operations = aServant->_this();
@@ -2369,7 +2378,7 @@ GEOM::GEOM_IHealingOperations_ptr GEOM_Gen_i::GetIHealingOperations(CORBA::Long
 // function : GetIInsertOperations
 // purpose  :
 //============================================================================
-GEOM::GEOM_IInsertOperations_ptr GEOM_Gen_i::GetIInsertOperations(CORBA::Long theStudyID)
+GEOM::GEOM_IInsertOperations_ptr GEOM_Gen_i::GetIInsertOperations()
      throw ( SALOME::SALOME_Exception )
 {
   Unexpect aCatch(SALOME_SalomeException);
@@ -2378,7 +2387,7 @@ GEOM::GEOM_IInsertOperations_ptr GEOM_Gen_i::GetIInsertOperations(CORBA::Long th
   GEOM::GEOM_Gen_ptr engine = _this();
 
   GEOM_IInsertOperations_i* aServant =
-    new GEOM_IInsertOperations_i(_poa, engine, _impl->GetIInsertOperations(theStudyID));
+    new GEOM_IInsertOperations_i(_poa, engine, _impl->GetIInsertOperations());
 
   // activate the CORBA servant
   GEOM::GEOM_IInsertOperations_var operations = aServant->_this();
@@ -2389,7 +2398,7 @@ GEOM::GEOM_IInsertOperations_ptr GEOM_Gen_i::GetIInsertOperations(CORBA::Long th
 // function : GetIMeasureOperations
 // purpose  :
 //============================================================================
-GEOM::GEOM_IMeasureOperations_ptr GEOM_Gen_i::GetIMeasureOperations(CORBA::Long theStudyID)
+GEOM::GEOM_IMeasureOperations_ptr GEOM_Gen_i::GetIMeasureOperations()
      throw ( SALOME::SALOME_Exception )
 {
   Unexpect aCatch(SALOME_SalomeException);
@@ -2398,7 +2407,7 @@ GEOM::GEOM_IMeasureOperations_ptr GEOM_Gen_i::GetIMeasureOperations(CORBA::Long
   GEOM::GEOM_Gen_ptr engine = _this();
 
   GEOM_IMeasureOperations_i* aServant =
-    new GEOM_IMeasureOperations_i(_poa, engine, _impl->GetIMeasureOperations(theStudyID));
+    new GEOM_IMeasureOperations_i(_poa, engine, _impl->GetIMeasureOperations());
 
   // activate the CORBA servant
   GEOM::GEOM_IMeasureOperations_var operations = aServant->_this();
@@ -2409,7 +2418,7 @@ GEOM::GEOM_IMeasureOperations_ptr GEOM_Gen_i::GetIMeasureOperations(CORBA::Long
 // function : GetIGroupOperations
 // purpose  :
 //============================================================================
-GEOM::GEOM_IGroupOperations_ptr GEOM_Gen_i::GetIGroupOperations(CORBA::Long theStudyID)
+GEOM::GEOM_IGroupOperations_ptr GEOM_Gen_i::GetIGroupOperations()
      throw ( SALOME::SALOME_Exception )
 {
   Unexpect aCatch(SALOME_SalomeException);
@@ -2418,7 +2427,7 @@ GEOM::GEOM_IGroupOperations_ptr GEOM_Gen_i::GetIGroupOperations(CORBA::Long theS
   GEOM::GEOM_Gen_ptr engine = _this();
 
   GEOM_IGroupOperations_i* aServant =
-    new GEOM_IGroupOperations_i(_poa, engine, _impl->GetIGroupOperations(theStudyID));
+    new GEOM_IGroupOperations_i(_poa, engine, _impl->GetIGroupOperations());
 
   // activate the CORBA servant
   GEOM::GEOM_IGroupOperations_var operations = aServant->_this();
@@ -2429,7 +2438,7 @@ GEOM::GEOM_IGroupOperations_ptr GEOM_Gen_i::GetIGroupOperations(CORBA::Long theS
 // function : GetIFieldOperations
 // purpose  :
 //============================================================================
-GEOM::GEOM_IFieldOperations_ptr GEOM_Gen_i::GetIFieldOperations(CORBA::Long theStudyID)
+GEOM::GEOM_IFieldOperations_ptr GEOM_Gen_i::GetIFieldOperations()
      throw ( SALOME::SALOME_Exception )
 {
   Unexpect aCatch(SALOME_SalomeException);
@@ -2438,7 +2447,7 @@ GEOM::GEOM_IFieldOperations_ptr GEOM_Gen_i::GetIFieldOperations(CORBA::Long theS
   GEOM::GEOM_Gen_ptr engine = _this();
 
   GEOM_IFieldOperations_i* aServant =
-    new GEOM_IFieldOperations_i(_poa, engine, _impl->GetIFieldOperations(theStudyID));
+    new GEOM_IFieldOperations_i(_poa, engine, _impl->GetIFieldOperations());
 
   // activate the CORBA servant
   GEOM::GEOM_IFieldOperations_var operations = aServant->_this();
@@ -2449,8 +2458,7 @@ GEOM::GEOM_IFieldOperations_ptr GEOM_Gen_i::GetIFieldOperations(CORBA::Long theS
 // function : GetPluginOperations
 // purpose  :
 //============================================================================
-GEOM::GEOM_IOperations_ptr GEOM_Gen_i::GetPluginOperations(CORBA::Long theStudyID,
-                                                           const char* theLibName)
+GEOM::GEOM_IOperations_ptr GEOM_Gen_i::GetPluginOperations(const char* theLibName)
      throw ( SALOME::SALOME_Exception )
 {
   Unexpect aCatch(SALOME_SalomeException);
@@ -2468,7 +2476,7 @@ GEOM::GEOM_IOperations_ptr GEOM_Gen_i::GetPluginOperations(CORBA::Long theStudyI
     // create a new operations object, store its ref. in engine
     if ( myOpCreatorMap.find(aLibName) != myOpCreatorMap.end() ) {
       GEOM_IOperations_i* aServant = 0;
-      aServant = myOpCreatorMap[aLibName]->Create(_poa, theStudyID, engine, _impl);
+      aServant = myOpCreatorMap[aLibName]->Create(_poa, engine, _impl);
       // activate the CORBA servant
       if (aServant)
         operations = aServant->_this();
@@ -2546,7 +2554,7 @@ GEOM::GEOM_Object_ptr GEOM_Gen_i::AddSubShape (GEOM::GEOM_Object_ptr   theMainSh
     return GEOM::GEOM_Object::_nil();
   CORBA::String_var entry = theMainShape->GetEntry();
   Handle(::GEOM_Object) aMainShape = Handle(::GEOM_Object)::DownCast
-    ( _impl->GetObject( theMainShape->GetStudyID(), entry ));
+    ( _impl->GetObject( entry ));
   if (aMainShape.IsNull()) return GEOM::GEOM_Object::_nil();
 
   Handle(TColStd_HArray1OfInteger) anArray = new TColStd_HArray1OfInteger(1, theIndices.length());
@@ -2557,7 +2565,7 @@ GEOM::GEOM_Object_ptr GEOM_Gen_i::AddSubShape (GEOM::GEOM_Object_ptr   theMainSh
 
   TCollection_AsciiString anEntry;
   TDF_Tool::Entry(anObject->GetEntry(), anEntry);
-  return GEOM::GEOM_Object::_narrow( GetObject(anObject->GetDocID(), anEntry.ToCString()));
+  return GEOM::GEOM_Object::_narrow( GetObject(anEntry.ToCString()));
 }
 
 //=============================================================================
@@ -2568,7 +2576,7 @@ GEOM::GEOM_Object_ptr GEOM_Gen_i::AddSubShape (GEOM::GEOM_Object_ptr   theMainSh
 void GEOM_Gen_i::RemoveObject(GEOM::GEOM_BaseObject_ptr theObject)
 {
   CORBA::String_var anEntry = theObject->GetEntry();
-  Handle(::GEOM_BaseObject) anObject = _impl->GetObject(theObject->GetStudyID(), anEntry, false);
+  Handle(::GEOM_BaseObject) anObject = _impl->GetObject(anEntry, false);
   if (!anObject.IsNull())
     _impl->RemoveObject(anObject);
 }
@@ -2600,10 +2608,10 @@ GEOM::GEOM_Object_ptr GEOM_Gen_i::GetIORFromString(const char* stringIOR) {
 // function : GetObject()
 // purpose  :
 //=================================================================================
-GEOM::GEOM_BaseObject_ptr GEOM_Gen_i::GetObject (CORBA::Long theStudyID, const char* theEntry)
+GEOM::GEOM_BaseObject_ptr GEOM_Gen_i::GetObject (const char* theEntry)
 {
   GEOM::GEOM_BaseObject_var obj;
-  Handle(::GEOM_BaseObject) handle_object = _impl->GetObject(theStudyID, (char*)theEntry);
+  Handle(::GEOM_BaseObject) handle_object = _impl->GetObject((char*)theEntry);
   if (handle_object.IsNull()) return obj._retn();
 
   TCollection_AsciiString stringIOR = handle_object->GetIOR();
@@ -2665,14 +2673,11 @@ bool GEOM_Gen_i::hasObjectInfo()
 // function : getObjectInfo()
 // purpose  : returns an information for a given object by its entry
 //=================================================================================
-char* GEOM_Gen_i::getObjectInfo(CORBA::Long studyId, const char* entry)
+char* GEOM_Gen_i::getObjectInfo(const char* entry)
 {
   GEOM::GEOM_Object_var aGeomObject;
 
-  CORBA::Object_var aSMObject = name_service->Resolve( "/myStudyManager" );
-  SALOMEDS::StudyManager_var aStudyManager = SALOMEDS::StudyManager::_narrow( aSMObject );
-  SALOMEDS::Study_var aStudy = aStudyManager->GetStudyByID( studyId );
-  SALOMEDS::SObject_var aSObj = aStudy->FindObjectID( entry );
+  SALOMEDS::SObject_var aSObj = getStudyServant()->FindObjectID( entry );
   SALOMEDS::SObject_var aResultSObj;
   if (aSObj->ReferencedObject(aResultSObj))
     aSObj = aResultSObj;
@@ -2682,7 +2687,7 @@ char* GEOM_Gen_i::getObjectInfo(CORBA::Long studyId, const char* entry)
     SALOMEDS::AttributeIOR_var anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr);
     CORBA::String_var aVal = anIOR->Value();
     anIOR->UnRegister();
-    CORBA::Object_var anObject = aStudy->ConvertIORToObject(aVal);
+    CORBA::Object_var anObject = getStudyServant()->ConvertIORToObject(aVal);
     aGeomObject = GEOM::GEOM_Object::_narrow(anObject);
   }
   if (!aSObj->_is_nil() )
@@ -2694,7 +2699,7 @@ char* GEOM_Gen_i::getObjectInfo(CORBA::Long studyId, const char* entry)
     GEOM::ListOfLong_var anInts;
     GEOM::ListOfDouble_var aDbls;
 
-    GEOM::GEOM_IMeasureOperations_var anOp = GetIMeasureOperations( studyId );
+    GEOM::GEOM_IMeasureOperations_var anOp = GetIMeasureOperations();
     aKind = anOp->KindOfShape( aGeomObject, anInts, aDbls );
 
     if ( anOp->IsDone() ) {
@@ -2846,7 +2851,7 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::CreateFolder(const char* theName,
     aLocalID->UnRegister();
   }
 
-  SALOMEDS::Study_var aStudy = theFather->GetStudy();
+  SALOMEDS::Study_var aStudy = getStudyServant();
   SALOMEDS::StudyBuilder_var aStudyBuilder( aStudy->NewBuilder() );
   aFolderSO = aStudyBuilder->NewObject( theFather );
 
@@ -2881,7 +2886,7 @@ void GEOM_Gen_i::MoveToFolder(GEOM::GEOM_Object_ptr theObject,
                               SALOMEDS::SObject_ptr theFolder) {
   GEOM::object_list_var objects = new GEOM::object_list();
   objects->length( 1 );
-  SALOMEDS::SObject_var aSO = theFolder->GetStudy()->FindObjectID( theObject->GetStudyEntry() );
+  SALOMEDS::SObject_var aSO = getStudyServant()->FindObjectID( theObject->GetStudyEntry() );
   objects[0] = aSO;
   Move( objects, theFolder, -1 );
 }
@@ -2899,7 +2904,7 @@ void GEOM_Gen_i::MoveListToFolder (const GEOM::ListOfGO& theListOfGO,
   SALOMEDS::SObject_var aSO;
   for (int i = 0; i < aLen; i++) {
     aGO = GEOM::GEOM_Object::_duplicate( theListOfGO[i] );
-    aSO = theFolder->GetStudy()->FindObjectID( aGO->GetStudyEntry() );
+    aSO = getStudyServant()->FindObjectID( aGO->GetStudyEntry() );
     objects[i] = aSO;
   }
   if ( objects->length() > 0 )
@@ -2917,7 +2922,7 @@ void GEOM_Gen_i::Move( const GEOM::object_list& what,
 {
   if ( CORBA::is_nil( where ) ) return;
 
-  SALOMEDS::Study_var study = where->GetStudy();
+  SALOMEDS::Study_var study = getStudyServant();
   SALOMEDS::StudyBuilder_var studyBuilder = study->NewBuilder();
   SALOMEDS::UseCaseBuilder_var useCaseBuilder = study->GetUseCaseBuilder();
   SALOMEDS::SComponent_var father = where->GetFatherComponent();
@@ -2950,8 +2955,8 @@ void GEOM_Gen_i::Move( const GEOM::object_list& what,
 // function : GetDependencyTree
 // purpose  : Collects dependencies of the given objects from other ones
 //=======================================================================
-SALOMEDS::TMPFile* GEOM_Gen_i::GetDependencyTree( SALOMEDS::Study_ptr theStudy,
-                                                  const GEOM::string_array& theObjectEntries ) {
+SALOMEDS::TMPFile* GEOM_Gen_i::GetDependencyTree( const GEOM::string_array& theObjectEntries )
+{
   // fill in the tree structure
   GEOMUtils::TreeModel tree;
 
@@ -2959,7 +2964,7 @@ SALOMEDS::TMPFile* GEOM_Gen_i::GetDependencyTree( SALOMEDS::Study_ptr theStudy,
   for ( CORBA::ULong i = 0; i < theObjectEntries.length(); i++ ) {
     // process objects one-by-one
     entry = theObjectEntries[i].in();
-    GEOM::GEOM_BaseObject_var anObj = GetObject( theStudy->StudyId(), entry.c_str() );
+    GEOM::GEOM_BaseObject_var anObj = GetObject(entry.c_str() );
     if ( anObj->_is_nil() )
       continue;
     std::map< std::string, std::set<std::string> > passedEntries;
@@ -3044,7 +3049,7 @@ void GEOM_Gen_i::getDownwardDependency( GEOM::GEOM_BaseObject_ptr gbo,
                                         std::map< std::string, std::set<std::string> > &passedEntries,
                                         int level ) {
   std::string aGboEntry = gbo->GetEntry();
-  Handle(TDocStd_Document) aDoc = GEOM_Engine::GetEngine()->GetDocument(gbo->GetStudyID());
+  Handle(TDocStd_Document) aDoc = GEOM_Engine::GetEngine()->GetDocument();
   Handle(TDataStd_TreeNode) aNode, aRoot;
   Handle(::GEOM_Function) aFunction;
   if (aDoc->Main().FindAttribute(GEOM_Function::GetFunctionTreeID(), aRoot)) {
@@ -3060,7 +3065,7 @@ void GEOM_Gen_i::getDownwardDependency( GEOM::GEOM_BaseObject_ptr gbo,
       if(aLabel.IsNull()) continue;
       TCollection_AsciiString anEntry;
       TDF_Tool::Entry(aLabel, anEntry);
-      GEOM::GEOM_BaseObject_var geomObj = GetObject( gbo->GetStudyID(), anEntry.ToCString() );
+      GEOM::GEOM_BaseObject_var geomObj = GetObject(anEntry.ToCString() );
       if( CORBA::is_nil( geomObj ) )
         continue;
       // get dependencies for current object in the tree
@@ -3106,8 +3111,7 @@ void GEOM_Gen_i::getDownwardDependency( GEOM::GEOM_BaseObject_ptr gbo,
 // function : GetEntriesToReduceStudy
 // purpose  : Fills 3 lists that is used to clean study of redundant objects
 //==============================================================================
-void GEOM_Gen_i::GetEntriesToReduceStudy(SALOMEDS::Study_ptr theStudy,
-                                         GEOM::string_array& theSelectedEntries,
+void GEOM_Gen_i::GetEntriesToReduceStudy(GEOM::string_array& theSelectedEntries,
                                          GEOM::string_array& theParentEntries,
                                          GEOM::string_array& theSubEntries,
                                          GEOM::string_array& theOtherEntries)
@@ -3117,7 +3121,7 @@ void GEOM_Gen_i::GetEntriesToReduceStudy(SALOMEDS::Study_ptr theStudy,
     aSelected.insert( CORBA::string_dup( theSelectedEntries[i] ) );
   }
 
-  Handle(TDocStd_Document) aDoc = GEOM_Engine::GetEngine()->GetDocument(theStudy->StudyId());
+  Handle(TDocStd_Document) aDoc = GEOM_Engine::GetEngine()->GetDocument();
   Handle(TDataStd_TreeNode) aNode, aRoot;
   Handle(::GEOM_Function) aFunction;
   if (aDoc->Main().FindAttribute(GEOM_Function::GetFunctionTreeID(), aRoot)) {
@@ -3137,7 +3141,7 @@ void GEOM_Gen_i::GetEntriesToReduceStudy(SALOMEDS::Study_ptr theStudy,
         continue;
       TDF_Tool::Entry(aLabel, anAsciiEntry);
       anEntry = anAsciiEntry.ToCString();
-      GEOM::GEOM_BaseObject_var geomObj = GetObject( theStudy->StudyId(), anEntry.c_str() );
+      GEOM::GEOM_BaseObject_var geomObj = GetObject(anEntry.c_str() );
       if( CORBA::is_nil( geomObj ) )
         continue;
 
@@ -3157,7 +3161,7 @@ void GEOM_Gen_i::GetEntriesToReduceStudy(SALOMEDS::Study_ptr theStudy,
 
     // filling list of sub-objects
     for ( it = aSelected.begin(); it != aSelected.end(); ++it ) {
-      includeSubObjects( theStudy, *it, aSelected, aParents, aChildren, anOthers );
+      includeSubObjects( *it, aSelected, aParents, aChildren, anOthers );
     }
 
     // if some selected object is not a main shape,
@@ -3165,7 +3169,7 @@ void GEOM_Gen_i::GetEntriesToReduceStudy(SALOMEDS::Study_ptr theStudy,
     // because they could not be modified anyhow.
     std::set<std::string> aToBeInSelected;
     for ( it = aSelected.begin(); it != aSelected.end(); ++it ) {
-      Handle(::GEOM_BaseObject) handle_object = _impl->GetObject( theStudy->StudyId(), (*it).c_str(), false);
+      Handle(::GEOM_BaseObject) handle_object = _impl->GetObject((*it).c_str(), false);
       if ( handle_object.IsNull() )
         continue;
 
@@ -3255,15 +3259,14 @@ void GEOM_Gen_i::includeParentDependencies(GEOM::GEOM_BaseObject_ptr geomObj,
 // function : includeSubObjects
 // purpose  :
 //==============================================================================
-void GEOM_Gen_i::includeSubObjects(SALOMEDS::Study_ptr theStudy,
-                                   const std::string& aSelectedEntry,
+void GEOM_Gen_i::includeSubObjects(const std::string& aSelectedEntry,
                                    std::set<std::string>& aSelected,
                                    std::set<std::string>& aParents,
                                    std::set<std::string>& aChildren,
                                    std::set<std::string>& anOthers)
 {
   std::set<std::string>::iterator foundIt;
-  Handle(::GEOM_BaseObject) handle_object = _impl->GetObject( theStudy->StudyId(), aSelectedEntry.c_str(), false);
+  Handle(::GEOM_BaseObject) handle_object = _impl->GetObject(aSelectedEntry.c_str(), false);
   if ( handle_object.IsNull() )
     return;
 
@@ -3291,7 +3294,7 @@ void GEOM_Gen_i::includeSubObjects(SALOMEDS::Study_ptr theStudy,
               anOthers.erase( foundIt );
       }
     }
-    includeSubObjects( theStudy, aSubEntryStr, aSelected, aParents, aChildren, anOthers );
+    includeSubObjects( aSubEntryStr, aSelected, aParents, aChildren, anOthers );
   }
 }
 //=====================================================================================
index 778d571979149b14dccb2bf0171cd5c4fcf7491d..c65e9500cdc3f7e3d251b6d49643af5b797de45e 100644 (file)
@@ -71,7 +71,6 @@ class GEOM_I_EXPORT GEOM_GenericOperationsCreator
  public:
   // Create operations
   virtual GEOM_IOperations_i* Create (PortableServer::POA_ptr thePOA,
-                                      int                     theStudyId,
                                       GEOM::GEOM_Gen_ptr      theEngine,
                                       ::GEOMImpl_Gen*         theGenImpl) = 0;
   // return the name of IDL module
@@ -110,6 +109,9 @@ class GEOM_I_EXPORT GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual publi
   // Get Naming Service object
   SALOME_NamingService* GetNS() { return name_service; }
 
+  // Get Study
+  SALOMEDS::Study_var getStudyServant();
+
   //-----------------------------------------------------------------------//
   // Inherited methods from SALOMEDS::Driver                               //
   //-----------------------------------------------------------------------//
@@ -146,13 +148,11 @@ class GEOM_I_EXPORT GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual publi
                                CORBA::Boolean isASCII);
 
   bool CanPublishInStudy(CORBA::Object_ptr theIOR);
-  SALOMEDS::SObject_ptr PublishInStudy(SALOMEDS::Study_ptr theStudy,
-                                       SALOMEDS::SObject_ptr theSObject,
+  SALOMEDS::SObject_ptr PublishInStudy(SALOMEDS::SObject_ptr theSObject,
                                        CORBA::Object_ptr theObject,
                                        const char* theName) throw (SALOME::SALOME_Exception) ;
 
-  GEOM::ListOfGO* PublishNamedShapesInStudy(SALOMEDS::Study_ptr theStudy,
-                                            CORBA::Object_ptr theObject);
+  GEOM::ListOfGO* PublishNamedShapesInStudy(CORBA::Object_ptr theObject);
 
   CORBA::Boolean CanCopy(SALOMEDS::SObject_ptr theObject);
   SALOMEDS::TMPFile* CopyFrom(SALOMEDS::SObject_ptr theObject, CORBA::Long& theObjectID);
@@ -164,16 +164,14 @@ class GEOM_I_EXPORT GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual publi
   /*! \brief Adds theObject in the study with a name = theName, if
    *         theFather is not null the object is placed under theFather
    */
-  SALOMEDS::SObject_ptr AddInStudy (SALOMEDS::Study_ptr       theStudy,
-                                    GEOM::GEOM_BaseObject_ptr theObject,
+  SALOMEDS::SObject_ptr AddInStudy (GEOM::GEOM_BaseObject_ptr theObject,
                                     const char*               theName,
                                     GEOM::GEOM_BaseObject_ptr theFather);
 
   /*! \brief Publish sub-shapes, standing for arguments and sub-shapes of arguments.
    *         To be used from python scripts out of geompy.addToStudy (non-default usage)
    */
-  GEOM::ListOfGO* RestoreSubShapesO (SALOMEDS::Study_ptr     theStudy,
-                                     GEOM::GEOM_Object_ptr   theObject,
+  GEOM::ListOfGO* RestoreSubShapesO (GEOM::GEOM_Object_ptr   theObject,
                                      const GEOM::ListOfGO&   theArgs,
                                      GEOM::find_shape_method theFindMethod,
                                      CORBA::Boolean          theInheritFirstArg,
@@ -182,8 +180,7 @@ class GEOM_I_EXPORT GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual publi
   /*! \brief Publish sub-shapes, standing for given in \a theArgs arguments and sub-shapes.
    *         To be used from python scripts, generated by Dump Python.
    */
-  GEOM::ListOfGO* RestoreGivenSubShapesO (SALOMEDS::Study_ptr     theStudy,
-                                          GEOM::GEOM_Object_ptr   theObject,
+  GEOM::ListOfGO* RestoreGivenSubShapesO (GEOM::GEOM_Object_ptr   theObject,
                                           const GEOM::ListOfGO&   theArgs,
                                           GEOM::find_shape_method theFindMethod,
                                           CORBA::Boolean          theInheritFirstArg,
@@ -192,86 +189,83 @@ class GEOM_I_EXPORT GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual publi
   /*! \brief Publish sub-shapes, standing for arguments and sub-shapes of arguments.
    *         To be used from GUI and from geompy.addToStudy
    */
-  GEOM::ListOfGO* RestoreSubShapesSO (SALOMEDS::Study_ptr     theStudy,
-                                      SALOMEDS::SObject_ptr   theSObject,
+  GEOM::ListOfGO* RestoreSubShapesSO (SALOMEDS::SObject_ptr   theSObject,
                                       const GEOM::ListOfGO&   theArgs,
                                       GEOM::find_shape_method theFindMethod,
                                       CORBA::Boolean          theInheritFirstArg,
                                       CORBA::Boolean          theAddPrefix);
 
   //Collects dependencies of the given objects from other ones
-  SALOMEDS::TMPFile* GetDependencyTree(SALOMEDS::Study_ptr theStudy,
-                                       const GEOM::string_array& theObjectEntries);
+  SALOMEDS::TMPFile* GetDependencyTree(const GEOM::string_array& theObjectEntries);
 
   //-----------------------------------------------------------------------//
   // Transaction methods                                                   //
   //-----------------------------------------------------------------------//
 
-  //Undos one transaction in the document associated with theStudyID
-  virtual void Undo(CORBA::Long theStudyID);
+  //Undos one transaction in the document
+  virtual void Undo();
 
-  //Redos one transaction in the document associated with theStudyID
-  virtual void Redo(CORBA::Long theStudyID);
+  //Redos one transaction in the document
+  virtual void Redo();
 
   //-----------------------------------------------------------------------//
   // Operations methods                                                    //
   //-----------------------------------------------------------------------//
 
   //Returns a pointer to BasicOperations interface
-  virtual GEOM::GEOM_IBasicOperations_ptr GetIBasicOperations (CORBA::Long theStudyID)
+  virtual GEOM::GEOM_IBasicOperations_ptr GetIBasicOperations()
     throw (SALOME::SALOME_Exception);
 
   //Returns a pointer to TransformOperations interface
-  virtual GEOM::GEOM_ITransformOperations_ptr GetITransformOperations (CORBA::Long theStudyID)
+  virtual GEOM::GEOM_ITransformOperations_ptr GetITransformOperations()
     throw (SALOME::SALOME_Exception);
 
   //Returns a pointer to 3DPrimOperations interface
-  virtual GEOM::GEOM_I3DPrimOperations_ptr GetI3DPrimOperations (CORBA::Long theStudyID)
+  virtual GEOM::GEOM_I3DPrimOperations_ptr GetI3DPrimOperations()
     throw (SALOME::SALOME_Exception);
 
   //Returns a pointer to ShapesOperations interface
-  virtual GEOM::GEOM_IShapesOperations_ptr GetIShapesOperations (CORBA::Long theStudyID)
+  virtual GEOM::GEOM_IShapesOperations_ptr GetIShapesOperations()
     throw (SALOME::SALOME_Exception);
 
   //Returns a pointer to BlocksOperations interface
-  virtual GEOM::GEOM_IBlocksOperations_ptr GetIBlocksOperations (CORBA::Long theStudyID)
+  virtual GEOM::GEOM_IBlocksOperations_ptr GetIBlocksOperations()
     throw (SALOME::SALOME_Exception);
 
   //Returns a pointer to BooleanOperations interface
-  virtual GEOM::GEOM_IBooleanOperations_ptr GetIBooleanOperations (CORBA::Long theStudyID)
+  virtual GEOM::GEOM_IBooleanOperations_ptr GetIBooleanOperations()
     throw (SALOME::SALOME_Exception);
 
   //Returns a pointer to CurvesOperations interface
-  virtual GEOM::GEOM_ICurvesOperations_ptr GetICurvesOperations (CORBA::Long theStudyID)
+  virtual GEOM::GEOM_ICurvesOperations_ptr GetICurvesOperations()
     throw (SALOME::SALOME_Exception);
 
   //Returns a pointer to LocalOperations interface
-  virtual GEOM::GEOM_ILocalOperations_ptr GetILocalOperations (CORBA::Long theStudyID)
+  virtual GEOM::GEOM_ILocalOperations_ptr GetILocalOperations()
     throw (SALOME::SALOME_Exception);
 
   //Returns a pointer to HealingOperations interface
-  virtual GEOM::GEOM_IHealingOperations_ptr GetIHealingOperations (CORBA::Long theStudyID)
+  virtual GEOM::GEOM_IHealingOperations_ptr GetIHealingOperations()
     throw (SALOME::SALOME_Exception);
 
   //Returns a pointer to InsertOperations interface
-  virtual GEOM::GEOM_IInsertOperations_ptr GetIInsertOperations (CORBA::Long theStudyID)
+  virtual GEOM::GEOM_IInsertOperations_ptr GetIInsertOperations()
     throw (SALOME::SALOME_Exception);
 
   //Returns a pointer to MeasureOperations interface
-  virtual GEOM::GEOM_IMeasureOperations_ptr GetIMeasureOperations (CORBA::Long theStudyID)
+  virtual GEOM::GEOM_IMeasureOperations_ptr GetIMeasureOperations()
     throw (SALOME::SALOME_Exception);
 
   //Returns a pointer to GroupOperations interface
-  virtual GEOM::GEOM_IGroupOperations_ptr GetIGroupOperations (CORBA::Long theStudyID)
+  virtual GEOM::GEOM_IGroupOperations_ptr GetIGroupOperations()
     throw (SALOME::SALOME_Exception);
 
   //Returns a pointer to FiedlOperations interface
-  virtual GEOM::GEOM_IFieldOperations_ptr GetIFieldOperations (CORBA::Long theStudyID)
+  virtual GEOM::GEOM_IFieldOperations_ptr GetIFieldOperations()
     throw (SALOME::SALOME_Exception);
 
   //Returns a pointer to corresponding plugin operations interface
-  virtual GEOM::GEOM_IOperations_ptr GetPluginOperations (CORBA::Long theStudyID,
-                                                          const char* theLibName)
+  virtual GEOM::GEOM_IOperations_ptr GetPluginOperations (const char* theLibName)
     throw (SALOME::SALOME_Exception);
 
   //Adds a new sub-shape
@@ -284,8 +278,7 @@ class GEOM_I_EXPORT GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual publi
 
   virtual GEOM::GEOM_Object_ptr GetIORFromString(const char* stringIOR);
 
-  virtual Engines::TMPFile* DumpPython(CORBA::Object_ptr theStudy,
-                                       CORBA::Boolean isPublished,
+  virtual Engines::TMPFile* DumpPython(CORBA::Boolean isPublished,
                                        CORBA::Boolean isMultiFile,
                                        CORBA::Boolean& isValidScript);
 
@@ -295,7 +288,7 @@ class GEOM_I_EXPORT GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual publi
 
   // Object information
   virtual bool hasObjectInfo();
-  virtual char* getObjectInfo(CORBA::Long studyId, const char* entry);
+  virtual char* getObjectInfo(const char* entry);
 
   // Version information
   virtual char* getVersion();
@@ -320,8 +313,7 @@ class GEOM_I_EXPORT GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual publi
   /*! \brief Fills 3 lists that is used to clean study of redundant objects.
    *         To be used from GUI.
    */
-  void GetEntriesToReduceStudy(SALOMEDS::Study_ptr theStudy,
-                               GEOM::string_array& theSelectedEntries,
+  void GetEntriesToReduceStudy(GEOM::string_array& theSelectedEntries,
                                GEOM::string_array& theParentEntries,
                                GEOM::string_array& theSubEntries,
                                GEOM::string_array& theOtherEntries);
@@ -330,44 +322,39 @@ class GEOM_I_EXPORT GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual publi
   // Internal methods                                                      //
   //-----------------------------------------------------------------------//
 
-  virtual GEOM::GEOM_BaseObject_ptr GetObject(CORBA::Long theStudyID, const char* theEntry);
+  virtual GEOM::GEOM_BaseObject_ptr GetObject(const char* theEntry);
 
  private:
-  GEOM::ListOfGO* RestoreSubShapes (SALOMEDS::Study_ptr     theStudy,
-                                    GEOM::GEOM_Object_ptr   theObject,
+  GEOM::ListOfGO* RestoreSubShapes (GEOM::GEOM_Object_ptr   theObject,
                                     SALOMEDS::SObject_ptr   theSObject,
                                     const GEOM::ListOfGO&   theArgs,
                                     GEOM::find_shape_method theFindMethod,
                                     CORBA::Boolean          theInheritFirstArg,
                                     CORBA::Boolean          theAddPrefix);
 
-  GEOM::ListOfGO* RestoreSubShapesOneLevel (SALOMEDS::Study_ptr     theStudy,
-                                            SALOMEDS::SObject_ptr   theOldSO,
+  GEOM::ListOfGO* RestoreSubShapesOneLevel (SALOMEDS::SObject_ptr   theOldSO,
                                             SALOMEDS::SObject_ptr   theNewSO,
                                             GEOM::GEOM_Object_ptr   theNewO,
                                             GEOM::ListOfGO&         theOutArgs,
                                             GEOM::find_shape_method theFindMethod,
                                             CORBA::Boolean          theAddPrefix);
 
-  GEOM::ListOfGO* RestoreGivenSubShapes (SALOMEDS::Study_ptr     theStudy,
-                                         GEOM::GEOM_Object_ptr   theObject,
+  GEOM::ListOfGO* RestoreGivenSubShapes (GEOM::GEOM_Object_ptr   theObject,
                                          SALOMEDS::SObject_ptr   theSObject,
                                          const GEOM::ListOfGO&   theArgs,
                                          GEOM::find_shape_method theFindMethod,
                                          CORBA::Boolean          theInheritFirstArg,
                                          CORBA::Boolean          theAddPrefix);
 
-  GEOM::ListOfGO* RestoreGivenSubShapesOneLevel (SALOMEDS::Study_ptr     theStudy,
-                                                 SALOMEDS::SObject_ptr   theOldSO,
+  GEOM::ListOfGO* RestoreGivenSubShapesOneLevel (SALOMEDS::SObject_ptr   theOldSO,
                                                  SALOMEDS::SObject_ptr   theNewSO,
                                                  GEOM::GEOM_Object_ptr   theNewO,
                                                  std::set<std::string>   theArgs,
                                                  GEOM::find_shape_method theFindMethod,
                                                  CORBA::Boolean          theAddPrefix);
 
-  // auxiliary for PublishNamedShapesInStudy
-  void CreateAndPublishGroup(SALOMEDS::Study_ptr theStudy,
-                             GEOM::GEOM_Object_var theMainShape,
+  // auxilary for PublishNamedShapesInStudy
+  void CreateAndPublishGroup(GEOM::GEOM_Object_var theMainShape,
                              const TopTools_IndexedMapOfShape& anIndices,
                              const TopTools_SequenceOfShape& SeqS,
                              const TColStd_SequenceOfAsciiString& SeqN,
@@ -390,8 +377,7 @@ class GEOM_I_EXPORT GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual publi
                                  std::set<std::string>& aChildren,
                                  std::set<std::string>& anOthers);
 
-  void includeSubObjects(SALOMEDS::Study_ptr theStudy,
-                         const std::string& aSelectedEntry,
+  void includeSubObjects(const std::string& aSelectedEntry,
                          std::set<std::string>& aSelected,
                          std::set<std::string>& aParents,
                          std::set<std::string>& aChildren,
index 47aadccca171455b99931bdff8ce7dd9361014da..511f230e68d17f2d6909faf5f3fb83b646040c9b 100644 (file)
@@ -88,16 +88,6 @@ char* GEOM_IOperations_i::GetErrorCode()
   return CORBA::string_dup(_impl->GetErrorCode());
 }
 
-//=============================================================================
-/*!
- *  GetStudyID
- */
-//=============================================================================
-CORBA::Long GEOM_IOperations_i::GetStudyID()
-{
-  return _impl->GetDocID();
-}
-
 //=============================================================================
 /*!
  *  StartOperation
@@ -141,7 +131,7 @@ GEOM_IOperations_i::GetBaseObject(Handle(::GEOM_BaseObject) theObject)
   if (theObject.IsNull()) return GO._retn();
   TCollection_AsciiString anEntry;
   TDF_Tool::Entry(theObject->GetEntry(), anEntry);
-  GO = _engine->GetObject(theObject->GetDocID(), (char*) anEntry.ToCString());
+  GO = _engine->GetObject((char*) anEntry.ToCString());
   return GO._retn();
 }
 
@@ -156,7 +146,7 @@ GEOM_IOperations_i::GetBaseObjectImpl(GEOM::GEOM_BaseObject_ptr theObject)
   Handle(::GEOM_BaseObject) anImpl;
   if (!CORBA::is_nil(theObject)) {
     CORBA::String_var anEntry = theObject->GetEntry();
-    anImpl = GetImpl()->GetEngine()->GetObject( theObject->GetStudyID(), anEntry );
+    anImpl = GetImpl()->GetEngine()->GetObject( anEntry );
   }
   return anImpl;
 }
index 61acf9656d81a7be7143b313af16d7fc4cbe6e7c..71b349378de0ed1d98f136b30e4908c3b084678c 100644 (file)
@@ -45,8 +45,6 @@ class GEOM_I_EXPORT GEOM_IOperations_i : public virtual POA_GEOM::GEOM_IOperatio
   
   virtual char* GetErrorCode();
 
-  virtual CORBA::Long GetStudyID();    
-
   virtual GEOM::GEOM_BaseObject_ptr GetBaseObject(Handle(::GEOM_BaseObject) theObject);
   virtual Handle(::GEOM_BaseObject) GetBaseObjectImpl(GEOM::GEOM_BaseObject_ptr theObject);
   virtual GEOM::GEOM_Object_ptr GetObject(Handle(::GEOM_Object) theObject);
index 165613dc60e94d13267cef658b3e77a1174dcd43..63000e35b60da47ffbb0989eeff910c6dbb967fc 100644 (file)
@@ -178,7 +178,7 @@ char* GEOM_Object_i::GetSubShapeName(CORBA::Long subID)
   {
     TCollection_AsciiString anEntry = anIt.Value();
     Handle(::GEOM_BaseObject) anObj =
-      GEOM_Engine::GetEngine()->GetObject( _impl->GetDocID(), anEntry.ToCString(), false );
+      GEOM_Engine::GetEngine()->GetObject( anEntry.ToCString(), false );
     if ( anObj.IsNull() ) continue;
 
     TCollection_AsciiString aSubName = anObj->GetName();
@@ -395,7 +395,7 @@ GEOM::GEOM_Object_ptr GEOM_Object_i::GetMainShape()
     TCollection_AsciiString anEntry;
     TDF_Tool::Entry(aLabel, anEntry);
     return GEOM::GEOM_Object::_narrow
-      ( _engine->GetObject(_impl->GetDocID(), anEntry.ToCString()) );
+      ( _engine->GetObject( anEntry.ToCString()) );
   }
 
   return obj._retn();
@@ -414,7 +414,7 @@ bool GEOM_Object_i::IsSame(GEOM::GEOM_BaseObject_ptr other)
   if ( !CORBA::is_nil( shapePtr ) ) {
     CORBA::String_var entry = shapePtr->GetEntry();
     Handle(::GEOM_Object) otherObject = Handle(::GEOM_Object)::DownCast
-      ( GEOM_Engine::GetEngine()->GetObject( shapePtr->GetStudyID(), entry, false ));
+      ( GEOM_Engine::GetEngine()->GetObject( entry, false ));
     if ( !otherObject.IsNull() ) {
       TopoDS_Shape thisShape  = _impl->GetValue();
       TopoDS_Shape otherShape = otherObject->GetValue();
index 426aebb561fb12f229ff91b7b8650164175563a0..4ac505db4f2353c73d12f4955f7e85fa9707ad75 100644 (file)
@@ -51,9 +51,6 @@ GEOM_Superv_i::GEOM_Superv_i(CORBA::ORB_ptr orb,
 
   setGeomEngine();
 
-  myStudyID = -1;
-  myLastStudyID = -1;
-
   myBasicOp = GEOM::GEOM_IBasicOperations::_nil();
   my3DPrimOp = GEOM::GEOM_I3DPrimOperations::_nil();
   myBoolOp = GEOM::GEOM_IBooleanOperations::_nil();
@@ -111,50 +108,6 @@ void GEOM_Superv_i::setGeomEngine()
   myGeomEngine = GEOM::GEOM_Gen::_narrow(comp);
 }
 
-//=============================================================================
-//  SetStudyID:
-//=============================================================================
-void GEOM_Superv_i::SetStudyID( CORBA::Long theId )
-{
-  // mkr : PAL10770 -->
-  myLastStudyID = myStudyID;
-
-  CORBA::Object_ptr anObject = name_service->Resolve("/Kernel/Session");
-  if ( !CORBA::is_nil(anObject) ) {
-    SALOME::Session_var aSession = SALOME::Session::_narrow(anObject);
-    if ( !CORBA::is_nil(aSession) ) {
-      int aStudyID = aSession->GetActiveStudyId();
-      if ( theId != aStudyID && aStudyID > 0) { // mkr : IPAL12128
-        MESSAGE("Warning : given study ID theId="<<theId<<" is wrong and will be replaced by the value "<<aStudyID);
-        myStudyID = aStudyID;
-      }
-      else
-        myStudyID = theId; // mkr : IPAL12128
-    }
-  }
-
-  if ( isNewStudy(myLastStudyID,myStudyID) ) {
-    if (CORBA::is_nil(myGeomEngine)) setGeomEngine();
-    std::string anEngine = _orb->object_to_string( myGeomEngine );
-
-    CORBA::Object_var anObj = name_service->Resolve("/myStudyManager");
-    if ( !CORBA::is_nil(anObj) ) {
-      SALOMEDS::StudyManager_var aStudyManager = SALOMEDS::StudyManager::_narrow(anObj);
-      if ( !CORBA::is_nil(aStudyManager) ) {
-        _PTR(Study) aDSStudy = ClientFactory::Study(aStudyManager->GetStudyByID(myStudyID));
-        if ( aDSStudy ) {
-          _PTR(SComponent) aSCO = aDSStudy->FindComponent(myGeomEngine->ComponentDataType());
-          if ( aSCO ) {
-            _PTR(StudyBuilder) aBuilder = aDSStudy->NewBuilder();
-            if ( aBuilder ) aBuilder->LoadWith( aSCO, anEngine );
-          }
-        }
-      }
-    }
-  }
-  // mkr : PAL10770 <--
-}
-
 //=============================================================================
 //  CreateListOfGO:
 //=============================================================================
@@ -236,11 +189,8 @@ void GEOM_Superv_i::getBasicOp()
   if (CORBA::is_nil(myGeomEngine))
     setGeomEngine();
   // get GEOM_IBasicOperations interface
-  if (CORBA::is_nil(myBasicOp) || isNewStudy(myLastStudyID,myStudyID)) {
-    //rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
-    //     Try to get id of the study from the SALOME Session
-    if(myStudyID < 0 ) SetStudyID(-1);
-    myBasicOp = myGeomEngine->GetIBasicOperations(myStudyID);
+  if (CORBA::is_nil(myBasicOp)) {
+    myBasicOp = myGeomEngine->GetIBasicOperations();
   }
 }
 
@@ -252,11 +202,8 @@ void GEOM_Superv_i::get3DPrimOp()
   if (CORBA::is_nil(myGeomEngine))
     setGeomEngine();
   // get GEOM_I3DPrimOperations interface
-  if (CORBA::is_nil(my3DPrimOp) || isNewStudy(myLastStudyID,myStudyID)) {
-    //rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
-    //     Try to get id of the study from the SALOME Session
-    if(myStudyID < 0 ) SetStudyID(-1);
-    my3DPrimOp = myGeomEngine->GetI3DPrimOperations(myStudyID);
+  if (CORBA::is_nil(my3DPrimOp)) {
+    my3DPrimOp = myGeomEngine->GetI3DPrimOperations();
   }
 }
 
@@ -268,11 +215,8 @@ void GEOM_Superv_i::getBoolOp()
   if (CORBA::is_nil(myGeomEngine))
     setGeomEngine();
   // get GEOM_IBooleanOperations interface
-  if (CORBA::is_nil(myBoolOp) || isNewStudy(myLastStudyID,myStudyID)) {
-    //rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
-    //     Try to get id of the study from the SALOME Session
-    if(myStudyID < 0 ) SetStudyID(-1);
-    myBoolOp = myGeomEngine->GetIBooleanOperations(myStudyID);
+  if (CORBA::is_nil(myBoolOp)) {
+    myBoolOp = myGeomEngine->GetIBooleanOperations();
   }
 }
 
@@ -284,11 +228,8 @@ void GEOM_Superv_i::getInsOp()
   if (CORBA::is_nil(myGeomEngine))
     setGeomEngine();
   // get GEOM_IInsertOperations interface
-  if (CORBA::is_nil(myInsOp) || isNewStudy(myLastStudyID,myStudyID)) {
-    //rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
-    //     Try to get id of the study from the SALOME Session
-    if(myStudyID < 0 ) SetStudyID(-1);
-    myInsOp = myGeomEngine->GetIInsertOperations(myStudyID);
+  if (CORBA::is_nil(myInsOp)) {
+    myInsOp = myGeomEngine->GetIInsertOperations();
   }
 }
 
@@ -300,11 +241,8 @@ void GEOM_Superv_i::getTransfOp()
   if (CORBA::is_nil(myGeomEngine))
     setGeomEngine();
   // get GEOM_ITransformOperations interface
-  if (CORBA::is_nil(myTransfOp) || isNewStudy(myLastStudyID,myStudyID)) {
-    //rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
-    //     Try to get id of the study from the SALOME Session
-    if(myStudyID < 0 ) SetStudyID(-1);
-    myTransfOp = myGeomEngine->GetITransformOperations(myStudyID);
+  if (CORBA::is_nil(myTransfOp)) {
+    myTransfOp = myGeomEngine->GetITransformOperations();
   }
 }
 
@@ -316,11 +254,8 @@ void GEOM_Superv_i::getShapesOp()
   if (CORBA::is_nil(myGeomEngine))
     setGeomEngine();
   // get GEOM_IShapesOperations interface
-  if (CORBA::is_nil(myShapesOp) || isNewStudy(myLastStudyID,myStudyID)) {
-    //rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
-    //     Try to get id of the study from the SALOME Session
-    if(myStudyID < 0 ) SetStudyID(-1);
-    myShapesOp = myGeomEngine->GetIShapesOperations(myStudyID);
+  if (CORBA::is_nil(myShapesOp)) {
+    myShapesOp = myGeomEngine->GetIShapesOperations();
   }
 }
 
@@ -332,11 +267,8 @@ void GEOM_Superv_i::getBlocksOp()
   if (CORBA::is_nil(myGeomEngine))
     setGeomEngine();
   // get GEOM_IBlocksOperations interface
-  if (CORBA::is_nil(myBlocksOp) || isNewStudy(myLastStudyID,myStudyID)) {
-    //rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
-    //     Try to get id of the study from the SALOME Session
-    if(myStudyID < 0 ) SetStudyID(-1);
-    myBlocksOp = myGeomEngine->GetIBlocksOperations(myStudyID);
+  if (CORBA::is_nil(myBlocksOp)) {
+    myBlocksOp = myGeomEngine->GetIBlocksOperations();
   }
 }
 
@@ -348,11 +280,8 @@ void GEOM_Superv_i::getCurvesOp()
   if (CORBA::is_nil(myGeomEngine))
     setGeomEngine();
   // get GEOM_ICurvesOperations interface
-  if (CORBA::is_nil(myCurvesOp) || isNewStudy(myLastStudyID,myStudyID)) {
-    //rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
-    //     Try to get id of the study from the SALOME Session
-    if(myStudyID < 0 ) SetStudyID(-1);
-    myCurvesOp = myGeomEngine->GetICurvesOperations(myStudyID);
+  if (CORBA::is_nil(myCurvesOp)) {
+    myCurvesOp = myGeomEngine->GetICurvesOperations();
   }
 }
 
@@ -364,11 +293,8 @@ void GEOM_Superv_i::getLocalOp()
   if (CORBA::is_nil(myGeomEngine))
     setGeomEngine();
   // get GEOM_ILocalOperations interface
-  if (CORBA::is_nil(myLocalOp) || isNewStudy(myLastStudyID,myStudyID)) {
-    //rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
-    //     Try to get id of the study from the SALOME Session
-    if(myStudyID < 0 ) SetStudyID(-1);
-    myLocalOp = myGeomEngine->GetILocalOperations(myStudyID);
+  if (CORBA::is_nil(myLocalOp)) {
+    myLocalOp = myGeomEngine->GetILocalOperations();
   }
 }
 
@@ -380,11 +306,8 @@ void GEOM_Superv_i::getGroupOp()
   if (CORBA::is_nil(myGeomEngine))
     setGeomEngine();
   // get GEOM_IGroupOperations interface
-  if (CORBA::is_nil(myGroupOp) || isNewStudy(myLastStudyID,myStudyID)) {
-    //rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
-    //     Try to get id of the study from the SALOME Session
-    if(myStudyID < 0 ) SetStudyID(-1);
-    myGroupOp = myGeomEngine->GetIGroupOperations(myStudyID);
+  if (CORBA::is_nil(myGroupOp)) {
+    myGroupOp = myGeomEngine->GetIGroupOperations();
   }
 }
 
@@ -396,11 +319,8 @@ void GEOM_Superv_i::getAdvancedOp()
   if (CORBA::is_nil(myGeomEngine))
     setGeomEngine();
   // get GEOM::IAdvancedOperations interface
-  if (CORBA::is_nil(myAdvancedOp) || isNewStudy(myLastStudyID,myStudyID)) {
-    //rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
-    //     Try to get id of the study from the SALOME Session
-    if(myStudyID < 0 ) SetStudyID(-1);
-    myAdvancedOp = GEOM::IAdvancedOperations::_narrow(myGeomEngine->GetPluginOperations(myStudyID, "AdvancedEngine"));
+  if (CORBA::is_nil(myAdvancedOp)) {
+    myAdvancedOp = GEOM::IAdvancedOperations::_narrow(myGeomEngine->GetPluginOperations("AdvancedEngine"));
   }
 }
 
@@ -412,11 +332,8 @@ void GEOM_Superv_i::getSTLPluginOp()
   if (CORBA::is_nil(myGeomEngine))
     setGeomEngine();
   // get GEOM::ISTLOperations interface
-  if (CORBA::is_nil(mySTLOp) || isNewStudy(myLastStudyID,myStudyID)) {
-    //rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
-    //     Try to get id of the study from the SALOME Session
-    if(myStudyID < 0 ) SetStudyID(-1);
-    mySTLOp = GEOM::ISTLOperations::_narrow(myGeomEngine->GetPluginOperations(myStudyID, "STLPluginEngine"));
+  if (CORBA::is_nil(mySTLOp)) {
+    mySTLOp = GEOM::ISTLOperations::_narrow(myGeomEngine->GetPluginOperations("STLPluginEngine"));
   }
 }
 
@@ -428,11 +345,8 @@ void GEOM_Superv_i::getBREPPluginOp()
   if (CORBA::is_nil(myGeomEngine))
     setGeomEngine();
   // get GEOM:IBREPOperations interface
-  if (CORBA::is_nil(myBREPOp) || isNewStudy(myLastStudyID,myStudyID)) {
-    //rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
-    //     Try to get id of the study from the SALOME Session
-    if(myStudyID < 0 ) SetStudyID(-1);
-    myBREPOp = GEOM::IBREPOperations::_narrow(myGeomEngine->GetPluginOperations(myStudyID, "BREPPluginEngine"));
+  if (CORBA::is_nil(myBREPOp)) {
+    myBREPOp = GEOM::IBREPOperations::_narrow(myGeomEngine->GetPluginOperations("BREPPluginEngine"));
   }
 }
 
@@ -444,11 +358,8 @@ void GEOM_Superv_i::getSTEPPluginOp()
   if (CORBA::is_nil(myGeomEngine))
     setGeomEngine();
   // get GEOM::ISTEPOperations interface
-  if (CORBA::is_nil(mySTEPOp) || isNewStudy(myLastStudyID,myStudyID)) {
-    //rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
-    //     Try to get id of the study from the SALOME Session
-    if(myStudyID < 0 ) SetStudyID(-1);
-    mySTEPOp = GEOM::ISTEPOperations::_narrow(myGeomEngine->GetPluginOperations(myStudyID, "STEPPluginEngine"));
+  if (CORBA::is_nil(mySTEPOp)) {
+    mySTEPOp = GEOM::ISTEPOperations::_narrow(myGeomEngine->GetPluginOperations("STEPPluginEngine"));
   }
 }
 
@@ -460,11 +371,8 @@ void GEOM_Superv_i::getIGESPluginOp()
   if (CORBA::is_nil(myGeomEngine))
     setGeomEngine();
   // get GEOM::IIGESOperations interface
-  if (CORBA::is_nil(myIGESOp) || isNewStudy(myLastStudyID,myStudyID)) {
-    //rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
-    //     Try to get id of the study from the SALOME Session
-    if(myStudyID < 0 ) SetStudyID(-1);
-    myIGESOp = GEOM::IIGESOperations::_narrow(myGeomEngine->GetPluginOperations(myStudyID, "IGESPluginEngine"));
+  if (CORBA::is_nil(myIGESOp)) {
+    myIGESOp = GEOM::IIGESOperations::_narrow(myGeomEngine->GetPluginOperations("IGESPluginEngine"));
   }
 }
 
@@ -476,11 +384,8 @@ void GEOM_Superv_i::getXAOPluginOp()
   if (CORBA::is_nil(myGeomEngine))
     setGeomEngine();
   // get GEOM::IXAOOperations interface
-  if (CORBA::is_nil(myXAOOp) || isNewStudy(myLastStudyID,myStudyID)) {
-    //rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
-    //     Try to get id of the study from the SALOME Session
-    if(myStudyID < 0 ) SetStudyID(-1);
-    myXAOOp = GEOM::IXAOOperations::_narrow(myGeomEngine->GetPluginOperations(myStudyID, "XAOPluginEngine"));
+  if (CORBA::is_nil(myXAOOp)) {
+    myXAOOp = GEOM::IXAOOperations::_narrow(myGeomEngine->GetPluginOperations("XAOPluginEngine"));
   }
 }
 
@@ -493,11 +398,8 @@ void GEOM_Superv_i::getVTKPluginOp()
   if (CORBA::is_nil(myGeomEngine))
     setGeomEngine();
   // get GEOM::IVTKOperations interface
-  if (CORBA::is_nil(myVTKOp) || isNewStudy(myLastStudyID,myStudyID)) {
-    //rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
-    //     Try to get id of the study from the SALOME Session
-    if(myStudyID < 0 ) SetStudyID(-1);
-    myVTKOp = GEOM::IVTKOperations::_narrow(myGeomEngine->GetPluginOperations(myStudyID, "VTKPluginEngine"));
+  if (CORBA::is_nil(myVTKOp)) {
+    myVTKOp = GEOM::IVTKOperations::_narrow(myGeomEngine->GetPluginOperations("VTKPluginEngine"));
   }
 }
 #endif
@@ -619,14 +521,13 @@ CORBA::Boolean GEOM_Superv_i::CanPublishInStudy(CORBA::Object_ptr theIOR)
 // function : PublishInStudy
 // purpose  :
 //============================================================================
-SALOMEDS::SObject_ptr GEOM_Superv_i::PublishInStudy(SALOMEDS::Study_ptr theStudy,
-                                                    SALOMEDS::SObject_ptr theSObject,
+SALOMEDS::SObject_ptr GEOM_Superv_i::PublishInStudy(SALOMEDS::SObject_ptr theSObject,
                                                     CORBA::Object_ptr theObject,
                                                     const char* theName) throw (SALOME::SALOME_Exception)
 {
   if (CORBA::is_nil(myGeomEngine))
     setGeomEngine();
-  return myGeomEngine->PublishInStudy(theStudy, theSObject, theObject, theName);
+  return myGeomEngine->PublishInStudy(theSObject, theObject, theName);
 }
 
 //============================================================================
@@ -634,13 +535,12 @@ SALOMEDS::SObject_ptr GEOM_Superv_i::PublishInStudy(SALOMEDS::Study_ptr theStudy
 // purpose  :
 //============================================================================
 GEOM::ListOfGO*
-GEOM_Superv_i::PublishNamedShapesInStudy(SALOMEDS::Study_ptr theStudy,
-                                         //SALOMEDS::SObject_ptr theSObject,
+GEOM_Superv_i::PublishNamedShapesInStudy(//SALOMEDS::SObject_ptr theSObject,
                                          CORBA::Object_ptr theObject)
 {
   if (CORBA::is_nil(myGeomEngine))
     setGeomEngine();
-  return myGeomEngine->PublishNamedShapesInStudy(theStudy, theObject);
+  return myGeomEngine->PublishNamedShapesInStudy(theObject);
 }
 
 //============================================================================
index 8d712acdeb27ebf049dbeb8967b60d28b3670c9d..06885535d9d333456889dffa77bcac3e55a4266a 100644 (file)
@@ -81,11 +81,6 @@ public:
   PortableServer::ServantBase_var GetServant(CORBA::Object_ptr       theObject,
                                              PortableServer::POA_ptr thePOA);
 
-  //-----------------------------------------------------------------------//
-  // Set current stydy ID                                                  //
-  //-----------------------------------------------------------------------//
-  void SetStudyID( CORBA::Long theId );
-
   //-----------------------------------------------------------//
   // Create ListOfGO and add items to it                       //
   //-----------------------------------------------------------//
@@ -143,13 +138,11 @@ public:
                                CORBA::Boolean isASCII);
 
   CORBA::Boolean CanPublishInStudy(CORBA::Object_ptr theIOR);
-  SALOMEDS::SObject_ptr PublishInStudy(SALOMEDS::Study_ptr theStudy,
-                                       SALOMEDS::SObject_ptr theSObject,
+  SALOMEDS::SObject_ptr PublishInStudy(SALOMEDS::SObject_ptr theSObject,
                                        CORBA::Object_ptr theObject,
                                        const char* theName) throw (SALOME::SALOME_Exception) ;
 
-  GEOM::ListOfGO* PublishNamedShapesInStudy(SALOMEDS::Study_ptr theStudy,
-                                            //SALOMEDS::SObject_ptr theSObject,
+  GEOM::ListOfGO* PublishNamedShapesInStudy(//SALOMEDS::SObject_ptr theSObject,
                                             CORBA::Object_ptr theObject);
 
   CORBA::Boolean CanCopy(SALOMEDS::SObject_ptr theObject);
@@ -791,8 +784,6 @@ public:
 private:
   SALOME_NamingService *  name_service;
   GEOM::GEOM_Gen_var      myGeomEngine;
-  CORBA::Long             myStudyID;
-  CORBA::Long             myLastStudyID; // mkr : PAL10770
   PortableServer::POA_var myPOA;
 
   GEOM::GEOM_IBasicOperations_var     myBasicOp;
index 27d70d002ecd8c69b14f3542e423be635d15b9ba..bdbf39b3a435b9167a78735f468f46131f61bfc5 100644 (file)
@@ -38,9 +38,10 @@ from salome.kernel.logger import Logger
 from salome.kernel import termcolor
 logger = Logger("salome.geom.geomtools", color = termcolor.RED)
 
-from salome.kernel.studyedit import getActiveStudyId, getStudyEditor
+from salome.kernel.studyedit import getStudyEditor
 from salome.kernel.services import IDToObject, IDToSObject
 from salome.kernel.deprecation import is_called_by_sphinx
+from salome.geom import geomBuilder
 
 try:
     if not is_called_by_sphinx():
@@ -50,29 +51,16 @@ try:
 except:
     pass
 
-_geompys = {}
+_geompy = geomBuilder.New()
 
-## Return an object behaving exactly like geompy module, except that it is
-#  associated with the study \em studyId. If \em studyId is \b None, return
-#  a pseudo geompy object for the current study.
+## Return an object behaving exactly like geompy module.
 #  \ingroup geomtools
-def getGeompy(studyId = None):
+def getGeompy():
     """
-    Return an object behaving exactly like geompy module, except that it is
-    associated with the study `studyId`. If `studyId` is :const:`None`, return
-    a pseudo geompy object for the current study.
+    Return an object behaving exactly like geompy module.
     """
-    # We can't use geompy module because it initializes GEOM with
-    # salome.myStudy, which may not exist. So we use this trick to create
-    # a pseudo geompy module. 
     salome.salome_init()
-    if studyId is None:
-        studyId = getActiveStudyId()
-    if not _geompys.has_key(studyId):
-        from salome.geom import geomBuilder
-        study = salome.myStudyManager.GetStudyByID(studyId)
-        _geompys[studyId] = geomBuilder.New(study)
-    return _geompys[studyId]
+    return _geompy
 
 
 ModeWireFrame = 0
@@ -146,8 +134,7 @@ class GeomStudyTools:
         :param  folderName: the name of a folder in the GEOM part of the study
         """
         study   = self.editor.study
-        studyId = study._get_StudyId()
-        geompy  = getGeompy(studyId)
+        geompy  = getGeompy()
 
         if folderName is None:
             # Insert the shape in the study by the standard way
@@ -183,7 +170,6 @@ class GeomStudyTools:
         The underlying GEOM object is returned (so that it can be destroyed)
         """
         study = self.editor.study
-        studyId = study._get_StudyId()
         shape = self.getGeomObjectFromEntry(shapeStudyEntry)    
         studyObject = IDToSObject(shapeStudyEntry)
         self.editor.removeItem(studyObject,True)
@@ -337,13 +323,13 @@ def TEST_createBox():
     box = geompy.MakeBoxDXDYDZ(200, 200, 200)
     geompy.addToStudy( box, 'box' )    
     if salome.sg.hasDesktop():
-        salome.sg.updateObjBrowser(True)
+        salome.sg.updateObjBrowser()
 
 
 def TEST_getGeomObjectSelected():
     tool = GeomStudyTools()
     myGeomObject = tool.getGeomObjectSelected()
-    print myGeomObject
+    print(myGeomObject)
 
 ## This test is a simple use case that illustrates how to create a
 #  GEOM shape in a SALOME session (create the GEOM object, put in in
@@ -364,13 +350,12 @@ def TEST_createAndDeleteShape():
     import salome
     salome.salome_init()
     study   = salome.myStudy
-    studyId = salome.myStudyId
 
     from salome.geom import geomtools
-    geompy = geomtools.getGeompy(studyId)
+    geompy = geomtools.getGeompy()
     
     from salome.kernel.studyedit import getStudyEditor
-    studyEditor = getStudyEditor(studyId)
+    studyEditor = getStudyEditor()
 
     gst = geomtools.GeomStudyTools(studyEditor)
 
index 2e4c98292ac474994e0b41bb88e0706cd7a5369e..6dd29d0b7f9b312d1cfce06e4b9935ecc73b8f00 100644 (file)
@@ -48,7 +48,7 @@ Example::
 
     # Put it in the study
     from salome.geom import geomBuilder
-    geompy = geomBuilder.New(salome.myStudy)
+    geompy = geomBuilder.New()
     geompy.addToStudy( wire, 'mysketch' )
 
 Additional examples can be found as unit tests in the source code.
@@ -62,7 +62,7 @@ try:
         salome.salome_init()
         import GEOM
         from salome.geom import geomBuilder
-        geompy = geomBuilder.New(salome.myStudy)
+        geompy = geomBuilder.New()
         pass
     pass
 except:
@@ -137,11 +137,11 @@ def TEST_toString():
 
     expectedResult = "Sketcher:F 1.234 4.321:TT 2.234 5.321"
     result = mysketcher.toString()
-    print "sketcher=",mysketcher.toString()
+    print("sketcher=",mysketcher.toString())
     if result == expectedResult:
-        print "OK"
+        print("OK")
     else:
-        print "Not OK"
+        print("Not OK")
 
 def TEST_usingGeom():
     mysketcher = Sketcher()
index 80fa0612e1bcbc6e92c6331d9fac11ffcfe1ce6b..04d12a1ff66ad060d619ff8e244e572043f2b377 100644 (file)
@@ -50,7 +50,7 @@
 #  structElemManager = StructuralElementManager()
 #  elem = structElemManager.createElement(commandList)
 #  elem.display()
-#  salome.sg.updateObjBrowser(True)
+#  salome.sg.updateObjBrowser()
 #  \endcode
 #
 #  \defgroup orientation
@@ -90,7 +90,7 @@ Example::
     structElemManager = StructuralElementManager()
     elem = structElemManager.createElement(commandList)
     elem.display()
-    salome.sg.updateObjBrowser(True)
+    salome.sg.updateObjBrowser()
 
 """
 
@@ -112,23 +112,15 @@ from salome.geom.structelem.parts import InvalidParameterError
 import GEOM
 
 ## This class manages the structural elements in the study. It is used to
-#  create a new structural element from a list of commands. The parameter
-#  \em studyId defines the ID of the study in which the manager will create
-#  structural elements. If it is \b None or not specified, it will use
-#  the ID of the current study as defined by 
-#  \b salome.kernel.studyedit.getActiveStudyId() function.
+#  create a new structural element from a list of commands.
 #  \ingroup structelem
 class StructuralElementManager:
     """
     This class manages the structural elements in the study. It is used to
-    create a new structural element from a list of commands. The parameter
-    `studyId` defines the ID of the study in which the manager will create
-    structural elements. If it is :const:`None` or not specified, it will use
-    the ID of the current study as defined by
-    :func:`salome.kernel.studyedit.getActiveStudyId` function.
+    create a new structural element from a list of commands.
     """
-    def __init__(self, studyId = None):
-        self._studyEditor = getStudyEditor(studyId)
+    def __init__(self):
+        self._studyEditor = getStudyEditor()
 
     ## Create a structural element from the list of commands \em commandList.
     #  Each command in this list represent a part of the structural element,
@@ -218,7 +210,7 @@ class StructuralElementManager:
         logger.debug("StructuralElementManager.createElement: START")
         logger.debug("Command list: %s" % commandList)
 
-        element = StructuralElement(self._studyEditor.studyId)
+        element = StructuralElement()
         orientationCmdList = []
         for command in commandList:
             (parttype, parameters) = command
@@ -252,11 +244,10 @@ class StructuralElementManager:
                     
                     # Create the part
                     try:
-                        part = parts.__dict__[parttype](
-                                        self._studyEditor.studyId, meshGroup,
-                                        groupGeomObj, newparams)
+                        part = parts.__dict__[parttype](meshGroup,
+                                                        groupGeomObj, newparams)
                         element.addPart(part)
-                    except InvalidParameterError, e:
+                    except InvalidParameterError as e:
                         logger.error("Invalid parameter error: %s" % e)
                         raise
                     except:
@@ -304,7 +295,7 @@ class StructuralElementManager:
         elif groupMailleParam is not None and meshGroupParam is None:
             meshGroupParam = groupMailleParam
         
-        if isinstance(meshGroupParam, types.StringTypes):
+        if isinstance(meshGroupParam, str):
             meshGroupList = [meshGroupParam]
         else:
             meshGroupList = meshGroupParam
@@ -317,30 +308,22 @@ class StructuralElementManager:
 
 
 ## This class represents a structural element, i.e. a set of geometrical
-#  objects built along geometrical primitives. The parameter \em studyId
-#  defines the ID of the study that will contain the structural element. If
-#  it is \b None or not specified, the constructor will use the ID of
-#  the active study as defined by \b salome.kernel.studyedit.getActiveStudyId
-#  function. Structural elements are normally created by the class
-#  StructuralElementManager, so this class should not be
-#  instantiated directly in the general case.
+#  objects built along geometrical primitives. Structural elements are 
+#  normally created by the class StructuralElementManager, so this class 
+#  should not be instantiated directly in the general case.
 #  \ingroup structelem
 class StructuralElement:
     """
     This class represents a structural element, i.e. a set of geometrical
-    objects built along geometrical primitives. The parameter `studyId`
-    defines the ID of the study that will contain the structural element. If
-    it is :const:`None` or not specified, the constructor will use the ID of
-    the active study as defined by :func:`salome.kernel.studyedit.getActiveStudyId`
-    function. Structural elements are normally created by the class
-    :class:`StructuralElementManager`, so this class should not be
-    instantiated directly in the general case.
+    objects built along geometrical primitives. Structural elements 
+    are normally created by the class :class:`StructuralElementManager`, 
+    so this class should not be instantiated directly in the general case.
     """
     _counter = 1
 
     MAIN_FOLDER_NAME = "Structural Elements"
 
-    def __init__(self, studyId = None):
+    def __init__(self):
         # _parts is the dictionary mapping group name to structural element
         # part. _shapeDict is the dictionary mapping SubShapeID objects to
         # structural element parts. Both are used to avoid duplicate shapes
@@ -349,9 +332,8 @@ class StructuralElement:
         self._shapeDict = {}
         self._id = StructuralElement._counter
         StructuralElement._counter += 1
-        self._studyEditor = getStudyEditor(studyId)
-        logger.debug("Creating structural element in study %s" %
-                     self._studyEditor.studyId)
+        self._studyEditor = getStudyEditor()
+        logger.debug("Creating structural element in study")
         self._SObject = None
 
     ## Find or create the study object corresponding to the structural
@@ -364,7 +346,7 @@ class StructuralElement:
         numerical ID. 
         """
         if self._SObject is None:
-            geompy = getGeompy(self._studyEditor.studyId)
+            geompy = getGeompy()
             geomComponent = self._studyEditor.study.FindComponent("GEOM")
             mainFolder = self._studyEditor.findItem(geomComponent,
                                                     name = StructuralElement.MAIN_FOLDER_NAME,
@@ -388,13 +370,13 @@ class StructuralElement:
         newshapes = newpart.baseShapesSet
 
         # Check duplicate groups
-        if self._parts.has_key(newpart.groupName):
+        if newpart.groupName in self._parts:
             logger.warning('Mesh group "%s" is used several times in the '
                            'structural element. Only the last definition '
                            'will be used.' % newpart.groupName)
         else:
             # Check duplicate shapes
-            intersect = newshapes.intersection(self._shapeDict.keys())
+            intersect = newshapes.intersection(list(self._shapeDict.keys()))
             while len(intersect) > 0:
                 shape, = intersect
                 oldpartwithshape = self._shapeDict[shape]
@@ -438,7 +420,7 @@ class StructuralElement:
                              :class:`~orientation.Orientation1D`.
 
         """
-        if self._parts.has_key(meshGroup):
+        if meshGroup in self._parts:
             self._parts[meshGroup].addOrientation(orientParams)
         else:
             logger.warning('Mesh group "%s" not found in structural element, '
@@ -452,8 +434,9 @@ class StructuralElement:
         different parts of the structural element, and add them to the study.
         """
         gg = salome.ImportComponentGUI("GEOM")
-        geompy = getGeompy(self._studyEditor.studyId)
-        for part in self._parts.itervalues():
+
+        geompy = getGeompy()
+        for part in self._parts.values():
             # Build the structural element part
             logger.debug("Building %s" % part)
             try:
@@ -494,9 +477,8 @@ class StructuralElement:
         """
         if theSObject is not None:
             gg = salome.ImportComponentGUI("GEOM")
-            aStudy = theSObject.GetStudy()
-            useCaseBuilder = aStudy.GetUseCaseBuilder()
-            editor = getStudyEditor(aStudy._get_StudyId())
+            useCaseBuilder = salome.myStudy.GetUseCaseBuilder()
+            editor = getStudyEditor()
             aIterator = useCaseBuilder.GetUseCaseIterator(theSObject)
             aIterator.Init(False)
             while aIterator.More():
@@ -514,9 +496,9 @@ def TEST_CreateGeometry():
     salome.salome_init()
     import GEOM
     from salome.geom import geomBuilder
-    geompy = geomBuilder.New(salome.myStudy)
+    geompy = geomBuilder.New()
     import SALOMEDS
-    geompy.init_geom(salome.myStudy)
+    geompy.init_geom()
     Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
     edges = geompy.SubShapeAllSorted(Box_1, geompy.ShapeType["EDGE"])
     geompy.addToStudy(Box_1, "Box_1")
@@ -578,7 +560,7 @@ def TEST_StructuralElement():
     elem = structElemManager.createElement(liste_commandes)
     if salome.hasDesktop():
         elem.display()
-        salome.sg.updateObjBrowser(True)
+        salome.sg.updateObjBrowser()
 
 
 # Main function only used to test the module
index 95602af11e08943f17eedb0b0ba547db070bdece..5ff4d893edc1d70a69defb58244301de75848b91 100644 (file)
@@ -82,13 +82,13 @@ class Orientation1D:
                            'times for the same mesh group, only the last '
                            'parameter will be used')
         mydict = params.copy()
-        if mydict.has_key("VECT_Y"):
+        if "VECT_Y" in mydict:
             newVecCoords = mydict.pop("VECT_Y")
             logger.debug("Setting orientation vector Y to %s" %
                              str(newVecCoords))
             self._vectorYCoords = newVecCoords
             self._angle = 0.0
-        if mydict.has_key("ANGL_VRIL"):
+        if "ANGL_VRIL" in mydict:
             newAngle = mydict.pop("ANGL_VRIL")
             logger.debug("Setting orientation angle to %f" % newAngle)
             self._angle = newAngle
index 9b949fab65a8d5575279ee33fe94448ccb9b85b6..d2f46a9b808d3ed273905c9edc2da254bf7cfa31 100644 (file)
@@ -45,7 +45,7 @@ from salome.kernel import termcolor
 logger = Logger("salome.geom.structelem.parts", color = termcolor.RED)
 from salome.geom.geomtools import getGeompy
 
-import orientation
+from . import orientation
 
 # Filling for the beams
 FULL = "FULL"
@@ -119,7 +119,6 @@ class SubShapeID:
 
 ## This class is the base class for all structural element parts. It should
 #  not be instantiated directly (consider it as an "abstract" class).
-#  \param studyId (integer) the ID of the study in which the part is created.
 #  \param groupName (string) the name of the underlying geometrical primitive 
 #  in the study.
 #  \param groupGeomObj (GEOM object) the underlying geometrical primitive.
@@ -132,9 +131,6 @@ class StructuralElementPart:
     This class is the base class for all structural element parts. It should
     not be instantiated directly (consider it as an "abstract" class).
 
-    :type  studyId: integer
-    :param studyId: the ID of the study in which the part is created.
-
     :type  groupName: string
     :param groupName: the name of the underlying geometrical primitive in the
                       study.
@@ -153,7 +149,7 @@ class StructuralElementPart:
     
     DEFAULT_NAME = "StructElemPart"
 
-    def __init__(self, studyId, groupName, groupGeomObj, parameters,
+    def __init__(self, groupName, groupGeomObj, parameters,
                  name = DEFAULT_NAME, color = None):
         self._parameters = parameters
         self.groupName = groupName
@@ -161,7 +157,7 @@ class StructuralElementPart:
         self._orientation = None
         self._paramUserName = {}
         self.name = name
-        self.geom = getGeompy(studyId)
+        self.geom = getGeompy()
         self.baseShapesSet = set()
         self.isMainShape = (groupGeomObj.GetType() != 37) # See geompyDC.ShapeIdToType for type codes
         if not self.isMainShape:
@@ -186,7 +182,7 @@ class StructuralElementPart:
         if len(nameList) > 0:
             paramName = nameList[0]
         for name in nameList:
-            if self._parameters.has_key(name):
+            if name in self._parameters:
                 self._paramUserName[paramName] = name
                 return self._parameters[name]
         return default
@@ -196,7 +192,7 @@ class StructuralElementPart:
         """
         This method finds the user name for a parameter.
         """
-        if self._paramUserName.has_key(paramName):
+        if paramName in self._paramUserName:
             return self._paramUserName[paramName]
         else:
             return paramName
@@ -236,11 +232,11 @@ class StructuralElementPart:
                                         mindim, value)
 
     ## Build the geometric shapes and the markers corresponding to the
-    #  structural element part in the study \em studyId.
+    #  structural element part in the study.
     def build(self):
         """
         Build the geometric shapes and the markers corresponding to the
-        structural element part in the study `studyId`.
+        structural element part in the study.
         """
         shape = self._buildPart()
         markers = self._buildMarkers()
@@ -308,9 +304,9 @@ class Beam(StructuralElementPart):
 
     DEFAULT_NAME = "Beam"
 
-    def __init__(self, studyId, groupName, groupGeomObj, parameters,
+    def __init__(self, groupName, groupGeomObj, parameters,
                  name = DEFAULT_NAME, color = None):
-        StructuralElementPart.__init__(self, studyId, groupName, groupGeomObj,
+        StructuralElementPart.__init__(self, groupName, groupGeomObj,
                                        parameters, name, color)
         self._orientation = orientation.Orientation1D()
 
@@ -454,15 +450,15 @@ class CircularBeam(Beam):
 
     """
 
-    def __init__(self, studyId, groupName, groupGeomObj, parameters,
+    def __init__(self, groupName, groupGeomObj, parameters,
                  name = Beam.DEFAULT_NAME, color = None):
         if color is None:
-            if parameters.has_key("R1"): # variable section
+            if "R1" in parameters: # variable section
                 color = LIGHT_RED
             else:                       # constant section
                 color = RED
 
-        Beam.__init__(self, studyId, groupName, groupGeomObj, parameters,
+        Beam.__init__(self, groupName, groupGeomObj, parameters,
                       name, color)
 
         self.R1 = self._getParameter(["R1", "R"])
@@ -566,15 +562,15 @@ class RectangularBeam(Beam):
 
     """
 
-    def __init__(self, studyId, groupName, groupGeomObj, parameters,
+    def __init__(self, groupName, groupGeomObj, parameters,
                  name = Beam.DEFAULT_NAME, color = None):
         if color is None:
-            if parameters.has_key("HY1") or parameters.has_key("H1"):
+            if "HY1" in parameters or "H1" in parameters:
                 color = LIGHT_BLUE # variable section
             else:                  # constant section
                 color = BLUE
 
-        Beam.__init__(self, studyId, groupName, groupGeomObj, parameters,
+        Beam.__init__(self, groupName, groupGeomObj, parameters,
                       name, color)
 
         self.HY1 = self._getParameter(["HY1", "HY", "H1", "H"])
@@ -687,7 +683,7 @@ def getParameterInDict(nameList, parametersDict, default = None):
     several different names.
     """
     for name in nameList:
-        if parametersDict.has_key(name):
+        if name in parametersDict:
             return parametersDict[name]
     return default
 
@@ -714,7 +710,7 @@ class GeneralBeam(RectangularBeam):
     parameters.
     """
 
-    def __init__(self, studyId, groupName, groupGeomObj, parameters,
+    def __init__(self, groupName, groupGeomObj, parameters,
                  name = Beam.DEFAULT_NAME, color = None):
         self.IY1 = getParameterInDict(["IY1", "IY"], parameters)
         self.IZ1 = getParameterInDict(["IZ1", "IZ"], parameters)
@@ -728,12 +724,12 @@ class GeneralBeam(RectangularBeam):
         parameters["HZ2"] = math.sqrt(12 * self.IY2 / self.A2)
 
         if color is None:
-            if parameters.has_key("IY1"): # variable section
+            if "IY1" in parameters: # variable section
                 color = LIGHT_GREEN
             else:                         # constant section
                 color = GREEN
 
-        RectangularBeam.__init__(self, studyId, groupName, groupGeomObj, parameters,
+        RectangularBeam.__init__(self, groupName, groupGeomObj, parameters,
                                  name, color)
 
 ## This class is an "abstract" class for all 2D structural element parts. It
@@ -749,9 +745,9 @@ class StructuralElementPart2D(StructuralElementPart):
 
     DEFAULT_NAME = "StructuralElementPart2D"
 
-    def __init__(self, studyId, groupName, groupGeomObj, parameters,
+    def __init__(self, groupName, groupGeomObj, parameters,
                  name = DEFAULT_NAME):
-        StructuralElementPart.__init__(self, studyId, groupName, groupGeomObj,
+        StructuralElementPart.__init__(self, groupName, groupGeomObj,
                                        parameters, name)
         self._orientation = orientation.Orientation2D(
                                         self._getParameter(["angleAlpha"]),
@@ -834,9 +830,9 @@ class ThickShell(StructuralElementPart2D):
 
     DEFAULT_NAME = "ThickShell"
 
-    def __init__(self, studyId, groupName, groupGeomObj, parameters,
+    def __init__(self, groupName, groupGeomObj, parameters,
                  name = DEFAULT_NAME):
-        StructuralElementPart2D.__init__(self, studyId, groupName,
+        StructuralElementPart2D.__init__(self, groupName,
                                          groupGeomObj, parameters, name)
         self.thickness = self._getParameter(["Epais"])
         logger.debug(repr(self))
@@ -978,9 +974,9 @@ class Grid(StructuralElementPart2D):
 
     DEFAULT_NAME = "Grid"
 
-    def __init__(self, studyId, groupName, groupGeomObj, parameters,
+    def __init__(self, groupName, groupGeomObj, parameters,
                  name = DEFAULT_NAME):
-        StructuralElementPart2D.__init__(self, studyId, groupName,
+        StructuralElementPart2D.__init__(self, groupName,
                                          groupGeomObj, parameters, name)
         self.xr = self._getParameter(["origAxeX"])
         self.yr = self._getParameter(["origAxeY"])
@@ -1106,82 +1102,82 @@ class Grid(StructuralElementPart2D):
 
 ## Alias for class GeneralBeam.
 #  \ingroup parts
-def VisuPoutreGenerale(studyId, groupName, groupGeomObj, parameters,
+def VisuPoutreGenerale(groupName, groupGeomObj, parameters,
                        name = "POUTRE"):
     """
     Alias for class :class:`GeneralBeam`.
     """
-    return GeneralBeam(studyId, groupName, groupGeomObj, parameters, name)
+    return GeneralBeam(groupName, groupGeomObj, parameters, name)
 
 ## Alias for class CircularBeam.
 #  \ingroup parts
-def VisuPoutreCercle(studyId, groupName, groupGeomObj, parameters,
+def VisuPoutreCercle(groupName, groupGeomObj, parameters,
                      name = "POUTRE"):
     """
     Alias for class :class:`CircularBeam`.
     """
-    return CircularBeam(studyId, groupName, groupGeomObj, parameters, name)
+    return CircularBeam(groupName, groupGeomObj, parameters, name)
 
 ## Alias for class RectangularBeam. 
 #  \ingroup parts
-def VisuPoutreRectangle(studyId, groupName, groupGeomObj, parameters,
+def VisuPoutreRectangle(groupName, groupGeomObj, parameters,
                         name = "POUTRE"):
     """
     Alias for class :class:`RectangularBeam`.
     """
-    return RectangularBeam(studyId, groupName, groupGeomObj, parameters, name)
+    return RectangularBeam(groupName, groupGeomObj, parameters, name)
 
 ## Alias for class GeneralBeam.  
 #  \ingroup parts
-def VisuBarreGenerale(studyId, groupName, groupGeomObj, parameters,
+def VisuBarreGenerale(groupName, groupGeomObj, parameters,
                       name = "BARRE"):
     """
     Alias for class :class:`GeneralBeam`.
     """
-    return GeneralBeam(studyId, groupName, groupGeomObj, parameters, name,
+    return GeneralBeam(groupName, groupGeomObj, parameters, name,
                        color = ORANGE)
 
 ## Alias for class RectangularBeam.      
 #  \ingroup parts
-def VisuBarreRectangle(studyId, groupName, groupGeomObj, parameters,
+def VisuBarreRectangle(groupName, groupGeomObj, parameters,
                        name = "BARRE"):
     """
     Alias for class :class:`RectangularBeam`.
     """
-    return RectangularBeam(studyId, groupName, groupGeomObj, parameters, name,
+    return RectangularBeam(groupName, groupGeomObj, parameters, name,
                            color = ORANGE)
 
 ## Alias for class CircularBeam.
 #  \ingroup parts
-def VisuBarreCercle(studyId, groupName, groupGeomObj, parameters,
+def VisuBarreCercle(groupName, groupGeomObj, parameters,
                     name = "BARRE"):
     """
     Alias for class :class:`CircularBeam`.
     """
-    return CircularBeam(studyId, groupName, groupGeomObj, parameters, name,
+    return CircularBeam(groupName, groupGeomObj, parameters, name,
                         color = ORANGE)
 
 ## Alias for class CircularBeam.
 #  \ingroup parts
-def VisuCable(studyId, groupName, groupGeomObj, parameters, name = "CABLE"):
+def VisuCable(groupName, groupGeomObj, parameters, name = "CABLE"):
     """
     Alias for class :class:`CircularBeam`.
     """
-    return CircularBeam(studyId, groupName, groupGeomObj, parameters, name,
+    return CircularBeam(groupName, groupGeomObj, parameters, name,
                         color = PURPLE)
 
 ## Alias for class ThickShell.
 #  \ingroup parts
-def VisuCoque(studyId, groupName, groupGeomObj, parameters, name = "COQUE"):
+def VisuCoque(groupName, groupGeomObj, parameters, name = "COQUE"):
     """
     Alias for class :class:`ThickShell`.
     """
-    return ThickShell(studyId, groupName, groupGeomObj, parameters, name)
+    return ThickShell(groupName, groupGeomObj, parameters, name)
 
 ## Alias for class Grid.
 #  \ingroup parts
-def VisuGrille(studyId, groupName, groupGeomObj, parameters, name = "GRILLE"):
+def VisuGrille(groupName, groupGeomObj, parameters, name = "GRILLE"):
     """
     Alias for class :class:`Grid`.
     """
-    return Grid(studyId, groupName, groupGeomObj, parameters, name)
+    return Grid(groupName, groupGeomObj, parameters, name)
index 709de6c10485d82a26f53c145cf9b4423a5df194..4309815fd68db24693839adb3496222a893addea 100644 (file)
@@ -23,7 +23,7 @@ from GEOM import IAdvancedOperations
 __libraryName__ = "AdvancedEngine"
 
 def GetAdvancedOperations(self):
-    anOp = self.GetPluginOperations(self.myStudyId, __libraryName__)
+    anOp = self.GetPluginOperations(__libraryName__)
     return anOp._narrow(IAdvancedOperations)
 
 ## Create a T-shape object with specified caracteristics for the main
index 11a25726d0acb9a4dba2a05c31afce932df4e37c..dca63433d13a8dcf7538f05308261bfbb5ad9c45 100644 (file)
@@ -24,7 +24,7 @@ from GEOM import IBREPOperations
 __libraryName__ = "BREPPluginEngine"
 
 def GetBREPPluginOperations(self):
-    anOp = self.GetPluginOperations(self.myStudyId, __libraryName__)
+    anOp = self.GetPluginOperations(__libraryName__)
     return anOp._narrow(IBREPOperations)
 
 ## Export the given shape into a file with given name in BREP format.
@@ -42,7 +42,7 @@ def ExportBREP(self, theObject, theFileName):
     anOp = GetBREPPluginOperations(self)
     anOp.ExportBREP(theObject, theFileName)
     if anOp.IsDone() == 0:
-        raise RuntimeError,  "Export : " + anOp.GetErrorCode()
+        raise RuntimeError("Export : " + anOp.GetErrorCode())
         pass
     pass
 
index e3560e179310e5c7ae9a17d18ad277019f74efa3..290b212daf4e1b158a938e4b933bce451757b657 100644 (file)
@@ -33,7 +33,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 #Sketcher_1 creation
 Sketcher_1 = geompy.MakeSketcher("Sketcher:F 100 -57.7:TT 100 57.7:TT 0 115.47:TT -100 57.7:TT -100 -57.7:TT 0 -115.47:WW") 
@@ -91,5 +91,5 @@ geompy.addToStudy(theShapeForCut, "slot.brep_1")
 Cut_1 = geompy.MakeBoolean(Chamfer_2, theShapeForCut, 2)
 geompy.addToStudy(Cut_1, "Cut_1")
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
 
index 95705536f39e2f8f5f5bd25c30ec6a76e043c5d4..9a686cb60e6a333ebaf0acb24b6e32374a5a2882 100644 (file)
@@ -27,7 +27,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 # Create several objects
 obj1 = geompy.MakeVertex(0.,0.,0.)
@@ -47,12 +47,12 @@ obj5_entry = geompy.addToStudy(obj5, "Object5")
 
 # Get information about objects
 hasInfo = geompy.hasObjectInfo()
-print "Check if GEOM module provides information about its objects: ", hasInfo
+print("Check if GEOM module provides information about its objects: ", hasInfo)
 if hasInfo == True:
-    print "Information about first  object: ", geompy.getObjectInfo(salome.myStudyId, obj1_entry)
-    print "Information about second object: ", geompy.getObjectInfo(salome.myStudyId, obj2_entry)
-    print "Information about third  object: ", geompy.getObjectInfo(salome.myStudyId, obj3_entry)
-    print "Information about fourth object: ", geompy.getObjectInfo(salome.myStudyId, obj4_entry)
-    print "Information about fifth  object: ", geompy.getObjectInfo(salome.myStudyId, obj5_entry)
+    print("Information about first  object: ", geompy.getObjectInfo(obj1_entry))
+    print("Information about second object: ", geompy.getObjectInfo(obj2_entry))
+    print("Information about third  object: ", geompy.getObjectInfo(obj3_entry))
+    print("Information about fourth object: ", geompy.getObjectInfo(obj4_entry))
+    print("Information about fifth  object: ", geompy.getObjectInfo(obj5_entry))
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index d95582e0208f411ac99d51fc1b1b528e78515b0d..e81fe00a6bd551def2ec2a5fd6e5405a4e68d96a 100755 (executable)
@@ -32,7 +32,7 @@
 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 sparant deux colis
 cc_width = 0.11         # Epaisseur du complement de colisage
 
 # --
@@ -47,7 +47,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 boolean_common  = 1
 boolean_cut     = 2
index c614ca92f3f39ab75fe01610e1a63156fa591cbd..9de64fba5306ae41bc79b631fcee2ee56e2e6aa9 100755 (executable)
@@ -35,7 +35,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 vecx = geompy.MakeVectorDXDYDZ(1.,0.,0.)
 vecy = geompy.MakeVectorDXDYDZ(0.,1.,0.)
index 1016df4197d43f7f978e7cec593e908152726cda..942e4a2d91c0d3d2b160a4e3b380d40ff760e634 100755 (executable)
@@ -31,7 +31,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 vecx = geompy.MakeVectorDXDYDZ(1.,0.,0.)
 
index 39384041db41c9ca4a157bb14aa9a45cf891314a..0e2600f175094720000d439723bbbdf60678bb2c 100755 (executable)
@@ -27,7 +27,7 @@
 # import couplex2_01_GEOM
 # reload(couplex2_01_GEOM)
 # Dimensions de alveolus
-# Parall\89pip\88de rectangle de taille alDx, alDy, alDz
+# Parall�pip�de rectangle de taille alDx, alDy, alDz
 #
 alDx   = 2.5
 alDy   = 20.0
@@ -35,7 +35,7 @@ alDz   = 2.5
 alSepx = 18.0
 
 # Dimensions de backfill
-# Parall\89pip\88de rectangle de taille baDx, baDy, baDz
+# Parall�pip�de rectangle de taille baDx, baDy, baDz
 
 baDx = 27.0
 baDy = 4.8
@@ -53,7 +53,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 # -- Construction de backfill
 
index 48dfc440f203d64d63fb03f9388d1f8a642f1c0a..4004c0b2070c5c6e09556ce5414779bfb2ab481f 100755 (executable)
@@ -32,15 +32,15 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
-# -- Dimensions de la boite enti\88re
+# -- Dimensions de la boite entire
 
 LX, LY, LZ = 300.0, 150.0, 150.0
 p0 = geompy.MakeVertex(0.,0.,0.)
 vy = geompy.MakeVectorDXDYDZ(0.,1.,0.)
 
-# -- D\89finition du plan de sym\89trie (O,Ox,Oz)
+# -- D�finition du plan de sym�trie (O,Ox,Oz)
 
 symPlane = geompy.MakePlane(p0, vy, 10.0)
 
@@ -60,7 +60,7 @@ gal = geompy.MakeTranslation(gal, gal_x, -gal_lony/2, 0.0)
 
 # -- Galerie perpendiculaire
 # -- Dimensions de la galerie perpendiculaire
-# -- La longueur est compt\89\80 partir du centre
+# -- La longueur est compt�e � partir du centre
 # -- de la galerie principale
 
 gpe_long, gpe_diam = 200.0, 60.0 
@@ -72,14 +72,14 @@ gpe = geompy.MakeCylinder(
 gpe = geompy.MakeTranslation(gpe, gpe_x, 0, 0)
 
 # -- Dimensions d'une alveole
-# -- Construction d'une alv\89ole
+# -- Construction d'une alvole
 
 alv_long, alv_diam = 60.0, 18.0
 alv01 = geompy.MakeCylinder(p0, vy, alv_diam/2, alv_long)
 alv02 = geompy.MakeMirrorByPlane(alv01, symPlane)
 alv0 = geompy.MakeCompound([alv01, alv02])
 
-# -- Construction des alv\89oles
+# -- Construction des alvoles
 
 alv_del, alv_sep = 40.0, 35.0
 alv1 = geompy.MakeTranslation(alv0, gal_x-gal_diam/2-alv_sep, 0.0, 0.0)
index eb76c758712f944a519a04645d6bd2ebd6e35091..75ba16ef19e1394a058ac1aa604132df0181b56a 100644 (file)
@@ -30,7 +30,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 #SKETCHER INFOS
 #Init Sketcher
index ae5bbc77ce8da3f179e9f50f3a2f5175e42335ce..213e3a8758cf5c51cc752fff5bf0d12e02253370 100644 (file)
@@ -95,9 +95,9 @@ def MakeSpanner (geompy, math, isBlocksTest = 0, isMeshTest = 0, smesh = None):
 
   nbFaces = geompy.ShapesOp.NumberOfFaces(Prism1)
   if nbFaces == 6:
-    print "Prism 1 is a hexahedral solid"
+    print("Prism 1 is a hexahedral solid")
   else:
-    print "Prism 1 is not a hexahedral solid"
+    print("Prism 1 is not a hexahedral solid")
 
   Prism1_faces = geompy.SubShapeAllSortedCentres(Prism1, geompy.ShapeType["FACE"])
   ii = 1
@@ -287,7 +287,7 @@ def MakeSpanner (geompy, math, isBlocksTest = 0, isMeshTest = 0, smesh = None):
         try:
           Block3h = geompy.GetBlockByParts(Handle, [Face12h, Face22h])
         except RuntimeError:
-          print "ERROR: BlocksOp.GetBlockByParts() failed : ", geompy.BlocksOp.GetErrorCode()
+          print("ERROR: BlocksOp.GetBlockByParts() failed : ", geompy.BlocksOp.GetErrorCode())
         else:
           id_block3h = geompy.addToStudyInFather(Handle, Block3h, "Block 3 of Handle")
 
@@ -301,18 +301,18 @@ def MakeSpanner (geompy, math, isBlocksTest = 0, isMeshTest = 0, smesh = None):
 
   isCompOfBlocks6 = geompy.CheckCompoundOfBlocks(Spanner)
   if isCompOfBlocks6 == 0:
-    print "Spanner is not a compound of hexahedral solids"
+    print("Spanner is not a compound of hexahedral solids")
     (NonBlocks, NonQuads) = geompy.GetNonBlocks(Spanner)
     if NonBlocks is not None:
       geompy.addToStudyInFather(Spanner, NonBlocks, "Group of non-hexahedral solids")
     if NonQuads is not None:
       geompy.addToStudyInFather(Spanner, NonQuads, "Group of non-quadrangular faces")
   else:
-    print "Spanner is a compound of hexahedral solids"
+    print("Spanner is a compound of hexahedral solids")
 
   if isBlocksTest == 1:
 
-    print "##################### Test More #####################"
+    print("##################### Test More #####################")
 
     ### Get Blocks 4 and 5 from the spanner ###
 
@@ -345,7 +345,7 @@ def MakeSpanner (geompy, math, isBlocksTest = 0, isMeshTest = 0, smesh = None):
         id_MRot_tr = geompy.addToStudy(MRot_tr, "Multi-rotated block 5")
 
     if isMRot2D == 0:
-      print "2D Multi Transformation failed"
+      print("2D Multi Transformation failed")
 
     ### Get one face of the Gear ###
 
@@ -358,7 +358,7 @@ def MakeSpanner (geompy, math, isBlocksTest = 0, isMeshTest = 0, smesh = None):
     id_face_g_1 = geompy.addToStudyInFather(Gear, Face_g_1, "Face of Gear by four points")
 
     edgesNb = geompy.ShapesOp.NumberOfEdges(Face_g_1)
-    print "Face of Gear has ", edgesNb, " edges"
+    print("Face of Gear has ", edgesNb, " edges")
 
     Face_g_1_tr = geompy.MakeTranslationTwoPoints(Face_g_1, p0, pth)
     id_face_g_1_tr = geompy.addToStudyInFather(Gear, Face_g_1_tr, "Face of Gear by four points, translated")
@@ -370,7 +370,7 @@ def MakeSpanner (geompy, math, isBlocksTest = 0, isMeshTest = 0, smesh = None):
 
   if isMeshTest == 1 and smesh is not None:
 
-    print "##################### Build Mesh #####################"
+    print("##################### Build Mesh #####################")
 
 
     # ---- add a middle block of spanner handle in study
@@ -392,76 +392,76 @@ def MakeSpanner (geompy, math, isBlocksTest = 0, isMeshTest = 0, smesh = None):
     Id_Edge1 = geompy.addToStudyInFather(FaceTop, Edge1, "Edge 1")
     Id_Edge2 = geompy.addToStudyInFather(FaceTop, Edge2, "Edge 2")
 
-    print "-------------------------- Algorithm and Hypothesis"
+    print("-------------------------- Algorithm and Hypothesis")
 
-    print "---- Init a Mesh with the Spanner"
+    print("---- Init a Mesh with the Spanner")
 
     mesh = smesh.Mesh(Spanner, "Meshed Spanner")
 
-    print "-------------------------- add hypothesis to Spanner"
+    print("-------------------------- add hypothesis to Spanner")
 
-    print "-------------------------- NumberOfSegments"
+    print("-------------------------- NumberOfSegments")
     algoReg = mesh.Segment()
     listHyp = algoReg.GetCompatibleHypothesis()
     for hyp in listHyp:
-      print hyp
-    print algoReg.GetName()
-    print algoReg.GetId()
+      print(hyp)
+    print(algoReg.GetName())
+    print(algoReg.GetId())
     algoReg.SetName("Regular_1D")
 
 
     hypNbSeg3 = algoReg.NumberOfSegments(3)
-    print hypNbSeg3.GetName()
-    print hypNbSeg3.GetId()
-    print hypNbSeg3.GetNumberOfSegments()
+    print(hypNbSeg3.GetName())
+    print(hypNbSeg3.GetId())
+    print(hypNbSeg3.GetNumberOfSegments())
     smesh.SetName(hypNbSeg3, "NumberOfSegments_3")
 
-    print "-------------------------- Quadrangle_2D"
+    print("-------------------------- Quadrangle_2D")
 
     algoQuad = mesh.Quadrangle()
     listHyp = algoQuad.GetCompatibleHypothesis()
     for hyp in listHyp:
-        print hyp
-    print algoQuad.GetName()
-    print algoQuad.GetId()
+        print(hyp)
+    print(algoQuad.GetName())
+    print(algoQuad.GetId())
     algoQuad.SetName("Quadrangle_2D")
 
-    print "-------------------------- add hypothesis to the Middle Block"
+    print("-------------------------- add hypothesis to the Middle Block")
 
-    print "-------------------------- LocalLength"
+    print("-------------------------- LocalLength")
     algoRegMb = mesh.Segment(BlockMh)
     hypLen1 = algoRegMb.LocalLength(10)
-    print hypLen1.GetName()
-    print hypLen1.GetId()
-    print hypLen1.GetLength()
+    print(hypLen1.GetName())
+    print(hypLen1.GetId())
+    print(hypLen1.GetLength())
     smesh.SetName(hypLen1, "Local_Length_10")
 
-    print "-------------------------- add hypothesis to the long edges of the Top Face of the Middle Block"
+    print("-------------------------- add hypothesis to the long edges of the Top Face of the Middle Block")
 
     algoRegE1 = mesh.Segment(Edge1)
     hypPropE1 = algoRegE1.Propagation()
-    print hypPropE1.GetName()
-    print hypPropE1.GetId()
+    print(hypPropE1.GetName())
+    print(hypPropE1.GetId())
     smesh.SetName(hypPropE1, "Propagation hypothesis")
     smesh.SetName(algoRegE1.GetSubMesh(), "SubMesh Edge 1 of Top Face")
 
     algoRegE2 = mesh.Segment(Edge2)
     hypPropE2 = algoRegE2.Propagation()
-    print hypPropE2.GetName()
-    print hypPropE2.GetId()
+    print(hypPropE2.GetName())
+    print(hypPropE2.GetId())
     smesh.SetName(hypPropE2, "Propagation hypothesis")
     smesh.SetName(algoRegE2.GetSubMesh(), "SubMesh Edge 2 of Top Face")
 
-    print "-------------------------- compute the mesh"
+    print("-------------------------- compute the mesh")
     mesh.Compute()
 
-    print "Information about the Mesh:"
-    print "Number of nodes       : ", mesh.NbNodes()
-    print "Number of edges       : ", mesh.NbEdges()
-    print "Number of faces       : ", mesh.NbFaces()
-    print "Number of triangles   : ", mesh.NbTriangles()
-    print "Number of quadrangles : ", mesh.NbQuadrangles()
-    print "Number of volumes     : ", mesh.NbVolumes()
-    print "Number of tetrahedrons: ", mesh.NbTetras()
+    print("Information about the Mesh:")
+    print("Number of nodes       : ", mesh.NbNodes())
+    print("Number of edges       : ", mesh.NbEdges())
+    print("Number of faces       : ", mesh.NbFaces())
+    print("Number of triangles   : ", mesh.NbTriangles())
+    print("Number of quadrangles : ", mesh.NbQuadrangles())
+    print("Number of volumes     : ", mesh.NbVolumes())
+    print("Number of tetrahedrons: ", mesh.NbTetras())
 
   return Spanner
index 1d8b6b9c49e97602391bedd259cb0663c2cbc3c9..da69bfaadf81c476cb09499c8cfd91fb34639008 100644 (file)
@@ -287,7 +287,7 @@ def TestAll (geompy, math):
 
     sse_id = geompy.GetSubShapeID(Prism, sse)
     if sse_id != eid:
-      print "Error: GetSubShape() or GetSubShapeID() has failed!"
+      print("Error: GetSubShape() or GetSubShapeID() has failed!")
 
   IDlist_e = []
   IDlist_e.append(geompy.GetSubShapeID(Prism, prism_edges[0]))
@@ -330,10 +330,10 @@ def TestAll (geompy, math):
   Archimede  = geompy.Archimede(Box, weight, waterdensity,
                                 meshingdeflection) #(GEOM_Object, 3 Doubles)->GEOM_Object
   mindist = geompy.MinDistanceComponents(TranslVect, Mirror) #(2 GEOM_Object)->4 Doubles
-  print "Minumal distance between TranslVect and Mirror is", mindist[0],
-  print "by components:", mindist[1], ",", mindist[2], ",", mindist[3]
+  print("Minumal distance between TranslVect and Mirror is", mindist[0], end=' ')
+  print("by components:", mindist[1], ",", mindist[2], ",", mindist[3])
   CheckShape = geompy.CheckShape(Prism)            #(GEOM_Object)->Boolean
-  print "CheckShape(Prism) = ", CheckShape
+  print("CheckShape(Prism) = ", CheckShape)
 
   #Partition objects
   Partition  = geompy.MakePartition([Box], [Plane]) #(2 Lists Of GEOM_Object)->GEOM_Object
@@ -539,11 +539,11 @@ def TestAll (geompy, math):
 
   # GetExistingSubObjects
   SubObjsAll = geompy.GetExistingSubObjects(Box, True)
-  print "For now, Box has the following created sub-objects:", SubObjsAll
+  print("For now, Box has the following created sub-objects:", SubObjsAll)
 
   # GetGroups
   SubGrpsAll = geompy.GetGroups(Box)
-  print "For now, Box has the following created groups:", SubGrpsAll
+  print("For now, Box has the following created groups:", SubGrpsAll)
 
   # SubShapeAll
   SubEdgeList = geompy.SubShapeAll(SubFace, geompy.ShapeType["EDGE"])
@@ -554,21 +554,21 @@ def TestAll (geompy, math):
 
   # SubShapeAllIDs
   SubEdgeIDsList = geompy.SubShapeAllIDs(SubFace, geompy.ShapeType["EDGE"])
-  print "IDs of edges of SubFace:", SubEdgeIDsList, "(unsorted)"
+  print("IDs of edges of SubFace:", SubEdgeIDsList, "(unsorted)")
   group = geompy.CreateGroup(SubFace, geompy.ShapeType["EDGE"])
   geompy.UnionIDs(group, SubEdgeIDsList)
   geompy.addToStudyInFather(SubFace, group, "Group of all edges")
 
   # SubShapeAllSortedCentresIDs
   SubEdgeIDsList = geompy.SubShapeAllSortedCentresIDs(SubFace, geompy.ShapeType["EDGE"])
-  print "IDs of edges of SubFace:", SubEdgeIDsList, "(sorted)"
+  print("IDs of edges of SubFace:", SubEdgeIDsList, "(sorted)")
 
   # GetSubShape and GetSubShapeID
   for ind in SubEdgeIDsList:
     edge = geompy.GetSubShape(SubFace, [ind])
     ind_e = geompy.GetSubShapeID(SubFace, edge)
     if ind_e != ind:
-      print "Error in GetSubShape or GetSubShapeID"
+      print("Error in GetSubShape or GetSubShapeID")
 
   # RestoreSubShapes
   geompy.RestoreSubShapes(Copy)
@@ -596,4 +596,4 @@ def TestAll (geompy, math):
   geompy.MakeExtraction(Box, [16], "Ext_no_vertex")
 
 
-  print "DONE"
+  print("DONE")
index 1241d93efee622fdf8a76aec48e8b4e315d0602e..69a798c6bd5e918f8b2f724ab73d8bfdb849a665 100644 (file)
@@ -47,13 +47,13 @@ def CheckFieldCreation(shape, name, ftype, dimension, componentNames, nbFiOrMust
     # WARNING: assure name uniquness to check geompy.GetField( shape, name )
     try:
         field = geompy.CreateField(shape, name, ftype, dimension, componentNames)
-    except Exception, e:
+    except Exception as e:
         if nbFiOrMustFail == MustFail:
-            print "Ok, expected exception caught: %s"%e
+            print("Ok, expected exception caught: %s"%e)
             return
         raise e
     if nbFiOrMustFail == MustFail:
-        raise RuntimeError, "Expected exception NOT thrown"
+        raise RuntimeError("Expected exception NOT thrown")
     assert field.getShape()
     assert field.getShape().IsSame( shape )
     assert field.getName() == name
@@ -70,13 +70,13 @@ def CheckFieldCreation(shape, name, ftype, dimension, componentNames, nbFiOrMust
 def CheckStepManips(field, step, stamp, values, nbStepsOrMustFail, toRemove=False):
     try:
         stp = field.addStep(step, stamp, values)
-    except Exception, e:
+    except Exception as e:
         if nbStepsOrMustFail == MustFail:
-            print "Ok, expected exception caught: %s"%e
+            print("Ok, expected exception caught: %s"%e)
             return
         raise e
     if nbStepsOrMustFail == MustFail:
-        raise RuntimeError, "Expected exception NOT thrown"
+        raise RuntimeError("Expected exception NOT thrown")
     assert field.countSteps() == nbStepsOrMustFail
     assert len( field.getSteps() ) == nbStepsOrMustFail
     assert step in field.getSteps()
@@ -138,12 +138,12 @@ def TestField (geomBuilder, math):
     CheckStepManips( bfield, 2, -2, [1,0]*4, 1 )
     # int field on 6 faces
     ifield = geompy.CreateField(shape, "intF", GEOM.FDT_Int, 2, ["id","domain"])
-    CheckStepManips( ifield, -1, -10, range(12),  1 )
-    CheckStepManips( ifield, -2, -20, range(6)*2, 2 )
+    CheckStepManips( ifield, -1, -10, list(range(12)),  1 )
+    CheckStepManips( ifield, -2, -20, list(range(6))*2, 2 )
     # double field on a solid
     dfield = geompy.CreateField(shape, "dblS", GEOM.FDT_Double, 3, ["a","b","c"])
     CheckStepManips( dfield, -1, -10, [-1.1, 2.3, 4000], 1 )
-    CheckStepManips( dfield, -2, -20, range(3), 2 )
+    CheckStepManips( dfield, -2, -20, list(range(3)), 2 )
 
     # assert exception in case of invalid parameters
     CheckStepManips( sfield, -1, -10, ["25 Sep","2013"], MustFail ) # step already exists
@@ -159,7 +159,7 @@ def TestField (geomBuilder, math):
     # dump the study
     import salome
     assert( salome.myStudy.DumpStudy(os.path.dirname(dumpFile), os.path.basename(dumpFile), 1, 0))
-    execfile( pyFile )
+    exec(compile(open( pyFile ).read(), pyFile, 'exec'))
     os.remove( pyFile )
 
-    print "Field manipulations work OK"
+    print("Field manipulations work OK")
index dc22c1cee4262f3e83d0e225e3c7ee0a1008cb99..64c2aae1a240fbb40769a9ffd575069eea514258 100644 (file)
@@ -51,12 +51,12 @@ def TestProcessShape (geompy):
   theShape = geompy.MakePrismVecH(face, edge, 130)
 
   #Check shape
-  print "Before ProcessShape:"
+  print("Before ProcessShape:")
   isValid = geompy.CheckShape(theShape)
   if isValid == 0:
-    print "The shape is not valid"
+    print("The shape is not valid")
   else:
-    print "The shape seems to be valid"
+    print("The shape seems to be valid")
 
   #Process Shape
   Operators = ["FixShape"]
@@ -66,13 +66,13 @@ def TestProcessShape (geompy):
   PS = geompy.ProcessShape(theShape, Operators, Parameters, Values)
 
   #Check shape
-  print "After ProcessShape:"
+  print("After ProcessShape:")
   isValid = geompy.CheckShape(PS)
   if isValid == 0:
-    print "The shape is not valid"
-    raise RuntimeError, "It seems, that the ProcessShape() has failed"
+    print("The shape is not valid")
+    raise RuntimeError("It seems, that the ProcessShape() has failed")
   else:
-    print "The shape seems to be valid"
+    print("The shape seems to be valid")
 
   #Add In Study
   Id_Shape = geompy.addToStudy(theShape, "Invalid Shape")
@@ -138,7 +138,7 @@ def TestSuppressInternalWires (geompy):
     nbw1 = nbw1 + 1
 
   if nbw1 != 2:
-    raise RuntimeError, "GetFreeBoundary(f12) must return 2 closed wires, but returned ", nbw1
+    raise RuntimeError("GetFreeBoundary(f12) must return 2 closed wires, but returned ").with_traceback(nbw1)
 
   #SuppressInternalWires
   face = geompy.SuppressInternalWires(f12, [])
@@ -154,8 +154,8 @@ def TestSuppressInternalWires (geompy):
     nbw2 = nbw2 + 1
 
   if nbw2 != 1:
-    print "GetFreeBoundary(face) must return 1 closed wires, but returned ", nbw2
-    raise RuntimeError, "SuppressInternalWires() works not correctly"
+    print("GetFreeBoundary(face) must return 1 closed wires, but returned ", nbw2)
+    raise RuntimeError("SuppressInternalWires() works not correctly")
 
   #Add In Study
   Id_face = geompy.addToStudy(face, "Face without internal wires")
@@ -181,12 +181,12 @@ def TestCloseContour (geompy):
   Shape = geompy.MakePolyline([p0, pz, py, p200])
 
   #Check shape
-  print "Before closing contour:"
+  print("Before closing contour:")
   isValid = geompy.CheckShape(Shape)
   if isValid == 0:
-    print "The shape is not valid"
+    print("The shape is not valid")
   else:
-    print "The shape seems to be valid"
+    print("The shape seems to be valid")
 
   #Close Contour
   IsCommonVertex = 0 # false
@@ -202,13 +202,13 @@ def TestCloseContour (geompy):
   CC = geompy.CloseContour(Shape, Wires, IsCommonVertex)
 
   #Check shape
-  print "After closing contour:"
+  print("After closing contour:")
   isValid = geompy.CheckShape(CC)
   if isValid == 0:
-    print "The shape is not valid"
-    raise RuntimeError, "It seems, that the contour was not closed"
+    print("The shape is not valid")
+    raise RuntimeError("It seems, that the contour was not closed")
   else:
-    print "The shape seems to be valid"
+    print("The shape seems to be valid")
 
   #Add In Study
   Id_Shape = geompy.addToStudy(Shape, "Shape with open wire")
@@ -243,7 +243,7 @@ def TestSuppressHoles (geompy):
       f_id = geompy.addToStudyInFather(Cut, face, f_name)
 
       f_glob_id = geompy.GetSubShapeID(Cut, face)
-      print "face ", ind, " global index = ", f_glob_id
+      print("face ", ind, " global index = ", f_glob_id)
       ind = ind + 1
 
   f_glob_id_0 = geompy.GetSubShapeID(Cut, faces[0])
@@ -258,7 +258,7 @@ def TestSuppressHoles (geompy):
       f_id = geompy.addToStudyInFather(cut_without_f_0, face, f_name)
 
       f_glob_id = geompy.GetSubShapeID(cut_without_f_0, face)
-      print "face ", ind, " global index = ", f_glob_id
+      print("face ", ind, " global index = ", f_glob_id)
       ind = ind + 1
 
   f_glob_id_3 = geompy.GetSubShapeID(cut_without_f_0, faces1[3])
@@ -274,7 +274,7 @@ def TestSuppressHoles (geompy):
       w_id = geompy.addToStudyInFather(cut_without_f_0_3, wire, w_name)
 
       w_glob_id = geompy.GetSubShapeID(cut_without_f_0_3, wire)
-      print "wire ", ind, " global index = ", w_glob_id
+      print("wire ", ind, " global index = ", w_glob_id)
       ind = ind + 1
 
   w_3 = geompy.GetSubShapeID(cut_without_f_0_3, wires[3])
index 27a164ee03e9d163792e9024523f24f9c9d85b54..e17848974cc3e5cc51b4c730cc5c8039b75f6af1 100644 (file)
@@ -43,58 +43,58 @@ def TestMeasureOperations (geompy, math):
 
   Coords = geompy.PointCoordinates(p137)
   if Coords[0] != 10 or Coords[1] != 30 or Coords[2] != 70:
-    print "Coordinates of p137 must be (10, 30, 70), but returned (", Coords[0], ", ", Coords[1], ", ", Coords[2], ")"
+    print("Coordinates of p137 must be (10, 30, 70), but returned (", Coords[0], ", ", Coords[1], ", ", Coords[2], ")")
 
   ####### CheckShape #######
 
   (IsValid, err) = geompy.CheckShape(box, 0, 2)
   if IsValid == 0:
     geompy.PrintShapeError(box, err)
-    raise RuntimeError, "Invalid box created"
+    raise RuntimeError("Invalid box created")
   else:
-    print "\nBox is valid"
+    print("\nBox is valid")
 
   ####### Detect Self-intersections #######
 
   selfIntersected = geompy.MakeCompound([box, cylinder])
   if geompy.CheckSelfIntersections(selfIntersected):
-    raise RuntimeError, "Existing self-intersection is not detected"
+    raise RuntimeError("Existing self-intersection is not detected")
 
   ####### Detect Self-intersections fast #######
 
   if salome_version.getXVersion() > "0x70600":
     if geompy.CheckSelfIntersectionsFast(selfIntersected):
-      raise RuntimeError, "Existing self-intersection is not detected"
+      raise RuntimeError("Existing self-intersection is not detected")
 
   ####### Fast intersection #######
 
   if not geompy.FastIntersect(box, cylinder)[0]:
-    raise RuntimeError, "Existing intersection is not detected"
+    raise RuntimeError("Existing intersection is not detected")
 
   ####### WhatIs #######
 
   Descr = geompy.WhatIs(box)
-  print "\nBox 10x30x70 description:"
-  print Descr
+  print("\nBox 10x30x70 description:")
+  print(Descr)
 
   ####### NbShapes #######
 
   NbSolids = geompy.NbShapes(box, geompy.ShapeType["SOLID"])
-  print "\nBox 10x30x70 quantity of solids:", NbSolids
+  print("\nBox 10x30x70 quantity of solids:", NbSolids)
 
   ####### ShapeInfo #######
 
   BoxInfo = geompy.ShapeInfo(box)
-  print "\nBox 10x30x70 shapes:"
-  print BoxInfo
+  print("\nBox 10x30x70 shapes:")
+  print(BoxInfo)
 
   ####### BasicProperties #######
 
   Props = geompy.BasicProperties(box)
-  print "\nBox 10x30x70 Basic Properties:"
-  print " Wires length: ", Props[0]
-  print " Surface area: ", Props[1]
-  print " Volume      : ", Props[2]
+  print("\nBox 10x30x70 Basic Properties:")
+  print(" Wires length: ", Props[0])
+  print(" Surface area: ", Props[1])
+  print(" Volume      : ", Props[2])
 
   dl = math.sqrt((Props[0] -   880)*(Props[0] -   880))
   da = math.sqrt((Props[1] -  6200)*(Props[1] -  6200))
@@ -102,53 +102,53 @@ def TestMeasureOperations (geompy, math):
   #print "|Props[0] - 880| = ", dl
 
   if dl > 1e-7 or da > 1e-7 or dv > 1e-7:
-    print "While must be:"
-    print " Wires length: ", 880
-    print " Surface area: ", 6200
-    print " Volume      : ", 21000
+    print("While must be:")
+    print(" Wires length: ", 880)
+    print(" Surface area: ", 6200)
+    print(" Volume      : ", 21000)
 
   ####### BoundingBox #######
 
   BB = geompy.BoundingBox(box)
-  print "\nBounding Box of box 10x30x70:"
-  print " Xmin = ", BB[0], ", Xmax = ", BB[1]
-  print " Ymin = ", BB[2], ", Ymax = ", BB[3]
-  print " Zmin = ", BB[4], ", Zmax = ", BB[5]
+  print("\nBounding Box of box 10x30x70:")
+  print(" Xmin = ", BB[0], ", Xmax = ", BB[1])
+  print(" Ymin = ", BB[2], ", Ymax = ", BB[3])
+  print(" Zmin = ", BB[4], ", Zmax = ", BB[5])
   BB = geompy.MakeBoundingBox(box)
   geompy.addToStudy(BB, "BoundingBox")
 
   ####### Inertia #######
 
   In = geompy.Inertia(box)
-  print "\nInertia matrix of box 10x30x70:"
-  print " (", In[0], ", ", In[1], ", ", In[2], ")"
-  print " (", In[3], ", ", In[4], ", ", In[5], ")"
-  print " (", In[6], ", ", In[7], ", ", In[8], ")"
-  print "Main moments of inertia of box 10x30x70:"
-  print " Ix = ", In[9], ", Iy = ", In[10], ", Iz = ", In[11]
+  print("\nInertia matrix of box 10x30x70:")
+  print(" (", In[0], ", ", In[1], ", ", In[2], ")")
+  print(" (", In[3], ", ", In[4], ", ", In[5], ")")
+  print(" (", In[6], ", ", In[7], ", ", In[8], ")")
+  print("Main moments of inertia of box 10x30x70:")
+  print(" Ix = ", In[9], ", Iy = ", In[10], ", Iz = ", In[11])
 
   ####### Tolerance #######
 
   Toler = geompy.Tolerance(box)
-  print "\nBox 10x30x70 tolerance:"
-  print " Face min. tolerance: ", Toler[0]
-  print " Face max. tolerance: ", Toler[1]
-  print " Edge min. tolerance: ", Toler[2]
-  print " Edge max. tolerance: ", Toler[3]
-  print " Vertex min. tolerance: ", Toler[4]
-  print " Vertex max. tolerance: ", Toler[5]
+  print("\nBox 10x30x70 tolerance:")
+  print(" Face min. tolerance: ", Toler[0])
+  print(" Face max. tolerance: ", Toler[1])
+  print(" Edge min. tolerance: ", Toler[2])
+  print(" Edge max. tolerance: ", Toler[3])
+  print(" Vertex min. tolerance: ", Toler[4])
+  print(" Vertex max. tolerance: ", Toler[5])
 
   ####### MakeCDG #######
 
   pcdg = geompy.MakeCDG(box)
   if pcdg is None:
-    raise RuntimeError, "MakeCDG(box) failed"
+    raise RuntimeError("MakeCDG(box) failed")
   else:
-    print "\nCentre of gravity of box has been successfully obtained:"
+    print("\nCentre of gravity of box has been successfully obtained:")
     Coords = geompy.PointCoordinates(pcdg)
-    print "(", Coords[0], ", ", Coords[1], ", ", Coords[2], ")"
+    print("(", Coords[0], ", ", Coords[1], ", ", Coords[2], ")")
     if Coords[0] != 5 or Coords[1] != 15 or Coords[2] != 35:
-      print "But must be (5, 15, 35)"
+      print("But must be (5, 15, 35)")
 
   ####### GetNormal #######
 
@@ -156,11 +156,11 @@ def TestMeasureOperations (geompy, math):
   face0 = faces[0]
   vnorm = geompy.GetNormal(face0)
   if vnorm is None:
-    raise RuntimeError, "GetNormal(face0) failed"
+    raise RuntimeError("GetNormal(face0) failed")
   else:
     geompy.addToStudy(face0, "Face0")
     geompy.addToStudy(vnorm, "Normale to Face0")
-    print "\nNormale of face has been successfully obtained:"
+    print("\nNormale of face has been successfully obtained:")
     #Coords = geompy.PointCoordinates(pcdg)
     #print "(", Coords[0], ", ", Coords[1], ", ", Coords[2], ")"
     #if Coords[0] != 5 or Coords[1] != 15 or Coords[2] != 35:
@@ -175,11 +175,11 @@ def TestMeasureOperations (geompy, math):
   #print " On Box  (", MinDist[1], ", ", MinDist[2], ", ", MinDist[3], ")"
   #print " On Cube (", MinDist[4], ", ", MinDist[5], ", ", MinDist[6], ")"
 
-  print "\nMinimal distance between Box and Cube = ", MinDist
+  print("\nMinimal distance between Box and Cube = ", MinDist)
 
   MinDistComps = geompy.MinDistanceComponents(box, cube)
-  print "\nMinimal distance between Box and Cube = ", MinDistComps[0]
-  print "Its components are  (", MinDistComps[1], ", ", MinDistComps[2], ", ", MinDistComps[3], ")"
+  print("\nMinimal distance between Box and Cube = ", MinDistComps[0])
+  print("Its components are  (", MinDistComps[1], ", ", MinDistComps[2], ", ", MinDistComps[3], ")")
 
   # Get all closest points
   [nbSols, listCoords] = geompy.ClosestPoints(box, cube)
@@ -199,49 +199,49 @@ def TestMeasureOperations (geompy, math):
   # in one plane
   Angle = geompy.GetAngle(OX, OXY)
 
-  print "\nAngle between OX and OXY = ", Angle
+  print("\nAngle between OX and OXY = ", Angle)
   if math.fabs(Angle - 45.0) > 1e-05:
-    print "  Error: returned angle is", Angle, "while must be 45.0"
+    print("  Error: returned angle is", Angle, "while must be 45.0")
 
   Angle = geompy.GetAngleRadians(OX, OXY)
 
-  print "\nAngle between OX and OXY in radians = ", Angle
+  print("\nAngle between OX and OXY in radians = ", Angle)
   if math.fabs(Angle - math.pi/4) > 1e-05:
-    print "  Error: returned angle is", Angle, "while must be pi/4"
+    print("  Error: returned angle is", Angle, "while must be pi/4")
     pass
 
   # not in one plane
   OXY_shift = geompy.MakeTranslation(OXY,10,-10,20)
   Angle = geompy.GetAngle(OX, OXY_shift)
 
-  print "Angle between OX and OXY_shift = ", Angle
+  print("Angle between OX and OXY_shift = ", Angle)
   if math.fabs(Angle - 45.0) > 1e-05:
-    print "  Error: returned angle is", Angle, "while must be 45.0"
+    print("  Error: returned angle is", Angle, "while must be 45.0")
 
   ####### Position (LCS) #######
 
   Pos = geompy.GetPosition(box)
-  print "\nPosition(LCS) of box 10x30x70:"
-  print "Origin: (", Pos[0], ", ", Pos[1], ", ", Pos[2], ")"
-  print "Z axis: (", Pos[3], ", ", Pos[4], ", ", Pos[5], ")"
-  print "X axis: (", Pos[6], ", ", Pos[7], ", ", Pos[8], ")"
+  print("\nPosition(LCS) of box 10x30x70:")
+  print("Origin: (", Pos[0], ", ", Pos[1], ", ", Pos[2], ")")
+  print("Z axis: (", Pos[3], ", ", Pos[4], ", ", Pos[5], ")")
+  print("X axis: (", Pos[6], ", ", Pos[7], ", ", Pos[8], ")")
 
   ####### KindOfShape #######
 
   Kind = geompy.KindOfShape(box)
-  print "\nKindOfShape(box 10x30x70):", Kind
+  print("\nKindOfShape(box 10x30x70):", Kind)
   #if Kind[0] != geompy.kind.BOX:
   #  print "Error: returned type is", Kind[0], "while must be", geompy.kind.BOX
 
   Kind = geompy.KindOfShape(p137)
-  print "\nKindOfShape(p137):", Kind
+  print("\nKindOfShape(p137):", Kind)
   if Kind[0] != geompy.kind.VERTEX:
-    print "  Error: returned type is", Kind[0], "while must be", geompy.kind.VERTEX
+    print("  Error: returned type is", Kind[0], "while must be", geompy.kind.VERTEX)
   else:
     dx = math.fabs(Kind[1] - 10)
     dy = math.fabs(Kind[2] - 30)
     dz = math.fabs(Kind[3] - 70)
     if (dx + dy + dz) > 1e-5:
-      print "  Error: coordinates are (", Kind[1], ",", Kind[2], ",", Kind[3], ") while must be (10, 20, 30)"
+      print("  Error: coordinates are (", Kind[1], ",", Kind[2], ",", Kind[3], ") while must be (10, 20, 30)")
 
   pass
index afad24292b0bcf41eb6bf18256f313c97c68b5ab..3bec23f465703b0bc9eaa5a24266dedd9f8ca821 100644 (file)
@@ -34,7 +34,7 @@ import GEOM
 
 def TestExportImport (geompy, shape):
 
-  print "Test Export/Import ...",
+  print("Test Export/Import ...", end=' ')
 
   tmpDir = os.getenv("TEMP")
   if tmpDir == None:
@@ -109,7 +109,7 @@ def TestExportImport (geompy, shape):
   aNewShape = geompy.RestoreShape(aStream)
   geompy.addToStudy(aNewShape, "aNewShape")
 
-  print "OK"
+  print("OK")
 
 
 def TestOtherOperations (geompy, math):
@@ -239,19 +239,19 @@ def TestOtherOperations (geompy, math):
   # NumberOf
   NumberOfFaces = geompy.NumberOfFaces(Box)
   if NumberOfFaces != 6:
-    print "Bad number of faces in BOX!"
+    print("Bad number of faces in BOX!")
 
   NumberOfEdges = geompy.NumberOfEdges(Box)
   if NumberOfEdges != 12:
-    print "Bad number of edges in BOX!"
+    print("Bad number of edges in BOX!")
 
   NumberOfSolids = geompy.NumberOfSolids(Box)
   if NumberOfSolids != 1:
-    print "Bad number of solids in BOX!"
+    print("Bad number of solids in BOX!")
 
   NumberOfShapes = geompy.NumberOfSubShapes(Box, geompy.ShapeType["SHAPE"])
   if NumberOfShapes != 34:
-    print "Bad number of shapes in BOX!"
+    print("Bad number of shapes in BOX!")
 
   # MakeBlockExplode
   Compound = geompy.MakeCompound([Box, Sphere])
@@ -274,20 +274,20 @@ def TestOtherOperations (geompy, math):
 
   IsValid = geompy.CheckCompoundOfBlocks(Compound1)
   if IsValid == 0:
-    print "The Blocks Compound is NOT VALID"
+    print("The Blocks Compound is NOT VALID")
     (NonBlocks, NonQuads) = geompy.GetNonBlocks(Compound1)
     if NonBlocks is not None:
       geompy.addToStudyInFather(Compound1, NonBlocks, "Group of non-hexahedral solids")
     if NonQuads is not None:
       geompy.addToStudyInFather(Compound1, NonQuads, "Group of non-quadrangular faces")
   else:
-    print "The Blocks Compound is VALID"
+    print("The Blocks Compound is VALID")
 
   IsValid = geompy.CheckCompoundOfBlocks(Box)
   if IsValid == 0:
-    print "The Box is NOT VALID"
+    print("The Box is NOT VALID")
   else:
-    print "The Box is VALID"
+    print("The Box is VALID")
 
   # GetSame
   Cone_ss = geompy.GetSame(Compound1, Cone)
@@ -325,10 +325,10 @@ def TestOtherOperations (geompy, math):
   # GetObjectIDs
   GetObjectIDs = geompy.GetObjectIDs(CreateGroup)
 
-  print "Group of Box's faces includes the following IDs:"
-  print "(must be ", f_ind_6, ", ", f_ind_3, " and ", f_ind_5, ")"
+  print("Group of Box's faces includes the following IDs:")
+  print("(must be ", f_ind_6, ", ", f_ind_3, " and ", f_ind_5, ")")
   for ObjectID in GetObjectIDs:
-    print " ", ObjectID
+    print(" ", ObjectID)
 
   # GetMainShape
   BoxCopy = geompy.GetMainShape(CreateGroup)
@@ -343,10 +343,10 @@ def TestOtherOperations (geompy, math):
 
   # Check
   GetObjectIDs = geompy.GetObjectIDs(CreateGroup)
-  print "Group of Box's faces includes the following IDs:"
-  print "(must be ", f_ind_6, ", ", f_ind_1, " and ", f_ind_2, ")"
+  print("Group of Box's faces includes the following IDs:")
+  print("(must be ", f_ind_6, ", ", f_ind_1, " and ", f_ind_2, ")")
   for ObjectID in GetObjectIDs:
-    print " ", ObjectID
+    print(" ", ObjectID)
 
   # Boolean Operations on Groups (Union, Intersection, Cut)
   Group_1 = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
@@ -391,7 +391,7 @@ def TestOtherOperations (geompy, math):
                      '4':"FACE", '5':"WIRE", '6':"EDGE", '7':"VERTEX", '8':"SHAPE"}
 
   GroupType = geompy.GetType(CreateGroup)
-  print "Type of elements of the created group is ", ShapeTypeString[`GroupType`]
+  print("Type of elements of the created group is ", ShapeTypeString[repr(GroupType)])
 
   # Prepare data for the following operations
   p0 = geompy.MakeVertex(0, 0, 0)
@@ -550,7 +550,7 @@ def TestOtherOperations (geompy, math):
                                        geompy.ShapeType["FACE"])
   ind = 1
   for shFace in sharedFaces:
-    geompy.addToStudy(shFace, "sharedFace_" + `ind`)
+    geompy.addToStudy(shFace, "sharedFace_" + repr(ind))
     ind = ind + 1
     pass
 
@@ -558,7 +558,7 @@ def TestOtherOperations (geompy, math):
                                              geompy.ShapeType["EDGE"])
   ind = 1
   for shEdge in sharedEdges:
-    geompy.addToStudy(shEdge, "sharedEdge_" + `ind`)
+    geompy.addToStudy(shEdge, "sharedEdge_" + repr(ind))
     ind = ind + 1
     pass
 
@@ -713,7 +713,7 @@ def TestOtherOperations (geompy, math):
   comp = geompy.MakeCompound(edges_onin_quad)
   geompy.addToStudy(comp, "Edges of F12 ONIN Quadrangle")
   if len( edges_onin_quad ) != 4:
-    print "Error in GetShapesOnQuadrangle()"
+    print("Error in GetShapesOnQuadrangle()")
 
   # GetShapesOnQuadrangleIDs
   vertices_on_quad_ids = geompy.GetShapesOnQuadrangleIDs(f12, geompy.ShapeType["VERTEX"],
@@ -728,7 +728,7 @@ def TestOtherOperations (geompy, math):
   comp = geompy.MakeCompound(edges_on_box)
   geompy.addToStudy(comp, "Edges of part ON box b0")
   if len( edges_on_box ) != 12:
-    print "Error in GetShapesOnBox()"
+    print("Error in GetShapesOnBox()")
 
   # GetShapesOnBoxIDs
   faces_on_box_ids = geompy.GetShapesOnBoxIDs(b0, part, geompy.ShapeType["FACE"],
@@ -754,7 +754,7 @@ def TestOtherOperations (geompy, math):
   comp = geompy.MakeCompound(faces_in_sh)
   geompy.addToStudy(comp, "Faces of part IN shape sh_1")
   if len(faces_in_sh) != 11:
-    print "Error in GetShapesOnShape()"
+    print("Error in GetShapesOnShape()")
 
   # GetShapesOnShapeAsCompound
   faces_in_sh_c = geompy.GetShapesOnShapeAsCompound(sh_1, part, geompy.ShapeType["FACE"],
@@ -768,7 +768,7 @@ def TestOtherOperations (geompy, math):
   geompy.UnionIDs(edges_in_sh, edges_in_sh_ids)
   geompy.addToStudyInFather(part, edges_in_sh, "Group of edges in shape sh_1")
   if len(edges_in_sh_ids) != 15:
-    print "Error in GetShapesOnShapeIDs()"
+    print("Error in GetShapesOnShapeIDs()")
 
   # Prepare arguments for GetInPlace and GetInPlaceByHistory
   box5 = geompy.MakeBoxDXDYDZ(100, 100, 100)
@@ -784,8 +784,8 @@ def TestOtherOperations (geompy, math):
   box6_faces = geompy.SubShapeAll(box6, geompy.ShapeType["FACE"])
 
   for ifa in range(6):
-    geompy.addToStudyInFather(box5, box5_faces[ifa], "Face" + `ifa + 1`)
-    geompy.addToStudyInFather(box6, box6_faces[ifa], "Face" + `ifa + 1`)
+    geompy.addToStudyInFather(box5, box5_faces[ifa], "Face" + repr(ifa + 1))
+    geompy.addToStudyInFather(box6, box6_faces[ifa], "Face" + repr(ifa + 1))
 
   # GetInPlace(theShapeWhere, theShapeWhat)
   ibb = 5
@@ -799,10 +799,10 @@ def TestOtherOperations (geompy, math):
         # there is no reflection in the result.
         if refl_box_face is not None:
           error = "Result of GetInPlace must be NULL for face "
-          error += `ifa` + " of box " + `ibb`
-          raise RuntimeError, error
+          error += repr(ifa) + " of box " + repr(ibb)
+          raise RuntimeError(error)
       else:
-        ssname = "Reflection of face " + `ifa` + " of box " + `ibb`
+        ssname = "Reflection of face " + repr(ifa) + " of box " + repr(ibb)
         geompy.addToStudyInFather(part, refl_box_face, ssname)
       ifa = ifa + 1
     ibb = ibb + 1
@@ -816,15 +816,15 @@ def TestOtherOperations (geompy, math):
   for afaces in faces_list:
     ifa = 1
     for aface in afaces:
-      ssname = "Reflection of face " + `ifa` + " of box " + `ibb` + " (by history)"
+      ssname = "Reflection of face " + repr(ifa) + " of box " + repr(ibb) + " (by history)"
       if ibb == 6 and (ifa == 2 or ifa == 4):
         # use IDL interface directly to avoid error message appearance in Python console
         refl_box_face = geompy.ShapesOp.GetInPlaceByHistory(part, aface)
         if refl_box_face is not None:
           geompy.addToStudyInFather(part, refl_box_face, ssname)
           error = "Result of GetInPlaceByHistory must be NULL for face "
-          error += `ifa` + " of box " + `ibb`
-          raise RuntimeError, error
+          error += repr(ifa) + " of box " + repr(ibb)
+          raise RuntimeError(error)
       else:
         # use geompy interface
         refl_box_face = geompy.GetInPlaceByHistory(part, aface)
index 43f1e10165c2876a00e56c36c22c13a512fdf9f0..4b4077653383664f456ed1cc444651094602075f 100644 (file)
@@ -30,7 +30,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import math
 import GEOM_Spanner
@@ -42,4 +42,4 @@ smesh = None
 
 GEOM_Spanner.MakeSpanner(geompy, math, isBlocksTest, isMeshTest, smesh)
 
-salome.sg.updateObjBrowser(True);
+salome.sg.updateObjBrowser();
index 8f2fd6f84ad853d26aaef73ae8edb1009edc5f0f..c7628b179a6111f6350eb63fa3034d5ccb194075 100755 (executable)
@@ -35,13 +35,13 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 geomgui = salome.ImportComponentGUI("GEOM") 
 import salome_ComponentGUI
 def addToStudy(shape, name):
     i = geompy.addToStudy(shape, name)
-    salome.sg.updateObjBrowser(False)
+    salome.sg.updateObjBrowser()
     if not isinstance(geomgui, type(salome_ComponentGUI)):
         geomgui.createAndDisplayGO(i)
     return i
index 64946227ed84bea989a61f0f68732a9d8135834c..d46ed829d2bf40aa1d59a30cb93fceca42eaaf85 100644 (file)
@@ -30,7 +30,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 ind = 0
 boxlist = []
@@ -41,7 +41,7 @@ while ind < 5:
     x2 = 10. * (ind+1)
     y2 = 20. * (ind+1)
     z2 = 30. * (ind+1)
-    print x1, y1, z1, x2, y2, z2
+    print(x1, y1, z1, x2, y2, z2)
 
     point1 = geompy.MakeVertex(x1, y1, z1)
     name1 = "point1_%d"%(ind)
index 6c0fdf11c758b5d0a8f5d225d3cb089f01214bd7..8eb62bd1334d70d123f488621aaefe962674c897 100644 (file)
@@ -30,16 +30,16 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 import math
 
 geom = salome.lcc.FindOrLoadComponent("FactoryServer", "GEOM")
 myBuilder = salome.myStudy.NewBuilder()
 
-BasicOp  = geom.GetIBasicOperations(salome.myStudyId)
-PrimOp   = geom.GetI3DPrimOperations(salome.myStudyId)
-InsertOp = geom.GetIInsertOperations(salome.myStudyId)
-TrsfOp   = geom.GetITransformOperations(salome.myStudyId)
+BasicOp  = geom.GetIBasicOperations()
+PrimOp   = geom.GetI3DPrimOperations()
+InsertOp = geom.GetIInsertOperations()
+TrsfOp   = geom.GetITransformOperations()
 
 point0  = BasicOp.MakePointXYZ(0.,0.,0.)
 pointz1 = BasicOp.MakePointXYZ(0.,0.,1.)
index a44cb7d37f6c5b87d2460567a6967b18b38f0a1d..fef51823958fb8b0062e68dddcb04f0f9a1c9471 100644 (file)
@@ -30,17 +30,17 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 import math
 from time import sleep
 import salome_ComponentGUI
 
 gg = salome.ImportComponentGUI("GEOM")
 
-BasicOp  = geompy.GetIBasicOperations(salome.myStudyId)
-PrimOp   = geompy.GetI3DPrimOperations(salome.myStudyId)
-InsertOp = geompy.GetIInsertOperations(salome.myStudyId)
-TrsfOp   = geompy.GetITransformOperations(salome.myStudyId)
+BasicOp  = geompy.GetIBasicOperations()
+PrimOp   = geompy.GetI3DPrimOperations()
+InsertOp = geompy.GetIInsertOperations()
+TrsfOp   = geompy.GetITransformOperations()
 
 point0  = BasicOp.MakePointXYZ(0.,0.,0.)
 pointz1 = BasicOp.MakePointXYZ(0.,0.,1.)
index 312e47ddad202c7aba44ec8333d679711f91d8c6..c4b65ff74c0b569ad77aff71d70e32bd30e0a1f3 100755 (executable)
@@ -29,7 +29,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import math
 
index 029e548fc27211d8a0527479ba5e14283c4008a6..da3ad2f5e5a81bfe6603e3a3deb5dee44b1635a6 100644 (file)
@@ -30,10 +30,10 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 #Create Points
-BasicOp = geompy.GetIBasicOperations(salome.myStudyId)
+BasicOp = geompy.GetIBasicOperations()
 Vertex1 = BasicOp.MakePointXYZ(0., 0., 0.)
 Vertex2 = BasicOp.MakePointXYZ(100., 20., 30.)
 Vertex3 = BasicOp.MakePointXYZ(150., 100., -25.)
index 6e40f51995f179e0755e5546ded437ddaf073dfb..fc112f102e30d0235c26a09e42217c506958e129 100755 (executable)
@@ -27,7 +27,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 ind = 1
 circlelist = []
@@ -42,7 +42,7 @@ while ind < 6:
     y3 = 0. * (ind+1)
     z3 = -10. * (ind+1)
 
-    print x1, y1, z1, x2, y2, z2, x3, y3, z3
+    print(x1, y1, z1, x2, y2, z2, x3, y3, z3)
 
     point1 = geompy.MakeVertex(x1, y1, z1)
     name1 = "point1_%d"%(ind)
index 22db148d358b9e1544feed96a9674b8b9963cd78..23650e622ee66b83bf91fdcd72be793d66701022 100644 (file)
@@ -27,7 +27,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 data_dir = os.getenv('DATA_DIR')
 if data_dir:
index f2e606a1600f7d79ee04d856450071181f589481..57ae8ada65d3c30468e995630fa1a55a88252f69 100644 (file)
@@ -30,7 +30,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 import math
 
 #Variables modifiables
@@ -56,7 +56,7 @@ PosCour = PosZ + HauteurT * 4 / 7
 PosRot = PosZ + 0.9 * HauteurT
 
 #Points
-BasicOp = geompy.GetIBasicOperations(salome.myStudyId)
+BasicOp = geompy.GetIBasicOperations()
 OO = BasicOp.MakePointXYZ(0, 0, 0)
 P0 = BasicOp.MakePointXYZ(0, 0, 1)
 P1 = BasicOp.MakePointXYZ(PosX, PosY, PosZ)
index ea969eeef48ca7f1bd1f57518e09ab1b01b05848..0c2fe58934891d5321b239e7c2528c02b6229d85 100644 (file)
@@ -31,7 +31,7 @@
 
 from launchConfigureParser import verbose
 
-if verbose(): print "============== import GEOM ======================="
+if verbose(): print("============== import GEOM =======================")
 
 import GEOM
 
index ee95adf8b21492ededd8b2dfecb8b9c4045ce02f..c9a26d12c07e7e3e2a02e67034eb51673fd25b53 100755 (executable)
@@ -35,7 +35,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 # Interface with geometry
 # -----------------------
@@ -48,7 +48,7 @@ geomgui = salome.ImportComponentGUI("GEOM")
 
 def addToStudy(shape, name):
     i = geompy.addToStudy(shape, name)
-    salome.sg.updateObjBrowser(False)
+    salome.sg.updateObjBrowser()
 #    geomgui.createAndDisplayGO(i)
     return i
 
index 1a496174d0cab1073f3b7218899cca122d6bfdf5..b169b6c6bf26491c99b1ca0620548bea85daa8a4 100755 (executable)
@@ -34,7 +34,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 #
 # base de l'assemblage
@@ -159,7 +159,7 @@ weldId = geompy.addToStudy(weld,"weld")
 #
 assemblage = geompy.Partition([base ,weld ,trav])
 assemblageId = geompy.addToStudy(assemblage, "assemblage")
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
 #
 # Display
 #
index aa4e782dcee363da69842e1996a8bc5ecde92ab9..f58eb836863a2089deb6c2f22f68ba876328c884 100755 (executable)
@@ -34,7 +34,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 #
 # base de l'assemblage
 #
index ce546d4672795b19f75145cd0711ec36b497d5d7..cc78f4ca0a61e3d792b20fe7cb3847ca1f765ce2 100644 (file)
@@ -28,7 +28,7 @@
 #
 import salome
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import math
 
index 65fad3f195ba526882aa54d3fb7c1ac601d5f679..f8e8099f025d5b7d89bfbb900d0a0bc925432545 100644 (file)
@@ -24,7 +24,7 @@ from GEOM import IIGESOperations
 __libraryName__ = "IGESPluginEngine"
 
 def GetIGESPluginOperations(self):
-    anOp = self.GetPluginOperations(self.myStudyId, __libraryName__)
+    anOp = self.GetPluginOperations(__libraryName__)
     return anOp._narrow(IIGESOperations)
 
 ## Export the given shape into a file with given name in IGES format.
@@ -46,7 +46,7 @@ def ExportIGES(self, theObject, theFileName, theVersion="5.1"):
     anOp = GetIGESPluginOperations(self)
     anOp.ExportIGES(theObject, theFileName, theVersion)
     if anOp.IsDone() == 0:
-        raise RuntimeError,  "Export : " + anOp.GetErrorCode()
+        raise RuntimeError("Export : " + anOp.GetErrorCode())
         pass
     pass
 
@@ -96,7 +96,7 @@ def ImportIGES(self, theFileName, theIsIgnoreUnits = False, theName=None):
     
     anIsIgnoreUnits = theIsIgnoreUnits
     aName = theName
-    if isinstance( theIsIgnoreUnits, basestring ):
+    if isinstance( theIsIgnoreUnits, str ):
         anIsIgnoreUnits = False
         aName = theIsIgnoreUnits
         pass
index 0278053e49e648cfca3d691795976734f1f14ce0..2bc092087cf9b24ff2c5b992b1c0834b0c92fd93 100755 (executable)
@@ -31,7 +31,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 #Points creation (2.2)
 Vertex_1 = geompy.MakeVertex(0, 0, 0)
@@ -57,4 +57,4 @@ geompy.addToStudy(Curve_1, "Curve_1")
 Line_1 = geompy.MakeLineTwoPnt(Vertex_4, Vertex_5)
 geompy.addToStudy(Line_1, "Line_1")
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 7f1633502ea838b86a7aee1c99ec5d2fa8a1c3c6..6139da415da788795b3b618f7d0c12880af4cad2 100755 (executable)
@@ -31,7 +31,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import os
 
@@ -80,11 +80,11 @@ theFilenameToSave = theHomePath + "/Pyramid.hdf"
 if os.access(theFilenameToSave, os.F_OK):
     if os.access(theFilenameToSave, os.W_OK):
         os.remove(theFilenameToSave)
-        salome.myStudyManager.SaveAs(theFilenameToSave, salome.myStudy, 0)
+        salome.myStudy.SaveAs(theFilenameToSave, 0, 0)
     else:
-        print "You have no enough permissions to overwrite HDF file: ",theFilenameToSave
+        print("You have no enough permissions to overwrite HDF file: ",theFilenameToSave)
 else:
-    salome.myStudyManager.SaveAs(theFilenameToSave, salome.myStudy, 0)
+    salome.myStudy.SaveAs(theFilenameToSave, 0, 0)
     
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index e33690b3f6901d6824a6a0be6f4a9453ee004273..a4b23893cf07086f19836d12892906beca60a9d7 100755 (executable)
@@ -31,7 +31,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 # Stage 2: "Creation of geometry"
 
@@ -80,4 +80,4 @@ id_Face_4 = geompy.addToStudyInFather(Compound_1,Compound_1_faces[3], "Face_4")
 id_Compound_2 = geompy.addToStudy(Compound_2, "Compound_2")
 id_Solid_2 = geompy.addToStudyInFather(Compound_2,Compound_2_solids[1], "Solid_2")
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 65111eb68819c4457c44bb4530020d78b188474a..2e769173f36ce49cdab81180544860c2040ee2b2 100755 (executable)
@@ -31,7 +31,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 #Points creation (2.2)
 Vertex_1 = geompy.MakeVertex(0, 0, 0)
@@ -63,4 +63,4 @@ geompy.addToStudy(Edge_4, "Edge_4")
 Wire_1 = geompy.MakeWire([Edge_1, Edge_2, Edge_3, Edge_4])
 geompy.addToStudy(Wire_1, "Wire_1")
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 253951b29ae965979864f02f72d2d7dfcd765d16..2b93280fa7150aa43d18ce17be6b88fc2f737635 100755 (executable)
@@ -31,7 +31,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 #Box creation (2.2)
 Box_1 = geompy.MakeBoxDXDYDZ(200, 400, 300)
@@ -111,4 +111,4 @@ for i in range (0, NbExplodedVertices_Face_18):
    name = "Vertex_" + str(NbExplodedVertices_Box_1+NbExplodedVertices_Face_7+NbExplodedVertices_Face_10+NbExplodedVertices_Face_15+i+1)
    geompy.addToStudyInFather(ListOfFaces_Partition_1[NbExplodedFaces_Partition_1-1], ListOfVertices_Face_18[i], name)
 
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()
index 84ac4cf0ca653f9c6894ce68532e9caf82fd1723..fca12a84a3335aa4b02e8d77f1fdeed2add5a6f1 100644 (file)
@@ -25,7 +25,7 @@ import GEOM
 __libraryName__ = "STEPPluginEngine"
 
 def GetSTEPPluginOperations(self):
-    anOp = self.GetPluginOperations(self.myStudyId, __libraryName__)
+    anOp = self.GetPluginOperations(__libraryName__)
     return anOp._narrow(ISTEPOperations)
 
 ## Export the given shape into a file with given name in STEP format.
@@ -45,7 +45,7 @@ def ExportSTEP(self, theObject, theFileName, theUnit=GEOM.LU_METER):
     anOp = GetSTEPPluginOperations(self)
     anOp.ExportSTEP(theObject, theFileName, theUnit)
     if anOp.IsDone() == 0:
-        raise RuntimeError,  "Export : " + anOp.GetErrorCode()
+        raise RuntimeError("Export : " + anOp.GetErrorCode())
         pass
     pass
 
@@ -103,11 +103,11 @@ def ImportSTEP(self, theFileName, theIsIgnoreUnits = False,
     anIsIgnoreUnits = theIsIgnoreUnits
     anIsCreateAssemblies = IsCreateAssemblies;
     aName = theName
-    if isinstance( theIsIgnoreUnits, basestring ):
+    if isinstance( theIsIgnoreUnits, str ):
         anIsIgnoreUnits = False
         aName = theIsIgnoreUnits
         pass
-    elif isinstance( IsCreateAssemblies, basestring ):
+    elif isinstance( IsCreateAssemblies, str ):
         anIsCreateAssemblies = False
         aName = IsCreateAssemblies
         pass
index 1ee593c1352ee96d06ce3823791809e1ab59dabd..5adf21ea6e581fba40464fdf7b63da5637d1e50c 100644 (file)
@@ -24,7 +24,7 @@ from GEOM import ISTLOperations
 __libraryName__ = "STLPluginEngine"
 
 def GetSTLPluginOperations(self):
-    anOp = self.GetPluginOperations(self.myStudyId, __libraryName__)
+    anOp = self.GetPluginOperations(__libraryName__)
     return anOp._narrow(ISTLOperations)
 
 ## Export the given shape into a file with given name in STL format.
@@ -52,7 +52,7 @@ def ExportSTL(self, theObject, theFileName, theIsASCII = True, theDeflection = 0
     anOp = GetSTLPluginOperations(self)
     anOp.ExportSTL(theObject, theFileName, theIsASCII, theDeflection, theIsRelative )
     if anOp.IsDone() == 0:
-        raise RuntimeError,  "Export : " + anOp.GetErrorCode()
+        raise RuntimeError("Export : " + anOp.GetErrorCode())
         pass
     pass
 
index c970486509f25beac3d49af0c1fe0fe03a731d8d..e0a3eca4d717649d5261075a586b8aacb5057764 100644 (file)
@@ -24,7 +24,7 @@ from GEOM import IVTKOperations
 __libraryName__ = "VTKPluginEngine"
 
 def GetVTKPluginOperations(self):
-    anOp = self.GetPluginOperations(self.myStudyId, __libraryName__)
+    anOp = self.GetPluginOperations(__libraryName__)
     return anOp._narrow(IVTKOperations)
 
 ## Export the given shape into a file with given name in VTK format.
@@ -45,6 +45,6 @@ def ExportVTK(self, theObject, theFileName, theDeflection=0.001):
     anOp = GetVTKPluginOperations(self)
     anOp.ExportVTK(theObject, theFileName, theDeflection)
     if anOp.IsDone() == 0:
-        raise RuntimeError,  "Export : " + anOp.GetErrorCode()
+        raise RuntimeError("Export : " + anOp.GetErrorCode())
         pass
     pass
index 84a0945d65e796e82ed787f78769e78b90874408..bab02fd361c0b6518475972ac7dcbf6f77e821a2 100644 (file)
@@ -24,7 +24,7 @@ from GEOM import IXAOOperations
 __libraryName__ = "XAOPluginEngine"
 
 def GetXAOPluginOperations(self):
-    anOp = self.GetPluginOperations(self.myStudyId, __libraryName__)
+    anOp = self.GetPluginOperations(__libraryName__)
     return anOp._narrow(IXAOOperations)
 
 ## Export a shape to XAO format
index e3b56a2282c547200e2961a97cf13b341e58ca7e..3ae88b3da24fae51f11a68975698b0fed9e67af9 100644 (file)
@@ -52,7 +52,7 @@
 ## @code
 ## import salome
 ## from salome.geom import geomBuilder
-## geompy = geomBuilder.New(salome.myStudy)
+## geompy = geomBuilder.New()
 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100) # box is not published in the study yet
 ## geompy.addToStudy(box, "box")             # explicit publishing
 ## @endcode
 ## @code
 ## import salome
 ## from salome.geom import geomBuilder
-## geompy = geomBuilder.New(salome.myStudy)
+## geompy = geomBuilder.New()
 ## geompy.addToStudyAuto() # enable automatic publication
 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100)
 ## # the box is created and published in the study with default name
 ## @code
 ## import salome
 ## from salome.geom import geomBuilder
-## geompy = geomBuilder.New(salome.myStudy)
+## geompy = geomBuilder.New()
 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, "Box")
 ## # the box was created and published in the study
 ## folder = geompy.NewFolder("Primitives")
 
 ## @}
 
+import omniORB
+
 # initialize SALOME session in try/except block
 # to avoid problems in some cases, e.g. when generating documentation
 try:
@@ -258,11 +260,89 @@ import functools
 
 from salome.geom.gsketcher import Sketcher3D, Sketcher2D, Polyline2D
 
+# In case the omniORBpy EnumItem class does not fully support Python 3
+# (for instance in version 4.2.1-2), the comparison ordering methods must be
+# defined
+#
+try:
+    GEOM.COMPOUND < GEOM.SOLID
+except TypeError:
+    def enumitem_eq(self, other):
+        try:
+            if isinstance(other, omniORB.EnumItem):
+                if other._parent_id == self._parent_id:
+                    return self._v == other._v
+                else:
+                    return self._parent_id == other._parent_id
+            else:
+                return id(self) == id(other)
+        except:
+            return id(self) == id(other)
+
+    def enumitem_lt(self, other):
+        try:
+            if isinstance(other, omniORB.EnumItem):
+                if other._parent_id == self._parent_id:
+                    return self._v < other._v
+                else:
+                    return self._parent_id < other._parent_id
+            else:
+                return id(self) < id(other)
+        except:
+            return id(self) < id(other)
+
+    def enumitem_le(self, other):
+        try:
+            if isinstance(other, omniORB.EnumItem):
+                if other._parent_id == self._parent_id:
+                    return self._v <= other._v
+                else:
+                    return self._parent_id <= other._parent_id
+            else:
+                return id(self) <= id(other)
+        except:
+            return id(self) <= id(other)
+
+    def enumitem_gt(self, other):
+        try:
+            if isinstance(other, omniORB.EnumItem):
+                if other._parent_id == self._parent_id:
+                    return self._v > other._v
+                else:
+                    return self._parent_id > other._parent_id
+            else:
+                return id(self) > id(other)
+        except:
+            return id(self) > id(other)
+
+    def enumitem_ge(self, other):
+        try:
+            if isinstance(other, omniORB.EnumItem):
+                if other._parent_id == self._parent_id:
+                    return self._v >= other._v
+                else:
+                    return self._parent_id >= other._parent_id
+            else:
+                return id(self) >= id(other)
+        except:
+            return id(self) >= id(other)
+
+    GEOM.omniORB.EnumItem.__eq__ = enumitem_eq
+    GEOM.omniORB.EnumItem.__lt__ = enumitem_lt
+    GEOM.omniORB.EnumItem.__le__ = enumitem_le
+    GEOM.omniORB.EnumItem.__gt__ = enumitem_gt
+    GEOM.omniORB.EnumItem.__ge__ = enumitem_ge
+    omniORB.EnumItem.__eq__ = enumitem_eq
+    omniORB.EnumItem.__lt__ = enumitem_lt
+    omniORB.EnumItem.__le__ = enumitem_le
+    omniORB.EnumItem.__gt__ = enumitem_gt
+    omniORB.EnumItem.__ge__ = enumitem_ge
+
 # service function
 def _toListOfNames(_names, _size=-1):
     l = []
     import types
-    if type(_names) in [types.ListType, types.TupleType]:
+    if type(_names) in [list, tuple]:
         for i in _names: l.append(i)
     elif _names:
         l.append(_names)
@@ -296,7 +376,7 @@ def ManageTransactions(theOpeName):
 ## @ingroup l1_geomBuilder_auxiliary
 def RaiseIfFailed (Method_name, Operation):
     if not Operation.IsDone() and Operation.GetErrorCode() != "NOT_FOUND_ANY":
-        raise RuntimeError, Method_name + " : " + Operation.GetErrorCode()
+        raise RuntimeError(Method_name + " : " + Operation.GetErrorCode())
 
 ## Return list of variables value from salome notebook
 ## @ingroup l1_geomBuilder_auxiliary
@@ -316,7 +396,7 @@ def ParseParameters(*parameters):
                 if notebook.isVariable(parameter):
                     Result.append(notebook.get(parameter))
                 else:
-                    raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
+                    raise RuntimeError("Variable with name '" + parameter + "' doesn't exist!!!")
                 pass
             else:
                 Result.append(parameter)
@@ -365,7 +445,7 @@ def ParseSketcherCommand(command):
                     Result = Result + str(notebook.get(parameter)) + " "
                     pass
                 else:
-                    raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
+                    raise RuntimeError("Variable with name '" + parameter + "' doesn't exist!!!")
                     pass
                 pass
             else:
@@ -438,7 +518,7 @@ def PackData(data):
 ## For example,
 ## \code
 ## from salome.geom import geomBuilder
-## geompy = geomBuilder.New(salome.myStudy)
+## geompy = geomBuilder.New()
 ## texture = geompy.readtexture('mytexture.dat')
 ## texture = geompy.AddTexture(*texture)
 ## obj.SetMarkerTexture(texture)
@@ -464,7 +544,7 @@ def ReadTexture(fname):
 
     Example of usage:
         from salome.geom import geomBuilder
-        geompy = geomBuilder.New(salome.myStudy)
+        geompy = geomBuilder.New()
         texture = geompy.readtexture('mytexture.dat')
         texture = geompy.AddTexture(*texture)
         obj.SetMarkerTexture(texture)
@@ -554,7 +634,7 @@ engine = None
 doLcc = False
 created = False
 
-class geomBuilder(object, GEOM._objref_GEOM_Gen):
+class geomBuilder(GEOM._objref_GEOM_Gen):
 
         ## Enumeration ShapeType as a dictionary. \n
         ## Topological types of shapes (like Open Cascade types). See GEOM::shape_type for details.
@@ -605,7 +685,7 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
         #  @ingroup l1_geomBuilder_auxiliary
         kind = GEOM.GEOM_IKindOfShape
 
-        def __new__(cls):
+        def __new__(cls, *args):
             global engine
             global geom
             global doLcc
@@ -644,15 +724,14 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
             #print "return geom 2 ", geom
             return geom
 
-        def __init__(self):
+        def __init__(self, *args):
             global created
             #print "-------- geomBuilder __init__ --- ", created, self
             if not created:
               created = True
-              GEOM._objref_GEOM_Gen.__init__(self)
+              GEOM._objref_GEOM_Gen.__init__(self, *args)
               self.myMaxNbSubShapesAllowed = 0 # auto-publishing is disabled by default
               self.myBuilder = None
-              self.myStudyId = 0
               self.father    = None
 
               self.BasicOp  = None
@@ -686,10 +765,10 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
             # ---
             def _item_name(_names, _defname, _idx=-1):
                 if not _names: _names = _defname
-                if type(_names) in [types.ListType, types.TupleType]:
+                if type(_names) in [list, tuple]:
                     if _idx >= 0:
                         if _idx >= len(_names) or not _names[_idx]:
-                            if type(_defname) not in [types.ListType, types.TupleType]:
+                            if type(_defname) not in [list, tuple]:
                                 _name = "%s_%d"%(_defname, _idx+1)
                             elif len(_defname) > 0 and _idx >= 0 and _idx < len(_defname):
                                 _name = _defname[_idx]
@@ -734,7 +813,7 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
             if not theName and not theDefaultName:
                 return # neither theName nor theDefaultName is given
             import types
-            if type(theObj) in [types.ListType, types.TupleType]:
+            if type(theObj) in [list, tuple]:
                 # list of objects is being published
                 idx = 0
                 for obj in theObj:
@@ -753,12 +832,11 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
 
         ## @addtogroup l1_geomBuilder_auxiliary
         ## @{
-        def init_geom(self,theStudy):
-            self.myStudy = theStudy
-            self.myStudyId = self.myStudy._get_StudyId()
+        def init_geom(self):
+            self.myStudy = salome.myStudy
             self.myBuilder = self.myStudy.NewBuilder()
             self.father = self.myStudy.FindComponent("GEOM")
-            notebook.myStudy = theStudy
+            notebook.myStudy = salome.myStudy
             if self.father is None:
                 self.father = self.myBuilder.NewComponent("GEOM")
                 A1 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributeName")
@@ -769,19 +847,19 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
                 aPixmap.SetPixMap("ICON_OBJBROWSER_Geometry")
                 self.myBuilder.DefineComponentInstance(self.father,self)
                 pass
-            self.BasicOp  = self.GetIBasicOperations    (self.myStudyId)
-            self.CurvesOp = self.GetICurvesOperations   (self.myStudyId)
-            self.PrimOp   = self.GetI3DPrimOperations   (self.myStudyId)
-            self.ShapesOp = self.GetIShapesOperations   (self.myStudyId)
-            self.HealOp   = self.GetIHealingOperations  (self.myStudyId)
-            self.InsertOp = self.GetIInsertOperations   (self.myStudyId)
-            self.BoolOp   = self.GetIBooleanOperations  (self.myStudyId)
-            self.TrsfOp   = self.GetITransformOperations(self.myStudyId)
-            self.LocalOp  = self.GetILocalOperations    (self.myStudyId)
-            self.MeasuOp  = self.GetIMeasureOperations  (self.myStudyId)
-            self.BlocksOp = self.GetIBlocksOperations   (self.myStudyId)
-            self.GroupOp  = self.GetIGroupOperations    (self.myStudyId)
-            self.FieldOp  = self.GetIFieldOperations    (self.myStudyId)
+            self.BasicOp  = self.GetIBasicOperations    ()
+            self.CurvesOp = self.GetICurvesOperations   ()
+            self.PrimOp   = self.GetI3DPrimOperations   ()
+            self.ShapesOp = self.GetIShapesOperations   ()
+            self.HealOp   = self.GetIHealingOperations  ()
+            self.InsertOp = self.GetIInsertOperations   ()
+            self.BoolOp   = self.GetIBooleanOperations  ()
+            self.TrsfOp   = self.GetITransformOperations()
+            self.LocalOp  = self.GetILocalOperations    ()
+            self.MeasuOp  = self.GetIMeasureOperations  ()
+            self.BlocksOp = self.GetIBlocksOperations   ()
+            self.GroupOp  = self.GetIGroupOperations    ()
+            self.FieldOp  = self.GetIFieldOperations    ()
 
             # set GEOM as root in the use case tree
             self.myUseCaseBuilder = self.myStudy.GetUseCaseBuilder()
@@ -792,8 +870,8 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
             self.myBuilder.LoadWith(self.father, self)
             pass
 
-        def GetPluginOperations(self, studyID, libraryName):
-            op = GEOM._objref_GEOM_Gen.GetPluginOperations(self, studyID, libraryName)
+        def GetPluginOperations(self, libraryName):
+            op = GEOM._objref_GEOM_Gen.GetPluginOperations(self, libraryName)
             return op
 
         ## Enable / disable results auto-publishing
@@ -833,12 +911,12 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
 
         ## Dump component to the Python script
         #  This method overrides IDL function to allow default values for the parameters.
-        def DumpPython(self, theStudy, theIsPublished=True, theIsMultiFile=True):
+        def DumpPython(self, theIsPublished=True, theIsMultiFile=True):
             """
             Dump component to the Python script
             This method overrides IDL function to allow default values for the parameters.
             """
-            return GEOM._objref_GEOM_Gen.DumpPython(self, theStudy, theIsPublished, theIsMultiFile)
+            return GEOM._objref_GEOM_Gen.DumpPython(self, theIsPublished, theIsMultiFile)
 
         ## Get name for sub-shape aSubObj of shape aMainObj
         #
@@ -893,13 +971,13 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
             """
             # Example: see GEOM_TestAll.py
             try:
-                aSObject = self.AddInStudy(self.myStudy, aShape, aName, None)
+                aSObject = self.AddInStudy(aShape, aName, None)
                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
                 if doRestoreSubShapes:
-                    self.RestoreSubShapesSO(self.myStudy, aSObject, theArgs,
+                    self.RestoreSubShapesSO(aSObject, theArgs,
                                             theFindMethod, theInheritFirstArg, True )
             except:
-                print "addToStudy() failed"
+                print("addToStudy() failed")
                 return ""
             return aShape.GetStudyEntry()
 
@@ -926,10 +1004,10 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
             """
             # Example: see GEOM_TestAll.py
             try:
-                aSObject = self.AddInStudy(self.myStudy, aShape, aName, aFather)
+                aSObject = self.AddInStudy(aShape, aName, aFather)
                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
             except:
-                print "addToStudyInFather() failed"
+                print("addToStudyInFather() failed")
                 return ""
             return aShape.GetStudyEntry()
 
@@ -1012,7 +1090,7 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
                 list of published sub-shapes
             """
             # Example: see GEOM_TestAll.py
-            return self.RestoreSubShapesO(self.myStudy, theObject, theArgs,
+            return self.RestoreSubShapesO(theObject, theArgs,
                                           theFindMethod, theInheritFirstArg, theAddPrefix)
 
         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
@@ -1064,7 +1142,7 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
                 list of published sub-shapes
             """
             # Example: see GEOM_TestAll.py
-            return self.RestoreGivenSubShapesO(self.myStudy, theObject, theArgs,
+            return self.RestoreGivenSubShapesO(theObject, theArgs,
                                                theFindMethod, theInheritFirstArg, theAddPrefix)
 
         # end of l3_restore_ss
@@ -3069,14 +3147,14 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
             if isinstance(theA,str):
                 flag = True
             theR,theH,theA,Parameters = ParseParameters(theR, theH, theA)
-           if flag:
+            if flag:
                 theA = theA*math.pi/180.
-           if theA<=0. or theA>=2*math.pi:
-             raise ValueError("The angle parameter should be strictly between 0 and 2*pi.")
-           anObj = self.PrimOp.MakeCylinderPntVecRHA(thePnt, theAxis, theR, theH, theA)
-           RaiseIfFailed("MakeCylinderPntVecRHA", self.PrimOp)
-           anObj.SetParameters(Parameters)
-           self._autoPublish(anObj, theName, "cylinder")
+            if theA<=0. or theA>=2*math.pi:
+                raise ValueError("The angle parameter should be strictly between 0 and 2*pi.")
+            anObj = self.PrimOp.MakeCylinderPntVecRHA(thePnt, theAxis, theR, theH, theA)
+            RaiseIfFailed("MakeCylinderPntVecRHA", self.PrimOp)
+            anObj.SetParameters(Parameters)
+            self._autoPublish(anObj, theName, "cylinder")
             return anObj
 
         ## Create a cylinder with given radius and height at
@@ -3155,7 +3233,7 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
             if flag:
                 theA = theA*math.pi/180.
             if theA<=0. or theA>=2*math.pi:
-             raise ValueError("The angle parameter should be strictly between 0 and 2*pi.")
+                raise ValueError("The angle parameter should be strictly between 0 and 2*pi.")
             anObj = self.PrimOp.MakeCylinderRHA(theR, theH, theA)
             RaiseIfFailed("MakeCylinderRHA", self.PrimOp)
             anObj.SetParameters(Parameters)
@@ -4212,11 +4290,11 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
                                                               theWithContact, theWithCorrection,
                                                               IsGenerateGroups)
                 if self.PrimOp.IsDone() == 0:
-                    print "Problems with pipe creation between ",i," and ",i+1," sections"
+                    print("Problems with pipe creation between ",i," and ",i+1," sections")
                     RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
                     break
                 else:
-                    print "Pipe between ",i," and ",i+1," sections is OK"
+                    print("Pipe between ",i," and ",i+1," sections is OK")
                     res.append(aList[0])
                     pass
                 pass
@@ -4704,7 +4782,7 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
             # Example: see GEOM_TestAll.py
             anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted)
             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
-                print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
+                print("WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built.")
             else:
                 RaiseIfFailed("MakeFace", self.ShapesOp)
             self._autoPublish(anObj, theName, "face")
@@ -4746,7 +4824,7 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
             # Example: see GEOM_TestAll.py
             anObj = self.ShapesOp.MakeFaceWires(ToList(theWires), isPlanarWanted)
             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
-                print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
+                print("WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built.")
             else:
                 RaiseIfFailed("MakeFaceWires", self.ShapesOp)
             self._autoPublish(anObj, theName, "face")
@@ -4893,7 +4971,7 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
                 #if len(descr) > 0:
                 #    raise RuntimeError, "MakeSolidShells : " + descr
                 if descr == "WRN_SHAPE_UNCLOSED":
-                    raise RuntimeError, "MakeSolidShells : Unable to create solid from unclosed shape"
+                    raise RuntimeError("MakeSolidShells : Unable to create solid from unclosed shape")
             anObj = self.ShapesOp.MakeSolidShells(theShells)
             RaiseIfFailed("MakeSolidShells", self.ShapesOp)
             self._autoPublish(anObj, theName, "solid")
@@ -7441,7 +7519,7 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
             theTolerance,Parameters = ParseParameters(theTolerance)
             anObj = self.ShapesOp.MakeGlueFaces(ToList(theShapes), theTolerance, doKeepNonSolids)
             if anObj is None:
-                raise RuntimeError, "MakeGlueFaces : " + self.ShapesOp.GetErrorCode()
+                raise RuntimeError("MakeGlueFaces : " + self.ShapesOp.GetErrorCode())
             anObj.SetParameters(Parameters)
             self._autoPublish(anObj, theName, "glueFaces")
             return anObj
@@ -7523,7 +7601,7 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
             anObj = self.ShapesOp.MakeGlueFacesByList(ToList(theShapes), theTolerance, ToList(theFaces),
                                                       doKeepNonSolids, doGlueAllEdges)
             if anObj is None:
-                raise RuntimeError, "MakeGlueFacesByList : " + self.ShapesOp.GetErrorCode()
+                raise RuntimeError("MakeGlueFacesByList : " + self.ShapesOp.GetErrorCode())
             self._autoPublish(anObj, theName, "glueFaces")
             return anObj
 
@@ -7555,7 +7633,7 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
             theTolerance,Parameters = ParseParameters(theTolerance)
             anObj = self.ShapesOp.MakeGlueEdges(ToList(theShapes), theTolerance)
             if anObj is None:
-                raise RuntimeError, "MakeGlueEdges : " + self.ShapesOp.GetErrorCode()
+                raise RuntimeError("MakeGlueEdges : " + self.ShapesOp.GetErrorCode())
             anObj.SetParameters(Parameters)
             self._autoPublish(anObj, theName, "glueEdges")
             return anObj
@@ -7625,7 +7703,7 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
             """
             anObj = self.ShapesOp.MakeGlueEdgesByList(ToList(theShapes), theTolerance, theEdges)
             if anObj is None:
-                raise RuntimeError, "MakeGlueEdgesByList : " + self.ShapesOp.GetErrorCode()
+                raise RuntimeError("MakeGlueEdgesByList : " + self.ShapesOp.GetErrorCode())
             self._autoPublish(anObj, theName, "glueEdges")
             return anObj
 
@@ -8145,7 +8223,7 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
             if Limit == self.ShapeType["AUTO"]:
                 # automatic detection of the most appropriate shape limit type
                 lim = GEOM.SHAPE
-                for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
+                for s in ListShapes: lim = min(lim, s.GetMaxShapeType())
                 Limit = EnumToLong(lim)
                 pass
             anObj = self.BoolOp.MakePartition(ListShapes, ListTools,
@@ -8218,7 +8296,7 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
             if Limit == self.ShapeType["AUTO"]:
                 # automatic detection of the most appropriate shape limit type
                 lim = GEOM.SHAPE
-                for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
+                for s in ListShapes: lim = min(lim, s.GetMaxShapeType())
                 Limit = EnumToLong(lim)
                 pass
             anObj = self.BoolOp.MakePartitionNonSelfIntersectedShape(ListShapes, ListTools,
@@ -9847,7 +9925,7 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
             """
             Deprecated method. Use MultiRotate1DNbTimes instead.
             """
-            print "The method MultiRotate1D is DEPRECATED. Use MultiRotate1DNbTimes instead."
+            print("The method MultiRotate1D is DEPRECATED. Use MultiRotate1DNbTimes instead.")
             return self.MultiRotate1DNbTimes(theObject, theAxis, theNbTimes, theName)
 
         ## The same, as MultiRotate2DByStep(), but theAngle is in degrees.
@@ -9861,7 +9939,7 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
             Example of usage:
                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
             """
-            print "The method MultiRotate2D is DEPRECATED. Use MultiRotate2DByStep instead."
+            print("The method MultiRotate2D is DEPRECATED. Use MultiRotate2DByStep instead.")
             theAngle, theNbTimes1, theStep, theNbTimes2, Parameters = ParseParameters(theAngle, theNbTimes1, theStep, theNbTimes2)
             anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2)
             RaiseIfFailed("MultiRotate2D", self.TrsfOp)
@@ -9881,7 +9959,7 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
                 MultiRot1D = geompy.MakeMultiRotation1D(prism, vy, pz, 6)
             """
-            print "The method MakeMultiRotation1D is DEPRECATED. Use MakeMultiRotation1DNbTimes instead."
+            print("The method MakeMultiRotation1D is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.")
             aVec = self.MakeLine(aPoint,aDir)
             # note: auto-publishing is done in self.MultiRotate1D()
             anObj = self.MultiRotate1D(aShape, aVec, aNbTimes, theName)
@@ -9899,7 +9977,7 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
                 MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3)
             """
-            print "The method MakeMultiRotation2D is DEPRECATED. Use MakeMultiRotation2DByStep instead."
+            print("The method MakeMultiRotation2D is DEPRECATED. Use MakeMultiRotation2DByStep instead.")
             aVec = self.MakeLine(aPoint,aDir)
             # note: auto-publishing is done in self.MultiRotate2D()
             anObj = self.MultiRotate2D(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
@@ -11360,7 +11438,7 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
             Descr = self.MeasuOp.PrintShapeErrors(theShape, theShapeErrors)
             if theReturnStatus == 1:
                 return Descr
-            print Descr
+            print(Descr)
             pass
 
         ## Check a topology of the given shape.
@@ -11415,7 +11493,7 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
             if IsValid == 0:
                 if theReturnStatus == 0:
                     Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
-                    print Descr
+                    print(Descr)
             if theReturnStatus == 1:
               Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
               return (IsValid, Descr)
@@ -11706,10 +11784,10 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
                 material groups are not automatically published.
             """
             # Example: see GEOM_TestOthers.py
-            print """
+            print("""
             WARNING: Function ImportFile is deprecated, use Import<FormatName> instead,
             where <FormatName> is a name of desirable format for importing.
-            """
+            """)
             aListObj = self.InsertOp.ImportFile(theFileName, theFormatName)
             RaiseIfFailed("ImportFile", self.InsertOp)
             aNbObj = len(aListObj)
@@ -11765,7 +11843,7 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
             if not theStream:
                 # this is the workaround to ignore invalid case when data stream is empty
                 if int(os.getenv("GEOM_IGNORE_RESTORE_SHAPE", "0")) > 0:
-                    print "WARNING: Result of RestoreShape is a NULL shape!"
+                    print("WARNING: Result of RestoreShape is a NULL shape!")
                     return None
             anObj = self.InsertOp.RestoreShape(theStream)
             RaiseIfFailed("RestoreShape", self.InsertOp)
@@ -11800,13 +11878,13 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
                               geompy.InsertOp.ExportTranslators()[0] method.
             """
             # Example: see GEOM_TestOthers.py
-            print """
+            print("""
             WARNING: Function Export is deprecated, use Export<FormatName> instead,
             where <FormatName> is a name of desirable format for exporting.
-            """
+            """)
             self.InsertOp.Export(theObject, theFileName, theFormatName)
             if self.InsertOp.IsDone() == 0:
-                raise RuntimeError,  "Export : " + self.InsertOp.GetErrorCode()
+                raise RuntimeError("Export : " + self.InsertOp.GetErrorCode())
                 pass
             pass
 
@@ -12409,7 +12487,7 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
             RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp)
             if IsValid == 0:
                 Descr = self.BlocksOp.PrintBCErrors(theCompound, BCErrors)
-                print Descr
+                print(Descr)
             return IsValid
 
         ## Retrieve all non blocks solids and faces from \a theShape.
@@ -13433,7 +13511,7 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
                             edges_in_range.append(edge)
 
             if len(edges_in_range) <= 0:
-                print "No edges found by given criteria"
+                print("No edges found by given criteria")
                 return None
 
             # note: auto-publishing is done in self.CreateGroup()
@@ -13466,10 +13544,10 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
             """
             nb_selected = sg.SelectedCount()
             if nb_selected < 1:
-                print "Select a shape before calling this function, please."
+                print("Select a shape before calling this function, please.")
                 return 0
             if nb_selected > 1:
-                print "Only one shape must be selected"
+                print("Only one shape must be selected")
                 return 0
 
             id_shape = sg.getSelected(0)
@@ -13482,10 +13560,10 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
             if include_min: left_str  = " <= "
             if include_max: right_str  = " <= "
 
-            self.addToStudyInFather(shape, group_edges, "Group of edges with " + `min_length`
-                                    + left_str + "length" + right_str + `max_length`)
+            self.addToStudyInFather(shape, group_edges, "Group of edges with " + repr(min_length)
+                                    + left_str + "length" + right_str + repr(max_length))
 
-            sg.updateObjBrowser(True)
+            sg.updateObjBrowser()
 
             return group_edges
 
@@ -13750,7 +13828,7 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
             """
             if isinstance( type, int ):
                 if type < 0 or type > 3:
-                    raise RuntimeError, "CreateField : Error: data type must be within [0-3] range"
+                    raise RuntimeError("CreateField : Error: data type must be within [0-3] range")
                 type = [GEOM.FDT_Bool,GEOM.FDT_Int,GEOM.FDT_Double,GEOM.FDT_String][type]
 
             f = self.FieldOp.CreateField( shape, name, type, dimension, componentNames)
@@ -13769,7 +13847,7 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
             elif isinstance( field, geomField ):
                 geom.RemoveObject( field.field )
             else:
-                raise RuntimeError, "RemoveField() : the object is not a field"
+                raise RuntimeError("RemoveField() : the object is not a field")
             return
 
         ## Returns number of fields on a shape
@@ -13800,7 +13878,6 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
         ## @}
 
 
-import omniORB
 # Register the new proxy for GEOM_Gen
 omniORB.registerObjref(GEOM._objref_GEOM_Gen._NP_RepositoryId, geomBuilder)
 
@@ -13809,8 +13886,8 @@ omniORB.registerObjref(GEOM._objref_GEOM_Gen._NP_RepositoryId, geomBuilder)
 #  @ingroup l2_field
 class geomField( GEOM._objref_GEOM_Field ):
 
-    def __init__(self):
-        GEOM._objref_GEOM_Field.__init__(self)
+    def __init__(self, *args):
+        GEOM._objref_GEOM_Field.__init__(self, *args)
         self.field = GEOM._objref_GEOM_Field
         return
 
@@ -13827,7 +13904,7 @@ class geomField( GEOM._objref_GEOM_Field ):
     ## Returns type of field data as integer [0-3]
     def getType(self):
         "Returns type of field data"
-        return self.field.GetDataType(self)._v
+        return EnumToLong(self.field.GetDataType(self))
 
     ## Returns type of field data:
     #  one of GEOM.FDT_Bool, GEOM.FDT_Int, GEOM.FDT_Double, GEOM.FDT_String
@@ -13855,8 +13932,7 @@ class geomField( GEOM._objref_GEOM_Field ):
         "Adds a time step to the field"
         stp = self.field.AddStep( self, step, stamp )
         if not stp:
-            raise RuntimeError, \
-                  "Field.addStep() : Error: step %s already exists in this field"%step
+            raise RuntimeError("Field.addStep() : Error: step %s already exists in this field"%step)
         global geom
         geom._autoPublish( stp, "", "Step %s, %s"%(step,stamp))
         self.setValues( step, values )
@@ -13894,7 +13970,7 @@ class geomField( GEOM._objref_GEOM_Field ):
         "Returns a time step by its ID"
         stp = self.field.GetStep(self, step)
         if not stp:
-            raise RuntimeError, "Step %s is missing from this field"%step
+            raise RuntimeError("Step %s is missing from this field"%step)
         return stp
 
     ## Returns the time of the field step
@@ -13919,19 +13995,19 @@ class geomField( GEOM._objref_GEOM_Field ):
         errBeg = "Field.setValues(values) : Error: "
         try:
             ok = stp.SetValues( values )
-        except Exception, e:
+        except Exception as e:
             excStr = str(e)
             if excStr.find("WrongPythonType") > 0:
-                raise RuntimeErrorerrBeg +\
-                      "wrong type of values, %s values are expected"%str(self.getTypeEnum())[4:]
-            raise RuntimeError, errBeg + str(e)
+                raise RuntimeError(errBeg +\
+                      "wrong type of values, %s values are expected"%str(self.getTypeEnum())[4:])
+            raise RuntimeError(errBeg + str(e))
         if not ok:
             nbOK = self.field.GetArraySize(self)
             nbKO = len(values)
             if nbOK != nbKO:
-                raise RuntimeError, errBeg + "len(values) must be %s but not %s"%(nbOK,nbKO)
+                raise RuntimeError(errBeg + "len(values) must be %s but not %s"%(nbOK,nbKO))
             else:
-                raise RuntimeError, errBeg + "failed"
+                raise RuntimeError(errBeg + "failed")
         return
 
     pass # end of class geomField
@@ -13948,12 +14024,11 @@ omniORB.registerObjref(GEOM._objref_GEOM_Field._NP_RepositoryId, geomField)
 #    import salome
 #    salome.salome_init()
 #    from salome.geom import geomBuilder
-#    geompy = geomBuilder.New(salome.myStudy)
+#    geompy = geomBuilder.New()
 #  \endcode
-#  @param  study     SALOME study, generally obtained by salome.myStudy.
 #  @param  instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
 #  @return geomBuilder instance
-def New( study, instance=None):
+def New( instance=None):
     """
     Create a new geomBuilder instance.The geomBuilder class provides the Python
     interface to GEOM operations.
@@ -13962,10 +14037,9 @@ def New( study, instance=None):
         import salome
         salome.salome_init()
         from salome.geom import geomBuilder
-        geompy = geomBuilder.New(salome.myStudy)
+        geompy = geomBuilder.New()
 
     Parameters:
-        study     SALOME study, generally obtained by salome.myStudy.
         instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
     Returns:
         geomBuilder instance
@@ -13979,7 +14053,7 @@ def New( study, instance=None):
       doLcc = True
     geom = geomBuilder()
     assert isinstance(geom,geomBuilder), "Geom engine class is %s but should be geomBuilder.geomBuilder. Import geomBuilder before creating the instance."%geom.__class__
-    geom.init_geom(study)
+    geom.init_geom()
     return geom
 
 
@@ -13989,15 +14063,15 @@ plugins_var = os.environ.get( "GEOM_PluginsList" )
 plugins = None
 if plugins_var is not None:
     plugins = plugins_var.split( ":" )
-    plugins=filter(lambda x: len(x)>0, plugins)
+    plugins=[x for x in plugins if len(x)>0]
 if plugins is not None:
     for pluginName in plugins:
         pluginBuilderName = pluginName + "Builder"
         try:
             exec( "from salome.%s.%s import *" % (pluginName, pluginBuilderName))
-        except Exception, e:
+        except Exception as e:
             from salome_utils import verbose
-            print "Exception while loading %s: %s" % ( pluginBuilderName, e )
+            print("Exception while loading %s: %s" % ( pluginBuilderName, e ))
             continue
         exec( "from salome.%s import %s" % (pluginName, pluginBuilderName))
         plugin = eval( pluginBuilderName )
index 99935ece9ec0e65bcfaa896e7f5e4305b17baada..e2389ea52b2012017594ede0e075506be2979917 100644 (file)
@@ -37,23 +37,23 @@ from salome.geom.geomBuilder import info, PackData, ReadTexture, EnumToLong
 try:
     # get GEOM engine and initialize GEOM with current study
     engineGeom = lcc.FindOrLoadComponent( "FactoryServer", "GEOM" )
-    geom = geomBuilder.New(salome.myStudy, engineGeom)
+    geom = geomBuilder.New(engineGeom)
 
     # export the methods of geomBuilder
     for k in dir( geom ):
-       if k[0] == '_': continue
-       globals()[k] = getattr( geom, k )
+        if k[0] == '_': continue
+        globals()[k] = getattr( geom, k )
         pass
     del k
     ShapeType = geom.ShapeType
     kind      = geom.kind
     pass
 except:
-    print "exception in geompy.py"
+    print("exception in geompy.py")
     geom = None
     pass
 
-print """
+print("""
 ===============================================================================
 WARNING:
 Usage of geompy.py is deprecated after SALOME V7.2!
@@ -65,13 +65,13 @@ replace
 -------
 
 import geompy
-geompy.init_geom(theStudy)
+geompy.init_geom()
 
 with
 ----
 
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 See also GEOM User's Guide for more details
 
@@ -80,4 +80,4 @@ The geompy.py module works correctly only in first created study.
 It does not work in second, third, etc studies!
 
 ===============================================================================
-"""
+""")
index b9f8a5b3ec386368b42f638dcde6b2a968917572..33d1a16bca85c3d52af7a521ccc476a2f4c75f4a 100644 (file)
@@ -30,7 +30,7 @@
 #  @code
 #  import GEOM
 #  from salome.geom import geomBuilder
-#  geompy = geomBuilder.New(salome.myStudy)
+#  geompy = geomBuilder.New()
 #
 #  # create a wire for sketcher
 #  geomObj_1 = geompy.MakeMarker(0, 0, 0, 1, 0, 0, 0, 1, 0)
@@ -48,7 +48,7 @@
 #  geompy.addToStudy( Sketch_1, 'Sketch_1' )
 #
 #  # update object browser
-#  salome.sg.updateObjBrowser(True)
+#  salome.sg.updateObjBrowser()
 #  @endcode
 #  @n Additional examples can be found as unit tests in the source code.
 #  @}
@@ -1207,7 +1207,7 @@ class Sketcher2D:
         if self.closed:
             self.myCommand = self.myCommand + ":WF"
         else:
-            raise RuntimeError, "Sketcher2D.close() : can't build face on unclosed wire"
+            raise RuntimeError("Sketcher2D.close() : can't build face on unclosed wire")
 
         from salome.geom.geomBuilder import ParseSketcherCommand, RaiseIfFailed
         Command,Parameters = ParseSketcherCommand(self.myCommand)
index 24e6c3ff53cdb0414571206260a071b69dcf3de8..0e76c8e8e3e7efb3b1f59f0a4f1a71d92f262b33 100755 (executable)
@@ -42,7 +42,7 @@ INCLUDE_DIRECTORIES(
 
 # swig flags
 SET_SOURCE_FILES_PROPERTIES(libGEOM_Swig.i PROPERTIES CPLUSPLUS ON)
-SET_SOURCE_FILES_PROPERTIES(libGEOM_Swig.i PROPERTIES SWIG_DEFINITIONS "-shadow")
+SET_SOURCE_FILES_PROPERTIES(libGEOM_Swig.i PROPERTIES SWIG_FLAGS "-py3")
 SET_SOURCE_FILES_PROPERTIES(libGEOM_SwigPYTHON_wrap.cxx PROPERTIES COMPILE_FLAGS "-DHAVE_CONFIG_H")
 
 # additional preprocessor / compiler flags
index 0efbe7f0d460b435193000d6235ebd668367e3f8..b80e1b30fdd7431bbf21dda99541630c57b0d71f 100644 (file)
@@ -124,14 +124,9 @@ void GEOM_Swig::createAndDisplayGO( const char* theEntry, bool theUpdateViewer )
     {}
     virtual void Execute()
     {
-      SUIT_Application* app = SUIT_Session::session()->activeApplication();
-      if ( !app ) return;
-      SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
-      if ( !study ) return;
-
       Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject( myEntry.c_str(), "GEOM", "" );
 
-      GEOM_Displayer( study ).Display( io, myUpdateViewer );
+      GEOM_Displayer().Display( io, myUpdateViewer );
     }
   };
 
@@ -186,14 +181,9 @@ void GEOM_Swig::eraseGO( const char* theEntry, bool theUpdateViewer )
     {}
     virtual void Execute()
     {
-      SUIT_Application* app = SUIT_Session::session()->activeApplication();
-      if ( !app ) return;
-      SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
-      if ( !study ) return;
-
       Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject( myEntry.c_str(), "GEOM", "" );
 
-      GEOM_Displayer( study ).Erase( io, true, myUpdateViewer );
+      GEOM_Displayer().Erase( io, true, myUpdateViewer );
     }
   };
 
@@ -212,13 +202,7 @@ void GEOM_Swig::UpdateViewer()
     {}
     virtual void Execute()
     {
-      SUIT_Application* app = SUIT_Session::session()->activeApplication();
-      if ( !app ) return;
-
-      SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
-      if ( !study ) return;
-      
-      GEOM_Displayer( study ).UpdateViewer();
+      GEOM_Displayer().UpdateViewer();
     }
   };
   
@@ -248,7 +232,7 @@ int GEOM_Swig::getIndexTopology( const char* theSubIOR, const char* theMainIOR )
   if ( !CORBA::is_nil( aGeomGen ) && !CORBA::is_nil( aMainShape ) && !CORBA::is_nil( aSubShape ) ) {
     // get shapes operations interface
     GEOM::GEOM_IShapesOperations_var anIShapesOperations =
-      aGeomGen->GetIShapesOperations( aMainShape->GetStudyID() );
+      aGeomGen->GetIShapesOperations();
     if ( !CORBA::is_nil( anIShapesOperations ) )
       index = anIShapesOperations->GetTopologyIndex( aMainShape, aSubShape );
   }
@@ -275,7 +259,7 @@ const char* GEOM_Swig::getShapeTypeString( const char* theIOR )
   if ( !CORBA::is_nil( aGeomGen ) && !CORBA::is_nil( aShape ) ) {
     // get shapes operations interface
     GEOM::GEOM_IShapesOperations_var anIShapesOperations =
-      aGeomGen->GetIShapesOperations( aShape->GetStudyID() );
+      aGeomGen->GetIShapesOperations();
     if ( !CORBA::is_nil( anIShapesOperations ) )
       aTypeName = anIShapesOperations->GetShapeTypeString( aShape );
   }
@@ -354,7 +338,7 @@ void TSetPropertyEvent::Execute()
   SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
   if ( !study ) return;
   
-  GEOM_Displayer displayer( study );
+  GEOM_Displayer displayer;
   
   SALOME_View* window = displayer.GetActiveView();
   if ( !window ) return;
index 62020f0a396822e54a713aefcdd61855d9dbf452..da51a7bee06c0c2c10dba7d3cfb68b13f0192c30 100644 (file)
@@ -327,7 +327,7 @@ void GenerationGUI_FillingDlg::ApproxChanged()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr GenerationGUI_FillingDlg::createOperation()
 {
-  return getGeomEngine()->GetI3DPrimOperations(getStudyId());
+  return getGeomEngine()->GetI3DPrimOperations();
 }
 
 //=================================================================================
index d4e23678e0dbe484987eb4fb35c9104a3206967d..e02b2c498b160b70170d7568d8877d2bf9e356ae 100644 (file)
@@ -502,7 +502,7 @@ void GenerationGUI_PipeDlg::enterEvent (QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr GenerationGUI_PipeDlg::createOperation()
 {
-  return getGeomEngine()->GetI3DPrimOperations(getStudyId());
+  return getGeomEngine()->GetI3DPrimOperations();
 }
 
 //=================================================================================
@@ -642,8 +642,7 @@ bool GenerationGUI_PipeDlg::extractPrefix() const
 // purpose  : virtual method to restore tree of argument's sub-shapes under
 //            the resulting shape. Redefined from GEOMBase_Helper class.
 //=================================================================================
-void GenerationGUI_PipeDlg::restoreSubShapes
-              (SALOMEDS::Study_ptr theStudy, SALOMEDS::SObject_ptr theSObject)
+void GenerationGUI_PipeDlg::restoreSubShapes(SALOMEDS::SObject_ptr theSObject)
 {
   QCheckBox *aGenGroupCheck = NULL;
   QLineEdit *aPrefixEdit    = NULL;
@@ -691,8 +690,7 @@ void GenerationGUI_PipeDlg::restoreSubShapes
       }
 
       aName += tr((*it)->GetName());
-      getGeomEngine()->AddInStudy(theStudy, (*it).get(),
-                                  aName.toStdString().c_str(), aFather);
+      getGeomEngine()->AddInStudy((*it).get(), aName.toStdString().c_str(), aFather);
     }
   }
 }
index c9b2f0833588b9c14e1fc466a6ad0f0f2581f277..1e7f53e6e3013b0d4d014150ac1ecbb650735ac9 100644 (file)
@@ -55,8 +55,7 @@ protected:
   virtual bool                       execute( ObjectList& );    
   virtual void                       addSubshapesToStudy();
   virtual bool                       extractPrefix() const;
-  virtual void                       restoreSubShapes
-                                 (SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr);
+  virtual void                       restoreSubShapes(SALOMEDS::SObject_ptr);
   virtual QList<GEOM::GeomObjPtr>    getSourceObjects();
 
 private:
index 25deeaee017a9f42f1bdae2a895b8e51019dd264..5b09040cf4a66bbd03da57f7c02fbbc0266e9da6 100644 (file)
@@ -339,7 +339,7 @@ void GenerationGUI_PipePathDlg::enterEvent (QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr GenerationGUI_PipePathDlg::createOperation()
 {
-  return getGeomEngine()->GetI3DPrimOperations(getStudyId());
+  return getGeomEngine()->GetI3DPrimOperations();
 }
 
 //=================================================================================
index 8403c41e49890d156e525b209780da95aefa14ca..379b1fd49cf28389bf9235a468cfae57127561f9 100644 (file)
@@ -526,7 +526,7 @@ void GenerationGUI_PrismDlg::ValueChangedInSpinBox()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr GenerationGUI_PrismDlg::createOperation()
 {
-  return getGeomEngine()->GetI3DPrimOperations(getStudyId());
+  return getGeomEngine()->GetI3DPrimOperations();
 }
 
 //=================================================================================
index 59b9012861aedd7b31a5cb7b70b7d76609a780f4..5019de5457ff9c1d5208365135cefc762f01c687 100644 (file)
@@ -296,7 +296,7 @@ double GenerationGUI_RevolDlg::getAngle() const
 //=================================================================================
 GEOM::GEOM_IOperations_ptr GenerationGUI_RevolDlg::createOperation()
 {
-  return getGeomEngine()->GetI3DPrimOperations(getStudyId());
+  return getGeomEngine()->GetI3DPrimOperations();
 }
 
 //=================================================================================
index fb866c1656e83d4d65192c731e2da63b03ee60a7..0d8a2cf1b9f1a71192e9ae31955775ca03e9d0f9 100644 (file)
@@ -376,7 +376,7 @@ void GenerationGUI_ThicknessDlg::ValueChangedInSpinBox()
 //==============================================================================
 GEOM::GEOM_IOperations_ptr GenerationGUI_ThicknessDlg::createOperation()
 {
-  return getGeomEngine()->GetI3DPrimOperations(getStudyId());
+  return getGeomEngine()->GetI3DPrimOperations();
 }
 
 //==============================================================================
index 16bcf1acce6c2b74a0b2983515fc1c6e20e2a366..34d97d66a3a1e8c72a0c1034c292999e20ea4f3d 100644 (file)
@@ -265,7 +265,7 @@ void GroupGUI_BooleanDlg::enterEvent (QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr GroupGUI_BooleanDlg::createOperation()
 {
-  return getGeomEngine()->GetIGroupOperations(getStudyId());
+  return getGeomEngine()->GetIGroupOperations();
 }
 
 //=================================================================================
index 9566f50f7145563d1cf84c6bf8eef8a6f1c08f6b..7fe8f4f32f8b0674f1fef44c924fb66622ba96c7 100644 (file)
@@ -509,7 +509,7 @@ void GroupGUI_GroupDlg::onGetInPlace()
       SUIT_OverrideCursor wc;
       myEditCurrentArgument->setText(GEOMBase::GetName(anObj));
       GEOM::GEOM_IShapesOperations_var aShapesOp =
-        getGeomEngine()->GetIShapesOperations(getStudyId());
+        getGeomEngine()->GetIShapesOperations();
       if (subSelectionWay() == GET_IN_PLACE) {
         GEOM::GEOM_Object_var aGetInPlaceObj = aShapesOp->GetInPlace(myMainObj, anObj);
         setInPlaceObj(aGetInPlaceObj);
@@ -542,8 +542,8 @@ void GroupGUI_GroupDlg::setInPlaceObj(GEOM::GEOM_Object_var theObj, const bool i
   // build map of indices
   myMain2InPlaceIndices.Clear();
   if (!myInPlaceObj->_is_nil()) {
-    GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations(getStudyId());
-    GEOM::GEOM_ILocalOperations_var aLocOp = getGeomEngine()->GetILocalOperations(getStudyId());
+    GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations();
+    GEOM::GEOM_ILocalOperations_var aLocOp = getGeomEngine()->GetILocalOperations();
 
     GEOM::ListOfGO_var aSubObjects = aShapesOp->MakeExplode(myInPlaceObj, getShapeType(), false);
     for ( int i = 0; i < aSubObjects->length(); i++ )
@@ -696,7 +696,7 @@ void GroupGUI_GroupDlg::selectAllSubShapes()
     return;
 
   GEOM::ListOfLong_var aSubShapes;
-  GEOM::GEOM_IShapesOperations_var aShOp = getGeomEngine()->GetIShapesOperations(getStudyId());
+  GEOM::GEOM_IShapesOperations_var aShOp = getGeomEngine()->GetIShapesOperations();
   aSubShapes = aShOp->SubShapeAllIDs(myMainObj, getShapeType(), false);
   if (aSubShapes->length() > 0) {
     if (subSelectionWay() == ALL_SUBSHAPES)
@@ -1171,7 +1171,7 @@ void GroupGUI_GroupDlg::updateState (bool isAdd)
                           myIsShapeType &&
                           getShapeType() != TopAbs_VERTEX);
   // manage of 'Plot' button access
-  GEOM::GEOM_IShapesOperations_var aShOp = getGeomEngine()->GetIShapesOperations( getStudyId() );
+  GEOM::GEOM_IShapesOperations_var aShOp = getGeomEngine()->GetIShapesOperations();
   GEOM::ListOfLong_var aSubShapes = aShOp->SubShapeAllIDs( myMainObj, getShapeType(), false );
   bool hasCurrentEntities = aSubShapes->length() > 0;
 #ifndef DISABLE_PLOT2DVIEWER
@@ -1252,7 +1252,7 @@ void GroupGUI_GroupDlg::highlightSubShapes()
   SALOME_ListIO aSelList;
 
   // To highlight the selected sub-shape in Object Browser, if it's already published under the main shape
-  GEOM::GEOM_ILocalOperations_var aLocOp = getGeomEngine()->GetILocalOperations(getStudyId());
+  GEOM::GEOM_ILocalOperations_var aLocOp = getGeomEngine()->GetILocalOperations();
   QMap<int, QString> childsMap;
   SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>(app->activeStudy());
   if (appStudy) {
@@ -1311,7 +1311,7 @@ void GroupGUI_GroupDlg::highlightSubShapes()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr GroupGUI_GroupDlg::createOperation()
 {
-  return getGeomEngine()->GetIGroupOperations(getStudyId());
+  return getGeomEngine()->GetIGroupOperations();
 }
 
 #define RETURN_WITH_MSG(a, b) \
index 956303a922f545fa4973657bbcd8c4fb0618798c..c6f5c4702716f2677bf05888c0b846924e4757e1 100644 (file)
@@ -107,11 +107,8 @@ bool IGESPlugin_GUI::importIGES( SUIT_Desktop* parent )
 {
   SalomeApp_Application* app = getGeometryGUI()->getApp();
   if ( !app ) return false;
-  SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*> ( app->activeStudy() );
-  if ( !study ) return false;
 
-  SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
-  GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "IGESPluginEngine" );
+  GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( "IGESPluginEngine" );
   IGESOpPtr igesOp = GEOM::IIGESOperations::_narrow( op );
   if ( igesOp.isNull() ) return false;
 
@@ -177,14 +174,13 @@ bool IGESPlugin_GUI::importIGES( SUIT_Desktop* parent )
         {
           GEOM::GEOM_Object_var main = result[0];
           QString publishName = GEOMBase::GetDefaultName( SUIT_Tools::file( fileName, true ) );
-          SALOMEDS::SObject_var so = GeometryGUI::GetGeomGen()->PublishInStudy( dsStudy,
-                                                                                SALOMEDS::SObject::_nil(),
+          SALOMEDS::SObject_var so = GeometryGUI::GetGeomGen()->PublishInStudy( SALOMEDS::SObject::_nil(),
                                                                                 main.in(),
                                                                                 publishName.toUtf8().constData() );
 
           entryList.append( so->GetID() );
           transaction.commit();
-          GEOM_Displayer( study ).Display( main.in() );
+          GEOM_Displayer().Display( main.in() );
           main->UnRegister();
         }
         else
@@ -199,7 +195,7 @@ bool IGESPlugin_GUI::importIGES( SUIT_Desktop* parent )
       }
     }
 
-    getGeometryGUI()->updateObjBrowser( true );
+    getGeometryGUI()->updateObjBrowser();
     app->browseObjects( entryList );
 
     if ( errors.count() > 0 )
@@ -223,8 +219,7 @@ bool IGESPlugin_GUI::exportIGES( SUIT_Desktop* parent )
   SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*> ( app->activeStudy() );
   if ( !study ) return false;
 
-  SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
-  GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "IGESPluginEngine" );
+  GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( "IGESPluginEngine" );
   IGESOpPtr igesOp = GEOM::IIGESOperations::_narrow( op );
   if ( igesOp.isNull() ) return false;
 
index 0bca95a5deec7432e422ce84eb2cee8362ff0842..9fda7a6b6a4199595bd2cba63e5064245175c765 100755 (executable)
@@ -45,12 +45,11 @@ IGESPlugin_IECallBack::~IGESPlugin_IECallBack()
  *  Export
  */
 //=============================================================================
-bool IGESPlugin_IECallBack::Export( int                            theDocId,
-                                   const Handle(GEOM_Object)      theOriginal,
-                                   const TCollection_AsciiString& theFileName,
-                                   const TCollection_AsciiString& theFormatName )
+bool IGESPlugin_IECallBack::Export( const Handle(GEOM_Object)      theOriginal,
+                                    const TCollection_AsciiString& theFileName,
+                                    const TCollection_AsciiString& theFormatName )
 {
-  IGESPlugin_IOperations* aPluginOperations = IGESPlugin_OperationsCreator::get( GetEngine(), theDocId );
+  IGESPlugin_IOperations* aPluginOperations = IGESPlugin_OperationsCreator::get( GetEngine() );
   TCollection_AsciiString aVersion = ( theFormatName == "IGES_5_3" ) ? "5.3" : "5.1";
   aPluginOperations->ExportIGES( theOriginal, theFileName, aVersion );
   return true;
@@ -62,11 +61,10 @@ bool IGESPlugin_IECallBack::Export( int                            theDocId,
  */
 //=============================================================================
 Handle(TColStd_HSequenceOfTransient)
-IGESPlugin_IECallBack::Import( int                            theDocId,
-                              const TCollection_AsciiString& theFormatName,
-                              const TCollection_AsciiString& theFileName )
+IGESPlugin_IECallBack::Import( const TCollection_AsciiString& theFormatName,
+                               const TCollection_AsciiString& theFileName )
 {
-  IGESPlugin_IOperations* aPluginOperations = IGESPlugin_OperationsCreator::get( GetEngine(), theDocId );
+  IGESPlugin_IOperations* aPluginOperations = IGESPlugin_OperationsCreator::get( GetEngine() );
   bool anIsIgnoreUnits = ( theFormatName == "IGES_SCALE" ) ? true : false;
   return aPluginOperations->ImportIGES( theFileName, anIsIgnoreUnits );
 }
@@ -77,11 +75,10 @@ IGESPlugin_IECallBack::Import( int                            theDocId,
  */
 //=============================================================================
 TCollection_AsciiString
-IGESPlugin_IECallBack::ReadValue( int                            theDocId,
-                                 const TCollection_AsciiString& theFileName,
-                                 const TCollection_AsciiString& theFormatName,
-                                 const TCollection_AsciiString& theParameterName )
+IGESPlugin_IECallBack::ReadValue( const TCollection_AsciiString& theFileName,
+                                  const TCollection_AsciiString& theFormatName,
+                                  const TCollection_AsciiString& theParameterName )
 {
-  IGESPlugin_IOperations* aPluginOperations = IGESPlugin_OperationsCreator::get( GetEngine(), theDocId );
+  IGESPlugin_IOperations* aPluginOperations = IGESPlugin_OperationsCreator::get( GetEngine() );
   return aPluginOperations->ReadValue( theFileName, theParameterName );
 }
index 716d55a1be6decbd71f19968d31deb0c1d136926..dde69bdcfb4e33b5a0fc369b7d4c25815c794a36 100644 (file)
@@ -36,17 +36,14 @@ public:
   IGESPlugin_IECallBack();
   ~IGESPlugin_IECallBack();
   
-  bool         Export( int                            theDocId,
-                      const Handle(GEOM_Object)      theOriginal,
-                      const TCollection_AsciiString& theFileName,
+  bool Export( const Handle(GEOM_Object)      theOriginal,
+               const TCollection_AsciiString& theFileName,
                       const TCollection_AsciiString& theFormatName );
   
-  Handle(TColStd_HSequenceOfTransient) Import( int                            theDocId,
-                                              const TCollection_AsciiString& theFormatName,
-                                              const TCollection_AsciiString& theFileName );
+  Handle(TColStd_HSequenceOfTransient) Import( const TCollection_AsciiString& theFormatName,
+                                                                  const TCollection_AsciiString& theFileName );
   
-  TCollection_AsciiString  ReadValue( int                            theDocId,
-                                     const TCollection_AsciiString& theFileName,
+  TCollection_AsciiString  ReadValue( const TCollection_AsciiString& theFileName,
                                       const TCollection_AsciiString& theFormatName,
                                       const TCollection_AsciiString& theParameterName );
 };
index d8131444e9e2572b6d81c58d66a3811ac0171406..0d27d48805bd29a797acf102a76a629408fed07b 100644 (file)
@@ -38,8 +38,8 @@
  *  Constructor
  */
 //=============================================================================
-IGESPlugin_IOperations::IGESPlugin_IOperations( GEOM_Engine* theEngine, int theDocID )
-: GEOMImpl_IBaseIEOperations( theEngine, theDocID )
+IGESPlugin_IOperations::IGESPlugin_IOperations( GEOM_Engine* theEngine )
+: GEOMImpl_IBaseIEOperations( theEngine )
 {
   MESSAGE( "IGESPlugin_IOperations::IGESPlugin_IOperations" );
 }
@@ -77,7 +77,7 @@ void IGESPlugin_IOperations::ExportIGES( const Handle(GEOM_Object)      theOrigi
   if( aRefFunction.IsNull() ) return;  //There is no function which creates an object to be exported
 
   //Add a new result object
-  Handle(GEOM_Object) result = GetEngine()->AddObject( GetDocID(), GEOM_IMPORT);
+  Handle(GEOM_Object) result = GetEngine()->AddObject( GEOM_IMPORT);
 
   //Add an Export function
   Handle(GEOM_Function) aFunction = result->AddFunction( IGESPlugin_ExportDriver::GetID(), EXPORT_SHAPE );
@@ -128,7 +128,7 @@ IGESPlugin_IOperations::ImportIGES( const TCollection_AsciiString& theFileName,
   if( theFileName.IsEmpty() ) return NULL;
 
   //Add a new result object
-  Handle(GEOM_Object) anImported = GetEngine()->AddObject( GetDocID(), GEOM_IMPORT );
+  Handle(GEOM_Object) anImported = GetEngine()->AddObject( GEOM_IMPORT );
 
   //Add an Import function
   Handle(GEOM_Function) aFunction =
index 0fea3f36b05115aa15902b0468f8d56b9e8c59e3..5573a210bca40151c23b2ed1db86498a8eb3b598 100644 (file)
@@ -30,7 +30,7 @@
 class IGESPLUGINENGINE_EXPORT IGESPlugin_IOperations: public GEOMImpl_IBaseIEOperations
 {
 public:
-  IGESPlugin_IOperations( GEOM_Engine*, int );
+  IGESPlugin_IOperations( GEOM_Engine* );
   ~IGESPlugin_IOperations();
 
   void ExportIGES( const Handle(GEOM_Object),
index 209ce65c1b77fb873223b360e1af7d52768fbffd..9f33d8323817aa3a3edcfaa1eb1ec87d16b93da7 100644 (file)
@@ -32,7 +32,7 @@
 // OCCT includes
 #include <TFunction_DriverTable.hxx>
 
-std::map <int, IGESPlugin_IOperations*> IGESPlugin_OperationsCreator::_mapOfOperations;
+IGESPlugin_IOperations* IGESPlugin_OperationsCreator::_operation;
 
 IGESPlugin_OperationsCreator::IGESPlugin_OperationsCreator()
 {
@@ -54,19 +54,17 @@ IGESPlugin_OperationsCreator::~IGESPlugin_OperationsCreator()
 }
 
 GEOM_IOperations_i* IGESPlugin_OperationsCreator::Create( PortableServer::POA_ptr thePOA,
-                                                          int                     theStudyId,
                                                           GEOM::GEOM_Gen_ptr      theEngine,
                                                           ::GEOMImpl_Gen*         theGenImpl )
 {
   Unexpect aCatch( SALOME_SalomeException );
   MESSAGE( "IGESPlugin_OperationsCreator::Create" );
-  return new IGESPlugin_IOperations_i( thePOA, theEngine, get( theGenImpl, theStudyId ) );
+  return new IGESPlugin_IOperations_i( thePOA, theEngine, get( theGenImpl ) );
 }
 
-IGESPlugin_IOperations* IGESPlugin_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl,
-                                                          int             theStudyId )
+IGESPlugin_IOperations* IGESPlugin_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl )
 {
-  if (_mapOfOperations.find( theStudyId ) == _mapOfOperations.end() )
-    _mapOfOperations[theStudyId] = new IGESPlugin_IOperations( theGenImpl, theStudyId );
-  return _mapOfOperations[theStudyId];
+  if( !_operation )
+    _operation = new IGESPlugin_IOperations( theGenImpl );
+  return _operation;
 }
index cd507e7c10f601916479a8a94f106a0b7433a4cd..ea3270481ca09839420960ceae25e6e617280f7b 100755 (executable)
@@ -41,15 +41,13 @@ public:
   ~IGESPlugin_OperationsCreator();
 
   GEOM_IOperations_i* Create( PortableServer::POA_ptr thePOA,
-                             int                     theStudyId,
-                             GEOM::GEOM_Gen_ptr      theEngine,
-                             ::GEOMImpl_Gen*         theGenImpl );
+                                         GEOM::GEOM_Gen_ptr      theEngine,
+                                         ::GEOMImpl_Gen*         theGenImpl );
 private:
-  static IGESPlugin_IOperations* get( ::GEOMImpl_Gen*         theGenImpl,
-                                     int                     theStudyId );
+  static IGESPlugin_IOperations* get(::GEOMImpl_Gen* theGenImpl);
 
 private:
-  static std::map <int, IGESPlugin_IOperations*>  _mapOfOperations;
+  static IGESPlugin_IOperations* _operation;
 
   friend class IGESPlugin_IECallBack;
 };
index d50c62cf16cdcef639535fc62c856f954839b78b..bb1f08893c2fc7b367476ff9c3a3fbfd28dbf6e6 100755 (executable)
@@ -195,9 +195,6 @@ void MeasureGUI::ChangeDimensionsVisibility( const bool theIsVisible )
   if ( !anApp )
     return;
 
-  SalomeApp_Study* anActiveStudy = dynamic_cast<SalomeApp_Study*>( anApp->activeStudy() );
-  if ( !anActiveStudy )
-    return;
 
   Handle(SALOME_InteractiveObject) anIObject = getSingleSelectedIO();
   if ( anIObject.IsNull()
@@ -206,15 +203,15 @@ void MeasureGUI::ChangeDimensionsVisibility( const bool theIsVisible )
 
   SUIT_OverrideCursor wc;
 
-  GEOMGUI_DimensionProperty aDimensions( anActiveStudy, anIObject->getEntry() );
+  GEOMGUI_DimensionProperty aDimensions( QString(anIObject->getEntry()) );
 
   for ( int anIt = 0; anIt < aDimensions.GetNumber(); ++anIt ) {
     aDimensions.SetVisible( anIt, theIsVisible );
   }
 
-  aDimensions.SaveToAttribute( anActiveStudy, anIObject->getEntry() );
+  aDimensions.SaveToAttribute( anIObject->getEntry() );
 
-  GEOM_Displayer( anActiveStudy ).Redisplay( anIObject, true );
+  GEOM_Displayer().Redisplay( anIObject, true );
 }
 
 //=======================================================================
index d7b06070f60d1b168b5449142793f140d86d3660..edbb88efadb31837e159bbf1371be2b6bc04c6ba 100755 (executable)
@@ -724,7 +724,7 @@ void MeasureGUI_AnnotationDlg::onDragged( Handle_GEOM_Annotation theAnnotation )
 //=================================================================================
 GEOM::GEOM_IOperations_ptr MeasureGUI_AnnotationDlg::createOperation()
 {
-  return getGeomEngine()->GetILocalOperations( getStudyId() );
+  return getGeomEngine()->GetILocalOperations( );
 }
 
 //=================================================================================
index 574e7a31500700e76a4a97e2c4080f7f67c32b54..4f87282d319c87a26c324086a51ae125b0af64bc 100644 (file)
@@ -273,7 +273,7 @@ void MeasureGUI_BndBoxDlg::SelectionIntoArgument()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr MeasureGUI_BndBoxDlg::createOperation()
 {
-  return getGeomEngine()->GetIMeasureOperations(getStudyId());
+  return getGeomEngine()->GetIMeasureOperations();
 }
 
 //=================================================================================
index 301ba442b8bf78802d505d8a29ec074c437529b9..8450ba064a257f2f76b3826c715c7880d3158f85 100644 (file)
@@ -272,7 +272,7 @@ void MeasureGUI_CenterMassDlg::enterEvent( QEvent* )
 //=================================================================================
 GEOM::GEOM_IOperations_ptr MeasureGUI_CenterMassDlg::createOperation()
 {
-  return getGeomEngine()->GetIMeasureOperations( getStudyId() );
+  return getGeomEngine()->GetIMeasureOperations();
 }
 
 //=================================================================================
index 177128f27504bf41230af670d35963c35fafa3d4..8984624ce4ec198172a357676f806e925f9f5071 100644 (file)
@@ -394,7 +394,7 @@ void MeasureGUI_CheckCompoundOfBlocksDlg::processObject()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr MeasureGUI_CheckCompoundOfBlocksDlg::createOperation()
 {
-  return getGeomEngine()->GetIBlocksOperations( getStudyId() );
+  return getGeomEngine()->GetIBlocksOperations();
 }
 
 //=================================================================================
index 83ccf56c5c936c807051a593f5522cda8af35282..6b0a52da4ba3dcc22603bc6db19df410b3a88309 100644 (file)
@@ -486,7 +486,7 @@ bool MeasureGUI_CheckSelfIntersectionsDlg::extractPrefix() const
 //=================================================================================
 GEOM::GEOM_IOperations_ptr MeasureGUI_CheckSelfIntersectionsDlg::createOperation()
 {
-  return getGeomEngine()->GetIMeasureOperations( getStudyId() );
+  return getGeomEngine()->GetIMeasureOperations();
 }
 
 //=================================================================================
@@ -710,7 +710,7 @@ bool MeasureGUI_CheckSelfIntersectionsDlg::execute(ObjectList& objects)
     }
   }
 
-  GEOM::ShapesOpPtr shapesOper = getGeomEngine()->GetIShapesOperations(getStudyId());
+  GEOM::ShapesOpPtr shapesOper = getGeomEngine()->GetIShapesOperations();
   
   // Explode sub-shapes
   GEOM::ListOfLong_var anArray   = new GEOM::ListOfLong;
index 328eb4794b8a4515bb6050bd018dac333ea26cbf..d4767e996ef9b2cf3b01fae6ca8d493e0e329bf7 100644 (file)
@@ -445,7 +445,7 @@ void MeasureGUI_CheckShapeDlg::processObject()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr MeasureGUI_CheckShapeDlg::createOperation()
 {
-  return getGeomEngine()->GetIMeasureOperations( getStudyId() );
+  return getGeomEngine()->GetIMeasureOperations();
 }
 
 //=================================================================================
@@ -625,7 +625,7 @@ bool MeasureGUI_CheckShapeDlg::execute( ObjectList& objects )
   }
 
   if (myShapesOper->_is_nil()) {
-    myShapesOper = getGeomEngine()->GetIShapesOperations(getStudyId());
+    myShapesOper = getGeomEngine()->GetIShapesOperations();
   }
 
   GEOM::ListOfGO_var aList = myShapesOper->MakeSubShapes(myObj, anArray);
index c732c0e6614390d9af699286a4dde1dbc292bb4c..6131350ab3169636c82e4951002e603cd994ecfd 100644 (file)
@@ -415,7 +415,7 @@ SALOME_Prs* MeasureGUI_DistanceDlg::buildPrs()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr MeasureGUI_DistanceDlg::createOperation()
 {
-  return getGeomEngine()->GetIMeasureOperations(getStudyId());
+  return getGeomEngine()->GetIMeasureOperations();
 }
 
 //=================================================================================
@@ -434,7 +434,7 @@ bool MeasureGUI_DistanceDlg::isValid (QString& msg)
 bool MeasureGUI_DistanceDlg::execute (ObjectList& objects)
 {
   GEOM::GEOM_IMeasureOperations_var anOper = GEOM::GEOM_IMeasureOperations::_narrow(getOperation());
-  GEOM::GEOM_IBasicOperations_var aBasicOper = getGeomEngine()->GetIBasicOperations(getStudyId());
+  GEOM::GEOM_IBasicOperations_var aBasicOper = getGeomEngine()->GetIBasicOperations();
 
   GEOM::ListOfDouble_var aDbls;
   int nbSols = anOper->ClosestPoints(myObj1.get(), myObj2.get(), aDbls);
index 2e70227670463efa99b4520f7e953eedf668036d..cdd6a42be7e556918857835818421029e405800c 100644 (file)
@@ -360,7 +360,7 @@ bool MeasureGUI_FastCheckIntersectionsDlg::extractPrefix() const
 //=================================================================================
 GEOM::GEOM_IOperations_ptr MeasureGUI_FastCheckIntersectionsDlg::createOperation()
 {
-  return getGeomEngine()->GetIMeasureOperations( getStudyId() );
+  return getGeomEngine()->GetIMeasureOperations();
 }
 
 //=================================================================================
@@ -611,7 +611,7 @@ GEOM::ListOfGO_var MeasureGUI_FastCheckIntersectionsDlg::getLstObjFromListSelect
   }
 
   if (myShapesOper->_is_nil())
-    myShapesOper = getGeomEngine()->GetIShapesOperations(getStudyId());
+    myShapesOper = getGeomEngine()->GetIShapesOperations();
 
   GEOM::ListOfGO_var aObjLstCreate = myShapesOper->MakeSubShapes(anObj.get(), anArray);
 
index a41c5ee778a16d05ff0c307cf08551dc41a19296..ff946e666104174c6a480e02bf6c95d9e1f47f3f 100644 (file)
@@ -287,7 +287,7 @@ void MeasureGUI_GetNonBlocksDlg::enterEvent (QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr MeasureGUI_GetNonBlocksDlg::createOperation()
 {
-  return getGeomEngine()->GetIBlocksOperations(getStudyId());
+  return getGeomEngine()->GetIBlocksOperations();
 }
 
 //=================================================================================
index ed4673e152f29970b9f65be88daa53b7bbd250dd..5255e41113c23979c7738a0de5732a274e2e21bd 100644 (file)
@@ -770,7 +770,7 @@ bool MeasureGUI_ManageDimensionsDlg::ClickOnApply()
                                QVariant() )
                                .value<GEOMGUI_DimensionProperty>();
 
-  mySavedPropertyState.SaveToAttribute( aStudy, myEditObject->GetStudyEntry() );
+  mySavedPropertyState.SaveToAttribute( myEditObject->GetStudyEntry() );
 
   myGeomGUI->emitDimensionsUpdated( QString( myEditObject->GetStudyEntry() ) );
 
@@ -919,7 +919,7 @@ void MeasureGUI_ManageDimensionsDlg::SetEditObject( const GEOM::GeomObjPtr& theO
     return;
   }
 
-  mySavedPropertyState.LoadFromAttribute( getStudy(), myEditObject->GetStudyEntry() );
+  mySavedPropertyState.LoadFromAttribute( myEditObject->GetStudyEntry() );
 
   // set property state for preview
   aStudy->setObjectProperty( GEOM::sharedPropertiesId(),
index 70dd07960d1ed7c1676f21a1d8b6f7be5e55e73f..12d45b46c6c8ce7781179370e90eb40bcdf9e89e 100644 (file)
@@ -188,7 +188,7 @@ void MeasureGUI_NormaleDlg::SelectionIntoArgument()
       aSelMgr->GetIndexes(aSelList.First(), aMap);
       if (aMap.Extent() == 1) // Local Selection
       {
-        GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations(getStudyId());
+        GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations();
         int anIndex = aMap(1);
         aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
         aName += QString(":face_%1").arg(anIndex);
@@ -221,7 +221,7 @@ void MeasureGUI_NormaleDlg::SelectionIntoArgument()
       aSelMgr->GetIndexes(aSelList.First(), aMap);
       if (aMap.Extent() == 1) // Local Selection
       {
-        GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations(getStudyId());
+        GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations();
         int anIndex = aMap(1);
         aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
         aName += QString(":vertex_%1").arg(anIndex);
@@ -333,7 +333,7 @@ void MeasureGUI_NormaleDlg::enterEvent (QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr MeasureGUI_NormaleDlg::createOperation()
 {
-  return getGeomEngine()->GetIMeasureOperations(getStudyId());
+  return getGeomEngine()->GetIMeasureOperations();
 }
 
 //=================================================================================
index 7cf7b9792d8b06df89356321035e924c281bd61c..347f2b8664df4080e773659fdf9f2be3e4d7ee88 100644 (file)
@@ -40,7 +40,6 @@
 #include <LightApp_SelectionMgr.h>
 
 #include <SalomeApp_Application.h>
-#include <SalomeApp_Study.h>
 
 #include <Plot2d_Histogram.h>
 #include <Plot2d_ViewFrame.h>
@@ -206,7 +205,7 @@ MeasureGUI_ShapeStatisticsDlg::~MeasureGUI_ShapeStatisticsDlg()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr MeasureGUI_ShapeStatisticsDlg::createOperation()
 {
-  return getGeomEngine()->GetIGroupOperations(getStudyId());
+  return getGeomEngine()->GetIGroupOperations();
 }
 
 #define RETURN_WITH_MSG(a, b)                   \
@@ -307,7 +306,7 @@ void MeasureGUI_ShapeStatisticsDlg::updateTypes( QList<GEOM::GeomObjPtr> theShap
     myShapes.push_back( aShape );
 
     GEOM::ListOfLong_var aSubShapes;
-    GEOM::GEOM_IShapesOperations_var aShOp = getGeomEngine()->GetIShapesOperations( getStudyId() );
+    GEOM::GEOM_IShapesOperations_var aShOp = getGeomEngine()->GetIShapesOperations();
     if ( hasEdges != 0 )
       hasEdges = aShOp->NumberOfSubShapes( aShapePtr.get(), TopAbs_EDGE ) > 0;
     if ( hasFaces != 0 )
@@ -472,7 +471,6 @@ bool MeasureGUI_ShapeStatisticsDlg::execute(ObjectList& objects)
   int aPrecision = resMgr->integerValue( "Geometry", "length_precision", 6 );
   QString aTypePrefix = myCBTypes->currentText().replace(' ', '_');
   QString objIOR, aMin, aMax, aGroupName;
-  //SalomeApp_Study* study = getStudy();
 
   GEOMUtils::Distribution aShapesDistr =
     GEOMUtils::ComputeDistribution( myShapes, currentType(), myNbIntervals->value(), aRange );
index dceb80c09f654b3f25cb3b1447e2200bf729930a..72c20ab60ba405e6ea62c58ba80f6ef5f7923333 100644 (file)
@@ -363,7 +363,7 @@ bool MeasureGUI_Skeleton::isValid( QString& )
 GEOM_Displayer* MeasureGUI_Skeleton::getDisplayer()
 {
   if ( !myDisplayer )
-    myDisplayer = new GEOM_Displayer( getStudy() );
+    myDisplayer = new GEOM_Displayer();
   return myDisplayer;
 }
 
@@ -373,7 +373,7 @@ GEOM_Displayer* MeasureGUI_Skeleton::getDisplayer()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr MeasureGUI_Skeleton::createOperation()
 {
-  return getGeomEngine()->GetIMeasureOperations( getStudyId() );
+  return getGeomEngine()->GetIMeasureOperations();
 }
 
 //=================================================================================
index 238971ee940a3f09ab02a8f4db09cb845719ad2f..1aace4f88c755c0bdfdb371f0ec02919351812a7 100644 (file)
@@ -253,7 +253,7 @@ void OperationGUI_ArchimedeDlg::enterEvent( QEvent* )
 //=================================================================================
 GEOM::GEOM_IOperations_ptr OperationGUI_ArchimedeDlg::createOperation()
 {
-  return getGeomEngine()->GetILocalOperations( getStudyId() );
+  return getGeomEngine()->GetILocalOperations();
 }
 
 //=================================================================================
index 20d0bf61731f90734810637605676684af85982d..a3e3d7b00ca60f9e2d56b9b68a024b6f688f4998 100644 (file)
@@ -748,7 +748,7 @@ void OperationGUI_ChamferDlg::enableWidgets()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr OperationGUI_ChamferDlg::createOperation()
 {
-  return getGeomEngine()->GetILocalOperations(getStudyId());
+  return getGeomEngine()->GetILocalOperations();
 }
 
 //=================================================================================
index 9c9557a5f2e52ef7642bc1ba40330d2cde2a51b4..7837cc027d3ff679747b563a2725e90b9716f1a0 100644 (file)
@@ -1200,7 +1200,7 @@ bool OperationGUI_ExtractionDlg::isValid(QString &)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr OperationGUI_ExtractionDlg::createOperation()
 {
-  return getGeomEngine()->GetIShapesOperations(getStudyId());
+  return getGeomEngine()->GetIShapesOperations();
 }
 
 //=================================================================================
index 17c9f088fef815266b5e6ce6a5a095d8b80385b9..eed2eab8320a20fac711258d6ee72f85e7139fe7 100644 (file)
@@ -340,7 +340,7 @@ void OperationGUI_ExtrudedFeatureDlg::ButtonClicked(bool checked)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr OperationGUI_ExtrudedFeatureDlg::createOperation()
 {
-  return getGeomEngine()->GetI3DPrimOperations(getStudyId());
+  return getGeomEngine()->GetI3DPrimOperations();
 }
 
 //=================================================================================
index 6f6867f4a59311e09a38731a5f740587375ed2ac..a65912c064521b8522e533486b0e21f0f7b83368 100644 (file)
@@ -215,7 +215,7 @@ void OperationGUI_Fillet1d2dDlg::SelectionIntoArgument()
             GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather( anObj, aName );
             
             if ( aFindedObject->_is_nil()) { // Object not found in study
-              GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() );
+              GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations();
               anObj = aShapesOp->GetSubShape( anObj, anIndex );
             }
             else
@@ -379,7 +379,7 @@ void OperationGUI_Fillet1d2dDlg::activateSelection()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr OperationGUI_Fillet1d2dDlg::createOperation()
 {
-  return getGeomEngine()->GetILocalOperations(getStudyId());
+  return getGeomEngine()->GetILocalOperations();
 }
 
 //=================================================================================
index fdde3777744483fd3d3dcb2988b6ffa3d3b7d388..148546a231d5023b84e0ccbd1ed61459ed966bb6 100644 (file)
@@ -594,7 +594,7 @@ void OperationGUI_FilletDlg::enableWidgets()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr OperationGUI_FilletDlg::createOperation()
 {
-  return getGeomEngine()->GetILocalOperations(getStudyId());
+  return getGeomEngine()->GetILocalOperations();
 }
 
 //=================================================================================
index be4a4aec1c7e761e7d08088e0f6b2f60bad9512b..8c8f40ddc5e8c792cfaa511e2e5ae94d4ef7632e 100644 (file)
@@ -288,7 +288,7 @@ void OperationGUI_GetShapesOnShapeDlg::enterEvent (QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr OperationGUI_GetShapesOnShapeDlg::createOperation()
 {
-  return getGeomEngine()->GetIShapesOperations(getStudyId());
+  return getGeomEngine()->GetIShapesOperations();
 }
 
 //=================================================================================
index 81299f7588b1389de8917cce38a1901edde58a10..f5e44199b0ffefaa7ce05da6d950cfe55bcddf99 100644 (file)
@@ -331,7 +331,7 @@ int OperationGUI_GetSharedShapesDlg::GetType() const
 //=================================================================================
 GEOM::GEOM_IOperations_ptr OperationGUI_GetSharedShapesDlg::createOperation()
 {
-  return getGeomEngine()->GetIShapesOperations(getStudyId());
+  return getGeomEngine()->GetIShapesOperations();
 }
 
 //=================================================================================
index 19f0d2d4954e922789198a47e41c53150cab0c78..fa5bdbfdfe39d293300dc1e00d1042ac29837a73 100644 (file)
@@ -330,7 +330,7 @@ void OperationGUI_PartitionDlg::SelectionIntoArgument()
     if ( !myListTools.length() )
       return;
     else if ( myListTools.length() == 1 && getConstructorId() == 1 ) {
-      GEOM::GEOM_IMeasureOperations_var mOp = getGeomEngine()->GetIMeasureOperations( getStudyId() );
+      GEOM::GEOM_IMeasureOperations_var mOp = getGeomEngine()->GetIMeasureOperations();
       GEOM::ListOfLong_var   intList;
       GEOM::ListOfDouble_var dblList;
       GEOM::GEOM_IKindOfShape::shape_kind kind = mOp->KindOfShape( myListTools[0].in(), intList.out(), dblList.out() );
@@ -428,7 +428,7 @@ void OperationGUI_PartitionDlg::enterEvent( QEvent* )
 //=================================================================================
 GEOM::GEOM_IOperations_ptr OperationGUI_PartitionDlg::createOperation()
 {
-  return getGeomEngine()->GetIBooleanOperations( getStudyId() );
+  return getGeomEngine()->GetIBooleanOperations();
 }
 
 
@@ -505,12 +505,11 @@ bool OperationGUI_PartitionDlg::execute (ObjectList& objects)
 // function : restoreSubShapes
 // purpose  :
 //=================================================================================
-void OperationGUI_PartitionDlg::restoreSubShapes( SALOMEDS::Study_ptr   theStudy,
-                                                  SALOMEDS::SObject_ptr theSObject )
+void OperationGUI_PartitionDlg::restoreSubShapes( SALOMEDS::SObject_ptr theSObject )
 {
   if ( mainFrame()->CheckBoxRestoreSS->isChecked() ) {
     // empty list of arguments means that all arguments should be restored
-    getGeomEngine()->RestoreSubShapesSO( theStudy, theSObject, GEOM::ListOfGO(),
+    getGeomEngine()->RestoreSubShapesSO( theSObject, GEOM::ListOfGO(),
                                          /*theFindMethod=*/GEOM::FSM_GetInPlaceByHistory,
                                          /*theInheritFirstArg=*/myListShapes.length() == 1 && myListTools.length() == 0,
                                          mainFrame()->CheckBoxAddPrefix->isChecked() ); // ? false
index 294a8d554688661bb291b314de34ca58fd7a3433..11065a223397aed466efda6319c6e91bbc68a963 100644 (file)
@@ -50,7 +50,7 @@ protected:
   virtual GEOM::GEOM_IOperations_ptr createOperation();
   virtual bool                       isValid( QString& );
   virtual bool                       execute( ObjectList& );
-  virtual void                       restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr );
+  virtual void                       restoreSubShapes( SALOMEDS::SObject_ptr );
   virtual QList<GEOM::GeomObjPtr>    getSourceObjects();
 
 private:
index d2ee50509f85710bb7761ba70ff7a30100105596..9dfa239c0a36d6f56e389d904fc82a1d323881db 100755 (executable)
@@ -255,7 +255,7 @@ void OperationGUI_TransferDataDlg::enterEvent (QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr OperationGUI_TransferDataDlg::createOperation()
 {
-  return getGeomEngine()->GetIInsertOperations(getStudyId());
+  return getGeomEngine()->GetIInsertOperations();
 }
 
 //=================================================================================
index 4ee511f06b3fc1eb1c5935c36faba1ba0f0ec65d..799b0dba194b74cf2cd0971251e9fee90fcc566d 100644 (file)
@@ -355,7 +355,7 @@ void PrimitiveGUI_BoxDlg::ValueChangedInSpinBox()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr PrimitiveGUI_BoxDlg::createOperation()
 {
-  return getGeomEngine()->GetI3DPrimOperations(getStudyId());
+  return getGeomEngine()->GetI3DPrimOperations();
 }
 
 //=================================================================================
index 35026d0dc668f5d3ba73066f88a1eb693b1780f9..f0ac02fabfd9f58d2c32b55675b26643c8899418 100644 (file)
@@ -371,7 +371,7 @@ void PrimitiveGUI_ConeDlg::ValueChangedInSpinBox()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr  PrimitiveGUI_ConeDlg::createOperation()
 {
-  return getGeomEngine()->GetI3DPrimOperations(getStudyId());
+  return getGeomEngine()->GetI3DPrimOperations();
 }
 
 //=================================================================================
index 63baa9a6b9305d23d901f728c8a48ff7c84ce1dc..580335979976b36990bd42afbfc10da49abed5f9 100644 (file)
@@ -385,7 +385,7 @@ void PrimitiveGUI_CylinderDlg::ValueChangedInSpinBox()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr PrimitiveGUI_CylinderDlg::createOperation()
 {
-  return getGeomEngine()->GetI3DPrimOperations(getStudyId());
+  return getGeomEngine()->GetI3DPrimOperations();
 }
 
 //=================================================================================
index c65ce0732fcc377ae922b70cdf48827831241dc6..720ca7605408f91861fda9b0806ad740cc2358d7 100755 (executable)
@@ -454,7 +454,7 @@ void PrimitiveGUI_DiskDlg::ValueChangedInSpinBox()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr PrimitiveGUI_DiskDlg::createOperation()
 {
-  return getGeomEngine()->GetI3DPrimOperations(getStudyId());
+  return getGeomEngine()->GetI3DPrimOperations();
 }
 
 // //=================================================================================
index d404243862c4df0bfcc0f521248afbfadf017562..004692a3edcc3b298b8e444cdca839553f48f1ba 100755 (executable)
@@ -409,7 +409,7 @@ void PrimitiveGUI_FaceDlg::enterEvent( QEvent* )
 //=================================================================================
 GEOM::GEOM_IOperations_ptr PrimitiveGUI_FaceDlg::createOperation()
 {
-  return myGeomGUI->GetGeomGen()->GetI3DPrimOperations( getStudyId() );
+  return myGeomGUI->GetGeomGen()->GetI3DPrimOperations();
 }
 
 //=================================================================================
index 610f5b9b46d471ffbdc87bf173e6b35a8d9c7e88..83173ce3f319352cdc037357e5e85b1df88e9dbe 100644 (file)
@@ -325,7 +325,7 @@ void PrimitiveGUI_SphereDlg::ValueChangedInSpinBox()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr PrimitiveGUI_SphereDlg::createOperation()
 {
-  return getGeomEngine()->GetI3DPrimOperations( getStudyId() );
+  return getGeomEngine()->GetI3DPrimOperations();
 }
 
 
index a89d5bb4ab283496fe02d898290a26688d8e0039..f7c4373f188c2bce9183797b6c2c60183fb5cbae 100644 (file)
@@ -359,7 +359,7 @@ void PrimitiveGUI_TorusDlg::ValueChangedInSpinBox()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr PrimitiveGUI_TorusDlg::createOperation()
 {
-  return getGeomEngine()->GetI3DPrimOperations(getStudyId());
+  return getGeomEngine()->GetI3DPrimOperations();
 }
 
 //=================================================================================
index 51ad304cdf3e27337f1d87cc55f2dc14def5b745..f3e8f16d83c0309af5578c61d5dccb50ec4a180d 100644 (file)
@@ -249,7 +249,7 @@ void RepairGUI_ChangeOrientationDlg::enterEvent( QEvent* )
 //=================================================================================
 GEOM::GEOM_IOperations_ptr RepairGUI_ChangeOrientationDlg::createOperation()
 {
-  return getGeomEngine()->GetIHealingOperations( getStudyId() );
+  return getGeomEngine()->GetIHealingOperations();
 }
 
 
index bee3b32f0421496383dbdc4dcd452c44a577f189..957cb087b25a2d2d298f2b1492a78db200fba9ce 100644 (file)
@@ -301,7 +301,7 @@ void RepairGUI_CloseContourDlg::enterEvent (QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr RepairGUI_CloseContourDlg::createOperation()
 {
-  return getGeomEngine()->GetIHealingOperations(getStudyId());
+  return getGeomEngine()->GetIHealingOperations();
 }
 
 //=================================================================================
index 9a060578129caff3a008ff8892d791e42bb4def0..ba22d601f70f7eed85b46155a409080096332209 100644 (file)
@@ -474,7 +474,7 @@ void RepairGUI_DivideEdgeDlg::enterEvent( QEvent* )
 //=================================================================================
 GEOM::GEOM_IOperations_ptr RepairGUI_DivideEdgeDlg::createOperation()
 {
-  return getGeomEngine()->GetIHealingOperations( getStudyId() );
+  return getGeomEngine()->GetIHealingOperations();
 }
 
 //=================================================================================
index c875a27bcb488c82b7c164f9a3770897083dcf2e..bee3282a25a67c6b7755a397d86e3f460f74dd59 100644 (file)
@@ -241,7 +241,7 @@ void RepairGUI_FreeBoundDlg::activateSelection()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr RepairGUI_FreeBoundDlg::createOperation()
 {
-  return getGeomEngine()->GetIHealingOperations(getStudyId());
+  return getGeomEngine()->GetIHealingOperations();
 }
 
 //=================================================================================
index 8b5c71b6d19cb0b22b0d45d6d7eee6c48f41d57c..73c99830e4426ce752f6250cbbb257ac6208af6d 100644 (file)
@@ -250,7 +250,7 @@ void RepairGUI_FreeFacesDlg::activateSelection()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr RepairGUI_FreeFacesDlg::createOperation()
 {
-  return getGeomEngine()->GetIShapesOperations( getStudyId() );
+  return getGeomEngine()->GetIShapesOperations();
 }
 
 //=================================================================================
@@ -364,7 +364,7 @@ bool RepairGUI_FreeFacesDlg::execute( ObjectList& objects )
 GEOM_Displayer* RepairGUI_FreeFacesDlg::getDisplayer()
 {
   if ( !myDisplayer )
-    myDisplayer = new GEOM_Displayer( getStudy() );
+    myDisplayer = new GEOM_Displayer();
   return myDisplayer;
 }
 
index 591a1b528b67dad72db510ccd0606ac27cf4d8b4..4e24d3634077696046652465589380d74cd08657 100644 (file)
@@ -186,7 +186,7 @@ void RepairGUI_FuseEdgesDlg::SelectionIntoArgument()
             GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather(anObj, aName);
 
             if (aFindedObject->_is_nil()) { // Object not found in study
-              GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations(getStudyId());
+              GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations();
               anObj = aShapesOp->GetSubShape(anObj, anIndex);
             }
             else
@@ -304,7 +304,7 @@ void RepairGUI_FuseEdgesDlg::activateSelection()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr RepairGUI_FuseEdgesDlg::createOperation()
 {
-  return getGeomEngine()->GetIHealingOperations(getStudyId());
+  return getGeomEngine()->GetIHealingOperations();
 }
 
 //=================================================================================
index 2e178397ef6fae2ce7ae089b14f6a19a34be68d8..251426baad6dda25cae3a7f9d75e49188dad9d08 100644 (file)
@@ -408,7 +408,7 @@ void RepairGUI_GlueDlg::enterEvent(QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr RepairGUI_GlueDlg::createOperation()
 {
-  return getGeomEngine()->GetIShapesOperations(getStudyId());
+  return getGeomEngine()->GetIShapesOperations();
 }
 
 //=================================================================================
@@ -542,8 +542,7 @@ bool RepairGUI_GlueDlg::execute(ObjectList& objects)
 // function : restoreSubShapes
 // purpose  :
 //=================================================================================
-void RepairGUI_GlueDlg::restoreSubShapes(SALOMEDS::Study_ptr   theStudy,
-                                          SALOMEDS::SObject_ptr theSObject)
+void RepairGUI_GlueDlg::restoreSubShapes( SALOMEDS::SObject_ptr theSObject)
 {
   if (mainFrame()->CheckBoxRestoreSS->isChecked()) {
     GEOM::find_shape_method aFindMethod = GEOM::FSM_GetInPlace;
@@ -551,7 +550,7 @@ void RepairGUI_GlueDlg::restoreSubShapes(SALOMEDS::Study_ptr   theStudy,
       aFindMethod = GEOM::FSM_GetInPlaceByHistory;
 
     // empty list of arguments means that all arguments should be restored
-    getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, GEOM::ListOfGO(),
+    getGeomEngine()->RestoreSubShapesSO( theSObject, GEOM::ListOfGO(),
                                          aFindMethod, /*theInheritFirstArg=*/true,
                                          mainFrame()->CheckBoxAddPrefix->isChecked());
   }
index bf8ff96b5d60c706bd4952a1bd26e3b440ccef2a..92321bdc7ac8bcd36cf76b86b592d4cbade6c8f0 100644 (file)
@@ -55,7 +55,7 @@ protected:
   virtual GEOM::GEOM_IOperations_ptr createOperation();
   virtual bool                       isValid (QString&);
   virtual bool                       execute (ObjectList&);
-  virtual void                       restoreSubShapes (SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr);
+  virtual void                       restoreSubShapes (SALOMEDS::SObject_ptr);
   virtual QList<GEOM::GeomObjPtr>    getSourceObjects();
 
 private:
index 1888113da194cd30a89eca2c88d07cd8b08621d8..8b61bcf198ba1c617c217b87a8b9658499e8fbdd 100644 (file)
@@ -1188,8 +1188,6 @@ void RepairGUI_InspectObjectDlg::clickOnHide()
 //=================================================================================
 void RepairGUI_InspectObjectDlg::clickOnPublish()
 {
-  _PTR(Study) studyDS = dynamic_cast<SalomeApp_Study*>( myGeomGUI->getApp()->activeStudy() )->studyDS();
-
   // find main object
   TreeWidgetItem* aMainItem = dynamic_cast<TreeWidgetItem*>( myCurrentTreeObjects->topLevelItem(0) );
 
@@ -1217,12 +1215,12 @@ void RepairGUI_InspectObjectDlg::clickOnPublish()
   anArray->length(j);
 
   // get selected sub-shapes
-  GEOM::GEOM_IShapesOperations_var anOper = getGeomEngine()->GetIShapesOperations( getStudyId() );
+  GEOM::GEOM_IShapesOperations_var anOper = getGeomEngine()->GetIShapesOperations();
   GEOM::ListOfGO_var aList = anOper->MakeSubShapes( aMainObject, anArray );
 
   // publish sub-shapes
   for ( int i = 0; i < aList->length(); i++ )
-    GeometryGUI::GetGeomGen()->AddInStudy( GeometryGUI::ClientStudyToStudy( studyDS ), aList[i],
+    GeometryGUI::GetGeomGen()->AddInStudy( aList[i],
                                            anIndices.values().at(i).toStdString().c_str(), aMainObject );
 
   updateObjBrowser();
index 5881526bda56446dcd2b9b2cb55602a35e697072..17935855370acd3d0da31077d9c0eece46274c76 100644 (file)
@@ -275,7 +275,7 @@ void RepairGUI_LimitToleranceDlg::enterEvent(QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr RepairGUI_LimitToleranceDlg::createOperation()
 {
-  return getGeomEngine()->GetIHealingOperations(getStudyId());
+  return getGeomEngine()->GetIHealingOperations();
 }
 
 //=================================================================================
@@ -433,12 +433,11 @@ void RepairGUI_LimitToleranceDlg::updateButtonState()
 // function : restoreSubShapes
 // purpose  :
 //=================================================================================
-void RepairGUI_LimitToleranceDlg::restoreSubShapes(SALOMEDS::Study_ptr   theStudy,
-                                                   SALOMEDS::SObject_ptr theSObject)
+void RepairGUI_LimitToleranceDlg::restoreSubShapes(SALOMEDS::SObject_ptr theSObject)
 {
   if (mainFrame()->CheckBoxRestoreSS->isChecked()) {
     // empty list of arguments means that all arguments should be restored
-    getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, GEOM::ListOfGO(),
+    getGeomEngine()->RestoreSubShapesSO(theSObject, GEOM::ListOfGO(),
                                         GEOM::FSM_GetInPlace, /*theInheritFirstArg=*/true,
                                         mainFrame()->CheckBoxAddPrefix->isChecked());
   }
index 5ec1ab29f92faf4e1f5c24d9af1d8ad6f3e67688..53ef961e816d212b7ab46e48165993c1044d1d79 100644 (file)
@@ -48,7 +48,7 @@ protected:
   virtual GEOM::GEOM_IOperations_ptr createOperation();
   virtual bool                       isValid (QString&);
   virtual bool                       execute (ObjectList&);
-  virtual void                       restoreSubShapes (SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr);
+  virtual void                       restoreSubShapes (SALOMEDS::SObject_ptr);
   virtual QList<GEOM::GeomObjPtr>    getSourceObjects();
 
 private:
index 9341fe543c9026a90ab8a0348b29623eb2eaa7fa..09a2975d81a8049f3153a6aa0731c217a28c412c 100644 (file)
@@ -267,7 +267,7 @@ void RepairGUI_RemoveExtraEdgesDlg::activateSelection()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr RepairGUI_RemoveExtraEdgesDlg::createOperation()
 {
-  return getGeomEngine()->GetIBlocksOperations( getStudyId() );
+  return getGeomEngine()->GetIBlocksOperations();
 }
 
 //=================================================================================
@@ -303,12 +303,11 @@ bool RepairGUI_RemoveExtraEdgesDlg::execute( ObjectList& objects )
 // function : restoreSubShapes
 // purpose  :
 //=================================================================================
-void RepairGUI_RemoveExtraEdgesDlg::restoreSubShapes( SALOMEDS::Study_ptr   theStudy,
-                                                      SALOMEDS::SObject_ptr theSObject )
+void RepairGUI_RemoveExtraEdgesDlg::restoreSubShapes( SALOMEDS::SObject_ptr theSObject )
 {
   if ( mainFrame()->CheckBoxRestoreSS->isChecked() ) {
     // empty list of arguments means that all arguments should be restored
-    getGeomEngine()->RestoreSubShapesSO( theStudy, theSObject, GEOM::ListOfGO(),
+    getGeomEngine()->RestoreSubShapesSO( theSObject, GEOM::ListOfGO(),
                                          /*theFindMethod=*/GEOM::FSM_GetInPlace, // ? GetInPlaceByHistory
                                          /*theInheritFirstArg=*/true,
                                          mainFrame()->CheckBoxAddPrefix->isChecked() );
index c14ed88c2749b3cd323185d1a221b2bfeda62dac..83e3eb74abacb29fabc835e0dd0bad9487fbfba3 100644 (file)
@@ -45,7 +45,7 @@ protected:
   virtual GEOM::GEOM_IOperations_ptr createOperation();
   virtual bool                       isValid( QString& );
   virtual bool                       execute( ObjectList& );    
-  virtual void                       restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr );
+  virtual void                       restoreSubShapes( SALOMEDS::SObject_ptr );
   virtual QList<GEOM::GeomObjPtr>    getSourceObjects();
 
 private:
index 69c219628379edfa10601688e530b4ab74bc8470..6ad6053eadea234f593855f1652c56529778305e 100644 (file)
@@ -305,7 +305,7 @@ void RepairGUI_RemoveHolesDlg::enterEvent (QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr RepairGUI_RemoveHolesDlg::createOperation()
 {
-  return getGeomEngine()->GetIHealingOperations(getStudyId());
+  return getGeomEngine()->GetIHealingOperations();
 }
 
 //=================================================================================
index 12d44bf1d732206b407d805bd2141b341ebec03b..2626f6d3b291013adf764f252edca0809f6931ca 100644 (file)
@@ -290,7 +290,7 @@ void RepairGUI_RemoveIntWiresDlg::enterEvent (QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr RepairGUI_RemoveIntWiresDlg::createOperation()
 {
-  return getGeomEngine()->GetIHealingOperations(getStudyId());
+  return getGeomEngine()->GetIHealingOperations();
 }
 
 //=================================================================================
index c5f56a2b54e1ca553097a8bed75b1d11b9c2a821..e679ba1bbc34b4f4207388c90834dccbf3dcfc78 100755 (executable)
@@ -236,7 +236,7 @@ void RepairGUI_RemoveWebsDlg::activateSelection()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr RepairGUI_RemoveWebsDlg::createOperation()
 {
-  return getGeomEngine()->GetIHealingOperations(getStudyId());
+  return getGeomEngine()->GetIHealingOperations();
 }
 
 //=================================================================================
@@ -272,12 +272,11 @@ bool RepairGUI_RemoveWebsDlg::execute (ObjectList& objects)
 // function : restoreSubShapes
 // purpose  :
 //=================================================================================
-void RepairGUI_RemoveWebsDlg::restoreSubShapes (SALOMEDS::Study_ptr   theStudy,
-                                                SALOMEDS::SObject_ptr theSObject)
+void RepairGUI_RemoveWebsDlg::restoreSubShapes (SALOMEDS::SObject_ptr theSObject)
 {
   if (mainFrame()->CheckBoxRestoreSS->isChecked()) {
     // empty list of arguments means that all arguments should be restored
-    getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, GEOM::ListOfGO(),
+    getGeomEngine()->RestoreSubShapesSO(theSObject, GEOM::ListOfGO(),
                                         /*theFindMethod=*/GEOM::FSM_GetInPlace, // ? GetInPlaceByHistory
                                         /*theInheritFirstArg=*/true,
                                         mainFrame()->CheckBoxAddPrefix->isChecked());
index a5ce390bef43519d88fd07c83191d17f8ff0f0a9..71e55acf6c155927632a9190974bae42904ef82b 100755 (executable)
@@ -44,7 +44,7 @@ protected:
   virtual GEOM::GEOM_IOperations_ptr createOperation();
   virtual bool                       isValid (QString&);
   virtual bool                       execute (ObjectList&);
-  virtual void                       restoreSubShapes (SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr);
+  virtual void                       restoreSubShapes (SALOMEDS::SObject_ptr);
   virtual QList<GEOM::GeomObjPtr>    getSourceObjects();
 
 private:
index bd1e03edc45a899f17b3b72727fb08f4a8246739..0050245b9f52d7ad82cd62013b2460caadf66027 100644 (file)
@@ -258,7 +258,7 @@ void RepairGUI_SewingDlg::enterEvent( QEvent* )
 //=================================================================================
 GEOM::GEOM_IOperations_ptr RepairGUI_SewingDlg::createOperation()
 {
-  return getGeomEngine()->GetIHealingOperations( getStudyId() );
+  return getGeomEngine()->GetIHealingOperations();
 }
 
 //=================================================================================
index 4a7e27adae100881775560da4fe73a087cbe08dd..f6df0de295944f28f540b2b40f22143e806d758c 100755 (executable)
@@ -519,7 +519,7 @@ QString set_convert( const char* theParam, const char* theValue )
 //=================================================================================
 void RepairGUI_ShapeProcessDlg::loadDefaults()
 {
-  GEOM::GEOM_IHealingOperations_var anOp = myGeomGUI->GetGeomGen()->GetIHealingOperations( getStudyId() );
+  GEOM::GEOM_IHealingOperations_var anOp = myGeomGUI->GetGeomGen()->GetIHealingOperations();
   GEOM::string_array_var anOperators, aParams, aValues;
   anOp->GetShapeProcessParameters( anOperators, aParams, aValues );
 
@@ -615,7 +615,7 @@ QString RepairGUI_ShapeProcessDlg::getText( QWidget* theControl ) const
 //=================================================================================
 GEOM::GEOM_IOperations_ptr RepairGUI_ShapeProcessDlg::createOperation()
 {
-  return getGeomEngine()->GetIHealingOperations( getStudyId() );
+  return getGeomEngine()->GetIHealingOperations();
 }
 
 //=================================================================================
index e2f5e94daeccbb6eb4e82ace8b131301098e2a26..b34504186c670ab573dd5ca2c25c0daf53ec29b1 100644 (file)
@@ -352,7 +352,7 @@ void RepairGUI_SuppressFacesDlg::enterEvent (QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr RepairGUI_SuppressFacesDlg::createOperation()
 {
-  return getGeomEngine()->GetIHealingOperations(getStudyId());
+  return getGeomEngine()->GetIHealingOperations();
 }
 
 //=================================================================================
@@ -414,12 +414,11 @@ void RepairGUI_SuppressFacesDlg::initSelection()
 // function : restoreSubShapes
 // purpose  :
 //=================================================================================
-void RepairGUI_SuppressFacesDlg::restoreSubShapes (SALOMEDS::Study_ptr   theStudy,
-                                                   SALOMEDS::SObject_ptr theSObject)
+void RepairGUI_SuppressFacesDlg::restoreSubShapes (SALOMEDS::SObject_ptr theSObject)
 {
   if (mainFrame()->CheckBoxRestoreSS->isChecked()) {
     // empty list of arguments means that all arguments should be restored
-    getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, GEOM::ListOfGO(),
+    getGeomEngine()->RestoreSubShapesSO(theSObject, GEOM::ListOfGO(),
                                         /*theFindMethod=*/GEOM::FSM_GetInPlace,
                                         /*theInheritFirstArg=*/true,
                                         mainFrame()->CheckBoxAddPrefix->isChecked());
index 215963785f91031ee73fff85e9c342bdba895ee9..09f5506d8dead0e3bbbef1b9aedaf16398b803e5 100644 (file)
@@ -48,7 +48,7 @@ protected:
   virtual GEOM::GEOM_IOperations_ptr createOperation();
   virtual bool                       isValid( QString& );
   virtual bool                       execute( ObjectList& );
-  virtual void                       restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr );
+  virtual void                       restoreSubShapes( SALOMEDS::SObject_ptr );
   virtual QList<GEOM::GeomObjPtr>    getSourceObjects();
 
 private:
index 0e63edee77edcfbfb5fa7f9b3ab8fd7da270e56e..b03a105a13df5122aedc203dfa52316d1a2cd84f 100755 (executable)
@@ -263,7 +263,7 @@ void RepairGUI_UnionFacesDlg::activateSelection()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr RepairGUI_UnionFacesDlg::createOperation()
 {
-  return getGeomEngine()->GetIBlocksOperations( getStudyId() );
+  return getGeomEngine()->GetIBlocksOperations();
 }
 
 //=================================================================================
@@ -294,12 +294,11 @@ bool RepairGUI_UnionFacesDlg::execute( ObjectList& objects )
 // function : restoreSubShapes
 // purpose  :
 //=================================================================================
-void RepairGUI_UnionFacesDlg::restoreSubShapes( SALOMEDS::Study_ptr   theStudy,
-                                                SALOMEDS::SObject_ptr theSObject )
+void RepairGUI_UnionFacesDlg::restoreSubShapes( SALOMEDS::SObject_ptr theSObject )
 {
   if ( mainFrame()->CheckBoxRestoreSS->isChecked() ) {
     // empty list of arguments means that all arguments should be restored
-    getGeomEngine()->RestoreSubShapesSO( theStudy, theSObject, GEOM::ListOfGO(),
+    getGeomEngine()->RestoreSubShapesSO( theSObject, GEOM::ListOfGO(),
                                          /*theFindMethod=*/GEOM::FSM_GetInPlace, // ? GetInPlaceByHistory
                                          /*theInheritFirstArg=*/true,
                                          mainFrame()->CheckBoxAddPrefix->isChecked() );
index 0d74105a19ffce015f6a25bd4c26d743d10a26e5..1e8c68d254e18a9d04105815cbceafc98ce7ccdc 100755 (executable)
@@ -45,7 +45,7 @@ protected:
   virtual GEOM::GEOM_IOperations_ptr createOperation();
   virtual bool                       isValid( QString& );
   virtual bool                       execute( ObjectList& );    
-  virtual void                       restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr );
+  virtual void                       restoreSubShapes( SALOMEDS::SObject_ptr );
   virtual QList<GEOM::GeomObjPtr>    getSourceObjects();
 
 private:
index f9dad8df35fba31c4e5bef21cd690d7f16cbef11..6fd9cfcb9917a90b634064760f0e14084fd6008b 100644 (file)
@@ -111,11 +111,8 @@ bool STEPPlugin_GUI::importSTEP( SUIT_Desktop* parent )
 {
   SalomeApp_Application* app = getGeometryGUI()->getApp();
   if ( !app ) return false;
-  SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*> ( app->activeStudy() );
-  if ( !study ) return false;
 
-  SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
-  GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "STEPPluginEngine" );
+  GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( "STEPPluginEngine" );
   STEPOpPtr stepOp = GEOM::ISTEPOperations::_narrow( op );
   if ( stepOp.isNull() ) return false;
 
@@ -183,19 +180,18 @@ bool STEPPlugin_GUI::importSTEP( SUIT_Desktop* parent )
        {
          GEOM::GEOM_Object_var main = result[0];
          QString publishName = GEOMBase::GetDefaultName( SUIT_Tools::file( fileName, true ) );
-         SALOMEDS::SObject_var so = GeometryGUI::GetGeomGen()->PublishInStudy( dsStudy,
-                                                                               SALOMEDS::SObject::_nil(),
-                                                                               main.in(),
-                                                                               publishName.toUtf8().constData() );
+         SALOMEDS::SObject_var so = GeometryGUI::GetGeomGen()->PublishInStudy( SALOMEDS::SObject::_nil(),
+                                                                                                                   main.in(),
+                                                                                                                   publishName.toUtf8().constData() );
          
          entryList.append( so->GetID() );
          for ( int i = 1, n = result->length(); i < n; i++ ) {
            GEOM::GEOM_Object_ptr group = result[i];
            CORBA::String_var grpName = group->GetName();
-           GeometryGUI::GetGeomGen()->AddInStudy( dsStudy, group, grpName.in(), main );
+           GeometryGUI::GetGeomGen()->AddInStudy( group, grpName.in(), main );
          }
          transaction.commit();
-         GEOM_Displayer( study ).Display( main.in() );
+         GEOM_Displayer().Display( main.in() );
           main->UnRegister();
        }
        else
@@ -210,7 +206,7 @@ bool STEPPlugin_GUI::importSTEP( SUIT_Desktop* parent )
       }
     }
 
-    getGeometryGUI()->updateObjBrowser( true );
+    getGeometryGUI()->updateObjBrowser();
     app->browseObjects( entryList );
           
     if ( errors.count() > 0 )
@@ -234,8 +230,7 @@ bool STEPPlugin_GUI::exportSTEP( SUIT_Desktop* parent )
   SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*> ( app->activeStudy() );
   if ( !study ) return false;
 
-  SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
-  GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "STEPPluginEngine" );
+  GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( "STEPPluginEngine" );
   STEPOpPtr stepOp = GEOM::ISTEPOperations::_narrow( op );
   if ( stepOp.isNull() ) return false;
 
index 86f00981f512ce993a226704d76c26c0c61760a4..cae343405dad5f93b1ba4c5e06ac0c1b7e636389 100644 (file)
@@ -46,12 +46,11 @@ STEPPlugin_IECallBack::~STEPPlugin_IECallBack()
  */
 //=============================================================================
 bool
-STEPPlugin_IECallBack::Export( int                            theDocId,
-                              const Handle(GEOM_Object)      theOriginal,
-                              const TCollection_AsciiString& theFileName,
-                              const TCollection_AsciiString& theFormatName )
+STEPPlugin_IECallBack::Export( const Handle(GEOM_Object)      theOriginal,
+                               const TCollection_AsciiString& theFileName,
+                               const TCollection_AsciiString& theFormatName )
 {
-  STEPPlugin_IOperations* aPluginOperations = STEPPlugin_OperationsCreator::get( GetEngine(), theDocId );
+  STEPPlugin_IOperations* aPluginOperations = STEPPlugin_OperationsCreator::get( GetEngine() );
   const STEPPlugin_IOperations::LengthUnit aUnit = STEPPlugin_IOperations::LengthUnit_Meter;
 
   aPluginOperations->ExportSTEP( theOriginal, theFileName, aUnit );
@@ -64,11 +63,10 @@ STEPPlugin_IECallBack::Export( int                            theDocId,
  */
 //=============================================================================
 Handle(TColStd_HSequenceOfTransient)
-STEPPlugin_IECallBack::Import( int                            theDocId,
-                              const TCollection_AsciiString& theFormatName,
-                              const TCollection_AsciiString& theFileName )
+STEPPlugin_IECallBack::Import( const TCollection_AsciiString& theFormatName,
+                               const TCollection_AsciiString& theFileName )
 {
-  STEPPlugin_IOperations* aPluginOperations = STEPPlugin_OperationsCreator::get( GetEngine(), theDocId );
+  STEPPlugin_IOperations* aPluginOperations = STEPPlugin_OperationsCreator::get( GetEngine() );
   bool anIsIgnoreUnits = ( theFormatName == "STEP_SCALE" ) ? true : false;
   return aPluginOperations->ImportSTEP( theFileName, anIsIgnoreUnits, false );
 }
@@ -79,11 +77,10 @@ STEPPlugin_IECallBack::Import( int                            theDocId,
  */
 //=============================================================================
 TCollection_AsciiString
-STEPPlugin_IECallBack::ReadValue( int                            theDocId,
-                                 const TCollection_AsciiString& theFileName,
-                                 const TCollection_AsciiString& theFormatName,
-                                 const TCollection_AsciiString& theParameterName )
+STEPPlugin_IECallBack::ReadValue( const TCollection_AsciiString& theFileName,
+                                  const TCollection_AsciiString& theFormatName,
+                                  const TCollection_AsciiString& theParameterName )
 {
-  STEPPlugin_IOperations* aPluginOperations = STEPPlugin_OperationsCreator::get( GetEngine(), theDocId );
+  STEPPlugin_IOperations* aPluginOperations = STEPPlugin_OperationsCreator::get( GetEngine() );
   return aPluginOperations->ReadValue( theFileName, theParameterName );
 }
index 3f961d8bcb286cfaaac04820b8e9b297e3a4c40b..71c55f45602702c6ca73f14f6c73d8ce9a4e6898 100644 (file)
@@ -36,17 +36,14 @@ public:
   STEPPlugin_IECallBack();
   ~STEPPlugin_IECallBack();
   
-  bool         Export( int                            theDocId,
-                      const Handle(GEOM_Object)      theOriginal,
+  bool Export( const Handle(GEOM_Object)      theOriginal,
                       const TCollection_AsciiString& theFileName,
                       const TCollection_AsciiString& theFormatName );
 
-  Handle(TColStd_HSequenceOfTransient) Import( int                            theDocId,
-                                              const TCollection_AsciiString& theFormatName,
-                                              const TCollection_AsciiString& theFileName );
+  Handle(TColStd_HSequenceOfTransient) Import( const TCollection_AsciiString& theFormatName,
+                                               const TCollection_AsciiString& theFileName );
 
-  TCollection_AsciiString  ReadValue( int                            theDocId,
-                                     const TCollection_AsciiString& theFileName,
+  TCollection_AsciiString  ReadValue( const TCollection_AsciiString& theFileName,
                                       const TCollection_AsciiString& theFormatName,
                                       const TCollection_AsciiString& theParameterName );
 };
index c1bb68656fb141701db595defb080e502de1c18b..717200bee002f62bed57f2173d6c548362748d49 100644 (file)
@@ -38,8 +38,8 @@
  *  Constructor
  */
 //=============================================================================
-STEPPlugin_IOperations::STEPPlugin_IOperations( GEOM_Engine* theEngine, int theDocID )
-: GEOMImpl_IBaseIEOperations( theEngine, theDocID )
+STEPPlugin_IOperations::STEPPlugin_IOperations( GEOM_Engine* theEngine )
+: GEOMImpl_IBaseIEOperations( theEngine )
 {
   MESSAGE( "STEPPlugin_IOperations::STEPPlugin_IOperations" );
 }
@@ -122,7 +122,7 @@ void STEPPlugin_IOperations::ExportSTEP
   if( aRefFunction.IsNull() ) return;  //There is no function which creates an object to be exported
 
   //Add a new result object
-  Handle(GEOM_Object) result = GetEngine()->AddObject( GetDocID(), GEOM_IMPORT);
+  Handle(GEOM_Object) result = GetEngine()->AddObject( GEOM_IMPORT);
 
   //Add an Export function
   Handle(GEOM_Function) aFunction = result->AddFunction( STEPPlugin_ExportDriver::GetID(), EXPORT_SHAPE );
@@ -174,7 +174,7 @@ STEPPlugin_IOperations::ImportSTEP(const TCollection_AsciiString& theFileName,
   if( theFileName.IsEmpty() ) return NULL;
 
   //Add a new result object
-  Handle(GEOM_Object) anImported = GetEngine()->AddObject( GetDocID(), GEOM_IMPORT );
+  Handle(GEOM_Object) anImported = GetEngine()->AddObject( GEOM_IMPORT );
 
   //Add an Import function
   Handle(GEOM_Function) aFunction =
index 4a29e5a1e27b99018d0895bc8567001b6f9212d0..a99c57d2205181a2c778e4ccd3801148c710ebee 100644 (file)
@@ -51,7 +51,7 @@ public:
 
 
 public:
-  STEPPlugin_IOperations( GEOM_Engine*, int );
+  STEPPlugin_IOperations( GEOM_Engine* );
   ~STEPPlugin_IOperations();
 
   void ExportSTEP( const Handle(GEOM_Object),
index bf52a1f1a26cf5d23140bf26a19d28e092a57f99..c81392c7e5354114da380784d0ebb01148c725b8 100644 (file)
@@ -35,7 +35,7 @@
 // OCCT includes
 #include <TFunction_DriverTable.hxx>
 
-std::map <int, STEPPlugin_IOperations*> STEPPlugin_OperationsCreator::_mapOfOperations;
+STEPPlugin_IOperations* STEPPlugin_OperationsCreator::_operation;
 
 STEPPlugin_OperationsCreator::STEPPlugin_OperationsCreator()
 {
@@ -56,19 +56,17 @@ STEPPlugin_OperationsCreator::~STEPPlugin_OperationsCreator()
 }
 
 GEOM_IOperations_i* STEPPlugin_OperationsCreator::Create( PortableServer::POA_ptr thePOA,
-                                                          int                     theStudyId,
                                                           GEOM::GEOM_Gen_ptr      theEngine,
                                                           ::GEOMImpl_Gen*         theGenImpl )
 {
   Unexpect aCatch( SALOME_SalomeException );
   MESSAGE( "STEPPlugin_OperationsCreator::Create" );
-  return new STEPPlugin_IOperations_i( thePOA, theEngine, get( theGenImpl, theStudyId ) );
+  return new STEPPlugin_IOperations_i( thePOA, theEngine, get(theGenImpl) );
 }
 
-STEPPlugin_IOperations* STEPPlugin_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl,
-                                                          int             theStudyId )
+STEPPlugin_IOperations* STEPPlugin_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl )
 {
-  if (_mapOfOperations.find( theStudyId ) == _mapOfOperations.end() )
-    _mapOfOperations[theStudyId] = new STEPPlugin_IOperations( theGenImpl, theStudyId );
-  return _mapOfOperations[theStudyId];
+  if( !_operation )
+    _operation = new STEPPlugin_IOperations( theGenImpl );
+  return _operation;
 }
index efb210206859d2c1c4d19c0014695e835d9d518a..2caf56dfc774f191966533f5168f7549b91dfd27 100755 (executable)
@@ -41,16 +41,13 @@ public:
   ~STEPPlugin_OperationsCreator();
 
   GEOM_IOperations_i* Create( PortableServer::POA_ptr thePOA,
-                             int                     theStudyId,
-                             GEOM::GEOM_Gen_ptr      theEngine,
-                             ::GEOMImpl_Gen*         theGenImpl );
-
+                              GEOM::GEOM_Gen_ptr      theEngine,
+                              ::GEOMImpl_Gen*         theGenImpl );
 private:
-  static STEPPlugin_IOperations* get( ::GEOMImpl_Gen*         theGenImpl,
-                                     int                     theStudyId );
+  static STEPPlugin_IOperations* get(::GEOMImpl_Gen* theGenImpl);
 
 private:
-  static std::map <int, STEPPlugin_IOperations*>  _mapOfOperations;
+  static STEPPlugin_IOperations* _operation;
 
   friend class STEPPlugin_IECallBack;
 };
index cbe86160aa78bb518d473ef79aea276f440f89c9..95955c2d52d4c4df590a8e4b53422786cc098b73 100644 (file)
@@ -107,11 +107,8 @@ bool STLPlugin_GUI::importSTL( SUIT_Desktop* parent )
 {
   SalomeApp_Application* app = getGeometryGUI()->getApp();
   if ( !app ) return false;
-  SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*> ( app->activeStudy() );
-  if ( !study ) return false;
 
-  SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
-  GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "STLPluginEngine" );
+  GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( "STLPluginEngine" );
   STLOpPtr stlOp = GEOM::ISTLOperations::_narrow( op );
   if ( stlOp.isNull() ) return false;
 
@@ -138,14 +135,13 @@ bool STLPlugin_GUI::importSTL( SUIT_Desktop* parent )
         {
           GEOM::GEOM_Object_var main = result[0];
           QString publishName = GEOMBase::GetDefaultName( SUIT_Tools::file( fileName, true ) );
-          SALOMEDS::SObject_var so = GeometryGUI::GetGeomGen()->PublishInStudy( dsStudy,
-                                                                                SALOMEDS::SObject::_nil(),
+          SALOMEDS::SObject_var so = GeometryGUI::GetGeomGen()->PublishInStudy( SALOMEDS::SObject::_nil(),
                                                                                 main.in(),
                                                                                 publishName.toUtf8().constData() );
 
           entryList.append( so->GetID() );
           transaction.commit();
-          GEOM_Displayer( study ).Display( main.in() );
+          GEOM_Displayer().Display( main.in() );
           main->UnRegister();
         }
         else
@@ -159,7 +155,7 @@ bool STLPlugin_GUI::importSTL( SUIT_Desktop* parent )
         transaction.abort();
       }
     }
-    getGeometryGUI()->updateObjBrowser( true );
+    getGeometryGUI()->updateObjBrowser();
     app->browseObjects( entryList );
 
     if ( errors.count() > 0 )
@@ -180,11 +176,8 @@ bool STLPlugin_GUI::exportSTL( SUIT_Desktop* parent )
 {
   SalomeApp_Application* app = getGeometryGUI()->getApp();
   if ( !app ) return false;
-  SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*> ( app->activeStudy() );
-  if ( !study ) return false;
 
-  SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
-  GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "STLPluginEngine" );
+  GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( "STLPluginEngine" );
   STLOpPtr stlOp = GEOM::ISTLOperations::_narrow( op );
   if ( stlOp.isNull() ) return false;
 
index be4d0ce6d7dfc93135a996739acc4d674df5fed6..e4f35377f9906f6a7db604c6643dc9d2f3e9261b 100755 (executable)
@@ -46,12 +46,11 @@ STLPlugin_IECallBack::~STLPlugin_IECallBack()
  */
 //=============================================================================
 bool 
-STLPlugin_IECallBack::Export( int                            theDocId,
-                             const Handle(GEOM_Object)      theOriginal,
-                             const TCollection_AsciiString& theFileName,
-                             const TCollection_AsciiString& theFormatName )
+STLPlugin_IECallBack::Export( const Handle(GEOM_Object)      theOriginal,
+                              const TCollection_AsciiString& theFileName,
+                              const TCollection_AsciiString& theFormatName )
 {
-  STLPlugin_IOperations* aPluginOperations = STLPlugin_OperationsCreator::get( GetEngine(), theDocId );
+  STLPlugin_IOperations* aPluginOperations = STLPlugin_OperationsCreator::get( GetEngine() );
   bool anIsASCII = ( theFormatName == "STL_Bin") ? false : true;
   const double aDeflection = 0.001;
   const bool anIsRelative = true;
@@ -65,11 +64,10 @@ STLPlugin_IECallBack::Export( int                            theDocId,
  */
 //=============================================================================
 Handle(TColStd_HSequenceOfTransient)
-STLPlugin_IECallBack::Import( int                            theDocId,
-                             const TCollection_AsciiString& theFormatName,
-                             const TCollection_AsciiString& theFileName )
+STLPlugin_IECallBack::Import( const TCollection_AsciiString& theFormatName,
+                              const TCollection_AsciiString& theFileName )
 {
-  STLPlugin_IOperations* aPluginOperations = STLPlugin_OperationsCreator::get( GetEngine(), theDocId );
+  STLPlugin_IOperations* aPluginOperations = STLPlugin_OperationsCreator::get( GetEngine() );
   return aPluginOperations->ImportSTL( theFileName );
 }
 
index fb897940313e234df69f0cfc8355191af030762d..a2bf421c9c53fc6f73619d60932cfb87cb779743 100644 (file)
@@ -36,15 +36,13 @@ public:
   STLPlugin_IECallBack();
   ~STLPlugin_IECallBack();
   
-  virtual bool Export( int                            theDocId,
-                      const Handle(GEOM_Object)      theOriginal,
-                      const TCollection_AsciiString& theFileName,
-                      const TCollection_AsciiString& theFormatName );
+  virtual bool Export( const Handle(GEOM_Object)      theOriginal,
+                       const TCollection_AsciiString& theFileName,
+                       const TCollection_AsciiString& theFormatName );
 
   virtual
-  Handle(TColStd_HSequenceOfTransient) Import( int                            theDocId,
-                                              const TCollection_AsciiString& theFormatName,
-                                              const TCollection_AsciiString& theFileName );
+  Handle(TColStd_HSequenceOfTransient) Import( const TCollection_AsciiString& theFormatName,
+                                               const TCollection_AsciiString& theFileName );
 };
 
 #endif
index 20337539d20dc1339a7c756ac030e2bb4dbd8554..1c7c8202efd53cf294b30b36cc78048ba0731125 100644 (file)
@@ -38,8 +38,8 @@
  *  Constructor
  */
 //=============================================================================
-STLPlugin_IOperations::STLPlugin_IOperations( GEOM_Engine* theEngine, int theDocID )
-: GEOMImpl_IBaseIEOperations( theEngine, theDocID )
+STLPlugin_IOperations::STLPlugin_IOperations( GEOM_Engine* theEngine )
+: GEOMImpl_IBaseIEOperations( theEngine )
 {
   MESSAGE( "STLPlugin_IOperations::STLPlugin_IOperations" );
 }
@@ -80,7 +80,7 @@ void STLPlugin_IOperations::ExportSTL( const Handle(GEOM_Object)      theOrigina
   if( aRefFunction.IsNull() ) return;  //There is no function which creates an object to be exported
 
   //Add a new result object
-  Handle(GEOM_Object) result = GetEngine()->AddObject( GetDocID(), GEOM_IMPORT);
+  Handle(GEOM_Object) result = GetEngine()->AddObject( GEOM_IMPORT);
 
   //Add an Export function
   Handle(GEOM_Function) aFunction = result->AddFunction( STLPlugin_ExportDriver::GetID(), EXPORT_SHAPE );
@@ -133,7 +133,7 @@ STLPlugin_IOperations::ImportSTL( const TCollection_AsciiString& theFileName )
   if( theFileName.IsEmpty() ) return NULL;
 
   //Add a new result object
-  Handle(GEOM_Object) anImported = GetEngine()->AddObject( GetDocID(), GEOM_IMPORT );
+  Handle(GEOM_Object) anImported = GetEngine()->AddObject( GEOM_IMPORT );
 
   //Add an Import function
   Handle(GEOM_Function) aFunction =
index 776cc4aba4a2d09ee8b1e482852a75a29610c3c2..2ecca4b5ded2626fd4e9800cf9a71847052978b5 100644 (file)
@@ -30,7 +30,7 @@
 class STLPLUGINENGINE_EXPORT STLPlugin_IOperations: public GEOMImpl_IBaseIEOperations
 {
 public:
-  STLPlugin_IOperations( GEOM_Engine*, int );
+  STLPlugin_IOperations( GEOM_Engine* );
   ~STLPlugin_IOperations();
 
   void ExportSTL( const Handle(GEOM_Object),
index fcfa4abf5b3884896487ab751cb080355599a05d..401dbff865af69498bd2946b3481ec8593783953 100644 (file)
@@ -32,7 +32,7 @@
 // OCCT includes
 #include <TFunction_DriverTable.hxx>
 
-std::map <int, STLPlugin_IOperations*> STLPlugin_OperationsCreator::_mapOfOperations;
+STLPlugin_IOperations* STLPlugin_OperationsCreator::_operation;
 
 STLPlugin_OperationsCreator::STLPlugin_OperationsCreator()
 {
@@ -53,19 +53,17 @@ STLPlugin_OperationsCreator::~STLPlugin_OperationsCreator()
 }
 
 GEOM_IOperations_i* STLPlugin_OperationsCreator::Create( PortableServer::POA_ptr thePOA,
-                                                         int                     theStudyId,
                                                          GEOM::GEOM_Gen_ptr      theEngine,
                                                          ::GEOMImpl_Gen*         theGenImpl )
 {
   Unexpect aCatch( SALOME_SalomeException );
   MESSAGE( "STLPlugin_OperationsCreator::Create" );
-  return new STLPlugin_IOperations_i( thePOA, theEngine, get( theGenImpl, theStudyId ) );
+  return new STLPlugin_IOperations_i( thePOA, theEngine, get( theGenImpl ) );
 }
 
-STLPlugin_IOperations* STLPlugin_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl,
-                                                        int             theStudyId )
+STLPlugin_IOperations* STLPlugin_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl )
 {
-  if (_mapOfOperations.find( theStudyId ) == _mapOfOperations.end() )
-    _mapOfOperations[theStudyId] = new STLPlugin_IOperations( theGenImpl, theStudyId );
-  return _mapOfOperations[theStudyId];
+  if( !_operation )
+    _operation = new STLPlugin_IOperations( theGenImpl );
+  return _operation;
 }
index 6feff34ea8eeb0b38de42044bba6c6a8219b9fe3..1c2177c2ed1bff5c4a77a713711323f5c012095c 100755 (executable)
@@ -41,15 +41,14 @@ public:
   ~STLPlugin_OperationsCreator();
 
   GEOM_IOperations_i* Create( PortableServer::POA_ptr thePOA,
-                             int                     theStudyId,
-                             GEOM::GEOM_Gen_ptr      theEngine,
-                             ::GEOMImpl_Gen*         theGenImpl );
+                              GEOM::GEOM_Gen_ptr      theEngine,
+                              ::GEOMImpl_Gen*         theGenImpl );
+
 private:
-  static STLPlugin_IOperations* get( ::GEOMImpl_Gen*         theGenImpl,
-                                    int                     theStudyId );
+  static STLPlugin_IOperations* get(::GEOMImpl_Gen* theGenImpl);
 
 private:
-  static std::map <int, STLPlugin_IOperations*>  _mapOfOperations;
+  static STLPlugin_IOperations* _operation;
 
   friend class STLPlugin_IECallBack;
 };
index 07baf9ce18921b8b22b976f390466e90d22003ba..f1aa482e228c33d610dd8733e72c5b6b1363f936 100644 (file)
 
 import salome_pluginsmanager
 
-def t_shape_fluid(context):
-    activeStudy = context.study
+def t_shape_fluid():
 
     #from salome.geom.t_shape import t_shape_builder
     from salome.geom.t_shape import t_shape_dialog
     dialog = t_shape_dialog.getDialog()
-    dialog.setContext(context)
     dialog.show()
 
 salome_pluginsmanager.AddFunction('T shape fluid',
index 1f3af53aae0d4f58fe12fb3e6c7c9f7013720540..c1830cf30c336977dc5e90bc4c8fb8d3f576d46c 100644 (file)
@@ -29,21 +29,19 @@ import time
 
 geompy = None
 
-def demidisk(study, r1, a1, roty=0, solid_thickness=0):
+def demidisk(r1, a1, roty=0, solid_thickness=0):
   if solid_thickness < 1e-7:
     with_solid = False
   else:
     with_solid = True
-
-  #geompy = geomBuilder.New(study)
   
   O = geompy.MakeVertex(0, 0, 0)
   OX = geompy.MakeVectorDXDYDZ(1, 0, 0) 
   OY = geompy.MakeVectorDXDYDZ(0, 1, 0)
   OZ = geompy.MakeVectorDXDYDZ(0, 0, 1)
   
-  v=range(8)
-  l=range(8)
+  v=list(range(8))
+  l=list(range(8))
   v0 = geompy.MakeVertex(0, 0, 0)
   v[0] = geompy.MakeVertex(0, r1/2.0, 0)
   v[1] = geompy.MakeVertex(0, r1, 0)
@@ -101,10 +99,9 @@ def demidisk(study, r1, a1, roty=0, solid_thickness=0):
   else:
     return v, l, arc1, part1
 
-def pointsProjetes(study, vref, face):
-  #geompy = geomBuilder.New(study)
+def pointsProjetes(vref, face):
   vface = geompy.ExtractShapes(face, geompy.ShapeType["VERTEX"], True)
-  vord = range(len(vref))
+  vord = list(range(len(vref)))
   plan = geompy.MakePlaneThreePnt(vref[0], vref[1], vref[-1], 10000)
   vproj = [ geompy.MakeProjection(vert, plan) for vert in vface ]
   for i,v in enumerate(vproj):
@@ -114,10 +111,9 @@ def pointsProjetes(study, vref, face):
       vord[dist[0][1]] = vface[i]
   return vord
 
-def arcsProjetes(study, vf, face):
-  #geompy = geomBuilder.New(study)
+def arcsProjetes(vf, face):
   lface = geompy.ExtractShapes(face, geompy.ShapeType["EDGE"], True)
-  lord = range(3)
+  lord = list(range(3))
   ends = [vf[1], vf[6], vf[7], vf[3]]
   for i in range(3):
     for lf in lface:
@@ -130,12 +126,12 @@ def arcsProjetes(study, vf, face):
     pass
   return lord
  
-def build_shape(study, r1, r2, h1, h2, solid_thickness=0, progressBar=None ):
+def build_shape(r1, r2, h1, h2, solid_thickness=0, progressBar=None ):
   """ Builds the final shape """
 
   if progressBar is not None:
     time0 = time.time()
-    print time.time() -time0
+    print(time.time() -time0)
     
   if solid_thickness < 1e-7:
     with_solid = False
@@ -143,7 +139,7 @@ def build_shape(study, r1, r2, h1, h2, solid_thickness=0, progressBar=None ):
     with_solid = True
   
   global geompy
-  geompy = geomBuilder.New(study)
+  geompy = geomBuilder.New()
   
   O = geompy.MakeVertex(0, 0, 0)
   OX = geompy.MakeVectorDXDYDZ(1, 0, 0) 
@@ -157,17 +153,17 @@ def build_shape(study, r1, r2, h1, h2, solid_thickness=0, progressBar=None ):
     a1 = 45.0*(1.0 -ratio)/seuilmax
 
   # --- Creation of the jonction faces
-  [faci, sect45, arc1, l1, lord90, lord45, edges, arcextru] = jonction(study, r1, r2,\
+  [faci, sect45, arc1, l1, lord90, lord45, edges, arcextru] = jonction(r1, r2,\
                                                                        h1, h2, a1)
   if progressBar is not None:
     progressBar.addSteps(2)
-    print time.time() -time0
+    print(time.time() -time0)
     
   if with_solid:
     # The same code is executed again with different external radiuses in order
     # to get the needed faces and edges to build the solid layer of the pipe
     [faci_ext, sect45_ext, arc1_ext, l1_ext, \
-     lord90_ext, lord45_ext, edges_ext, arcextru_ext] = jonction(study, r1 + solid_thickness, r2 + solid_thickness,\
+     lord90_ext, lord45_ext, edges_ext, arcextru_ext] = jonction(r1 + solid_thickness, r2 + solid_thickness,\
                                                                  h1, h2, a1)
     faces_jonction_ext = []
     for i,l in enumerate(lord90):
@@ -179,7 +175,7 @@ def build_shape(study, r1, r2, h1, h2, solid_thickness=0, progressBar=None ):
    
   if progressBar is not None:
     progressBar.addSteps(4)
-    print time.time() -time0
+    print(time.time() -time0)
     
   # --- extrusion droite des faces de jonction, pour reconstituer les demi cylindres
   if with_solid:    
@@ -188,7 +184,7 @@ def build_shape(study, r1, r2, h1, h2, solid_thickness=0, progressBar=None ):
     
   if progressBar is not None:
     progressBar.addSteps(1)
-    print time.time() -time0
+    print(time.time() -time0)
     
   extru1 = geompy.MakePrismVecH(sect45, OX, h1+10)
 
@@ -200,7 +196,7 @@ def build_shape(study, r1, r2, h1, h2, solid_thickness=0, progressBar=None ):
 
   if progressBar is not None:
     progressBar.addSteps(1)
-    print time.time() -time0
+    print(time.time() -time0)
     
   # --- partition et coupe
 
@@ -212,7 +208,7 @@ def build_shape(study, r1, r2, h1, h2, solid_thickness=0, progressBar=None ):
 
   if progressBar is not None:
     progressBar.addSteps(1)
-    print time.time() -time0
+    print(time.time() -time0)
     
   box = geompy.MakeBox(0, -2*(r1+h1), -2*(r1+h1), 2*(r1+h1), 2*(r1+h1), 2*(r1+h1))
   rot = geompy.MakeRotation(box, OY, 45*math.pi/180.0)
@@ -222,7 +218,7 @@ def build_shape(study, r1, r2, h1, h2, solid_thickness=0, progressBar=None ):
   
   if progressBar is not None:
     progressBar.addSteps(9)
-    print time.time() -time0
+    print(time.time() -time0)
 
   faces_coupe = faci[:5]
   if with_solid:
@@ -233,7 +229,7 @@ def build_shape(study, r1, r2, h1, h2, solid_thickness=0, progressBar=None ):
 
   if progressBar is not None:
     progressBar.addSteps(3)
-    print time.time() -time0
+    print(time.time() -time0)
 
   box = geompy.MakeBox(-1, -(r1+r2+2*solid_thickness), -1, h1, r1+r2+2*solid_thickness, h2)
   
@@ -242,11 +238,11 @@ def build_shape(study, r1, r2, h1, h2, solid_thickness=0, progressBar=None ):
   
   if progressBar is not None:
     progressBar.addSteps(5)
-    print time.time() -time0
+    print(time.time() -time0)
     
   # --- Partie inférieure
   
-  v3, l3, arc3, part3 = demidisk(study, r1, a1, 180.0, solid_thickness)
+  v3, l3, arc3, part3 = demidisk(r1, a1, 180.0, solid_thickness)
   extru3 = geompy.MakePrismVecH(part3, OX, h1)
 
   # --- Symétrie
@@ -259,16 +255,15 @@ def build_shape(study, r1, r2, h1, h2, solid_thickness=0, progressBar=None ):
 
   if progressBar is not None:
     progressBar.addSteps(1)
-    print time.time() -time0
+    print(time.time() -time0)
       
   return final
 
 
-def jonction(study, r1, r2, h1, h2, a1):
+def jonction(r1, r2, h1, h2, a1):
   """ Builds the jonction faces and
   returns what is needed to build the whole pipe
   """
-  #geompy = geomBuilder.New(study)
   
   O = geompy.MakeVertex(0, 0, 0)
   OX = geompy.MakeVectorDXDYDZ(1, 0, 0) 
@@ -276,8 +271,8 @@ def jonction(study, r1, r2, h1, h2, a1):
   OZ = geompy.MakeVectorDXDYDZ(0, 0, 1)
   
   # --- sections droites des deux demi cylindres avec le partionnement
-  v1, l1, arc1, part1 = demidisk(study, r1, a1, 0.)
-  v2, l2, arc2, part2 = demidisk(study, r2, a1, 90.0)
+  v1, l1, arc1, part1 = demidisk(r1, a1, 0.)
+  v2, l2, arc2, part2 = demidisk(r2, a1, 90.0)
  
   # --- extrusion des sections --> demi cylindres de travail, pour en extraire les sections utilisées au niveau du Té
   #     et enveloppe cylindrique du cylindre principal
@@ -299,13 +294,13 @@ def jonction(study, r1, r2, h1, h2, a1):
 
   # --- liste ordonnée des points projetés sur les deux sections
 
-  vord45 = pointsProjetes(study, v1, sect45)
-  vord90 = pointsProjetes(study, v2, sect90)
+  vord45 = pointsProjetes(v1, sect45)
+  vord90 = pointsProjetes(v2, sect90)
 
   # --- identification des projections des trois arcs de cercle, sur les deux sections.
   
-  lord45 = arcsProjetes(study, vord45, sect45)
-  lord90 = arcsProjetes(study, vord90, sect90)
+  lord45 = arcsProjetes(vord45, sect45)
+  lord90 = arcsProjetes(vord90, sect90)
  
   # --- abaissement des quatre points centraux de la section du cylindre secondaire
   
@@ -390,19 +385,18 @@ def jonction(study, r1, r2, h1, h2, a1):
 def test_t_shape_builder():
   """For testing purpose"""
   salome.salome_init()
-  theStudy = salome.myStudy
-  geompy = geomBuilder.New(theStudy)
+  geompy = geomBuilder.New()
   for r1 in [1., 100.]:
     for r2 in [0.9*r1, 0.5*r1, 0.1*r1, 0.05*r1]:
       for thickness in [r1/100., r1/10., r1/2.]:
-        print r1, r2, thickness
+        print(r1, r2, thickness)
         h1 = r1 * 2.0
         h2 = h1
         try:
-          res = build_shape(theStudy, r1, r2, h1, h2, thickness)
+          res = build_shape(r1, r2, h1, h2, thickness)
           geompy.addToStudy(res, "res_%f_%f_%f"%(r1,r2, thickness))
         except:
-          print "problem with res_%f_%f_%f"%(r1,r2, thickness)
+          print("problem with res_%f_%f_%f"%(r1,r2, thickness))
   
 if __name__=="__main__":
   """For testing purpose"""
index 1f458e1940b3a76b2db2dc7bcb2246c7a3fa3958..ace9e84da7cadf50e80f70024e3f6b72abd94d1b 100644 (file)
@@ -22,7 +22,7 @@
 import sys
 from qtsalome import *
 
-from t_shape_dialog_ui import Ui_Dialog
+from salome.geom.t_shape.t_shape_dialog_ui import Ui_Dialog
 
 
 class TShapeDialog(Ui_Dialog,QWidget):
@@ -39,9 +39,6 @@ class TShapeDialog(Ui_Dialog,QWidget):
       self.dsb_smallRadius.setValue(40.0)
       self.dsb_bigHeight.setValue(80.0)
       self.dsb_smallHeight.setValue(80.0)
-   
-    def setContext(self, context):
-      self._activeStudy = context.study
       
     def accept(self):
       from salome.geom.t_shape import t_shape_progress
@@ -50,10 +47,10 @@ class TShapeDialog(Ui_Dialog,QWidget):
       self.close()
       r1, r2, h1, h2, thickness = self.getData()
       #QMessageBox.about(None, "Building in progress", "building shape, please be patient")
-      #shape = t_shape_builder.build_shape(activeStudy, r1, r2, h1, h2, thickness)
+      #shape = t_shape_builder.build_shape(r1, r2, h1, h2, thickness)
       shapeBuilder = t_shape_progress.t_shape_progress()
-      shape = shapeBuilder.run(self._activeStudy, r1, r2, h1, h2, thickness)
-      entry = xalome.addToStudy(self._activeStudy, shape, "T_shape_fluid" )
+      shape = shapeBuilder.run(r1, r2, h1, h2, thickness)
+      entry = xalome.addToStudy(shape, "T_shape_fluid" )
       xalome.displayShape(entry)
 
     def getData(self):
index da396900d63d2a87a853d52aa2bf373f736d44ea..c843003ef33d748c8e4fca478fae3d66fc6766d5 100644 (file)
@@ -30,8 +30,8 @@ class t_shape_progress(QProgressDialog):
       QProgressDialog.__init__(self, "t_shape fluid build", "stop", 0, self._nmaxSteps, parent, Qt.Tool)
       self.show()
         
-    def run(self, activeStudy, r1, r2, h1, h2, thickness):
-      shape = t_shape_builder.build_shape(activeStudy, r1, r2, h1, h2, thickness, self)
+    def run(self, r1, r2, h1, h2, thickness):
+      shape = t_shape_builder.build_shape(r1, r2, h1, h2, thickness, self)
       self.setValue(self._nmaxSteps)
       return shape
       
index 1cb0bc892f92e83b440b078b68fd82991231f7b0..f1605786ea1fd40d57a872948f0cd896e574ac96 100644 (file)
@@ -114,13 +114,11 @@ bool TransformationGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent )
     break;
   case GEOMOp::OpReimport:       // RELOAD IMPORTED SHAPE
     {
-      SalomeApp_Study* anAppStudy = dynamic_cast<SalomeApp_Study*>(app->activeStudy());
-
       GEOM::GEOM_ITransformOperations_var anOp =
-        GeometryGUI::GetGeomGen()->GetITransformOperations(anAppStudy->id());
+        GeometryGUI::GetGeomGen()->GetITransformOperations();
       if (anOp->_is_nil()) return false;
 
-      GEOM_Displayer aDisp (anAppStudy);
+      GEOM_Displayer aDisp;
       SUIT_Desktop* desk = app->desktop();
       QList<SUIT_ViewWindow*> wnds = desk->windows();
 
index 8af7fda97f524c978d35cdfa723496bb04952b5b..6a45393affa628df828d1669fc23cbedfed03c73 100644 (file)
@@ -358,7 +358,7 @@ void TransformationGUI_ExtensionDlg::ValueChangedInSpinBox(double newValue)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr TransformationGUI_ExtensionDlg::createOperation()
 {
-  return getGeomEngine()->GetIShapesOperations(getStudyId());
+  return getGeomEngine()->GetIShapesOperations();
 }
 
 //=================================================================================
index 53027e0b5e19df143cbce3b9abc3cff4c899f39f..8cd153433bc456f41627e7255efb2165e6324aa4 100644 (file)
@@ -322,7 +322,7 @@ void TransformationGUI_MirrorDlg::enterEvent (QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr  TransformationGUI_MirrorDlg::createOperation()
 {
-  return getGeomEngine()->GetITransformOperations(getStudyId());
+  return getGeomEngine()->GetITransformOperations();
 }
 
 //=================================================================================
@@ -414,12 +414,11 @@ bool  TransformationGUI_MirrorDlg::execute (ObjectList& objects)
 // function : restoreSubShapes
 // purpose  :
 //=================================================================================
-void TransformationGUI_MirrorDlg::restoreSubShapes (SALOMEDS::Study_ptr   theStudy,
-                                                    SALOMEDS::SObject_ptr theSObject)
+void TransformationGUI_MirrorDlg::restoreSubShapes (SALOMEDS::SObject_ptr theSObject)
 {
   if (mainFrame()->CheckBoxRestoreSS->isChecked()) {
     // empty list of arguments means that all arguments should be restored
-    getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, GEOM::ListOfGO(),
+    getGeomEngine()->RestoreSubShapesSO(theSObject, GEOM::ListOfGO(),
                                         /*theFindMethod=*/GEOM::FSM_Transformed,
                                         /*theInheritFirstArg=*/true,
                                         mainFrame()->CheckBoxAddPrefix->isChecked());
index eb9cb4405a600b466e1a249ba1726f623d39c445..8147b3e852ac0abf98953d23faae6aa0d9e658e9 100644 (file)
@@ -51,7 +51,7 @@ protected:
   virtual bool                       isValid( QString& );
   virtual bool                       execute( ObjectList& );
   virtual void                       addSubshapesToStudy();
-  virtual void                       restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr );
+  virtual void                       restoreSubShapes( SALOMEDS::SObject_ptr );
   virtual QList<GEOM::GeomObjPtr>    getSourceObjects();
 
 private:
index 0523977403687c405d485407598a87943f3fbf08..ecf1f3cd13113f693ab6aa0e0d43d6ee2c661563 100644 (file)
@@ -268,7 +268,7 @@ void TransformationGUI_MultiRotationDlg::SelectionIntoArgument()
       myBase = aSelectedObject;
 
       // recompute myAng and myStep (Mantis issue 0021718)
-      GEOM::GEOM_IMeasureOperations_var anOper = getGeomEngine()->GetIMeasureOperations(getStudyId());
+      GEOM::GEOM_IMeasureOperations_var anOper = getGeomEngine()->GetIMeasureOperations();
       double Xmin, Xmax, Ymin, Ymax, Zmin, Zmax;
       anOper->GetBoundingBox(myBase.get(), true, Xmin, Xmax, Ymin, Ymax, Zmin, Zmax);
       if (anOper->IsDone()) {
@@ -449,7 +449,7 @@ void TransformationGUI_MultiRotationDlg::CheckAngleStep (bool isOn)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr TransformationGUI_MultiRotationDlg::createOperation()
 {
-  return getGeomEngine()->GetITransformOperations(getStudyId());
+  return getGeomEngine()->GetITransformOperations();
 }
 
 //=================================================================================
@@ -565,8 +565,7 @@ QList<GEOM::GeomObjPtr> TransformationGUI_MultiRotationDlg::getSourceObjects()
 // function : restoreSubShapes
 // purpose  :
 //=================================================================================
-void TransformationGUI_MultiRotationDlg::restoreSubShapes (SALOMEDS::Study_ptr   theStudy,
-                                                           SALOMEDS::SObject_ptr theSObject)
+void TransformationGUI_MultiRotationDlg::restoreSubShapes (SALOMEDS::SObject_ptr theSObject)
 {
   if (mainFrame()->CheckBoxRestoreSS->isChecked()) {
     // we pass here the first operation argument (object) through the list of arguments
@@ -575,7 +574,7 @@ void TransformationGUI_MultiRotationDlg::restoreSubShapes (SALOMEDS::Study_ptr
     GEOM::ListOfGO_var anArgs = new GEOM::ListOfGO;
     anArgs->length(1);
     anArgs[0] = myBase.copy();
-    getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, anArgs,
+    getGeomEngine()->RestoreSubShapesSO(theSObject, anArgs,
                                         /*theFindMethod=*/GEOM::FSM_MultiTransformed,
                                         /*theInheritFirstArg=*/true,
                                         mainFrame()->CheckBoxAddPrefix->isChecked());
index 9e9a9ea68bfe346e3e4b1765ff13d86863b1f696..bb0b0e1565aa0671e3e4ec0816c75e6831df572a 100644 (file)
@@ -97,7 +97,7 @@ protected:
   virtual bool                       isValid( QString& );
   virtual bool                       execute( ObjectList& );
   virtual void                       addSubshapesToStudy();
-  virtual void                       restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr );
+  virtual void                       restoreSubShapes( SALOMEDS::SObject_ptr );
   virtual QList<GEOM::GeomObjPtr>    getSourceObjects();
 
 private:
index c909cb3e45437d6b6cad2df1127716c2013da6b5..c867be1d73e8a073ac6a64940d2f7c9c6b6563ec 100644 (file)
@@ -348,7 +348,7 @@ void TransformationGUI_MultiTranslationDlg::SelectionIntoArgument()
       myBase = aSelectedObject;
 
       // recompute myStepU (Mantis issue 0021718)
-      GEOM::GEOM_IMeasureOperations_var anOper = getGeomEngine()->GetIMeasureOperations(getStudyId());
+      GEOM::GEOM_IMeasureOperations_var anOper = getGeomEngine()->GetIMeasureOperations();
       double Xmin, Xmax, Ymin, Ymax, Zmin, Zmax;
       anOper->GetBoundingBox(myBase.get(), true, Xmin, Xmax, Ymin, Ymax, Zmin, Zmax);
       if (anOper->IsDone()) {
@@ -615,7 +615,7 @@ void TransformationGUI_MultiTranslationDlg::ReverseStepV()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr TransformationGUI_MultiTranslationDlg::createOperation()
 {
-  return getGeomEngine()->GetITransformOperations(getStudyId());
+  return getGeomEngine()->GetITransformOperations();
 }
 
 //=================================================================================
@@ -728,8 +728,7 @@ QList<GEOM::GeomObjPtr> TransformationGUI_MultiTranslationDlg::getSourceObjects(
 // function : restoreSubShapes
 // purpose  :
 //=================================================================================
-void TransformationGUI_MultiTranslationDlg::restoreSubShapes (SALOMEDS::Study_ptr   theStudy,
-                                                              SALOMEDS::SObject_ptr theSObject)
+void TransformationGUI_MultiTranslationDlg::restoreSubShapes (SALOMEDS::SObject_ptr theSObject)
 {
   if (mainFrame()->CheckBoxRestoreSS->isChecked()) {
     // we pass here the first operation argument (object) through the list of arguments
@@ -738,7 +737,7 @@ void TransformationGUI_MultiTranslationDlg::restoreSubShapes (SALOMEDS::Study_pt
     GEOM::ListOfGO_var anArgs = new GEOM::ListOfGO;
     anArgs->length(1);
     anArgs[0] = myBase.copy();
-    getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, anArgs,
+    getGeomEngine()->RestoreSubShapesSO(theSObject, anArgs,
                                         /*theFindMethod=*/GEOM::FSM_MultiTransformed,
                                         /*theInheritFirstArg=*/true,
                                         mainFrame()->CheckBoxAddPrefix->isChecked());
index 43f618c936e381ee92102e26be2a0583c153d626..94c95f7b2e432213bc29285161810f8821957bfc 100644 (file)
@@ -52,7 +52,7 @@ protected:
   virtual bool                       isValid( QString& );
   virtual bool                       execute( ObjectList& );
   virtual void                       addSubshapesToStudy();
-  virtual void                       restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr );
+  virtual void                       restoreSubShapes( SALOMEDS::SObject_ptr );
   virtual QList<GEOM::GeomObjPtr>    getSourceObjects();
 
 private:
index 9409cfc4f61ee16d8fa2a86926d5b1680439fe8f..64d262057335d2e5d3297e929a3698fbbe3d9869 100644 (file)
@@ -234,7 +234,7 @@ void TransformationGUI_OffsetDlg::ValueChangedInSpinBox()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr TransformationGUI_OffsetDlg::createOperation()
 {
-  return getGeomEngine()->GetITransformOperations( getStudyId() );
+  return getGeomEngine()->GetITransformOperations();
 }
 
 //=================================================================================
@@ -293,12 +293,11 @@ bool TransformationGUI_OffsetDlg::execute( ObjectList& objects )
 // function : restoreSubShapes
 // purpose  :
 //=================================================================================
-void TransformationGUI_OffsetDlg::restoreSubShapes( SALOMEDS::Study_ptr   theStudy,
-                                                    SALOMEDS::SObject_ptr theSObject )
+void TransformationGUI_OffsetDlg::restoreSubShapes( SALOMEDS::SObject_ptr theSObject )
 {
   if ( mainFrame()->CheckBoxRestoreSS->isChecked() ) {
     // empty list of arguments means that all arguments should be restored
-    getGeomEngine()->RestoreSubShapesSO( theStudy, theSObject, GEOM::ListOfGO(),
+    getGeomEngine()->RestoreSubShapesSO( theSObject, GEOM::ListOfGO(),
                                          /*theFindMethod=*/GEOM::FSM_Transformed,
                                          /*theInheritFirstArg=*/true,
                                          mainFrame()->CheckBoxAddPrefix->isChecked() );
index 54295bf2914abc7fa235cd1ceecbeb9651dedae6..2bcdd67fa85414371dbe8ad90681da5e063fff5c 100644 (file)
@@ -50,7 +50,7 @@ protected:
   virtual GEOM::GEOM_IOperations_ptr createOperation();
   virtual bool                       isValid( QString& );
   virtual bool                       execute( ObjectList& );
-  virtual void                       restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr );
+  virtual void                       restoreSubShapes( SALOMEDS::SObject_ptr );
   virtual QList<GEOM::GeomObjPtr>    getSourceObjects();
   
 private:
index 44c163c6218553d53521d3518fb05c21ec0e787f..878c33dfcf122a5320f43db3eb65d0ae42c3a03d 100644 (file)
@@ -493,7 +493,7 @@ void TransformationGUI_PositionDlg::enterEvent (QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr TransformationGUI_PositionDlg::createOperation()
 {
-  return getGeomEngine()->GetITransformOperations(getStudyId());
+  return getGeomEngine()->GetITransformOperations();
 }
 
 //=================================================================================
@@ -578,12 +578,11 @@ bool TransformationGUI_PositionDlg::execute (ObjectList& objects)
 // function : restoreSubShapes
 // purpose  :
 //=================================================================================
-void TransformationGUI_PositionDlg::restoreSubShapes (SALOMEDS::Study_ptr   theStudy,
-                                                      SALOMEDS::SObject_ptr theSObject)
+void TransformationGUI_PositionDlg::restoreSubShapes (SALOMEDS::SObject_ptr theSObject)
 {
   if (mainFrame()->CheckBoxRestoreSS->isChecked()) {
     // empty list of arguments means that all arguments should be restored
-    getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, GEOM::ListOfGO(),
+    getGeomEngine()->RestoreSubShapesSO(theSObject, GEOM::ListOfGO(),
                                         /*theFindMethod=*/GEOM::FSM_Transformed,
                                         /*theInheritFirstArg=*/true,
                                         mainFrame()->CheckBoxAddPrefix->isChecked());
index 9457ab4a1c20b6015b4a274c93741063bda119be..11257fdde59e24a0146cbdf0258e9442016eeee1 100644 (file)
@@ -50,7 +50,7 @@ protected:
   virtual GEOM::GEOM_IOperations_ptr createOperation();
   virtual bool                       isValid( QString& );
   virtual bool                       execute( ObjectList& );
-  virtual void                       restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr );
+  virtual void                       restoreSubShapes( SALOMEDS::SObject_ptr );
   virtual void                       addSubshapesToStudy();
   virtual QList<GEOM::GeomObjPtr>    getSourceObjects();
 
index b82389f0c0d11d7058aa7e75c75594b7b4b99276..e3ad415ec7575e97eea6bb8f471a0032e19a8ce2 100644 (file)
@@ -303,7 +303,7 @@ void TransformationGUI_ProjectionDlg::enterEvent (QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr TransformationGUI_ProjectionDlg::createOperation()
 {
-  return getGeomEngine()->GetITransformOperations(getStudyId());
+  return getGeomEngine()->GetITransformOperations();
 }
 
 //=================================================================================
index 3bed7d523caeb5901f535e0aa5951e4e9392d515..b6767b3502e7ea5173b2470db16f93df76d0ee91 100644 (file)
@@ -316,7 +316,7 @@ void TransformationGUI_ProjectionOnCylDlg::enterEvent (QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr TransformationGUI_ProjectionOnCylDlg::createOperation()
 {
-  return getGeomEngine()->GetITransformOperations(getStudyId());
+  return getGeomEngine()->GetITransformOperations();
 }
 
 //=================================================================================
index 2b75947d4002128d3168c7d5f8e24af942ef159b..d7cf7b6b27901e09918043156d788fd38027504a 100644 (file)
@@ -450,7 +450,7 @@ void TransformationGUI_RotationDlg::ValueChangedInSpinBox()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr TransformationGUI_RotationDlg::createOperation()
 {
-  return getGeomEngine()->GetITransformOperations(getStudyId());
+  return getGeomEngine()->GetITransformOperations();
 }
 
 //=================================================================================
@@ -549,8 +549,7 @@ bool TransformationGUI_RotationDlg::execute (ObjectList& objects)
 // function : restoreSubShapes
 // purpose  :
 //=================================================================================
-void TransformationGUI_RotationDlg::restoreSubShapes (SALOMEDS::Study_ptr   theStudy,
-                                                      SALOMEDS::SObject_ptr theSObject)
+void TransformationGUI_RotationDlg::restoreSubShapes (SALOMEDS::SObject_ptr theSObject)
 {
   if (mainFrame()->CheckBoxRestoreSS->isChecked()) {
     // we pass here the first operation argument (object) through the list of arguments
@@ -559,7 +558,7 @@ void TransformationGUI_RotationDlg::restoreSubShapes (SALOMEDS::Study_ptr   theS
     GEOM::ListOfGO_var anArgs = new GEOM::ListOfGO;
     anArgs->length(1);
     anArgs[0] = myCurrObject.copy();
-    getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, anArgs,
+    getGeomEngine()->RestoreSubShapesSO(theSObject, anArgs,
                                         /*theFindMethod=*/GEOM::FSM_Transformed,
                                         /*theInheritFirstArg=*/true,
                                         mainFrame()->CheckBoxAddPrefix->isChecked());
index d5b1c4d17c1725b8cff315708ce8cbec8d80b326..c30cb9347b9e8717528c3a54123748b928723497 100644 (file)
@@ -51,7 +51,7 @@ protected:
   virtual bool                       isValid( QString& );
   virtual bool                       execute( ObjectList& );
   virtual void                       addSubshapesToStudy();
-  virtual void                       restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr );
+  virtual void                       restoreSubShapes( SALOMEDS::SObject_ptr );
   virtual QList<GEOM::GeomObjPtr>    getSourceObjects();
 
 private:
index bf1576bdb839d7c6da18d71d2db74f9060ace5b1..5a8930bd7b80ee9b23c652a99c59ef852b5d7521 100644 (file)
@@ -392,7 +392,7 @@ void TransformationGUI_ScaleDlg::SetDoubleSpinBoxStep(double step)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr TransformationGUI_ScaleDlg::createOperation()
 {
-  return getGeomEngine()->GetITransformOperations(getStudyId());
+  return getGeomEngine()->GetITransformOperations();
 }
 
 //=================================================================================
@@ -500,12 +500,11 @@ bool TransformationGUI_ScaleDlg::execute (ObjectList& objects)
 // function : restoreSubShapes
 // purpose  :
 //=================================================================================
-void TransformationGUI_ScaleDlg::restoreSubShapes (SALOMEDS::Study_ptr   theStudy,
-                                                   SALOMEDS::SObject_ptr theSObject)
+void TransformationGUI_ScaleDlg::restoreSubShapes (SALOMEDS::SObject_ptr theSObject)
 {
   if (mainFrame()->CheckBoxRestoreSS->isChecked()) {
     // empty list of arguments means that all arguments should be restored
-    getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, GEOM::ListOfGO(),
+    getGeomEngine()->RestoreSubShapesSO(theSObject, GEOM::ListOfGO(),
                                         /*theFindMethod=*/GEOM::FSM_Transformed,
                                         /*theInheritFirstArg=*/true,
                                         mainFrame()->CheckBoxAddPrefix->isChecked());
index 219950dd01e74c06bc9076fbaf32b7cec05de0d2..f1ca3567f7dfdde89d2c3ec1e8f0c7f9bfd252c7 100644 (file)
@@ -56,7 +56,7 @@ protected:
   virtual bool                       isValid( QString& );
   virtual bool                       execute( ObjectList& );
   virtual void                       addSubshapesToStudy();
-  virtual void                       restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr );
+  virtual void                       restoreSubShapes( SALOMEDS::SObject_ptr );
   virtual QList<GEOM::GeomObjPtr>    getSourceObjects();
 
 private:
index c1443ac732df163a4ed6bb56b7a65615b7935069..6057a591f3560b03e5ca4556978d0fcc34eea12f 100644 (file)
@@ -450,7 +450,7 @@ void TransformationGUI_TranslationDlg::ValueChangedInSpinBox()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr TransformationGUI_TranslationDlg::createOperation()
 {
-  return getGeomEngine()->GetITransformOperations(getStudyId());
+  return getGeomEngine()->GetITransformOperations();
 }
 
 //=================================================================================
@@ -604,8 +604,7 @@ bool TransformationGUI_TranslationDlg::execute (ObjectList& objects)
 // function : restoreSubShapes
 // purpose  :
 //=================================================================================
-void TransformationGUI_TranslationDlg::restoreSubShapes (SALOMEDS::Study_ptr   theStudy,
-                                                         SALOMEDS::SObject_ptr theSObject)
+void TransformationGUI_TranslationDlg::restoreSubShapes (SALOMEDS::SObject_ptr theSObject)
 {
   if (mainFrame()->CheckBoxRestoreSS->isChecked()) {
     // we pass here the first operation argument (object) through the list of arguments
@@ -614,7 +613,7 @@ void TransformationGUI_TranslationDlg::restoreSubShapes (SALOMEDS::Study_ptr   t
     GEOM::ListOfGO_var anArgs = new GEOM::ListOfGO;
     anArgs->length(1);
     anArgs[0] = myCurrObject.copy();
-    getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, anArgs,
+    getGeomEngine()->RestoreSubShapesSO(theSObject, anArgs,
                                         /*theFindMethod=*/GEOM::FSM_Transformed,
                                         /*theInheritFirstArg=*/true,
                                         mainFrame()->CheckBoxAddPrefix->isChecked());
index 8aab1b6fdf24f50aff9108f7da4ed030facb6d52..fd2eb99a2e3264e07df6e1518d1f48791dd1c8e6 100644 (file)
@@ -51,7 +51,7 @@ protected:
   virtual bool                       isValid( QString& );
   virtual bool                       execute( ObjectList& );
   virtual void                       addSubshapesToStudy();
-  virtual void                       restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr );
+  virtual void                       restoreSubShapes( SALOMEDS::SObject_ptr );
   virtual QList<GEOM::GeomObjPtr>    getSourceObjects();
 
 private:
index 332f62c0a6045eefa8b7309db3289f9e177148de..b595334c973cf7f54a72a7e1f5b5754122e230ef 100644 (file)
@@ -34,7 +34,6 @@
 #include "GeometryGUI.h"
 #include "GEOM_Operation.h"
 #include "GEOMBase.h"
-#include "GEOM_Displayer.h"
 #include "GEOM_GenericObjPtr.h"
 
 #include <SALOMEconfig.h>
@@ -100,11 +99,8 @@ bool VTKPlugin_GUI::exportVTK( SUIT_Desktop* parent )
 {
   SalomeApp_Application* app = getGeometryGUI()->getApp();
   if ( !app ) return false;
-  SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*> ( app->activeStudy() );
-  if ( !study ) return false;
 
-  SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
-  GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "VTKPluginEngine" );
+  GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( "VTKPluginEngine" );
   VTKOpPtr vtkOp = GEOM::IVTKOperations::_narrow( op );
   if ( vtkOp.isNull() ) return false;
 
index 12e6c7f769cc54913513b89741a9ee171b635540..389e6adb793fdf7fb21d20e70a90f5903f7df448 100755 (executable)
@@ -45,12 +45,11 @@ VTKPlugin_IECallBack::~VTKPlugin_IECallBack()
  *  Export
  */
 //=============================================================================
-bool VTKPlugin_IECallBack::Export( int                            theDocId,
-                                  const Handle(GEOM_Object)      theOriginal,
-                                  const TCollection_AsciiString& theFileName,
-                                  const TCollection_AsciiString& theFormatName )
+bool VTKPlugin_IECallBack::Export( const Handle(GEOM_Object)      theOriginal,
+                                   const TCollection_AsciiString& theFileName,
+                                   const TCollection_AsciiString& theFormatName )
 {
-  VTKPlugin_IOperations* aPluginOperations = VTKPlugin_OperationsCreator::get( GetEngine(), theDocId );
+  VTKPlugin_IOperations* aPluginOperations = VTKPlugin_OperationsCreator::get( GetEngine() );
   const double aDeflection = 0.001;
   aPluginOperations->ExportVTK( theOriginal, theFileName, aDeflection );
   return true;
index 71ba137e50e6522ab6ffe3e96aaef6885b2fc573..3140898e0648c3433e7298c13f7cf6a343c2c736 100644 (file)
@@ -36,10 +36,9 @@ public:
   VTKPlugin_IECallBack();
   ~VTKPlugin_IECallBack();
   
-  bool Export( int                            theDocId,
-              const Handle(GEOM_Object)      theOriginal,
-              const TCollection_AsciiString& theFileName,
-              const TCollection_AsciiString& theFormatName );
+  bool Export( const Handle(GEOM_Object)      theOriginal,
+               const TCollection_AsciiString& theFileName,
+               const TCollection_AsciiString& theFormatName );
 };
 
 #endif
index 22dd21d550a9bc32b96ad1029c921de85c9ac0b9..532a3dddfd178eefdccc944568b9545dc9952290 100644 (file)
@@ -36,8 +36,8 @@
  *  Constructor
  */
 //=============================================================================
-VTKPlugin_IOperations::VTKPlugin_IOperations( GEOM_Engine* theEngine, int theDocID )
-: GEOMImpl_IBaseIEOperations( theEngine, theDocID )
+VTKPlugin_IOperations::VTKPlugin_IOperations( GEOM_Engine* theEngine )
+: GEOMImpl_IBaseIEOperations( theEngine )
 {
   MESSAGE( "VTKPlugin_IOperations::VTKPlugin_IOperations" );
 }
@@ -72,7 +72,7 @@ void VTKPlugin_IOperations::ExportVTK( const Handle(GEOM_Object)      theOrigina
   if( aRefFunction.IsNull() ) return;  //There is no function which creates an object to be exported
 
   //Add a new result object
-  Handle(GEOM_Object) result = GetEngine()->AddObject( GetDocID(), GEOM_IMPORT);
+  Handle(GEOM_Object) result = GetEngine()->AddObject( GEOM_IMPORT);
 
   //Add an Export function
   Handle(GEOM_Function) aFunction = result->AddFunction( VTKPlugin_ExportDriver::GetID(), EXPORT_SHAPE );
index a75d60833ce1597b3ba56bd93486a86f13f0541c..d97fd13152a09b49aaab75eeec4fae335e8b7f51 100644 (file)
@@ -30,7 +30,7 @@
 class VTKPLUGINENGINE_EXPORT VTKPlugin_IOperations: public GEOMImpl_IBaseIEOperations
 {
 public:
-  VTKPlugin_IOperations( GEOM_Engine*, int );
+  VTKPlugin_IOperations( GEOM_Engine* );
   ~VTKPlugin_IOperations();
 
   void ExportVTK( const Handle(GEOM_Object),
index b5e2407e9d62c8f9dca874e660fa8c5684fd93e5..6ddef22dfa9f1462fb974807ed9854649d5a4a88 100644 (file)
@@ -31,7 +31,7 @@
 // OCCT includes
 #include <TFunction_DriverTable.hxx>
 
-std::map <int, VTKPlugin_IOperations*> VTKPlugin_OperationsCreator::_mapOfOperations;
+VTKPlugin_IOperations* VTKPlugin_OperationsCreator::_operation;
 
 VTKPlugin_OperationsCreator::VTKPlugin_OperationsCreator()
 {
@@ -49,19 +49,17 @@ VTKPlugin_OperationsCreator::~VTKPlugin_OperationsCreator()
 }
 
 GEOM_IOperations_i* VTKPlugin_OperationsCreator::Create( PortableServer::POA_ptr thePOA,
-                                                         int                     theStudyId,
                                                          GEOM::GEOM_Gen_ptr      theEngine,
                                                          ::GEOMImpl_Gen*         theGenImpl )
 {
   Unexpect aCatch( SALOME_SalomeException );
   MESSAGE( "VTKPlugin_OperationsCreator::Create" );
-  return new VTKPlugin_IOperations_i( thePOA, theEngine, get( theGenImpl, theStudyId ) );
+  return new VTKPlugin_IOperations_i( thePOA, theEngine, get( theGenImpl ) );
 }
 
-VTKPlugin_IOperations* VTKPlugin_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl,
-                                                        int             theStudyId )
+VTKPlugin_IOperations* VTKPlugin_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl )
 {
-  if (_mapOfOperations.find( theStudyId ) == _mapOfOperations.end() )
-    _mapOfOperations[theStudyId] = new VTKPlugin_IOperations( theGenImpl, theStudyId );
-  return _mapOfOperations[theStudyId];
+  if( !_operation )
+    _operation = new VTKPlugin_IOperations( theGenImpl );
+  return _operation;
 }
index 760c8fe3e0d3268e693ac881d2e6d78fa85ee78f..dfefb2954efa395ab562be9af4358ee94258c2ca 100755 (executable)
@@ -41,15 +41,13 @@ public:
   ~VTKPlugin_OperationsCreator();
 
   GEOM_IOperations_i* Create( PortableServer::POA_ptr thePOA,
-                             int                     theStudyId,
-                             GEOM::GEOM_Gen_ptr      theEngine,
-                             ::GEOMImpl_Gen*         theGenImpl );
+                              GEOM::GEOM_Gen_ptr      theEngine,
+                              ::GEOMImpl_Gen*         theGenImpl );
 private:
-  static VTKPlugin_IOperations* get( ::GEOMImpl_Gen*         theGenImpl,
-                                     int                     theStudyId );
+  static VTKPlugin_IOperations* get(::GEOMImpl_Gen* theGenImpl);
 
 private:
-  static std::map <int, VTKPlugin_IOperations*>  _mapOfOperations;
+  static VTKPlugin_IOperations* _operation;
 
   friend class VTKPlugin_IECallBack;
 };
index c1a5e91da781c25c34c8c9fd9934ddc2d911e816..7b64221dbaab189279f4cef033f4a3a7d80c6289 100644 (file)
@@ -226,7 +226,7 @@ void XAOPlugin_ExportDlg::processObject()
   else
   {
     ledShape->setText(GEOMBase::GetName(m_mainObj));
-    GEOM::GEOM_IShapesOperations_var shapeOp = getGeomEngine()->GetIShapesOperations(getStudyId());
+    GEOM::GEOM_IShapesOperations_var shapeOp = getGeomEngine()->GetIShapesOperations();
 
     // add groups names
     GEOM::ListOfGO_var groups = shapeOp->GetExistingSubObjects(m_mainObj, true);
@@ -243,7 +243,7 @@ void XAOPlugin_ExportDlg::processObject()
     lstGroups->sortItems(Qt::AscendingOrder);
 
     // add fields
-    GEOM::GEOM_IFieldOperations_var fieldOp = getGeomEngine()->GetIFieldOperations(getStudyId());
+    GEOM::GEOM_IFieldOperations_var fieldOp = getGeomEngine()->GetIFieldOperations();
 
     GEOM::ListOfFields_var fields = fieldOp->GetFields(m_mainObj);
     for (int i = 0, n = fields->length(); i < n; i++)
@@ -389,7 +389,7 @@ void XAOPlugin_ExportDlg::enterEvent(QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr XAOPlugin_ExportDlg::createOperation()
 {
-  return getGeomEngine()->GetPluginOperations( getStudyId(), "XAOPluginEngine" );
+  return getGeomEngine()->GetPluginOperations( "XAOPluginEngine" );
 }
 
 //=================================================================================
index 4e4e6ed11bd6e671ba40713bbbb99704a6227af9..65565f1eb7a95a1a8353b1bff91c03f491111c7d 100644 (file)
@@ -47,14 +47,13 @@ XAOPlugin_IECallBack::~XAOPlugin_IECallBack()
  */
 //=============================================================================
 bool
-XAOPlugin_IECallBack::Export( int                            theDocId,
-                              const Handle(GEOM_Object)      theOriginal,
+XAOPlugin_IECallBack::Export( const Handle(GEOM_Object)      theOriginal,
                               const TCollection_AsciiString& theFileName,
                               const TCollection_AsciiString& theFormatName,
                               const TCollection_AsciiString& theShapeFileName )
 {
-  XAOPlugin_IOperations* aPluginOperations = XAOPlugin_OperationsCreator::get( GetEngine(), theDocId );
-  GEOMImpl_IShapesOperations* aShapesOperations = GetEngine()->GetIShapesOperations( theDocId );
+  XAOPlugin_IOperations* aPluginOperations = XAOPlugin_OperationsCreator::get( GetEngine() );
+  GEOMImpl_IShapesOperations* aShapesOperations = GetEngine()->GetIShapesOperations();
 
   Handle(TColStd_HSequenceOfTransient) groups = aShapesOperations->GetExistingSubObjects( theOriginal, GEOMImpl_IShapesOperations::Groups );
   Handle(TColStd_HSequenceOfTransient) fields = aShapesOperations->GetExistingSubObjects( theOriginal, GEOMImpl_IShapesOperations::Fields );
@@ -74,11 +73,10 @@ XAOPlugin_IECallBack::Export( int                            theDocId,
  */
 //=============================================================================
 Handle(TColStd_HSequenceOfTransient)
-XAOPlugin_IECallBack::Import( int                            theDocId,
-                             const TCollection_AsciiString& theFormatName,
-                             const TCollection_AsciiString& theFileName )
+XAOPlugin_IECallBack::Import( const TCollection_AsciiString& theFormatName,
+                              const TCollection_AsciiString& theFileName )
 {
-  XAOPlugin_IOperations* aPluginOperations = XAOPlugin_OperationsCreator::get( GetEngine(), theDocId );
+  XAOPlugin_IOperations* aPluginOperations = XAOPlugin_OperationsCreator::get( GetEngine() );
 
   Handle(TColStd_HSequenceOfTransient) result = new TColStd_HSequenceOfTransient();
   Handle(TColStd_HSequenceOfTransient) subshapes = new TColStd_HSequenceOfTransient();
index 8bd1b688b95578b61d27a5dca0b5d781f1723353..6e7a6a2c4a81df9d7c416ea06f49b60c0ddd089c 100644 (file)
@@ -36,16 +36,14 @@ public:
   XAOPlugin_IECallBack();
   ~XAOPlugin_IECallBack();
   
-  virtual bool Export( int                            theDocId,
-                       const Handle(GEOM_Object)      theOriginal,
+  virtual bool Export( const Handle(GEOM_Object)      theOriginal,
                        const TCollection_AsciiString& theFileName,
                        const TCollection_AsciiString& theFormatName,
                        const TCollection_AsciiString& theshapeFileName );
 
   virtual
-  Handle(TColStd_HSequenceOfTransient) Import( int                            theDocId,
-                                              const TCollection_AsciiString& theFormatName,
-                                              const TCollection_AsciiString& theFileName );
+  Handle(TColStd_HSequenceOfTransient) Import( const TCollection_AsciiString& theFormatName,
+                       const TCollection_AsciiString& theFileName );
 };
 
 #endif
index 33e74ae6d0a5d510dbb8afac86b2ebef1e143d25..f77a29aae7869facb1ee759ab2627232aae642c7 100644 (file)
@@ -99,8 +99,8 @@ TopAbs_ShapeEnum getGroupDimension(XAO::Group* group)
  *  Constructor
  */
 //=============================================================================
-XAOPlugin_IOperations::XAOPlugin_IOperations( GEOM_Engine* theEngine, int theDocID )
-: GEOMImpl_IBaseIEOperations( theEngine, theDocID )
+XAOPlugin_IOperations::XAOPlugin_IOperations( GEOM_Engine* theEngine )
+: GEOMImpl_IBaseIEOperations( theEngine )
 {
   MESSAGE( "XAOPlugin_IOperations::XAOPlugin_IOperations" );
 }
@@ -323,7 +323,7 @@ bool XAOPlugin_IOperations::ExportXAO( Handle(GEOM_Object) shape,
   if (lastFunction.IsNull()) return false;
 
   // add a new result object
-  Handle(GEOM_Object) result = GetEngine()->AddObject(GetDocID(), GEOM_IMPORT);
+  Handle(GEOM_Object) result = GetEngine()->AddObject(GEOM_IMPORT);
 
   // add an Export function
   Handle(GEOM_Function) exportFunction = result->AddFunction(XAOPlugin_Driver::GetID(), EXPORT_SHAPE);
@@ -409,7 +409,7 @@ void XAOPlugin_IOperations::importSubShapes( XAO::Geometry* xaoGeometry,
     anArray = new TColStd_HArray1OfInteger(1, 1);
     anArray->SetValue(1, iref);
 
-    subShape = GetEngine()->AddObject(GetDocID(), GEOM_SUBSHAPE);
+    subShape = GetEngine()->AddObject(GEOM_SUBSHAPE);
     Handle(GEOM_Function) aFunction = subShape->AddFunction(GEOM_Object::GetSubShapeID(), 1);
     if (aFunction.IsNull())
       return;
@@ -473,7 +473,7 @@ bool XAOPlugin_IOperations::ImportXAO( const char* fileName,
   }
 
   // create the shape
-  shape = GetEngine()->AddObject(GetDocID(), GEOM_IMPORT);
+  shape = GetEngine()->AddObject(GEOM_IMPORT);
   Handle(GEOM_Function) function = shape->AddFunction(XAOPlugin_Driver::GetID(), IMPORT_SHAPE);
   if (function.IsNull()) return false;
   if (function->GetDriverGUID() != XAOPlugin_Driver::GetID()) return false;
index 7bf885f7c5769e3dd0e2cd9927d4423836d219eb..214b371ab7e218e3e28e0a2129d7ded94c892110 100644 (file)
@@ -40,7 +40,7 @@ namespace XAO {
 class XAOPLUGINENGINE_EXPORT XAOPlugin_IOperations: public GEOMImpl_IBaseIEOperations
 {
 public:
-  XAOPlugin_IOperations( GEOM_Engine*, int );
+  XAOPlugin_IOperations( GEOM_Engine* );
   ~XAOPlugin_IOperations();
 
   bool ExportXAO( Handle(GEOM_Object) shape,
index 9351d4a66f4262b8912e1dbdbc2a7b280153d430..398c670b6645a19e8b46f7c5202068c8b1fb2ab9 100644 (file)
@@ -235,7 +235,7 @@ void XAOPlugin_ImportDlg::enterEvent(QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr XAOPlugin_ImportDlg::createOperation()
 {
-  return getGeomEngine()->GetPluginOperations( getStudyId(), "XAOPluginEngine" );
+  return getGeomEngine()->GetPluginOperations( "XAOPluginEngine" );
 }
 
 //=================================================================================
@@ -315,10 +315,8 @@ QString XAOPlugin_ImportDlg::addFieldInStudy( GEOM::GEOM_Field_ptr theField, GEO
   if ( !aStudy || theField->_is_nil() )
     return QString();
 
-  SALOMEDS::Study_var aStudyDS = GeometryGUI::ClientStudyToStudy(aStudy);
-
   SALOMEDS::SObject_var aSO =
-    getGeomEngine()->AddInStudy(aStudyDS, theField, theField->GetName(), theFather);
+    getGeomEngine()->AddInStudy(theField, theField->GetName(), theFather);
   theField->UnRegister();
 
   QString anEntry;
@@ -334,7 +332,7 @@ QString XAOPlugin_ImportDlg::addFieldInStudy( GEOM::GEOM_Field_ptr theField, GEO
     GEOM::GEOM_FieldStep_ptr step = theField->GetStep(steps[i]);
     QString stepName = (tr("XAOPLUGIN_STEP") + " %1 %2").arg( step->GetID() ).arg( step->GetStamp() );
     SALOMEDS::SObject_wrap aSOField =
-      getGeomEngine()->AddInStudy( aStudyDS, step, stepName.toLatin1().constData(), theField );
+      getGeomEngine()->AddInStudy( step, stepName.toLatin1().constData(), theField );
     step->UnRegister();
   }
 
@@ -348,7 +346,7 @@ GEOM::GEOM_Object_ptr XAOPlugin_ImportDlg::getFather(GEOM::GEOM_Object_ptr objec
   GEOM::GEOM_Object_var fatherObj;
   if (object->GetType() != GEOM_IMPORT && m_mainShape != NULL)
   {
-    //GEOM::GEOM_IGroupOperations_var groupOper = getGeomEngine()->GetIGroupOperations(getStudyId());
+    //GEOM::GEOM_IGroupOperations_var groupOper = getGeomEngine()->GetIGroupOperations();
     //fatherObj = groupOper->GetMainShape(object);
     fatherObj = m_mainShape;
   }
index 4b6f54cd88653547f0c825372e2ceb53a1ea7d70..4240ec9531378843c9d9dd45a6f03f8ae58e9e15 100644 (file)
@@ -31,7 +31,7 @@
 // OCCT includes
 #include <TFunction_DriverTable.hxx>
 
-std::map <int, XAOPlugin_IOperations*> XAOPlugin_OperationsCreator::_mapOfOperations;
+XAOPlugin_IOperations* XAOPlugin_OperationsCreator::_operation;
 
 XAOPlugin_OperationsCreator::XAOPlugin_OperationsCreator()
 {
@@ -48,19 +48,17 @@ XAOPlugin_OperationsCreator::~XAOPlugin_OperationsCreator()
 }
 
 GEOM_IOperations_i* XAOPlugin_OperationsCreator::Create( PortableServer::POA_ptr thePOA,
-                                                         int                     theStudyId,
                                                          GEOM::GEOM_Gen_ptr      theEngine,
                                                          ::GEOMImpl_Gen*         theGenImpl )
 {
   Unexpect aCatch( SALOME_SalomeException );
   MESSAGE( "XAOPlugin_OperationsCreator::Create" );
-  return new XAOPlugin_IOperations_i( thePOA, theEngine, get( theGenImpl, theStudyId ) );
+  return new XAOPlugin_IOperations_i( thePOA, theEngine, get( theGenImpl ) );
 }
 
-XAOPlugin_IOperations* XAOPlugin_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl,
-                                                        int             theStudyId )
+XAOPlugin_IOperations* XAOPlugin_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl )
 {
-  if (_mapOfOperations.find( theStudyId ) == _mapOfOperations.end() )
-    _mapOfOperations[theStudyId] = new XAOPlugin_IOperations( theGenImpl, theStudyId );
-  return _mapOfOperations[theStudyId];
+  if( !_operation )
+    _operation = new XAOPlugin_IOperations( theGenImpl );
+  return _operation;
 }
index 5568de75da45fde4fe6ed986275d406a3b665500..26d645d8365743e4b464f741953d94e340ef705d 100755 (executable)
@@ -41,15 +41,13 @@ public:
   ~XAOPlugin_OperationsCreator();
 
   GEOM_IOperations_i* Create( PortableServer::POA_ptr thePOA,
-                             int                     theStudyId,
-                             GEOM::GEOM_Gen_ptr      theEngine,
-                             ::GEOMImpl_Gen*         theGenImpl );
+                              GEOM::GEOM_Gen_ptr      theEngine,
+                              ::GEOMImpl_Gen*         theGenImpl );
 private:
-  static XAOPlugin_IOperations* get( ::GEOMImpl_Gen*         theGenImpl,
-                                    int                     theStudyId );
-  
+  static XAOPlugin_IOperations* get(::GEOMImpl_Gen* theGenImpl);
+
 private:
-  static std::map <int, XAOPlugin_IOperations*>  _mapOfOperations;
+  static XAOPlugin_IOperations* _operation;
 
   friend class XAOPlugin_IECallBack;
 };
index 50606dc9763bca805ce72fc2f2644675a328b202..8d771be5cabf0f0da69c986f0ea6e3b84a33d99d 100644 (file)
@@ -52,7 +52,7 @@ SET(_swig_SCRIPTS
 
 # swig flags
 SET_SOURCE_FILES_PROPERTIES(xao.i PROPERTIES CPLUSPLUS ON)
-SET_SOURCE_FILES_PROPERTIES(xao.i PROPERTIES SWIG_DEFINITIONS "-shadow")
+SET_SOURCE_FILES_PROPERTIES(xao.i PROPERTIES SWIG_FLAGS "-py3")
 #SET_SOURCE_FILES_PROPERTIES(xao_wrap.cxx PROPERTIES COMPILE_FLAGS "-DHAVE_CONFIG_H")
 
 # --- rules ---