SoCSOSplineEditor

InventorModule
author Olaf Konrad
package MeVisLab/Standard
dll SoCSO
definition SoCSO.def
see also SoView2DCSOExtensibleEditor, SoCSOVisualizationSettings

Purpose

The module SoCSOSplineEditor renders and interactively generates CSOs that consist of a closed or open spline.

Usage

Read the documentation of the SoView2DCSOExtensibleEditor on how to attach and parametrize editor modules.

Interaction

Click to set consecutive seed points. Either place the last seed point in the vicinity of the first seed point to close, or double click to finish.

This is the default behavior. The reaction to a double-click can be changed with the field Double Click Mode.

Windows

Main

../../../Modules/Inventor/SoCSO/mhelp/Images/Screenshots/SoCSOSplineEditor.Main.png

Defaults

../../../Modules/Inventor/SoCSO/mhelp/Images/Screenshots/SoCSOSplineEditor.Defaults.png

Input Fields

inVisualizationSettings

name: inVisualizationSettings, type: MLBase

Attach a SoCSOVisualizationSettings module to overwrite the visual settings of CSOs.

Output Fields

self

name: self, type: SoNode

Parameter Fields

Visible Fields

Extension Id

name: extensionId, type: String, default: spline

Sets an id string that is used to synchronize editors and to decide the currently active editor for creation.

Read the documentation of the SoView2DCSOExtensibleEditor for more information.

Allow Creation

name: allowCreation, type: Bool, default: TRUE

If checked, this module is allowed to create a new CSO.

Allow Modification

name: allowModification, type: Bool, default: TRUE

If checked, existing CSOs of the type of this editor can be modified.

Should Render

name: shouldRender, type: Bool, default: TRUE

If checked, this editor renders CSOs that were created by this editor.

Require mouse move to create CSO

name: requirePointerPositionMovementToCreateCSO, type: Bool, default: FALSE

If checked, a new CSO is only created if the mouse is dragged more than Device Epsilon pixels.

Otherwise, no CSO is generate on releasing the mouse. Use this option to prevent points or otherwise too short CSOs.

Device Epsilon

name: pointerPositionEpsilonForCreatingCSO, type: Integer, default: 1

Sets a minimum movement epsilon in pixel before a new CSO is created on dragging the mouse.

Should Empty Group Before Generating

name: shouldEmptyGroupBeforeGenerating, type: Bool, default: TRUE

If checked, a target CSOGroup is emptied before adding a newly created CSO into it.

This option depends on the Add to group mode.

Add to group mode

name: addCSOToGroupMode, type: Enum, default: GROUP_NONE

Defines whether and how a newly created CSO is added to a CSOGroup.

Values:

Title Name Description
None GROUP_NONE A newly created CSO is not added to any group.
By Label GROUP_BY_LABEL

A newly created CSO is added to a group given by a string label defined in Label.

If no group with this label existed before, it is created on demand.

By Id GROUP_BY_ID

A newly created CSO is added to a group given by an integer id defined in Id.

If no group with this id existed before, the newly created CSO is not added to a group.

Label

name: addCSOToGroupLabel, type: String

Sets a label for a group that should be associated with a newly created CSO.

Id

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

Sets an id for a group that should be associated with a newly created CSO.

Style (defaultPathPointStyle)

name: defaultPathPointStyle, type: Enum, default: PATH_POINTS_STYLE_SOLID

Defines a default line style for a newly created CSO.

Values:

Title Name Description
None PATH_POINTS_STYLE_NONE Path points are invisible.
Solid PATH_POINTS_STYLE_SOLID Path points are rendered as a solid line.
Dashed PATH_POINTS_STYLE_DASHED Path points are rendered as a dashed line.
Dotted PATH_POINTS_STYLE_DOTTED Path points are rendered as a dotted line.
Short Dashed PATH_POINTS_STYLE_SHORT_DASHED Path points are rendered as a short dashed line.

Width

name: defaultPathPointWidth, type: Float, default: 1, minimum: 0, maximum: 8

Sets a default line width for newly created CSOs.

Color (defaultPathPointColor)

name: defaultPathPointColor, type: Color, default: 1 1 1

Sets a default line color for newly created CSOs.

