Try CreatePeriodicUniformNurbs() and CreateClampedUniformNurbs()
functions on OnNurbsCurve. Those are the ones I use to create control
point curves.
I use RhinoInterpCurve() on RhUtil to create interpolated curves.

Creating new curves and surfaces from control points is surprisingly
difficult in the Rhino SDK. I was amazed as well while researching
this for Grasshopper. Luckily most of the RhinoScript methods will be
available to plugin developers in Rhino5, so we'll see a new plethora
of high-level functions.

--
David Rutten
Robert McNeel & Associates

ps. Grasshopper also recognized OnPolyCurve, my previous list was
incomplete.

On Oct 12, 10:02 pm, ga <[EMAIL PROTECTED]> wrote:
> David,
>   Thanks for the response. I am trying to make a nurbs curve and
> hopefully being able to get/set CV's in scripted VB nodes. Have been
> looking into OnNurbsCurve class for construction and CV value querying
> but no luck. Any suggestions?
> Thanks.
>
> On Oct 12, 2:18 pm, David Rutten <[EMAIL PROTECTED]> wrote:
>
> > Hi GA,
>
> > OnCurve is an abstract base class and cannot be constructed. You'll
> > have to be more specific. The following types are recognized by
> > Grasshopper as Curve objects:
>
> > OnCurve
> > OnNurbsCurve
> > OnPolylineCurve
> > OnArcCurve
> > OnLineCurve
> > OnLine
> > OnPolyLine
> > OnArc
> > OnCircle
> > OnEllipse
>
> > I'm not too sure about OnBezier*** and OnPolynomials*** and cannot
> > test this where I'm now.
>
> > If you need to create curves through points, either use one of the
> > functions on OnNurbsCurve or in RhUtil.
>
> > --
> > David Rutten
> > Robert McNeel & Associates
>
> > On Oct 12, 4:16 am, ga <[EMAIL PROTECTED]> wrote:
>
> > > Does anyone know how to output a nurbs curve from a VB scripted node?
> > > I can't seem to find the constructor class for a simple curve. I've
> > > used a polyline for the time being that works, but can't get curves
> > > from the same points.
>
> > > The general premise for developing this node is that the standard
> > > curves node seems to flatten lists going into the node thereby losing
> > > their grouping and making one curve instead of say 10 dynamic curves.
> > > So if we have 7 lists each a row of 10 points appended into one,
> > > similar to
>
> > >http://groups.google.com/group/grasshopper3d/browse_thread/thread/d10...
>
> > > we could use the following scripted node to get 10 curves :
>
> > >   Sub RunScript(ByVal pts As List(Of On3dPoint), ByVal num As Integer)
> > >                 Dim spline_list As New List(Of OnPolyline)
>
> > >                 Dim bounds As Int32 = pts.Count / num
>
> > >                 'print("bounds = {0}", bounds)
>
> > >                 For i As Int32 = 0 To bounds-1
> > >                         Dim spline As New OnPolyline()
> > >                         For j As Int32 = 0 To num-1
> > >                                 spline.Append(pts(j * bounds + i))
> > >                                 'print("index = {0}", j * bounds + i)
> > >                         Next
> > >                         spline_list.Add(spline)
> > >                 Next
> > >                 A = spline_list
> > >   End Sub
>
> > > Any ideas on how to construct curves here instead of polylines?
> > > Thanks.

Reply via email to