You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using vtkOrientationMarkerWidget with trame, the orientation widget does not display properly or update.
I think vtkCameraOrientationWidget is similarly broken (it fails to display at all) but I haven't investigated fully.
To Reproduce
See the code below, which produces the following screenshot:
If I uncomment out the lines indicated (this doesn't make sense, just for debugging this), then I first get an interactive window, with the axes displaying properly. After closing this, the trame app appears in a browser window, looking like this:
So the axes look correct here, but they still don't move when you change the camera position with the mouse.
fromtrame.appimportget_serverfromtrame.ui.vuetifyimportSinglePageLayoutfromtrame.widgetsimportvtk, vuetifyfromvtkmodules.vtkFiltersSourcesimportvtkConeSourcefromvtkmodules.vtkRenderingCoreimport (
vtkActor,
vtkPolyDataMapper,
vtkRenderer,
vtkRenderWindow,
vtkRenderWindowInteractor,
)
# Required for interactor initializationfromvtkmodules.vtkInteractionStyleimportvtkInteractorStyleSwitch# noqa# Required for rendering initialization, not necessary for# local rendering, but doesn't hurt to include itimportvtkmodules.vtkRenderingOpenGL2# noqafromvtkmodules.vtkInteractionWidgetsimportvtkOrientationMarkerWidgetfromvtkmodules.vtkRenderingAnnotationimportvtkAxesActorrenderer=vtkRenderer()
renderWindow=vtkRenderWindow()
renderWindow.AddRenderer(renderer)
renderWindowInteractor=vtkRenderWindowInteractor()
renderWindowInteractor.SetRenderWindow(renderWindow)
renderWindowInteractor.GetInteractorStyle().SetCurrentStyleToTrackballCamera()
cone_source=vtkConeSource()
mapper=vtkPolyDataMapper()
mapper.SetInputConnection(cone_source.GetOutputPort())
actor=vtkActor()
actor.SetMapper(mapper)
renderer.AddActor(actor)
axes=vtkAxesActor()
widget=vtkOrientationMarkerWidget()
widget.SetOrientationMarker(axes)
widget.SetInteractor(renderWindowInteractor)
widget.SetViewport(0.0, 0.0, 0.4, 0.4)
widget.SetEnabled(1)
widget.InteractiveOn()
renderer.GetActiveCamera().Azimuth(50)
renderer.GetActiveCamera().Elevation(-30)
renderer.ResetCamera()
# Un-comment these to show a normal VTK app with desired behavior:# renderWindow.Render()# renderWindowInteractor.Start()server=get_server(client_type="vue2")
ctrl=server.controllerwithSinglePageLayout(server) aslayout:
layout.title.set_text("Hello trame")
withlayout.content:
withvuetify.VContainer(
fluid=True,
classes="pa-0 fill-height",
):
view=vtk.VtkLocalView(renderWindow)
if__name__=="__main__":
server.start()
Expected behavior
It should display an axes that moves when you move the camera around.
Screenshots
If applicable, add screenshots to help explain your problem (drag and drop the image).
Platform:
I have ticked only those that I have checked, but based on Chrome+Firefox on both Windows+Linux being affected and the symptoms, I expect all platforms/devices are affected.
Device:
Desktop
Mobile
OS:
Windows
MacOS
Linux
Android
iOS
Browsers Affected:
Chrome
Firefox
Microsoft Edge
Safari
Opera
Brave
IE 11
The text was updated successfully, but these errors were encountered:
True, it is listed on the API but not explained. Also, not all the widgets are supported.
It is an advanced feature that still needs to mature to be really considered mainstream.
Describe the bug
Using vtkOrientationMarkerWidget with trame, the orientation widget does not display properly or update.
I think vtkCameraOrientationWidget is similarly broken (it fails to display at all) but I haven't investigated fully.
To Reproduce
See the code below, which produces the following screenshot:
If I uncomment out the lines indicated (this doesn't make sense, just for debugging this), then I first get an interactive window, with the axes displaying properly. After closing this, the trame app appears in a browser window, looking like this:
So the axes look correct here, but they still don't move when you change the camera position with the mouse.
Code
The code here is based on a minimal trame app (from https://github.com/Kitware/trame-tutorial/blob/master/01_vtk/solution_cone.py ) combined with https://examples.vtk.org/site/Python/Visualization/DisplayCoordinateAxes/
Expected behavior
It should display an axes that moves when you move the camera around.
Screenshots
If applicable, add screenshots to help explain your problem (drag and drop the image).
Platform:
I have ticked only those that I have checked, but based on Chrome+Firefox on both Windows+Linux being affected and the symptoms, I expect all platforms/devices are affected.
Device:
OS:
Browsers Affected:
The text was updated successfully, but these errors were encountered: