pyvista_wasm.PolyData.texture_map_to_plane#
- PolyData.texture_map_to_plane() PolyData#
Generate texture coordinates by projecting points onto the XY plane.
Maps the mesh’s X and Y extents to UV coordinates in the [0, 1] range. This mirrors the PyVista
pyvista.DataSet.texture_map_to_plane()API.- Returns:
A new mesh with texture coordinates (
t_coords) set.- Return type:
Examples
>>> import pyvista_wasm as pv >>> mesh = pv.Sphere() >>> mapped = mesh.texture_map_to_plane() >>> mapped.t_coords is not None True >>> mapped.t_coords.shape == (mesh.n_points, 2) True