What do you mean it doesn't evaluate x y and z at the same time?
I just tested it and looks like it works fine. Maybe it's because of
rounding errors. Substitute the "if" line with the following:

If (round(p1(i).x, 5) = round(p2(f).x)) And (round(p1(i).y, 5) = round
(p2(f).y)) And (round(p1(i).z, 5) = round(p2(f).z)) Then

It will round the coordinates to 5 decimal places.
The following is not critical but: You can put the "dim sand..." line
inside the for..next loop although in this case is not very important.
Also, place the "a = ny" line outside the loop, since they are both
arrays, this line just need to be run once.

On Dec 5, 8:34 pm, Raun <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I´m having problems writing a script that could sort a list, to find
> points that are non-duplicates.
> I have a list of points that I use to create other points, but then I
> get a list of points with both the new and old points in an unordered
> list. There is no regularity in when the duplicate points appear in
> the list, so I can´t use a simple cull pattern.
>
> I then wrote this script
>
>  Dim ny As New List(Of On3dPoint)
>     Dim sand As Boolean = True
>     For i As int32 = 0 To p1.count - 1
>       For f As int32 = 0 To p2.count - 1
>         If p1(i) = p2(f) Then
>           sand = False
>         End If
>       Next
>       If sand = True Then
>         ny.add(p1(i))
>       End If
>       sand = True
>       A = ny
>     Next
>
>  to solve the problem but it doesn´t always work, since it doesn´t
> evaluate one both x, y and z at the same time.
>
> I hope that you might be able to give me a hint of what I need to do
> to get this working.
>
> Thanks

Reply via email to