Jump to content

looping a group creation process.


Recommended Posts

Hi,

I am using points from a grid to copy spheres on them... Then I use those spheres to group points from the very same grid.

I am trying to create something more advanced though... I would like each sphere that is used as a bounding object to capture its corresponding point and create an individual group... So each point stands in its own unique group... If there are 12 points in total... there should be 12 groups with one point each...

screen7.jpg

I am sure this is possible with a "ForEach" node... But could not figure out the algorithm...

:(

Thank you very much.

grouping_v1r2.hipnc

Edited by Symbolic
Link to comment
Share on other sites

Use an AttribCreate SOP to create an attribute with the point number of the grid (name: ptnum Value: $PT) & copy that attribute to each sphere. You can now query each sphere for the attribute which is the point number it was copied onto.

Cheers!

steven

Link to comment
Share on other sites

Thanks Steven,

Will I still need ForEach?...

I did not exactly understand how to use the attribute to create groups...

:(

Cheers.

//

I kind of have a workflow in my mind... but I just can not bring it to life...

It might be something like... using a delete sop in a foreach loop to cycle through the spheres... bring in one sphere at a time and create one group at a time till all spheres are processed...

Edited by Symbolic
Link to comment
Share on other sites

Hi Petz,

Thanks! This works.

Now I am trying to create a forEach for combining two sets of groups...

ex:

link_1 + group_1 = combined_1

So 24 "link_*" groups will combine with 24 "group_*" groups and result in 24 groups called "combined_*"...

Then I have to fuse (24 separate fuses for each group called "combined_*")

Looks like more forEach loops :)

Everybody... thanks for the help...

P.S:

If you think that I am too lazy... sorry! :) ... will try it tomorrow at the office...

but meanwhile... any help will be great!

Cheers.

grouping_v1r2_3.hipnc

Edited by Symbolic
Link to comment
Share on other sites

Hi,

It works great... But I figured out that I am trying to achieve something far more complicated than I have imagined...

:(

Now, it is possible to create proper groups with points in them...

So I have groups: "link_1, link_2, link_3 ..." on one of the geometries...

Then on the other geometry I have groups: "connect_1, connect_2, connect_3 ..."

The problem is that: "link_1 + connect_1 = combined_1" ... but "combined_1" is not the right pair of points all the time...

I am attaching my file... I know this is hard... Maybe somehow using an attribute might help...

Thanks for your help.

complicated_grouping_v1r5.hip

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...