Grasshopper

algorithmic modeling for Rhino

Hello,

I'm working on definition which is creating a very complex tree with hundreds of branches that I would like to sort. The problem is I need to Loft between some lines in the tree, but I have no way of sorting through the branches without manually adding the paths - which is very tedious.

Can anyone help in how I might be able to adaptively generate the resulting paths for a complex tree?

Attached is an image of my definition.

Thanks!

Views: 2692

Attachments:

Replies to This Discussion

What are the sorting criteria?

 

Chris

It's hard to say without knowing the sorting criteria but it sounds like a job for path mapper...

Hi Kevin,

 

I would suggest you to simplify the output of the "Line" component using the "Simplify" component after the "Line" component or to choose the function from the output menu of the "Line" component.

This simplifies the tree a little bit by removing the branches which are the same {0} in each single branche, for example:        {0;0;1;0;1;0;0}  -->  {1;1}

                                             {0;0;1;0;2;0;0}  -->  {1;2}

Then it is also more comfortable to work with the "Path Mapper" component or the "Tree Branch" component.

But the fact remains that you need to know what the sorting criteria should be, like Chris and David already said.

 

Best,

Martin.

The Param Viewer works as a list of adresses you can use as input for the Tree Branch.  Often its helpful to do the sorting on the list of adresses. 

 

But as said above, depends on what you want to achieve.

 

edit: probably easier with a screenshot...  in this example i use Dispatch to filter the adresses...  but anything that works on lists can be used.

 

 

 

 

Thanks Chris, David, Martin and Corneel,

 

Comments and questions are helping me better understand how to resolve the problem. I've applied the Simplify Tree component which works well, and helps in identifying the branches / structure a bit better.

 

My sorting criteria is so I can Loft my lines in the following order: 0;0 , 1;0 , 3;0  .... (and so on) in the branches through all the branches for 0; , 1; , 2; , 3; , 4; ... (and so on).

 

As a note on the screenshot, for some reason I am getting some Null artifacts within the branches, which I find a bit unexpected but that I am dealing with by Cleaning the tree, so that is not too problematic.

 

Seems like what I am trying to do is possible and I have an idea for how to do that. But where I am finding the difficulty is in having my inputs be variable. I am guessing that to automate it to find the sequences from the original slider, I need to add the proper notation through some method and use that to map the path. But I am not sure how to go about that.

 

One last question. I am getting some lines which are overlapping that I would like to remove. Is there a way to test a list for repeated values and cull them?

 

Thank you!

Kevin

As it will effect how I answer some of this are you able to upgrade to 0.8.0052?

I've just checked and in fact the two components I was worried about were introduced in version 0.8.0001 and 0.8.0008. So it doesn't matter.

 

My sorting criteria is so I can Loft my lines in the following order: 0;0 , 1;0 , 3;0  .... (and so on) in the branches through all the branches for 0; , 1; , 2; , 3; , 4; ... (and so on).

 

[Split Tree] allows you to specify either a branch ID or a pattern using wild cards to get various branches. eg {*;0} would split all of the branches ending in ..;0} out. Or {1;*} would get all of the branches starting with {1;..

 

As a note on the screenshot, for some reason I am getting some Null artifacts within the branches, which I find a bit unexpected but that I am dealing with by Cleaning the tree, so that is not too problematic.

 

The Nulls are no intersections. If you think that there should be then you can either change the tolerance settings in the Rhino Document or [Extend] the lines a little bit further to ensure an intersection. 

 

One last question. I am getting some lines which are overlapping that I would like to remove. Is there a way to test a list for repeated values and cull them?

 

If you install Kangaroo for Rhino then you can use the Remove Duplicate Lines component.  Alternatively the Lines are probably being created as a result of duplicate points which you can remove with [Create Set] which creates a unique set of points. there may be some rounding issues so its good practice to format your point to three decimal places first. With an Fx component set the F niput to:

 

format("{0:0.000},{1:0.000},{2:0.000}", x.x, x.y, x.z)

Hi Danny,

 

Just now looking getting to it and have tried to the Split Tree and am having trouble with the component. For some reason the Split Tree is collapsing all the lines into the same line. Not sure why, I bake it and I see all the lines there - so its relocated them or remapping the Path to the first line only.

 

I also installed the latest build (The University lab will upgrade the versions - so its good) and am running Kangaroo. I tried the remove duplicates and it is working but not in all cases - still better than before.

 

Thank you for the help!

 

 

Any chance you can post your definition?  It's so much easier to trouble shoot these issues with the geometry and the definition.

 

Chris

Hi Chris,

 

Attached are the files, both the Rhino (which includes what I am intending to get) and the Grasshopper.

 

Thank you!

 

Attachments:

Hi Danny, I'm running 0.8.0010

 

I am holding off from the upgrade as I need to have the same copy as is in my University's computer lab. The request for them to upgrade will be a tricky one since 0.8.0050, from what I understand, breaks from previous version compatibility. Is that right? Is it possible to run two versions?

I checked and it doesn't actually matter, see above. It is possible to run two versions simultaneously on two different instances of Rhino, you just have to install one then move its folder to a different location. Then install the other. When you wish to run the older version you go to the Plug-in Manager in Rhino options and manually browse to the location of the Grasshopper.dll or .rhp and select it before typing the Grasshopper command.

 

But as Grasshopper is so quick to install you you might as well just keep copies of the installer in a folder and when you need a particular version you can install before use. The break in compatibility is actually in the file format, no files created after version 0.8.0050 can be opened in previous versions. Therefore it would be unwise to open an old file (Forward compatibility still exists) without creating a copy.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service