Salome HOME
23382: [CEA 1981] Wrong mesh SMESH test
[modules/smesh.git] / src / SMESH / SMESH_Gen.cxx
index 504089aea77cf618f6939a85d77e6a23c5f15bd6..752b5f6ebaded468801dc43866724e1972e05ace 100644 (file)
@@ -371,9 +371,6 @@ bool SMESH_Gen::Compute(SMESH_Mesh &          aMesh,
 
   MEMOSTAT;
 
-  if ( aCompactMesh )
-    aMesh.GetMeshDS()->compactMesh();
-
   // fix quadratic mesh by bending iternal links near concave boundary
   if ( aCompactMesh && // a final compute
        aShape.IsSame( aMesh.GetShapeToMesh() ) &&
@@ -386,6 +383,10 @@ bool SMESH_Gen::Compute(SMESH_Mesh &          aMesh,
       aHelper.FixQuadraticElements( sm->GetComputeError() );
     }
   }
+
+  if ( aCompactMesh )
+    aMesh.GetMeshDS()->compactMesh();
+
   return ret;
 }