Grasshopper

algorithmic modeling for Rhino

I am attempting to insert items from specific branches into a tree with matching branches. See attached JPG. List insert is also inserting those items into all the other branches... is there a better way to do this. Thanks, Dan

Views: 2274

Attachments:

Replies to This Discussion

Try the [Dispatch Branches] component from tree sloth.  You'll have to download the .gha and install it. 

You should split your target paths using a path mask from the branch structure of the data you want to insert, then insert your new data into the split paths, and then merge both streams back together again.  If you like, you can post your definition and I can show you what I mean.

The Dispatch Branch component seems to work well - however the list insert component again ignores branch paths having to use path mapper. Not sure if this would work with a more complex dispatch branch path pattern.

It's renumbering your paths because of your "0" panel input...anytime you have ANY data input with non-matching tree structure (including single values from a panel) it renumbers the entire list (until David pointed this out to me one time, it was driving me crazy!). If instead of feeding a value you adjust the value directly in the component input, it should work.

Hello David,

I didn't understand your solution? I'm having problems myself.

Attachments:

Hi Jesus...check out the last reply.  It seems to me that anytime you execute any of the list of the list management tools (list item, shift list, insert item, weave, etc) with simplified lists (paths with only one index) the output automatically renumbers them.  I'm going to start up a new discussion about that...

Thanks David. Yes I read your new discussion. Though I have a question I'll post there.

Have you seen the new Milkbox group? 

As much as I like that you're using the dispatch branch component, I don't think it's necessary here.  In this case, you also can really easily get around what's happening by simply using a "merge" component...because you are inserting your data at the start of a list, you just make sure that it's plugged in first.  If your structure is correct in both data sets, you shouldn't have to do anything else.  

If you want to insert your data at a different index (not at either the start or end of the list) then you're going to have problems.  As I'm going through yours and Jesus' stuff I'm realizing that pretty much all of the list components seem to automatically renumber data paths when combining two distinct, simply numbered lists.

David, not sure why I didn't think of this first, it is much cleaner and resilient to change - as long as the inserted list stays in front or in back and not in the middle.

RSS

About

Translate

Search

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service