Groups   

<<< Data Import Chapters Attribute Definitions >>>

Contents

[back to top]


45.1 Introduction

Groups are collections of entities. They enable applications to assemble and track sets of entities within a part, in order to supplement the Parasolid data structure. This chapter explains briefly how groups work.

[back to top]


45.2 Characteristics of groups

Each group belongs to a particular part and has a particular class. A group can only contain entities that belong to the same part as the group belongs to. The group class, from the following list, determines the class of entities the groups can contain:

Specifying a single class prevents inappropriate entities being added to the group.

Any number of groups can belong to the same part, and these can be of the same or different classes. Similarly, a particular entity can be in any number of groups that are able to contain that entity.

Groups are entities, and so all the general functions for managing entities can be used on groups.

[back to top]

45.2.1 PK functions specific to groups

 

Function Description

PK_GROUP_create_from_entities

Turn an array of entities into a group

PK_GROUP_add_entities

Add more entities to a group

PK_GROUP_merge_entities

Add more entities, purging duplicates

PK_GROUP_remove_entities

Remove entities from a group

PK_GROUP_ask_entities

Return entities in the group

PK_GROUP_contains_entity

Search a group for a specific element

PK_GROUP_ask_entity_class

What class are the grouped entities?

PK_GROUP_ask_part

What part owns the group?

PK_PART_ask_groups

Find the set of groups contained within the part

[back to top]


45.3 Groups and modeling operations

[back to top]

45.3.1 Merging entities

If a number of entities are merged, they are removed from any groups. One occurrence of the resulting entity is added to all groups that contained any of the original entities.

Merging may be performed explicitly or as part of a local operation.

[back to top]

45.3.2 Splitting entities

If an entity is split into a number of entities, the new entities are added to any group in which the original entity occurs.

[back to top]

45.3.3 Deleting entities

If an entity is deleted, it is removed from any group in which it occurs. If the last entity is removed from the group, the empty group continues to exist.

[back to top]

45.3.4 Creating entities

If a new entity is created other than by splitting an existing entity, the new entity does not occur in any groups as a result of the creation operation.

[back to top]

45.3.5 Merging bodies

If a number of bodies are combined by a Boolean operation, the resulting body inherits all the groups of the original bodies.

Entities that are deleted as a result of the merge are removed from the groups. If all the entities in a group are deleted the empty group is still inherited by the resulting body.

Groups are not merged so the resulting body can have two or more groups of the same class.

[back to top]

45.3.6 Splitting bodies

If a body is split, one of the resulting bodies inherits every group in the original body. The remaining bodies inherit copies of all those groups. If any of the resulting groups contain no entities, then those groups are deleted. A group can only contain entities that belong to the same part, so the contents of each group are modified to remove any entities not in the same part.

[back to top]


45.4 Examples of groups and boolean operations

In each of the following examples, the block has two groups:

Similarly, the rod has two groups:

Unless stated otherwise, the two bodies are positioned so that their centroids coincide.

Example 1:

 

The block and the rod are of identical height and so the resulting body has four groups:

Example 2:

 

The rod is higher than the block and so the resulting body has three groups:

There is no group 4 because the circular edges are not derived from the edges of the rod.

Example 3:

 

The block and the rod are of identical height and the centroid of the rod is positioned at the center of the block's end face. The resulting body has four groups:

Example 4:

 

The rod is higher than the block and the centroid of the rod is positioned at the center of the block's end face. The resulting body has three groups:

There is no group 4 because the circular edges are not derived from the edges of the rod.

Example 5:

 

The rod is higher than the block and so the resulting body has four groups:

Example 6:

 

The block and the rod are of identical height and so two bodies are created in the result. Each of the resulting bodies has four groups, as follows:

Example 7:

 

The rod is higher than the block and so the resulting bodies each have three groups:

There is no group 4 because the circular edges are not derived from the edges of the rod.

Example 8:

 

The rod is higher than the block and so the resulting body has four groups:

 

[back to top]

<<< Data Import Chapters Attribute Definitions >>>