Help with Curve method ComputeClosestPoints

@Jean-Marc I think asking on the friendly and helpful pyRevit forum is a good idea, too. :wink:
@rtorrez : for the case of the result out argument it is indeed more tricky than the common strongbox or typed list examples one would find in usual rvtapi snippets.
to get to the working ironpython version I wrote it in c# and tried to do the same in ironpython.
so here is the c# snippet:

IList<ClosestPointsPairBetweenTwoCurves> results = new List<ClosestPointsPairBetweenTwoCurves>();

so a new List (not IList!) is constructed new List<ClosestPointsPairBetweenTwoCurves>() and then by its variable type is type cast to IList<ClosestPointsPairBetweenTwoCurves>
this is the what the equivalent would look like in ironpython:

from clr import StrongBox
from System.Collections.Generic import List, IList

results = StrongBox[IList[ClosestPointsPairBetweenTwoCurves]](List[ClosestPointsPairBetweenTwoCurves]())

on the right in the brackets a List[ClosestPointsPairBetweenTwoCurves]() gets created, and then immediatly gets type cast into the required StrongBox[IList[ClosestPointsPairBetweenTwoCurves]]

for accessing the results:

for result in results.Value:
    print(result.Distance)
    print(result.XYZPointOnFirstCurve)
    print(result.XYZPointOnSecondCurve)