Two cool little Rhino3D tricks to pass along today. I was doing some prep work for my November 29th webcast on the new T-Splines retopo tools, and I was looking for an easy way to calculate the deviation between my T-Spline surface and my scanned .stl mesh. I was looking around at paid options, when Pascal at McNeel replied to a post I put up on the Rhino newsgroup that I should check out PointDeviation. I thought to myself “PointDeviation? But I’m dealing with meshes and surfaces….” Well, lucky me, Rhino seems to treat a .stl mesh as a collection of points! Here is a T-Spline surface I applied to my mesh using the retopo snap:
Now I simply run the PointDeviation command. When it says “Select Points to Test” you simply click on the mesh. Then, it will prompt you for a Curve, Surface or Polysurface, and you just click on your T-Spline. After that, this very nice dialog box pops up, and you see pretty colors on your surface:
First off, check out the mean and median distance – with no fiddling other than using the retopo snap, they’re 0.0016 and 0.0010 respectively. That’s great! You can dial in the color gradients to appropriate values. Let’s say I want to call anything under 0.005 as good, and set my max to 0.02. Just plug those numbers in the appropriate fields, and hit apply and you get this:
You can point edit your T-Spline and the “hairs” will automatically update to show you your current deviation. The hairs show on both the inside and outside of the surface, so you can dial in both your positive and negative deviation. Just too cool.
The second trick I learned today has to do with Bounding Boxes, specifically minimum area bounding boxes. One thing I’ve struggled with when using scanned data is how to deduce a centerline on something that has no visible centerline. I came to the conclusion that the best way to find the centerline was to place a bounding box around either the scanned object or a cross section of the scanned object, such that the bounding box is oriented to minimize the area/volume. Pascal again came to my rescue by suggesting I check out one of the Rhinoscrip plugins available here on the Rayflectar Graphics website. There is a very nice MinBox plugin that allows you to do just what I wanted! I’ve taken an ellipse, to represent a sorf of generic aircraft cross section, and rotated it an arbitrary angle:
Ta da! Here’s another great use for it. Say you have some organic, freeform shape that’s not aligned with any particular Cplane, and you want to machine that surface. Well, your primary concern is reducing the amount of z needed to machine it. Again, what you want is a min area bounding box:
Then, you can simply use RemapCplane to stick that thing onto the origin with a nice proper orientation. Now that’s a time saver!