TagMapped

ABSTRACT

This function maps the selected meshes, with the tag given as an argument. This function may appear similar to Retagged, but is different in that we're mapping meshes instead of tags. It may be useful to apply a different transformation to different category of meshes.

PARAMETERS
meshRepresents the mesh-tree containing meshes to be mapped. The selected meshes will undergo mapping based on the provided tag.
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 mapping operation based on the provided tag.
tag_map(tag,mesh)A function that defines the mapping for each selected mesh based on its tag. The function takes a tag value and the mesh as inputs and applies a specific transformation to the mesh based on the tag. The output should be a mesh-tree.
RETURN

If the complete mesh set is provided, all selected meshes will be individually mapped according to the specified tag map function. The return value is the mesh-tree of all the mapped meshes. However, if only a subset is chosen, the returned value will comprise a mesh-tree of the mapped 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 as is (i.e., not mapped).

DECLARATION
func TagMapped([mesh_tree] {[full] {mesh}, [tag_pred] {root, tag_predicate(tag)}}, tag_map(tag, mesh))