*/
//=============================================================================
bool SMESHGUI::automaticUpdate( SMESH::SMESH_Mesh_ptr theMesh,
- int* entities, bool* limitExceeded )
+ int* entities, bool* limitExceeded, int* hidden )
{
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
if ( !resMgr )
long requestedSize = theMesh->NbElements();
*entities = SMESH_Actor::eAllEntity;
+ *hidden = 0;
bool exceeded = updateLimit > 0 && requestedSize > updateLimit;
long total = 0;
if ( nbOdElems > 0 ) {
- if ( total + nbOdElems > updateLimit )
+ if ( total + nbOdElems > updateLimit ) {
*entities = *entities & ~SMESH_Actor::e0DElements;
+ *hidden = *hidden | SMESH_Actor::e0DElements;
+ }
else
exceeded = false;
}
total += nbOdElems;
if ( nbEdges > 0 ) {
- if ( total + nbEdges > updateLimit )
+ if ( total + nbEdges > updateLimit ) {
*entities = *entities & ~SMESH_Actor::eEdges;
+ *hidden = *hidden | SMESH_Actor::eEdges;
+ }
else
exceeded = false;
}
total += nbEdges;
if ( nbFaces > 0 ) {
- if ( total + nbFaces > updateLimit )
+ if ( total + nbFaces > updateLimit ) {
*entities = *entities & ~SMESH_Actor::eFaces;
+ *hidden = *hidden | SMESH_Actor::eFaces;
+ }
else
exceeded = false;
}
total += nbFaces;
if ( nbVolumes > 0 ) {
- if ( total + nbVolumes > updateLimit )
+ if ( total + nbVolumes > updateLimit ) {
*entities = *entities & ~SMESH_Actor::eVolumes;
+ *hidden = *hidden | SMESH_Actor::eVolumes;
+ }
else
exceeded = false;
}
total += nbVolumes;
if ( nbBalls > 0 ) {
- if ( total + nbBalls > updateLimit )
+ if ( total + nbBalls > updateLimit ) {
*entities = *entities & ~SMESH_Actor::eBallElem;
+ *hidden = *hidden | SMESH_Actor::eBallElem;
+ }
else
exceeded = false;
}
bool isActiveStudyLocked();
static bool automaticUpdate(unsigned int requestedSize = 0, bool* limitExceeded = 0);
- static bool automaticUpdate( SMESH::SMESH_Mesh_ptr, int*, bool* );
+ static bool automaticUpdate( SMESH::SMESH_Mesh_ptr, int*, bool*, int* );
static void Modified( bool = true );
bool limitExceeded;
long limitSize = resMgr->integerValue( "SMESH", "update_limit", 500000 );
int entities = SMESH_Actor::eAllEntity;
+ int hidden = 0;
if ( !memoryLack )
{
- if ( getSMESHGUI()->automaticUpdate( myMesh, &entities, &limitExceeded ) )
+ if ( getSMESHGUI()->automaticUpdate( myMesh, &entities, &limitExceeded, &hidden ) )
{
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
if ( limitExceeded )
{
+ QStringList hiddenMsg;
+ if ( hidden & SMESH_Actor::e0DElements ) hiddenMsg << tr( "SMESH_ELEMS0D" );
+ if ( hidden & SMESH_Actor::eEdges ) hiddenMsg << tr( "SMESH_EDGES" );
+ if ( hidden & SMESH_Actor::eFaces ) hiddenMsg << tr( "SMESH_FACES" );
+ if ( hidden & SMESH_Actor::eVolumes ) hiddenMsg << tr( "SMESH_VOLUMES" );
+ if ( hidden & SMESH_Actor::eBallElem ) hiddenMsg << tr( "SMESH_BALLS" );
SUIT_MessageBox::warning( desktop(),
tr( "SMESH_WRN_WARNING" ),
- tr( "SMESH_WRN_SIZE_INC_LIMIT_EXCEEDED" ).arg( myMesh->NbElements() ).arg( limitSize ) );
+ tr( "SMESH_WRN_SIZE_INC_LIMIT_EXCEEDED" ).arg( myMesh->NbElements() ).arg( limitSize ).arg( hiddenMsg.join(", ") ) );
}
}
catch (...) {
<source>SMESH_FACE</source>
<translation>Face</translation>
</message>
+ <message>
+ <source>SMESH_FACES</source>
+ <translation>Faces</translation>
+ </message>
<message>
<source>SMESH_FEATUREANGLE</source>
<translation>Feature Angle</translation>
<source>SMESH_VOLUME</source>
<translation>Volume</translation>
</message>
+ <message>
+ <source>SMESH_VOLUMES</source>
+ <translation>Volumes</translation>
+ </message>
<message>
<source>SMESH_WARNING</source>
<translation>Warning</translation>
</message>
<message>
<source>SMESH_WRN_SIZE_LIMIT_EXCEEDED</source>
- <translation>No automatic update of the presentation has been done: new mesh size (%1 elements) exceeds current size limit (%2 elements).
-Please check preferences of Mesh module.
+ <translation>No automatic update of the presentation has been done:
+New mesh size (%1 elements) exceeds current size limit of automatic update (%2 elements).
</translation>
</message>
<message>
<source>SMESH_WRN_SIZE_INC_LIMIT_EXCEEDED</source>
- <translation>New mesh sise (%1 elements) exceeds current size limit (%2 elements).
-Not all mesh elements are shown. Please check preferences of Mesh module.
+ <translation>New mesh sise (%1 elements) exceeds current size limit of automatic update (%2 elements).
+The following elements are not shown: %3.
+Use Display Entity menu command to show them.
</translation>
</message>
<message>
<source>SMESH_FACE</source>
<translation>Face</translation>
</message>
+ <message>
+ <source>SMESH_FACES</source>
+ <translation>Faces</translation>
+ </message>
<message>
<source>SMESH_FEATUREANGLE</source>
<translation>Montrer l'angle</translation>
<source>SMESH_VOLUME</source>
<translation>Volume</translation>
</message>
+ <message>
+ <source>SMESH_VOLUMES</source>
+ <translation>Volumes</translation>
+ </message>
<message>
<source>SMESH_WARNING</source>
<translation>Avertissement</translation>
</message>
<message>
<source>SMESH_WRN_SIZE_LIMIT_EXCEEDED</source>
- <translation>La présentation n'a pas été mise à jour automatiquement: la nouvelle taille du maillage (%1 éléments) dépasse la limite de taille actuelle (%2 éléments).
+ <translation>La présentation n'a pas été mise à jour automatiquement:
+la nouvelle taille du maillage (%1 éléments) dépasse la limite de taille actuelle (%2 éléments).
Vérifiez la limite dans les préférences du module Mesh.
</translation>
</message>
<message>
<source>SMESH_WRN_SIZE_INC_LIMIT_EXCEEDED</source>
- <translation type="unfinished">New mesh sise (%1 elements) exceeds current size limit (%2 elements).
-Not all mesh elements are shown. Please check preferences of Mesh module.
+ <translation type="unfinished">New mesh sise (%1 elements) exceeds current size limit of automatic update (%2 elements).
+The following elements are not shown: %3.
+Use Display Entity menu command to show them.
</translation>
</message>
<message>