X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESH%2FSMESH_MeshEditor.cxx;h=45c9547f88956cd173c56f1557d2ee1086c7cb56;hp=cea314220460932062e7b7bd972eeced069adae7;hb=8dc55ee0b75c97cc1a3d537cff6e992c6122b6d1;hpb=441a2df90cb97ea7d035771a49e28dc53469e3d6 diff --git a/src/SMESH/SMESH_MeshEditor.cxx b/src/SMESH/SMESH_MeshEditor.cxx index cea314220..45c9547f8 100644 --- a/src/SMESH/SMESH_MeshEditor.cxx +++ b/src/SMESH/SMESH_MeshEditor.cxx @@ -13449,6 +13449,12 @@ namespace // utils for MakePolyLine if ( myPaths[ iSeg ].myPoints.empty() ) throw SALOME_Exception( SMESH_Comment("Can't find a full path for PolySegment #") << iSeg ); + // reverse the path + double d00 = ( polySeg.myXYZ[0] - myPaths[ iSeg ].myPoints.front() ).SquareModulus(); + double d01 = ( polySeg.myXYZ[0] - myPaths[ iSeg ].myPoints.back() ).SquareModulus(); + if ( d00 > d01 ) + std::reverse( myPaths[ iSeg ].myPoints.begin(), myPaths[ iSeg ].myPoints.end() ); + } // PolyPathCompute::Compute() }; // struct PolyPathCompute