Grasshopper

algorithmic modeling for Rhino

Hi All

 

After trying over 24hrs of trying to crack a code i have run out of workflows so asking here...

 

Does anyone have any ideas on how to find the closest point/s on a closed surface from a defined point on that surface. I have a working code for an open surface but yet to find  a way to rebuild the logic so it work on a closed surface.

 

In the attached the code the surface is reparameterized surface but this is only beacuse the test is using an MD Slider

 

Thank

Matt

Views: 1996

Attachments:

Replies to This Discussion

the component Brep CP does not work for what you need

Does it have to be by UV?

This example is by distance.

- Giulio

Attachments:
mh, post a surface example. the only possible solution I can imagine is an orthongonal (to the suface) point situation.

Hi Robert, Guilio and Dedacklzucht

 

The Brep closest point will not work as i am seaching for points all ready on the surface created using Srf Divide and seaching from a defined point on the surface.

 

The reason i was using UV as the standard closest point code and your attachment looks though the surface no around it to define distance between points.

 

Here's a pic of the problem on a basic torususing UV  Point data to calcualte distance from point

And Below is using point dat to calculate the distance and as you can see it looks though the surface not around it


 

Thanks

Matt

 

 

(from the example above)

I had tested the example above you posted, but it failed if the distance though the surface is short than the distance of points to seach for. as in the example pic i justed added to my reply. I wish it where what simple :)

Sorry, I do not understand. Maybe can you be a bit more specific about what you are looking for? Are you looking for the 8 points that surround a point on a surface? (like in N, NE, E, SE, S, SW, W, NW?)

Sorry it for a larger Paneling Script, at present i was just trying to calculate the distance to every panel on the surface from a single point (the single point defining in the entrance to the space). With this distance data i can tell GH which type of panel to pick from the types created in T-Splines and map onto the given panel. The panelling is a bit special though as it designed to overlap at certain corners. I havn't posted this as did not want to confuse and this problem when sovled could be used on on other projects.

 

I am trying to work out also how to push points on the surface using the data gained from this script too (distance/vector etc) but first need to sort this out.

 

Thanks Again

Matt 

I think I understand. Maybe you could use the geodesic distance?

Also, keep in mind that when dividing a closed surface, at the seam there will be double points.

Attachments:

I had looked at Geodesic Distance before i started on the first code idea i posted, this still has problems with the seams as can not gap them to find a close point on the otherside.

 

Thanks for the note about the double points i had forgot to remove them from the current example code, though the panelling does not have this problem.

It should be able to jump over seams...

 

So let's have an overview of what we have so far. Can you tell which feature is missing?
 
method 1:
UV distance
method 2:
euclidean
method 3:
geodesic
seams stops at them jumps jumps
meaning on-surface distance in surface coordinates
aerial distance in world coordinates on-surface distance in world coordinates
note not good because of seams behavior not good because it can capture points in other areas
it is restricted to local areas

Seems overlooked that Geodesic Component seems to have some bugs in Rhino V5, Including jumping seams....Sorry.. Works ok in rhino 4 even if I input all 200 panel centres.

 

Thanks for all your help. If i think of a quicker computational way than Geodesic as it seems rather heavy i will post it here.

 

Matt

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service