I'm trying to group points (and then transform them to edges) based on their x and z positions.
There are two things that would help me:
1. Have one group that contains all aligned EDGES
2. Have multiple groups of all aligned POINTS
Both are fine, however I'm interested in how to do both.
Grouping points / edges with same x & z positions?
3060 7 1- 8BitBeard
- Member
- 26 posts
- Joined: June 2016
- Offline
- Konstantin Magnus
- Member
- 670 posts
- Joined: Sept. 2013
- Online
2) Put in the Partition SOP.
vert_`@P.x`_`@P.z`
https://procegen.konstantinmagnus.de/ [procegen.konstantinmagnus.de]
- 8BitBeard
- Member
- 26 posts
- Joined: June 2016
- Offline
- Konstantin Magnus
- Member
- 670 posts
- Joined: Sept. 2013
- Online
1)
Set a grouppromote node from points to edges and put vert* in group.
Then take a groupcombine node: group all equals vert*.
You can additionally use a groupdelete node on vert* to tidy up.
Set a grouppromote node from points to edges and put vert* in group.
Then take a groupcombine node: group all equals vert*.
You can additionally use a groupdelete node on vert* to tidy up.
https://procegen.konstantinmagnus.de/ [procegen.konstantinmagnus.de]
- 8BitBeard
- Member
- 26 posts
- Joined: June 2016
- Offline
Konstantin Magnus
1)
Set a grouppromote node from points to edges and put vert* in group.
Then take a groupcombine node: group all equals vert*.
You can additionally use a groupdelete node on vert* to tidy up.
Thanks again. However, this does not work.
Am I supposed to do this on it's own or following method 2 with the partition?
No matter how, it does not seem to work. If I create a grouppromote from points to edges and put vert* in “Group” I get the error “No groups match pattern vert*”.
Also, your solution with the partition is interesting (vert_`@P.x`_`@P.z`). Can you explain briefly, or point me to a resource, how this is working? I don't understand it.
- Konstantin Magnus
- Member
- 670 posts
- Joined: Sept. 2013
- Online
Hi 8bitbeard.
seems I forgot to mention “Include only elements entirely contained in original group” needs to be ticked on. You can watch the whole procedure in the attachment.
Regarding the partition SOP: it puts all points in individual groups that share the same values in a specific attribute.
While vert_ _ is just a prefix name for all to be created groups,`@P.x` and `@P.z` are those attributes. Only if both of their values match a common group will be created.
seems I forgot to mention “Include only elements entirely contained in original group” needs to be ticked on. You can watch the whole procedure in the attachment.
Regarding the partition SOP: it puts all points in individual groups that share the same values in a specific attribute.
While vert_ _ is just a prefix name for all to be created groups,`@P.x` and `@P.z` are those attributes. Only if both of their values match a common group will be created.
https://procegen.konstantinmagnus.de/ [procegen.konstantinmagnus.de]
- 8BitBeard
- Member
- 26 posts
- Joined: June 2016
- Offline
Konstantin Magnus
Thanks a lot! This is exactly what I wanted to achieve. I figured that vert_ _ is just the prefix, but what I still don't understand is why vert_`@P.x`_`@P.z` will only create a group if the values match. I mean, it seems you are just entering the x and z positional values of each point, where does it state that they should be identical?
- Konstantin Magnus
- Member
- 670 posts
- Joined: Sept. 2013
- Online
8BitBeard
you are just entering the x and z positional values of each point, where does it state that they should be identical?
It's the purpose of the partition SOP to group points or primitives that give the same result to any suitable Hscript expression.
Well, my solution for case 2) does not quite work. It also fetches the points with identical X and Z positions on the middle top and bottom side of the box. I would still have to figure out a way to remove groups that only contain 2 points. But usually when I have to filter out something, it's the evaluation that should be improved instead.
Edited by Konstantin Magnus - April 23, 2017 17:32:00
https://procegen.konstantinmagnus.de/ [procegen.konstantinmagnus.de]
-
- Quick Links