Grasshopper

algorithmic modeling for Rhino

Hi All,

I seem to be running into an issue when I calculate the bounding box of a pt cloud using a plane for orientation. My inputs are a valid pt cloud and a valid plane. I attached an image of the situation. It seems to be calculating the proper bounding box, its just not in the location where it needs to be.

Any help on the issue would be great.

Cheers,

[C]

Views: 1489

Attachments:

Replies to This Discussion

Can you post the points and the plane so I can test for myself?

--

David Rutten

david@mcneel.com

Hi David, I've attached a gh file with the points and code I was using. Thanks for looking into it.

Attachments:

Hi Charles,

sorry it took so long. The code is correct and there is no bug. A BoundingBox in Rhino is defined only by the two corner points. It cannot have an orientation in space. When you compute the boundingbox for a given plane, the result is implied to be within the coordinate system of the plane, not the world coordinate system. The code you are after is:

Dim box As BoundingBox = ptcloud.getboundingbox(y)
A = New Rhino.Geometry.Box(y, box)

--

David Rutten

david@mcneel.com

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service