Salome HOME
Merge remote-tracking branch 'origin/master' into rnc/t_shape_plugin
[modules/geom.git] / src / GEOMGUI / GeometryGUI.cxx
index 3cfa790ea466dc49ea04cf88f103caee75098b3b..c7e69aec226daf19ba5ee7a8b50e9a7ac759beaf 100644 (file)
@@ -30,7 +30,6 @@
 #include "GeometryGUI.h"
 #include "GeometryGUI_Operations.h"
 #include "GEOMPluginGUI.h"
-#include "GEOMGUI_XmlHandler.h"
 #include "GEOMGUI_OCCSelector.h"
 #include "GEOMGUI_Selection.h"
 #include "GEOMGUI_CreationInfoWdg.h"
@@ -38,6 +37,7 @@
 #include "GEOM_Constants.h"
 #include "GEOM_Displayer.h"
 #include "GEOM_AISShape.hxx"
+#include "GEOMUtils_XmlHandler.hxx"
 
 #include "GEOM_Actor.h"
 
@@ -78,8 +78,7 @@
 #include <LightApp_Preferences.h>
 
 #include <SALOME_LifeCycleCORBA.hxx>
-// #include <SALOME_ListIO.hxx>
-#include <SALOME_ListIteratorOfListIO.hxx>
+#include <SALOME_ListIO.hxx>
 
 #include <SALOMEDSClient_ClientFactory.hxx>
 #include <SALOMEDSClient_IParameters.hxx>
@@ -463,8 +462,6 @@ void GeometryGUI::OnGUIEvent( int id, const QVariant& theParam )
   case GEOMOp::OpOriginAndVectors:   // MENU BASIC - ORIGIN AND BASE VECTORS
     createOriginAndBaseVectors(); // internal operation
     return;
-  case GEOMOp::OpImport:             // MENU FILE - IMPORT
-  case GEOMOp::OpExport:             // MENU FILE - EXPORT
   case GEOMOp::OpSelectVertex:       // POPUP MENU - SELECT ONLY - VERTEX
   case GEOMOp::OpSelectEdge:         // POPUP MENU - SELECT ONLY - EDGE
   case GEOMOp::OpSelectWire:         // POPUP MENU - SELECT ONLY - WIRE
@@ -516,11 +513,13 @@ void GeometryGUI::OnGUIEvent( int id, const QVariant& theParam )
   case GEOMOp::OpHide:               // MENU VIEW - ERASE
   case GEOMOp::OpShow:               // MENU VIEW - DISPLAY
   case GEOMOp::OpSwitchVectors:      // MENU VIEW - VECTOR MODE
+  case GEOMOp::OpSwitchVertices:     // MENU VIEW - VERTICES MODE
   case GEOMOp::OpWireframe:          // POPUP MENU - WIREFRAME
   case GEOMOp::OpShading:            // POPUP MENU - SHADING
   case GEOMOp::OpShadingWithEdges:   // POPUP MENU - SHADING WITH EDGES
   case GEOMOp::OpTexture:            // POPUP MENU - TEXTURE
   case GEOMOp::OpVectors:            // POPUP MENU - VECTORS
+  case GEOMOp::OpVertices:           // POPUP MENU - VERTICES
     libName = "DisplayGUI";
     break;
   case GEOMOp::OpPoint:              // MENU BASIC - POINT
@@ -561,6 +560,7 @@ void GeometryGUI::OnGUIEvent( int id, const QVariant& theParam )
   case GEOMOp::OpCreateField:        // MENU FIELD - CREATE FIELD
   case GEOMOp::OpEditField:          // MENU FIELD - EDIT FIELD
   case GEOMOp::OpEditFieldPopup:     // POPUP MENU - EDIT FIELD
+  case GEOMOp::Op2dPolylineEditor:   // MENU BASIC - POLYLINE EDITOR
     libName = "EntityGUI";
     break;
   case GEOMOp::OpEdge:               // MENU BUILD - EDGE
@@ -600,10 +600,6 @@ void GeometryGUI::OnGUIEvent( int id, const QVariant& theParam )
   case GEOMOp::OpSharedShapes:       // MENU OPERATION - GET SHARED SHAPES
   case GEOMOp::OpExtrudedBoss:       // MENU OPERATION - EXTRUDED BOSS
   case GEOMOp::OpExtrudedCut:        // MENU OPERATION - EXTRUDED CUT
-#ifdef DEBUG_CURVE_CREATOR  
-  // for debug purposes, to be removed
-  case GEOMOp::OpCurveCreator:       // MENU OPERATION - CURVE CREATOR
-#endif
     libName = "OperationGUI";
     break;
   case GEOMOp::OpSewing:             // MENU REPAIR - SEWING
@@ -659,10 +655,6 @@ void GeometryGUI::OnGUIEvent( int id, const QVariant& theParam )
   case GEOMOp::OpExplodeBlock:       // MENU BLOCKS - EXPLODE ON BLOCKS
     libName = "BlocksGUI";
     break;
