From d2a8dd635ec65f5f0e21ce3d03d59d34f9b5291d Mon Sep 17 00:00:00 2001 From: eap Date: Mon, 7 Nov 2016 15:12:37 +0300 Subject: [PATCH] 23382: [CEA 1981] Wrong mesh SMESH test --- src/SMESH/SMESH_Gen.cxx | 7 ++++--- src/SMESH/SMESH_Gen.hxx | 2 +- src/SMESH_I/SMESH_Gen_i.cxx | 5 ++++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/SMESH/SMESH_Gen.cxx b/src/SMESH/SMESH_Gen.cxx index 504089aea..752b5f6eb 100644 --- a/src/SMESH/SMESH_Gen.cxx +++ b/src/SMESH/SMESH_Gen.cxx @@ -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; } diff --git a/src/SMESH/SMESH_Gen.hxx b/src/SMESH/SMESH_Gen.hxx index eb6934595..d01105035 100644 --- a/src/SMESH/SMESH_Gen.hxx +++ b/src/SMESH/SMESH_Gen.hxx @@ -60,7 +60,7 @@ typedef struct studyContextStruct typedef std::set TSetOfInt; -class SMESH_EXPORT SMESH_Gen +class SMESH_EXPORT SMESH_Gen { public: SMESH_Gen(); diff --git a/src/SMESH_I/SMESH_Gen_i.cxx b/src/SMESH_I/SMESH_Gen_i.cxx index 2397c7f6c..72540ef32 100644 --- a/src/SMESH_I/SMESH_Gen_i.cxx +++ b/src/SMESH_I/SMESH_Gen_i.cxx @@ -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; -- 2.39.2