Grasshopper

algorithmic modeling for Rhino

how to conect every 2 points into line when you have a lot of points

If i have many points,i want to conect every 2 points into line.How to do it?

Views: 591

Replies to This Discussion

How are your points organised? Are they all in a single big list? Do you want to connect point 1 with point 2, then point 2 with point 3 and so on, or do you want to connect 1+2, 3+4, 5+6, etc.

--

David Rutten

david@mcneel.com

the points do not have any logic,they are ramdon.i want to connect them like 

1+2, 3+4, 5+6, etc.

Try connecting all your points to a [Polyline] component and then [Explode] it and then [Cull Pattern] set to False True

Not what you wanted then I have supplied a Dilbert Cartoon for your entertainment.

your scrip only connect all the points into one line

no it doesn't, have a look at the example above again

Points --> (V)Polyline

Polyline --> (C)Explode

Explode(S) --> (L)Cull Pattern

(P)Cull Pattern = False

(P)Cull Pattern = True

#Note that both False and True are in (P) Cull Pattern on different Lines

Cull Pattern: Preview = OFF

Explode: Preview = OFF

If this is too complicated then you could try a different approach.

Points --> (L)Partition List

Slider=2 --> (S)Partition List

Partition List --> Polyline

that is what i get from your script.

turn the preview off on polyline and explode

Hide the first 3 components - turn preview off

@ the cartoon
Made my day :)

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service