Home > User Guide > Model Analysis > Cellular Topology
Automatic Recompute
CT automatically updates the cell data on a lump at the end of each ACIS API call. At the end of an API, the current bulletin board is examined for any entity changes that cause a change to cell data. If any such changes are noted, the appropriate cells are "invalidated." For example, a coedge that has had a change to its partner pointer causes all cells around that edge to be invalidated.
Because individual cells are invalidated instead of the entirety of cell data on a lump, the update calculation is local instead of global. Only invalidated cells are examined and rebuilt during the update, with the exception of some of the sorting of rebuilt void c-shells into peripheral c-shells, which are global.
If supercells are present on the cell data (via api_ct_expand_cells) as it enters the update computation, they are removed at the beginning of the update but are recalculated before the end, and are used to speed up any global c-shell sorting.
Because invalid cells still point to any c-shells or c-faces not removed during the editing API, the update computation "merges" and "splits" cells and c-shells, and calls the related attribute handling routines.
A c-shell is split if its c-faces form more than one c-shell after it is rebuilt; it is merged if c-faces from another c-shell are needed to rebuild it. Similar logic applies to cells. The merging of volumes is not expressed by the cell merging and splitting in the update computation, because it is based only on arranging c-faces. Volume merging is detected and handled using c-face volume attributes, discussed in an upcoming section.
Merging and splitting of the ATTRIB_CELL and ATTRIB_FACECFACE also occurs, but not during the update computation. Both attributes process merging and splitting of their related lumps and faces during any ACIS model editing API. ATTRIB_CELL merging concatenates the cell lists of the two lumps. Splitting distributes any cell data appropriately over the old and new lumps. If one of the lumps being merged has no ATTRIB_CELL but the other does, the merged lump receives an ATTRIB_CELL anyway. This means that a union, for example, between a lump with cell data and a lump without cell data gives the correct cell data update on the resulting lump. The automatic update computation creates c-faces for any faces that have none. ATTRIB_FACECFACE merging removes an ATTRIB_FACECFACE, and splitting creates a new one which replicates the old.
The automatic update facility may be disabled on a lump-by-lump basis using set_auto_update on the ATTRIB_CELL; however, the cell invalidation process still occurs. Turning auto_update off delays automatic cell data updates; turning it back on causes an immediate update calculation. This approach permits suspension of updates during a series of model edits and execution of one update at the end. The same effect is achieved by placing all the edits inside one API_BEGIN and API_END routine.
Both the update and the invalidation process are permanently suspended in an API by setting local variable call_update_from_bb to false before the API_END macro in an API. The call_update_from_bb function is defined in each API macro, similar to result. If call_update_from_bb is set to FALSE, the bulletin board is not examined to determine the status of the cell data.
Using call_update_from_bb in this manner allows developers to create APIs that edit both the ACIS model and the cell data simultaneously. Editing the cell data manually may be faster than using the automatic update. For example, a new CT API to remove a face need only merge the cells on either side of the face as its cell update computation, whereas the automatic update rebuilds all cells around the remaining edges of the removed face.
The cell data "checker" is invoked when the cell_recompute or cell_compute debugging module is set to debug details or all. The data checker examines the cell data for correct pointers, c-faces, c-shells, c-shell containment, and cells, and prints a report to the debug file pointer. It is called directly:
void ct_check_lump_cells(LUMP*); but should be encased in an API_BEGIN and API_END because box calculations are implemented.
[Top]
© 1989-2007 Spatial Corp., a Dassault Systèmes company. All rights reserved.