OCC Version : 6.5.1 OS : All platforms Package : Modeling Algorithms\TKTopAlgo.dll 6.2.0 working source code D:\OpenCASCADE6.2.0\ros\src\BRepExtrema\BRepExtrema_DistanceSS.cxx Line [391] for(i = 1; i <= arrU.Length(); i++) { aU = arrU.Value(i); if (aU < Umin) Umin = aU; else if (aU > Umax) Umax = aU; aV = arrV.Value(i); if (aV < Vmin) Vmin = aV; else if (aV > Vmax) Vmax = aV; } 6.5.1 infinite loop in source code (developer who made this error will offer "Champagne" to his mates) d:\OpenCASCADE6.5.1\ros\src\BRepExtrema\BRepExtrema_DistanceSS.cxx Line [337] Standard_Integer i = 0; while (i < 8) ///////////////////// while (i++ < 8) Please { const Standard_Real aU = arrU[i]; if (aU < Umin) Umin = aU; else if (aU > Umax) Umax = aU; const Standard_Real aV = arrV[i]; if (aV < Vmin) Vmin = aV; else if (aV > Vmax) Vmax = aV; } If you keep while call I suggest that you make coherency code at line [179] while (i < 8) // prefer while (i++ < 8) { const Standard_Real aU = arrU[i++]; // arrU[i]; if (aU < Umin) Umin = aU; else if (aU > Umax) Umax = aU; }