HM_ExtAPI::GeomSolidGetBoundary()

Returns faces that define solid boundary.

Syntax

bool GeomSolidGetBoundary(
const HM_EntityGeomSolid & solid,
int ibnd,
int& num_faces,
HM_EntityGeomFace*& faces,
bool*& face_senses
);

Type

HyperMesh Ext API Function

Description

Each solid has at least one boundary that separates its volume. One boundary consists of faces connected to each other at their edges. Two boundaries are different if none of the faces from the first boundary is connected to any of the faces from the second boundary.

Each side of the face is counted separately. If some face is "embedded" into the solid so that it has solid volume on both sides then the faces array returned during the call to GeomSolidGetBoundary function will have two occurrences of this face and face_senses will contain the value of true for one occurrence and the value of false for another occurrence.

To free arrays allocated for faces and face_senses during the function call use the function HM_ExtAPI::MemoryFree().

If the function succeeds, the return value is true. If the function fails, the return value is false. To get extended value information, call HM_ExtAPI::GetLastErrorCode().

Requires including hm_extapi.h.

Inputs

solid
[in] - Handle to solid object that was returned by previous calls to API functions.
ibnd
[in] - Boundary index. The value must be in the range from 0 to bnd_count - 1, where bnd_count is the number of solid boundaries as returned by the function HM_ExtAPI::GeomSolidGetBoundariesCount().
num_faces
[out] - Number of faces in the boundary.
faces
[out] - Returns pointer to array of handles to faces of the boundary. The number of values in the array is num_faces.
face_senses
[out] - Returns pointer to array of flags that indicate orientation of corresponding face from faces array with respect to the volume of the solid. The number of values in the array is num_faces. The value of true indicates that the normal of corresponding face is directed into the volume of the solid. The value of false indicates that the normal of corresponding face is directed outside the volume of the solid.

Errors

None.