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

Field Index

allNearestCurveIndices: String

isEditingEnabled: Bool

Series: Integer

Allowed Curve Indices: String

Line Width: Float

Show coordinate: Bool

Auto precision: Bool

Nearest Curve: Integer

Show units: Bool

calculateNearestCurvePoints: Bool

Nearest Curve Point: Vector2

showCoordinateColor: Color

Color: Color

Nearest Point: Integer

showCoordinateFontSize: Integer

Coordinate Mode: Enum

Opacity: Float

showCoordinateOffset: Integer

Cursor inside diagram: Bool

Position Valid: Bool

showCoordinateShadow: Bool

Cursor Size [px]: Double

Precision Digits: Integer

Snap Mode: Enum

cursorShape: Enum

Prefix X: String

X: Double

Draw only if near curve: Bool

Prefix Y: String

X Unit: String

Draw Style: Enum

reset: Trigger

Y: Double

Drawing enabled: Bool

secondNearestCurvePointIndex: Integer

Y Unit: String

interactionProviderID: String

Selection Tolerance: Double

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

Sets and shows the cursor position in x-direction relative to the diagram.

Y

name: yPos, type: Double, default: 0

Sets and shows the cursor position in y-direction relative to the diagram.

Position Valid

name: positionValid, type: Bool, default: FALSE

Sets and shows 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. This 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 pixels. 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

Defines 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

Defines 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

When pressed, the nearest curve state is reset and the cursor is hidden.