23269: Meshing a composite block with IJK

StdMeshers_CompositeHexa_3D.cxx

And more:

1) Avoid creating actors for not shown mesh objects
  SMESHGUI_ComputeDlg.cxx

2) Add wait-cursor while group deletion, which can be long on large meshes
  SMESHGUI_DeleteGroupDlg.cxx

3) Avoid getting elem types of a new group on filter, which can be long
  SMESH_Gen_i_1.cxx
This commit is contained in:
eap 2016-04-14 18:31:42 +03:00
parent d82557916e
commit 53bd086779
5 changed files with 21 additions and 8 deletions

View File

@ -939,7 +939,9 @@ void SMESHGUI_BaseComputeOp::computeMesh()
if ( !smSObj ) continue; if ( !smSObj ) continue;
SMESH::SMESH_IDSource_var aSubMeshObj = SMESH::SMESH_IDSource_var aSubMeshObj =
SMESH::SObjectToInterface<SMESH::SMESH_IDSource>( smSObj ); SMESH::SObjectToInterface<SMESH::SMESH_IDSource>( smSObj );
aListToUpdate.append( TListOf_IDSrc_SObj::value_type( aSubMeshObj, smSObj )); SMESH_Actor *anActor = SMESH::FindActorByObject( aSubMeshObj );
if ( anActor && anActor->GetVisibility() )
aListToUpdate.append( TListOf_IDSrc_SObj::value_type( aSubMeshObj, smSObj ));
} }
// put Groups into list // put Groups into list
SMESH::ListOfGroups_var aGroups = myMesh->GetGroups(); SMESH::ListOfGroups_var aGroups = myMesh->GetGroups();
@ -955,7 +957,9 @@ void SMESHGUI_BaseComputeOp::computeMesh()
if ( !aGroupSO ) continue; if ( !aGroupSO ) continue;
SMESH::SMESH_IDSource_var aGroupObj = SMESH::SMESH_IDSource_var aGroupObj =
SMESH::SObjectToInterface<SMESH::SMESH_IDSource>( aGroupSO ); SMESH::SObjectToInterface<SMESH::SMESH_IDSource>( aGroupSO );
aListToUpdate.append( TListOf_IDSrc_SObj::value_type( aGroupObj, aGroupSO )); SMESH_Actor *anActor = SMESH::FindActorByObject( aGroupObj );
if ( anActor && anActor->GetVisibility() )
aListToUpdate.append( TListOf_IDSrc_SObj::value_type( aGroupObj, aGroupSO ));
} }
// update mesh, sub-mesh and groups, if it's possible // update mesh, sub-mesh and groups, if it's possible

View File

@ -37,6 +37,7 @@
#include <SUIT_Session.h> #include <SUIT_Session.h>
#include <SUIT_MessageBox.h> #include <SUIT_MessageBox.h>
#include <SUIT_ResourceMgr.h> #include <SUIT_ResourceMgr.h>
#include <SUIT_OverrideCursor.h>
#include <SalomeApp_Study.h> #include <SalomeApp_Study.h>
#include <LightApp_Application.h> #include <LightApp_Application.h>
@ -205,6 +206,8 @@ bool SMESHGUI_DeleteGroupDlg::onApply()
if (!isValid()) if (!isValid())
return false; return false;
SUIT_OverrideCursor wc;
myBlockSelection = true; myBlockSelection = true;
QList<SMESH::SMESH_GroupBase_var>::iterator anIter; QList<SMESH::SMESH_GroupBase_var>::iterator anIter;

View File

