Hello, I have a issue with culling a list by another list.  Here's
what I'm trying to accomplish:

1. I have an original list (of points)
     - this list is a list of vertices for octagons (@ 8 points per
octagon)
2.  I have a culled list derived from the original list (1 point
represents each octagon)
3.  I send this culled list into a Cellular Automata module which
gives me a new culled list (of live points)
4.  **I compare the new culled list with the original and draw out the
remaining 7 points associated with each point in the new culled list.
(so that I can create an octagon).

Below is the script I was using to try and accomplish #4, which
returned "Script exception: Unable to cast object of type
'RMA.OpenNurbs.On3dPoint' to type ' System.Collections.IEnumerable'."

Any suggestions on how to fix or do #4 another way?  Thanks!
-Matt Erwin



Sub RunScript(ByVal OrigPoints As Object, ByVal CAPoints As Object,
ByVal NumOrigPts As Object, ByVal NumCAPts As Object)
    ''' <your code>
    Dim LOctPoints As New List(Of On3dPoint )
    Dim i As On3dPoint
    Dim j As On3dPoint
    Dim k As Int32
    Dim m As Int32
    Dim n As Int32
    k = 0
    m = 0
    n = 0

    'Cycle through the two list of points to find the matches
    For Each i In OrigPoints
      For Each j In CAPoints
        'when you find a match, store the 8 octagon points from the
original list that coinciding with the matching point
        If i = j Then
          For k = 0 To 7
            n = m + k
            LOctPoints.Add(OrigPoints(n))
          Next
        End If
      Next
      m = m + 1
    Next
    'output the new list
    liveOctPoints = LOctPoints

Reply via email to