I've got a problem with groups and can't find how to solve it. The idea is, I need to group differents groups of prim only if they're not connected to each other.
For instance in the picture I've attached, I'd like to group together in a new group grp1 and grp4 and another on with grp3 and grp4 etc…
I wanted to find something with prim/vertex attributes and a for each node but I'm really stucked on that… any help or thoughts much appreciated
Sounds like you are looking for the connectivity sop (in primitive mode), followed shortly by a partition sop based on the attribute created by the aforementioned connectivity sop.
Thanks guys, but actually I want to merge groups together if they don't share edges in common (It's more the way I should've explained it I think). Like it's the case for grp3 and grp2 for instance.
I've used the partition / connectivity sop in order to create my groups, but I need to have less different groups now ( does that make sense ? )
I don't understand, what's wrong with connectivity/partition? Maybe you aren't describing the problem properly… Why do you want to merge groups together? Not to mention that (if I look at your first post) you don't have a clear rule to do that. If what you need is to group chunks of separated primitives (this is what I understand by “I want to merge groups together if they don't share edges in common”) then connectivity/partition is what you need. You don't need any existing groups for that. You can discard them.
Sorry if I'm not clear I need to have the less groups I can in a object for further treatments.
I split my object into groups with the partition node then I want to “optimize” these groups by merging eachother if they don't share edges ( or points, actually ).
As you can see in that example ( pic I've attached ), red lignes are “cut” edges.
It works with a custom ptyhon node, just wondering if there was an easier way to do it with regular node. Partition didn't help for merging groups, just to create them, but maybe I used it in the wrong way