pyvista / pymeshfix

Python Wrapper for MeshFix: easily repair holes in surface meshes
http://pymeshfix.pyvista.org
GNU General Public License v3.0
279 stars 29 forks source link

Cannot plot using MeshFix plot #53

Open arpit196 opened 1 year ago

arpit196 commented 1 year ago

Hi, I am using pymeshfix to detect self intersecting triangles and holes. I am using pyvista to load the file and using meshfix plot() function to visualize the mesh.

import pyvista reader = pyvista.get_reader('Error_Cylinder.stl') meshfix = pymeshfix.MeshFix(mesh) meshfix.plot()

However I am getting the following error: AttributeError: 'MeshFix' object has no attribute 'f'

at File ~\source\Anaconda\envs\3dEnv\lib\site-packages\pymeshfix\meshfix.py:117, in MeshFix.mesh(self) 115 if not PV_INSTALLED: 116 raise RuntimeError('Please install pyvista for this feature') 117 triangles = np.empty((self.f.shape[0], 4), dtype=pv.ID_TYPE)

Can someone help with this issue?

banesullivan commented 1 year ago

This code is incomplete. What is the mesh object/how did you generate it? There is missing code. Further, it would be a great help to include the STL file you are loading