]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Corrected for bug NPAL16546. T15881
authorskl <skl@opencascade.com>
Fri, 27 Jul 2007 07:52:06 +0000 (07:52 +0000)
committerskl <skl@opencascade.com>
Fri, 27 Jul 2007 07:52:06 +0000 (07:52 +0000)
src/StdMeshers/StdMeshers_Regular_1D.cxx

index 1e735667d5640c7fdc3f5d408c872028f1bd315c..ba5f7450329801135cf9f6445fe72c57eeb9b95c 100644 (file)
@@ -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<double>::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