#include "utilities.h"
+#include <Standard_Version.hxx>
+#ifdef OCC_VERSION_SERVICEPACK
+#define OCC_VERSION_LARGE (OCC_VERSION_MAJOR << 24 | OCC_VERSION_MINOR << 16 | OCC_VERSION_MAINTENANCE << 8 | OCC_VERSION_SERVICEPACK)
+#else
+#define OCC_VERSION_LARGE (OCC_VERSION_MAJOR << 24 | OCC_VERSION_MINOR << 16 | OCC_VERSION_MAINTENANCE << 8)
+#endif
#include <BRepAdaptor_Surface.hxx>
#include <BRepClass3d_SolidClassifier.hxx>
#include <BRep_Tool.hxx>
#define cast2Node(elem) static_cast<const SMDS_MeshNode*>( elem )
+#ifdef OCC_VERSION_SERVICEPACK
+#define OCC_VERSION_LARGE (OCC_VERSION_MAJOR << 24 | OCC_VERSION_MINOR << 16 | OCC_VERSION_MAINTENANCE << 8 | OCC_VERSION_SERVICEPACK)
+#else
+#define OCC_VERSION_LARGE (OCC_VERSION_MAJOR << 24 | OCC_VERSION_MINOR << 16 | OCC_VERSION_MAINTENANCE << 8)
+#endif
+
using namespace std;
using namespace SMESH::Controls;
if ( projector.IsDone() ) {
double u, v, minVal = DBL_MAX;
for ( int i = projector.NbExt(); i > 0; i-- )
+#if OCC_VERSION_LARGE >= 0x06030100
+ if ( Sqrt(projector.SquareDistance( i )) < minVal ) {
+ minVal = Sqrt(projector.SquareDistance( i ));
+ projector.Point( i ).Parameter( u, v );
+ }
+#else
if ( projector.Value( i ) < minVal ) {
minVal = projector.Value( i );
projector.Point( i ).Parameter( u, v );
}
+#endif
result.SetCoord( u, v );
return true;
}
_extremum.Perform(aPnt);
if ( _extremum.IsDone() )
for ( int iSol = 1; iSol <= _extremum.NbExt() && _state == TopAbs_OUT; ++iSol)
+#if OCC_VERSION_LARGE >= 0x06030100
+ _state = ( Sqrt(_extremum.SquareDistance(iSol)) <= theTol ? TopAbs_IN : TopAbs_OUT );
+#else
_state = ( _extremum.Value(iSol) <= theTol ? TopAbs_IN : TopAbs_OUT );
+#endif
}
TopAbs_State State() const
{
//
#include "SMESH_Pattern.hxx"
+#include <Standard_Version.hxx>
+#ifdef OCC_VERSION_SERVICEPACK
+#define OCC_VERSION_LARGE (OCC_VERSION_MAJOR << 24 | OCC_VERSION_MINOR << 16 | OCC_VERSION_MAINTENANCE << 8 | OCC_VERSION_SERVICEPACK)
+#else
+#define OCC_VERSION_LARGE (OCC_VERSION_MAJOR << 24 | OCC_VERSION_MINOR << 16 | OCC_VERSION_MAINTENANCE << 8)
+#endif
#include <BRepAdaptor_Curve.hxx>
#include <BRepTools.hxx>
#include <BRepTools_WireExplorer.hxx>
}
double u, v, minVal = DBL_MAX;
for ( int i = theProjectorPS.NbExt(); i > 0; i-- )
+#if OCC_VERSION_LARGE >= 0x06030100
+ if ( Sqrt(theProjectorPS.SquareDistance( i )) < minVal ) {
+ minVal = Sqrt(theProjectorPS.SquareDistance( i ));
+ theProjectorPS.Point( i ).Parameter( u, v );
+ }
+#else
if ( theProjectorPS.Value( i ) < minVal ) {
minVal = theProjectorPS.Value( i );
theProjectorPS.Point( i ).Parameter( u, v );
}
+#endif
return gp_XY( u, v );
}