Table of Contents

Class ConstructAction.GeoObjectInput

Namespace
CADability.Actions
Assembly
CADability.dll

Defines an input object for an action derived from ConstructAction. This input object extpects the user to click on a curve (IGeoObject that also implements ICurve. Pressing enter or TAB or clicking the mouse proceeds to the next input object.

public class ConstructAction.GeoObjectInput : ConstructAction.InputObject
Inheritance
ConstructAction.GeoObjectInput
Inherited Members

Constructors

GeoObjectInput(string)

Creates a GeoObjectInput object.

public GeoObjectInput(string resourceId)

Parameters

resourceId string

the resource id to specify a string from the StringTable. ResourceId+".Label": the Label left of the edit box. ResourceId+".ShortInfo": a short tooltip text ResourceId+"DetailedInfo": a longer tooltip text.

Fields

EdgesOnly

If true, only edges of faces, shells and solids are picked (singleEdge), e.g. for a fillet. May be combined with FacesOnly. Default: false.

public bool EdgesOnly

Field Value

bool

FacesOnly

If true, only faces are picked (singleFace). May be combined with EdgesOnly. Default: false.

public bool FacesOnly

Field Value

bool

ModifiableOnly

true: only curves that may be modified are yielded false: any kind of curves curves are yielded

public bool ModifiableOnly

Field Value

bool

MultipleInput

If true, the input is not fixed by an accepted click, so the user can go on picking further objects (the MouseOverGeoObjectsEvent handler collects them) until the action is finished explicitly. If false (the default), the first accepted click fixes the input and the action proceeds to the next one.

public bool MultipleInput

Field Value

bool

Points

If true and the mouse snaps to a point, that snap point is offered to the MouseOverGeoObjectsEvent as an additional Point object, so that the user can also pick a point, e.g. a vertex. Default: false.

public bool Points

Field Value

bool

currentMousePoint

The mouse position (in pixels of the view) of the last mouse event this input processed. Internal state that a MouseOverGeoObjectsEvent handler may use to pick additional objects at that position.

public Point currentMousePoint

Field Value

Point

Properties

Decomposed

true: only decomposed curves are yielded, false: also path objects, that consist of several subcurves are yielded

public bool Decomposed { get; set; }

Property Value

bool

FailCursor

Sets the cursor that will be displayed when no curve is hit

public string FailCursor { set; }

Property Value

string

ForwardMouseInputTo

Mouse input should be forwarded to another input object and only processed by this input, when the other input object is fixed.

public object ForwardMouseInputTo { get; set; }

Property Value

object

HitCursor

Sets the cursor that will be displayed when a curve is hit

public string HitCursor { set; }

Property Value

string

Methods

AdjustHighlight()

Called whenever ReadOnly, Optional or Fixed changes, so that the input can update the highlight of its entry in the property page: an input is highlighted while it still expects a value, i.e. while it is neither optional, fixed nor read-only. The default implementation does nothing; the concrete input objects override it.

protected override void AdjustHighlight()

GetGeoObjects()

Gets the currently selected curves.

public IGeoObject[] GetGeoObjects()

Returns

IGeoObject[]

SetError(string)

Shows errorMessage as an error on the entry of this input in the property page, e.g. when the value entered by the user is not acceptable for the action. The default implementation does nothing; inputs with an edit field forward the message to their property entry, inputs without one ignore it.

public override void SetError(string errorMessage)

Parameters

errorMessage string

The text to display, or an empty string to clear the error

SetGeoObject(IGeoObject[], IGeoObject)

Forces the given geoObjects to be displayed

public void SetGeoObject(IGeoObject[] GeoObjects, IGeoObject selectedGeoObject)

Parameters

GeoObjects IGeoObject[]

array of GeoObjects

selectedGeoObject IGeoObject

currently selected GeoObject

SetSelectedGeoObject(IGeoObject)

Set the selected GeoObject

public void SetSelectedGeoObject(IGeoObject geoObject)

Parameters

geoObject IGeoObject

this GeoObject should be selected

Events

GeoObjectSelectionChangedEvent

Provide a method here to react on the user selecting a different curve

public event ConstructAction.GeoObjectInput.GeoObjectSelectionChangedDelegate GeoObjectSelectionChangedEvent

Event Type

ConstructAction.GeoObjectInput.GeoObjectSelectionChangedDelegate

MouseOverGeoObjectsEvent

Provide a method here to react on the user moving the cursor over GeoObjects.

public event ConstructAction.GeoObjectInput.MouseOverGeoObjectsDelegate MouseOverGeoObjectsEvent

Event Type

ConstructAction.GeoObjectInput.MouseOverGeoObjectsDelegate