By Eric Zenk, Software Engineer
Incremental Faceting refers to a workflow where an application edits a model and only recomputes the facets on the parts of the model which were affected by the edit. This workflow allows the application to be much more responsive to the user by eliminating unnecessary computation.
Modified Faces
To understand the concepts in incremental faceting, it is helpful to see before and after pictures of several modeling operations. The modified faces are shown in yellow. With incremental faceting, the triangulation only changes for the yellow (modified) faces. This keeps the amount of refaceting to an absolute minimum.
• Remove Face
 |
 |
| Before Removing Red Face 1 |
After Removing Face 1 |
• Blend Edge
 |
 |
| Before Blending Red Edge 1 |
After Blending Edge 1 |
• Move Face
 |
 |
| Before Moving The Hole 1 |
After Moving The Hole 1 |
Recommended Workflow
To implement incremental faceting, the application must note a delta state before each operation is done.
DELTA_STATE* initial_state = NULL;
outcome note_state_result = api_note_state( initial_state );
if( !initial_state )
{
// returns the current active delta state
outcome get_active_state_result = api_get_active_state( initial_state );
}
Use api_get_modified_faces to find which faces changed between states.
ENTITY_LIST deleted_faces;
ENTITY_LIST modified_faces;
ENTITY_LIST created_faces;
outcome gmf_result = api_get_modified_faces( initial_state,
deleted_faces,
created_faces,
modified_faces );
Typically, the rendering for the triangles from the deleted faces will need to be removed, and the created and modified faces will need to be refaceted using api_facet_entities
ENTITY_LIST faces_to_facet;
faces_to_facet.add( modified_faces );
faces_to_facet.add( created_faces );
outcome facet_result = api_facet_entities( owning_body, &faceted_faces);
Warning: Why Care is Needed
This workflow is recommended to maintain good facet quality while doing the minimum amount of updates to the facets and rendering.
When faceting only part of a model, it is possible to get facets that are not watertight. We say facets are non watertight if the line segments along topological edges do not match each other. The picture shows non watertight facets which were obtained by faceting each face with a separate API call, and deleting the edge facets after each API call.

Non watertight facets look very bad. We advise application developers maintain watertight facets by either faceting the entire body in one API call, or by refaceting all of the faces modified by an operation or sequence of operations in one API call. We also advise application developers not to delete the edge facets, which are stored on attributes on edges.