TIPniques: Dimensional Constraints in AutoCAD
The past two TIPniques articles have taken a look at Parametric Constraints in AutoCAD. We are going to continue this look. In January, we took a broad, general look at what Parametric Constraints are and how AutoCAD uses them. Follow this link to read the article: http://www.augi.com/library/parametric-drawing-in-autocad
In February we took a more in depth look at Geometric Constraints in AutoCAD. Follow this link for that article: http://www.augi.com/library/tipniques-parametrics-in-autocad-part-2
In this third installment, we are going to look at Dimensional Constraints. Dimensional Constraints are similar to Geometric Constraints in that they will control and define your linework. The difference is that they control the length (and other dimensions) of your linework. You can also create interactive or relative constraints based on other constraints. There is also a Parametric Manager where you can control the values and some of the interactions of the constraints.
Figure 1: The Parametric Tab on the AutoCAD ribbon. There are three main panels: Geometric, Dimensional, and Manage.
Which dimensions can they constrain?
Dimensional constraints can be summed up in one of two categories: length or angle. The length category has several dimensional constraints: Linear (which can also be vertical or horizontal), aligned, radius, diameter. Most of these dimension types are self-explanatory. The aligned dimensional constraint only constrains the distance between two points. The linear constraint will keep a line either horizontal or vertical. Radius and Diameter, well, they constrain a circle. And the Angle constraint maintains the angle between two objects. You can also convert dimensions into dimensional constraints. This is useful if you are taking a previously drawn and annotated design and applying constraints to it.
Dimensions can be dimensions or constraints, or they can be both. Dimensional Constraints are not kept on any layer so they will not print. They are not “regular” objects. The only way to display them is to convert the constraints into regular dimensions. Typically, you would not want to mix the two types. Constraints can be hidden so that they will not get in your way, visually, while working in AutoCAD and you typically have more constraints than dimensions. You will also find that you will constrain your models differently than you will dimension them. Dimensions are typically applied to provide enough information to construct your object. Constraints need more. They need everything constrained in order to fully function. This is why you will have many more constraints than you have dimensions.
Figure 2: There are two main types of Dimensional Constraints, Linear and Aligned, as well as arc based and angular constraints.
Applying dimensional constraints
Applying a dimensional constraint is very easy to do, especially if you have ever dimensioned anything in AutoCAD. Select the type of constraint and pick your first point. Osnaps don’t work here, per say, but you will get a red colored bull’s-eye that will show up on endpoints or midpoints. This bull’s-eye marks the point on the object that will be constrained. You can also pick center points of circles or arcs. Once both constraining points are selected, place the dimensional constraint as you would a regular dimension. As you zoom in and out of your drawing, the dimensional constraint will scale in size, visually. The dimension value doesn’t change—only the way the constraint is displayed on the screen.
Once placed, you will need to fill out the constraint information. You can assign it a specific variable or name. This name defines and identifies the constraint for you. If you simply press enter, AutoCAD will automatically name the constraint for you (d1 for example, or d2, which ever number is next in line.) At this time you can also add a formula or expression to the dimensional value. This allows you to set the value of this constraint equal to another constraint. For example: suppose that we have already created constraint d1 and it is equal to ten (10) units. Constraint d2 can be set as equal to d1. That way when you change d1, d2 will automatically be the same value. There are many reasons to do this. It can be done to make sure two sides of a square remain equal in length. On the other hand, maybe you need a box to be half as tall as it is wide. If our box is 10 units wide (call this d1) then its height is ½ of d1. This expression would be: d2=d1/2. It’s that easy. No matter what d1 is, d2 will always remain half of it.
Figure 3: When picking Constraint Pointsuse the Red Bull's-Eye as you would an osnap to an endpoint, midpoint, or center point.
There are several ways you can handle the values of the dimensional constraints. One way is to manually edit each constraint. That’s a pain—it is difficult, time consuming, and hard to manage. That’s why the second method, the Parameters Manager, is best. Here you can sort, group, and edit all of the dimensional constraints in your file. It is very simple to use. It’s a palette, so it can be docked, hidden, moved, or just left where it is. Once opened, every dimensional constraint will be displayed, sorted by name. You can group constraints or just make clever names because the manager will sort them all alphabetically. Groups work better because you filter others out. If there are many constraints in your file you will want to make sure you do this, otherwise you can get overwhelmed by a long list of constraints.
Figure 4: The Parameters Manager can sort and filter the dimensional constraints in your file. It will also control the expressions and values of each constraint.
AutoCAD introduced Parametric Constraints in AutoCAD 2010. In AutoCAD 2011, some small improvements made it better. One of the biggest improvements in 2011 was the ability to filter dimensional constraints in the manager. Using constraints will enable you to better control your design and ensure its accuracy. The Parameters Manager gives you the ability to edit your design automatically. Dimensional constraints make sure your design remains the way you designed it.