Grasshopper

algorithmic modeling for Rhino

Hi,

i'm trying to shorten a list by deleting the first or the last set of values (in this case it's a list of grid-points). Can't figure it out...

It becomes clearer in the attached gh-file.

Does anyone know how?

Thanks, Christopher

Views: 1360

Attachments:

Replies to This Discussion

look at the cull components

Problem is, i don't want to eleminate certain indexes from a list but only the first block of numbers... i want the rest to stay the same.

Ha, allmost there.

I can eleminated the first branch with the "split tree" function.

Eleminating the last branch is more complicated though...

Attachments:

Split Tree is your friend here I think. It is possible to create mask text programmatically, in case you don't want to always change "7" into whatever the last branch index is.

--

David Rutten

david@mcneel.com

Tirol, Austria

And another approach:

--

David Rutten

david@mcneel.com

Tirol, Austria

I made a "Trim Ends" component in Tree Sloth that lets you set both the number of items and paths from the beginning and ends of a data structure that you'd like to remove.

http://www.grasshopper3d.com/group/milkbox/forum/topics/tree-sloth

I've had a look at your definition but I'm not sure if you need to cull the first and last indices of each branch, or if you want to cull the complete first and last branch of the tree?

To cull indices: Cull index, feed in list item = 0 (for first index), and also feed in list item + list length (having an expression for L-1) to obtain the last index of each branch.

To cull entire branches, I think David Stasiuk's "Tree Sloth" addon is useful, as doing what it does with native GH components is a bit difficult.

Does this help?

Hi,

yes, i want to cull branches instead of indexes.

With all these helpfull answers i will shurely manage!

Thanks everyone!

(working on a definition for a wood-texture, will post my results soon)

Christopher

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