mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-02-11 04:03:07 +05:00
IPAL15344 (SMESH_MeshEditor.idl: signature of MergeEqualElements() was changed):
restore MergeEqualElements() signature; add MergeElements().
This commit is contained in:
parent
cb6055fef4
commit
fdd333902b
@ -5071,7 +5071,8 @@ class SortableElement : public set <const SMDS_MeshElement*>
|
|||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : FindEqualElements
|
//function : FindEqualElements
|
||||||
//purpose :
|
//purpose : Return list of group of elements built on the same nodes.
|
||||||
|
// Search among theElements or in the whole mesh if theElements is empty
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void SMESH_MeshEditor::FindEqualElements(set<const SMDS_MeshElement*> & theElements,
|
void SMESH_MeshEditor::FindEqualElements(set<const SMDS_MeshElement*> & theElements,
|
||||||
TListOfListOfElementsID & theGroupsOfElementsID)
|
TListOfListOfElementsID & theGroupsOfElementsID)
|
||||||
@ -5128,11 +5129,11 @@ void SMESH_MeshEditor::FindEqualElements(set<const SMDS_MeshElement*> & theEleme
|
|||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : MergeEqualElements
|
//function : MergeElements
|
||||||
//purpose : Remove all but one of elements built on the same nodes.
|
//purpose : In each given group, substitute all elements by the first one.
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
void SMESH_MeshEditor::MergeEqualElements(TListOfListOfElementsID & theGroupsOfElementsID)
|
void SMESH_MeshEditor::MergeElements(TListOfListOfElementsID & theGroupsOfElementsID)
|
||||||
{
|
{
|
||||||
myLastCreatedElems.Clear();
|
myLastCreatedElems.Clear();
|
||||||
myLastCreatedNodes.Clear();
|
myLastCreatedNodes.Clear();
|
||||||
@ -5164,6 +5165,20 @@ void SMESH_MeshEditor::MergeEqualElements(TListOfListOfElementsID & theGroupsOfE
|
|||||||
Remove( rmElemIds, false );
|
Remove( rmElemIds, false );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : MergeEqualElements
|
||||||
|
//purpose : Remove all but one of elements built on the same nodes.
|
||||||
|
//=======================================================================
|
||||||
|
|
||||||
|
void SMESH_MeshEditor::MergeEqualElements()
|
||||||
|
{
|
||||||
|
set<const SMDS_MeshElement*> aMeshElements; /* empty input -
|
||||||
|
to merge equal elements in the whole mesh */
|
||||||
|
TListOfListOfElementsID aGroupsOfElementsID;
|
||||||
|
FindEqualElements(aMeshElements, aGroupsOfElementsID);
|
||||||
|
MergeElements(aGroupsOfElementsID);
|
||||||
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : FindFaceInSet
|
//function : FindFaceInSet
|
||||||
//purpose : Return a face having linked nodes n1 and n2 and which is
|
//purpose : Return a face having linked nodes n1 and n2 and which is
|
||||||
|
@ -322,7 +322,10 @@ public:
|
|||||||
// Return list of group of elements build on the same nodes.
|
// Return list of group of elements build on the same nodes.
|
||||||
// Search among theElements or in the whole mesh if theElements is empty.
|
// Search among theElements or in the whole mesh if theElements is empty.
|
||||||
|
|
||||||
void MergeEqualElements(TListOfListOfElementsID & theGroupsOfElementsID);
|
void MergeElements(TListOfListOfElementsID & theGroupsOfElementsID);
|
||||||
|
// In each group remove all but first of elements.
|
||||||
|
|
||||||
|
void MergeEqualElements();
|
||||||
// Remove all but one of elements built on the same nodes.
|
// Remove all but one of elements built on the same nodes.
|
||||||
// Return nb of successfully merged groups.
|
// Return nb of successfully merged groups.
|
||||||
|
|
||||||
|
@ -1932,16 +1932,16 @@ void SMESH_MeshEditor_i::FindEqualElements(SMESH::SMESH_IDSource_ptr theObj
|
|||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : MergeEqualElements
|
//function : MergeElements
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
void SMESH_MeshEditor_i::MergeEqualElements(const SMESH::array_of_long_array& GroupsOfElementsID)
|
void SMESH_MeshEditor_i::MergeElements(const SMESH::array_of_long_array& GroupsOfElementsID)
|
||||||
{
|
{
|
||||||
initData();
|
initData();
|
||||||
|
|
||||||
TPythonDump aTPythonDump;
|
TPythonDump aTPythonDump;
|
||||||
aTPythonDump << this << ".MergeEqualElements( [";
|
aTPythonDump << this << ".MergeElements( [";
|
||||||
|
|
||||||
::SMESH_MeshEditor::TListOfListOfElementsID aListOfListOfElementsID;
|
::SMESH_MeshEditor::TListOfListOfElementsID aListOfListOfElementsID;
|
||||||
|
|
||||||
@ -1960,12 +1960,28 @@ void SMESH_MeshEditor_i::MergeEqualElements(const SMESH::array_of_long_array& Gr
|
|||||||
}
|
}
|
||||||
|
|
||||||
::SMESH_MeshEditor anEditor( myMesh );
|
::SMESH_MeshEditor anEditor( myMesh );
|
||||||
anEditor.MergeEqualElements(aListOfListOfElementsID);
|
anEditor.MergeElements(aListOfListOfElementsID);
|
||||||
|
|
||||||
// Update Python script
|
// Update Python script
|
||||||
aTPythonDump << "] )";
|
aTPythonDump << "] )";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : MergeEqualElements
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
|
||||||
|
void SMESH_MeshEditor_i::MergeEqualElements()
|
||||||
|
{
|
||||||
|
initData();
|
||||||
|
|
||||||
|
::SMESH_MeshEditor anEditor( myMesh );
|
||||||
|
anEditor.MergeEqualElements();
|
||||||
|
|
||||||
|
// Update Python script
|
||||||
|
TPythonDump() << this << ".MergeEqualElements()";
|
||||||
|
}
|
||||||
|
|
||||||
//================================================================================
|
//================================================================================
|
||||||
/*!
|
/*!
|
||||||
* \brief If the given ID is a valid node ID (nodeID > 0), just move this node, else
|
* \brief If the given ID is a valid node ID (nodeID > 0), just move this node, else
|
||||||
|
@ -210,7 +210,8 @@ class SMESH_MeshEditor_i: public POA_SMESH::SMESH_MeshEditor
|
|||||||
void MergeNodes (const SMESH::array_of_long_array& GroupsOfNodes);
|
void MergeNodes (const SMESH::array_of_long_array& GroupsOfNodes);
|
||||||
void FindEqualElements(SMESH::SMESH_IDSource_ptr theObject,
|
void FindEqualElements(SMESH::SMESH_IDSource_ptr theObject,
|
||||||
SMESH::array_of_long_array_out GroupsOfElementsID);
|
SMESH::array_of_long_array_out GroupsOfElementsID);
|
||||||
void MergeEqualElements(const SMESH::array_of_long_array& GroupsOfElementsID);
|
void MergeElements(const SMESH::array_of_long_array& GroupsOfElementsID);
|
||||||
|
void MergeEqualElements();
|
||||||
CORBA::Long MoveClosestNodeToPoint(CORBA::Double x,
|
CORBA::Long MoveClosestNodeToPoint(CORBA::Double x,
|
||||||
CORBA::Double y,
|
CORBA::Double y,
|
||||||
CORBA::Double z,
|
CORBA::Double z,
|
||||||
|
Loading…
Reference in New Issue
Block a user