![]() |
Bulletin Board |
<<< Groups | Chapters | Archives >>> |
The Bulletin Board provides the means by which an application can trace how a model changes in the course of a modeling operation. The bulletin board is stored as arrays of tags of entities and associated arrays of event tokens which describe what has happened to an entity.
Note: If you do not want to use the bulletin board, you can use pmark entity information to track modelling changes during a Parasolid session instead. In particular, PK_PMARK_ask_entities can tell you which entities would be created, modified, or deleted if you were to move to a given pmark, and PK_PMARK_goto_2 can roll a partition to a given pmark. These functions give you complete control over which entity information is tracked and returned. See Chapter 97, “Rollback”, for more information. |
The entities and events that are recorded on the bulletin board are controlled by the application. Different information can be recorded for different entity classes.
A bulletin board event is some specified modification made to an entity (e.g. the entity is transformed or split into two) or the creation or deletion of the entity. The particular events which can be recorded on the bulletin board are the:
Each time one of the modeling changes listed above happens, Parasolid adds an entry to the bulletin board.
For an example of this functionality, see the code example in the
C++\Code Examples\Application Support\Session Management\BB
folder, located in
example_applications
in your Parasolid installation folder.
The entity classes that can be recorded on the bulletin board fall into the following groups:
The permissible combinations of events and entity classes are indicated by *
See “Groups and modelling operations on a part” in Chapter 98, “Groups”, for further information on how the members of a group can be changed.
PK_BB_create controls what is recorded by the bulletin board for each entity/event combination. The entity/events that are to be recorded are controlled by associating the required entity classes for each event.
PK_BB_set_status then switches the bulletin board on and off, by setting the
status
argument to one of the following values:
Switch the bulletin board on to record entities and user fields |
PK_BB_askoutputs the current set up of the bulletin board.
PK_BB_ask_status outputs whether the bulletin board is currently recording.
PK_BB_is can be used to determine whether an entity is a bulletin board.
Only one bulletin board at a time is supported, and PK_BB_create always returns a PK_BB_t argument with the value one.
It is recommended that the PK_BB_t argument be set to one when calling the other Bulletin Board PK functions, although the value is currently ignored.
To find out what is on the bulletin board, and therefore what changes have taken place in the parts in the session, PK_BB_output_events outputs the events that have occurred since the bulletin board was last emptied.
PK_BB_output_events takes an argument to specify whether the bulletin board is emptied after the bulletin board data is returned.
The data is returned in five arrays:
from the PK_BB_event_t range |
|
from the PK_CLASS_t range |
|
contains the user fields of the entity involved. The use of this array is optional and depends on whether the user field length is zero or not. |
The bulletin board is set up with PK_BB_create - the
create
and
copy
arrays of PK_BB_sf_t contain PK_CLASS_point; PK_BB_set_status turns the bulletin board on (for tags only).
If a point is created and copied, PK_BB_output_events would return two events as follows:
The bulletin board accumulates events as entities are created, deleted or modified. Each time an event occurs to an entity, the kernel looks for another entry in the bulletin board associated with that entity.
If one already exists there are rules which govern what action the bulletin board takes when two consecutive events occur to an entity (these may not necessarily be consecutive events in the bulletin board). With respect to these rules the events bulletined fall into the following four classes:
The rules which govern the action the bulletin board takes on two consecutive events, are:
Certain types of events can have overlapping definitions, this occurs if the bulletin board has been instructed not to record the relevant event type. Therefore depending on what events have been specified, the bulletin board may record a particular event as one or more other events. The events which exhibit this behaviour are:
Records accumulate in this way until the bulletin board is emptied, which clears all the entries from it and starts again (unless the monitoring is turned off entirely).
When a session roll mark is set, this includes details of the bulletin board. When the session is rolled back, the bulletin board is also rolled back to the same point. That is, both the contents and the entity event associations are rolled back, so the bulletin board is consistent with the new state of the session.
When a partition mark is set, the bulletin board is NOT included. This is because a partition mark only refers to certain entities in the session. The bulletin board logs operations which occur on bodies in different partitions, and cannot selectively mark or roll its contents.
Note: Therefore, the bulletin board must be emptied before performing a partition roll - rolling back returns an error if the bulletin board is not empty. |
See Chapter 97, “Rollback”, for further information on the rollback functionality.
There are two Parasolid facilities used to perform incremental graphics:
By watching the bulletin board the application can re-draw anything that has been modified or added. To keep the picture properly up to date, deleted items, and the earlier versions of changed items, need to be removed. Note however that the kernel does not provide any specific support for this part of the task: it is up to the application to remember (usually in some sort of graphical data structure) what entities are being displayed, and to remove them from the picture when necessary.
Incremental graphics can be implemented using faceting and the bulletin board together. For example, a part can be faceted and the bulletin board can be used to identify faces that have changed after an operation. The changed faces can then be re-faceted, without re-faceting the whole part.
See Section 107.2.16, “Incremental faceting” for information on the functions available for drawing entities.
<<< Groups | Chapters | Archives >>> |