Fix build error with OCC6.3

This commit is contained in:
wmayer 2013-03-31 10:37:19 +02:00
parent 7bedde5b4f
commit 23ae910069
2 changed files with 12 additions and 0 deletions

View File

@ -54,6 +54,7 @@
#include <GeomAdaptor_Surface.hxx>
#include <Geom_Curve.hxx>
#include <Geom_Surface.hxx>
#include <Standard_Version.hxx>
#include <TColStd_ListOfInteger.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
@ -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 );

View File

@ -39,6 +39,7 @@
#include <GeomAdaptor_Surface.hxx>
#include <Geom_Curve.hxx>
#include <Geom_Surface.hxx>
#include <Standard_Version.hxx>
#include <TopAbs_ShapeEnum.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
@ -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 );