Bug?: 'CreateInterpolatedCurve' Disregards Start and End Tangents

Bug + a question:

For some reason the method Curve.CreateInterpolatedCurve doesn’t respect start and end tangents. Looks like a bug to me.

I can use NurbsCurve.CreateHSpline as a workaround though (but I can’t set the curve degree on create).

Q: How do I set the curve degree after the curve is created?

Edit >>>: It also seems that the command “helix_curve.IncreaseDegree(curve_degree);” doesn’t do it’s thing (curvature analysis shows that the curve doesn’t change).

I’m on Rhino 7.5.21082.11001, 2021-03-23

    // OK - Respects tangents:
    var helix_curve = NurbsCurve.CreateHSpline(interpolate_points, 
      tangent_s, tangent_e);

    // Not OK - Does not respects tangents:
    var helix_curve_2 = Curve.CreateInterpolatedCurve(
      interpolate_points, curve_degree, CurveKnotStyle.Uniform,
      tangent_s, tangent_e);

// Rolf

Hi @RIL,

Can you provide a simple example, with points, that reproduces the problem?

– Dale

Hi @dale ,

Here a stripped debug-version. I input “static” data (including the start & end tangents) so I could scrap most of the internal code except for the InterpolationCurve methods and change of Degree.

A Debug toggle button swaps the two methods so one can study the Curvature Graph while fiddling with the degree.

Above the pictured area I also rigged std GH-components to create the very same interpolate curve based on the same curve points (“RailPoints”) as the C# component uses.

DEBUG_Helix3dGen.gh (42.1 KB)

// Rolf