diff --git a/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp b/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp index 8caae8f1e..4b1fad85f 100644 --- a/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp +++ b/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp @@ -54,6 +54,7 @@ #include #include #include +#include #include #include #include @@ -2184,8 +2185,13 @@ static bool getClosestUV (Extrema_GenExtPS& projector, if ( projector.IsDone() ) { double u, v, minVal = DBL_MAX; for ( int i = projector.NbExt(); i > 0; i-- ) +#if OCC_VERSION_HEX >= 0x060500 if ( projector.SquareDistance( i ) < minVal ) { minVal = projector.SquareDistance( i ); +#else + if ( projector.Value( i ) < minVal ) { + minVal = projector.Value( i ); +#endif projector.Point( i ).Parameter( u, v ); } result.SetCoord( u, v ); diff --git a/src/3rdParty/salomesmesh/src/SMESH/SMESH_Pattern.cpp b/src/3rdParty/salomesmesh/src/SMESH/SMESH_Pattern.cpp index c311bb93a..4bf7ebade 100644 --- a/src/3rdParty/salomesmesh/src/SMESH/SMESH_Pattern.cpp +++ b/src/3rdParty/salomesmesh/src/SMESH/SMESH_Pattern.cpp @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -436,8 +437,13 @@ static gp_XY project (const SMDS_MeshNode* theNode, } double u, v, minVal = DBL_MAX; for ( int i = theProjectorPS.NbExt(); i > 0; i-- ) +#if OCC_VERSION_HEX >= 0x060500 if ( theProjectorPS.SquareDistance( i ) < minVal ) { minVal = theProjectorPS.SquareDistance( i ); +#else + if ( theProjectorPS.Value( i ) < minVal ) { + minVal = theProjectorPS.Value( i ); +#endif theProjectorPS.Point( i ).Parameter( u, v ); } return gp_XY( u, v );