Hi all,
I’ve tried to move the textureMapping with UvwTrabsform but it doesn’t work (or not as expected). Fortunately, using UV_Editor command and moving the mesh created by this command gives me right result.
But What I have to do is to edit my own uv in RhinoCommon in C#.
So I want to know how to get or modify the object without using UV_Editor command, thanks!
Hi @Justin12, the easiest way to get the UV meshes in the document is to script the _ExtractUVMesh command. You can to the same by accessing the mesh (or render meshes in case of breps) and using the mesh texture coordinates as vertex positions.
In case of mesh UV coordinates you can transform them directly using SetTextureCoordinate method.
Create a 2d uv mesh by using the texture coordinates from the 3d mapping mesh. Depending on your application you may want to apply mapping uvw transform to the uv mesh.
If you want bunch of separate meshes instead of a single mesh then explode the uv mesh
Mapping UVW transforms on polysurfaces with packed textures (textures are packed by default) are not working correctly. I’ve filed the bug for Rhino WIP: RH-69752 Mapping UVW transform wrong on poly surfaces with packed textures