Salome HOME
projects
/
modules
/
smesh.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Copyright update 2020
[modules/smesh.git]
/
src
/
SMESHDS
/
SMESHDS_GroupBase.cxx
diff --git
a/src/SMESHDS/SMESHDS_GroupBase.cxx
b/src/SMESHDS/SMESHDS_GroupBase.cxx
index a9c378fd621ac033dcfdee2f95a71461ecbee1c8..50ac2ee748e09f96756ada094b685c4dd0c3026a 100644
(file)
--- a/
src/SMESHDS/SMESHDS_GroupBase.cxx
+++ b/
src/SMESHDS/SMESHDS_GroupBase.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-20
15
CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-20
20
CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@
-32,6
+32,8
@@
using namespace std;
using namespace std;
+Quantity_Color SMESHDS_GroupBase::myDefaultColor = Quantity_Color( 0.0, 0.0, 0.0, Quantity_TOC_RGB );
+
//=============================================================================
/*!
*
//=============================================================================
/*!
*
@@
-44,12
+46,12
@@
SMESHDS_GroupBase::SMESHDS_GroupBase (const int theID,
myID(theID), myMesh(theMesh), myType(theType), myStoreName(""),
myCurIndex(0), myCurID(-1)
{
myID(theID), myMesh(theMesh), myType(theType), myStoreName(""),
myCurIndex(0), myCurID(-1)
{
- myColor =
Quantity_Color( 0.0, 0.0, 0.0, Quantity_TOC_RGB )
;
+ myColor =
myDefaultColor
;
}
//=============================================================================
/*!
}
//=============================================================================
/*!
- *
+ *
Don't use it!
*/
//=============================================================================
*/
//=============================================================================
@@
-122,6
+124,9
@@
int SMESHDS_GroupBase::Extent() const
bool SMESHDS_GroupBase::IsEmpty()
{
bool SMESHDS_GroupBase::IsEmpty()
{
+ if ( myMesh->GetMeshInfo().NbElements( myType ) == 0 )
+ // avoid long iteration over sub-meshes of a complex sub-mesh of a group on geometry
+ return true;
SMDS_ElemIteratorPtr it = GetElements();
return ( !it || !it->more() );
}
SMDS_ElemIteratorPtr it = GetElements();
return ( !it || !it->more() );
}