Grasshopper

algorithmic modeling for Rhino

The first question(please see jpg) is why does the param viewer seem to kill geometry. In the jpg you can see that I have 25 subsurfaces, I explode them and get 100 curves, or a tree with 25 branches each with 4 elements. When I connect the curves to the curve join component it creates 25 curves which is what I would expect. However, when I run it first through the param viewer I get an error. Seems to me like you would want to be able to get the same result can someone explain this.

Second, If I have 2 trees each with 25 branches and 1 element at each branch is there an easy way to get 1 tree with 25 branches each branch having one element from each tree. for example the first element of tree A should be with the first element of tree B and so on...

Thanks.

Views: 1257

Attachments:

Replies to This Discussion

a parameter viewer is only for data tree preview only and nothing else
hi jon

so first of all you have to get common with the tree data system it is a very important and strong part of grasshopper.

to your first question:
param viewer is not just a data analyze tool where the data is feed in and is just like a gate the output of the param viewer is the tree logic of your feed in data so you could for example cull branches of your tree with that data (just use list item to retrieve the branch you want or just double click on the param viewer to see a visual diagram of your tree structure

second: if your 2 data streams have the same path structure than you can just merge them together (tree A {0;0;1}(1) ,.... tree B {0;0;1}(1),... then you can just feed them into the corresponding container for example double or curve or use the merge component)
if you have different trees due to more operation on the second way than you have to use the pathmapper(logic/trees/red cube) to rebuild the tree to the same logic
or if you have only one element in each branch like in your example than just flatten the tree and graft it again and you have the same result

if you have very special tree than just use the weave component(logic/list/ with right click on input manager you can adjust the amount of inputs and with the weave pattern you can set your way of arranging your data tree)

hope that helps if you have any questions according that topic just ask and i can send you an example
Super helpful thanks. I will try out some of these operations tonight when i get off work.
Thanks for your help on this. I am still trying to figure it out but..I flattened 2 trees and fed them into the weave component but it seems that the weave component does not give you a tree with 25 branches and two leafs on each branch but rather 1 branch with 50 leafs which was ok since i found this post by Manuel {A;B}(i) -> {Floor(i/ceiling(item_count/25))} but when I feed this into a curve component I get an error. I assume there is a way to alter a tree and then use it to create geometry, correct? If you have a chance could you please take a look. The end goal is to create 25 lofts one loft per boundary of a subsurface and circle. Really the result isn't that important I am just using this exercise as a learning tool.
Attachments:
Hi Jon

I have had a look at the file, the reason your weave component was not outputting 25 branches with 2 in each branch is because they where flattened down. For the weave to work as noted you need to delete the flatten components and and input the join as it is with the 25 Branches and between the move and the second weave input put a Graft component. That will then output as orginally requested so no need for the path mapper after it. The reason the crv does not work is you have again plug it into the para veiwer and not straight into the weave, from what i understand from your code, you can just plug weave into a loft. Unless you want it twisted you will want to change the loft options to align sections.

As you had posted the code i cheekily took the libtery of changing a few components and addind a few expresion to cut down the amount of components. I have loaded up a working version in GH.59 with whats changed and notes if you want to use it.

Matt
Attachments:
Hi Again Jon

Just remembered i had not said any more of the path mapper you had other than they where no longer required in your code with the re-edit

This will help you better understand how the Path Mapper works you can link a Path Mapper output into many things including parameter componets like Crvs, Points, etc if that was the input type.

http://www.grasshopper3d.com/forum/topics/path-mapper-component-what

Matt
Matt,
I am still going through the file you edited and comparing to what i had before so that I can learn how to do this more intelligently.
I recently found the same grasshopper topic that you included as a link. It is, indeed, helpful. I noticed that you wrote "you can link a Path Mapper output into many things including parameter componets like Crvs, Points, etc if that was the input type." and that would make total sense to me, in fact I can see why the path mapper would be a great tool if it worked, but for some reason it never works for me. Even if I try something as simple as:


What am I doing wrong?

Thanks again for all of your help
Jon,

Thats because thats the Parmeter viewer that only output from that will be the paths that the input is in not the input itself. The path Mapper is the component explained about in the second post with the link, that will output the input just into different branches, as denoted by you. I have realised where i may have confused in that the crv/lines etc are in the Parms tab (though don't know if they are called parmeters as such, i think i just called them that as thats where they where from of the top of my head.) As i just type to find component and really use the buttons most of the time.

Here's a few examples though of thing that can be used with parameter view output together with the tree branch compoment which will input your list of geometry but only only output the geometry in the paths input.





There are many other things that can be connected to the output of the parameter viewer this is just a few a i found in a code i am working on at present. (Sorry for all the extra cables and random numbers that make little sense)

Matt
Matt.
Thanks for the last post. I think I finally understand - I am not allow to take the output of the path mapper directly to geometry as the output is a tree structure and not geometry. I can, however, output it to a component which takes a tree as an input and then use that output to create geometry. I will have to do some more work until I fully understand all of the possibiliteis but this has been a great help. Thanks again.
jk
Hi Jon

In answer to your question as quoted from reply below:

"parameter viewer is only for data tree preview only"

unless you are doing things with the tree branches themselves and not the geometry in them, so just plug the join into the edges output of the explode and it will work fine.

In answer to your second question, use the Logic > List > Weave Component Plug the first list of branches into the 0 And the second List into the one and the out put you should get is 25 branches each with one element from list 0 and one element from list 1. (do this from the components containing the data not the Parameter view)

Hope this helps

Matt

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service