Put first points of all lines in group

   3339   3   0
User Avatar
Member
2 posts
Joined: Nov. 2017
Offline
Hi,

I have a “line” with multiple points and a “copy and transform” making it two lines.
I would like to group the first points of all lines into a group.
Since the point numbers of the first line continue to the second line the “group range” node can only group the first point of the first line.

What would be the best way to solve this?

thank you,
Fred
User Avatar
Member
17 posts
Joined: July 2015
Offline
Hi,

There are plenty of ways of solving this. The simplest way is to group the point 0 before the copy and transform. Another method would be to create a foreach primitive and group the point 0 of each primitive, so the first point of each line. cf file

These are the simplest ways, after, depending of your setup needs, there are ,any other ways of getting the first point of a line or geometry.

I hope I have helped. Have a good day !
Evan

Attachments:
group_first_point_of_line.hipnc (71.1 KB)

User Avatar
Member
7809 posts
Joined: Sept. 2011
Offline
The Group Expression node contains an example expression that does just this. Select the drop-down menu next to vexpression, and select “First Point of Primitive”, which will enter the expression:

vertexprimindex(0, @vtxnum)==0
User Avatar
Member
2 posts
Joined: Nov. 2017
Offline
@EvanPeignet @jsmack Thanks for the help!

The Group Expression node method is very nice and worked the easiest for my usecase.
I just had to add a group promote to go from vertices to points.

Thanks!
  • Quick Links