HM_ExtAPI::GeomFaceGetLoop()

Returns coedges that define face loop.

Syntax

bool GeomFaceGetLoop(
const HM_EntityGeomFace & face,
int iloop,
int& edges_count,
HM_EntityGeomCoedge * & coedges,
bool*& coedge_senses
);

Type

HyperMesh Ext API Function

Description

Each face has at least one loop that defines its external boundary in parametric space.

Each loop has a direction defined in such a way that the loop is counter clockwise with respect to an outward pointing face normal. In other words, in a view where the face normal is directed towards the observer the loop would have the face area on the left side.

Coedges that are returned in coedges array are sorted along the direction of the loop.

Each side of the coedge is counted separately. If some coedge is encountered twice during the traversal of the loop along the loop’s direction then the coedges array returned during the call to GeomFaceGetLoop function will have two occurences of this coedge and coedge_senses will contain the value of true for one occurrence and the value of false for another occurrence.

To free arrays allocated for coedges and coedge_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

face
[in] - Handle to face object that was returned by previous calls to API function.
iloop
[in] - Loop index. The value must be in the range from 0 to loops_count - 1, where loops_count is the number of loops as returned by the function HM_ExtAPI::GeomFaceGetLoopsCount().
edges_count
[out] - Number of coedges in the loop.
coedges
[out] - Returns pointer to array of handles to coedges of the loop. The number of values in the array is edges_count.
coedge_senses
[out] - Returns pointer to array of flags that indicate orientation of corresponding coedge from faces array with respect to the loop direction. The number of values in the array is edges_count. The value of true indicates that the direction of the coedge is the same as the direction of the loop. The value of false indicates that the direction of the coedge is reversed with respect to the direction of the loop.

Errors

None.