+ // ----- create actions --------------
+
+ //createSMESHAction( SMESHOp::OpImportDAT, "IMPORT_DAT", "", (Qt::CTRL+Qt::Key_B) );
+ createSMESHAction( SMESHOp::OpImportUNV, "IMPORT_UNV", "", (Qt::CTRL+Qt::Key_I) );
+ createSMESHAction( SMESHOp::OpImportMED, "IMPORT_MED", "", (Qt::CTRL+Qt::Key_M) );
+ createSMESHAction( SMESHOp::OpImportSTL, "IMPORT_STL" );
+#ifdef WITH_CGNS
+ createSMESHAction( SMESHOp::OpImportCGNS, "IMPORT_CGNS" );
+#endif
+ createSMESHAction( SMESHOp::OpImportSAUV, "IMPORT_SAUV" );
+ createSMESHAction( SMESHOp::OpImportGMF, "IMPORT_GMF" );
+ createSMESHAction( SMESHOp::OpPopupImportUNV, "IMPORT_UNV");
+ createSMESHAction( SMESHOp::OpPopupImportMED, "IMPORT_MED");
+ createSMESHAction( SMESHOp::OpPopupImportSTL, "IMPORT_STL" );
+#ifdef WITH_CGNS
+ createSMESHAction( SMESHOp::OpPopupImportCGNS, "IMPORT_CGNS" );
+#endif
+ createSMESHAction( SMESHOp::OpPopupImportSAUV, "IMPORT_SAUV" );
+ createSMESHAction( SMESHOp::OpPopupImportGMF, "IMPORT_GMF" );
+
+ createSMESHAction( SMESHOp::OpExportDAT, "DAT" );
+ createSMESHAction( SMESHOp::OpExportMED, "MED" );
+ createSMESHAction( SMESHOp::OpExportUNV, "UNV" );
+ createSMESHAction( SMESHOp::OpExportSTL, "STL" );
+#ifdef WITH_CGNS
+ createSMESHAction( SMESHOp::OpExportCGNS, "CGNS");
+#endif
+ createSMESHAction( SMESHOp::OpExportSAUV, "SAUV");
+ createSMESHAction( SMESHOp::OpExportGMF, "GMF" );
+ createSMESHAction( SMESHOp::OpPopupExportDAT, "DAT" );
+ createSMESHAction( SMESHOp::OpPopupExportMED, "MED" );
+ createSMESHAction( SMESHOp::OpPopupExportUNV, "UNV" );
+ createSMESHAction( SMESHOp::OpPopupExportSTL, "STL" );
+#ifdef WITH_CGNS
+ createSMESHAction( SMESHOp::OpPopupExportCGNS, "CGNS");
+#endif
+ createSMESHAction( SMESHOp::OpPopupExportSAUV, "SAUV");
+ createSMESHAction( SMESHOp::OpPopupExportGMF, "GMF" );
+ createSMESHAction( SMESHOp::OpFileInformation, "FILE_INFO" );
+ createSMESHAction( SMESHOp::OpDelete, "DELETE", "ICON_DELETE", Qt::Key_Delete );
+ createSMESHAction( SMESHOp::OpSelectFiltersLibrary, "SEL_FILTER_LIB" );
+ createSMESHAction( SMESHOp::OpCreateMesh, "CREATE_MESH", "ICON_DLG_INIT_MESH" );
+ createSMESHAction( SMESHOp::OpCreateSubMesh, "CREATE_SUBMESH", "ICON_DLG_ADD_SUBMESH" );
+ createSMESHAction( SMESHOp::OpEditMeshOrSubMesh, "EDIT_MESHSUBMESH", "ICON_DLG_EDIT_MESH" );
+ createSMESHAction( SMESHOp::OpEditMesh, "EDIT_MESH", "ICON_DLG_EDIT_MESH" );
+ createSMESHAction( SMESHOp::OpEditSubMesh, "EDIT_SUBMESH", "ICON_DLG_EDIT_MESH" );
+ createSMESHAction( SMESHOp::OpBuildCompoundMesh, "BUILD_COMPOUND", "ICON_BUILD_COMPOUND" );
+ createSMESHAction( SMESHOp::OpCopyMesh, "COPY_MESH", "ICON_COPY_MESH" );
+ createSMESHAction( SMESHOp::OpCompute, "COMPUTE", "ICON_COMPUTE" );
+ createSMESHAction( SMESHOp::OpComputeSubMesh, "COMPUTE_SUBMESH", "ICON_COMPUTE" );
+ createSMESHAction( SMESHOp::OpPreCompute, "PRECOMPUTE", "ICON_PRECOMPUTE" );
+ createSMESHAction( SMESHOp::OpEvaluate, "EVALUATE", "ICON_EVALUATE" );
+ createSMESHAction( SMESHOp::OpMeshOrder, "MESH_ORDER", "ICON_MESH_ORDER");
+ createSMESHAction( SMESHOp::OpCreateGroup, "CREATE_GROUP", "ICON_CREATE_GROUP" );
+ createSMESHAction( SMESHOp::OpCreateGeometryGroup, "CREATE_GEO_GROUP", "ICON_CREATE_GEO_GROUP" );
+ createSMESHAction( SMESHOp::OpConstructGroup, "CONSTRUCT_GROUP", "ICON_CONSTRUCT_GROUP" );
+ createSMESHAction( SMESHOp::OpEditGroup, "EDIT_GROUP", "ICON_EDIT_GROUP" );
+ createSMESHAction( SMESHOp::OpEditGeomGroupAsGroup, "EDIT_GEOMGROUP_AS_GROUP", "ICON_EDIT_GROUP" );
+ createSMESHAction( SMESHOp::OpUnionGroups, "UN_GROUP", "ICON_UNION" );
+ createSMESHAction( SMESHOp::OpIntersectGroups, "INT_GROUP", "ICON_INTERSECT" );
+ createSMESHAction( SMESHOp::OpCutGroups, "CUT_GROUP", "ICON_CUT" );
+ createSMESHAction( SMESHOp::OpGroupUnderlyingElem, "UNDERLYING_ELEMS", "ICON_UNDERLYING_ELEMS" );
+ createSMESHAction( SMESHOp::OpFaceGroupsByEdges, "FACE_GROUPS_BY_EDGES", "ICON_FACE_GROUPS_BY_EDGES" );
+ createSMESHAction( SMESHOp::OpAddElemGroupPopup, "ADD_TO_GROUP" );
+ createSMESHAction( SMESHOp::OpRemoveElemGroupPopup, "REMOVE_FROM_GROUP" );
+ createSMESHAction( SMESHOp::OpDeleteGroup, "DEL_GROUP", "ICON_DEL_GROUP" );
+ createSMESHAction( SMESHOp::OpMeshInformation , "ADV_INFO", "ICON_ADV_INFO" );
+ //createSMESHAction( SMESHOp::OpStdInfo, "STD_INFO", "ICON_STD_INFO" );
+ //createSMESHAction( SMESHOp::OpWhatIs, "WHAT_IS", "ICON_WHAT_IS" ); // VSR: issue #0021242 (eliminate "Mesh Element Information" command)
+ createSMESHAction( SMESHOp::OpFindElementByPoint, "FIND_ELEM", "ICON_FIND_ELEM" );
+ //update
+ createSMESHAction( SMESHOp::OpFreeNode, "FREE_NODE", "ICON_FREE_NODE", 0, true );
+ createSMESHAction( SMESHOp::OpEqualNode, "EQUAL_NODE", "ICON_EQUAL_NODE", 0, true );
+ createSMESHAction( SMESHOp::OpNodeConnectivityNb, "NODE_CONNECTIVITY_NB", "ICON_NODE_CONN_NB", 0, true );
+ createSMESHAction( SMESHOp::OpFreeEdge, "FREE_EDGE", "ICON_FREE_EDGE", 0, true );
+ createSMESHAction( SMESHOp::OpFreeBorder, "FREE_BORDER", "ICON_FREE_EDGE_2D", 0, true );
+ createSMESHAction( SMESHOp::OpLength, "LENGTH", "ICON_LENGTH", 0, true );
+ createSMESHAction( SMESHOp::OpConnection, "CONNECTION", "ICON_CONNECTION", 0, true );
+ createSMESHAction( SMESHOp::OpEqualEdge, "EQUAL_EDGE", "ICON_EQUAL_EDGE", 0, true );
+ createSMESHAction( SMESHOp::OpFreeFace, "FREE_FACES", "ICON_FREE_FACES", 0, true );
+ createSMESHAction( SMESHOp::OpBareBorderFace, "BARE_BORDER_FACE", "ICON_BARE_BORDER_FACE", 0, true );
+ createSMESHAction( SMESHOp::OpOverConstrainedFace, "OVER_CONSTRAINED_FACE", "ICON_OVER_CONSTRAINED_FACE", 0, true );
+ createSMESHAction( SMESHOp::OpLength2D, "LENGTH_2D", "ICON_LENGTH_2D", 0, true );
+ createSMESHAction( SMESHOp::OpDeflection2D, "DEFLECTION_2D", "ICON_DEFLECTION_2D", 0, true );
+ createSMESHAction( SMESHOp::OpConnection2D, "CONNECTION_2D", "ICON_CONNECTION_2D", 0, true );
+ createSMESHAction( SMESHOp::OpArea, "AREA", "ICON_AREA", 0, true );
+ createSMESHAction( SMESHOp::OpTaper, "TAPER", "ICON_TAPER", 0, true );
+ createSMESHAction( SMESHOp::OpAspectRatio, "ASPECT", "ICON_ASPECT", 0, true );
+ createSMESHAction( SMESHOp::OpMinimumAngle, "MIN_ANG", "ICON_ANGLE", 0, true );
+ createSMESHAction( SMESHOp::OpWarpingAngle, "WARP", "ICON_WARP", 0, true );
+ createSMESHAction( SMESHOp::OpSkew, "SKEW", "ICON_SKEW", 0, true );
+ createSMESHAction( SMESHOp::OpMaxElementLength2D, "MAX_ELEMENT_LENGTH_2D", "ICON_MAX_ELEMENT_LENGTH_2D", 0, true );
+ createSMESHAction( SMESHOp::OpEqualFace, "EQUAL_FACE", "ICON_EQUAL_FACE", 0, true );
+ createSMESHAction( SMESHOp::OpAspectRatio3D, "ASPECT_3D", "ICON_ASPECT_3D", 0, true );
+ createSMESHAction( SMESHOp::OpVolume, "VOLUME_3D", "ICON_VOLUME_3D", 0, true );
+ createSMESHAction( SMESHOp::OpMaxElementLength3D, "MAX_ELEMENT_LENGTH_3D", "ICON_MAX_ELEMENT_LENGTH_3D", 0, true );
+ createSMESHAction( SMESHOp::OpBareBorderVolume, "BARE_BORDER_VOLUME", "ICON_BARE_BORDER_VOLUME", 0, true );
+ createSMESHAction( SMESHOp::OpOverConstrainedVolume, "OVER_CONSTRAINED_VOLUME", "ICON_OVER_CONSTRAINED_VOLUME", 0, true );
+ createSMESHAction( SMESHOp::OpEqualVolume, "EQUAL_VOLUME", "ICON_EQUAL_VOLUME", 0, true );
+ createSMESHAction( SMESHOp::OpOverallMeshQuality, "OVERALL_MESH_QUALITY", "ICON_OVL_MESH_QUALITY" );
+
+ createSMESHAction( SMESHOp::OpNode, "NODE", "ICON_DLG_NODE" );
+ createSMESHAction( SMESHOp::OpElem0D, "ELEM0D", "ICON_DLG_ELEM0D" );
+ createSMESHAction( SMESHOp::OpElem0DOnElemNodes, "0D_ON_ALL_NODES", "ICON_0D_ON_ALL_NODES" );
+ createSMESHAction( SMESHOp::OpBall, "BALL", "ICON_DLG_BALL" );
+ createSMESHAction( SMESHOp::OpEdge, "EDGE", "ICON_DLG_EDGE" );
+ createSMESHAction( SMESHOp::OpTriangle, "TRIANGLE", "ICON_DLG_TRIANGLE" );
+ createSMESHAction( SMESHOp::OpQuadrangle, "QUAD", "ICON_DLG_QUADRANGLE" );
+ createSMESHAction( SMESHOp::OpPolygon, "POLYGON", "ICON_DLG_POLYGON" );
+ createSMESHAction( SMESHOp::OpTetrahedron, "TETRA", "ICON_DLG_TETRAS" );
+ createSMESHAction( SMESHOp::OpHexahedron, "HEXA", "ICON_DLG_HEXAS" );
+ createSMESHAction( SMESHOp::OpPentahedron, "PENTA", "ICON_DLG_PENTA" );
+ createSMESHAction( SMESHOp::OpPyramid , "PYRAMID", "ICON_DLG_PYRAMID" );
+ createSMESHAction( SMESHOp::OpHexagonalPrism, "OCTA", "ICON_DLG_OCTA" );
+ createSMESHAction( SMESHOp::OpPolyhedron, "POLYHEDRON", "ICON_DLG_POLYHEDRON" );
+ createSMESHAction( SMESHOp::OpQuadraticEdge, "QUADRATIC_EDGE", "ICON_DLG_QUADRATIC_EDGE" );
+ createSMESHAction( SMESHOp::OpQuadraticTriangle, "QUADRATIC_TRIANGLE", "ICON_DLG_QUADRATIC_TRIANGLE" );
+ createSMESHAction( SMESHOp::OpBiQuadraticTriangle, "BIQUADRATIC_TRIANGLE", "ICON_DLG_BIQUADRATIC_TRIANGLE" );
+ createSMESHAction( SMESHOp::OpQuadraticQuadrangle, "QUADRATIC_QUADRANGLE", "ICON_DLG_QUADRATIC_QUADRANGLE" );
+ createSMESHAction( SMESHOp::OpBiQuadraticQuadrangle, "BIQUADRATIC_QUADRANGLE", "ICON_DLG_BIQUADRATIC_QUADRANGLE" );
+ createSMESHAction( SMESHOp::OpQuadraticPolygon, "QUADRATIC_POLYGON", "ICON_DLG_QUADRATIC_POLYGON" );
+ createSMESHAction( SMESHOp::OpQuadraticTetrahedron, "QUADRATIC_TETRAHEDRON", "ICON_DLG_QUADRATIC_TETRAHEDRON" );
+ createSMESHAction( SMESHOp::OpQuadraticPyramid, "QUADRATIC_PYRAMID", "ICON_DLG_QUADRATIC_PYRAMID" );
+ createSMESHAction( SMESHOp::OpQuadraticPentahedron, "QUADRATIC_PENTAHEDRON", "ICON_DLG_QUADRATIC_PENTAHEDRON" );
+ createSMESHAction( SMESHOp::OpBiQuadraticPentahedron, "BIQUADRATIC_PENTAHEDRON", "ICON_DLG_BIQUADRATIC_PENTAHEDRON" );
+ createSMESHAction( SMESHOp::OpQuadraticHexahedron, "QUADRATIC_HEXAHEDRON", "ICON_DLG_QUADRATIC_HEXAHEDRON" );
+ createSMESHAction( SMESHOp::OpTriQuadraticHexahedron, "TRIQUADRATIC_HEXAHEDRON", "ICON_DLG_TRIQUADRATIC_HEXAHEDRON" );
+
+ createSMESHAction( SMESHOp::OpRemoveNodes, "REMOVE_NODES", "ICON_DLG_REM_NODE" );
+ createSMESHAction( SMESHOp::OpRemoveElements, "REMOVE_ELEMENTS", "ICON_DLG_REM_ELEMENT" );
+ createSMESHAction( SMESHOp::OpRemoveOrphanNodes, "REMOVE_ORPHAN_NODES", "ICON_DLG_REM_ORPHAN_NODES" );
+ createSMESHAction( SMESHOp::OpClearMesh, "CLEAR_MESH", "ICON_CLEAR_MESH" );
+
+ //createSMESHAction( SMESHOp::OpRenumberingNodes, "RENUM_NODES", "ICON_DLG_RENUMBERING_NODES" );
+ //createSMESHAction( SMESHOp::OpRenumberingElements, "RENUM_ELEMENTS", "ICON_DLG_RENUMBERING_ELEMENTS" );
+
+ createSMESHAction( SMESHOp::OpTranslation, "TRANS", "ICON_SMESH_TRANSLATION_VECTOR" );
+ createSMESHAction( SMESHOp::OpRotation, "ROT", "ICON_DLG_MESH_ROTATION" );
+ createSMESHAction( SMESHOp::OpSymmetry, "SYM", "ICON_SMESH_SYMMETRY_PLANE" );
+ createSMESHAction( SMESHOp::OpScale, "SCALE", "ICON_DLG_MESH_SCALE" );
+ createSMESHAction( SMESHOp::OpOffset, "OFFSET", "ICON_DLG_MESH_OFFSET" );
+ createSMESHAction( SMESHOp::OpSewing, "SEW", "ICON_SMESH_SEWING_FREEBORDERS" );
+ createSMESHAction( SMESHOp::OpMergeNodes, "MERGE", "ICON_SMESH_MERGE_NODES" );
+ createSMESHAction( SMESHOp::OpMergeElements, "MERGE_ELEMENTS", "ICON_DLG_MERGE_ELEMENTS" );
+ createSMESHAction( SMESHOp::OpMoveNode, "MESH_THROU_POINT","ICON_DLG_MOVE_NODE" );
+ createSMESHAction( SMESHOp::OpDuplicateNodes, "DUPLICATE_NODES", "ICON_SMESH_DUPLICATE_NODES" );
+ createSMESHAction( SMESHOp::OpDiagonalInversion, "INV", "ICON_DLG_MESH_DIAGONAL" );
+ createSMESHAction( SMESHOp::OpUnionOfTwoTriangle, "UNION2", "ICON_UNION2TRI" );
+ createSMESHAction( SMESHOp::OpOrientation, "ORIENT", "ICON_DLG_MESH_ORIENTATION" );
+ createSMESHAction( SMESHOp::OpReorientFaces, "REORIENT_2D", "ICON_REORIENT_2D" );
+ createSMESHAction( SMESHOp::OpUnionOfTriangles, "UNION", "ICON_UNIONTRI" );
+ createSMESHAction( SMESHOp::OpCuttingOfQuadrangles, "CUT", "ICON_CUTQUAD" );
+ createSMESHAction( SMESHOp::OpSplitVolumes, "SPLIT_TO_TETRA", "ICON_SPLIT_TO_TETRA" );
+ createSMESHAction( SMESHOp::OpSplitBiQuadratic, "SPLIT_BIQUAD", "ICON_SPLIT_BIQUAD" );
+ createSMESHAction( SMESHOp::OpSmoothing, "SMOOTH", "ICON_DLG_SMOOTHING" );
+ createSMESHAction( SMESHOp::OpExtrusion, "EXTRUSION", "ICON_EXTRUSION" );
+ createSMESHAction( SMESHOp::OpExtrusionAlongAPath, "EXTRUSION_ALONG", "ICON_EXTRUSION_ALONG" );
+ createSMESHAction( SMESHOp::OpRevolution, "REVOLUTION", "ICON_REVOLUTION" );
+ createSMESHAction( SMESHOp::OpPatternMapping, "MAP", "ICON_MAP" );
+ createSMESHAction( SMESHOp::OpConvertMeshToQuadratic, "CONV_TO_QUAD", "ICON_CONV_TO_QUAD" );
+ createSMESHAction( SMESHOp::OpCreateBoundaryElements, "2D_FROM_3D", "ICON_2D_FROM_3D" );
+
+ createSMESHAction( SMESHOp::OpReset, "RESET" );
+ createSMESHAction( SMESHOp::OpScalarBarProperties, "SCALAR_BAR_PROP" );
+ createSMESHAction( SMESHOp::OpShowScalarBar, "SHOW_SCALAR_BAR","",0, true );
+ createSMESHAction( SMESHOp::OpSaveDistribution, "SAVE_DISTRIBUTION" );
+ createSMESHAction( SMESHOp::OpShowDistribution, "SHOW_DISTRIBUTION","",0, true );
+#ifndef DISABLE_PLOT2DVIEWER
+ createSMESHAction( SMESHOp::OpPlotDistribution, "PLOT_DISTRIBUTION" );
+#endif
+ createSMESHAction( SMESHOp::OpDMWireframe, "WIRE", "ICON_WIRE", 0, true );
+ createSMESHAction( SMESHOp::OpDMShading, "SHADE", "ICON_SHADE", 0, true );
+ createSMESHAction( SMESHOp::OpDMNodes, "NODES", "ICON_POINTS", 0, true );
+ createSMESHAction( SMESHOp::OpDMShrink, "SHRINK", "ICON_SHRINK", 0, true );
+ createSMESHAction( SMESHOp::OpUpdate, "UPDATE", "ICON_UPDATE" );
+ createSMESHAction( SMESHOp::OpDE0DElements, "ELEMS0D", "ICON_DLG_ELEM0D", 0, true );
+ createSMESHAction( SMESHOp::OpDEEdges, "EDGES", "ICON_DLG_EDGE", 0, true );
+ createSMESHAction( SMESHOp::OpDEFaces, "FACES", "ICON_DLG_TRIANGLE", 0, true );
+ createSMESHAction( SMESHOp::OpDEVolumes, "VOLUMES", "ICON_DLG_TETRAS", 0, true );
+ createSMESHAction( SMESHOp::OpDEBalls, "BALLS", "ICON_DLG_BALL", 0, true );
+ createSMESHAction( SMESHOp::OpDEChoose, "CHOOSE", "ICON_DLG_CHOOSE", 0, false );
+ createSMESHAction( SMESHOp::OpDEAllEntity, "ALL", "ICON_DLG_CHOOSE_ALL", 0, false );
+ createSMESHAction( SMESHOp::OpOrientationOnFaces, "FACE_ORIENTATION", "", 0, true );
+
+ createSMESHAction( SMESHOp::OpRepresentationLines, "LINE_REPRESENTATION", "", 0, true );
+ createSMESHAction( SMESHOp::OpRepresentationArcs, "ARC_REPRESENTATION", "", 0, true );
+
+ createSMESHAction( SMESHOp::OpEditHypothesis, "EDIT_HYPO" );
+ createSMESHAction( SMESHOp::OpUnassign, "UNASSIGN" );
+ createSMESHAction( SMESHOp::OpNumberingNodes, "NUM_NODES", "", 0, true );
+ createSMESHAction( SMESHOp::OpNumberingElements, "NUM_ELEMENTS", "", 0, true );
+ createSMESHAction( SMESHOp::OpProperties, "COLORS" );
+ createSMESHAction( SMESHOp::OpTransparency, "TRANSP" );
+ createSMESHAction( SMESHOp::OpClipping, "CLIP" );
+ createSMESHAction( SMESHOp::OpAutoColor, "AUTO_COLOR" );
+ createSMESHAction( SMESHOp::OpDisableAutoColor, "DISABLE_AUTO_COLOR" );
+
+ createSMESHAction( SMESHOp::OpMinimumDistance, "MEASURE_MIN_DIST", "ICON_MEASURE_MIN_DIST" );
+ createSMESHAction( SMESHOp::OpBoundingBox, "MEASURE_BND_BOX", "ICON_MEASURE_BND_BOX" );
+ createSMESHAction( SMESHOp::OpPropertiesLength, "MEASURE_LENGTH", "ICON_MEASURE_LENGTH" );
+ createSMESHAction( SMESHOp::OpPropertiesArea, "MEASURE_AREA", "ICON_MEASURE_AREA" );
+ createSMESHAction( SMESHOp::OpPropertiesVolume, "MEASURE_VOLUME", "ICON_MEASURE_VOLUME" );
+ createSMESHAction( SMESHOp::OpAngle, "MEASURE_ANGLE", "ICON_MEASURE_ANGLE" );
+
+ createSMESHAction( SMESHOp::OpHide, "HIDE", "ICON_HIDE" );
+ createSMESHAction( SMESHOp::OpShow, "SHOW", "ICON_SHOW" );
+ createSMESHAction( SMESHOp::OpShowOnly, "DISPLAY_ONLY" );
+
+ createSMESHAction( SMESHOp::OpSortChild, "SORT_CHILD_ITEMS" );
+
+ QList<int> aCtrlActions;
+ aCtrlActions << SMESHOp::OpFreeNode << SMESHOp::OpEqualNode
+ << SMESHOp::OpNodeConnectivityNb // node controls
+ << SMESHOp::OpFreeEdge << SMESHOp::OpFreeBorder
+ << SMESHOp::OpLength << SMESHOp::OpConnection << SMESHOp::OpEqualEdge // edge controls
+ << SMESHOp::OpDeflection2D
+ << SMESHOp::OpFreeFace << SMESHOp::OpLength2D << SMESHOp::OpConnection2D
+ << SMESHOp::OpArea << SMESHOp::OpTaper << SMESHOp::OpAspectRatio
+ << SMESHOp::OpMinimumAngle << SMESHOp::OpWarpingAngle << SMESHOp::OpSkew
+ << SMESHOp::OpMaxElementLength2D << SMESHOp::OpBareBorderFace
+ << SMESHOp::OpOverConstrainedFace << SMESHOp::OpEqualFace // face controls
+ << SMESHOp::OpAspectRatio3D << SMESHOp::OpVolume
+ << SMESHOp::OpMaxElementLength3D << SMESHOp::OpBareBorderVolume
+ << SMESHOp::OpOverConstrainedVolume << SMESHOp::OpEqualVolume; // volume controls
+ QActionGroup* aCtrlGroup = new QActionGroup( application()->desktop() );
+ aCtrlGroup->setExclusive( true );
+ for( int i = 0; i < aCtrlActions.size(); i++ )
+ aCtrlGroup->addAction( action( aCtrlActions[i] ) );
+
+ // ----- create menu --------------
+ int fileId = createMenu( tr( "MEN_FILE" ), -1, 1 ),
+ editId = createMenu( tr( "MEN_EDIT" ), -1, 3 ),
+ toolsId = createMenu( tr( "MEN_TOOLS" ), -1, 5, 50 ),
+ meshId = createMenu( tr( "MEN_MESH" ), -1, 70, 10 ),
+ ctrlId = createMenu( tr( "MEN_CTRL" ), -1, 60, 10 ),
+ modifyId = createMenu( tr( "MEN_MODIFY" ), -1, 40, 10 ),
+ measureId = createMenu( tr( "MEN_MEASURE" ), -1, 50, 10 ),
+ viewId = createMenu( tr( "MEN_VIEW" ), -1, 2 );
+
+ createMenu( separator(), fileId );
+
+ QMenu* nodeMenu = new QMenu(); QMenu* edgeMenu = new QMenu();
+ QMenu* faceMenu = new QMenu(); QMenu* volumeMenu = new QMenu();
+ int importId = createMenu( tr( "MEN_IMPORT" ), fileId, -1, 10 ),
+ exportId = createMenu( tr( "MEN_EXPORT" ), fileId, -1, 10 ),
+ nodeId = createMenu( tr( "MEN_NODE_CTRL" ), ctrlId, -1, 10, -1, nodeMenu ),
+ edgeId = createMenu( tr( "MEN_EDGE_CTRL" ), ctrlId, -1, 10, -1, edgeMenu ),
+ faceId = createMenu( tr( "MEN_FACE_CTRL" ), ctrlId, -1, 10, -1, faceMenu ),
+ volumeId = createMenu( tr( "MEN_VOLUME_CTRL" ), ctrlId, -1, 10, -1, volumeMenu ),
+ addId = createMenu( tr( "MEN_ADD" ), modifyId, 402 ),
+ removeId = createMenu( tr( "MEN_REMOVE" ), modifyId, 403 ),
+ //renumId = createMenu( tr( "MEN_RENUM" ), modifyId, 404 ),
+ transfId = createMenu( tr( "MEN_TRANSF" ), modifyId, 405 ),
+ basicPropId = createMenu( tr( "MEN_BASIC_PROPERTIES" ), measureId, -1, 10 );
+
+ //createMenu( SMESHOp::OpImportDAT, importId, -1 );
+ createMenu( SMESHOp::OpImportUNV, importId, -1 );
+ createMenu( SMESHOp::OpImportMED, importId, -1 );
+ createMenu( SMESHOp::OpImportSTL, importId, -1 );
+#ifdef WITH_CGNS
+ createMenu( SMESHOp::OpImportCGNS, importId, -1 );
+#endif
+ createMenu( SMESHOp::OpImportSAUV, importId, -1 );
+ createMenu( SMESHOp::OpImportGMF, importId, -1 );
+ createMenu( SMESHOp::OpExportDAT, exportId, -1 );
+ createMenu( SMESHOp::OpExportMED, exportId, -1 );
+ createMenu( SMESHOp::OpExportUNV, exportId, -1 );
+ createMenu( SMESHOp::OpExportSTL, exportId, -1 );
+#ifdef WITH_CGNS
+ createMenu( SMESHOp::OpExportCGNS, exportId, -1 );
+#endif
+ createMenu( SMESHOp::OpExportSAUV, exportId, -1 );
+ createMenu( SMESHOp::OpExportGMF, exportId, -1 );
+ createMenu( separator(), fileId, 10 );
+
+ createMenu( SMESHOp::OpDelete, editId, -1 );
+
+ createMenu( SMESHOp::OpSelectFiltersLibrary, toolsId, -1 );
+
+ createMenu( SMESHOp::OpCreateMesh, meshId, -1 ); // "Mesh" menu
+ createMenu( SMESHOp::OpCreateSubMesh, meshId, -1 );
+ createMenu( SMESHOp::OpEditMeshOrSubMesh, meshId, -1 );
+ createMenu( SMESHOp::OpBuildCompoundMesh, meshId, -1 );
+ createMenu( SMESHOp::OpCopyMesh, meshId, -1 );
+ createMenu( separator(), meshId, -1 );
+ createMenu( SMESHOp::OpCompute, meshId, -1 );
+ createMenu( SMESHOp::OpPreCompute, meshId, -1 );
+ createMenu( SMESHOp::OpEvaluate, meshId, -1 );
+ createMenu( SMESHOp::OpMeshOrder, meshId, -1 );
+ createMenu( separator(), meshId, -1 );
+ createMenu( SMESHOp::OpCreateGroup, meshId, -1 );
+ createMenu( SMESHOp::OpCreateGeometryGroup, meshId, -1 );
+ createMenu( SMESHOp::OpConstructGroup, meshId, -1 );
+ createMenu( SMESHOp::OpEditGroup, meshId, -1 );
+ createMenu( SMESHOp::OpEditGeomGroupAsGroup, meshId, -1 );
+ createMenu( separator(), meshId, -1 );
+ createMenu( SMESHOp::OpUnionGroups, meshId, -1 );
+ createMenu( SMESHOp::OpIntersectGroups, meshId, -1 );
+ createMenu( SMESHOp::OpCutGroups, meshId, -1 );
+ createMenu( separator(), meshId, -1 );
+ createMenu( SMESHOp::OpGroupUnderlyingElem, meshId, -1 );
+ createMenu( SMESHOp::OpFaceGroupsByEdges, meshId, -1 );
+ createMenu( separator(), meshId, -1 );
+ createMenu( SMESHOp::OpMeshInformation, meshId, -1 );
+ //createMenu( SMESHOp::OpStdInfo, meshId, -1 );
+ //createMenu( SMESHOp::OpWhatIs, meshId, -1 ); // VSR: issue #0021242 (eliminate "Mesh Element Information" command)
+ createMenu( SMESHOp::OpFindElementByPoint, meshId, -1 );
+ createMenu( separator(), meshId, -1 );
+
+ createMenu( SMESHOp::OpFreeNode, nodeId, -1 );
+ createMenu( SMESHOp::OpEqualNode, nodeId, -1 );
+ //createMenu( SMESHOp::OpNodeConnectivityNb, nodeId, -1 );
+ createMenu( SMESHOp::OpFreeBorder, edgeId, -1 );
+ createMenu( SMESHOp::OpLength, edgeId, -1 );
+ createMenu( SMESHOp::OpConnection, edgeId, -1 );
+ createMenu( SMESHOp::OpEqualEdge, edgeId, -1 );
+ createMenu( SMESHOp::OpFreeEdge, faceId, -1 );
+ createMenu( SMESHOp::OpFreeFace, faceId, -1 );
+ createMenu( SMESHOp::OpBareBorderFace, faceId, -1 );
+ createMenu( SMESHOp::OpOverConstrainedFace, faceId, -1 );
+ createMenu( SMESHOp::OpLength2D, faceId, -1 );
+ createMenu( SMESHOp::OpConnection2D, faceId, -1 );
+ createMenu( SMESHOp::OpArea, faceId, -1 );
+ createMenu( SMESHOp::OpTaper, faceId, -1 );
+ createMenu( SMESHOp::OpAspectRatio, faceId, -1 );
+ createMenu( SMESHOp::OpMinimumAngle, faceId, -1 );
+ createMenu( SMESHOp::OpWarpingAngle, faceId, -1 );
+ createMenu( SMESHOp::OpSkew, faceId, -1 );
+ createMenu( SMESHOp::OpMaxElementLength2D, faceId, -1 );
+ createMenu( SMESHOp::OpEqualFace, faceId, -1 );
+ createMenu( SMESHOp::OpDeflection2D, faceId, -1 );
+ createMenu( SMESHOp::OpAspectRatio3D, volumeId, -1 );
+ createMenu( SMESHOp::OpVolume, volumeId, -1 );
+ createMenu( SMESHOp::OpMaxElementLength3D, volumeId, -1 );
+ createMenu( SMESHOp::OpBareBorderVolume, volumeId, -1 );
+ createMenu( SMESHOp::OpOverConstrainedVolume, volumeId, -1 );
+ createMenu( SMESHOp::OpEqualVolume, volumeId, -1 );
+ createMenu( separator(), ctrlId, -1 );
+ createMenu( SMESHOp::OpReset, ctrlId, -1 );
+ createMenu( separator(), ctrlId, -1 );
+ createMenu( SMESHOp::OpOverallMeshQuality, ctrlId, -1 );
+
+ createMenu( SMESHOp::OpNode, addId, -1 );
+ createMenu( SMESHOp::OpElem0D, addId, -1 );
+ createMenu( SMESHOp::OpElem0DOnElemNodes, addId, -1 );
+ createMenu( SMESHOp::OpBall, addId, -1 );
+ createMenu( SMESHOp::OpEdge, addId, -1 );
+ createMenu( SMESHOp::OpTriangle, addId, -1 );
+ createMenu( SMESHOp::OpQuadrangle, addId, -1 );
+ createMenu( SMESHOp::OpPolygon, addId, -1 );
+ createMenu( SMESHOp::OpTetrahedron, addId, -1 );
+ createMenu( SMESHOp::OpHexahedron, addId, -1 );
+ createMenu( SMESHOp::OpPentahedron, addId, -1 );
+ createMenu( SMESHOp::OpPyramid, addId, -1 );
+ createMenu( SMESHOp::OpHexagonalPrism, addId, -1 );
+ createMenu( SMESHOp::OpPolyhedron, addId, -1 );
+ createMenu( separator(), addId, -1 );
+ createMenu( SMESHOp::OpQuadraticEdge, addId, -1 );
+ createMenu( SMESHOp::OpQuadraticTriangle, addId, -1 );
+ createMenu( SMESHOp::OpBiQuadraticTriangle , addId, -1 );
+ createMenu( SMESHOp::OpQuadraticQuadrangle, addId, -1 );
+ createMenu( SMESHOp::OpBiQuadraticQuadrangle, addId, -1 );
+ createMenu( SMESHOp::OpQuadraticPolygon, addId, -1 );
+ createMenu( SMESHOp::OpQuadraticTetrahedron, addId, -1 );
+ createMenu( SMESHOp::OpQuadraticPyramid, addId, -1 );
+ createMenu( SMESHOp::OpQuadraticPentahedron, addId, -1 );
+ createMenu( SMESHOp::OpBiQuadraticPentahedron, addId, -1 );
+ createMenu( SMESHOp::OpQuadraticHexahedron, addId, -1 );
+ createMenu( SMESHOp::OpTriQuadraticHexahedron, addId, -1 );
+
+ createMenu( SMESHOp::OpRemoveNodes, removeId, -1 );
+ createMenu( SMESHOp::OpRemoveElements, removeId, -1 );
+ createMenu( SMESHOp::OpRemoveOrphanNodes, removeId, -1 );
+ createMenu( separator(), removeId, -1 );
+ createMenu( SMESHOp::OpDeleteGroup, removeId, -1 );
+ createMenu( separator(), removeId, -1 );
+ createMenu( SMESHOp::OpClearMesh, removeId, -1 );
+
+ //createMenu( SMESHOp::OpRenumberingNodes, renumId, -1 );
+ //createMenu( SMESHOp::OpRenumberingElements, renumId, -1 );
+
+ createMenu( SMESHOp::OpMergeNodes, transfId, -1 );
+ createMenu( SMESHOp::OpMergeElements, transfId, -1 );
+ createMenu( SMESHOp::OpTranslation, transfId, -1 );
+ createMenu( SMESHOp::OpRotation, transfId, -1 );
+ createMenu( SMESHOp::OpSymmetry, transfId, -1 );
+ createMenu( SMESHOp::OpScale, transfId, -1 );
+ createMenu( SMESHOp::OpOffset, transfId, -1 );
+ createMenu( SMESHOp::OpSewing, transfId, -1 );
+ createMenu( SMESHOp::OpDuplicateNodes, transfId, -1 );
+
+ createMenu( SMESHOp::OpConvertMeshToQuadratic, modifyId, -1 );
+ createMenu( SMESHOp::OpCreateBoundaryElements, modifyId, -1 );
+ createMenu( SMESHOp::OpExtrusion, modifyId, -1 );
+ createMenu( SMESHOp::OpExtrusionAlongAPath, modifyId, -1 );
+ createMenu( SMESHOp::OpRevolution, modifyId, -1 );
+ createMenu( SMESHOp::OpOrientation, modifyId, -1 );
+ createMenu( SMESHOp::OpReorientFaces, modifyId, -1 );
+ createMenu( SMESHOp::OpMoveNode, modifyId, -1 );
+ createMenu( SMESHOp::OpDiagonalInversion, modifyId, -1 );
+ createMenu( SMESHOp::OpUnionOfTwoTriangle, modifyId, -1 );
+ createMenu( SMESHOp::OpUnionOfTriangles, modifyId, -1 );
+ createMenu( SMESHOp::OpCuttingOfQuadrangles, modifyId, -1 );
+ createMenu( SMESHOp::OpSplitVolumes, modifyId, -1 );
+ createMenu( SMESHOp::OpSplitBiQuadratic, modifyId, -1 );
+ createMenu( SMESHOp::OpSmoothing, modifyId, -1 );
+ createMenu( SMESHOp::OpPatternMapping, modifyId, -1 );
+
+ createMenu( SMESHOp::OpMinimumDistance, measureId, -1 );
+ createMenu( SMESHOp::OpBoundingBox, measureId, -1 );
+ createMenu( SMESHOp::OpAngle, measureId, -1 );
+ createMenu( SMESHOp::OpPropertiesLength, basicPropId, -1 );
+ createMenu( SMESHOp::OpPropertiesArea, basicPropId, -1 );
+ createMenu( SMESHOp::OpPropertiesVolume, basicPropId, -1 );
+ createMenu( SMESHOp::OpUpdate, viewId, -1 );
+
+ connect( nodeMenu, SIGNAL( aboutToShow() ), this, SLOT( onUpdateControlActions() ) );
+ connect( edgeMenu, SIGNAL( aboutToShow() ), this, SLOT( onUpdateControlActions() ) );
+ connect( faceMenu, SIGNAL( aboutToShow() ), this, SLOT( onUpdateControlActions() ) );
+ connect( volumeMenu, SIGNAL( aboutToShow() ), this, SLOT( onUpdateControlActions() ) );
+
+ // ----- create toolbars --------------
+ int meshTb = createTool( tr( "TB_MESH" ), QString( "SMESHMeshToolbar" ) ),
+ info = createTool( tr( "TB_INFO" ), QString( "SMESHInformationToolbar" ) ),
+ groupTb = createTool( tr( "TB_GROUP" ), QString( "SMESHGroupToolbar" ) ),
+ ctrl0dTb = createTool( tr( "TB_CTRL0D" ), QString( "SMESHNodeControlsToolbar" ) ),
+ ctrl1dTb = createTool( tr( "TB_CTRL1D" ), QString( "SMESHEdgeControlsToolbar" ) ),
+ ctrl2dTb = createTool( tr( "TB_CTRL2D" ), QString( "SMESHFaceControlsToolbar" ) ),
+ ctrl3dTb = createTool( tr( "TB_CTRL3D" ), QString( "SMESHVolumeControlsToolbar" ) ),
+ addElemTb = createTool( tr( "TB_ADD" ), QString( "SMESHAddElementToolbar" ) ),
+ addNonElemTb = createTool( tr( "TB_ADDNON" ), QString( "SMESHAddElementToolbar" ) ),
+ remTb = createTool( tr( "TB_REM" ), QString( "SMESHRemoveToolbar" ) ),
+ //renumbTb = createTool( tr( "TB_RENUMBER" ), QString( "SMESHRenumberingToolbar" ) ),
+ transformTb = createTool( tr( "TB_TRANSFORM" ), QString( "SMESHTransformationToolbar" ) ),
+ modifyTb = createTool( tr( "TB_MODIFY" ), QString( "SMESHModificationToolbar" ) ),
+ measuremTb = createTool( tr( "TB_MEASUREM" ), QString( "SMESHMeasurementsToolbar" ) ),
+ dispModeTb = createTool( tr( "TB_DISP_MODE" ), QString( "SMESHDisplayModeToolbar" ) );
+
+ createTool( SMESHOp::OpCreateMesh, meshTb );
+ createTool( SMESHOp::OpCreateSubMesh, meshTb );
+ createTool( SMESHOp::OpEditMeshOrSubMesh, meshTb );
+ createTool( SMESHOp::OpBuildCompoundMesh, meshTb );
+ createTool( SMESHOp::OpCopyMesh, meshTb );
+ createTool( separator(), meshTb );
+ createTool( SMESHOp::OpCompute, meshTb );
+ createTool( SMESHOp::OpPreCompute, meshTb );
+ createTool( SMESHOp::OpEvaluate, meshTb );
+ createTool( SMESHOp::OpMeshOrder, meshTb );
+
+ createTool( SMESHOp::OpCreateGroup, groupTb );
+ createTool( SMESHOp::OpCreateGeometryGroup, groupTb );
+ createTool( SMESHOp::OpConstructGroup, groupTb );
+ createTool( SMESHOp::OpEditGroup, groupTb );
+
+ createTool( SMESHOp::OpMeshInformation, info );
+ //createTool( SMESHOp::OpStdInfo, meshTb );
+ //createTool( SMESHOp::OpWhatIs, meshTb ); // VSR: issue #0021242 (eliminate "Mesh Element Information" command)
+ createTool( SMESHOp::OpFindElementByPoint, info );
+
+ createTool( SMESHOp::OpFreeNode, ctrl0dTb );
+ createTool( SMESHOp::OpEqualNode, ctrl0dTb );
+ //createTool( SMESHOp::OpNodeConnectivityNb, ctrl0dTb );
+
+ createTool( SMESHOp::OpFreeBorder, ctrl1dTb );
+ createTool( SMESHOp::OpLength, ctrl1dTb );
+ createTool( SMESHOp::OpConnection, ctrl1dTb );
+ createTool( SMESHOp::OpEqualEdge, ctrl1dTb );
+
+ createTool( SMESHOp::OpFreeEdge, ctrl2dTb );
+ createTool( SMESHOp::OpFreeFace, ctrl2dTb );
+ createTool( SMESHOp::OpBareBorderFace, ctrl2dTb );
+ createTool( SMESHOp::OpOverConstrainedFace, ctrl2dTb );
+ createTool( SMESHOp::OpLength2D, ctrl2dTb );
+ createTool( SMESHOp::OpConnection2D, ctrl2dTb );
+ createTool( SMESHOp::OpArea, ctrl2dTb );
+ createTool( SMESHOp::OpTaper, ctrl2dTb );
+ createTool( SMESHOp::OpAspectRatio, ctrl2dTb );
+ createTool( SMESHOp::OpMinimumAngle, ctrl2dTb );
+ createTool( SMESHOp::OpWarpingAngle, ctrl2dTb );
+ createTool( SMESHOp::OpSkew, ctrl2dTb );
+ createTool( SMESHOp::OpMaxElementLength2D, ctrl2dTb );
+ createTool( SMESHOp::OpEqualFace, ctrl2dTb );
+ createTool( SMESHOp::OpDeflection2D, ctrl2dTb );
+
+ createTool( SMESHOp::OpAspectRatio3D, ctrl3dTb );
+ createTool( SMESHOp::OpVolume, ctrl3dTb );
+ createTool( SMESHOp::OpMaxElementLength3D, ctrl3dTb );
+ createTool( SMESHOp::OpBareBorderVolume, ctrl3dTb );
+ createTool( SMESHOp::OpOverConstrainedVolume, ctrl3dTb );
+ createTool( SMESHOp::OpEqualVolume, ctrl3dTb );
+
+ createTool( SMESHOp::OpNode, addElemTb );
+ createTool( SMESHOp::OpElem0D, addElemTb );
+ createTool( SMESHOp::OpElem0DOnElemNodes, addElemTb );
+ createTool( SMESHOp::OpBall, addElemTb );
+ createTool( SMESHOp::OpEdge, addElemTb );
+ createTool( SMESHOp::OpTriangle, addElemTb );
+ createTool( SMESHOp::OpQuadrangle, addElemTb );
+ createTool( SMESHOp::OpPolygon, addElemTb );
+ createTool( SMESHOp::OpTetrahedron, addElemTb );
+ createTool( SMESHOp::OpHexahedron, addElemTb );
+ createTool( SMESHOp::OpPentahedron, addElemTb );
+ createTool( SMESHOp::OpPyramid, addElemTb );
+ createTool( SMESHOp::OpHexagonalPrism, addElemTb );
+ createTool( SMESHOp::OpPolyhedron, addElemTb );
+
+ createTool( SMESHOp::OpQuadraticEdge, addNonElemTb );
+ createTool( SMESHOp::OpQuadraticTriangle, addNonElemTb );
+ createTool( SMESHOp::OpBiQuadraticTriangle, addNonElemTb );
+ createTool( SMESHOp::OpQuadraticQuadrangle, addNonElemTb );
+ createTool( SMESHOp::OpBiQuadraticQuadrangle, addNonElemTb );
+ createTool( SMESHOp::OpQuadraticPolygon, addNonElemTb );
+ createTool( SMESHOp::OpQuadraticTetrahedron, addNonElemTb );
+ createTool( SMESHOp::OpQuadraticPyramid, addNonElemTb );
+ createTool( SMESHOp::OpQuadraticPentahedron, addNonElemTb );
+ createTool( SMESHOp::OpBiQuadraticPentahedron, addNonElemTb );
+ createTool( SMESHOp::OpQuadraticHexahedron, addNonElemTb );
+ createTool( SMESHOp::OpTriQuadraticHexahedron, addNonElemTb );
+
+ createTool( SMESHOp::OpRemoveNodes, remTb );
+ createTool( SMESHOp::OpRemoveElements, remTb );
+ createTool( SMESHOp::OpRemoveOrphanNodes, remTb );
+ createTool( SMESHOp::OpClearMesh, remTb );
+
+ //createTool( SMESHOp::OpRenumberingNodes, renumbTb );
+ //createTool( SMESHOp::OpRenumberingElements, renumbTb );
+
+ createTool( SMESHOp::OpMergeNodes, transformTb );
+ createTool( SMESHOp::OpMergeElements, transformTb );
+ createTool( SMESHOp::OpTranslation, transformTb );
+ createTool( SMESHOp::OpRotation, transformTb );
+ createTool( SMESHOp::OpSymmetry, transformTb );
+ createTool( SMESHOp::OpScale, transformTb );
+ createTool( SMESHOp::OpOffset, transformTb );
+ createTool( SMESHOp::OpSewing, transformTb );
+ createTool( SMESHOp::OpDuplicateNodes, transformTb );
+
+ createTool( SMESHOp::OpConvertMeshToQuadratic, modifyTb );
+ createTool( SMESHOp::OpCreateBoundaryElements, modifyTb );
+ createTool( SMESHOp::OpExtrusion, modifyTb );
+ createTool( SMESHOp::OpExtrusionAlongAPath, modifyTb );
+ createTool( SMESHOp::OpRevolution, modifyTb );
+ createTool( SMESHOp::OpOrientation, modifyTb );
+ createTool( SMESHOp::OpReorientFaces, modifyTb );
+ createTool( SMESHOp::OpMoveNode, modifyTb );
+ createTool( SMESHOp::OpDiagonalInversion, modifyTb );
+ createTool( SMESHOp::OpUnionOfTwoTriangle, modifyTb );
+ createTool( SMESHOp::OpUnionOfTriangles, modifyTb );
+ createTool( SMESHOp::OpCuttingOfQuadrangles, modifyTb );
+ createTool( SMESHOp::OpSplitVolumes, modifyTb );
+ createTool( SMESHOp::OpSplitBiQuadratic, modifyTb );
+ createTool( SMESHOp::OpSmoothing, modifyTb );
+ createTool( SMESHOp::OpPatternMapping, modifyTb );
+
+ createTool( SMESHOp::OpMinimumDistance, measuremTb );
+
+ createTool( SMESHOp::OpUpdate, dispModeTb );
+
+ QString lc = "$"; // VSR : instead of QtxPopupSelection::defEquality();
+ QString dc = "selcount"; // VSR : instead of QtxPopupSelection::defSelCountParam()
+
+ myRules.clear();
+ QString
+ OB = "'ObjectBrowser'",
+ View = "'" + SVTK_Viewer::Type() + "'",
+ pat = "'%1'",
+ mesh = pat.arg( SMESHGUI_Selection::typeName( SMESH::MESH ) ),
+ group = pat.arg( SMESHGUI_Selection::typeName( SMESH::GROUP ) ),
+ hypo = pat.arg( SMESHGUI_Selection::typeName( SMESH::HYPOTHESIS ) ),
+ algo = pat.arg( SMESHGUI_Selection::typeName( SMESH::ALGORITHM ) ),
+ smesh = pat.arg( SMESHGUI_Selection::typeName( SMESH::COMPONENT ) ),
+ elems = QString( "'%1' '%2' '%3' '%4' '%5' '%6'" ).
+ arg( SMESHGUI_Selection::typeName( SMESH::SUBMESH_VERTEX ) ).
+ arg( SMESHGUI_Selection::typeName( SMESH::SUBMESH_EDGE ) ).
+ arg( SMESHGUI_Selection::typeName( SMESH::SUBMESH_FACE ) ).
+ arg( SMESHGUI_Selection::typeName( SMESH::SUBMESH_SOLID ) ).
+ arg( SMESHGUI_Selection::typeName( SMESH::SUBMESH_COMPOUND ) ).
+ arg( SMESHGUI_Selection::typeName( SMESH::SUBMESH ) ),
+ subMesh = elems,
+ mesh_part = mesh + " " + subMesh + " " + group,
+ mesh_group = mesh + " " + group,
+ mesh_submesh = mesh + " " + subMesh,
+ hyp_alg = hypo + " " + algo;
+
+ // popup for object browser
+ QString
+ isInvisible("not( isVisible )"),
+ isEmpty("numberOfNodes = 0"),
+ isNotEmpty("numberOfNodes <> 0"),
+
+ // has nodes, edges, etc in VISIBLE! actor
+ hasNodes("(numberOfNodes > 0 ) && hasActor"),
+ hasElems("(count( elemTypes ) > 0)"),
+ hasDifferentElems("(count( elemTypes ) > 1)"),
+ hasDifferentObjElems("(count( objElemTypes ) > 1)"),
+ hasBalls("({'BallElem'} in elemTypes)"),
+ hasElems0d("({'Elem0d'} in elemTypes)"),
+ hasEdges("({'Edge'} in elemTypes)"),
+ hasFaces("({'Face'} in elemTypes)"),
+ hasVolumes("({'Volume'} in elemTypes)"),
+ hasFacesOrVolumes("(({'Face'} in elemTypes) || ({'Volume'} in elemTypes)) ");
+
+ createPopupItem( SMESHOp::OpFileInformation, OB, mesh, "&& selcount=1 && isImported" );
+ createPopupItem( SMESHOp::OpCreateSubMesh, OB, mesh, "&& hasGeomReference");
+ createPopupItem( SMESHOp::OpEditMesh, OB, mesh, "&& selcount=1" );
+ createPopupItem( SMESHOp::OpEditSubMesh, OB, subMesh, "&& selcount=1 && hasGeomReference" );
+ createPopupItem( SMESHOp::OpEditGroup, OB, group );
+ createPopupItem( SMESHOp::OpEditGeomGroupAsGroup, OB, group, "&& groupType != 'Group'" );
+
+ popupMgr()->insert( separator(), -1, 0 );
+ createPopupItem( SMESHOp::OpCompute, OB, mesh, "&& selcount=1 && isComputable" );
+ createPopupItem( SMESHOp::OpComputeSubMesh, OB, subMesh, "&& selcount=1 && isComputable" );
+ createPopupItem( SMESHOp::OpPreCompute, OB, mesh, "&& selcount=1 && isPreComputable" );
+ createPopupItem( SMESHOp::OpEvaluate, OB, mesh, "&& selcount=1 && isComputable" );
+ createPopupItem( SMESHOp::OpMeshOrder, OB, mesh, "&& selcount=1 && isComputable && hasGeomReference" );
+ createPopupItem( SMESHOp::OpUpdate, OB, mesh_part );
+ createPopupItem( SMESHOp::OpMeshInformation, OB, mesh_part );
+ createPopupItem( SMESHOp::OpFindElementByPoint,OB, mesh_group, "&& selcount=1" );
+ createPopupItem( SMESHOp::OpOverallMeshQuality,OB, mesh_part );
+ popupMgr()->insert( separator(), -1, 0 );
+ createPopupItem( SMESHOp::OpCreateGroup, OB, mesh, "&& selcount=1" );
+ createPopupItem( SMESHOp::OpCreateGeometryGroup, OB, mesh, "&& selcount=1 && hasGeomReference" );
+ createPopupItem( SMESHOp::OpConstructGroup, OB, subMesh );
+ popupMgr()->insert( separator(), -1, 0 );
+ createPopupItem( SMESHOp::OpEditHypothesis, OB, hypo, "&& isEditableHyp");
+ createPopupItem( SMESHOp::OpUnassign, OB, hyp_alg );
+ popupMgr()->insert( separator(), -1, 0 );
+ createPopupItem( SMESHOp::OpConvertMeshToQuadratic, OB, mesh_submesh );
+ createPopupItem( SMESHOp::OpCreateBoundaryElements, OB, mesh_group, "&& selcount=1 && dim>=2");
+ popupMgr()->insert( separator(), -1, 0 );
+ createPopupItem( SMESHOp::OpClearMesh, OB, mesh );
+ //popupMgr()->insert( separator(), -1, 0 );
+
+ QString only_one_non_empty = QString( " && %1=1 && numberOfNodes>0" ).arg( dc );
+ QString multiple_non_empty = QString( " && %1>0 && numberOfNodes>0" ).arg( dc );
+ QString only_one_2D = only_one_non_empty + " && dim>1";
+
+ int anId = popupMgr()->insert( tr( "MEN_EXPORT" ), -1, -1 ); // EXPORT submenu
+ createPopupItem( SMESHOp::OpPopupExportMED, OB, mesh_group, multiple_non_empty, anId );
+ createPopupItem( SMESHOp::OpPopupExportUNV, OB, mesh_group, only_one_non_empty, anId );
+ createPopupItem( SMESHOp::OpPopupExportSTL, OB, mesh_group, only_one_2D, anId );
+#ifdef WITH_CGNS
+ createPopupItem( SMESHOp::OpPopupExportCGNS, OB, mesh_group, multiple_non_empty, anId );
+#endif
+ createPopupItem( SMESHOp::OpPopupExportSAUV, OB, mesh_group, only_one_non_empty, anId );
+ createPopupItem( SMESHOp::OpPopupExportGMF, OB, mesh_group, only_one_non_empty, anId );
+ createPopupItem( SMESHOp::OpPopupExportDAT, OB, mesh_group, only_one_non_empty, anId );
+ createPopupItem( SMESHOp::OpDelete, OB, mesh_part + " " + hyp_alg );
+ createPopupItem( SMESHOp::OpDeleteGroup, OB, group );
+
+ anId = popupMgr()->insert( tr( "MEN_IMPORT" ), -1, -1 ); // IMPORT submenu
+ createPopupItem( SMESHOp::OpPopupImportMED, OB, smesh, "", anId );
+ createPopupItem( SMESHOp::OpPopupImportUNV, OB, smesh, "", anId );
+ createPopupItem( SMESHOp::OpPopupImportSTL, OB, smesh, "", anId );
+#ifdef WITH_CGNS
+ createPopupItem( SMESHOp::OpPopupImportCGNS, OB, smesh, "", anId );
+#endif
+ createPopupItem( SMESHOp::OpPopupImportSAUV, OB, smesh, "", anId );
+ createPopupItem( SMESHOp::OpPopupImportGMF, OB, smesh, "", anId );
+ createPopupItem( SMESHOp::OpPopupImportDAT, OB, smesh, "", anId );
+ popupMgr()->insert( separator(), -1, 0 );
+
+ // popup for viewer
+ createPopupItem( SMESHOp::OpEditGroup, View, group );
+ createPopupItem( SMESHOp::OpAddElemGroupPopup, View, elems, "&& guiState = 800" );
+ createPopupItem( SMESHOp::OpRemoveElemGroupPopup, View, elems, "&& guiState = 800" );
+
+ popupMgr()->insert( separator(), -1, 0 );
+ createPopupItem( SMESHOp::OpUpdate, View, mesh_part );
+ createPopupItem( SMESHOp::OpMeshInformation, View, mesh_part );
+ createPopupItem( SMESHOp::OpOverallMeshQuality, View, mesh_part );
+ createPopupItem( SMESHOp::OpFindElementByPoint, View, mesh );
+ popupMgr()->insert( separator(), -1, 0 );
+
+ createPopupItem( SMESHOp::OpAutoColor, OB + " " + View, mesh, "&& (not isAutoColor)" );
+ createPopupItem( SMESHOp::OpDisableAutoColor, OB + " " + View, mesh, "&& isAutoColor" );
+ popupMgr()->insert( separator(), -1, 0 );
+
+ QString aClient = QString( "%1client in {%2}" ).arg( lc ).arg( "'VTKViewer'" );
+ QString aType = QString( "%1type in {%2}" ).arg( lc );
+ aType = aType.arg( mesh_part );
+ QString aMeshInVTK = aClient + "&&" + aType;
+
+ aClient = "($client in {'VTKViewer' 'ObjectBrowser'})";
+ QString anActiveVTK = QString("activeView = '%1'").arg(SVTK_Viewer::Type());
+ QString aSelCount = QString( "%1 > 0" ).arg( dc );
+
+ //-------------------------------------------------
+ // Numbering
+ //-------------------------------------------------
+ anId = popupMgr()->insert( tr( "MEN_NUM" ), -1, -1 );
+
+ popupMgr()->insert( action( SMESHOp::OpNumberingNodes ), anId, -1 );
+ popupMgr()->setRule( action( SMESHOp::OpNumberingNodes ), aMeshInVTK + "&& isVisible &&" + hasNodes, QtxPopupMgr::VisibleRule );
+ popupMgr()->setRule( action( SMESHOp::OpNumberingNodes ), "{'Point'} in labeledTypes", QtxPopupMgr::ToggleRule );