How to set a texture on a surface or a mesh like below ? (C#)

Today, I try to use C# to set a texture on the surface.
However, I want to set the texture like below.
How to do it ? :weary:

@andy, @nathanletwory, is this something you can help with?

You need to create a material that has a mapping offset and repeat that work correctly for the surface. Unfortunately, since you want the image to follow the curved surface, you are limited to UV type mapping which means you won’t easily be able to figure out the absolute measurements in cm in a general way. You basically have to figure out the proportion of the surface (in UV space) that corresponds to 2cm and 3cm.

I’d try setting this up first in the Rhino UI, and only then write the code.

In order to stop the texture tiling, you’ll also need to set its “Decal” flag to true.

Thanks Andy!
I got it. Nice to meet you. :blush: