Step Up the Power of Parametrics29 Jun, 2010 By: Lynn Allen
Circles and Lines Tutorial: What's better than a geometric constraint in AutoCAD? Multiple constraints applied instantly! That's the magic of AutoConstrain.
My last column covered the basics of geometric constraints — aka, parametrics — a feature added in AutoCAD 2010 and available in AutoCAD 2011 as well. In this column, I'll dive even further into the magic of constraints and introduce you to another fabulous new feature, AutoConstrain, which offers much more than meets the eye. You're going to love how easy it makes your life.
Last time I showed how you can add geometric constraints one at a time as you create objects or modify existing geometry. These constraints preserve the integrity of the geometry in case you need to edit it later. But what if you already have a drawing that is geometrically correct and you'd like to apply geometric constraints throughout the drawing to keep it that way, in case you need to edit the geometry down the road? Adding multiple constraints one by one can be very time-consuming, not to mention incredibly tedious. That's where AutoConstrain comes into play.
Let's say I have a simple floor plan where I want to add parallel and perpendicular constraints, but I am much too lazy to add them individually. No problem: I just select the AutoConstrain tool from the Parametrics tab of the ribbon and window the floor plan. Voila! AutoCAD adds as many constraints as necessary to capture the existing geometry.
How does the tool determine which constraints to add? The AutoConstrain tab in the Constraint Settings dialog box controls which constraints can be assigned. Move constraints up and down the list to raise or lower their relative priorities.
This dialog box has two check boxes to indicate whether or not the objects must intersect to be considered tangential or perpendicular. If you do not select these boxes, the tolerance values indicated will be used to decide whether objects are perpendicular or tangential. For example, let's say we have two lines that are perpendicular but do not intersect and are 0.05 units apart. If you have the tolerance set to a value larger than 0.05, AutoCAD 2010 will make the lines perpendicular and will even extend one of the lines to make sure they intersect. Let's take a look at this process, step by step.
Take two lines that are perpendicular but do not intersect. In my example, they are 0.03 units apart. Your tolerance value is set to 0.05. After applying AutoConstrain to those two lines, you'll find that AutoCAD has closed the gap and added a perpendicular constraint to the lines. This function also works to repair overhangs.
Use AutoConstrain to clean up drawings that have gaps and overhangs.
You also can set an angle tolerance for AutoConstrain. If you set the tolerance angle to 1 degree and you have two lines that are 89 degrees apart, AutoCAD 2010 will assume that you meant for them to be perpendicular and will modify the lines to form a 90 degree angle — fantastic!
This function can be extremely helpful if someone sends you a drawing file in which they opted not to use object snaps. Don't you hate that? You start to zoom around in their drawing, only to find an abundance of gaps and overhangs. Ugh! It could take hours to clean up that mess, depending on the size of the drawing.
Never fear! AutoConstrain to the rescue! You could constrain the entire drawing using a decent fuzz factor (tolerance), and AutoCAD would do its best to clean up those annoying gaps and overhangs. I can't promise that you wouldn't have to do some cleanup afterward, but I can promise this tool will help you make great strides in the right direction.
Once you clean up a drawing in this way, note that there's nothing keeping you from making the geometry even more bulletproof by adding more constraints. For example, you can add symmetry constraints if the drawing has symmetrical aspects to it. Then, should you need to edit one side of the design, the other side automatically updates as well! Think of it as a Mirror command that sticks with the geometry.
A constrained drawing is a smart drawing. By adding geometric constraints, you maintain the integrity and intent of the drawing geometry when it comes time to edit. Using AutoConstrain on something as simple as a slot makes it so much easier to modify the size later because AutoCAD will automatically maintain the tangency of the arcs and lines while you push and pull the object.
With the release of AutoCAD 2011, AutoConstrain gets even more powerful by adding Equal (=) to the list of constraint options.
Amp up the intelligence of your drawings by using AutoConstrain, and you'll soon wonder how you ever lived without it! Until next time, happy AutoCAD-ing!
In her easy-to-follow, friendly style, long-time Cadalyst contributing editor and Autodesk Technical Evangelist Lynn Allen guides you through a new feature or time-saving trick in every episode of her popular AutoCAD video tips. Subscribe to the free Cadalyst Video Picks newsletter and we'll notify you every time a new video tip is published. All exclusively from Cadalyst!