Grasshopper

algorithmic modeling for Rhino

I am trying out the new grasshopper .7 which by the way is awesome. I am testing the new tools and the "list insert" component is behaving oddly. I would understand if the inserted series were to be reversed but I can't figure out what is going on. Here is a screenshot




Views: 2691

Replies to This Discussion

Hi Frane,

it does work that way, except for the appending. Should I just append the second set at the end (i.e. at index 6) or should I add a bunch of nulls until I actually get to index 10?

ps. If you supply only a single index in Imap, then it will assume that the entire SetB is to be inserted at that location. It's only when you supply an equal number of elements in SetB and Imap that a per-element insertion takes place.

--
David Rutten
david@mcneel.com
Poprad, Slovakia
I'd expect to get at least this:

SetA = {U, V, W, X, Y, Z}
SetB = {1, 2, 3}
Imap = {10}

result = {U, V, W, X, Y, Z, , , , , 1, 2, 3}


--
David Rutten
david@mcneel.com
Poprad, Slovakia
David.

Definitely appending it in the specified index with nulls in between is more correct.

So this works this way?:

SetA = {U, V, W, X, Y, Z}
SetB = {1, 2, 3}
Imap = {2}

result = {U, V, 1, 2, 3, W, X, Y, Z}

----------------------------------------
and if I set this

SetA = {U, V, W, X, Y, Z}
SetB = {1, 2, 3}
Imap = {2, 2, 2}

I will get this?

result = {U, V, 3, 2, 1, W, X, Y, Z}

----------------------------------
And what if I set this?:

SetA = {U, V, W, X, Y, Z}
SetB = {1, 2, 3}
Imap = {2, 2}
If you supply only 1 item in SetB and multiple integers in Imap, you'll get the same item inserted over and over again. If you supply multiple items in SetB but only one integer in Imap, you get list insertion a la your first example.

List order is left intact, so your second example is the wrong way around, you should get {U, V, 1, 2, 3, W, X, Y, Z}.


The third example won't work. You must supply equal numbers of SetB data and Imap integers (unless you supply only 1 item, see before).

--
David Rutten
david@mcneel.com
Poprad, Slovakia

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service