Friday, April 1, 2011

Winning the Battle with Projected Geometery in Inventor Sketches

You find that your Inventor sketches often break due to geometry projected from other features. When those features are changed or deleted other sketches become upset and you end up spending a great deal of time fixing sketches. It's all very frustrating and is directly responsible for you having hit your co-worker in the back of the head with a stapler because you became so angry that you had to throw something. 

First off, you're on your own with that stapler thing (less coffee might help). But you can keep your sketches lean and clean by adjusting your projected geometry settings. I'll share a couple of tips here that I use every day to work with projected sketch geometry. Including a tip I use for getting projected geometry to come in as construction lines.

Often times you'll get the following message when projected geometry used in a sketch becomes upset:

It may not always be clear what Inventor is trying to tell you with the Design Doctor, but when I see an error like that I know that what Inventor is really saying to me is this:

So the first thing I'll do to help this situation is go to the Tools tab and click the Application Options button. Then on the Sketch tab I'll make sure the Autoproject Edges For Sketch Creation And Edit option is NOT selected. Here is the result of a new sketch created on the top face with this option selected:

Here is the result of a new sketch created on the top face with this option NOT selected (the one green dot is the projected origin, controlled by the Autoproject Part Origin On Sketch Create option.):

So right from the start your sketch is much cleaner when you have this option turned off, and therefore much less likely to get upset by a change to some previous feature.

The next thing I’ll do is create a keyboard shortcut for the Construction Line tool, so that I can quickly toggle it on and off, as I Project geometry into the sketch. This doesn't necessarily help your sketches stay any cleaner, but it's a great tip I picked up somewhere along the way, so I thought I'd throw it in here as well. Go to the Tools tab and click the Customize button:

 On the Keyboard tab, you can select just the Sketch category, and then enter a key to use for the toggle of the Construction command. I use Q, because it's easy to find on the keyboard (note that the Customize dialog box has changed in appearance in later versions of Inventor, so the tabs shown here might not match exactly what you see, depending upon the version you are running) :

So now when I create a sketch, I can click the Project Geometry button, and then press Q on the keyboard so that the Construction Line tool is toggled on:

Then I'll click only the edges I want to reference in my sketch. Recall that projecting a face gives you a projected loop containing all of the edges, and selecting edges gives you just the edges you specify:

Then I'll press the Q key again to toggle the Construction Line tool off, and then sketch my new feature in. This feature will be a keyway centered on the circular cut. 

Notice how I sketch off to the side, without even trying to place it precisely. If you're an Inventor demo jock who places a premium on making things look super slick and automatic, or an Inventor user that obsesses over mouse clicks, you probably think I'm as crazy as the proverbial outhouse rat for even suggesting such a thing! But I do this because I don't want to accidentally place an automatic sketch constraint between my new geometry and the existing projected geometry, and because I want the visual feedback of watching my new rectangle get locked down.  If you're a new Inventor user you might find that sketching off to the side away from projected geometry will help you as well.

Here I'm placing a coincident constraint to precisely position the rectangle:

And then I'll add a couple of dimensions to lock down the size. And because I didn't end up using the 2 projected lines, I'll delete them.

The final part, after using Extrude to cut the keyway: