pyvista / pyvista-support

[moved] Please head over to the Discussions tab of the PyVista repository
https://github.com/pyvista/pyvista/discussions
59 stars 4 forks source link

Program broke when creating a mesh using pv.PolyData() #532

Closed zhengliuer closed 2 years ago

zhengliuer commented 2 years ago

Hi, I have the vertex and faces(the connection of the vertex) of a brain, both in np.array. Here is my code

def load_data():
    '''load the vertex and face'''
    ***
    return all_ver, all_face

import pyvista  as pv
plotter = pv.Plotter(window_size=(500, 300), notebook=False, line_smoothing=True)
mesh = pv.PolyData(all_ver, all_face)
plotter.add_mesh(mesh, cmap='Spectral', style='surface')

When running mesh = pv.PolyData(all_ver, all_face), the program broke, and it shows Process finished with exit code -1073741819 (0xC0000005). The OS is Win10 and the shape of all_ver is (318750, 3), and the shape of all_face is (637492, 3), using Python3.7.12

zhengliuer commented 2 years ago

Here are the data https://drive.google.com/file/d/1ojGT_DL_6kpjeeuz-djJiZYcr8crba7d/view?usp=sharing https://drive.google.com/file/d/1j6CdcHzsj-8CSnF1n_JGOhnPa_ZMpxiD/view?usp=sharing

zhengliuer commented 2 years ago

Solved. Forget to add the number of vertex in each connection

RichardScottOZ commented 2 years ago

Good! Close this one?

zhengliuer commented 2 years ago

Good! Close this one?

OK!