<<< Tabular Output of Faceting | Chapters | Session Support >>> |
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:
Each time one of the modeling changes listed above happens, Parasolid adds an entry to the bulletin board.
The entity classes that can be recorded on the bulletin board fall into the following groups:
Group | Entity classes |
---|---|
The permissible combinations of events and entity classes are indicated by *
Event | body | topology, group | geometry, transform | attribute definition |
---|---|---|---|---|
deleet
, because
delete
is a reserved word in C++.See "Groups and modeling operations" in Chapter 45, "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:
Value | Description |
---|---|
Switch the bulletin board on to record entities and user fields |
PK_BB_ask outputs 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 four lists:
List | Descripton |
---|---|
from the PK_BB_event_t range |
|
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:
events | entities | event_types | classes |
---|---|---|---|
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 behavior 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 rollmark 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 - rollback returns an error if the bulletin board is not empty. |
See Chapter 41, "Partitions and 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-facetted, without re-faceting the whole part.
See Chapter 48, "Introduction to Rendering and Faceting" for information on the functions available for drawing entities.
One of the most common causes of localized changes to a model is the addition of a blend to an edge. If the blend is fixed immediately, then the picture can be updated by watching the bulletin board in the usual way. However, this method does not work for unfixed blends, because attaching a blend to an edge without fixing it does not change the topology or geometry of the edge, so such a change is not recorded in the bulletin board.
The solution to the problem of rendering unfixed blends without re-drawing the whole object every time the blend is changed is to use PK_EDGE_find_blend_topol. This function returns lists of all the edges and faces which are affected by the blend on a particular edge. For example:
Figure 57-1 Edges affected by blending
The list of edges returned by PK_EDGE_find_blend_topol can then be passed to the rendering functions, using the option to draw unfixed blends. The application's GO must be written in a way that ensures that the edges are undrawn before they are re-drawn, of course.
If a blend on an edge is being changed rather than added, then PK_EDGE_find_blend_topol should be called both before and after attaching the blend to the edge, because of the possibility that two blends were overlapping. The set of edges which need to be re-drawn is then the union of the two lists of edges returned from PK_EDGE_find_blend_topol.
See Chapter 30, "Edge Blending Functions and Options", for further information on blending operations.
<<< Tabular Output of Faceting | Chapters | Session Support >>> |