// #include <BRepClass_FaceClassifier.hxx>
#include <TopTools_MapOfShape.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
+
/* ==================================
* =========== PYTHON ==============
* ==================================*/
if(myExtrem.IsDone()) {
nbv = myExtrem.NbExt();
for (Standard_Integer i = 1; i <= nbv; i++) {
+#if OCC_VERSION_LARGE >= 0x06030100
+ Standard_Real d = Sqrt(myExtrem.SquareDistance(i));
+#else
Standard_Real d = myExtrem.Value(i);
+#endif
d = Abs(d);
if(d <= MaxDist) {
MaxDist = d;