ComponentFunctionInfo
ReferencesDefines the base class for a function representing a component. This class is abstract.
Constructors
ComponentFunctionInfo
#protected ComponentFunctionInfo(string name, string namespace, string description, IReadOnlyList<string> inputNames, IReadOnlyList<string> inputDescriptions, IReadOnlyList<string> inputTypeNames, IReadOnlyList<bool> inputsOptional, IReadOnlyList<string> outputNames, IReadOnlyList<string> outputDescriptions, IReadOnlyList<string> outputTypeNames, Guid componentGuid)
Instantiates a new instance of the function class. This is not meant for public consumption.
Parameters:
| name (string) | Name. |
| namespace (string) | Namespace. |
| description (string) | Description. |
| inputNames (IReadOnlyList<string>) | Input parameter names. |
| inputDescriptions (IReadOnlyList<string>) | Input parameter descriptions. |
| inputTypeNames (IReadOnlyList<string>) | Input parameter type names. |
| inputsOptional (IReadOnlyList<bool>) | Indications for optional inputs. |
| outputNames (IReadOnlyList<string>) | Output names. |
| outputDescriptions (IReadOnlyList<string>) | Output descriptions. |
| outputTypeNames (IReadOnlyList<string>) | Output type names. |
| componentGuid (Guid) | Component guid. |
Properties
The unique identifier of the Grasshopper component. It is the original developer's responsibility to ensure that this ID is unique.
Returns a delegate that can be directly invoked using a list of arguments. This flattens trees.
Returns a delegate that can be directly invoked using a list of arguments. This flattens trees.
Returns a delegate that can be directly invoked using a list of arguments. This considers trees and simplifies single-output components.
Returns a delegate that can be directly invoked using a list of arguments. This considers trees and simplifies single-output components.
Returns the name of the component prefixed by, if existing, the namespace.
Shows the full name of the component, including optional periods. Removes spaces and common operator signs.
The function input parameter descriptions.
The function input parameter names.
Indications for each function input parameter whether it is optional.
The function input type names.
Grasshopper returns several items in general. This property returns the output descriptions.
Grasshopper returns several items in general. This property returns the output names.
Grasshopper returns several items in general. This property returns the output type names.
Methods
Evaluates the component with a set of arguments. There needs to be an argument for each input param, and each output param gives an entry in the output array.
Remarks: For component that store no state, this method is thread safe.
Parameters:
| args (IEnumerable) | The arguments list. Each item is assigned to each input param, in order. |
| keepTree (bool) | A value indicating whether trees should be considered valid inputs, and should be returned. In this case, output variables are not simplified to common types. |
| warnings (out string[]) | A possible list of warnings, or null. |
Returns: An array of objects, each representing an output result.
Runs Evaluate(IEnumerable, bool, string[]) with keepTree equal to false, and raises an exception on the first warning.
Parameters:
| args (params object[]) | Arguments. One for each component input. |
Returns: Items.
Runs Evaluate(IEnumerable, bool, string[]) with keepTree equal to true and raises an exception on the first warning.
Parameters:
| args (params object[]) | Arguments. One for each component input. |
Returns: Items.
Runs Evaluate(IEnumerable, bool, string[]) with keepTree equal to true, and discards warnings (this is a dangerous operation!).
Parameters:
| args (params object[]) | Arguments. |
Returns: Array of items.
Runs Evaluate(IEnumerable, bool, string[]) with keepTree equal to false, then simplifies output with SimplifyTreeOutput(object[], string[], bool) and discards warnings (this is a dangerous operation!).
Parameters:
| args (params object[]) | Arguments. One for each component input. |
Returns: Items.
ToString
#Returns a string representing this function.
Returns: The namespace and the name.
Overrides: Object.ToString