Gh1MigrationRule
ReferencesA declarative mapping of one Grasshopper 1 component onto one Grasshopper 2 component.
Constructors
Gh1MigrationRule
#Create a rule with explicit parameter maps.
Parameters:
| gh1Id (string) | ComponentGuid of the Grasshopper 1 component. |
| gh2Id (string) | IoId of the Grasshopper 2 component. |
| inputs ((int gh1, int gh2)[]) | Input map, from Grasshopper 1 index to Grasshopper 2 index. |
| outputs ((int gh1, int gh2)[]) | Output map, from Grasshopper 1 index to Grasshopper 2 index. |
Properties
Grasshopper1Id
#Gets the ComponentGuid of the Grasshopper 1 component migrated by this rule.
Implements: Grasshopper1Id
Methods
Dropping
#Allow a Grasshopper 1 input to be dropped even when a wire is attached to it.
Parameters:
| gh1Input (int) | Index of the Grasshopper 1 input which may always be dropped. |
Returns: This rule, for chaining.
Parameters:
| component (IGH_Component) |
Implements: Migrate
HidingOutput
#Hide a visible modular output which no Grasshopper 1 output maps onto; mapped outputs are shown by the transfer.
Parameters:
| gh2Output (int) | Index of the Grasshopper 2 output. |
Returns: This rule, for chaining.
Identity
#Create a rule which maps the first inputs and the first outputs onto the parameters at the same indices.
ShowingOutput
#Show a hidden modular output, because the Grasshopper 1 component always showed its counterpart.
Parameters:
| gh2Output (int) | Index of the Grasshopper 2 output. |
Returns: This rule, for chaining.
ViaInput
#Send a mapped input through a relay parameter.
Parameters:
| gh1Input (int) | Index of the Grasshopper 1 input, which must also appear in the input map. |
| relay (Func<IParameter>) | Factory for the relay parameter. |
Returns: This rule, for chaining.
ViaOutput
#Send a mapped output through a relay parameter.
Parameters:
| gh1Output (int) | Index of the Grasshopper 1 output, which must also appear in the output map. |
| relay (Func<IParameter>) | Factory for the relay parameter. |
Returns: This rule, for chaining.
ViaOutput
#public Gh1MigrationRule ViaOutput(int gh1Output, Guid aide, params (int gh1Input, int aideInput)[] feeds)
Send a mapped output through a MigrationAideComponent.
Parameters:
| gh1Output (int) | Index of the Grasshopper 1 output, which must also appear in the output map. |
| aide (Guid) | IoId of the aide component. |
| feeds (params (int gh1Input, int aideInput)[]) | Grasshopper 1 inputs to fan out to the aide, with the aide inputs they feed. |
Returns: This rule, for chaining.
WithOutputExpression
#Post-process a Grasshopper 2 output with an expression, applied before any existing one.