Mayavi crashes when applying data_set_clip to points3d.
- Dominant language
- Python
- Stars
- 1.4k
- Forks
- 316
- Avg merge
- 7h 44m
- Merged PRs (30d)
- 5
Description
Dear mayavi users,
I would like to use `data_set_clip` in order to remove everything outside a bounding box after `mlab.points3d` plot.
I have tried, this example, based on `test_points3d`
```python
t = np.linspace(0, 1, 5)
x = np.cos(t)
y = np.sin(t)
z = t
s = mlab.points3d(x, y, z)
clip = mlab.pipeline.data_set_clipper(s)
mlab.show()
```
mayavi crashes and I get:
> 2020-11-12 10:16:11.218 ( 1,426s) [ A0CF5700] vtkPolyData.cxx:961 ERR| vtkPolyData (0x562c090b1340): Error while constructing cell map: Invalid cell size for polys.
I get the same message if the `data_set_clipper` is added from the gui.
All tried examples from mlab.test_* run without problem. Have you an idea on where I am wrong ?
Have you an idea of workaround to interactively hide points ?
It seems to be linked to `points3d`, since
```python
x, y = np.meshgrid(np.linspace(0,1, 20),
np.linspace(0,1, 20))
z = x*x + y*y
s = mlab.mesh(x, y, z)
clip = mlab.pipeline.data_set_clipper(s)
```
draw the clip box without error (to have a fully functional clipper, it requires `add_filter` methods and to play with the surfaces visibilities).
I have a fresh mayavi install from conda
mayavi 4.7.2,
vtk 9.0.1
python 3.9.4,
ubuntu 20.04
Thanks,
Benoit
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.