Kitware / SMTK

Simulation Modeling Tool Kit
https://smtk.readthedocs.org/
Other
48 stars 27 forks source link

Universal group operator #151

Open yumin opened 9 years ago

yumin commented 9 years ago

We need a universal group operator across all types of sessions. This op will handle various grouping operations, such as create/delete group, modify group (add/remove entities). The group may have different constraints on its membership and its relationship with the entities. We have something in discrete (PR #149), but it is limited to the discrete modeling kernel. This new op should match closely with the smtk group capability. Here is some comment for that PR from @vibraphone

There are bits set aside in smtk/model/EntityTypeBits.h to mark groups as partitions or covers but there are no tests to enforce these rules — in part because there are no operators to construct the initial set of groups that form the partition or cover or manipulate the groups after their creation. Note that using groups this way requires 2 levels of groups: a toplevel group with the PARTITION or COVER bit set and child groups that collectively define the membership.

The 2-level groups are required so that partitions/covers do not have to encompass all entities in a model manager or session. Instead, operators should just verify that the membership of the toplevel group before and after a group operation is unchanged.

vibraphone commented 9 years ago

The preferred way to implement this is