Friday, May 1, 2009

AutoCAD Constraints

I've been working with AutoCAD in a professional capacity since R14. It could do everything I wanted and what it lacked, I was able to customize through programming. In 2004 I took a job as an Applications Engineer for an Autodesk reseller and it was there that I was introduced to parametrics. I started by learning this program called Inventor. In Inventor you can make the sketch geometry behave in predictable ways by using geometric constraints and parametric dimensions. Needless to say I was hooked.

It has taken Autodesk many years but AutoCAD and all it's many flavors now have the ability to apply geometric constraints to elements! This is very exciting for someone who didn't know what he was missing, until he found it in another application. Since the release of AutoCAD 2010 I have spent some time playing with this "new" feature.

Our company has hired some new young engineers that can solid model pretty good. Most engineering programs require solid modeling on some 3D application. When we bring them on board I can usually get them working well in Inventor. Teaching them AutoCAD is an entirely different workflow, and mindset. Constraints in AutoCAD will help with this an aweful lot.

Workflow:
The workflow I follow in AutoCAD is the same I teach all who cross my path in learning 3D. SKETCH -> CONSTRAIN -> DIMENSION. This will create a robust drawing that will behave in predictable ways.

First, Sketch. Draw what you need, don't focus on the actual size. (Did I just tell an AutoCAD person NOT to care about size?) YES! When working with parametrics we don't concern ourselves with the actual size, just the configuration / basic outline. This is the rough sketch phase, just get your design on paper.

Second, Constrain. Geometric constraints create relationships between entities. I'm not going to go into detail in this blog on the function of each of the geometric constraints, just discuss their use. When people work in 2D they are focused on the here and now, working on the finished product at the time of creation. 2D guys can be very fast. I tell people that if you put a 2D guy up against a 3D guy creating the same drawing the 2D guy will be done first. Then just when they are about done I throw a change at them. This is where the 3D guy makes up ground. When applying constraints to geometry you are forced to think in the future. You need to ask questions like " how does this design need to behave?" and " what things will change and what do I want to remain the same. So, plan ahead!

Last, Dimension. by putting in as many of the constraints first, we are left with a minimum amount of dimensions. The fewer parametric dimensions we put into the drawing, the easier it will be to control. If you put a lot of dimensions into a drawing when you need to make a change you'll be making unnecessary changes. As the designs change the relationships between the entities will be easier to control.

One thing to keep in mind when adding dimensions is to create relationshops between dimensions. For example, let's say I have a rectangle that I always want the heights to be half of the width. First put in the dimension for the width, d0=x, then the dimension for the heights will be d1=d0/2. No matter what d0 is, d1 will always be half. In many cases I don't even have to punch in a value I can let the parametric dimension do that for me.

I'm really looking forward to putting into practice constraints in my AutoCAD drawings. I'm certain that I'll be able to get much use out of it.

No comments:

Post a Comment