@ -771,8 +771,7 @@ SALOMEDS::SObject_ptr SMESH_Gen_i::PublishGroup (SALOMEDS::Study_ptr theStudy
SetName( aRootSO, aRootNames[aType] ); SetName( aRootSO, aRootNames[aType] );
// Add new group to corresponding sub-tree // Add new group to corresponding sub-tree
SMESH::array_of_ElementType_var elemTypes = theGroup->GetTypes(); int isEmpty = false;
int isEmpty = ( elemTypes->length() == 0 );
std::string pm[2] = { "ICON_SMESH_TREE_GROUP", "ICON_SMESH_TREE_MESH_WARN" }; std::string pm[2] = { "ICON_SMESH_TREE_GROUP", "ICON_SMESH_TREE_MESH_WARN" };
if ( SMESH::DownCast< SMESH_GroupOnFilter_i* > ( theGroup )) if ( SMESH::DownCast< SMESH_GroupOnFilter_i* > ( theGroup ))
{ {

View File

@ -382,12 +382,12 @@ namespace
const TopTools_MapOfShape& cornerVV, const TopTools_MapOfShape& cornerVV,
TopTools_MapOfShape& internEE) TopTools_MapOfShape& internEE)
{ {
TopTools_IndexedMapOfShape subEE, subFF; TopTools_IndexedMapOfShape subEE;
TopExp::MapShapes( shape, TopAbs_EDGE, subEE ); TopExp::MapShapes( shape, TopAbs_EDGE, subEE );
TopExp::MapShapes( shape, TopAbs_FACE, subFF ); //TopExp::MapShapes( shape, TopAbs_FACE, subFF );
TopoDS_Vertex VV[2]; TopoDS_Vertex VV[2];
TopTools_MapOfShape subChecked/*, ridgeEE*/; TopTools_MapOfShape subChecked, ridgeEE;
TopTools_MapIteratorOfMapOfShape vIt( cornerVV ); TopTools_MapIteratorOfMapOfShape vIt( cornerVV );
for ( ; vIt.More(); vIt.Next() ) for ( ; vIt.More(); vIt.Next() )
{ {
@ -401,6 +401,8 @@ namespace
TopoDS_Edge ridgeE = TopoDS::Edge( *riE ); TopoDS_Edge ridgeE = TopoDS::Edge( *riE );
while ( !ridgeE.IsNull() ) while ( !ridgeE.IsNull() )
{ {
if ( !ridgeEE.Add( ridgeE ))
break;
TopExp::Vertices( ridgeE, VV[0], VV[1] ); TopExp::Vertices( ridgeE, VV[0], VV[1] );
TopoDS_Shape V1 = VV[ V0.IsSame( VV[0] )]; TopoDS_Shape V1 = VV[ V0.IsSame( VV[0] )];
if ( cornerVV.Contains( V1 ) ) if ( cornerVV.Contains( V1 ) )
@ -451,6 +453,11 @@ namespace
} // loop on ridge EDGEs around a corner VERTEX } // loop on ridge EDGEs around a corner VERTEX
} // loop on on corner VERTEXes } // loop on on corner VERTEXes
if ( subEE.Extent() > ridgeEE.Extent() + internEE.Extent() ) // PAL23269
for ( int i = 1; i < subEE.Extent(); ++i )
if ( !ridgeEE.Contains( subEE(i) ))
internEE.Add( subEE(i) );
return true; return true;
} // getInternalEdges() } // getInternalEdges()
} // namespace } // namespace

View File

@ -1116,7 +1116,7 @@ bool StdMeshers_Prism_3D::compute(const Prism_3D::TPrismTopo& thePrism)
( ! botSM->GetAlgo() || ( ! botSM->GetAlgo() ||
! _gen->Compute( *botSM->GetFather(), botSM->GetSubShape(), /*shapeOnly=*/true ))) ! _gen->Compute( *botSM->GetFather(), botSM->GetSubShape(), /*shapeOnly=*/true )))
return error( COMPERR_BAD_INPUT_MESH, return error( COMPERR_BAD_INPUT_MESH,
TCom( "No mesher defined to compute the face #") TCom( "No mesher defined to compute the base face #")
<< shapeID( thePrism.myBottom )); << shapeID( thePrism.myBottom ));
// Make all side FACEs of thePrism meshed with quads // Make all side FACEs of thePrism meshed with quads