mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-11-15 18:18:34 +05:00
0019957: EDF 785 SMESH: Convert Quadratic and Group on GEOM
add an arg to RemoveFreeElement() and RemoveFreeNode()
This commit is contained in:
parent
8543a7f613
commit
302341f64c
@ -705,13 +705,15 @@ void SMESHDS_Mesh::RemoveNode(const SMDS_MeshNode * n)
|
||||
//function : RemoveFreeNode
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void SMESHDS_Mesh::RemoveFreeNode(const SMDS_MeshNode * n, SMESHDS_SubMesh * subMesh)
|
||||
void SMESHDS_Mesh::RemoveFreeNode(const SMDS_MeshNode * n,
|
||||
SMESHDS_SubMesh * subMesh,
|
||||
bool fromGroups)
|
||||
{
|
||||
myScript->RemoveNode(n->GetID());
|
||||
|
||||
// Rm from group
|
||||
// Node can belong to several groups
|
||||
if (!myGroups.empty()) {
|
||||
if (fromGroups && !myGroups.empty()) {
|
||||
set<SMESHDS_GroupBase*>::iterator GrIt = myGroups.begin();
|
||||
for (; GrIt != myGroups.end(); GrIt++) {
|
||||
SMESHDS_Group* group = dynamic_cast<SMESHDS_Group*>(*GrIt);
|
||||
@ -754,7 +756,9 @@ void SMESHDS_Mesh::RemoveElement(const SMDS_MeshElement * elt)
|
||||
//function : RemoveFreeElement
|
||||
//purpose :
|
||||
//========================================================================
|
||||
void SMESHDS_Mesh::RemoveFreeElement(const SMDS_MeshElement * elt, SMESHDS_SubMesh * subMesh)
|
||||
void SMESHDS_Mesh::RemoveFreeElement(const SMDS_MeshElement * elt,
|
||||
SMESHDS_SubMesh * subMesh,
|
||||
bool fromGroups)
|
||||
{
|
||||
if (elt->GetType() == SMDSAbs_Node) {
|
||||
RemoveFreeNode( static_cast<const SMDS_MeshNode*>(elt), subMesh);
|
||||
@ -769,12 +773,14 @@ void SMESHDS_Mesh::RemoveFreeElement(const SMDS_MeshElement * elt, SMESHDS_SubMe
|
||||
|
||||
// Rm from group
|
||||
// Node can belong to several groups
|
||||
if ( fromGroups && !myGroups.empty() ) {
|
||||
set<SMESHDS_GroupBase*>::iterator GrIt = myGroups.begin();
|
||||
for (; GrIt != myGroups.end(); GrIt++) {
|
||||
SMESHDS_Group* group = dynamic_cast<SMESHDS_Group*>(*GrIt);
|
||||
if (group && !group->IsEmpty())
|
||||
group->SMDSGroup().Remove(elt);
|
||||
}
|
||||
}
|
||||
|
||||
// Rm from sub-mesh
|
||||
// Element should belong to only one sub-mesh
|
||||
|
@ -379,8 +379,8 @@ public:
|
||||
* Methods do not work for meshes with descendants.
|
||||
* Implemented for fast cleaning of meshes.
|
||||
*/
|
||||
void RemoveFreeNode(const SMDS_MeshNode *, SMESHDS_SubMesh *);
|
||||
void RemoveFreeElement(const SMDS_MeshElement *, SMESHDS_SubMesh *);
|
||||
void RemoveFreeNode (const SMDS_MeshNode *, SMESHDS_SubMesh *, bool fromGroups=true);
|
||||
void RemoveFreeElement(const SMDS_MeshElement *, SMESHDS_SubMesh *, bool fromGroups=true);
|
||||
|
||||
void ClearMesh();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user