We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4274e45 commit ed71bd0Copy full SHA for ed71bd0
gemgis/visualization.py
@@ -505,8 +505,15 @@ def create_mesh_from_cross_section(linestring: shapely.geometry.linestring.LineS
505
# Creating PyVista PolyData
506
surface = pv.PolyData(vertices, faces)
507
508
- # Generating Tcoords
509
- surface.t_coords = uv
+ # Set texture coordinates on PyVista mesh. This has been renamed a few times
+ # Reference https://github.com/pyvista/pyvista/issues/5209
510
+ try:
511
+ if pv._version.version_info < (0, 43):
512
+ surface.active_t_coords = uv
513
+ else:
514
+ surface.active_texture_coordinates = uv
515
+ except AttributeError:
516
+ raise ImportError("Please make sure you are using a compatible version of PyVista")
517
518
return surface
519
0 commit comments