Salome HOME
53539: 0D Element
[modules/smesh.git] / src / StdMeshers / StdMeshers_Regular_1D.cxx
index 973f113847f2f54edcf302fb3152cecf435ede20..1b2ba291f06a886ea4d02ef6b8d7fee14235eb00 100644 (file)
@@ -29,6 +29,7 @@
 
 #include "SMDS_MeshElement.hxx"
 #include "SMDS_MeshNode.hxx"
+#include "SMESHDS_Mesh.hxx"
 #include "SMESH_Comment.hxx"
 #include "SMESH_Gen.hxx"
 #include "SMESH_HypoFilter.hxx"
@@ -37,8 +38,8 @@
 #include "SMESH_subMeshEventListener.hxx"
 #include "StdMeshers_Adaptive1D.hxx"
 #include "StdMeshers_Arithmetic1D.hxx"
-#include "StdMeshers_Geometric1D.hxx"
 #include "StdMeshers_AutomaticLength.hxx"
+#include "StdMeshers_Geometric1D.hxx"
 #include "StdMeshers_Deflection1D.hxx"
 #include "StdMeshers_Distribution.hxx"
 #include "StdMeshers_FixedPoints1D.hxx"
@@ -990,7 +991,9 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh &     theMesh,
   case FIXED_POINTS_1D:
   {
     const std::vector<double>& aPnts = _fpHyp->GetPoints();
-    const std::vector<int>&   nbsegs = _fpHyp->GetNbSegments();
+    std::vector<int>          nbsegs = _fpHyp->GetNbSegments();
+    if ( theReverse )
+      std::reverse( nbsegs.begin(), nbsegs.end() );
 
     // sort normalized params, taking into account theReverse
     TColStd_SequenceOfReal Params;
@@ -1145,7 +1148,7 @@ bool StdMeshers_Regular_1D::Compute(SMESH_Mesh & theMesh, const TopoDS_Shape & t
   {
     list< double > params;
     bool reversed = false;
-    if ( theMesh.GetShapeToMesh().ShapeType() >= TopAbs_WIRE ) {
+    if ( theMesh.GetShapeToMesh().ShapeType() >= TopAbs_WIRE && _revEdgesIDs.empty() ) {
       // if the shape to mesh is WIRE or EDGE
       reversed = ( EE.Orientation() == TopAbs_REVERSED );
     }