GH Python in Rhino 6 - Vicarious Argument

Hi @agamas

as the text mentions, this relates to the Patch function.
The Grasshopper Patch component requires these inputs:

Help on function Patch in module ghpythonlib.components:
 |  Patch(*args, **kwargs) |      
 |      Create a patch surface
 |      Input:
 |      	curves (in, optional) [Curve] - Curves to patch
 |      	points (in, optional) [Point] - Points to patch
 |      	spans [Integer] - Number of spans
 |      	flexibility [Number] - Patch flexibility (low number; less flexibility)
 |      	trim [Boolean] - Attempt to trim the result
 |      Returns: [Surface] - Patch result

As you can see, this is not exactly a Python function because the first two arguments are optional, while the rest are not. This follows the Grasshopper declaration exactly.

The ‘vicarious’ warning was added in Rhino 6 when you execute a component that has non-optional parameters, but the creation default is used.

This may be a problem if the creation-default is changed in Grasshopper, because normal components will keep on working with their original default, while your scripted component will take the new default value. To prevent that, the ‘vicarious’ warning suggests to put creation-defaults as explicit values in the function.

In you case,

ghcomp.Patch(_bldgCurves)

becomes:

ghcomp.Patch(_bldgCurves, None, 20, 1, True)

Thanks,

Giulio


Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com