Google Search

Loading

Tuesday, September 28, 2010

Lesson 2: Work with Geometric Constraints

Learning Objectives

On completing this lesson, you will be able to do the following:

■ Create coincident, perpendicular, and parallel constraints.

■ Recognize and use the point glyph when creating constraints.

■ Use the Autoconstrain feature to apply all geometric constraints
automatically.

■ Delete or relax one or all the constraints applied to an object.


File Name: PD_Deck2.dwg

Command: GEOMCONSTRAINT, AUTOCONSTRAIN

Geometric constraints are applied before dimensional constraints to define
and preserve the general shape of the design. For example, geometric
constraints can specify that two endpoints always remain coincident, or that
specified lines always remain perpendicular. AutoCAD 2010 supports 12 types
of geometric constraints.


Let’s apply geometric constraints to a drawing of another simple backyard
deck plan.

To apply coincident constraints

1 Open the drawing file, PD_Deck2.dwg.







                                                                                              


Typically, the first constraints that you apply to a drawing are Coincident
constraints. As the name implies, Coincident constraints provide a way
of making sure that the endpoints of objects always remain joined.
However, the definition is broader. For example, a Coincident constraint
accepts the extension of an object as a valid location. In some cases, a
Coincident constraint is similar to a Nearest object snap.

Let’s create a Coincident constraint between the endpoints of the two
lines.

2 On the Geometric panel, click Coincident.








3 Click near the endpoints of the horizontal and the vertical lines as shown.
This action creates a Coincident constraint that looks like a small blue
square at the corner.











A red point glyph is displayed for each selection. These glyphs work like
object snaps, but are limited to Endpoint, Midpoint, and Center. To create
a Coincident constraint at a T-intersection between two lines, use the
Object option.


4 On the Geometric panel, click Coincident again.

5 At the Command prompt, press Enter to specify the Object option.

6 Select the horizontal line as shown, and then select the vertical line near
the endpoint. Make sure that the endpoint glyph is displayed.










You could continue applying Coincident constraints to the other
intersections manually, but there is a faster way to apply them.

7 On the Geometric panel, click Coincident again.

8 At the Command prompt, enter a to specify the Autoconstrain option.

9 Select all the objects in the deck plan and press Enter.












All the Coincident constraints are applied. We will now add the rest of
the geometric constraints.

To apply perpendicular constraints

1 On the Geometric panel, click Perpendicular.

2 Select the horizontal and vertical lines as shown.











The order in which you select the two lines makes a difference in some
cases. For example, imagine two lines in a V-shape with a Coincident
constraint at their intersection. When you apply a Perpendicular
constraint, the first line that you select is the reference line. The other
line will adjust to the first line. This behavior also applies to several other
types of geometric constraints.


3 On the Geometric panel, click Perpendicular again.

4 Select the horizontal and vertical lines as shown.











Notice that the two lines do not need to intersect at their endpoints to
accept the Perpendicular constraint. In some cases, the lines might not
even touch, but can intersect at an extrapolated intersection.

There are several lines in the deck plan that should always be parallel.
We will add those constraints next.

To apply parallel constraints.



1 On the Geometric panel, click Parallel.
2 Select the two horizontal lines as shown.























Parallel constraints do not constrain the lengths and offset distances of
these lines. They only make sure that the lines remain parallel.

3 Click Parallel again.

4 Select the two vertical lines as shown.




















5 Go ahead and apply Parallel constraints to each of the four lines of the
stairs. Use the right-most of the four lines as the reference in each case:
1 and 2, 1 and 3, and 1 and 4. You might need to zoom in to select the
lines.













It is not critical to make all the lines parallel to the reference line, but
this method captures the design intent.

To apply fix constraints to the drawing



A Fix constraint locks a specified point on an object to a fixed WCS location
in the drawing. It can also lock a specified object to a limited range of freedom.
Applying Fix constraints typically is used for one of two purposes:

— Permanently locate an object within a drawing so it cannot be moved or
rotated.

— Temporarily hold an object or a point on an object in place while you
manipulate other, partially constrained objects.

You can apply Fix constraints to several objects or points on objects in a
drawing.


1 On the Geometric panel, click Fix.
2 At the Command prompt, enter o to specify the Object option.
3 Select the horizontal line on the deck plan as shown.























This constraint keeps the selected line segment collinear with an
imaginary infinite line, but it does not lock the locations of its endpoints.
Let’s apply a Fix Point constraint to an endpoint of the same line.

4 On the Geometric panel, click Fix.

5 Click the line near the left end.

The second lock icon confirms that the line is now fixed in place. It
cannot move or rotate.

To remove constraints



There are several method you can use to remove constraints.
1 Right-click the Fix constraint that you just added and click Delete.
Alternatively, you can move your cursor over a constraint icon and press
the Delete key. This action removes a single constraint.



2 On the Manage panel, click Delete Constraints.

3 Select one of the lines.

All the constraints applied to that line are removed. Alternatively, if you
are working within a command and one or more constraints prevent you
from making a change, press and release the Ctrl key to relax the
constraints on the selected objects. After completing the command, the
constraints will be reapplied, if possible.

4 On the Manage panel, click Delete Constraints.

5 Select all the lines using a Window or Crossing selection.
This action removes all the constraints from the deck plan.

To constrain selected objects automatically



The Autoconstrain feature adds a complete set of geometric constraints to
selected objects automatically. Let’s try it on the deck plan.



1 On the Geometric panel, click Auto Constrain.

2 Select all the lines using a Window or Crossing selection.
All the objects are geometrically constrained to each other. You can now
make adjustments, deleting the constraints that you do not want to use
and applying others.
























Notice from the drawing that Autoconstrain assumed that the bottom
horizontal line should always remain horizontal, and that the top step
should always be parallel to the right edge of the deck. These and other
assumptions are not always going to be correct for your designs. You
should always plan to make some adjustments after using Autoconstrain.

3 Close the drawing without saving it.

Summary



You have learned how to apply several types of geometric constraints to capture
the intent and requirements of the design. However, geometric constraints
do not fully constrain the size and shape of the objects in a drawing. To fully
constrain a drawing, you need to apply dimensional constraints, which is the
subject of the next lesson.


Review Questions


1 What is the purpose of a coincident constraint?


2 What is the significance of the first object selected when you apply some
types of constraints?


3 What are Fix constraints?


4 What is a fast way to remove all the constraints from a selected object?


5 When is it recommended to use Autoconstrain?










Wednesday, September 15, 2010

Lesson 3: Work with Dimensional Constraints

Learning Objectives
On completing this lesson, you will be able to do the following


■ Describe dimensional constraints.

■ Create aligned and angular constraints.

■ Change a design by changing the values of the dimensional constraints.

■ Plot dimensional constraints for design reviews, and understand the
differences between dynamic and annotational constraints.

Command: DIMCONSTRAINT


Dynamic dimensional constraints control the lengths, radial sizes, and angles
of objects. They also control the distances between objects or points on objects.
For example, in addition to controlling the lengths of selected objects, you
might want to keep the distance between lines constant, such as the tread
length of stairs.

Let’s apply dynamic constraints to the drawing of the deck plan.

To create dynamic constraints


1 Open the drawing file, PD_Deck3.dwg.

This drawing is the deck plan with all the geometric constraints applied
Let’s verify that the geometric constraints are applied.

2 On the Geometric panel, click Show All to display all geometric
constraints.



3 On the Geometric panel, click Hide All.

4 On the Dimensional panel, click Aligned.


5 At the Command prompt, press Enter to specify the Object option.

6 Select the horizontal line as shown and then click a location for the
dynamic constraint.



7 Press Enter or click anywhere outside the box to accept the current length
of the line.



This step provides the opportunity for you to change the length of the
line.

8 Click Aligned again.

9 Create an aligned constraint for the bottom horizontal line as shown.
You will need the extra space later.


10 Create two more Aligned constraints on the vertical lines as shown.



You might wonder why we did not apply Horizontal and Vertical
constraints instead of the Aligned constraints. For this design, we want
to control the lengths of the lines. The Horizontal and Vertical constraints
control only the horizontal and vertical distances.
 This distinction is important when you work with diagonal lines or later need to rotate a
drawing.


11 Zoom into the area of the stairs.
We will apply constraints on the tread length for each step.

12 On theDimensional panel, click Aligned.

13 Click the vertical line as shown, making sure that you see the endpoint
glyph.





14 Click the endpoint of the vertical line to the left, and click a location for
the constraint.



15 Press Enter or click anywhere outside the box to accept the value of 45.

16 Create an Aligned constraint between the next pair of lines as shown.


17 Repeat the process for the last pair of lines as shown.



Each of the endpoints of these lines will now maintain a distance of 45
cm from each other, and the parallel geometric constraints will keep the
lines parallel.


18 On the Dimensional panel, click Angular.

19 Click the two lines in the corner of the deck as shown.



20 Click a location for the constraint, and press Enter or click anywhere
outside the box to accept the value of 90 degrees.
Later, you will see why we chose to use an Angular constraint for this
corner.

21 Zoom out until you can see the entire deck plan as shown.



Now that we have fully constrained this deck design, let’s change some
of the parameters. There are several ways to do this.


To change dimensional constraints

As mentioned previously, before you modify a constrained design, it’s often
a good idea to apply one or more Fix constraints first. This keeps those objects
from shifting or rotating. You can always delete the Fix constraints later.

1 Turn on the display all Geometric constraints and verify that the two Fix
constraints are applied. Then turn off the display of all Geometric
constraints.

2 Double-click the d1 dynamic constraint as shown.



3 Click within the edit box and enter 1000 as the new value.
The entire deck was shortened slightly. Next, we will try to make the deck
plan a little less boring.

4 Double-click the ang1 dynamic constraint as shown.



5 Click in the edit box and enter 120 as the new value.



This design is more interesting, but still too timid. Let’s make the angle
larger.

6 Change the value of the ang1 dynamic constraint to 140.




This design is much more interesting. You might want to experiment
with other values.


7 Close the drawing without saving it.

