I need the equivalent in C++ of the RebuildCrvNonUniform command in Rhinoceros.
Does exist something that let me rebuild a curve with tolerance?
I’ve tried the RhinoRebuildCurve SDK function, but is not the same as the RebuildCrvNonUniform command.
I need this because I have increased the points of a NurbsCurve for better work with it but is not what I want to show to the user as output (too many points).
So, I need a function that let me reduce the points in the curve by maintaining the accuracy of the geometry and the less points possible.
@piac I don’t want to use the scripts in my plugin due to the high dependency that they have. They are scripted values insert in code and this is not the best way to do the code for a cross-version plugin ( my plugin needs to run under all version of Rhinoceros ). Also, you don’t have any control on what it do or if it fails or not.
@menno I’ve tried the RhinoFitCurve function. It rebuilds the curve as expected, but it doesn’t reduce the curve points (it increases them!).
Also, but this is not a problem (at least for my output), if I set the curve’s grade to 1 it creates a third grade curve.
So, the only way that I find is to analyze the curve and rebuild it manually