Home > User Guide > Modeling Operations > Intersectors, Booleans, and Stitching
Stitching
The Stitch Component (STITCH), provides a way to stitch, or sew, separate faces together to make a sheet or solid body that is topologically complete. The standard stitch operation, invoked by calling the api_stitch function without the optional split argument, compares the edges and vertices of the two bodies. If the function finds any edges or vertices that are coincident (within system tolerance) over their entire length, the function joins the bodies along those edges and vertices. In other words, stitching essentially involves replacing coincident groups of edges or vertices in the data with a single edge or vertices.
The only exception to this process is when two edges contain single-sided faces of incompatible orientation (that is, having the same coedge direction, and thus incompatible face normals). Stitching will fail when incompatible coedges are encountered. However, the API api_stitch is versioned. If a pre-R10 version of this API is called, it will continue with the stitching but the incompatible edges will not be stitched. Vertices that lie on incompatible coedges are also not stitched, despite the fact that they are coincident. Consequently, the resulting body may be invalid. Any other combination of faces that share coincident edges are stitched, even if the final edge has more than two faces around it after the stitch (that is, non-manifold).
All ACIS stitching operations that create non-manifold edges attempt to preserve the validity of the ACIS model by performing what amounts to a non-regularized union operation on those edges. As a consequence, any faces that end up as internal to the final model are changed to be double-sided-inside faces. This does not include shells that do not interact with the other body, because stitching does not deal with shell or lump containment issues.
The variations on stitching are edge splitting, self-stitching, and imprint stitching.
Edge splitting is available by calling api_stitch with the flag argument, split, set to TRUE. In this version of stitch, two edges need only be coincident over some shared region. Edges are broken into two pieces with a new intervening vertex at boundaries of coincident regions. This produces a set of new edges, some of which have no relation and some of which are coincident in their entirety. The coincident edges are then stitched following the same rules as in standard stitching.
Self-stitching is available when the api_stitch function is called with the same body specified for both of the input body arguments. The function searches for any redundant vertices and edges in the body and merges them, with the limitation that only a single redundancy is handled properly. A model containing three identical edges that need to be merged is not guaranteed to be stitched correctly.
Imprint stitching is available as a separate API. The api_imprint_stitch function essentially performs the same operation as an imprint followed by a stitch, but the function uses the intersection information from the imprint when stitching. Therefore, it does not have to perform the expensive search for identical edges, but instead merely merges them. Imprint stitching groups the two input bodies into one, even if they do not intersect.
The Stitch component provides two prototypes of the API api_stitch.
Prototype 1
outcome api_stitch (
const ENTITY_LIST& to_be_stitched,
ENTITY_LIST& output_bodies,
ENTITY_LIST& new_bodies,
stitch_options* sopts,
AcisOptions* aopts
)Prototype 2
Note: This prototype has been deprecated.
outcome api_stitch (
BODY* body,
ENTITY_LIST & to_be_stitched,
stitch_options* sopts,
AcisOptions* aopts
)Because Prototype 2 of api_stitch has been deprecated, we recommend that you use Prototype 1 of api_stitch. In the discussion below, instances to the use of api_stitch refers to Prototype 1 of api_stitch.
The API api_stitch can stitch the entities in three modes, exact, tolerant, and restricted tolerant. This is achieved by the use of stitch_options object passed as an argument to api_stitch. The class-hierarchy of this option object is such that stitch_options forms the base class from which specific stitch options classes, such as exact_stitch_options and tolerant_stitch_options are derived. Restricted Tolerant Stitching uses edge_tolstitch_options, which is derived from tolerant_stitch_options.
Figure. Class Hierarchy of the stitch_options Object
This section covers the following Stitching operations:
Related topics:
Tolerant Stitching Sample Code
Stitch Progress Callback[Top]
© 1989-2007 Spatial Corp., a Dassault Systèmes company. All rights reserved.