Help understanding BoundingBox list reference

Can someone help me understand how the array reference works in the following piece of code? I’m trying to understand how the BB(x)(y) works in terms of the list of 8 3-d coordinates returned by BoundingBox.

 BB = Rhino.BoundingBox(obj)
 p1 = Array((BB(0)(0)+BB(2)(0))/2, (BB(0)(1)+BB(2)(1))/2, (BB(0)(2)+BB(2)(2))/2)
 line = Rhino.AddLine(p1,Array(p1(0),p1(1),0))
 csX = Rhino.CurveSurfaceIntersection(line,strSrf)

Thank you.

Does this help?

I understand the function as such, but don’t understand the BB(x)(y) notation here.

Rhino.BoundingBox returns an array of arrays. That is, each element if the array returned by the method is, itself, an array. The syntax you have in question is pulling a value out of the nested array.

1 Like

Thanks, @Dale! Just what I needed.