Hi Evan,

If you want to do this through a script, I suggest the following:

- Create a VB Script component and give it 3 inputs. A (no object
hint, or maybe On3dPoint), B (same as A) and N (hint = Integer)
- Rename the output to V (you cannot have an input and an output with
the same name)
- Inside the script component, you'll see the following script layout:

  Sub RunScript(ByVal A As List(Of On3dPoint), ByVal B As List(Of
On3dPoint), ByVal N As Integer)
    ''' <your code>

    ''' </your code>
  End Sub

- In between the <your code> tags, write the following:

    Dim pts As New List(Of On3dPoint)

    For i As Integer = 0 To A.Count - 1
      If ((i Mod N) = 0) Then
        pts.Add(A(i))
      Else
        pts.Add(B(i))
      End If
    Next
    V = pts

This is an example of how to build a new list from elements of two
input lists.

I'll also add some special components that will make this kind of data
management a lot easier. But those obviously won't be available until
the next release.

--
David Rutten
[email protected]
Robert McNeel & Associates


On Feb 19, 8:15 pm, evanc <[email protected]> wrote:
> So, I'm trying to populate a surface with apertures based on the
> surface UV curves.
>
> here's a quick "manual" 
> example:http://farm4.static.flickr.com/3497/3292633785_d327ccf8e1.jpg
>
> So, what i've done is extracted 3 isocurves from the surface, turned
> on the control points and drawn new curves through the points.... in
> this case, 3 point on the middle curve, 1 on the next curve over, 3 on
> the middle curve... etc etc.
>
> so i've got a grasshopper def started, it takes two curves, lofts
> between them, and arrays a grid of UV points on this surface.
>
> the first thing i need to do is separate those points into just the V
> curves.... which i've done by splitting the list (over and over
> again.... a loop funtion would be nice, but i'm not sure how to do
> this). It's not clean, but it works and i now have a data stream for
> every V curve of the surface...
>
> so, like in the image above, i have three curves, and i want to draw 2
> new curves based on their control points...
>
> existing curves:
> curve1point1            curve2point1            curve3point1
> curve1point2            curve2point2            curve3point2
> curve1point3            curve2point3            curve3point3
> curve1point4            curve2point4            curve3point4
> curve1point5            curve2point5            curve3point5
> curve1point6            curve2point6            curve3point6
> curve1point7            curve2point7            curve3point7
> curve1point8            curve2point8            curve3point8
> curve1point9            curve2point9            curve3point9
> curve1point10           curve2point10           curve3point10
> curve1point11           curve2point11           curve3point11
> curve1point12           curve2point12           curve3point12
> curve1point13           curve2point13           curve3point13
> curve1point14           curve2point14           curve3point14
>
> and i want the new curves to be drawn like this:
> curve2point1            curve2point1
> curve2point2            curve2point2
> curve2point3            curve2point3
> curve1point4            curve3point4
> curve2point5            curve2point5
> curve2point6            curve2point6
> curve2point7            curve2point7
> curve1point8            curve3point8
> curve2point9            curve2point9
> curve2point10           curve2point10
> curve2point11           curve2point11
> curve1point12           curve3point12
> curve2point13           curve2point13
> curve2point14           curve2point14
>
> so it should be pretty easy i think, but i might need a script module
> and i dont know how to do that.... it's simply a matter of replacing
> every Nth item in one array with every Nth item in another array....
>
> what's the best way to handle this?

Reply via email to