Get tangent vector on either side of a G0 joint

Having a brain fart here - best way to get the tangent vectors on both sides of a G0 continuous “kink” in a curve? Easy enough if it’s a polyline or the equivalent, but what if not?

I can think of a couple of ways - one, rather convoluted, is to get all the params of the kinks with their tangent vectors, then reverse the curve and do it again, then match up the joints and get the vector angle between… Or just split up the curve at the kinks and work with the segments… just seems like there should be a less complicated way.

Thx, --Mitch

You know my typical question: what are you trying to do and why?

Splitting polylines/polycurves at kink angles sharper than a user defined value… In the end I just used my second method - got all the C1 discontinuities (already had a function written for that), split a RhinoCommon copy of the curve into segments, then checked the start/end tangents of between each, found the joints/points where the angle criteria was met, then split the original with those.

Thx, --Mitch (2.5 KB)

came across a similar issue - since rhino 5 there is
Curve.DerivativeAt Method (Double, Int32, CurveEvaluationSide)