Hello,
is it possible to define an operator overload for my custom data type so it works with the native Grasshopper math components, such as addition, substraction, etc.?
My idea:
public class MyCustomType : GH_Goo<ICustomInterface>
{
public MyCustomType ()
{
}
public static MyCustomType operator +(MyCustomType num1, GH_Number num2)
{
// do stuff and return a MyCustomType object
}
}
But the method is not being called when I used the Grasshopper addition component.
Help would be appreciated!
BR Diego