K3D-tools / K3D-jupyter

K3D lets you create 3D plots backed by WebGL with high-level API (surfaces, isosurfaces, voxels, mesh, cloud points, vtk objects, volume renderer, colormaps, etc). The primary aim of K3D-jupyter is to be easy for use as stand alone package like matplotlib, but also to allow interoperation with existing libraries as VTK.
MIT License
942 stars 123 forks source link

Programmatically set clipping planes via constructor #288

Closed Davide-sd closed 3 years ago

Davide-sd commented 3 years ago

Previously, the only way to add clipping planes was with the GUI. If we tried to do that programmatically, the update wouldn't take place.

Thanks to this commit, it is possible to set them programmatically, for example:

plot.clipping_planes = [[1, 0, 0, 0]]
artur-trzesiok commented 3 years ago

Hm.. The description is not 100% true. Thanks to this comment it is possible to set clipping planes via plot constructor. Still it worth to have it :)

Davide-sd commented 3 years ago

Thanks to this comment it is possible to set clipping planes via plot constructor.

Probably on the JS side, not in the Python side.