To plot dimensional constraints
Dynamic constraints do not have the same purpose as the dimensions in a
construction document or a manufacturing drawing, nor do they maintain
typical dimensioning standards. Thus, dynamic constraints are not plotted
with the rest of the drawing. However, you might want to plot them for design
reviews. In those circumstances, you can change dynamic constraints into
annotational constraints.

Annotational constraints are plotted, have a static size, and use the current
dimension style.


1 Open the Properties palette.

2 Select a dynamic constraint.

3 In the Properties palette, under Constraint, select Annotational from the
Constraint Form drop-down list.





The resulting annotational constraint uses the current dimension style.

4 Close the Properties palette.

5 (Optional) Plot your drawing to a plotter or a printer.

Summary



You have learned how to apply dimensional constraints and how they work
with geometric constraints to control a design. You also learned how to change
designs by changing the values of dimensional constraints. Finally, you learned
how to change dynamic constraints into annotational constraints for plots
to be used in design reviews. Next, you will learn how to add formulas and
expressions to a design.


Review Questions


1 What is the most commonly used dynamic dimensional constraint that
controls the lengths of objects or the distances between them?


2 How can you change the value of a dimensional constraint?


3 What is the purpose of a Fix constraint?


4 What must you do to create a plot that displays dimensional constraints
for a design review?




Saturday, September 11, 2010

Lesson 4: Control a Design Using Parameters and Expressions


Learning Objectives

On completing this lesson, you will be able to do the following::


■ Incorporate formulas and expressions, and manage them with the
Parameters Manager.

■ Create and name user variables.

File Name: PD_Deck4.dwg, PD_Areas.dwg

Command: PARAMETERS, -PARAMETERS


You can modify dimensional constraints and user variables either directly or
with the Parameters Manager

To rename dimensional constraints

Let’s change some dynamic constraints to use more descriptive names.

1 Open the drawing file, PD_Deck4.dwg.


2 Double-click the dynamic constraint, d1, and change the d1 to Length
as the new name.

3 Press Enter or click outside the edit box to accept the change.



Another way to change the name of a dynamic constraint is to use the
Parameters Manager.

4 On the Parametric tab, Manage panel, click Parameters Manager.


5 In the Name column, double-click d2 and enter Width.

6 Press Enter or click outside the edit box to accept the change.

To define a user variable


Often, it is convenient to make a single change that affects multiple dynamic
constraints. For example, you might want to experiment with several tread
widths for the steps in the deck plan.

1 Double-click an empty row in the Parameters Manager.


2 Change the name of the new user variable from user1 to Tread.


3 Press Enter or click outside the Parameters Manager palette to accept the
new name.

4 Change the value in the Expression column from 1 to 45.


5 Press Enter or click outside the Parameters Manager to accept the new
value.

6 In the Expression column of d5, d6, and d7, enter Tread.



These changes associate the value of each of these distances with the user
variable, Tread. Let’s test your control over the tread widths


7 In the Expression column of the user variable, Tread, change the value
from 45 to 60. Then change it to 40.

The changes are updated automatically in the deck plan.

8 Close the drawing without saving it.

To create dimensional relationships between objects


The Expression column in the Parameters Manager can contain constants,
references to dynamic constraints, references to user variables, arithmetic
operators, and functions. Consider the following example.

1 Open the drawing file, PD_Areas.dwg.


This is a fully constrained drawing of a rectangle with a circle at its center.
The circle always has the same area as the rectangle. Let’s examine the
dynamic constraints in detail.


2 On the Geometric panel, click Show All and then Hide all to confirm
that geometric constraints have been applied.


3 If necessary, open the Parameters Manager

4 In the Parameters Manager, click the Length row.


As long as your cursor is in the Parameters Manager, the Length dynamic
constraint remains highlighted in the drawing. Length is set to the constant
60.

5 Click the Width row and observe the highlighted dynamic constraint.


To center the circle, the d1 and d2 dynamic constraints are defined as
Length/2 and Width/2. The user variable, Area, is defined as the product
of Length and Width, the area of the rectangle.

6 Click the Radius row.


The radius of the circle is defined with the expression containing the area
of the rectangle, the square root function, and the constant, PI. This sets
the radius of the circle to a value that constrains the area of the circle to
be equal to the area of the rectangle.


Notice that you can store expressions in a dimensional constraint or in
a user variable. A full list of available functions is documented in the
AutoCAD User’s Guide Help topic, Constrain a Design with Formulas and
Equations.


7 Experiment by changing the values for the length and width of the
rectangle.


Notice that the Value column displays the current value of the expression
in the Expression column. Are you curious what would happen if you set
the length of the rectangle to 0 or -1?

8 Close the drawing without saving it.

Summary



You have learned how to incorporate mathematical expressions in dimensional
constraints and in user variables with the Parameters Manager. These tools
provide a method for completely controlling the shape, size, and proportions
of a design.


Review Questions


1 What are the two places within a parametric drawing that you can store
a formula?


2 How can you display a list of user variables in a drawing?


3 What is the purpose of the Value column in the Parameters Manager?



For more information about working with the Parametric Drawing feature,
see the AutoCAD User’s Guide. Help topic, Design with Parametric Constraints.