Hi Wim,
the TryFastGet() method is part of the ArrayOn3dPoint class in the
Rhino SDK. There is a good reason for why it exists, but it's rather
complicated so let's leave that for another day.
In the meantime, the List(Of On3dPoint) class is not something which
is defined by Rhino, it's a DotNET List class that wraps itself around
any type you want (in this case On3dPoint).
You can access individual instances inside a List(Of XXXX) by using
the Item property or just like you'd use an Array:
Public Sub RunScript(ByVal pts As List(Of On3dPoint))
Dim new_pts As New List(Of On3dPoint)
For i As Integer = 0 To pts.Count-1
Dim x As Double = pts(i).x
Dim y As Double = pts(i).y
Dim z As Double = 10.0 * Convert.ToInt32(ptr(i).z * 0.1)
new_pts.Add(New On3dPoint(x,y,z)
Next
A = new_pts
End Sub
The above script runs through all the items in the list and it creates
a new list which has its z-coordinates limited to multiples of 10.
It uses the Count property to determine how often to run the loop.
It gains access to the points inside pts using brackets and index
numbers.
It uses the Add method to append a new point to the new_pts list.
--
David Rutten
[email protected]
Robert McNeel & Associates