Gh1MigrationRule
ReferencesA declarative mapping of one Grasshopper 1 component onto one Grasshopper 2 component.
Constructors
Gh1MigrationRule
#Create a rule with explicit parameter maps.
public Gh1MigrationRule()
gh1Id,
ComponentGuid of the Grasshopper 1 component.
gh2Id,
IoId of the Grasshopper 2 component.
inputs,
Input map, from Grasshopper 1 index to Grasshopper 2 index.
outputs
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
AngleInput
#Map a Grasshopper 1 numeric angle input onto a Grasshopper 2 Angle input.
public Gh1MigrationRule AngleInput()
gh1Input,
Index of the Grasshopper 1 angle input, not also in the input map.
gh2Input
Index of the Grasshopper 2 Angle input.
Returns: This rule, for chaining.
AngleOutput
#Map a Grasshopper 1 numeric angle output onto a Grasshopper 2 Angle output.
public Gh1MigrationRule AngleOutput()
gh1Output,
Index of the Grasshopper 1 angle output, not also in the output map.
gh2Output
Index of the Grasshopper 2 Angle output.
Returns: This rule, for chaining.
Dropping
#Allow a Grasshopper 1 input to be dropped even when a wire is attached to it.
Returns: This rule, for chaining.
Implements: Migrate
HidingOutput
#Hide a visible modular output which no Grasshopper 1 output maps onto; mapped outputs are shown by the transfer.
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.
public static Gh1MigrationRule Identity()
gh1Id,
ComponentGuid of the Grasshopper 1 component.
gh2Id,
IoId of the Grasshopper 2 component.
inputs,
Number of leading inputs which map onto each other.
outputs
Number of leading outputs which map onto each other.
Returns: The newly created rule.
ShowingOutput
#Show a hidden modular output, because the Grasshopper 1 component always showed its counterpart.
Returns: This rule, for chaining.
ViaInput
#Send a mapped input through a relay parameter.
public Gh1MigrationRule ViaInput()
gh1Input,
Index of the Grasshopper 1 input, which must also appear in the input map.
relay
Factory for the relay parameter.
Returns: This rule, for chaining.
ViaOutput
#Send a mapped output through a relay parameter.
public Gh1MigrationRule ViaOutput()
gh1Output,
Index of the Grasshopper 1 output, which must also appear in the output map.
relay
Factory for the relay parameter.
Returns: This rule, for chaining.
ViaOutput
#Send a mapped output through a MigrationAideComponent.
public Gh1MigrationRule ViaOutput()
gh1Output,
Index of the Grasshopper 1 output, which must also appear in the output map.
aide,
IoId of the aide component.
feeds
Grasshopper 1 inputs to fan out to the aide, with the aide inputs they feed.
Returns: This rule, for chaining.
WithExpression
#Post-process a Grasshopper 2 input with an expression, wrapping any existing one.
Returns: This rule, for chaining.
WithOutputExpression
#Post-process a Grasshopper 2 output with an expression, applied before any existing one.
Returns: This rule, for chaining.
WithSortedOutput
#Switch on the Sort modifier of a Grasshopper 2 output.
Returns: This rule, for chaining.
WithValue
#Give an unmapped Grasshopper 2 input a starting value.
public Gh1MigrationRule WithValue()
gh2Input,
Index of the Grasshopper 2 input to set.
values
Values to place in the input.
Returns: This rule, for chaining.