PAL0023627: [IMACS] ASERIS: project point to the mesh

correct order of elements if the poly-line
This commit is contained in:
eap 2018-11-09 19:12:07 +03:00
parent 441a2df90c
commit 8dc55ee0b7

View File

@ -13449,6 +13449,12 @@ namespace // utils for MakePolyLine
if ( myPaths[ iSeg ].myPoints.empty() ) if ( myPaths[ iSeg ].myPoints.empty() )
throw SALOME_Exception( SMESH_Comment("Can't find a full path for PolySegment #") << iSeg ); 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() } // PolyPathCompute::Compute()
}; // struct PolyPathCompute }; // struct PolyPathCompute