ZoomExtents for thin models

Sep 26, 2012 at 4:52 PM

I find that the ZoomExtents function is not suitable for my needs since most of my models are flat and long (or tall and thin). Using a bounding sphere is therefore not the best solution. Instead I adapted Eric Sink's "retrieval of a 2D bounding box from a Viewport3D" code at http://www.ericsink.com/wpf3d/A_AutoZoom.html and then used the ZoomToRectangle method in the Helix toolkit following manipulation of the 2d bounding box to keep the aspect ratio the same as that of the viewport ratio.

This works great for all views except the front and back views where the ZoomToRectangle call seems to rotate the view a few degrees away from the default view.  Any ideas why?

BTW absolutely fantastic work in producing the tookit .