X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI.cxx;h=8f7c64131a8c6844127a3c7933f164f5552d4611;hp=336363ecbc9e3f52393352a1d2f9df01d8c32f21;hb=057ae95be6c89a0aac8e918607cae04f129e5e71;hpb=5d68554076bbca0e1e95fb0db215a6c2b84b6c54 diff --git a/src/SMESHGUI/SMESHGUI.cxx b/src/SMESHGUI/SMESHGUI.cxx index 336363ecb..8f7c64131 100644 --- a/src/SMESHGUI/SMESHGUI.cxx +++ b/src/SMESHGUI/SMESHGUI.cxx @@ -2012,8 +2012,8 @@ bool SMESHGUI::automaticUpdate(unsigned int requestedSize, bool* limitExceeded) * */ //============================================================================= -bool SMESHGUI::automaticUpdate( SMESH::SMESH_Mesh_ptr theMesh, - int* entities, bool* limitExceeded, int* hidden ) +bool SMESHGUI::automaticUpdate( SMESH::SMESH_IDSource_ptr theMesh, + int* entities, bool* limitExceeded, int* hidden, long* nbElements ) { SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr(); if ( !resMgr ) @@ -2023,8 +2023,23 @@ bool SMESHGUI::automaticUpdate( SMESH::SMESH_Mesh_ptr theMesh, long updateLimit = resMgr->integerValue( "SMESH", "update_limit", 500000 ); bool incrementalLimit = resMgr->booleanValue( "SMESH", "incremental_limit", false ); - long requestedSize = theMesh->NbElements(); - + SMESH::long_array_var info = theMesh->GetMeshInfo(); + long nbOdElems = info[SMDSEntity_0D]; + long nbEdges = info[SMDSEntity_Edge] + info[SMDSEntity_Quad_Edge]; + long nbFaces = info[SMDSEntity_Triangle] + info[SMDSEntity_Quad_Triangle] + info[SMDSEntity_BiQuad_Triangle] + + info[SMDSEntity_Quadrangle] + info[SMDSEntity_Quad_Quadrangle] + info[SMDSEntity_BiQuad_Quadrangle] + + info[SMDSEntity_Polygon]; + long nbVolumes = info[SMDSEntity_Tetra] + info[SMDSEntity_Quad_Tetra] + + info[SMDSEntity_Hexa] + info[SMDSEntity_Quad_Hexa] + info[SMDSEntity_TriQuad_Hexa] + + info[SMDSEntity_Pyramid] + info[SMDSEntity_Quad_Pyramid] + + info[SMDSEntity_Penta] + info[SMDSEntity_Quad_Penta] + + info[SMDSEntity_Polyhedra] + + info[SMDSEntity_Hexagonal_Prism]; + long nbBalls = info[SMDSEntity_Ball]; + + long requestedSize = nbOdElems + nbBalls + nbEdges + nbFaces + nbVolumes; + *nbElements = requestedSize; + *entities = SMESH_Actor::eAllEntity; *hidden = 0; @@ -2033,11 +2048,6 @@ bool SMESHGUI::automaticUpdate( SMESH::SMESH_Mesh_ptr theMesh, if ( limitExceeded ) *limitExceeded = autoUpdate && exceeded; if ( incrementalLimit ) { - long nbOdElems = theMesh->Nb0DElements(); - long nbEdges = theMesh->NbEdges(); - long nbFaces = theMesh->NbFaces(); - long nbVolumes = theMesh->NbVolumes(); - long nbBalls = theMesh->NbBalls(); long total = 0; if ( nbOdElems > 0 ) {