PointDeviation, MinBox

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:

Very nice, no?  But wait!  There’s more!  See that value “Hair scale?”  That’s another way to check out your deviation.  I cranked the Hair scale up to 100 and got 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:

Now, if I run the MinBox plugin, check out what I get:

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:

Instead of fiddling with this thing, you just run MinBox:

Boom!  Now, you can simply set your cplane to the bottom of that box by using Set Cplane -> To Object and clicking on the bottom surface of the 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!

Comments
2 Responses to “PointDeviation, MinBox”
  1. Some things that might help you with finding center lines or help you with positioning your scans before you send them to your CAD system would be to create some basic geometric entities in VxEelement (Creaform’s scan data collection software). On a part like your couling you might be able to build two circles, cylinders or spheres on symetrical sides of the part then create a line between them. If you build a few pairs of entities like this you could use the line mid points to establish a mid plane.

    You can construct these in fillet regions, or areas that look somewhat spherical by brushing accross patches of facets. You get feedback on the deviations of the points from a true prismatic element and you can dail it in to narrow or widend points/mesh that it uses.

    VxE lets you make more elements than those i suggested, like planes, lines and points.

    You might want to play around a bit with these tools. You can also establish a new world coordinate system by referencing these basic entities.

  2. BTW Rhino has some cool functionality. Great value.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: