moab
|
Functions | |
void | iMesh_addPrntChld (iMesh_Instance instance, iBase_EntitySetHandle parent_entity_set, iBase_EntitySetHandle child_entity_set, int *err) |
Add parent/child links between two sets. | |
void | iMesh_rmvPrntChld (iMesh_Instance instance, iBase_EntitySetHandle parent_entity_set, iBase_EntitySetHandle child_entity_set, int *err) |
void | iMesh_isChildOf (iMesh_Instance instance, const iBase_EntitySetHandle parent_entity_set, const iBase_EntitySetHandle child_entity_set, int *is_child, int *err) |
Return whether two sets are related by parent/child links. | |
void | iMesh_getNumChld (iMesh_Instance instance, const iBase_EntitySetHandle entity_set, const int num_hops, int *num_child, int *err) |
void | iMesh_getNumPrnt (iMesh_Instance instance, const iBase_EntitySetHandle entity_set, const int num_hops, int *num_parent, int *err) |
void | iMesh_getChldn (iMesh_Instance instance, const iBase_EntitySetHandle from_entity_set, const int num_hops, iBase_EntitySetHandle **entity_set_handles, int *entity_set_handles_allocated, int *entity_set_handles_size, int *err) |
void | iMesh_getPrnts (iMesh_Instance instance, const iBase_EntitySetHandle from_entity_set, const int num_hops, iBase_EntitySetHandle **entity_set_handles, int *entity_set_handles_allocated, int *entity_set_handles_size, int *err) |
void iMesh_addPrntChld | ( | iMesh_Instance | instance, |
iBase_EntitySetHandle | parent_entity_set, | ||
iBase_EntitySetHandle | child_entity_set, | ||
int * | err | ||
) |
Add parent/child links between two sets.
Add parent/child links between two sets. Makes parent point to child and child point to parent. (Cycles in Set-Inclusion and Parent-Child structures.)
[in] | instance | iMesh instance handle |
[in] | parent_entity_set | Pointer to parent set |
[in] | child_entity_set | Pointer to child set |
[out] | err | Returned Error status (see iBase_ErrorType) |
Definition at line 1159 of file iMesh_MOAB.cpp.
{ ErrorCode result = MOABI->add_parent_child (ENTITY_HANDLE(parent_entity_set), ENTITY_HANDLE(child_entity_set)); if (result == MB_ENTITY_NOT_FOUND) ERROR(iBase_INVALID_ENTITYSET_HANDLE, "iMesh_addPrntChld: ERROR invalid entity set."); CHKERR(result, "iMesh_addPrntChld: ERROR addParentChild failed."); RETURN(iBase_SUCCESS); }
void iMesh_getChldn | ( | iMesh_Instance | instance, |
const iBase_EntitySetHandle | from_entity_set, | ||
const int | num_hops, | ||
iBase_EntitySetHandle ** | entity_set_handles, | ||
int * | entity_set_handles_allocated, | ||
int * | entity_set_handles_size, | ||
int * | err | ||
) |
Get the child sets linked from a specified set.
[in] | instance | iMesh instance handle |
[in] | from_entity_set | Entity set being queried |
[in] | num_hops | Maximum hops from entity_set_handle to child set, Indirection in Set-Inclusion and Parent-Child structures) |
[in,out] | entity_set_handles | Pointer to array of child sets Array pointer, allocated and occupied sizes argument trio) |
[in,out] | entity_set_handles_allocated | Pointer to allocated size of |
[out] | entity_set_handles_size | Pointer to occupied size of |
[out] | err | Returned Error status (see iBase_ErrorType) |
Definition at line 1253 of file iMesh_MOAB.cpp.
{ std::vector<EntityHandle> children; ErrorCode result = MOABI->get_child_meshsets (ENTITY_HANDLE(from_entity_set), children, num_hops+1); if (result == MB_ENTITY_NOT_FOUND) ERROR(iBase_INVALID_ENTITYSET_HANDLE, "iMesh_getChldn: ERROR invalid entity set."); CHKERR(result,"ERROR getChildren failed."); ALLOC_CHECK_ARRAY_NOFAIL(entity_set_handles, children.size()); EntityHandle *ents = HANDLE_ARRAY_PTR(*entity_set_handles); // use a memcpy for efficiency memcpy(ents, &children[0], children.size()*sizeof(EntityHandle)); RETURN(iBase_SUCCESS); }
void iMesh_getNumChld | ( | iMesh_Instance | instance, |
const iBase_EntitySetHandle | entity_set, | ||
const int | num_hops, | ||
int * | num_child, | ||
int * | err | ||
) |
Get the number of child sets linked from a specified set.
[in] | instance | iMesh instance handle |
[in] | entity_set | Entity set being queried |
[in] | num_hops | Maximum hops from entity_set_handle to child set, not inclusive of the child set. Indirection in Set-Inclusion and Parent-Child structures) |
[out] | num_child | Pointer to number of children returned from function |
[out] | err | Returned Error status (see iBase_ErrorType) |
Definition at line 1220 of file iMesh_MOAB.cpp.
{ *num_child = 0; ErrorCode result = MOABI->num_child_meshsets (ENTITY_HANDLE(entity_set), num_child, num_hops+1); if (result == MB_ENTITY_NOT_FOUND) ERROR(iBase_INVALID_ENTITYSET_HANDLE, "iMesh_getNumChld: ERROR invalid entity set."); CHKERR(result,"iMesh_getNumChld: ERROR GetNumChildren failed."); RETURN(iBase_SUCCESS); }
void iMesh_getNumPrnt | ( | iMesh_Instance | instance, |
const iBase_EntitySetHandle | entity_set, | ||
const int | num_hops, | ||
int * | num_parent, | ||
int * | err | ||
) |
Get the number of parent sets linked from a specified set.
[in] | instance | iMesh instance handle |
[in] | entity_set | Entity set being queried |
[in] | num_hops | Maximum hops from entity_set_handle to parent set, not inclusive of the parent set. Indirection in Set-Inclusion and Parent-Child structures) |
[out] | num_parent | Pointer to number of parents returned from function |
[out] | err | Returned Error status (see iBase_ErrorType) |
Definition at line 1237 of file iMesh_MOAB.cpp.
{ *num_parent = 0; ErrorCode result = MOABI->num_parent_meshsets (ENTITY_HANDLE(entity_set), num_parent, num_hops+1); if (result == MB_ENTITY_NOT_FOUND) ERROR(iBase_INVALID_ENTITYSET_HANDLE, "iMesh_getNumPrnt: ERROR invalid entity set."); CHKERR(result,"iMesh_getNumPrnt: ERROR GetNumParents failed."); RETURN(iBase_SUCCESS); }
void iMesh_getPrnts | ( | iMesh_Instance | instance, |
const iBase_EntitySetHandle | from_entity_set, | ||
const int | num_hops, | ||
iBase_EntitySetHandle ** | entity_set_handles, | ||
int * | entity_set_handles_allocated, | ||
int * | entity_set_handles_size, | ||
int * | err | ||
) |
Get the parent sets linked from a specified set.
[in] | instance | iMesh instance handle |
[in] | from_entity_set | Entity set being queried |
[in] | num_hops | Maximum hops from entity_set_handle to parent set, Indirection in Set-Inclusion and Parent-Child structures) |
[in,out] | entity_set_handles | Pointer to array of parent sets Array pointer, allocated and occupied sizes argument trio) |
[in,out] | entity_set_handles_allocated | Pointer to allocated size of |
[out] | entity_set_handles_size | Pointer to occupied size of |
[out] | err | Returned Error status (see iBase_ErrorType) |
Definition at line 1278 of file iMesh_MOAB.cpp.
{ std::vector<EntityHandle> parents; ErrorCode result = MOABI->get_parent_meshsets (ENTITY_HANDLE(from_entity_set), parents, num_hops+1); if (result == MB_ENTITY_NOT_FOUND) ERROR(iBase_INVALID_ENTITYSET_HANDLE, "iMesh_getPrnts: ERROR invalid entity set."); CHKERR(result,"ERROR getParents failed."); ALLOC_CHECK_ARRAY_NOFAIL(entity_set_handles, parents.size()); EntityHandle *ents = HANDLE_ARRAY_PTR(*entity_set_handles); // use a memcpy for efficiency memcpy(ents, &parents[0], parents.size()*sizeof(EntityHandle)); RETURN(iBase_SUCCESS); }
void iMesh_isChildOf | ( | iMesh_Instance | instance, |
const iBase_EntitySetHandle | parent_entity_set, | ||
const iBase_EntitySetHandle | child_entity_set, | ||
int * | is_child, | ||
int * | err | ||
) |
Return whether two sets are related by parent/child links.
Return whether two sets are related (*is_child=1) or not (*is_child=0) by parent/child links
[in] | instance | iMesh instance handle |
[in] | parent_entity_set | Pointer to parent set |
[in] | child_entity_set | Pointer to child set |
[out] | is_child | Pointer to flag returned from function |
[out] | err | Returned Error status (see iBase_ErrorType) |
Definition at line 1191 of file iMesh_MOAB.cpp.
{ if (!child_entity_set) ERROR(iBase_INVALID_ENTITYSET_HANDLE, "iMesh_isChildOf: ERROR invalid entity set."); std::vector<EntityHandle> children; ErrorCode result = MOABI->get_child_meshsets (ENTITY_HANDLE(parent_entity_set), children); if (result == MB_ENTITY_NOT_FOUND) ERROR(iBase_INVALID_ENTITYSET_HANDLE, "iMesh_rmvPrntChld: ERROR invalid entity set."); CHKERR(result,"iMesh_isChildOf: ERROR IsParentChildRelated failed."); if (std::find(children.begin(), children.end(), ENTITY_HANDLE(child_entity_set)) != children.end()) *is_child = true; else *is_child = false; RETURN(iBase_SUCCESS); }
void iMesh_rmvPrntChld | ( | iMesh_Instance | instance, |
iBase_EntitySetHandle | parent_entity_set, | ||
iBase_EntitySetHandle | child_entity_set, | ||
int * | err | ||
) |
Remove parent/child links between two sets.
[in] | instance | iMesh instance handle |
[in] | parent_entity_set | Pointer to parent set |
[in] | child_entity_set | Pointer to child set |
[out] | err | Returned Error status (see iBase_ErrorType) |
Definition at line 1175 of file iMesh_MOAB.cpp.
{ ErrorCode result = MOABI->remove_parent_child (ENTITY_HANDLE(parent_entity_set), ENTITY_HANDLE(child_entity_set)); if (result == MB_ENTITY_NOT_FOUND) ERROR(iBase_INVALID_ENTITYSET_HANDLE, "iMesh_rmvPrntChld: ERROR invalid entity set."); CHKERR(result,"iMesh_rmvPrntChld: ERROR RemoveParentChild failed."); RETURN(iBase_SUCCESS); }