-  case GEOMOp::OpExportXAO:          // MENU NEW ENTITY - IMPORTEXPORT - EXPORTXAO
-  case GEOMOp::OpImportXAO:          // MENU NEW ENTITY - IMPORTEXPORT - IMPORTXAO
-    libName = "ImportExportGUI";
-    break;
   //case GEOMOp::OpAdvancedNoOp:       // NO OPERATION (advanced operations base)
   //case GEOMOp::OpPipeTShape:         // MENU NEW ENTITY - ADVANCED - PIPE TSHAPE
   //case GEOMOp::OpPipeTShapeGroups:     // MENU NEW ENTITY - ADVANCED - PIPE TSHAPE GROUPS
@@ -895,9 +887,6 @@ void GeometryGUI::initialize( CAM_Application* app )
 
   // ----- create actions --------------
 
-  createGeomAction( GEOMOp::OpImport,     "IMPORT", "", Qt::ControlModifier + Qt::Key_I );
-  createGeomAction( GEOMOp::OpExport,     "EXPORT", "", Qt::ControlModifier + Qt::Key_E );
-
   createGeomAction( GEOMOp::OpDelete,     "DELETE", "", Qt::Key_Delete );
 
   createGeomAction( GEOMOp::OpPoint,      "POINT" );
@@ -948,6 +937,7 @@ void GeometryGUI::initialize( CAM_Application* app )
   createGeomAction( GEOMOp::OpFeatureDetect,"FEATURE_DETECTION" );
 #endif
   createGeomAction( GEOMOp::OpPictureImport,"PICTURE_IMPORT" );
+  createGeomAction( GEOMOp::Op2dPolylineEditor, "CURVE_CREATOR" );
 
   createGeomAction( GEOMOp::OpEdge,        "EDGE" );
   createGeomAction( GEOMOp::OpWire,        "WIRE" );
@@ -980,10 +970,6 @@ void GeometryGUI::initialize( CAM_Application* app )
   createGeomAction( GEOMOp::OpSharedShapes,   "GET_SHARED_SHAPES" );
   createGeomAction( GEOMOp::OpExtrudedCut,    "EXTRUDED_CUT" );
   createGeomAction( GEOMOp::OpExtrudedBoss,   "EXTRUDED_BOSS" );
-#ifdef DEBUG_CURVE_CREATOR
-  // for debug purposes, to be removed
-  createGeomAction( GEOMOp::OpCurveCreator,   "CURVE_CREATOR" );
-#endif
   createGeomAction( GEOMOp::OpFillet1d,       "FILLET_1D" );
   createGeomAction( GEOMOp::OpFillet2d,       "FILLET_2D" );
 
@@ -1039,6 +1025,7 @@ void GeometryGUI::initialize( CAM_Application* app )
   createGeomAction( GEOMOp::OpHideAll,          "ERASE_ALL" );
   createGeomAction( GEOMOp::OpShow,             "DISPLAY" );
   createGeomAction( GEOMOp::OpSwitchVectors,    "VECTOR_MODE");
+  createGeomAction( GEOMOp::OpSwitchVertices,   "VERTICES_MODE");
   createGeomAction( GEOMOp::OpSelectVertex,     "VERTEX_SEL_ONLY" ,"", 0, true );
   createGeomAction( GEOMOp::OpSelectEdge,       "EDGE_SEL_ONLY", "", 0, true );
   createGeomAction( GEOMOp::OpSelectWire,       "WIRE_SEL_ONLY", "",  0, true );
@@ -1060,6 +1047,7 @@ void GeometryGUI::initialize( CAM_Application* app )
   createGeomAction( GEOMOp::OpEdgeWidth,        "EDGE_WIDTH");
   createGeomAction( GEOMOp::OpIsosWidth,        "ISOS_WIDTH");
   createGeomAction( GEOMOp::OpVectors,          "POP_VECTORS", "", 0, true );
+  createGeomAction( GEOMOp::OpVertices,         "POP_VERTICES", "", 0, true );
   createGeomAction( GEOMOp::OpDeflection,       "POP_DEFLECTION" );
   createGeomAction( GEOMOp::OpColor,            "POP_COLOR" );
   createGeomAction( GEOMOp::OpSetTexture,       "POP_SETTEXTURE" );
@@ -1095,10 +1083,6 @@ void GeometryGUI::initialize( CAM_Application* app )
   createGeomAction( GEOMOp::OpDecrNbIsos, "", "", 0, false,
                     "Geometry:Decrease number of isolines");
 
-  // Import/Export XAO
-  createGeomAction( GEOMOp::OpExportXAO, "EXPORTXAO" );
-  createGeomAction( GEOMOp::OpImportXAO, "IMPORTXAO" );
-
   //createGeomAction( GEOMOp::OpPipeTShape, "PIPETSHAPE" );
   //createGeomAction( GEOMOp::OpDividedDisk, "DIVIDEDDISK" );
   //createGeomAction( GEOMOp::OpDividedCylinder, "DIVIDEDCYLINDER" );
@@ -1108,13 +1092,6 @@ void GeometryGUI::initialize( CAM_Application* app )
   // ---- create menus --------------------------
 
   int fileId = createMenu( tr( "MEN_FILE" ), -1, -1 );
-  createMenu( separator(),      fileId, 10 );
-  createMenu( GEOMOp::OpImport, fileId, 10 );
-  createMenu( GEOMOp::OpExport, fileId, 10 );
-  int impexpId = createMenu( tr( "MEN_IMPORTEXPORT" ), fileId, -1, 10 );
-  createMenu( GEOMOp::OpExportXAO, impexpId, -1 );
-  createMenu( GEOMOp::OpImportXAO, impexpId, -1 );
-  createMenu( separator(),      fileId, -1 );
 
   int editId = createMenu( tr( "MEN_EDIT" ), -1, -1 );
   createMenu( GEOMOp::OpDelete, editId, -1 );
