HyperWorks Desktop

SpaceBall/SpaceMouse Devices

SpaceBall/SpaceMouse Devices

Previous topic Next topic Expand/collapse all hidden text  

SpaceBall/SpaceMouse Devices

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

HyperMesh, HyperView, HyperGraph 2D, HyperGraph 3D, and MotionView now support the following SpaceBall or SpaceMouse devices from 3Dconnexion:  SpaceNavigator, SpacePilot, SpaceExplorer, and SpaceTraveler.

Before running HyperWorks, be sure that current drivers are installed for your device.  HyperWorks will automatically detect and enable the use of the SpaceBall/SpaceMouse once the device is connected and working properly.

The 6 degrees-of-freedom input on the SpaceMouse devices require no special configuration prior to using it within HyperWorks, however the 3Dconnexion control panel may be used to adjust the sensitivity of the device, as well as how the axes respond to input.

Buttons on SpaceMouse devices are programmable, and some user customization is required in order to optimize the use of these buttons.  Each button can be programmed using the 3Dconnexion control panel to generate a keyboard key press event, a button event, or to change one of the 3Dconnexion control panel settings.  For example:  button 1 on the SpaceBall/SpaceMouse device can be programmed to generate the HyperView keyboard shortcut 'M' (to toggle the mesh line display), using the Custom Functions button on the 3Dconnexion control panel.

Note:  The HyperWorks applications listed above will respond best to 3Dconnexion buttons when they are configured to emit button events.

A sample configuration for the SpacePilot (on the Windows platform) is shown below:

3dconnexionproperties

3Dconnexion Control Panel - SpacePilot sample button configuration (on the Windows platform)

The following table summarizes how the HyperWorks applications will respond to button events from 3Dconnexion devices:

Button Event Number

Function

1

Top View

2

Left View

3

Right View

4

Front View

5

Fit View

6

ISO View

7-10

View Memory Buttons

11-16

User defined TCL callbacks

17-29

These buttons cannot be customized within HyperWorks applications because they are supported across various platforms (Windows, LINUX, etc.).

Note  On SpaceExplorer and SpacePilot devices, the T, L, R, F, and Fit buttons should be configured for button events 1, 2, 3, 4, and 5 respectively.

 

hmtoggle_plus1greyView Memory Buttons

The View Memory Buttons on the SpaceBall/SpaceMouse devices work similar to the M1, M2, and R1, R2 buttons on the View Controls dialog (located in the lower right corner of the HyperWorks panels).

Button

Description

To use the View Memory Buttons:

Map a button event between 7 and 10 to one of the physical buttons on the 3Dconnexion device.

These four button events are associated with stored views 1 - 4.

To store the current view:

Press and hold the SpaceMouse button for 2 or more seconds.

To recall a stored view:

Tap and release the SpaceMouse button.

Stored views 1 and 2 are tied to the same view registers as the M1/R1 and M2/R2 views.

 

hmtoggle_plus1greyCustom Button Event Handlers

SpaceMouse button events 11 - 16 are programmed to call user defined TCL callback handlers.  These allow you to customize the SpaceMouse functionality to meet your needs.

Three Session object methods are provided to allow programmability of 3Dconnexion buttons:

Button

Description

GetSpaceballButtonMin()

Returns the minimum button event ID that can be programmed with a TCL callback.

GetSpaceballButtonMax()

Returns the maximum button event ID that can be programmed with a TCL callback.

RegisterSpaceballCallback

(buttonID, procName)

Registers a TCL callback against the specified button event ID.  The callback procedure takes a state parameter, which is the state of the button at the time the event has occurred.

True - indicates the button was pressed.

False - indicates the button has been released.

 

hmtoggle_plus1greyExample

The following example demonstrates how to program button event 11 to toggle animation on and off.

 

proc ::FlipAnim { state } {

 

   # Only respond to button events, which occurs when state == "True"

   if {$state == "False"} {

      return;

   }

 

 

   hwi OpenStack;

   set t [lindex [split [expr rand()] .] end];

 

   catch {

       hwi GetSessionHandle sess$t;

       sess$t GetProjectHandle proj$t;

       proj$t GetPageHandle page$t [proj$t GetActivePage ];

 

       if {"false" == [page$t IsAnimating] } {

           page$t StartAnimation;

       } else {

           page$t StopAnimation;

       }

 

   }

   hwi CloseStack;

 

}

 

set t [lindex [split [expr rand()] .] end];

hwi GetSessionHandle sess$t

set buttonID [sess$t GetSpaceballButtonMin];

sess$t RegisterSpaceballCallback $buttonID ::FlipAnim;

sess$t ReleaseHandle;

 

 

 

 

 

See Also:

HyperMesh Mouse Graphic Controls