3dConnexion (TDx) support in VTK on Windows?

Hi,

We are very interested in using 3DConnexion’s 3d mice in our software. I was excited to find that it was supported in vtk. However, looking at the build files, it seems perhaps it is not supported on windows. Setting VTK_USE_TDX at the cmake level does not result in the corresponding compiler flag getting set.

vtkTDxConfigure.h ends up looking like this (note the last line):

/*=========================================================================

Program: Visualization Toolkit
Module: vtkTDxConfigure.h.in

Copyright © Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.

 This software is distributed WITHOUT ANY WARRANTY; without even
 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
 PURPOSE.  See the above copyright notice for more information.

=========================================================================*/

/* The TDx support has not been ported, this header defines nothing. */

We are using OpenGL2. We see the following in CmakeLists.txt for Rendering/OpenGL2:

The TDx support has not been moved, this header is here to define nothing,

and so allow classes in other modules to safely include it and keep going.

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/vtkTDxConfigure.h.in

${CMAKE_CURRENT_BINARY_DIR}/vtkTDxConfigure.h)

as opposed to the file in Rendering/OpenGL, which presumably defines a value:

FIXME: The TDx support needs some refactoring before we can build it in a

modular fashion, for now it must remain an option on vtkRenderingOpenGL.

option(VTK_USE_TDX “Use TDx interaction devices” OFF)

mark_as_advanced(VTK_USE_TDX)

if (TDX_INCLUDE_DIR)

include_directories(${TDX_INCLUDE_DIR})

endif()

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/vtkTDxConfigure.h.in

${CMAKE_CURRENT_BINARY_DIR}/vtkTDxConfigure.h)

This page implies that it is supported:
https://vtk.org/Wiki/VTK/3DConnexion_Devices_Support

Can anyone shed some light on this?

thanks-

Geoff

Hi, if anyone cares to know: there is an old merge request for this feature: https://gitlab.kitware.com/vtk/vtk/merge_requests/2830/diffs#dbdfcf8839c6387381ba28f154f93c013e4daf13

I applied the diff, with some minor changes, to vtk8.1 and was able to get the mouse interaction basically working.

Great, feel free to take over the MR and open a new one so it gets integrated into VTK.

That would be fun. I will see what I can do. But wouldn’t it be better to wait and do it in 8.2? (We are having trouble upgrading to 8.2 due to Qt issues, which I outlined in another post…)

The default behavior of the TDxCameraInteractor seems odd and not at all like how the mouse works in, for example, solidworks. I am going to have a stab at that as well…

Well, you should port the change to master.

If any one is interested, I am working on an MR for this feature…

https://gitlab.kitware.com/vtk/vtk/-/merge_requests/7262#diff-content-353c5d1a687d427a3692993df6848a65dce51dae