Merging, extending and learning representations for 3D shape matching