Grasshopper

algorithmic modeling for Rhino

Geometry Pipeline - Point, Curve & Tags Changing Order & Direction

Hi there

 

I'd appreciate it if someone can help me out with the Geometry Pipeline from Rhino to Grasshopper.

The problem I'm experiencing is that when I create Points in Rhino within the designated Pipeline Geometry Layer and add Tags to the Points (i.e. Point 1, Point 2, Point 3 etc.) each “new” point added inherits the Tag “Point 1”. That is the name of each Point changes by the factor of 1 as a new Point is added, rather than each Point retaining it's original Tag in the order in which the Points were added. Additional to this I'm creating an Interpolated Curve through these Points as they are being created. Whilst this doesn't sound too drastic, the problem is when I reopen this file at a later date, the Tags are reversed and are in the order in which they were created as well as the "direction" of the Interpolated Curve changes too, which causes problems with associated geometry downstream.

I have tried using both Grasshoppers core Params Geometry Pipeline and the "Human" Geometry Pipeline and have got the same results / problems.

I have attached a Grasshopper schematic to illustrate what I'm currently doing... so if anyone can help me out I would appreciate it very much. Thanks!

Views: 1229

Attachments:

Replies to This Discussion

you cannot count on the order of points coming through either my pipeline or the built-in pipeline. I misunderstood the original question you sent me via email - I thought you were tagging the points in rhino - rather than relying on the routine pictured to tag them dynamically. As far as I know, there simply is no way to do what you're asking without providing additional information at the time of point creation - the order in which things are loaded when referenced is simply not reliable. 

The workaround I suggest would be to name your points at the time of their creation - in the object properties dialog. 

If you do this for all points you can get the names with the Object Attributes component, and sort by text in order to keep their order consistent.

How about RhinoObject.RuntimeSerialNumber ?

Also, given you know exactly how GUIDs are created, you could reverse engineer the date and time of creation from it ;) 

Hi Mateusz

Thanks for your suggestion. It is however beyond my capabilities or knowledge of how to get the information you're referring to and then use it. If you could provide further detail I would appreciate it very much. Cheers!

Hi Andrew

Thanks for your reply and suggested work around.

The Tagging of the Points in Grasshopper is working well and the fact that it is automated is a bonus, but as you say, it appears to be unreliable.

I've attached two screen shots which shows what's happening to the order and direction of the Points and the Curve. The first screen shot shows the initial creation of the Points and Curve along with the Tags and the second screen shot shows the exact same file reopened... showing the change in order and direction. If I can come up with a fix for this I would be stoked! :)

Are you following my suggestion to sort the points by their name? See the attached rhino file/gh file for an example.

Mateusz's solution seems viable as well, I was unaware of runtime serial number.

Attachments:

Hi Andrew

Sorry for the delay in responding to you and thanks for your continued support in trying to solve this problem. I've downloaded your files and I'll try them out.

In the meantime I have come up with a solution myself... and that was to simply change the type of Geometry that I was pulling in from Rhino through the Grasshopper Pipeline. Instead of pulling in Points I'm now bringing in a "Curve: Interpolate Points" and then performing a "Control Points (CP)" Analysis on that Curve to identify the "Knots", which I'm then associating my Tags to.

Because the Rhino Curve maintains its "Direction", the Grasshopper Curve and Knots also maintain their Direction and Order. I'm using a "Sort Along Curve" function just to be sure.

Please see following schematic...

Thanks again for your help and I will try out your "testpointorder" files

Cheers Andrew

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service