Grasshopper

algorithmic modeling for Rhino

Hi everybody,

I've got a little problem regarding tree structure.

 

Concretely, I've got slabs defined by points and lines, then I move some of those points and want to rebuild those slabs by linking the moved points.

 

I've managed to rebuild my list by replacing the first value (initial points) by the new values (moved points), the problem is that the tree structure completely changed and I cannot redraw lines the same way I did with the former points.

The result should be that the planar slabs start to fold.

 

I don't know if this is clear but with the attached file it should be ok I guess.

The idea is that I want the tree structure in the panel on the far right hand side to be the same as the one just next to it.

 

If you need any precision just ask

 

Thank you!

 

Views: 4565

Attachments:

Replies to This Discussion

Use "unflatten".

Hi David,

is "unflatten" a component? I cannot find it anywhere.

Are you using 0.9.0053?

No, it's 0.8.0065

aha...well, the workaround will be a bit tricky, and I won't be able to save a file for you...but I'll put something together quick.

Ok, thanks a lot.

I'm sorry I cannot simply update the version but it's on uni computers so I cannot install anything!

 

Thanks again

So you basically take the data with the structure you want to impose on your flattened data set, and first clean it to remove any empty branches, then you graft it to get one data path per item.  You also graft your data that you want to impose this structure on, and then use the parameter viewer to extract the path information from each.  Then use the replace branches component...this will give you the grafted data structure, which you then just shift paths by one to the left, and you'll have your matching structure.

Thank you very much, I'll just copy that quickly and see if it works.

I've got an error at the "replace" step, could you have a look please?

 

I also cannot find exactly the same "clean" component (mine is D,X,E inputs instead of T,X,E), maybe that's where the problem comes from.

Attachments:

The file you just attached is the same one as last time, so I don't see what changes you have made...but yes, the clean should be the same, despite the newer one having the "T" input and older one having the "DE input. The key is make sure that "E" is true...that one removes the empty branches, and your tree has one branch with zero items in it.  You'll want to have equal numbers of data elements for "D" and path inputs for both the "S" and "R"

(sorry I cannot answer your last comment directly, I don't have the "reply" button)

 

here is the file at the moment

 

I've made sure the E is true, and to me the script is the same, I don't see where it goes wrong. It is also weird I don't have as many defined values as you do!

Attachments:

I see...sorry, been running around today...you need to use the Param Viewer component to feed into the S and R inputs.  What these do is extract the path data information...take a look again at the image I sent earlier.  To get the Param Viewer either look in Params tab, or double click on the canvas and type in Param...

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service