Mesh Display Problem


we are currently developing a plugin for intuitive robot programming of ABB robots inside of Grasshopper. However, we face the problem that our robot meshes are always displayed clipped inside of Rhino when placing the robot component:

The only workaround we got so far is placing other geometry inside of Rhino. So our assumption is the problem is realted to the bounding box of our Meshes. Currently we have implemented the Mesh Display as follows:

public class RobotInfoGoo : GH_GeometricGoo, IGH_PreviewData {
public void DrawViewportMeshes(GH_PreviewMeshArgs args){

for (int i = 0; i != Meshes.Count; i++)
args.Pipeline.DrawMeshShaded(Meshes[i], new Rhino.Display.DisplayMaterial(System.Drawing.Color.FromArgb(150, 0, 0), 0.5));

So my Question probably would be, where and how can I specify the Bounding Box for the Mesh Display.

Thanks a lot in advance if you can afford the time to help me with this problem.

Have you tried overriding the BoundingBox property and/or the GetBoundingBox() method?

1 Like

Thank you so much for your fast reply! This solved the problem.