Bug: RhinoCommon Mesh.GetBoundingBox(Plane) doesn't orient to Plane [Solved]

The RhinoCommon command Mesh.GetBoundingBox(Plane) doesn’t:

  1. locate the BBox attached to the Mesh (instead it ends up centered at World.XYZ(0,0,0))
  2. orient itself according to the provided Plane parameter.

The difference between a Grasshopper BBox component and the RhinoCommon command is shown in the picture below, where

  • BBox_0 = Mesh.GetBoundingBox(ProtoPlane_0); // = Red box
  • GH component BBox based on the same Mesh and ProtoPlane_0 // = Green box


Has the SDK command ever worked properly? I recall trying this earlier but never got it to work as expected.

// Rolf

Mmmkay. The command has an override method which works as I would expect

{
Box bbox;
Mesh.GetBoundingBox(ProtoPlane_0, out bbox); // This bbox is oriented
return bbox;
}

// Rolf