api_stitch
List of: Functions
Subjects: Stitching
Contents: Boolean

Action: Stitches faces along edges and vertices of identical geometry.

Prototype: outcome api_stitch (


BODY* b1, // result body


BODY* b2, // body to stitch


logical split // match coincident



= FALSE, // edges if TRUE


AcisOptions* ao = NULL // ACIS options such as




// version and journal


);

Includes: #include "kernel/acis.hxx"

#include "boolean/kernapi/api/boolapi.hxx"

#include "kernel/kernapi/api/api.hxx"

#include "kernel/kerndata/top/body.hxx"

#include "baseutil/logical.h"

#include "kernel/kernapi/api/acis_options.hxx"

Description: This API joins two face bodies along edges and vertices that are identical. Stitching only operates on faces, not on wires, and only stitches faces to faces. If wires exist in one of the bodies being stitched, but do not participate in the stitch (i.e., they do not coincide with edges in the other body), they will transfer to the resulting body.


The argument b1, the first input body, is returned as the resulting body. The second body, b2, is deleted unless it is the same as b1. For example, a body might need internal stitching. One can stitch b1 to b1, and b1 is not deleted.


When creating two-manifold edges on single sided faces, stitching merges geometry on coedges that have opposite edge sense and identical edge geometry (within tolerance). api_stitch will fail if coedges of incompatible orientation (i.e. same edge sense) are encountered. If the faces are double sided, the coedges need not be of opposite sense.


If the split argument is FALSE, the edges must be identical along their entire length. If split is TRUE, the API splits edges in order to match coincident coedges. Coincident edges on single-sided faces and of incompatible orientation (opposite coedge sense) are not split.


When creating nonmanifold edges, the coedges are sorted and a "union" is performed around the coedge, marking faces that are now BOTH_INSIDE as such. The BOTH_INSIDE containment is then propagated to all faces not connected through a stitched edge.


When vertices at the same location (within tolerance) are merged, they become nonmanifold and they contain all surrounding face groups. If the attempt to make a two-manifold edge stitch fails, the vertices are not merged.


Unlike functions such as api_unite, api_stitch is not a Boolean operation. Stitching is simpler than a Boolean because it avoids face-face intersections and the evaluation of lump and shell containments.

Errors: Pointer to first or second body is NULL or not to a BODY.

None of the coedges or vertices contain identical geometry.

Incompatible coedges encountered.

Library: boolean

Filename: bool/boolean/kernapi/api/boolapi.hxx

Effect: Changes model
PDF/BOOL/03FN.PDF
HTM/DATA/BOOL/BOOL/03FN/0045.HTM