Search code examples
openmesh

OpenMesh copy all standard and custom properties from one mesh element to another


OpenMesh offers the possibility to store properties on mesh elements (faces, vertices, half edges, edges) as described here. Is there a function available which copies all of these properties from one element to another?


Solution

  • Take a look at copy_all_properties.

    Signature (comes in few flavors- VertexHandle, HalfedgeHandle, EdgeHandle and FaceHandle):

    void OpenMesh::BaseKernel::copy_all_properties(EdgeHandle _eh_from, EdgeHandle  _eh_to, bool _copyBuildIn = false ) 
    

    Usage example from git repo: unittests_property.cc