mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-11-16 02:28: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
|
//function : RemoveFreeNode
|
||||||
//purpose :
|
//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());
|
myScript->RemoveNode(n->GetID());
|
||||||
|
|
||||||
// Rm from group
|
// Rm from group
|
||||||
// Node can belong to several groups
|
// Node can belong to several groups
|
||||||
if (!myGroups.empty()) {
|
if (fromGroups && !myGroups.empty()) {
|
||||||
set<SMESHDS_GroupBase*>::iterator GrIt = myGroups.begin();
|
set<SMESHDS_GroupBase*>::iterator GrIt = myGroups.begin();
|
||||||
for (; GrIt != myGroups.end(); GrIt++) {
|
for (; GrIt != myGroups.end(); GrIt++) {
|
||||||
SMESHDS_Group* group = dynamic_cast<SMESHDS_Group*>(*GrIt);
|
SMESHDS_Group* group = dynamic_cast<SMESHDS_Group*>(*GrIt);
|
||||||
@ -754,7 +756,9 @@ void SMESHDS_Mesh::RemoveElement(const SMDS_MeshElement * elt)
|
|||||||
//function : RemoveFreeElement
|
//function : RemoveFreeElement
|
||||||
//purpose :
|
//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) {
|
if (elt->GetType() == SMDSAbs_Node) {
|
||||||
RemoveFreeNode( static_cast<const SMDS_MeshNode*>(elt), subMesh);
|
RemoveFreeNode( static_cast<const SMDS_MeshNode*>(elt), subMesh);
|
||||||
@ -769,11 +773,13 @@ void SMESHDS_Mesh::RemoveFreeElement(const SMDS_MeshElement * elt, SMESHDS_SubMe
|
|||||||
|
|
||||||
// Rm from group
|
// Rm from group
|
||||||
// Node can belong to several groups
|
// Node can belong to several groups
|
||||||
set<SMESHDS_GroupBase*>::iterator GrIt = myGroups.begin();
|
if ( fromGroups && !myGroups.empty() ) {
|
||||||
for (; GrIt != myGroups.end(); GrIt++) {
|
set<SMESHDS_GroupBase*>::iterator GrIt = myGroups.begin();
|
||||||
SMESHDS_Group* group = dynamic_cast<SMESHDS_Group*>(*GrIt);
|
for (; GrIt != myGroups.end(); GrIt++) {
|
||||||
if (group && !group->IsEmpty())
|
SMESHDS_Group* group = dynamic_cast<SMESHDS_Group*>(*GrIt);
|
||||||
group->SMDSGroup().Remove(elt);
|
if (group && !group->IsEmpty())
|
||||||
|
group->SMDSGroup().Remove(elt);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Rm from sub-mesh
|
// Rm from sub-mesh
|
||||||
|
@ -379,8 +379,8 @@ public:
|
|||||||
* Methods do not work for meshes with descendants.
|
* Methods do not work for meshes with descendants.
|
||||||
* Implemented for fast cleaning of meshes.
|
* Implemented for fast cleaning of meshes.
|
||||||
*/
|
*/
|
||||||
void RemoveFreeNode(const SMDS_MeshNode *, SMESHDS_SubMesh *);
|
void RemoveFreeNode (const SMDS_MeshNode *, SMESHDS_SubMesh *, bool fromGroups=true);
|
||||||
void RemoveFreeElement(const SMDS_MeshElement *, SMESHDS_SubMesh *);
|
void RemoveFreeElement(const SMDS_MeshElement *, SMESHDS_SubMesh *, bool fromGroups=true);
|
||||||
|
|
||||||
void ClearMesh();
|
void ClearMesh();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user