.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/00-basic-pyvista-examples/clipping_plane.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_examples_00-basic-pyvista-examples_clipping_plane.py: .. _ref_clipping_plane: ==================== Use a clipping plane ==================== This example shows how to use a clipping plane in the Visualization Interface Tool to cut a mesh. .. GENERATED FROM PYTHON SOURCE LINES 32-39 .. code-block:: Python import pyvista as pv from ansys.tools.visualization_interface import ClipPlane, Plotter mesh = pv.Cylinder() .. GENERATED FROM PYTHON SOURCE LINES 40-42 Create a plotter and clip the mesh ================================== .. GENERATED FROM PYTHON SOURCE LINES 42-50 .. code-block:: Python pl = Plotter() # Create a clipping plane clipping_plane = ClipPlane(normal=(1, 0, 0), origin=(0, 0, 0)) # Add the mesh to the plotter with the clipping plane pl.plot(mesh, clipping_plane=clipping_plane) pl.show() .. tab-set:: .. tab-item:: Static Scene .. image-sg:: /examples/00-basic-pyvista-examples/images/sphx_glr_clipping_plane_001.png :alt: clipping plane :srcset: /examples/00-basic-pyvista-examples/images/sphx_glr_clipping_plane_001.png :class: sphx-glr-single-img .. tab-item:: Interactive Scene .. offlineviewer:: /home/runner/work/ansys-tools-visualization-interface/ansys-tools-visualization-interface/doc/source/examples/00-basic-pyvista-examples/images/sphx_glr_clipping_plane_001.vtksz .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 1.212 seconds) .. _sphx_glr_download_examples_00-basic-pyvista-examples_clipping_plane.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: clipping_plane.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: clipping_plane.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: clipping_plane.zip `