sgCObject*   sgSurfaces::Face(const sgC2DObject&  outContour, const sgC2DObject** holes, int holes_count)

 

Description:

Creates a flat face from an outer contour and an array of holes. It can be also considered as the realization of Delone triangulation of a flat area with holes.

 

Arguments:

outContour - outer contour. Must be flat (checked by the IsPlane function), closed (checked by the IsClosed function) and not self-intersecting (checked by the IsSelfIntersecting function).

holes - array of holes. The holes must be flat (checked by the IsPlane function), (checked by the IsPlane function), closed (checked by the IsClosed function) and not self-intersecting (checked by the IsSelfIntersecting function). The holes must lie on the same plane as the outer contour (checked by the IsObjectsOnOnePlane function) and strictly inside it (checked by the IsFirstObjectInsideSeconfObject function). The holes must not be intersecting (checked by the IsObjectsIntersecting function) neither can they be inside each other (checked by the IsFirstObjectInsideSeconfObject function). If the argument is NULL the face is created withour holes.

holes_count - the number of holes in the holes array.

 

Returned value:

Returns the pointer to a newly created object. If the function fails NULL is returned.

 

See also:

sgC2DObject   EXAMPLE