How to get GetNextDiscontinuity Points from Curve

Hi all,

I tried to to use GetNextDiscontinuity in Rhino Common to get the same result like the curve " Discontinuity " in grasshopper.
But i have no idea how to use it.
A small example would be great.

Thanks in advanced

I also have kissanime this same question. Anyone who can help is letgo appreciated.

I recently implemented it in GHPython like so, might help:

import Rhino as rc

def discontinuity(crv):
    """ Find G1_continuous discontinuities on a curve """
    # Get curve domain min/max
    tMin = crv.Domain.Min
    tMax = crv.Domain.Max
    # Perform search
    dctParams = []
    dctPoints = []
    getNext = True
    while getNext:
        getNext,t = crv.GetNextDiscontinuity(rc.Geometry.Continuity.G1_continuous,tMin,tMax)
        if not rc.RhinoMath.IsValidDouble(t):
            t = 0.00
        if getNext:
            tMin = t
    return dctParams,dctPoints

Does admittedly seem a bit convoluted/complex having to implement a while loop, I might be missing a simpler approach here.

Thanks for your example