Back

Parametric Drawing in AutoCAD

How would you like to be able “program” your linework in AutoCAD?  Since AutoCAD 2010, you can.  AutoCAD 2010 added Parametric Drawing to its repertoire of design tools.  Parametric drawing is a technology that is used for designing with constrained objects.  Constrained objects are associations and restrictions that are applied to 2D geometric objects.

For example, a line is defined as all of the points between two end points.  A parametrically constrained line has this definition as well as other parameters.  Those parameters could be to hold one end point at specific coordinates.   One parameter could be to control the distance between the two endpoints, or to control the angle the created line projects.  Parametric constraints can also apply design parameters to our line that are based on other objects forcing our line to be equally as long as the controlling line.  Perhaps the constraint would define our line as being parallel to another line.  Constraints give us design parameters that enable us to program our geometry to react accordingly to other linework in our files.  It is much more than drawing a line - it is drawing that line and telling it to behave a certain way.

Types of constraints

In AutoCAD, there are two types of constraints: Geometric and Dimensional.  They serve similar purposes, but allow us to create different types of parameters.  Geometric constraints control the geometrical relationships of objects with respect to each other.  Dimensional constraints control the distance, length, angle, and radius values of objects.

Constraints: why?

There are several reasons to use constraints.  In the design phase or even in the concept phase of a project, we need to make sure that certain design parameters are met and kept.  Constraints help us maintain our design criteria.  If a series of gears are being designed, then the relationship of their centers must be maintained.  If one is moved, then the other must move accordingly.  Constraints can ensure that this happens.  Constraints provide a way to enforce requirements of design.  Dimensional constraints can be developed with formulas. 

For example, if our gear design requires three gears to interact, then their placement is crucial.  Their placement will depend on the radius of the gears.  Constraints allow us to define the distance between gear centers based on the radius of the gears.  In Figure 2 we have three gears represented by a series of circles.  The distance between Gear 1 and Gear 2 is the sum of Radius 1 and Radius 2.  The dimensions shown are dimensional constraints.  Note that the horizontal dimension between the centers of Gear 1 and Gear 2 equals rad1+rad2.  The dimensions for rad1 and rad2 are shown.  If either rad1 or rad2 are changed, d1 (the horizontal dimensions between the circle’s centers) will be updated.  The same goes with d2, the dimension between Gear 2 and gear 3.  If we alter rad2, then both d1 and d2 will automatically be updated, moving Gear 1 and gear 3 accordingly.

Designing with constraints

AutoCAD files will always fall within one of three constraint categories: Unconstrained, Underconstrained, or Fully Constrained. 

An unconstrained file has no constraints at all applied to itl.  Underconstrained files will have some constraints applied.  A Fully Constrained file has all geometry constrained as well as at least one fixed location constraint, locking the geometry in place.  When working with constraints, there are two main methods to employ.  One is to work with Underconstrained linework, making changes as you go.  A second is to fully constrain your linework, then make changes to parameters and constraints.  The method used will depend on your design needs and customary design techniques.  AutoCAD will prevent you from over constraining your file.  There must be at least one parameter that can be changed, otherwise you would not be able to change your file’s linework.

Applying constraints

Geometric  constraints can be applied in several different ways.  One method is to manually apply them one at a time.  Another method is to use the Auto Constrain tool.  This tool automatically constrains the selected objects according to the priorities that are established in the constraint settings.  Another method is to use implied constraints.  Implied constraints will be applied as you create linework.  This feature can be toggled on and off on the status bar.

Dimensional constraints are typically applied one at a time.  Another method is to convert dimensions into dimensional constraints.  Dimensional constraints can remain as constraints and they can be made into annotations as well.  This method is convenient because two tasks are being completed at one time.  Your drawing is being annotated dimensionally and it is being constrained dimensionally.  Not all dimensional constraints will need to be annotations.  In fact, you will typically have many more dimensional constraints that annotated dimensions. 

Constraints can also be applied within blocks and dynamic blocks.  Appling constraints to dynamic blocks can help in their creation and make them more powerful.  Constraints in dynamic blocks can also give you more options than using the dynamic parameters alone.

Editing constraints

When dimensional constraints are added to a file they can be managed through the Parameters Manager. 

The Parameters Manager gives access to every dimensional constraint in the file.  There, the name of each constraint can be edited as well as the expression and value.  Once a drawing is fully constrained and dimensional constraints are applied, it is possible to edit the drawings linework without “touching” the linework.  In our previous example of the three gears, we can change the design with the Parameters Manager alone.  Changing the value of rad1 to 8 units will change the value of d1 from 1’-“ to 1’-8”.  We can also design rad3 to be equal to rad1.  In the Expression column, change the value from 6 to rad1.  As rad1 changes, rad3 will always be equal.  We could also make d2 equal to rad2 if we so desired.  The values chosen for our parameters are up to the designer, but there must be at least one independent value in the file.

Geometric constraints can be removed or simply relaxed.  Removing, or deleting, geometric constraints will take away any design parameters those constraints applied.  This will allow you to alter the linework accordingly.  Relaxing constraints gives you the ability to temporarily remove constraints in order to edit the linework.  Once editing is complete, the constraints are turned back on.  If they no longer apply, then they are removed.

Conclusion

Parametric Constraints can help in the design process.  They can also help in the concept phase of a project.  They help to ensure the accuracy of a design and maintain control of linework.  This article is the first in a series looking at the use of parametric Constraints in AutoCAD.  Later on we will explore their use in greater detail and how to use them in dynamic blocks.

Appears in these Categories

Back