Grasshopper

algorithmic modeling for Rhino

Hi guys, is there a way to simplify "list item" command when you have like 15 points in a list and have to make an index to each one of them in the command? I am doing like this screencapture, but I feel there is a smarter way to do it.

Thanks.

Views: 572

Replies to This Discussion

If you want each of the points to do something differently then what you're doing is correct. However, it looks like you're doing the same operation on different points with different values. It looks like you should instead be compiling a list of values for the multiplication component and feed those vectors into a move component with a list of points.

Attachments:

Well done, Christian.  A couple of things...

  1. If you are using the entire list of points (as you are), you don't need 'List Item' at all.
  2. The sliders can be replaced by a list of numbers in a panel (as "Multiline Data").

P.S.  If all the points are NOT being used and an arbitrary sequence of points is needed, another panel with a list of index values for 'List Item' will do the job.  Or one panel could do both jobs, with each line of data having an index value and a 'Z' value, separated by a comma or space (to be parsed).  Just stating "the obvious" for the benefit of Leonardo.

Attachments:

P.S.  If all the points are NOT being used and an arbitrary sequence of points is needed, another panel with a list of index values for 'List Item' will do the job.  Or one panel could do both jobs, with each line of data having an index value and a 'Z' value, separated by a comma or space (to be parsed).  Just stating "the obvious" for the benefit of Leonardo.

Moving eight arbitrary points of the 15 in 'Pt' using a panel with index and 'Z' values on each line, separated by a comma:

Attachments:

1. You are correct, but I didn't intentionally make the subset as long as the list itself.

2. I figured that he wanted the flexibility afforded by the number sliders, although it would be much simpler to use a panel with multiline data if the values won't change much.

cheers

Right.  Since Leonardo didn't upload his code, we have no way of knowing:

  1. if he used all his points?
  2. if what happens after his 'List Item' can be handled parametrically, as you did, or is so unique for each point that 'List Item' is needed.

It was a slow day on the forum and I was bored.  ;)

Cheers

Here is what I was trying to do. I could achieve it, but it don't think is thebest way to do it. I was "coding" to make a helicoidal ramp

Attachments:

Hi.

Check this out. You can use "Series" combination instead.

Attachments:

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