Grasshopper

algorithmic modeling for Rhino

CODIGO%20GRASS%20SEPT-05.gh

Hi

I´m trying Cre
ate multiple polylines from multiples list of points but the Component "polyline" only create one polyline and does not associate the data well.

What is the problem?

Views: 1277

Replies to This Discussion

Hi Julian,

the polyline component requires that you provide all the points that make up a single polyline in a single list. You can make multiple polylines by providing several different lists.

A single list is identified by a unique path. For example {0}, {0;0;0} or {0;3;0} are all different paths. When data form multiple sources is merged (as in the [V] input of your polyline component), then the various paths are also merged. Thus, the point in the first panel at path {0;0;0} will be put in the same list as the point in the third panel at {0;0;0} as well as the point in the fourth panel at {0;0;0}. Thus, the polyline component will create a polyline through those three points. The second panel contains data with a different path format (only two numbers) and these points will not be merged with anything else because their paths are unique. However a polyline through a single point cannot be made which is probably why the component is orange.

I cannot fix your file because you didn't upload it, but here's some general advice:

  1. Don't put panels in between source and target components. Panels convert the data into text, and this text will then be converted back into whatever type is required on the right. Sometimes this works fine (for example with booleans or integers), sometimes it won't work at all (for example with curves, meshes or breps) and sometimes it will work poorly (for example with points and vectors). The reason it works poorly is because the panel rounds the coordinates to 6 decimal places because this makes for easier viewing. However when points are recreated from the text, the remaining 10 decimals are now lost.
    It's fine to use panels to inspect data, but inserting them in between source and target components is rarely a good idea.
  2. If you have data that exists in multiple lists but you want to put it all into a single list, you should use a Flatten component.
  3. If you have data in various lists that you want to merge into a single tree (tree = list of lists), but you want to keep all the lists separate, you can use the Entwine component.

You should flatten all your individual point lists, then use Entwine to put them all together and finally plug the result of Entwine into the Polyline V input.

Thank you David.

I Updated the Discussion with the file.

If you can help me i would appreciate

i Could fix the problem.

Thank you David.

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