From: eap Date: Wed, 15 Sep 2010 11:49:07 +0000 (+0000) Subject: 0020746: EDF 1274 SMESH : MergeAllNodesButNodesFromGroup feature X-Git-Tag: V5_1_5a1~53 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=fed358c8ecab316fc5cdd43514c62e8cf7bedaa8;p=modules%2Fsmesh.git 0020746: EDF 1274 SMESH : MergeAllNodesButNodesFromGroup feature 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); + --- diff --git a/idl/SMESH_MeshEditor.idl b/idl/SMESH_MeshEditor.idl index 2fc9ae303..4b450267c 100644 --- a/idl/SMESH_MeshEditor.idl +++ b/idl/SMESH_MeshEditor.idl @@ -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); /*! diff --git a/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx b/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx index 341ffb284..7b5477ce6 100755 --- a/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx @@ -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 ); } diff --git a/src/SMESHGUI/SMESHGUI_ScaleDlg.cxx b/src/SMESHGUI/SMESHGUI_ScaleDlg.cxx index c83a35f0e..fc275baaa 100644 --- a/src/SMESHGUI/SMESHGUI_ScaleDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ScaleDlg.cxx @@ -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