We are in the process of adding the concept of a partitioning and partition groups into SMTK’s Model. Whether this will replace the existing grouping mechanism or co-exist along with it is certainly a topic for discussion.
Proposed Definition of a Partitioning and a Partition Group
A partitioning is a way of grouping the components of a model such that a component is a member of at most one group (called partition group).
- A partition group is homogeneous (it contains all components of the same type). For example a partition group would contains only faces or only edges but not both.
- A partition group can contain another partition group as long as it satisfies the restriction of component type and it is not already a member of an partition group.
How would Partition Groups work (Proposed)
- When listing components in the resource view, only components that are not a member of a partition group would be displayed as top level (note that a partition group is itself a component)
- Components should be able to be dragged into and out of a partition group
- When a component is placed in a partition group, it loses all explicit attribute associations and unique properties including color.
- Should be able to get the partition group that contains a component
- When getting the attributes that are associated to a component, should it also return the attributes associated with the partition group it is a member of?
- In code, should you be able to still associated an attribute to a component even if it is a member of a partition group? And if so should the explicit attribute hide an inherited attribute that may conflict with it?
- Should we keep our existing grouping mechanism in Model?
- Can a partition group be even more restrictive than just on component type? For example, could you partition on a Property as well so having a group of aux geometry that are marked vegetation?
- Why not just merge the components instead using a partition group?
- It would be very difficult to ungroup the components since the act of merging (say model faces) is a lossy operation
- In the future the idea would be to support more than one partitioning for the same geometric domain.