Salome HOME
23382: [CEA 1981] Wrong mesh SMESH test
[modules/smesh.git] / src / SMESH_I / SMESH_Gen_i.cxx
index 2397c7f6c3643c565e5b1f3c4e0ca2a1f2501e2b..72540ef327ee532123a856b20c73fdf0e1b05015 100644 (file)
@@ -1924,7 +1924,10 @@ CORBA::Boolean SMESH_Gen_i::Compute( SMESH::SMESH_Mesh_ptr theMesh,
       // call implementation compute
       ::SMESH_Mesh& myLocMesh = meshServant->GetImpl();
       myGen.PrepareCompute( myLocMesh, myLocShape );
-      bool ok = myGen.Compute( myLocMesh, myLocShape, myLocShape != myLocMesh.GetShapeToMesh());
+      int how = ::SMESH_Gen::COMPACT_MESH;
+      if ( myLocShape != myLocMesh.GetShapeToMesh() ) // compute a sub-mesh
+        how |= ::SMESH_Gen::SHAPE_ONLY;
+      bool ok = myGen.Compute( myLocMesh, myLocShape, how );
       meshServant->CreateGroupServants(); // algos can create groups (issue 0020918)
       myLocMesh.GetMeshDS()->Modified();
       return ok;