SoDiagram2DCursor¶
- InventorModule¶
genre
author
package
dll
definition
see also
inherits from
keywords
Purpose¶
The module SoDiagram2DCursor draws a cursor with additional information into a diagram.
Windows¶
Default Panel¶
Output Fields¶
self¶
- name: self, type: SoNode¶
Parameter Fields¶
Field Index¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 Toleranceand theSnap 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 diagramwill reflect whether the user hit the valid diagram region.The flag
Position Validshould be used if the cursor’s position is set via the fieldsXandYto 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 precisionis 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 |
Nearest Curve Point |
SNAP_TO_NEAREST_CURVE_POINT |
Snaps to the nearest curve point. The nearest curve needs to be within the |
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.