From: skl Date: Fri, 27 Jul 2007 07:52:06 +0000 (+0000) Subject: Corrected for bug NPAL16546. X-Git-Tag: T15881 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2692e7b94f8964c055e5a1a96260285edc4891be;p=modules%2Fsmesh.git Corrected for bug NPAL16546. --- diff --git a/src/StdMeshers/StdMeshers_Regular_1D.cxx b/src/StdMeshers/StdMeshers_Regular_1D.cxx index 1e735667d..ba5f74503 100644 --- a/src/StdMeshers/StdMeshers_Regular_1D.cxx +++ b/src/StdMeshers/StdMeshers_Regular_1D.cxx @@ -777,6 +777,11 @@ bool StdMeshers_Regular_1D::Compute(SMESH_Mesh & aMesh, const TopoDS_Shape & aSh const SMDS_MeshNode * idPrev = idFirst; double parPrev = f; double parLast = l; + if(reversed) { + idPrev = idLast; + parPrev = l; + parLast = f; + } for (list::iterator itU = params.begin(); itU != params.end(); itU++) { double param = *itU; @@ -812,8 +817,14 @@ bool StdMeshers_Regular_1D::Compute(SMESH_Mesh & aMesh, const TopoDS_Shape & aSh meshDS->SetMeshElementOnShape(edge, shapeID); } else { - SMDS_MeshEdge* edge = meshDS->AddEdge(idPrev, idLast); - meshDS->SetMeshElementOnShape(edge, shapeID); + if(!reversed) { + SMDS_MeshEdge* edge = meshDS->AddEdge(idPrev, idLast); + meshDS->SetMeshElementOnShape(edge, shapeID); + } + else { + SMDS_MeshEdge* edge = meshDS->AddEdge(idPrev, idFirst); + meshDS->SetMeshElementOnShape(edge, shapeID); + } } } else