Alpha (defaultPathPointAlpha)

name: defaultPathPointAlpha, type: Float, default: 1, minimum: 0, maximum: 1

Sets a default line alpha value for newly created CSOs.

Style (defaultSeedPointStyle)

name: defaultSeedPointStyle, type: Enum, default: SEED_POINT_STYLE_RECTANGLE

Defines a default seed point style for newly created CSOs.

Values:

Title Name Description
None SEED_POINT_STYLE_NONE Seed point are invisible.
Rectangle SEED_POINT_STYLE_RECTANGLE Seed point are rendered as rectangles.
Circle SEED_POINT_STYLE_CIRCLE Seed points are rendered as circles.
Fixed Size Circle SEED_POINT_STYLE_FIXED_SIZE_CIRCLE Seed points are rendered as filled circles with a fixed size.

Size

name: defaultSeedPointSize, type: Float, default: 3, minimum: 0, maximum: 8

Sets the default size for seed points for newly created CSOs.

Color (defaultSeedPointColor)

name: defaultSeedPointColor, type: Color, default: 1 1 1

Sets the default color for seed points for newly created CSOs.

Alpha (defaultSeedPointAlpha)

name: defaultSeedPointAlpha, type: Float, default: 1, minimum: 0, maximum: 1

Sets the default alpha value for seed points for newly created CSOs.

Mode

name: defaultVoxelWriteMode, type: Enum, default: VOXEL_VALUE_MODULE

Defines the default voxel write mode for newly created CSOs.

Values:

Title Name Description
Id VOXEL_VALUE_ID The CSO id is used as a voxel write value.
Const VOXEL_VALUE_CONST

A constant value is used as a voxel write value.

This constant value is set by Value.

Const Plus Id VOXEL_VALUE_CONST_PLUS_ID The CSO id added to the constant value is used as a voxel write value.
Module VOXEL_VALUE_MODULE The voxelizing module sets the voxel write value.

Value

name: defaultVoxelWriteValue, type: Float, default: 1024

Sets a constant value that is used as voxel write value or an offset of that.

Generate Seed Points While Dragging

name: generateSeedPointsWhileDragging, type: Bool, default: FALSE

If checked, seed points are added while dragging the mouse.

Insert Seed Point By Clicking On Path Point List

name: insertSeedPointByClickingOnPathPointList, type: Bool, default: TRUE

If checked, a new seed point is inserted if clicked onto a path point list.

Otherwise, the CSO is selected and can be moved on the slice.

Use Freehand Mode

name: useFreehandMode, type: Bool, default: FALSE

If checked, the CSO is generated only while dragging the mouse and is finished on releasing the mouse button.

Double Click Mode

name: doubleClickMode, type: Enum, default: CSO_SPLINE_EDITOR_DOUBLE_CLICK_FINISH

Defines how the module reacts on a double-click.

This field is only available if the module is not in freehand mode (Use Freehand Mode).

Values:

Title Name Description
Set Single Seed CSO_SPLINE_EDITOR_DOUBLE_CLICK_SET_SINGLE_SEED The module sets a single seed point, just like on a single-click.
Set Double Seeds CSO_SPLINE_EDITOR_DOUBLE_CLICK_SET_DOUBLE_SEEDS The module sets two seed points on top of each other. This enables to create a CSO with steep angles.
Finish CSO_SPLINE_EDITOR_DOUBLE_CLICK_FINISH The currently generated CSO is finished and left open.
Close CSO_SPLINE_EDITOR_DOUBLE_CLICK_CLOSE The currently generated CSO is finished and closed.

Hidden Fields

allowSeedPointInteraction

name: allowSeedPointInteraction, type: Bool, default: TRUE

If checked, a seed point can interactively be moved.

Otherwise, the whole CSO is moved.

moduleCreatorId

name: moduleCreatorId, type: Integer, default: 0

Sets a creator id. This id is stored in the CSO as a user data.

moduleCreatorString

name: moduleCreatorString, type: String, default: SoCSOSplineEditor

Sets a module creator string. This string is stored in the CSO as a user data.

labelPrefixString

name: labelPrefixString, type: String, default: CSO

Sets a label prefix string. This string is stored in the CSO as a user data.