From: skl Date: Tue, 15 Sep 2009 13:32:29 +0000 (+0000) Subject: Changed for 0020431. X-Git-Tag: V5_1_3rc1~49 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3e09f90deb9769d11685f5d5948f14a1fb8a37e0;p=modules%2Fsmesh.git Changed for 0020431. --- diff --git a/src/StdMeshers/StdMeshers_RadialQuadrangle_1D2D.cxx b/src/StdMeshers/StdMeshers_RadialQuadrangle_1D2D.cxx index 95423e861..303d68ab0 100644 --- a/src/StdMeshers/StdMeshers_RadialQuadrangle_1D2D.cxx +++ b/src/StdMeshers/StdMeshers_RadialQuadrangle_1D2D.cxx @@ -206,6 +206,9 @@ bool StdMeshers_RadialQuadrangle_1D2D::Compute(SMESH_Mesh& aMesh, TopoDS_Face F = TopoDS::Face(aShape); Handle(Geom_Surface) S = BRep_Tool::Surface(F); + // orientation + bool IsForward = F.Orientation()==TopAbs_FORWARD; + //cout<<"RadialQuadrangle_1D2D::Compute nbe = "<SetMeshElementOnShape(ME, edgeID); } // LinEdge2 - edgeID = meshDS->ShapeToIndex(LinEdge1); + edgeID = meshDS->ShapeToIndex(LinEdge2); aVec = gp_Vec(P0,P2); // check orientation Crv = BRep_Tool::Curve(LinEdge2,fp,lp); @@ -683,12 +686,21 @@ bool StdMeshers_RadialQuadrangle_1D2D::Compute(SMESH_Mesh& aMesh, tmpNodes[Points.Length()] = CNodes[i]; // quad for(j=0; jAddFace( tmpNodes[j], Nodes1[j], - Nodes1[j+1], tmpNodes[j+1] ); + SMDS_MeshFace* MF; + if(IsForward) + MF = myHelper->AddFace( tmpNodes[j], Nodes1[j], + Nodes1[j+1], tmpNodes[j+1] ); + else + MF = myHelper->AddFace( tmpNodes[j], tmpNodes[j+1], + Nodes1[j+1], Nodes1[j] ); if(MF) meshDS->SetMeshElementOnShape(MF, faceID); } // tria - SMDS_MeshFace* MF = myHelper->AddFace( NC, Nodes1[0], tmpNodes[0] ); + SMDS_MeshFace* MF; + if(IsForward) + MF = myHelper->AddFace( NC, Nodes1[0], tmpNodes[0] ); + else + MF = myHelper->AddFace( NC, tmpNodes[0], Nodes1[0] ); if(MF) meshDS->SetMeshElementOnShape(MF, faceID); for(j=0; jAddFace( Nodes2[i], Nodes1[i], - Nodes1[i+1], Nodes2[i+1] ); + SMDS_MeshFace* MF; + if(IsForward) + MF = myHelper->AddFace( Nodes2[i], Nodes1[i], + Nodes1[i+1], Nodes2[i+1] ); + else + MF = myHelper->AddFace( Nodes2[i], Nodes2[i+1], + Nodes1[i+1], Nodes1[i] ); if(MF) meshDS->SetMeshElementOnShape(MF, faceID); } // tria - SMDS_MeshFace* MF = myHelper->AddFace( NC, Nodes1[0], Nodes2[0] ); + SMDS_MeshFace* MF; + if(IsForward) + MF = myHelper->AddFace( NC, Nodes1[0], Nodes2[0] ); + else + MF = myHelper->AddFace( NC, Nodes2[0], Nodes1[0] ); if(MF) meshDS->SetMeshElementOnShape(MF, faceID);