@@ -1122,19 +1099,20 @@ void GeometryGUI::initialize( CAM_Application* app )
   int newEntId = createMenu( tr( "MEN_NEW_ENTITY" ), -1, -1, 10 );
 
   int basicId = createMenu( tr( "MEN_BASIC" ), newEntId, -1 );
-  createMenu( GEOMOp::OpPoint,   basicId, -1 );
-  createMenu( GEOMOp::OpLine,    basicId, -1 );
-  createMenu( GEOMOp::OpCircle,  basicId, -1 );
-  createMenu( GEOMOp::OpEllipse, basicId, -1 );
-  createMenu( GEOMOp::OpArc,     basicId, -1 );
-  createMenu( GEOMOp::OpCurve,   basicId, -1 );
-  createMenu( GEOMOp::Op2dSketcher, basicId, -1 );
-  createMenu( GEOMOp::Op3dSketcher, basicId, -1 );
-  createMenu( GEOMOp::OpIsoline, basicId, -1 );
-  createMenu( separator(),       basicId, -1 );
-  createMenu( GEOMOp::OpVector,  basicId, -1 );
-  createMenu( GEOMOp::OpPlane,   basicId, -1 );
-  createMenu( GEOMOp::OpLCS,     basicId, -1 );
+  createMenu( GEOMOp::OpPoint,            basicId, -1 );
+  createMenu( GEOMOp::OpLine,             basicId, -1 );
+  createMenu( GEOMOp::OpCircle,           basicId, -1 );
+  createMenu( GEOMOp::OpEllipse,          basicId, -1 );
+  createMenu( GEOMOp::OpArc,              basicId, -1 );
+  createMenu( GEOMOp::OpCurve,            basicId, -1 );
+  createMenu( GEOMOp::Op2dSketcher,       basicId, -1 );
+  createMenu( GEOMOp::Op2dPolylineEditor, basicId, -1 );
+  createMenu( GEOMOp::Op3dSketcher,       basicId, -1 );
+  createMenu( GEOMOp::OpIsoline,          basicId, -1 );
+  createMenu( separator(),                basicId, -1 );
+  createMenu( GEOMOp::OpVector,           basicId, -1 );
+  createMenu( GEOMOp::OpPlane,            basicId, -1 );
+  createMenu( GEOMOp::OpLCS,              basicId, -1 );
   createMenu( GEOMOp::OpOriginAndVectors, basicId, -1 );
 
   int primId = createMenu( tr( "MEN_PRIMITIVES" ), newEntId, -1 );
@@ -1240,11 +1218,6 @@ void GeometryGUI::initialize( CAM_Application* app )
   createMenu( GEOMOp::OpChamfer,       operId, -1 );
   createMenu( GEOMOp::OpExtrudedBoss,  operId, -1 );
   createMenu( GEOMOp::OpExtrudedCut,   operId, -1 );
-#ifdef DEBUG_CURVE_CREATOR
-  // for debug purposes, to be removed
-  createMenu( separator(), operId, -1 );
-  createMenu( GEOMOp::OpCurveCreator,   operId, -1 );
-#endif
   //createMenu( GEOMOp::OpClipping,      operId, -1 );
 
   int repairId = createMenu( tr( "MEN_REPAIR" ), -1, -1, 10 );
@@ -1313,6 +1286,7 @@ void GeometryGUI::initialize( CAM_Application* app )
   createMenu( GEOMOp::OpDMTexture,          dispmodeId, -1 );
   createMenu( separator(),                  dispmodeId, -1 );
   createMenu( GEOMOp::OpSwitchVectors,      dispmodeId, -1 );
+  createMenu( GEOMOp::OpSwitchVertices,     dispmodeId, -1 );
 
   createMenu( separator(),       viewId, -1 );
   createMenu( GEOMOp::OpShowAll, viewId, -1 );
@@ -1333,26 +1307,27 @@ void GeometryGUI::initialize( CAM_Application* app )
 
   // ---- create toolbars --------------------------
 
-  int basicTbId = createTool( tr( "TOOL_BASIC" ) );
-  createTool( GEOMOp::OpPoint,      basicTbId );
-  createTool( GEOMOp::OpLine,       basicTbId );
-  createTool( GEOMOp::OpCircle,     basicTbId );
-  createTool( GEOMOp::OpEllipse,    basicTbId );
-  createTool( GEOMOp::OpArc,        basicTbId );
-  createTool( GEOMOp::OpCurve,      basicTbId );
-  createTool( GEOMOp::OpVector,     basicTbId );
-  createTool( GEOMOp::Op2dSketcher, basicTbId ); //rnc
-  createTool( GEOMOp::Op3dSketcher, basicTbId ); //rnc
-  createTool( GEOMOp::OpIsoline,    basicTbId );
-  createTool( GEOMOp::OpPlane,      basicTbId );
-  createTool( GEOMOp::OpLCS,        basicTbId );
+  int basicTbId = createTool( tr( "TOOL_BASIC" ), QString( "GEOMBasic" ) );
+  createTool( GEOMOp::OpPoint,            basicTbId );
+  createTool( GEOMOp::OpLine,             basicTbId );
+  createTool( GEOMOp::OpCircle,           basicTbId );
+  createTool( GEOMOp::OpEllipse,          basicTbId );
+  createTool( GEOMOp::OpArc,              basicTbId );
+  createTool( GEOMOp::OpCurve,            basicTbId );
+  createTool( GEOMOp::OpVector,           basicTbId );
+  createTool( GEOMOp::Op2dSketcher,       basicTbId ); //rnc
+  createTool( GEOMOp::Op2dPolylineEditor, basicTbId ); 
+  createTool( GEOMOp::Op3dSketcher,       basicTbId ); //rnc
+  createTool( GEOMOp::OpIsoline,          basicTbId );
+  createTool( GEOMOp::OpPlane,            basicTbId );
+  createTool( GEOMOp::OpLCS,              basicTbId );
   createTool( GEOMOp::OpOriginAndVectors, basicTbId );
 
