Retagged

ABSTRACT

The Retagged operation remaps the tags of meshes in a mesh-tree based on a provided function.

PARAMETERS
meshRepresents the mesh-tree containing meshes with tags to be remapped. All provided meshes' tags will undergo remapping.
rootThe root of the mesh-tree, serving as the container for mesh selection.
tag_predicate(tag)Determines whether a mesh should be included in the retagging operation based on the provided tag.
retag(old_tag)A function that defines the remapping for each mesh's tag. The function takes an old tag value as input and returns a new tag value.
RETURN

If the complete mesh set is provided, all meshes' tags will be individually remapped according to the specified retagging function. The return value is the mesh-tree of all the remapped meshes. However, if only a subset is chosen, the returned value will comprise a mesh-tree of the retagged selected meshes, while the unselected meshes will remain unchanged. Crucially, all meshes you didn't select will still be included in the result mesh_tree, but be provided with their original tags (i.e., not retagged).

DECLARATION
func Retagged([mesh_tree] {[full] {mesh}, [tag_pred] {root, tag_predicate(tag)}}, retag(old_tag))