Salome HOME
0020746: EDF 1274 SMESH : MergeAllNodesButNodesFromGroup feature
authoreap <eap@opencascade.com>
Wed, 15 Sep 2010 11:49:07 +0000 (11:49 +0000)
committereap <eap@opencascade.com>
Wed, 15 Sep 2010 11:49:07 +0000 (11:49 +0000)
interface SMESH_MeshEditor
{
-    SMESH_IDSource MakeIDSource(in long_array IDsOfElements);
+    SMESH_IDSource MakeIDSource(in long_array IDsOfElements, in ElementType type);

+    void FindCoincidentNodesOnPartBut (in  SMESH_IDSource      SubMeshOrGroup,
+                                       in  double              Tolerance,
+                                       out array_of_long_array GroupsOfNodes,
+                                       in  ListOfIDSources     ExceptSubMeshOrGroups);
+

idl/SMESH_MeshEditor.idl
src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx
src/SMESHGUI/SMESHGUI_ScaleDlg.cxx

index 2fc9ae303c9a0fc6d58952b61bb4e742b28ade8a..4b450267cc37771e3d09cd75e07ddf51849e5d43 100644 (file)
@@ -40,7 +40,7 @@ module SMESH
      * \param IDsOfElements list of mesh elements identifiers
      * \return new ID source object
      */
-    SMESH_IDSource MakeIDSource(in long_array IDsOfElements);
+    SMESH_IDSource MakeIDSource(in long_array IDsOfElements, in ElementType type);
 
     /*!
      * \brief Remove mesh elements specified by their identifiers.
@@ -641,6 +641,11 @@ module SMESH
                                    in  double              Tolerance,
                                    out array_of_long_array GroupsOfNodes);
 
+    void FindCoincidentNodesOnPartBut (in  SMESH_IDSource      SubMeshOrGroup,
+                                       in  double              Tolerance,
+                                       out array_of_long_array GroupsOfNodes,
+                                       in  ListOfIDSources     ExceptSubMeshOrGroups);
+
     void MergeNodes (in array_of_long_array GroupsOfNodes);
 
     /*!
index 341ffb2845f4f96afb6248aa7a359a42541c73de..7b5477ce6ef8c8d936796e3fe61230edd79b2da5 100755 (executable)
@@ -1512,7 +1512,7 @@ bool SMESHGUI_CuttingIntoTetraDlg::process (SMESH::SMESH_MeshEditor_ptr theEdito
 {
   SMESH::SMESH_IDSource_var obj = theObj;
   if ( CORBA::is_nil( obj ))
-    obj = theEditor->MakeIDSource( theIds );
+    obj = theEditor->MakeIDSource( theIds, myEntityType ? SMESH::VOLUME : SMESH::FACE );
   try {
     theEditor->SplitVolumesIntoTetra( obj, myGroupChoice->checkedId()+1 );
   }
index c83a35f0e52312578c4e500d0e6abae64f8d5a7e..fc275baaa22f095e5a1812dccc24e8cfbb84475c 100644 (file)
@@ -470,52 +470,34 @@ bool SMESHGUI_ScaleDlg::ClickOnApply()
     try {
       SUIT_OverrideCursor aWaitCursor;
       SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
+      SMESH::SMESH_IDSource_var obj;
+      if ( CheckBoxMesh->isChecked() )
+        obj = mySelectedObject;
+      else
+        obj = aMeshEditor->MakeIDSource(anElementsId, SMESH::ALL);
+
       switch ( actionButton ) {
+
       case MOVE_ELEMS_BUTTON:
-        if(CheckBoxMesh->isChecked()) {
-          aMeshEditor->Scale(mySelectedObject, aPoint, aScaleFact, false);
-        }
-        else {
-          SMESH::SMESH_IDSource_ptr anObj = aMeshEditor->MakeIDSource(anElementsId);
-          aMeshEditor->Scale(anObj, aPoint, aScaleFact, false);
-        }
+        aMeshEditor->Scale(obj, aPoint, aScaleFact, false);
         if( !myMesh->_is_nil())
           myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
         break;
+
       case COPY_ELEMS_BUTTON:
-        if ( makeGroups ) {
-          SMESH::ListOfGroups_var groups;
-          if(CheckBoxMesh->isChecked()) {
-            groups = aMeshEditor->ScaleMakeGroups(mySelectedObject, aPoint, aScaleFact);
-          }
-          else {
-            groups = aMeshEditor->ScaleMakeGroups(aMeshEditor->MakeIDSource(anElementsId),
-                                                  aPoint, aScaleFact);
-          }
-        }
-        else {
-          if(CheckBoxMesh->isChecked()) {
-            aMeshEditor->Scale(mySelectedObject, aPoint, aScaleFact, true);
-          }
-          else {
-            aMeshEditor->Scale(aMeshEditor->MakeIDSource(anElementsId),
-                               aPoint, aScaleFact, true);
-          }
-        }
+        if ( makeGroups )
+          SMESH::ListOfGroups_var groups = 
+            aMeshEditor->ScaleMakeGroups(obj, aPoint, aScaleFact);
+        else 
+          aMeshEditor->Scale(obj, aPoint, aScaleFact, true);
         if( !myMesh->_is_nil())
           myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
         break;
+
       case MAKE_MESH_BUTTON: {
-        SMESH::SMESH_Mesh_var mesh;
-        if (CheckBoxMesh->isChecked()) {
-          mesh = aMeshEditor->ScaleMakeMesh(mySelectedObject, aPoint, aScaleFact, makeGroups,
-                                            LineEditNewMesh->text().toLatin1().data());
-        }
-        else {
-          mesh = aMeshEditor->ScaleMakeMesh(aMeshEditor->MakeIDSource(anElementsId),
-                                            aPoint, aScaleFact, makeGroups,
-                                            LineEditNewMesh->text().toLatin1().data());
-        }
+        SMESH::SMESH_Mesh_var mesh =
+          aMeshEditor->ScaleMakeMesh(obj, aPoint, aScaleFact, makeGroups,
+                                     LineEditNewMesh->text().toLatin1().data());
         if (!mesh->_is_nil()) {
           mesh->SetParameters(aParameters.join(":").toLatin1().constData());
 #ifdef WITHGENERICOBJ