Grasshopper

algorithmic modeling for Rhino

Replace items in branch (and recover original datastructure)

First a screenshot of the situation:

List A consists of 60 panels, but only 4 panels are unique. (Although the position of the panels is unique for each panel)

The panels in list B need to be oriented according to list C.

I tried replace members, but it consists of geometry, so it doesn't worked.

In list C I filtered all the indices that need to be replaced.

All items in {0;0} from C need to be replaced by List B {0;0}

All items in {0;1} from C need to be replaced by List B {0;1}

And so on...

In the end everything needs to be fed into a orient component.

G is the geometry behind list B

A is the new list (but I don't know how to create)

B is the list A of all 60 panels

To wrap up the question:

I need to have entry 1 from list B in a new list on position: 0 1 2 3 5 6 7 10 11 12 15 16 21

I need to have entry 2 from list B in the same new list on position: 4 8 9 13 14 etc. etc. etc.

I wonder how I can do this :) Thanks in advance!

Views: 664

Replies to This Discussion

Nobody who can help me with this one? Is it easier to rewrite my code, so I don't end with this problem?

I have been think though how best to solve you question and come up with this, maybe you have solved it by now but it maybe help to others later so I will still post it.


The file also contains an option (Greyed out) for replacing some some items with Unique Panels but this may become heavy as it creating lots of Duplicates of the unique ones.

EDIT.. Original Reply may not have worked as expected as the item though working was not the best option. 

Attachments:

I couldn't do it myself, so I'm really grateful!

Cool to see how you managed it with just a few components!

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service