RhinoGet
Base class for GetObject, GetPoint, GetSphere, etc. You will never directly create a RhinoGet but you will use its member functions after calling GetObject::GetObjects(), GetPoint::GetPoint(), and so on. Provides tools to set command prompt, set command options, and specify if the "get" can optionally accept numbers, nothing (pressing enter), and undo.
Properties
Methods
Gets a rectangle in view window coordinates.
public static Result Get2dRectangle()
solidPen,
If true, a solid pen is used for drawing while the user selects a rectangle. If false, a dotted pen is used for drawing while the user selects a rectangle.
out Rectangle
rectangle,
user selected rectangle in window coordinates.
out RhinoView
rectView
view that the user selected the window in.
Returns: Success or Cancel.
Allows user to interactively pick an angle
Easy to use Boolean getter.
Returns: The getter result based on user choice.
Commands.Result.Success - got value.
Commands.Result.Nothing - user pressed enter.
Commands.Result.Cancel - user canceled value getting.
Asks the user to select a Box in the viewport.
public static Result GetBox()
out Box
box,
If the result is Success, this parameter will be filled out.
mode,
A particular "get box" mode, or GetBoxMode.All.
basePoint,
Optional base point. Supply Point3d.Unset if you don't want to use this.
prompt1,
Optional first prompt. Supply null to use the default prompt.
prompt2,
Optional second prompt. Supply null to use the default prompt.
prompt3
Optional third prompt. Supply null to use the default prompt.
Returns: Commands.Result.Success if successful.
Asks the user to select a Box in the viewport.
Returns: Commands.Result.Success if successful.
Gets a 3d box with prompts for counts in X, Y and Z directions.
public static Result GetBoxWithCounts()
xMin,
Minimum value allowed for count in the x direction.
ref int
xCount,
Count in the x direction.
yMin,
Minimum value allowed for count in the y direction.
ref int
yCount,
Count in the y direction.
zMin,
Minimum value allowed for count in the z direction.
ref int
zCount,
Count in the z direction.
corners
corners of the bottom rectangle in counter-clockwise order, followed by top rectangle.
Returns: Commands.Result.Success if successful.
Easy to use color getter.
Remarks: If you need options or more advanced user interface, then use GetColor class.
Returns:
Commands.Result.Success - got color.
Commands.Result.Nothing - user pressed enter.
Commands.Result.Cancel - user cancel color getting.
Allows the user to interactively pick a distance
Easy to use number getter.
Returns: Commands.Result.Success - got number Commands.Result.Nothing - user pressed enter Commands.Result.Cancel - user cancel number getting.
Easy to use number getter.
Returns: Commands.Result.Success - got number Commands.Result.Nothing - user pressed enter Commands.Result.Cancel - user cancel number getting.
Interactively picks the points of a curve interpolated through a surface. This is the getter behind the Rhino InterpCrvOnSrf command.
public static Result GetInterpolatedCurveOnSurface()
surface,
The surface to draw on, or null to have the user pick one.
out Curve
curve,
The resulting curve, or null when the result is not Success.
out ObjRef
surfaceObjRef,
The face the user picked, or null when a surface was supplied or nothing was picked.
surfaceParameters
The picked points in the parameter space of the surface.
Returns: The command result. UnknownCommand means the user chose the Edit option, which the InterpCrvOnSrf command answers by restarting in edit mode.
Interactively picks the points of a curve interpolated through a surface. This is the getter behind the Rhino InterpCrvOnSrf command.
Returns: The command result.
Asks the user to specify meshing parameters.
Returns: Commands.Result.Success if successful.
Easy to use object getter for getting multiple objects.
public static Result GetMultipleObjects()
prompt,
command prompt.
acceptNothing,
if true, the user can press enter.
filter,
geometry filter to use when getting objects.
rhObjects
result of the get. may be null.
Remarks: If you need options or more advanced user interface, then use GetObject class.
Returns: Commands.Result.Success - got object Commands.Result.Nothing - user pressed enter Commands.Result.Cancel - user cancel object getting.
Easy to use object getter for getting multiple objects.
[CLSCompliant(false)]
public static Result GetMultipleObjects()
prompt,
command prompt.
acceptNothing,
if true, the user can press enter.
ObjectType
filter,
geometry filter to use when getting objects.
rhObjects
result of the get. may be null.
Remarks: If you need options or more advanced user interface, then use GetObject class.
Returns: Commands.Result.Success - got object Commands.Result.Nothing - user pressed enter Commands.Result.Cancel - user cancel object getting.
Easy to use number getter.
public static Result GetNumber()
prompt,
The command prompt.
acceptNothing,
If true, the user can press Enter.
ref double
outputNumber,
Default number is set to this value and the return number value is assigned to this variable during the call.
lowerLimit,
The minimum allowed value.
upperLimit
The maximum allowed value.
Returns:
Commands.Result.Success - got number.
Commands.Result.Nothing - user pressed enter.
Commands.Result.Cancel - user cancel number getting.
Easy to use number getter.
Returns: Commands.Result.Success - got number Commands.Result.Nothing - user pressed enter Commands.Result.Cancel - user cancel number getting.
Easy to use object getter.
Remarks: If you need options or more advanced user interface, then use GetObject class.
Returns: Commands.Result.Success - got object Commands.Result.Nothing - user pressed enter Commands.Result.Cancel - user cancel object getting.
Easy to use object getter.
[CLSCompliant(false)]
public static Result GetOneObject()
prompt,
command prompt.
acceptNothing,
if true, the user can press enter.
ObjectType
filter,
geometry filter to use when getting objects.
out ObjRef
rhObject
result of the get. may be null.
Remarks: If you need options or more advanced user interface, then use GetObject class.
Returns: Commands.Result.Success - got object Commands.Result.Nothing - user pressed enter Commands.Result.Cancel - user cancel object getting.
Gets an oriented infinite plane.
Returns:
Commands.Result.Success - got plane.
Commands.Result.Nothing - user pressed enter.
Commands.Result.Cancel - user cancel number getting.
Gets a point coordinate from the document.
Remarks: If you need options or more advanced user interface, then use GetPoint class.
Returns: Commands.Result.Success - got point Commands.Result.Nothing - user pressed enter Commands.Result.Cancel - user cancel point getting.
Gets a point constrained to an existing mesh in the document.
obsoleteUse method that requires document
Returns: A command result based on user choice.
Gets a point constrained to an existing mesh in the document.
obsoleteUse version that takes a document.
Returns: The command result based on user choice.
Gets a point constrained to an existing mesh in the document.
Returns: A command result based on user choice.
Gets a point constrained to an existing mesh in the document.
Returns: The command result based on user choice.
Gets a 3d rectangle made up of four points.
public static Result GetRectangle()
mode,
A get box mode.
firstPoint,
The first corner used. Pass Point3d.Unset if you do not want to set this.
prompts,
Optional prompts to display while getting points. May be null.
corners
Corners of the rectangle in counter-clockwise order will be assigned to this out parameter during this call.
Returns: Commands.Result.Success if successful.
Gets a 3d rectangle.
Returns: Commands.Result.Success if successful.
Gets a 3d rectangle.
Returns: Commands.Result.Success if successful.
Gets a 3d rectangle with prompts for counts in X and Y directions.
Returns: Commands.Result.Success if successful.
Gets a 3d rectangle with prompts for counts in X and Y directions, and a SubDCorners option.
public static Result GetRectangleWithCounts()
xMin,
Minimum value allowed for count in the x direction.
ref int
xCount,
Count in the x direction.
yMin,
Minimum value allowed for count in the y direction.
ref int
yCount,
Count in the y direction.
ref bool
subDCorners,
Value of the SubDCorners option.
corners
corners of the rectangle in counter-clockwise order.
Returns: Commands.Result.Success if successful.
Easy to use string getter.
Remarks: If you need options or more advanced user interface, then use GetString class.
Returns: Commands.Result.Success - got string Commands.Result.Nothing - user pressed enter Commands.Result.Cancel - user cancel string getting.
Allows the user to interactively pick a viewport.
Returns: The result based on user choice.
Easy to use getter for selecting multiple viewports.
public static Result GetViewports()
commandPrompt,
Prompt to display in command line during the operation.
viewports
An array of /selected Viewports.
Returns: Commands.Result.Success - got point Commands.Result.Cancel - user cancel point getting.
Returns true if the document is current in a "Get" operation.
Returns: true if a getter is currently active.
Returns true if currently in a GetObject.GetObjects()
Returns true if currently in a GetPoint.Get()
Convert some arbitrary string value to a valid command option name removing any invalid characters.
public static LocalizeStringPair StringToCommandOptionName()
englishString,
English string to convert.
localizedString
Optional localized string to convert.
Returns: Returns null if the strings are null or empty or if they contain nothing but invalid characters. If the converted string is one or more characters in length then a LocalizeStringPair is returned characters the converted string values. If the localized string is null or empty then the English string is used as the localized value.
Convert some arbitrary string value to a valid command option name removing any invalid characters.
Returns: Returns null if the string is null or empty or if it contains nothing but invalid characters. If the converted string is one or more characters in length then the converted value is returned.