How to recalculate the UVs according to the normals of the face which must receive the texture?
Another track:
Manually if I use the eyedropper in the materials window, it is possible to copy materials and UVs to apply them to any face even with different normals.
Is it possible and legal to see the ruby code of this SketchUp tool?
Or
Can I use the methods of this tool to copy the UVs without using the tools manually?
I’ve already done a search and no topic answers my question.
It seems to me that the access to the parmeters of the normals with the method get_front_UVQ is missing.
I’d recommend not sampling from the face vertices to copy the UVs. Because you might have faces with colinear edge or even triangles.
Instead, sample four point on the plane of the face, they don’t have to match any of the vertices. Then use that as a reference to apply the same mapping to another face. face.position_material accept 3D world coordinates and UVs that all related to the plane of the face.