Skip to content

About the BlenderStyle #904

Answered by marcomusy
ZiguoAtGitHub asked this question in Q&A
Jul 23, 2023 · 4 comments · 9 replies
Discussion options

You must be logged in to vote

This seems to go in the right direction:

from vedo import *
import vtk

settings.enable_default_mouse_callbacks = False
# settings.use_parallel_projection = True


def mode_select(objs):

    d0 = mode.start_x, mode.start_y
    d1 = mode.end_x, mode.end_y
    
    area_picker = vtk.vtkAreaPicker()
    area_picker.AreaPick(*d0, *d1, plt.renderer)
    planes = area_picker.GetFrustum()

    fru = vtk.vtkFrustumSource()
    fru.SetPlanes(planes)
    fru.ShowLinesOff()
    fru.Update()

    afru = Mesh(fru.GetOutput())
    afru.alpha(0.2).lw(1).pickable(False)

    infru = afru.inside_points(mesh)
    infru.ps(10).c('purple7')

    p0 = plt.compute_world_coordinate(d0)
    p1 = plt.compute_wor…

Replies: 4 comments 9 replies

Comment options

You must be logged in to vote
3 replies
@RubendeBruin
Comment options

@ZiguoAtGitHub
Comment options

@ZiguoAtGitHub
Comment options

Comment options

You must be logged in to vote
6 replies
@ZiguoAtGitHub
Comment options

@marcomusy
Comment options

Answer selected by ZiguoAtGitHub
@ZiguoAtGitHub
Comment options

@marcomusy
Comment options

@ZiguoAtGitHub
Comment options

@ZiguoAtGitHub
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants