SpaceBall/SpaceMouse Devices
Supported SpaceBall or SpaceMouse devices.
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.
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, and so on). |
View 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 |
---|---|
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. |
Store the current view | Press and hold the SpaceMouse button for two or more seconds. |
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. |
Custom Button Handler
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.
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. |
Example
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;