Salome HOME
22433: [CEA 1020] A correct mesh ends with error
authoreap <eap@opencascade.com>
Wed, 4 Dec 2013 11:54:41 +0000 (11:54 +0000)
committereap <eap@opencascade.com>
Wed, 4 Dec 2013 11:54:41 +0000 (11:54 +0000)
   If CADSurf reports no errors, set a warning but not an error to a
   face w/o mesh

src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx

index a8abc9bfc9dc5138aef0ecd1ee809939176efe95..e89d86457970a01c55d8f8e848227a68eea0ce69 100644 (file)
@@ -3066,12 +3066,17 @@ bool BLSURFPlugin_BLSURF::compute(SMESH_Mesh&         aMesh,
         sm->SetIsAlwaysComputed( true );
 
   // Set error to FACE's w/o elements
+  SMESH_ComputeErrorName err = COMPERR_ALGO_FAILED;
+  if ( _comment.empty() )
+  {
+    err      = COMPERR_WARNING;
+    _comment = "No mesh elements assigned to a face";
+  }
   for ( int i = 1; i <= fmap.Extent(); ++i )
   {
     SMESH_subMesh* sm = aMesh.GetSubMesh( fmap(i) );
     if ( !sm->GetSubMeshDS() || sm->GetSubMeshDS()->NbElements() == 0 )
-      sm->GetComputeError().reset
-        ( new SMESH_ComputeError( COMPERR_ALGO_FAILED, _comment, this ));
+      sm->GetComputeError().reset( new SMESH_ComputeError( err, _comment, this ));
   }
 
   // Issue 0019864. On DebianSarge, FE signals do not obey to OSD::SetSignal(false)