Connecting Faces
To connect a set of contiguous but independent faces to obtain a unique topological object, use the Sewing class from the BRepOffsetAPI package which produces a shell as a result.
For example:
BRepOffsetAPI_Sewing Sew;
Sew.Add(Face1);
Sew.Add(Face2);
.. .
Sew.Add(Facen);
Sew.Perform();
TopoDS_Shape result= Sew.SewedShape();
Notes:
The sewing algorithm uses a tolerance to assemble the faces by sewing them along common edges. You must therefore check the gap between faces before sewing or adjust the value of the tolerance according to the real gap of the geometry.
If all faces have been sewed correctly, the result is a shell. Otherwise, it is a compound.
After a successful sewing operation all faces have a coherent orientation.
For more information, refer to the entry for this class in reference documentation.