One of the custom objects that we use has a larger “perceived” bounding box than its constituent geometry, due to part of the object being drawn in a mirrored way.
I have tried to override GetBoundingBox(CRhinoView* pView) and that gives good results for clipping (i.e. the virtual, mirrored part is not clipped upon zooming into that part).
I find, however, that the zoom extents all command (ZEA) does not take this larger bounding box into account. It always zooms to the geometry, whereas I want it to zoom to the geometry AND the virtual, mirrored part. How do I tell Rhino that my object should be shown the way I want?
In ASCII art:
[ ] viewport
G only geometry
M|G geometry with mirrored part
M|[G] - current result of zoom extents all, only the G part is in the viewport
[M|G] - desired result of zoom extents all, both geometry and mirrored part are visible
(I hope this is clear?!)
The use of TightBoundingBox on a custom object gives problems when the constituent geometry is asked for a bounding box in .NET. I filed a bug for this
For arcs, the bounding box is calculated from it’s NURB form. For normal bounding boxes, the NURBS cv’s are used. For tight bounding boxes, the cv’s from Bezier spans are used.
Thanks @dale,
I used the extremes, based on the derivatives to find all the points to define a tight bounding box for a nurbs.
Thanks again for the message.