def getSelectedTets(): """ Return the CUBIT indices of the selected tetrahedrons. Parameters: None Return: cubit_ids """ group_id = cubit.create_new_group() cubit.silent_cmd("group %i add selection" % (group_id)) idxs = cubit.get_group_tets(group_id) cubit.delete_group(group_id) return idxs
def getSelectedTets(): """ Return the CUBIT indices of mouse selected tetrahedrons. Parameters: None Return: cubit_ids """ group_id = cubit.create_new_group() cubit.silent_cmd("group %i add selection" % (group_id)) idxs = cubit.get_group_tets(group_id) cubit.delete_group(group_id) return idxs
def getSelectedTets(tet_proxy): """ Return the STEPS indices and CUBIT indices of the selected tetrahedrons. Parameters: * tet_proxy Tetrahedron element proxy generated by STEPS mesh importing function Return: (steps_ids, cubit_ids) """ group_id = cubit.create_new_group() cubit.silent_cmd("group %i add selection" % (group_id)) cubit_ids = cubit.get_group_tets(group_id) steps_ids = [tet_proxy.getSTEPSID(id) for id in cubit_ids] cubit.delete_group(group_id) return (steps_ids, cubit_ids)