-//   int sketchTbId = createTool( tr( "TOOL_SKETCH" ) );
+//   int sketchTbId = createTool( tr( "TOOL_SKETCH" ), QString( "GEOMSketch" ) );
 //   createTool( GEOMOp::Op2dSketcher,  sketchTbId );
 //   createTool( GEOMOp::Op3dSketcher,  sketchTbId );
 
-  int primTbId = createTool( tr( "TOOL_PRIMITIVES" ) );
+  int primTbId = createTool( tr( "TOOL_PRIMITIVES" ), QString( "GEOMPrimitives" ) );
   createTool( GEOMOp::OpBox,        primTbId );
   createTool( GEOMOp::OpCylinder,   primTbId );
   createTool( GEOMOp::OpSphere,     primTbId );
@@ -1362,24 +1337,24 @@ void GeometryGUI::initialize( CAM_Application* app )
   createTool( GEOMOp::OpDisk,       primTbId );
   //createTool( GEOMOp::OpPipeTShape, primTbId ); //rnc
 
-  //int blocksTbId = createTool( tr( "TOOL_BLOCKS" ) );
+  //int blocksTbId = createTool( tr( "TOOL_BLOCKS" ), QString( "GEOMBlocks" ) );
   //createTool( GEOMOp::OpDividedDisk, blocksTbId );
   //createTool( GEOMOp::OpDividedCylinder, blocksTbId );
 
-  int boolTbId = createTool( tr( "TOOL_BOOLEAN" ) );
+  int boolTbId = createTool( tr( "TOOL_BOOLEAN" ), QString( "GEOMBooleanOperations" ) );
   createTool( GEOMOp::OpFuse,       boolTbId );
   createTool( GEOMOp::OpCommon,     boolTbId );
   createTool( GEOMOp::OpCut,        boolTbId );
   createTool( GEOMOp::OpSection,    boolTbId );
 
-  int genTbId = createTool( tr( "TOOL_GENERATION" ) );
+  int genTbId = createTool( tr( "TOOL_GENERATION" ), QString( "GEOMGeneration" ) );
   createTool( GEOMOp::OpPrism,      genTbId );
   createTool( GEOMOp::OpRevolution, genTbId );
   createTool( GEOMOp::OpFilling,    genTbId );
   createTool( GEOMOp::OpPipe,       genTbId );
   createTool( GEOMOp::OpPipePath,   genTbId );
 
-  int transTbId = createTool( tr( "TOOL_TRANSFORMATION" ) );
+  int transTbId = createTool( tr( "TOOL_TRANSFORMATION" ), QString( "GEOMTransformation" ) );
   createTool( GEOMOp::OpTranslate,      transTbId );
   createTool( GEOMOp::OpRotate,         transTbId );
   createTool( GEOMOp::OpChangeLoc,      transTbId );
@@ -1391,26 +1366,22 @@ void GeometryGUI::initialize( CAM_Application* app )
   createTool( GEOMOp::OpMultiTranslate, transTbId );
   createTool( GEOMOp::OpMultiRotate,    transTbId );
 
-  int operTbId = createTool( tr( "TOOL_OPERATIONS" ) );
+  int operTbId = createTool( tr( "TOOL_OPERATIONS" ), QString( "GEOMOperations" ) );
   createTool( GEOMOp::OpExplode,         operTbId );
   createTool( GEOMOp::OpPartition,       operTbId );
   createTool( GEOMOp::OpArchimede,       operTbId );
   createTool( GEOMOp::OpShapesOnShape,   operTbId );
   createTool( GEOMOp::OpSharedShapes,    operTbId );
 
-  int featTbId = createTool( tr( "TOOL_FEATURES" ) );
+  int featTbId = createTool( tr( "TOOL_FEATURES" ), QString( "GEOMModification" ) );
   createTool( GEOMOp::OpFillet1d,        featTbId );
   createTool( GEOMOp::OpFillet2d,        featTbId );
   createTool( GEOMOp::OpFillet3d,        featTbId );
   createTool( GEOMOp::OpChamfer,         featTbId );
   createTool( GEOMOp::OpExtrudedBoss,    featTbId );
   createTool( GEOMOp::OpExtrudedCut,     featTbId );
-#ifdef DEBUG_CURVE_CREATOR
-  // for debug purposes, to be removed
-  createTool( GEOMOp::OpCurveCreator,    featTbId ); 
-#endif
 
