Trouble with directions and isocurves

Hi, I have trouble finding the isocurve in the middle of the domain in the attached object, I don’t understand exactly why, this is the code I’m developing:

var gs = new GetObject();
gs.SetCommandPrompt("Select the face");
gs.GeometryFilter = ObjectType.Surface;
gs.Get();

if (gs.CommandResult() != Result.Success)
    return gs.CommandResult();

var face = gs.Object(0).Face();
if (face == null)
{
    Dialogs.ShowMessage("No Face Found", "Face Error");
    return Result.Failure;
}                        

var c = face.ShrinkSurfaceToEdge();
Surface surface = face;

var midU = surface.Domain(0).Mid;

var midV = surface.Domain(1).Mid;            

var midD = Math.Min(Math.Abs(midU), Math.Abs(midV));

Curve isoCurveH = surface.IsoCurve(0, midD); //also using midU and midV still the result doesn't change
Curve isoCurveV = surface.IsoCurve(1, midD);
Curve isoCurve = null;

if (isoCurveH.GetLength() > isoCurveV.GetLength())
    isoCurve = isoCurveH;
else
    isoCurve = isoCurveV;           
            
if (isoCurve == null)
    return Result.Failure;

doc.Objects.Add(isoCurve);

doc.Views.Redraw();

In the attached file there are also all the curves generated by the code
IsoCurve Wrong Result.3dm (341.1 KB)

I believe to get an isocurve in the U direction, you need to use the midV parameter and in the V the midU parameter:

    var midU = surface.Domain(0).Mid;
    var midV = surface.Domain(1).Mid;

    Curve isoCurveH = surface.IsoCurve(0, midV); //isocurve in U
    Curve isoCurveV = surface.IsoCurve(1, midU); //isocurve in V

Thanks Gijs, I noticed also that (the code i post was a test and i forgot to modify it), my question is if is always like this and I can consider it sure, because is a bit counterintuitive.. So I was looking for an official let’s say explanation