Is there a way to get the info about the rotation angle for a sweep 1 rail freeform?

Seems like my question was already solved here as well:

So in code this would simplify it to:

 result, frame1 = rail_crv.PerpendicularFrameAt(Parameter)
 result, frame2 = rail_crv.FrameAt(Parameter)
 vec1 = frame1.XAxis
 vec2 = frame2.YAxis
 angle = Rhino.Geometry.Vector3d.VectorAngle(vec1, vec2, frame1)
 angle = math.degrees(angle)