Is was just wondering if someone could explain to me how the PolygonMesh.uvs method works. It says the uvs method is used to retrieve an array of uv coordinates in the mesh. Do you have to use set_uv. Or can you just create a PolygonMesh and then use the method to retrieve the array. If I create a new mesh can I just use mesh.uvs to get the array. I tried using it like this but nothing happened:
pm = Geom::PolygonMesh.new
pm.add_point([ 0, 0, 0]) # 1
pm.add_point([10, 0, 0]) # 2
pm.add_point([10,10, 0]) # 3
pm.add_point([ 0,10, 0]) # 4
pm.add_point([20, 0, 5]) # 5
pm.add_point([20,10, 5]) # 6
pm.add_polygon(1,-2,3,4)
pm.add_polygon(2,5,6,-3)
# Create a new group that we will populate with the mesh.
group = Sketchup.active_model.entities.add_group
material = Sketchup.active_model.materials.add('green')
smooth_flags = Geom::PolygonMesh::NO_SMOOTH_OR_HIDE
group.entities.add_faces_from_mesh(pm, smooth_flags, material)
uvs = pm.uvs