]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
21397: EDF SMESH: a quadrangle face mesh can't be projected to a cylinder
authoreap <eap@opencascade.com>
Thu, 10 Jan 2013 11:29:37 +0000 (11:29 +0000)
committereap <eap@opencascade.com>
Thu, 10 Jan 2013 11:29:37 +0000 (11:29 +0000)
after successful algo->Compute(), send SUBMESH_COMPUTED to all lower sub-meshes if ( !algo->NeedDiscreteBoundary() )

src/SMESH/SMESH_subMesh.cxx

index 27092ce8f1db38c6820a79628402e6776dbaa3e2..270a4f87027045808d07f1b7ca6fd87c7727eb3a 100644 (file)
@@ -1522,7 +1522,26 @@ bool SMESH_subMesh::ComputeStateEngine(int event)
         {
           _computeError.reset();
         }
-        updateDependantsState( SUBMESH_COMPUTED ); // send event SUBMESH_COMPUTED
+
+        // send event SUBMESH_COMPUTED
+        if ( ret ) {
+          if ( !algo->NeedDiscreteBoundary() )
+            // send SUBMESH_COMPUTED to dependants of all sub-meshes of shape
+            for (subS.ReInit(); subS.More(); subS.Next())
+            {
+              SMESH_subMesh* sm = _father->GetSubMesh( subS.Current() );
+              SMESH_subMeshIteratorPtr smIt = sm->getDependsOnIterator(false,false);
+              while ( smIt->more() ) {
+                sm = smIt->next();
+                if ( sm->GetSubShape().ShapeType() == TopAbs_VERTEX )
+                  sm->updateDependantsState( SUBMESH_COMPUTED );
+                else
+                  break;
+              }
+            }
+          else
+            updateDependantsState( SUBMESH_COMPUTED );
+        }
       }
       break;
 #ifdef WITH_SMESH_CANCEL_COMPUTE
@@ -1865,9 +1884,7 @@ void SMESH_subMesh::updateDependantsState(const compute_event theEvent)
   for (; it.More(); it.Next())
   {
     const TopoDS_Shape& ancestor = it.Value();
-    SMESH_subMesh *aSubMesh =
-      _father->GetSubMeshContaining(ancestor);
-    if (aSubMesh)
+    if ( SMESH_subMesh *aSubMesh = _father->GetSubMeshContaining(ancestor))
       aSubMesh->ComputeStateEngine( theEvent );
   }
 }