Centered

ABSTRACT

The Centered operation repositions the provided meshes within the mesh-tree to a specified center point. In particular, the center of the selected meshes will be moved to the target location.

IMPORTANT ELEMENT

This function is used often enough that it should be worth memorizing. Well, I think positioning in Monocurl isn't great right now so different people may have different ideas of what is the best way to position, so just explore the different options and choose one that works best. Definitely, however, try not to always specify the positions manually as that's rather painful

PARAMETERS
meshRepresents the mesh-tree containing meshes to be repositioned. All provided meshes will undergo repositioning.
rootThe root of the mesh-tree, serving as the container for mesh selection.
tag_predicate(tag)Determines whether a mesh should be repositioned based on the provided tag.
atA 3D vector indicating the new center point to which the meshes will be moved.
RETURN

If the complete mesh set is provided, all meshes will be individually repositioned to the specified center point. The return value is the mesh-tree of all the repositioned meshes. However, if only a subset is chosen, the returned value will comprise a mesh-tree of the selected meshes repositioned to the specified center point, 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., without being repositioned).

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