Add Scalar and Vector Field in Rhinocommon

Hello dear developers and Happy New Year

Working quite a lot with fields I would like that Rhinocommon embeds the Scalar and Vector Fields.

At the moment I see

  • For Grasshopper and Rhino (7 surely 6) there is Vector Field GH_FieldElement and GH_Field
  • For Isopod and Rhinoceros 8 there is Scalar Field Ifield
  • For Grasshopper 2 (rhinoceros 8) there is now Grasshopper2.Types.Fields that is Scalar and/or Vector Field

Could it be possible to have something unique (the one from GH2), I would say in Rhinocommon ? Something that could be used In Grasshopper 1 and Grasshopper 2.

@andyopayne, @DanielPiker - feel free to chime in.

Hi Laurent, Happy New Year

For a field which given a Point3d returns a value, one option is to use a Func<Point3d,double> (or Func<Point3d,Vector3d> etc) delegate.

One advantage of this approach is that because it is a standard part of dotnet it can be passed between components without requiring them to share any reference to one library’s specific field type (and it works in GH1 or GH2), but it can be converted to other field types within components if needed.

Here’s an example:
field_func.gh (15.3 KB)

Hi Daniel

that is a very nice work around. So it seems worth that Grasshopper 1, Grasshopper 2 and Isopod could provide some tools to convert this type of input. I will try to add this type of input in all field input/output I use in Nautilus.

Hello Daniel,
I hope you are well. I began outputting Delegate Func<Point3d,double> for Scalar Fields, for vector Field I continue to output GH_Field.
Your bridge components works well.
Here some uses with Nautilus component Fast Noise Lite, Blender, Equation,



Can you add this component to a next IsoPod release ?

Thanks

Playing with Iso Pod and some of my scalar fields
WIth a torus

Add some noise from Nautilus, in order to have the good amount of noise the new scalar field component have a domain output when possible. Noise is added using field sum








A lot of new possibilities, different from just some bump