C# reverse a curve using a guide curve

Hi everyone,

I’m wondering how to make a function in c# component similar to grasshopper component “flip curve”.
Gh flip curve is really handy, it can ensure my input curves are following the same direction.
In rhinocommon, however, I only find a “reverse” function without an optional guide curve in curve structure.

Does anyone know how to implement flip curve by a guide curve in c#?
Or it’s easier to load gh component library in C#, and directly make use of flip curve gh function?


Hi Shaun - see Curve.DoDirectionsMatch()


Thank you Pascal!