Grasshopper

algorithmic modeling for Rhino

Hello All

Does anyone know if its possible with the path mapper to take a single path and subdivide it down into a know smaller set of paths without flattening or grafting it. As i have tried every variation i can think of in the inputs and outputs yet can't crack it.

Say i have a path with 188 Points in a single path and i want to subdivide them down into 4 new paths. The number of paths will not change but the number in each list must be able to change.

If this is then possible i propose to take each of a list of paths and write the code into it as all divide by 4 and all i change is the inputs of set letters to denote input paths per line and addtion number of output paths.

Thanks
Matt

Views: 12104

Replies to This Discussion

Try this:


:D
Supercool Manuel ... I didn't know that capacities of the GraphMapper... amazing!
yeah.. i didn't know either, I just read the help for the item_count thing and it works!! :D
Hi Manuel, yours is a very handy formula actually!

I've been trying to figure it out by myself but I never thought about using such expression. Can you please tell me where did you find the item_count thing help?

Are there any places to search for graph mapper syntax expression description?

Thanks a lot in advance,

Alessio
Every object in Grasshopper carries its own help topic. Just double click the object on the toolbar, or open the topic from the object context menu.

--
David Rutten
david@mcneel.com
Poprad, Slovakia
Sorry David, my fault. I did not read the help down to the last lines... thank you!
or maybe this will be better:


{A;B} (i) -> {Floor(i/ceiling(item_count/4))}

The number 4 is the number that you can change if you want a different number of paths.
Hi Manuel,

That seemed to work fine if only one path was listed but if i put more than one path in but changed the data to read the paths so it knows which path is which and also changed the output so they would be listed in blocks per input path they double. Due you know if this has anything to do with the Floor and ceiling that have been written in. I have read though the help file and the final remarks and tried inputing a division of the path_index in but it did not like it.

Attached image is what i'm getting presently.


Thanks again matt
Attachments:
RE-Think

I have worked out that with every addtional path added to the list, the number
of items in the list increase by the item count/4* the path count so by the time
you get to 4 paths in the list the the number again matches the input list. I have tried to input path_count into the target path equation but with no Joy as yet. But don't know why the item count is counting all branches in list together and not just requested branch as it says it should in the help file i think.

Anymore Ideas welcome.

thank
matt
use letters, not numbers:

Got it all working now with a little bit of tweaking before the path mapper and in path mapper using letters again. I had changed to using Numbers before asking on the forum as found it to be failing with letters as N list lenghts are different in the different input paths.

Thank again
Matt
Hi Manuel,

could you explain in human-readable terms what the logic behind the expression " {A;B} (i) -> {Floor(i/ceiling(item_count/4))} " is?
How does it work, precisely?

I'm trying to set up an interactive sample file from what you've posted here and Sameer's explanations of more path mapper functionality:
http://www.grasshopper3d.com/forum/topics/path-mapper-component-what

so it'd be great to have a quick comment on the expression from you, as I can't really figure out how it does what it does - only that it does ;]

x

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service