Skip to content

Commit 825315f

Browse files
committed
fix: pyvista read-only behaviour
1 parent 2ef8c77 commit 825315f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/ansys/tools/visualization_interface/backends/pyvista/pyvista_interface.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,11 @@ def clip(
180180
Clipped mesh.
181181
182182
"""
183-
return mesh.clip(normal=plane.normal, origin=plane.origin)
183+
# Make sure to pass new copies/objects to the mesh for the normal
184+
# This should be fixed by PyVista eventually... it is coming from
185+
# https://github.com/RobPasMue/pyvista/commit/2db1888a294a14e4f28a140d8aa0466d332912dc
186+
return mesh.clip(normal=[elem for elem in plane.normal],
187+
origin=plane.origin)
184188

185189
def plot_meshobject(self, custom_object: MeshObjectPlot, **plotting_options):
186190
"""Plot a generic ``MeshObjectPlot`` object to the scene.

0 commit comments

Comments
 (0)