-  int buildTbId = createTool( tr( "TOOL_BUILD" ) );
+  int buildTbId = createTool( tr( "TOOL_BUILD" ), QString( "GEOMBuild" ) );
   createTool( GEOMOp::OpEdge,     buildTbId );
   createTool( GEOMOp::OpWire,     buildTbId );
   createTool( GEOMOp::OpFace,     buildTbId );
@@ -1418,7 +1389,7 @@ void GeometryGUI::initialize( CAM_Application* app )
   createTool( GEOMOp::OpSolid,    buildTbId );
   createTool( GEOMOp::OpCompound, buildTbId );
 
-  int measureTbId = createTool( tr( "TOOL_MEASURES" ) );
+  int measureTbId = createTool( tr( "TOOL_MEASURES" ), QString( "GEOMMeasures" ) );
   createTool( GEOMOp::OpPointCoordinates, measureTbId );
   createTool( GEOMOp::OpProperties,       measureTbId );
   createTool( GEOMOp::OpCenterMass,       measureTbId );
@@ -1439,16 +1410,12 @@ void GeometryGUI::initialize( CAM_Application* app )
   createTool( GEOMOp::OpGetNonBlocks,     measureTbId );
   createTool( GEOMOp::OpCheckSelfInters,  measureTbId );
 
-  int picturesTbId = createTool( tr( "TOOL_PICTURES" ) );
+  int picturesTbId = createTool( tr( "TOOL_PICTURES" ), QString( "GEOMPictures" ) );
   createTool( GEOMOp::OpPictureImport,    picturesTbId );
 #ifdef WITH_OPENCV
   createTool( GEOMOp::OpFeatureDetect,  picturesTbId );
 #endif
 
-   int impexpTbId = createTool( tr( "TOOL_IMPORTEXPORT" ) );
-   createTool( GEOMOp::OpExportXAO, impexpTbId );
-   createTool( GEOMOp::OpImportXAO, impexpTbId );
-
   //int advancedTbId = createTool( tr( "TOOL_ADVANCED" ) );
   //createTool( GEOMOp::OpSmoothingSurface, advancedTbId );
   //@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@ do not remove this line @@ do not remove this line @@//
@@ -1510,6 +1477,9 @@ void GeometryGUI::initialize( CAM_Application* app )
   mgr->insert( action(  GEOMOp::OpVectors ), dispmodeId, -1 ); // vectors
   mgr->setRule( action( GEOMOp::OpVectors ), clientOCCorVTK_AndSomeVisible  + " and ($component={'GEOM'})", QtxPopupMgr::VisibleRule );
   mgr->setRule( action( GEOMOp::OpVectors ), clientOCCorVTK + " and isVectorsMode", QtxPopupMgr::ToggleRule );
+  mgr->insert( action(  GEOMOp::OpVertices ), dispmodeId, -1 ); // vertices
+  mgr->setRule( action( GEOMOp::OpVertices ), clientOCCorVTK_AndSomeVisible  + " and ($component={'GEOM'})", QtxPopupMgr::VisibleRule );
+  mgr->setRule( action( GEOMOp::OpVertices ), clientOCCorVTK + " and isVerticesMode", QtxPopupMgr::ToggleRule );
   mgr->insert( separator(), -1, -1 );     // -----------
 
   mgr->insert( action(  GEOMOp::OpColor ), -1, -1 ); // color
@@ -1521,8 +1491,7 @@ void GeometryGUI::initialize( CAM_Application* app )
   mgr->insert( action(  GEOMOp::OpDeflection ), -1, -1 ); // deflection
   mgr->setRule( action( GEOMOp::OpDeflection ), clientOCCorVTK_AndSomeVisible + " and selcount>0 and isVisible" + " and ($component={'GEOM'})", QtxPopupMgr::VisibleRule );
   mgr->insert( action(  GEOMOp::OpPointMarker ), -1, -1 ); // point marker
-  //mgr->setRule( action( GEOMOp::OpPointMarker ), QString( "selcount>0 and $typeid in {%1}" ).arg(GEOM_POINT ), QtxPopupMgr::VisibleRule );
-  mgr->setRule( action( GEOMOp::OpPointMarker ), QString( "selcount>0 and ( $typeid in {%1} or compoundOfVertices=true ) " ).arg(GEOM::VERTEX).arg(GEOM::COMPOUND), QtxPopupMgr::VisibleRule );
+  mgr->setRule( action( GEOMOp::OpPointMarker ), clientOCCorOB + " and $type in {'Shape' 'Group' 'Field' 'FieldStep'} and selcount>0 and isOCC=true", QtxPopupMgr::VisibleRule );
 
   // material properties
   mgr->insert( action(  GEOMOp::OpMaterialProperties ), -1, -1 );
@@ -1650,131 +1619,77 @@ void GeometryGUI::addPluginActions()
   SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
   if (!resMgr) return;
 
