PDG Partition by Index Question

   2712   5   1
User Avatar
Member
2 posts
Joined: Dec. 2018
Offline
Hi All,

Sorry if this has been covered. I couldn't find an explanation.

I've been struggling with trying to get a PDG set up going where I have a set of work items that I want to be iterated on by another set of work items and then fed further down the chain for more PDG goodness.
(So, for example, I have 5 different points, and I want to copy 10 different coloured spheres to that point and output each as its own geometry. I have a HDA that I want to do this with, and I would expect the input to that HDA to be 50 work items)

However, when I try to do a partition by index to organize these items, I would have expected it to organize it by the wedgenum of the index (my 5 different points) but instead it seems to be mixing and matching based on a different index.

I really lack the vocabulary to describe the problem in too great a detail so I hope that by simplifying that circumvents that.

Any help would be much appreciated!
User Avatar
Staff
387 posts
Joined: Aug. 2017
Offline
Hi,

Based on this example that you described:

(So, for example, I have 5 different points, and I want to copy 10 different coloured spheres to that point and output each as its own geometry. I have a HDA that I want to do this with, and I would expect the input to that HDA to be 50 work items)

I don't think you would need a partition node. Instead, you could feed your 5 points to the wedge node to generate the 50 work items, and then feed that directly to an HDA Processor, for example.

If you did want to group them together, you could use a Partition by Attribute. Using a Partition by Attribute with the “Distinct Attribute Values” setting and partitioning based on the wedgenum attribute will result in getting 10 partitions (1 for each colour, each containing the 5 points).

Alternatively, using a Partition by Attribute with the “Distinct Attribute Values” setting and partitioning based on the point number attribute will result in getting 5 partitions (1 for each point, each containing all 10 colours).

I've attached a .hip file that hopefully makes this much more clear than my text explanation.
Edited by BrookeA - July 3, 2020 11:03:29

Attachments:
pdg_example.hip (104.7 KB)

User Avatar
Member
2 posts
Joined: Dec. 2018
Offline
Thank you! That was a really good explanation and the file helps a lot too. I was definitely thinking about it in the wrong way.
User Avatar
Member
7 posts
Joined: Aug. 2017
Offline
A bit late but I was wondering. how to split again after the Partition using store items to attrib setting
Image Not Found

?

Attachments:
screens.png (82.0 KB)

User Avatar
Staff
585 posts
Joined: May 2014
Offline
You can split the attribute back into work items using a Work Item Expand TOP, by setting the expansion type to "Upstream Attribute", specifying the name of the attribute, and enabling the "Expand as Work Item IDs" toggle.
User Avatar
Member
7 posts
Joined: Aug. 2017
Offline
Thank that is working
  • Quick Links