marcomusy / vedo

A python module for scientific analysis of 3D data based on VTK and Numpy
https://vedo.embl.es
MIT License
2.05k stars 266 forks source link

DistanceTool Not Working #1158

Closed bazorb closed 4 months ago

bazorb commented 4 months ago

I'm trying to integrate the DistanceTool into my Vedo project and I found that it isn't working. I'm using the example given in the documentation

from vedo import *
mesh = ParametricShape("RandomHills").c("red5")
plt = Plotter(axes=1)
dtool = DistanceTool()
dtool.on()
plt.show(mesh, dtool)
dtool.off()

The trackback points to this as the error:

\vedo\assembly.py", line 139, in __iadd__
    self.AddPart(a)
TypeError: AddPart argument %Id: %V

I'm using the most current version of Vedo from pypi (2024.5.2) and Python 3.8.19.

Any suggestions?

marcomusy commented 4 months ago

Thanks for reporting the issue, I just pushed a fix for it in the dev version:

pip install -U git+https://github.com/marcomusy/vedo.git
bazorb commented 4 months ago

This update has fixed the issue! Thank you for your help.