Thanks David, that was very helpful.  Though its not easy to do, it is
still easier than the manual way I was doing it before the scripting
component came along.



On Oct 20, 12:11 pm, David Rutten <[EMAIL PROTECTED]> wrote:
> Hi Adam,
>
> Lofting is not easy. You have to construct a new instance of
> MArgsRhinoLoft, which contains all the loft settings and curves. Then,
> you have to call RhUtil.RhinoSdkLoftSurface and pass it your
> arguments. There's no function in the SDK which is as easy as
> Rhino.AddLoftSrf in RhinoScript. I agree that there should be, but
> there isn't.
>
> Let's assume you have a collection of 100 OnCurves, and you want to
> loft the first 10:
>
> 1) Create a new list of MRhinoLoftCurve and populate it using a loop
>
> Dim loft_curves As New List(Of MRhinoLoftCurve)
> For i As Integer = 0 To 9
>   Dim crv_section As New MRhinoLoftCurve()
>   crv_section.m_curve = m_original_curves(i).DuplicateCurve()
>   crv_section.m_bClosed = m_original_curves(i).IsClosed()
>   crv_section.m_bIsPlanar = m_original_curves(i).IsPlanar()
>   loft_curves.Add(crv_section)
> Next
>
> 2) Then, create new MArgsRhinoLoft and populate the values:
>
> Dim loft_args As New MArgsRhinoLoft()
> loft_args.m_loftcurves = loft_curves.ToArray()
> loft_args.SetClosed(<<value that indicates whether you want a closed
> loft of not>>)
> ....<<set other loft settings in similar fashion>>
>
> 3) Finally, call the RMA.Rhino.RhUtil.RhinoSdkLoftSurface() function
> with loft_args and an array of OnNurbsSurfaces.
>
> --
> David Rutten
> Robert McNeel & Associates
>
> On Oct 20, 1:48 pm, "Adam Holloway" <[EMAIL PROTECTED]> wrote:
>
> > I'm relatively new to scripting.  I want to sort a number of curves, in
> > different lists, and then loft them periodically in the scripting
> > component.  What is the best way to do this?  I've looked through the sample
> > code for SDKLoft but the different classes confused me and I wasn't sure
> > what was appropriate for this.
>
> > Thanks,
> > Adam

Reply via email to