Create Custom Texture Mapping with RhinoCommon - how to?

Hello everyone, I have the following problem:

In order to automatically create a custom texture mapping on a mesh, I use RhinoCommon to set the vertex texture coordinates. This works just fine for normal textures. However, to create a displacement with RhinoCommon, I require a MeshDisplacementInfo object (https://developer.rhino3d.com/api/RhinoCommon/html/T_Rhino_Geometry_MeshDisplacementInfo.htm).

My problem now is, that the constructor for the MeshDisplacementInfo requires a TextureMapping object, that should contain the texture mapping information I just defined through the vertex texture coordinates.
How could I obtain such a custom TextureMapping object?

Somehow it should be possible, since I can apply a displacement on a mesh with custom vertex texture coordinates using the normal Rhino user interface.

Any advice much appreciated :slight_smile: