You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
defreduceMesh(mymesh, reductionFactor):
"""Reduce the number of triangles in a mesh using VTK's QuadricDecimation filter."""try:
t=time.perf_counter()
deci=vtk.vtkQuadricDecimation()
deci.SetTargetReduction(reductionFactor)
ifvtk.vtkVersion.GetVTKMajorVersion() >=6:
deci.SetInputData(mymesh)
else:
deci.SetInput(mymesh)
deci.Update()
# ......
I checked the official documentation, in the given example it uses vtk.vtkDecimatePro() instead of vtk.vtkQuadricDecimation(), and this fixes the problem.
My environment:
OS: Windows 10
CPU: AMD
VTK: 9.0.2 installed via pip
Python: 3.8.3
The text was updated successfully, but these errors were encountered:
Interesting. I never had any problem with the quadric decimation filter. It probably depends on the particular data set. I could make it an option, which algorithm to use.
I always preferred the quadric decimation because I though it was a cool algorithm, and my friend wrote the VTK class.
The program stuck at line 174 in
vtkutils.py
:I checked the official documentation, in the given example it uses
vtk.vtkDecimatePro()
instead ofvtk.vtkQuadricDecimation()
, and this fixes the problem.My environment:
The text was updated successfully, but these errors were encountered: