Bug: Quad Remesh with circular curve as edge loop

Hello all,
Very simple example: I’m trying to remesh a sphere brep and I have an additional circular curve along its surface (via sphere-cylinder intersection). I am running Quad Remesh and providing the curve as a guide curve with the influence of edge loop (2).

here is the code inside the component:

  private void RunScript(Brep brep, double targetLength, List<Curve> curves, ref object mesh)
  {
    var p = new QuadRemeshParameters();
    p.GuideCurveInfluence = 2;
    p.TargetEdgeLength = targetLength;

    mesh = Mesh.QuadRemeshBrep(brep, p, curves);
  }

some observations:

  • half of the time the component fails to generate a mesh. when successful, sometimes it has holes, sometimes it is well-formed.
  • this bug seems to be due to the fact that the curve is circular. when I shatter the curve and provide only a part of the curve, it seems to succeed at all times. however, when I shatter the curve but still provide all of the smaller curves into the input, it fails much like if the curve was not shattered.

hope it makes sense. thanks!

here is my grasshopper file:

quad-remesh-bug.gh (10.2 KB)