示例#1
0
 def test_download_torso():
     data = examples.download_torso()
     assert data.n_cells
示例#2
0
"""
Torso
-----

Repair the torso mesh where it was extracted and subtle holes along complex
parts of the mesh
"""

# sphinx_gallery_thumbnail_number = 2
import pyvista as pv
import pymeshfix as mf
from pyvista import examples


mesh = examples.download_torso()
print(mesh)

################################################################################

cpos = [(-1053., -1251., 83.),
        (2., -15., -276.),
        (0.12, 0.18, 1)]

mesh.plot(color=True, show_edges=True, cpos=cpos)

################################################################################
# Appy a triangle filter to ensure the mesh is simply polyhedral
meshfix = mf.MeshFix(mesh.triangulate())
holes = meshfix.extract_holes()

################################################################################