From e4f3043d7d0128e2c8806d9bcf5e84ede8d40be1 Mon Sep 17 00:00:00 2001 From: eap Date: Mon, 28 Apr 2014 17:41:59 +0400 Subject: [PATCH] SALOME_TESTS/Grids/smesh/mesh_Projection_2D_00/A0 Fix association EDGE <-> closed EDGE --- src/StdMeshers/StdMeshers_Prism_3D.cxx | 2 +- src/StdMeshers/StdMeshers_ProjectionUtils.cxx | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/StdMeshers/StdMeshers_Prism_3D.cxx b/src/StdMeshers/StdMeshers_Prism_3D.cxx index 579cbe550..79fd9f82e 100644 --- a/src/StdMeshers/StdMeshers_Prism_3D.cxx +++ b/src/StdMeshers/StdMeshers_Prism_3D.cxx @@ -1487,7 +1487,7 @@ bool StdMeshers_Prism_3D::computeWalls(const Prism_3D::TPrismTopo& thePrism) // compute nodes on VERTEXes SMESH_subMeshIteratorPtr smIt = tgtSM->getDependsOnIterator(/*includeSelf=*/false); while ( smIt->more() ) - smIt->next()->ComputeSubMeshStateEngine( SMESH_subMesh::COMPUTE ); + smIt->next()->ComputeStateEngine( SMESH_subMesh::COMPUTE ); // project segments DBGOUT( "COMPUTE H edge (proj) " << tgtSM->GetId()); projector1D->myHyp.SetSourceEdge( TopoDS::Edge( srcSM->GetSubShape() )); diff --git a/src/StdMeshers/StdMeshers_ProjectionUtils.cxx b/src/StdMeshers/StdMeshers_ProjectionUtils.cxx index 6079b0c54..8d4e172ad 100644 --- a/src/StdMeshers/StdMeshers_ProjectionUtils.cxx +++ b/src/StdMeshers/StdMeshers_ProjectionUtils.cxx @@ -1169,9 +1169,13 @@ bool StdMeshers_ProjectionUtils::FindSubShapeAssociation(const TopoDS_Shape& the RETURN_BAD_RESULT("Different nb of vertices"); } - if ( vMap1.Extent() == 1 ) { + if ( vMap1.Extent() == 1 || vMap2.Extent() == 1 ) { InsertAssociation( vMap1(1), vMap2(1), theMap ); if ( theShape1.ShapeType() == TopAbs_EDGE ) { + if ( vMap1.Extent() == 2 ) + InsertAssociation( vMap1(2), vMap2(1), theMap ); + else if ( vMap2.Extent() == 2 ) + InsertAssociation( vMap2(2), vMap1(1), theMap ); InsertAssociation( theShape1, theShape2, theMap ); return true; }