-  // Find names of a resource XML files ("GEOMActions.xml" and others);
-  QString PluginsXml;
-  char* cenv = getenv("GEOM_PluginsList");
-  if (cenv)
-    PluginsXml.sprintf("%s", cenv);
-
-  QStringList PluginsXmlList = PluginsXml.split(":", QString::SkipEmptyParts);
-  if (PluginsXmlList.count() == 0) return;
-
-  // get full names of xml files from PluginsXmlList
-  QStringList xmlFiles;
-  xmlFiles.append(QDir::home().filePath("CustomGeomPlugins.xml")); // may be inexistent
-  for (int i = 0; i < PluginsXmlList.count(); i++) {
-    PluginsXml = PluginsXmlList[ i ];
-
-    // Find full path to the resource XML file
-    QString xmlFile = resMgr->path("resources", "GEOM", PluginsXml + ".xml");
-    if ( xmlFile.isEmpty() ) // try PLUGIN resources
-      xmlFile = resMgr->path("resources", PluginsXml, PluginsXml + ".xml");
-    if ( !xmlFile.isEmpty() )
-      xmlFiles.append( xmlFile );
-  }
-
-  // create "Advanced Operations" menu and corresponding toolbar
-  //int advancedMenuId = createMenu(tr("MEN_ADVANCED"), -1, -1, 10);
-  //int advancedTbarId = createTool(tr("TOOL_ADVANCED"));
-  int id = GEOMOp::OpLastOperationID; // TODO?
+  SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( application()->activeStudy() );
+  if (!appStudy) return;
 
