Grasshopper

algorithmic modeling for Rhino

If I use a path mapper {A;B} -> {A}

This will give in the correct when the input is {A;B}

However, the input structure will vary between {A; B} and {A}

Is it possible to flatten the lowest level so that:

when the input is {A; B}, the result is {A};

when the input is {A}, the result is a list.

Thank you.

Views: 1371

Replies are closed for this discussion.

Replies to This Discussion

Maybe try posting a simplified example so we can get some more context?

Yes the path mapper supports multiple mappings. However if you have a mixed tree like this it is almost always a sign something has gone very wrong already.

It is not wrong actually.

This is for different input data structure that I want to feed to a python script.

As I'm not very familiar with tree structure management, I need to pre-process the data -- that's what I'm asking here.

Upload the .gh file. It can be done( I m just too lazy to construct an example for this).

Cheers!

Hello, where is the .gh file may I ask?

Thank you.

does this help?

Attachments:

Not really.

My result is either of the two circumstances, and your method solves the circumstance when the two happened together.

I've used part of your idea and solved it in another way.

Thank you anyway.

It would be great to see what you were after.

cheers!

Mr A.

This seems to work in all cases you need, as if the mapping is not present it does not output that option. 

Attachments:

Wow!

I've never know path mapper can be used in this way!

Multi Entries...

Thank you very much!

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