How to fix this problem?


i use RobotMesh class in my c# custom component,but when run in grasshopper,gh show this dialog…because my code is a lot lof ,it is hard to check ,can some one tell me where may be the problem,Thank you!

the RobotMesh is something like this:

public class RobotMesh
    {
       public Mesh GeoMesh;
       public Rhino.Display.DisplayMaterial DisplayMat;
       public RobotMesh(Mesh m,Rhino.Display.DisplayMaterial disMat)
        {
        GeoMesh = m.DuplicateMesh();
        DisplayMat = disMat;
        }
    }

Do you have a wrapper class implemented for your RobotMesh (derived from IGH_GeometricGoo), and a corresponding Parameter ? Are the casting methods implemented properly?

My immediate guess would be, that you pass around an object of RobotMesh type and plug it in a mesh input / container, and GH doesn’t know what to do with it (or there is a bug in the CastTo/CastFrom methods ?

1 Like

yes,i find the reason,the same like you said!,Thank you Dsonntag!