Grasshopper

algorithmic modeling for Rhino

Hi all,

My questions is how to move very close points to one point in order to make them the same. See attached image for reference..

1. I tried 'closest point on crv' but it is not what I really want cause I want all the end point or start point to move to one point but not to move to the closest point on the nearest crv.

 

2. I tried 'closest point' but I don't really know how to exclude the same point which they compare with themselves. Even I do know how to do it in monkey, but I don't know how to embed them in vb.net in gh.

 

3. It is a little tricky cause the crvs' directions are different, thus, it is not always the case that all the start points of the crvs is close to one another but some of them are actually end points. So I guess I have to find a way to create a whole list of endpoints and startpoints, and then compare each of them to find the closest one.

 

I might not describe my question clearly but I think you could get a general sense of what I want to do.

 

Views: 3527

Reply to This

Replies to This Discussion

This could be one way... decompose the point... then find the average of value of XYZ

is not VB but might do...

Not wishing to rain on your parade, but there is an average component in the Maths Tab Utility Panel which will accept Points as an input.

@Archieboy: What is your criteria for closest point? Is it all points you see become one either averaged or the first in the list or some other criteria for selection.

Is it to be done on a set distance i.e. in the image above are there to be 3 groups that move to different closest points? 

Thanks, Danny. It is quite useful. I don't really have any criteria but the average option seems quite fine with me.

 

I did some test. I think it works perfectly fine with the situation when all the crvs' startpoints happen to be close to each other. like the following image:

 

However, I'm wondering if the close points are not always to be start point. In most cases, it might be several startpoint and some endpoints and vice versa, which is not making any sense to average them like the attached image.

 

Any idea to work on this situation?

Maybe this could work.

Attachments:

Thanks, Danny. I don't really understand of your script but it doesn't seem to work on my file as my previous test image might be misleading. I've upload the file so maybe you know what I've been doing.

 

Attachments:
Heres a point set simplify component I whipped up for something like this a while back. Just feed it a set of points and a tolerance. Each point searches within the given tolerance to find a local average. This goes on recursively until the points stop converging.
Attachments:

Thanks David, your script works perfectly fine with points. However, my question is more about crvs and lines to join together. In this case, like the following image, all the crvs dir is different and therefore the closest points are not all start points of the lines and are not all end points of the lines either. If I do something that showed in the second image (gh definition), it will create something like the 3rd image: all the start points joined together and all the end points joined together and now how to join them together is another question. I guess there must be some way to let the points to remember what they connect to and then they should connect the way they used to be. I also upload the file that I've been working with as you could get a clear view of what I want to do.

 


 

Attachments:
I see. Assuming your incoming lines are a flattened list you could go with something like this. The start and end points are merged into a single list and then split apart again after the point set has been simplified.
Attachments:

Amazing! you did it!

 

I might be a little greedy, but I want  to know if there is anyway to do it to mesh or srf, like the attatched image.

 

Hi Archieboy,

 

Collapsing coincident nodes is a very common requirement for connectivity in structural analysis model topologies.  If you want to give it a try, any of the geometry gym structural analysis plugins contain a "find node" component that keeps a background "ocTree" (special data structure that does not require searching all existing points so it's faster) of encountered points.  It accepts a tolerance, so if an existing point is found within the nominated distance, it is output back.  I'm happy to demonstrate how to apply it to mesh, or to a group or 3 or 4 noded surfaces if you can post/send a model.

 

Cheers,

 

Jon

Sure do, Jon. Here is the model I've been working with lately. It looks OK from the general view, however, if you spot on some troublesome point, you will see the problem that the mesh's vertices are really close to each other but not actually connect to one another.

 

I haven't tried out geometry gym but I do want to know is your plugin would work on warping surface which are not flat?

 

Han

Attachments:

RSS

About

Translate

Search Grasshopper

Photos

  • Add Photos
  • View All

© 2017   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service