Class ConstructAction.BRepObjectInput
- Namespace
- CADability.Actions
- Assembly
- CADability.dll
Input object for the ConstructAction that lets the user pick a BRep object with the mouse: a Face, an Edge, a Vertex (when the mouse snaps to the start or end point of an edge) or an axis (a Line carrying the user data "CADability.AxisOf"). The objects under the cursor are offered to the MouseOverBRepObjectsEvent, whose handler decides whether to accept them. Used by the parametric actions, e.g. to specify the object up to which a distance is measured. See SetInput(params object[]).
public class ConstructAction.BRepObjectInput : ConstructAction.InputObject
- Inheritance
-
ConstructAction.BRepObjectInput
- Inherited Members
Constructors
BRepObjectInput(string)
Creates a BRepObjectInput object.
public BRepObjectInput(string resourceId)
Parameters
resourceIdstringthe 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
MultipleInput
If true, the input is not fixed by an accepted click, so the user can go on picking further objects (the MouseOverBRepObjectsEvent 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
currentMousePoint
The mouse position (in pixels of the view) of the last mouse event this input processed. Internal state that a MouseOverBRepObjectsEvent handler may use to pick additional objects at that position.
public Point currentMousePoint
Field Value
Properties
FailCursor
Sets the cursor that will be displayed when no curve is hit
public string FailCursor { set; }
Property Value
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
HitCursor
Sets the cursor that will be displayed when a curve is hit
public string HitCursor { set; }
Property Value
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()
GetBRepObjects()
Gets the currently selected brep objects.
public object[] GetBRepObjects()
Returns
- object[]
SetBRepObject(object[], object)
Forces the given geoObjects to be displayed
public void SetBRepObject(object[] objects, object selectedBRepObject)
Parameters
objectsobject[]array of BRep objects (faces, edges or vertices)
selectedBRepObjectobjectcurrently selected BRep object
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
errorMessagestringThe text to display, or an empty string to clear the error
SetSelectedBRepObject(object)
Set the selected GeoObject
public void SetSelectedBRepObject(object bRepObject)
Parameters
bRepObjectobjectthis BRep object should be selected
Events
BRepObjectSelectionChangedEvent
Provide a method here to react on the user selecting a different curve
public event ConstructAction.BRepObjectInput.BRepObjectSelectionChangedDelegate BRepObjectSelectionChangedEvent
Event Type
MouseOverBRepObjectsEvent
Provide a method here to react on the user moving the cursor over GeoObjects.
public event ConstructAction.BRepObjectInput.MouseOverBRepObjectsDelegate MouseOverBRepObjectsEvent