Salome HOME
23269: Meshing a composite block with IJK
authoreap <eap@opencascade.com>
Thu, 14 Apr 2016 15:31:42 +0000 (18:31 +0300)
committereap <eap@opencascade.com>
Thu, 14 Apr 2016 15:31:42 +0000 (18:31 +0300)
  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

src/SMESHGUI/SMESHGUI_ComputeDlg.cxx
src/SMESHGUI/SMESHGUI_DeleteGroupDlg.cxx
src/SMESH_I/SMESH_Gen_i_1.cxx
src/StdMeshers/StdMeshers_CompositeHexa_3D.cxx
src/StdMeshers/StdMeshers_Prism_3D.cxx

index 05858cc14f52ccf143550222729f6f915ce00326..ad4453c1c749f7a27038896e64e2792daad9714f 100644 (file)
@@ -939,7 +939,9 @@ void SMESHGUI_BaseComputeOp::computeMesh()
           if ( !smSObj ) continue;
           SMESH::SMESH_IDSource_var aSubMeshObj =
             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
         SMESH::ListOfGroups_var aGroups = myMesh->GetGroups();
@@ -955,7 +957,9 @@ void SMESHGUI_BaseComputeOp::computeMesh()
           if ( !aGroupSO ) continue;
           SMESH::SMESH_IDSource_var aGroupObj =
             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
index 6952b96c98267e9420d7b9245da4435ec82431af..7711022c36f3a4372bbb18b3aecb12cac125cac7 100644 (file)
@@ -37,6 +37,7 @@
 #include <SUIT_Session.h>
 #include <SUIT_MessageBox.h>
 #include <SUIT_ResourceMgr.h>
+#include <SUIT_OverrideCursor.h>
 
 #include <SalomeApp_Study.h>
 #include <LightApp_Application.h>
@@ -205,6 +206,8 @@ bool SMESHGUI_DeleteGroupDlg::onApply()
   if (!isValid())
     return false;
 
+  SUIT_OverrideCursor wc;
+
   myBlockSelection = true;
 
   QList<SMESH::SMESH_GroupBase_var>::iterator anIter;
index 30ef9e5c646f0a4cc84a465d185d85aa50c74ef7..af12566d8698d440e465f1e71397d13257ec5353 100644 (file)
@@ -771,8 +771,7 @@ SALOMEDS::SObject_ptr SMESH_Gen_i::PublishGroup (SALOMEDS::Study_ptr    theStudy
         SetName( aRootSO, aRootNames[aType] );
 
       // Add new group to corresponding sub-tree
-      SMESH::array_of_ElementType_var elemTypes = theGroup->GetTypes();
-      int isEmpty = ( elemTypes->length() == 0 );
+      int isEmpty = false;
       std::string pm[2] = { "ICON_SMESH_TREE_GROUP", "ICON_SMESH_TREE_MESH_WARN" };
       if ( SMESH::DownCast< SMESH_GroupOnFilter_i* > ( theGroup ))
       {
index cd047490a123e1c451b7f4297f090b2eb15125ac..cb0512d1ff1ce07bf0df98853a47621bab89125f 100644 (file)
@@ -382,12 +382,12 @@ namespace
                          const TopTools_MapOfShape& cornerVV,
                          TopTools_MapOfShape&       internEE)
   {
-    TopTools_IndexedMapOfShape subEE, subFF;
+    TopTools_IndexedMapOfShape subEE;
     TopExp::MapShapes( shape, TopAbs_EDGE, subEE );
-    TopExp::MapShapes( shape, TopAbs_FACE, subFF );
+    //TopExp::MapShapes( shape, TopAbs_FACE, subFF );
 
     TopoDS_Vertex VV[2];
-    TopTools_MapOfShape subChecked/*, ridgeEE*/;
+    TopTools_MapOfShape subChecked, ridgeEE;
     TopTools_MapIteratorOfMapOfShape vIt( cornerVV );
     for ( ; vIt.More(); vIt.Next() )
     {
@@ -401,6 +401,8 @@ namespace
         TopoDS_Edge ridgeE = TopoDS::Edge( *riE );
         while ( !ridgeE.IsNull() )
         {
+          if ( !ridgeEE.Add( ridgeE ))
+            break;
           TopExp::Vertices( ridgeE, VV[0], VV[1] );
           TopoDS_Shape V1 = VV[ V0.IsSame( VV[0] )];
           if ( cornerVV.Contains( V1 ) )
@@ -451,6 +453,11 @@ namespace
       } // loop on ridge EDGEs around a corner VERTEX
     } // 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;
   } // getInternalEdges()
 } // namespace
index c7a44bada43d8dce1826548a087af409337e9ebd..d60f1397e9d3ee62ab209b2c9d57cd49b1700628 100644 (file)
@@ -1116,7 +1116,7 @@ bool StdMeshers_Prism_3D::compute(const Prism_3D::TPrismTopo& thePrism)
       ( ! botSM->GetAlgo() ||
         ! _gen->Compute( *botSM->GetFather(), botSM->GetSubShape(), /*shapeOnly=*/true )))
     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 ));
 
   // Make all side FACEs of thePrism meshed with quads