on_mesh::SetTextureCoordinates function

dale :
I need use on_mesh::SetTextureCoordinates function to settexturecoords to mesh.but
I don’t know How to select a suitable Maping function .( Box ,spere,plane,or cylider,and so on)
So I think maybe I need a function to decide the mesh’s shape is look like a box ,a spere,a plane or a cylider.
1:How can I write this function
2:can you give me some example codes about how to use SetSpereMapping ,SetCyliderMapping,SetBoxMapping,and SexPlaneMapping functions

@andy, can you add anything to this?

attatment is a test 3dm file ,can you give me some example codes how to get the suitable uv coords of this mesh using c++ sdk function.
thanks very much!
大底.rar (2.4 MB)


There isn’t really an answer to this question, because there are no SDK functions that will let you do anything that you can’t do in the UI.

What you need to do first is to figure out how you would get decent mapping on this object in the Rhino UI. You might try unwrapping it - but my guess is that you’re going to have to build a simplified mesh around the object and use that as “duck mapping” - ie, custom object mapping.

  • Andy