Hi Experts,
In SketchUp application, I create a model without texture and saved it into NoTexture.skp.
First I open NoTexture.skp file and assign a texture to polygon mesh and re-save it into polygonmesh_texture.skp.
polygonmesh_texture.skp (159.6 KB)
Second, I open NoTexture.skp file again; then I create a component and assign the same texture with the same width/height to component and save it into component_texture.skp.
component_texture.skp (166.1 KB)
I query UV coordinates of polygonMesh texture by the following functions:
SUFaceGetUVHelper(); SUFaceGetUVHelperWithTextureHandle() and SUUVHelperGetFrontUVQ().
My application doesn’t perspective distortion of textures, so I get UV from UVQ by
u = u / q
v = v / q
q = 1.0
Then I dumped the UV coordinates into the file polygonmesh_texture_UV.txt in the zip package
polygonmesh_texture_UV.zip (1.3 KB)
I query UV coordinates of component texture by the functions:
SUTextureWriterGetFrontFaceUVCoords()
Then I dumped the UV coordinates into the file component_texture_UV.txt in the zip package
component_texture_UV.zip (1.2 KB)
If you compare these two texture UV files, you will find the UV coordinates are the same. If you open polygonmesh_texture.skp and component_texture.skp in SketchUp application, you will find the texture of the cylinder face are different. Logically I should get different UV coordinates for texture on cylinder face.
Could you please take a look at the issue? Appreciated for your help.
Thanks
Phenix