From: eap Date: Tue, 2 Sep 2008 08:44:30 +0000 (+0000) Subject: [SALOME platform 0019943]: Pb with projection 2d X-Git-Tag: V4_1_4a1~21 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5291ea1e65654df186d0e45108bcd42e6e8c171d;p=modules%2Fsmesh.git [SALOME platform 0019943]: Pb with projection 2d In SMESH_Pattern::Load(mesh,face), fix treating seam vertices of not seam edges --- diff --git a/src/SMESH/SMESH_Pattern.cxx b/src/SMESH/SMESH_Pattern.cxx index 9dc5b08f1..40d7bf57f 100644 --- a/src/SMESH/SMESH_Pattern.cxx +++ b/src/SMESH/SMESH_Pattern.cxx @@ -633,12 +633,13 @@ bool SMESH_Pattern::Load (SMESH_Mesh* theMesh, // vertices for ( elIt = eList.begin(); elIt != eList.end(); elIt++ ) { + int nbV = myShapeIDMap.Extent(); myShapeIDMap.Add( TopExp::FirstVertex( *elIt, true )); - if ( helper.IsSeamShape( *elIt ) ) { - // vertices present twice in the wire have two corresponding key points - const TopoDS_Vertex& lastV = TopExp::LastVertex( *elIt, true ); - if ( helper.IsRealSeam( lastV )) - myShapeIDMap.Add( lastV );// vertex orienation is REVERSED + bool added = ( nbV < myShapeIDMap.Extent() ); + if ( !added ) { // vertex encountered twice + // a seam vertex have two corresponding key points + myShapeIDMap.Add( TopExp::FirstVertex( *elIt, true ).Reversed()); + ++nbNodes; } if ( SMESHDS_SubMesh * eSubMesh = aMeshDS->MeshElements( *elIt )) nbNodes += eSubMesh->NbNodes() + 1; @@ -679,7 +680,7 @@ bool SMESH_Pattern::Load (SMESH_Mesh* theMesh, else { // on CLOSED edge (i.e. having one vertex with different orienations) for ( int is2 = 0; is2 < 2; ++is2 ) { TopoDS_Shape & v = is2 ? v2 : v1; - if ( helper.IsSeamShape( v ) ) { + if ( helper.IsRealSeam( v ) ) { // reverse or not depending on orientation of adjacent seam TopoDS_Edge seam; list::iterator eIt2 = elIt;