About the BlenderStyle #904
-
Hi Marco, |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 9 replies
-
Honestly I don't know the answer to that! @RubendeBruin |
Beta Was this translation helpful? Give feedback.
-
Hi @ZiguoAtGitHub , at the moment the interactor uses the PickProp() method of the vtk renderer. This only returns "props" (actors). https://vtk.org/doc/nightly/html/classvtkRenderer.html#ae7fce027da043f2c5ebf4fb0ebb8da15 A quick-fix could be adding small cubes at all the vertices. Then those will be returned as selection. But will not be quick for large models. |
Beta Was this translation helpful? Give feedback.
-
Hi @ZiguoAtGitHub sorry for the late reply i was on holiday :)
try from vedo import *
settings.enable_default_mouse_callbacks = False
def LButtonPress(evt):
print("LButtonPress")
plt.start_x, plt.start_y = evt.picked2d
plt.render()
def LButtonUp(evt):
print("LButtonUp")
plt.end_x, plt.end_y = evt.picked2d
d0 = np.array([plt.start_x, plt.start_y])
d1 = evt.picked2d
if mag(d0-d1) > 100:
frustum = plt.pick_area(d0, d1)
infru = frustum.inside_points(mesh).ps(10).c("purple7")
plt.add(frustum, infru)
plt.render()
mesh = Mesh(dataurl + "cow.vtk").lw(1)
plt = Plotter()
plt.start_x, plt.start_y = 0.0, 0.0
plt.add_callback("left button press", LButtonPress)
plt.add_callback("left button release", LButtonUp)
plt.show(mesh, axes=1, mode=6) |
Beta Was this translation helpful? Give feedback.
-
Hi @marcomusy |
Beta Was this translation helpful? Give feedback.
This seems to go in the right direction: