MatchedEdge
The MatchedEdge operation aligns specified edges of meshes within the provided mesh-tree with a reference edge. Formally, we ensure that exists a plane that is normal to the direction such that it is tangent to both mesh sets, both meshes are on the same side of the plane, and that dot product between the direction and any vector from the mesh to any point on the plane is nonnegative.
mesh | Represents the mesh-tree containing meshes with edges to be aligned. All provided meshes' will undergo alignment. |
root | The root of the mesh-tree, serving as the container for mesh selection. |
tag_predicate(tag) | Determines whether a mesh should be aligned based on the provided tag. |
ref | A reference mesh-tree, to which the target mesh tree will be aligned to |
dir | A direction vector indicating the alignment direction. |
If the complete mesh set is provided, all selected meshes' edges will be aligned with the reference mesh based on the specified direction. The return value is the mesh-tree of all meshes with aligned edges. However, if only a subset is chosen, the returned value will comprise a mesh-tree of the selected meshes with aligned edges, while the unselected meshes will remain unchanged. Crucially, all meshes you didn't select will still be included in the result mesh_tree, but their edges will remain unaligned.
func MatchedEdge([mesh_tree] {[full] {mesh}, [tag_pred] {root, tag_predicate(tag)}}, ref, dir)