I’m using NurbsCurve.GrevillePoints to manipulate interpolated curves by code. This works pretty well, but I wonder why this method returns Greville points which are not useful (for me at least
What I’m interested in are these points which create perfect curve duplicates when interpolated with the right flavor. I’d appreciate to have an option to filter these “superfluous” points.
The picture shows these points of two degree 3 curves in red. The curves have been created by interpolating the green points.
With a curve’s edit points on, when you move one of the points, the curve will be rebuilt using Greville interpolation. This is not the same kind of interpolation provided by Curve.CreateInterpolatedCurve, which is bicubic. My guess this is why are seeing the problems you are.
I guess I like to know more about what you are trying to do (other than what you’ve describe), and why. What problem are you trying to solve?
I just noticed that SurfaceEditPoints has the option to avoid these points with the option: return_all=False
So it seems reasonable to have it on curves too?
@stevebaer there is a little buglet in SurfaceEditPoints line 2567 Message: global name ‘nurbs’ is not defined.
i am trying to do what is explained in the opening post in RH5 and RH6. I get the edit (greville) points and transform them individually in order to create a new interpolated nurbs curve from them. So far this works ok with open degree 3 curves, but with closed or periodic ones i am facing a problem when i use eg.
The initially closed curves are then open and have overlaps at start / end. I’ve tried to remove duplicate points without success. Is there a way to handle the duplicate greville points somehow ? How can i find out about the knotstyle used when the curve exists and i want to use it as argument with CreateInterpolatedCurve ?
Or can i modify the edit points of an existing nurbs curve without re-creating it ?
Thanks @dale, this would be the way to go with RH6, but is there something i can try in RH5 ? Can i get rid of the superfluous greville points which are returned ?
for closed curves clamped at start / end it runs through and i can create a new curve from the points using CreateInterpolatedCurve. For closed periodic i see it is missing the point to close which is easy to fix by appending the first point to the end.
But for open curves i get an index out of range from this line: