SoDiagram2DCursor

InventorModule
genre Diagram
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll SoDiagram2D
definition SoDiagram2D.def
see also SoDiagram2D
inherits from SoDiagram2DInteractionExtension
keywords select, highlight

Purpose

The module SoDiagram2DCursor draws a cursor with additional information into a diagram.

Windows

Default Panel

../../../Modules/Inventor/SoDiagram2D/mhelp/Images/Screenshots/SoDiagram2DCursor._default.png

Output Fields

self

name: self, type: SoNode

Parameter Fields

Visible Fields

Drawing enabled

name: isEnabled, type: Bool, default: TRUE

If checked, the module reacts to mouse clicks and draws a cursor, depending on the Selection Tolerance and the Snap Mode.

see also SoDiagram2DExtension.isEnabled

X

name: xPos, type: Double, default: 0

Shows/sets the cursor position in x-direction relative to the diagram.

Y

name: yPos, type: Double, default: 0

Shows/sets the cursor position in y-direction relative to the diagram.

Position Valid

name: positionValid, type: Bool, default: FALSE

Shows/sets whether the manually entered position is valid or should be considered.

When the user interact with the viewer and clicks into the valid diagram region, this flag will be set to TRUE; if the user clicks outside the diagram, this flag will not change. The field Cursor inside diagram will reflect whether the user hit the valid diagram region.

The flag Position Valid should be used if the cursor’s position is set via the fields X and Y to indicate to the module whether the set position should be regarded.

Cursor inside diagram

name: cursorInsideDiagram, type: Bool, persistent: no

Shows whether the cursor is inside the diagram area. Is set by the module to indicate that the status fields are valid.

Color

name: cursorColor, type: Color, default: 0.660000026226044 1 0.5

Sets the color of the cursor.

Line Width

name: lineWidth, type: Float, default: 1

Sets the line width of the cursor.

Opacity

name: opacity, type: Float, default: 0.80000001, minimum: 0, maximum: 1

Sets the opacity value of the cursor.

Show coordinate

name: showCoordinate, type: Bool, default: FALSE

If checked, the current coordinate is shown at the cursor.

Auto precision

name: showCoordinatePrecisionAuto, type: Bool, default: TRUE

If checked, the precision of the displayed coordinates is set automatically.

Precision Digits

name: showCoordinatePrecisionDigits, type: Integer, default: 2

Sets the precision of the displayed coordinates if Auto precision is off.

Cursor Size [px]

name: cursorSize, type: Double, default: -1

Sets the size of the cursor in pixel. If set to -1, the cursor is as large as the diagram area.

Coordinate Mode

name: coordinateMode, type: Enum, default: BOTH

Defines with coordinate part is being displayed.

Values:

Title Name Description
X X Only the x-coordinate part is being displayed.
Y Y Only the y-coordinate part is being displayed.
Both BOTH Both, x and y coordinate parts are being displayed.

Show units

name: showUnits, type: Bool, default: FALSE

If checked, units are displayed for the cursor coordinates.

X Unit

name: unitX, type: String

Sets a unit string for the x-coordinate.

Y Unit

name: unitY, type: String

Sets a unit string for the y-coordinate.

Prefix X

name: prefixX, type: String

Sets a prefix to the x-coordinate part.

Prefix Y

name: prefixY, type: String

Sets a prefix to the y-coordinate part.

Nearest Curve

name: nearestCurveIndex, type: Integer, persistent: no

Shows the index of the curve nearest to the cursor.

Series

name: nearestSeriesIndex, type: Integer, persistent: no

Shows the series index of the curve nearest to the cursor.

Nearest Point

name: nearestCurvePointIndex, type: Integer, persistent: no

Shows the point index of the nearest point to the cursor.

Nearest Curve Point

name: nearestCurvePoint, type: Vector2, persistent: no

Shows the coordinates of the nearest point to the cursor.

Selection Tolerance

name: nearestCurvePointHitArea, type: Double, default: 0.01

Sets the selection tolerance.

Draw Style

name: drawMode, type: Enum, default: CROSS

Sets the draw style of the cursor.

Values:

Title Name
None NONE
Cross CROSS
Vertical VERTICAL
Horizontal HORIZONTAL

Snap Mode

name: snapMode, type: Enum, default: SNAP_TO_MOUSE_POSITION

Sets the snap mode for the cursor.

Values:

Title Name Description
Mouse Position SNAP_TO_MOUSE_POSITION The cursor position snaps to the mouse position. This is independent of all curves.
Rounded Mouse Position SNAP_TO_ROUNDED_MOUSE_POSITION The cursor position snaps to the mouse position and rounds that position to integer. This is independent of all curves.
Nearest Curve SNAP_TO_NEAREST_CURVE Snaps to the nearest curve. The nearest curve needs to be within the Selection Tolerance.
Nearest Curve Point SNAP_TO_NEAREST_CURVE_POINT Snaps to the nearest curve point. The nearest curve needs to be within the Selection Tolerance.

Draw only if near curve

name: drawOnlyIfCursorIsNearCurve, type: Bool, default: TRUE

If checked, the cursor is drawn only if it is near a curve.

Allowed Curve Indices

name: allowedCurveIndices, type: String

Sets a list of curve indices (separated by space); only the curves with the set indices are considered in the hit test. If left empty, all curves are allowed.

Hidden Fields

interactionProviderID

name: interactionProviderID, type: String

see SoDiagram2DExtension.interactionProviderID

isEditingEnabled

name: isEditingEnabled, type: Bool, default: TRUE

see SoDiagram2DExtension.isEditingEnabled

cursorShape

name: cursorShape, type: Enum, default: CROSS_CURSOR

see SoDiagram2DInteractionExtension.cursorShape

showCoordinateFontSize

name: showCoordinateFontSize, type: Integer, default: 10

Sets the font size of the coordinate text.

showCoordinateColor

name: showCoordinateColor, type: Color, default: 1 1 1

Sets the color of the coordinate text.

showCoordinateShadow

name: showCoordinateShadow, type: Bool, default: FALSE

If checked, a text shadow is displayed to enhance readability of the coordinate text.

showCoordinateOffset

name: showCoordinateOffset, type: Integer, default: 5

Sets the offset of the coordinate text.

calculateNearestCurvePoints

name: calculateNearestCurvePoints, type: Bool, default: FALSE

secondNearestCurvePointIndex

name: secondNearestCurvePointIndex, type: Integer, default: -1

allNearestCurveIndices

name: allNearestCurveIndices, type: String

reset

name: reset, type: Trigger

Resets nearest curve state and hides cursor.