Control Point as Output parameter

I am trying to get control points out of a Grasshopper custom component that takes nurbs geometry as input. So similar to the curve “Control Points” or the “Surface Points” features.
Problem is, having registered a Point parameter using AddPointParameter in the RegisterOutputParams methode, I can only output objects of type GH_Point or if I am right objects that can be casted into a GH_Point like Point3ds. No control points.
Converting ControlPoints into GH_Point using GH_Convert doesn’t work, but if it would, I guess I would loose the controlPoint properties anyway.
I tried registering GeometryParameter resp. GenericParameter, but it doesn’t lead to the objectiv either.

So, is there a way to output control points? Any help appreciated, thank you!

Hi Pierre,

When you output the control points, are you still planning to use them as input for another process? Or just for viz purposes? I am not in visual studio know but I am pretty sure that if you just output the NurbsCurvePointList as generic item It should be fine because then you can always cast it back to its original type if you pretend to use it again. You can also try to create your own wrapper class and make the NurbsCurvePointList as a property to later access it. Although this will be redundant because you will still have to output that wrapper class as generic. I am almost certain that just by outputting the NurbsCurvePointList as a generic item it should be fine.

Is there a reason that GH_Point wont work for you as an output? I mean what do you plan to do with it. If it is something about editing control points to change the curve / surface you can still use GH_Point the same way that components like “Point Deform” work where it accepts Point3d (GH_Point) as a control point location.

If it is what Michael Pryor is saying you would need to access the ControlPoint objects location property, which gives you a Point3d to then send as output. You can’t directly cast a ControlPoint to anything because it’s a struct and it only inherits from System.Object That being said it has nothing to do with a Point3d or has even a clue of what a GH_Point is

thinking to your questions brought me on the right way:
I actually try to reproduce the Rhino MoveUVN fonction in Grasshopper, adding Datatree support. But I was sticking to much to the Rhino concept where you can change the input geometry using the computed control points straight away.
In Grasshopper I cannot do so, meaning modify the input geometry using the output control points (if I could get them) as I was thinking (I’d produce a stackoverflow).
So I have to use the ouput points to create nurbs geometry from scratch (after I moved them along UVN directions), which means point3ds as output are fully ok!
Thank you!