Hi Dr. Nick!

sorry, the only solution I can come up with involves a lot of
programming inside a VB component.

Create a VB script with 2 inputs:

1) P   (a list of On3dPoints)
2) t    (a double numeric value)

Then, paste the following code into the component.
This is a brute force algorithm that will get very slow very quickly
when used on large point collections.


  Sub RunScript(ByVal P As List(Of On3dPoint), ByVal t As Double)
    For i As Int32 = P.Count - 1 To 1 Step -1
      For j As Int32 = 0 To i - 1
        If (P(i).DistanceTo(P(j)) < t) Then
          P(j).x = 0.5 * (P(i).x + P(j).x)
          P(j).y = 0.5 * (P(i).y + P(j).y)
          P(j).z = 0.5 * (P(i).z + P(j).z)

          P.RemoveAt(i)
          Exit For
        End If
      Next
    Next

    A = P
  End Sub


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


On Mar 12, 3:07 pm, Mortez <[email protected]> wrote:
> I've tried to create  something like ,, weld in 3d max ,,, that remove
> points which are located in less than specific distance from each
> others ,,, so any advise?  thank

Reply via email to