-  // loop on xmlFiles
-  QString aNoAccessFiles;
-  for (int i = 0; i < xmlFiles.count(); i++) {
-    QString xmlFile = xmlFiles[ i ];
-
-    QFile file (xmlFile);
-    if (file.exists() && file.open(QIODevice::ReadOnly)) {
-      file.close();
-
-      GEOMGUI_XmlHandler* aXmlHandler = new GEOMGUI_XmlHandler();
-      ASSERT(aXmlHandler);
-
-      QXmlInputSource source (&file);
-      QXmlSimpleReader reader;
-      reader.setContentHandler(aXmlHandler);
-      reader.setErrorHandler(aXmlHandler);
-      bool ok = reader.parse(source);
-      file.close();
-
-      if (ok) {
-        // bind action lib and label to its ID for activateOperation() method proper work
-        myPluginLibs[aXmlHandler->myPluginData.myName] = aXmlHandler->myPluginData.myClientLib;
-
-        QListIterator<GEOMGUI_ActionData> anActionsIter (aXmlHandler->myPluginData.myListOfActions);
-        while (anActionsIter.hasNext()) {
-          GEOMGUI_ActionData anActionData = anActionsIter.next();
-
-          //QPixmap icon = resMgr->loadPixmap("GEOM", tr(anActionData.myIcon.toLatin1().constData()));
-          QPixmap icon = resMgr->loadPixmap(aXmlHandler->myPluginData.myName,
-                                            anActionData.myIcon.toLatin1().constData());
-
-          // path to action in menu
-          QStringList smenus = anActionData.myMenu.split( "/" );
-          QString actionName = smenus.last();
-          actionName = actionName.toUpper().prepend("MEN_");
-          smenus.removeLast();
-
-          // path to action in toolbar
-          QStringList stools = anActionData.myTooltip.split( "/" );
-          QString actionTool = stools.last();
-          actionTool = actionTool.toUpper().prepend("TOP_");
-          stools.removeLast();
-
-          QString actionStat = anActionData.myStatusBar;
-          actionStat = actionStat.toUpper().prepend("STB_");
-
-          createAction(id, // ~ anActionData.myLabel
-                       tr(actionTool.toLatin1().constData()),
-                       icon,
-                       tr(actionName.toLatin1().constData()),
-                       tr(actionStat.toLatin1().constData()),
-                       0 /*accel*/,
-                       application()->desktop(),
-                       false /*toggle*/,
-                       this, SLOT(OnGUIEvent()),
-                       QString() /*shortcutAction*/);
-
-          int menuId = -1;
-          foreach (QString subMenu, smenus) {
-            subMenu = subMenu.toUpper().prepend("MEN_");
-            menuId = createMenu(tr(subMenu.toLatin1().constData()), menuId, -1);
-          }
-          //createMenu(id, pluginMenuId, -1);
-          createMenu(id, menuId, -1);
+  // Find names of a resource XML files ("AdvancedGEOM.xml" and others);
 
-          QString subTool = stools[0];
-          subTool = subTool.toUpper().prepend("TOOL_");
-          int toolId = createTool(tr(subTool.toLatin1().constData()));
-          //createTool(id, advancedTbarId);
-          createTool(id, toolId);
+  GEOMUtils::PluginInfo plugins = GEOMUtils::ReadPluginInfo();
 
-          // add action id to map
-          PluginAction anAction (aXmlHandler->myPluginData.myClientLib, anActionData.myLabel);
-          myPluginActions[id] = anAction;
+  int id = GEOMOp::OpLastOperationID; // TODO?
 
-          id++;
-        }
+  // loop on plugins
+  GEOMUtils::PluginInfo::const_iterator it;
+  for ( it = plugins.begin(); it != plugins.end(); ++it ) {
+    // bind action lib and label to its ID for activateOperation() method proper work
+    GEOMUtils::PluginData pdata = (*it);
+    myPluginLibs[pdata.name.c_str()] = pdata.clientLib.c_str();
+    std::list<GEOMUtils::ActionData> actions = (*it).actions;
+    std::list<GEOMUtils::ActionData>::const_iterator ait;
+    for ( ait = actions.begin(); ait != actions.end(); ++ait ) {
+      GEOMUtils::ActionData adata = (*ait);
+      // icon
+      QPixmap icon;
+      if ( !adata.icon.empty() )
+       icon = resMgr->loadPixmap( pdata.name.c_str(), adata.icon.c_str() );
+      // menu text (path)
+      QStringList smenus = QString( adata.menuText.c_str() ).split( "/" );
+      QString actionName = smenus.last();
+      actionName = actionName.toUpper().prepend( "MEN_" );
+      smenus.removeLast();
+
+      // path to action in toolbar
+      QStringList stools = QString( adata.toolTip.c_str() ).split( "/" );
+      QString actionTool = stools.last();
+      actionTool = actionTool.toUpper().prepend( "TOP_" );
+      stools.removeLast();
+      
+      QString actionStat = adata.statusText.c_str();
+      actionStat = actionStat.toUpper().prepend( "STB_" );
+
+      createAction( id, // ~ adata.label
+                   tr( actionTool.toLatin1().constData() ),
+                   icon,
+                   tr( actionName.toLatin1().constData() ),
+                   tr( actionStat.toLatin1().constData() ),
+                   QKeySequence( tr( adata.accel.c_str() ) ),
+                   application()->desktop(),
+                   false /*toggle*/,
+                   this, SLOT( OnGUIEvent() ),
+                   QString() /*shortcutAction*/ );
+      
+      int menuId = -1;
+      foreach ( QString subMenu, smenus ) {
+       QStringList subMenuList = subMenu.split( ":" );
+       QString subMenuName = subMenuList[0].toUpper().prepend( "MEN_" );
+       int subMenuGroup = subMenuList.size() > 1 ? subMenuList[1].toInt() : -1;
+       menuId = createMenu( tr( subMenuName.toLatin1().constData() ), menuId, -1, subMenuGroup );
       }
-      else {
-        SUIT_MessageBox::critical(application()->desktop(),
-                                  tr("INF_PARSE_ERROR"),
-                                  tr(aXmlHandler->errorProtocol().toLatin1().data()));
+      createMenu( id, menuId, -1 );
+      
+      if ( !stools.isEmpty() ) {
+       QString subTool = stools[0];
+       subTool = subTool.toUpper().prepend( "TOOL_" );
+       int toolId = createTool( tr( subTool.toLatin1().constData() ) );
+       createTool(id, toolId);
       }
-      delete aXmlHandler;
-    }
-    else if ( i > 0 ) { // 1st is ~/CustomGeomPlugins.xml
-      if (aNoAccessFiles.isEmpty())
-        aNoAccessFiles = xmlFile;
-      else
-        aNoAccessFiles += ", " + xmlFile;
-    }
-  } // end loop on xmlFiles
 
-  if (!aNoAccessFiles.isEmpty()) {
-    QString aMess = QObject::tr("PLUGIN_FILE_CANT_OPEN") + " " + aNoAccessFiles + "\n";
-    aMess += QObject::tr("PLUGIN_FILE_CHECK_VARIABLE");
-    SUIT_MessageBox::warning(application()->desktop(), tr("GEOM_WRN_WARNING"), aMess);
+      // add action id to map
+      PluginAction anAction( pdata.clientLib.c_str(), adata.label.c_str() );
+      myPluginActions[id] = anAction;
+      
+      id++;
+    }
   }
 }
 
@@ -1815,8 +1730,6 @@ bool GeometryGUI::activateModule( SUIT_Study* study )
           this, SLOT( onWindowActivated( SUIT_ViewWindow* ) ) );
 
   // Reset actions accelerator keys
-  action(GEOMOp::OpImport)->setEnabled( true ); // Import: CTRL + Key_I
-  action(GEOMOp::OpExport)->setEnabled( true ); // Export: CTRL + Key_E
   action(GEOMOp::OpDelete)->setEnabled( true ); // Delete: Key_Delete
 
   GUIMap::Iterator it;
@@ -1905,8 +1818,6 @@ bool GeometryGUI::deactivateModule( SUIT_Study* study )
     it.value()->deactivate();
 
   // Unset actions accelerator keys
-  action(GEOMOp::OpImport)->setEnabled( false ); // Import: CTRL + Key_I
-  action(GEOMOp::OpExport)->setEnabled( false ); // Export: CTRL + Key_E
   action(GEOMOp::OpDelete)->setEnabled( false ); // Delete: Key_Delete
 
   qDeleteAll(myOCCSelectors);
@@ -2082,15 +1993,22 @@ void GeometryGUI::updateCreationInfo()
         SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
         QString name = info->operationName.in();
         if ( !name.isEmpty() ) {
-          icon = resMgr->loadPixmap( "GEOM", tr( ("ICO_"+name).toLatin1().constData() ), false );
+         
+         QString plugin_name;
+          for ( size_t i = 0; i < info->params.length(); ++i ) {
+            myCreationInfoWdg->addParam( info->params[i].name.in(),
+                                         info->params[i].value.in() );
+            QString value = info->params[i].name.in();
+           if( value == PLUGIN_NAME ) {
+             plugin_name = info->params[i].value.in();
+           }
+         }
+         QString prefix = plugin_name.isEmpty() ? "GEOM" : plugin_name;
+          icon = resMgr->loadPixmap( prefix, tr( ("ICO_"+name).toLatin1().constData() ), false );
           operationName = tr( ("MEN_"+name).toLatin1().constData() );
           if ( operationName.startsWith( "MEN_" ))
             operationName = name; // no translation
           myCreationInfoWdg->setOperation( icon, operationName );
-
-          for ( size_t i = 0; i < info->params.length(); ++i )
-            myCreationInfoWdg->addParam( info->params[i].name.in(),
-                                         info->params[i].value.in() );
         }
       }
     }
