Grasshopper

algorithmic modeling for Rhino

hi all
, hope i can get help with a script to group points by proximity.
reference to this post: http://www.grasshopper3d.com/forum/topics/closest-point-sorting-see...
i tried to change it that it puts all points that are connected trough each other with a maximum distance in one path. basicly the point grouping.jpg shows what the issue is...

thanks,
moritz


hi again, here is an update of the script i´m working on... it´s still not working:(

still hoping for some help...

thanks

Views: 4303

Replies to This Discussion

hi not sure what u mean by maximum distance. Does it mean the distance of one point to a reference point?

If you are sorting things by distances, maybe using a sortedList can help you?

Dim slist As New SortedList()

For Each testPt As on3dpoint In testPts
Dim dist As Double = testPt.DistanceTo(refPt)
'add(key i.e. your point, value i.e. the value to sort)
sList.Add(dist, testPt)
Next


a = slist.GetValueList

This returns a sorted list based on proximity to some reference point, which you can act on.

j
Hi moritz,

i haven't gone through the link carefully yet (seems very long !), but could it be helpful to just use the inbuilt octree component?
It sounds like what you want to do is a region decomposition problem - the tree like structure you describe could be an octree. I have tried playing around with constructing octrees in code but it is beyond my ability at the moment. Maybe you could get david rutten's help on this - i would be very interested in the results.

J

Hey Moritz,

probably you've almost solved this problem. But did you find another solution except with octree?

Hi Heiko, the component of you desire is named Proximity2D or Proximity 3D. Response involvement interval is diminishing from 5 to 3 years. :) CHeers !

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service