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);
+
This commit is contained in:
eap 2010-09-15 11:49:07 +00:00
parent 1e8fc8a66c
commit fed358c8ec
3 changed files with 25 additions and 38 deletions

View File

@ -40,7 +40,7 @@ module SMESH
* \param IDsOfElements list of mesh elements identifiers * \param IDsOfElements list of mesh elements identifiers
* \return new ID source object * \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. * \brief Remove mesh elements specified by their identifiers.
@ -641,6 +641,11 @@ module SMESH
in double Tolerance, in double Tolerance,
out array_of_long_array GroupsOfNodes); 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); void MergeNodes (in array_of_long_array GroupsOfNodes);
/*! /*!

View File

@ -1512,7 +1512,7 @@ bool SMESHGUI_CuttingIntoTetraDlg::process (SMESH::SMESH_MeshEditor_ptr theEdito
{ {
SMESH::SMESH_IDSource_var obj = theObj; SMESH::SMESH_IDSource_var obj = theObj;
if ( CORBA::is_nil( obj )) if ( CORBA::is_nil( obj ))
obj = theEditor->MakeIDSource( theIds ); obj = theEditor->MakeIDSource( theIds, myEntityType ? SMESH::VOLUME : SMESH::FACE );
try { try {
theEditor->SplitVolumesIntoTetra( obj, myGroupChoice->checkedId()+1 ); theEditor->SplitVolumesIntoTetra( obj, myGroupChoice->checkedId()+1 );
} }

View File

@ -470,52 +470,34 @@ bool SMESHGUI_ScaleDlg::ClickOnApply()
try { try {
SUIT_OverrideCursor aWaitCursor; SUIT_OverrideCursor aWaitCursor;
SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor(); 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 ) { switch ( actionButton ) {
case MOVE_ELEMS_BUTTON: case MOVE_ELEMS_BUTTON:
if(CheckBoxMesh->isChecked()) { aMeshEditor->Scale(obj, aPoint, aScaleFact, false);
aMeshEditor->Scale(mySelectedObject, aPoint, aScaleFact, false);
}
else {
SMESH::SMESH_IDSource_ptr anObj = aMeshEditor->MakeIDSource(anElementsId);
aMeshEditor->Scale(anObj, aPoint, aScaleFact, false);
}
if( !myMesh->_is_nil()) if( !myMesh->_is_nil())
myMesh->SetParameters( aParameters.join(":").toLatin1().constData() ); myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
break; break;
case COPY_ELEMS_BUTTON: case COPY_ELEMS_BUTTON:
if ( makeGroups ) { if ( makeGroups )
SMESH::ListOfGroups_var groups; SMESH::ListOfGroups_var groups =
if(CheckBoxMesh->isChecked()) { aMeshEditor->ScaleMakeGroups(obj, aPoint, aScaleFact);
groups = aMeshEditor->ScaleMakeGroups(mySelectedObject, aPoint, aScaleFact); else
} aMeshEditor->Scale(obj, aPoint, aScaleFact, true);
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( !myMesh->_is_nil()) if( !myMesh->_is_nil())
myMesh->SetParameters( aParameters.join(":").toLatin1().constData() ); myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
break; break;
case MAKE_MESH_BUTTON: { case MAKE_MESH_BUTTON: {
SMESH::SMESH_Mesh_var mesh; SMESH::SMESH_Mesh_var mesh =
if (CheckBoxMesh->isChecked()) { aMeshEditor->ScaleMakeMesh(obj, aPoint, aScaleFact, makeGroups,
mesh = aMeshEditor->ScaleMakeMesh(mySelectedObject, aPoint, aScaleFact, makeGroups, LineEditNewMesh->text().toLatin1().data());
LineEditNewMesh->text().toLatin1().data());
}
else {
mesh = aMeshEditor->ScaleMakeMesh(aMeshEditor->MakeIDSource(anElementsId),
aPoint, aScaleFact, makeGroups,
LineEditNewMesh->text().toLatin1().data());
}
if (!mesh->_is_nil()) { if (!mesh->_is_nil()) {
mesh->SetParameters(aParameters.join(":").toLatin1().constData()); mesh->SetParameters(aParameters.join(":").toLatin1().constData());
#ifdef WITHGENERICOBJ #ifdef WITHGENERICOBJ