Intersection in RhinoCommon seems to different with CCX in Grasshoper

I try to write a code for curve curve intersection like what it already has in grasshopper to be one of the components in c#. However, intersection function in rhino seems to work slightly different, yet critical to use as the picture below.

The question is how can I write the code in c# to be the same as CCX components in Rhino.

 private void RunScript(Curve x, Curve y, double tol, double ov, ref object A)

{
var events = Rhino.Geometry.Intersect.Intersection.CurveCurve(x, y, tol, ov);
List pts = new List();

if (events != null)
{
  for (int i = 0; i < events.Count; i++)
  {
    var ccx_event = events[i];
    pts.Add(ccx_event.PointA);

    if (ccx_event.PointA.DistanceTo(ccx_event.PointB) > double.Epsilon)
    {

      pts.Add(ccx_event.PointB);
    }
  }
}

Point3d[] result = Point3d.CullDuplicates(pts, 0.1);

A = result;

}

What is your document tolerance? Wthiout knowing, I would assume GH takes the document tolerance, while you feed 0.001. Try adjusting either yours or the documents tolerance to see if it changes anything.

Edit: judging from the second screen, your document might be set to 0.00? In that case, try 0.01 as a tolerance, see if it makes any difference.