@@ -2101,7 +2019,7 @@ void GeometryGUI::updateCreationInfo()
 
 void GeometryGUI::onAutoBringToFront()
 {
-  bool isAutoBringToFront = SUIT_Session::session()->resourceMgr()->booleanValue( "Geometry", "auto_bring_to_front" );
+  bool isAutoBringToFront = SUIT_Session::session()->resourceMgr()->booleanValue( "Geometry", "auto_bring_to_front", "false" );
   if( !isAutoBringToFront )
     return;
   
@@ -2784,10 +2702,10 @@ void GeometryGUI::storeVisualParameters (int savePoint)
     // saving VTK actors properties
     QVector<SUIT_ViewWindow*> views = vman->getViews();
     for (int i = 0, iEnd = vman->getViewsCount(); i < iEnd; i++) {
-      const ObjMap anObjects = appStudy->getObjectMap(aMgrId);
+      const ObjMap& anObjects = appStudy->getObjectProperties(aMgrId);
       ObjMap::ConstIterator o_it = anObjects.begin();
       for (; o_it != anObjects.end(); o_it++) {
-        const PropMap aProps = o_it.value();
+        const PropMap& aProps = o_it.value();
 
         //Check that object exists in the study
         _PTR(SObject) obj( studyDS->FindObjectID( o_it.key().toLatin1().data() ) );
@@ -2866,6 +2784,11 @@ void GeometryGUI::storeVisualParameters (int savePoint)
           ip->setParameter(entry, param.toStdString(), aProps.value(GEOM::propertyName( GEOM::EdgesDirection )).toString().toStdString());
         }
 
+        if (aProps.contains(GEOM::propertyName( GEOM::Vertices ))) {
+          param = occParam + GEOM::propertyName( GEOM::Vertices );
+          ip->setParameter(entry, param.toStdString(), aProps.value(GEOM::propertyName( GEOM::Vertices )).toString().toStdString());
+        }
+
         if (aProps.contains(GEOM::propertyName( GEOM::Deflection ))) {
           param = occParam + GEOM::propertyName( GEOM::Deflection );
           ip->setParameter(entry, param.toStdString(), aProps.value(GEOM::propertyName( GEOM::Deflection )).toString().toStdString());
@@ -3036,6 +2959,8 @@ void GeometryGUI::restoreVisualParameters (int savePoint)
         aListOfMap[viewIndex].insert( GEOM::propertyName( GEOM::Texture ), val );
       } else if (paramNameStr == GEOM::propertyName( GEOM::EdgesDirection )) {
         aListOfMap[viewIndex].insert( GEOM::propertyName( GEOM::EdgesDirection ), val == "true" || val == "1");
+      } else if (paramNameStr == GEOM::propertyName( GEOM::Vertices )) {
+        aListOfMap[viewIndex].insert( GEOM::propertyName( GEOM::Vertices ), val == "true" || val == "1");
       } else if (paramNameStr == GEOM::propertyName( GEOM::Deflection )) {
         aListOfMap[viewIndex].insert( GEOM::propertyName( GEOM::Deflection ), val.toDouble());
       } else if (paramNameStr == GEOM::propertyName( GEOM::PointMarker )) {
@@ -3052,8 +2977,7 @@ void GeometryGUI::restoreVisualParameters (int savePoint)
     QList<SUIT_ViewManager*> lst = getApp()->viewManagers();
 
     for (int index = 0; index < aListOfMap.count(); index++) {
-
-      appStudy->setObjectPropMap(index, entry, aListOfMap[index]);
+      appStudy->setObjectProperties(index, entry, aListOfMap[index]);
 
       //Get Visibility property of the current PropMap
       if (aListOfMap[index].value(GEOM::propertyName( GEOM::Visibility )) == 1) {
@@ -3089,13 +3013,19 @@ void GeometryGUI::onViewAboutToShow()
 {
   SUIT_ViewWindow* window = application()->desktop()->activeWindow();
   QAction* a = action( GEOMOp::OpSwitchVectors );
+  QAction* aVerticesAction = action( GEOMOp::OpSwitchVertices );
   if ( window ) {
     a->setEnabled(true);
     bool vmode = window->property("VectorsMode").toBool();
     a->setText ( vmode == 1 ? tr( "MEN_VECTOR_MODE_OFF" ) : tr("MEN_VECTOR_MODE_ON") );
+    aVerticesAction->setEnabled(true);
+    vmode = window->property("VerticesMode").toBool();
+    aVerticesAction->setText ( vmode == 1 ? tr( "MEN_VERTICES_MODE_OFF" ) : tr("MEN_VERTICES_MODE_ON") );
   } else {
     a->setText ( tr("MEN_VECTOR_MODE_ON") );
     a->setEnabled(false);
+    aVerticesAction->setText ( tr("MEN_VERTICES_MODE_ON") );
+    aVerticesAction->setEnabled(false);
   }
 }