8/17/2019 2 Constraint Modeling
1/31
CONSTRAINT BASEDSKETCHING
Geometric and Dimensional Constraints
Simulazione e Prototipazione Virtuale
8/17/2019 2 Constraint Modeling
2/31
ConstraintsMost features (in particular any base feature)
require a 2D sketch.Constraints, which are associations andrestrictions applied to 2D geometry.
Two different types of constraints:
1. Geometric• Constraining geometry based on normal
orientations or relative to other parts of thegeometry
2. Dimensional
• Numerical values that constrain the size and
location of geometry
8/17/2019 2 Constraint Modeling
3/31
Constraints
• In the design phase of a project, constraints provide a way to enforcerequirements when experimenting with different designs or when makingchanges. Changes made to objects can adjust other objects automatically,and restrict changes to distance and angle values.
• With constraints, you can
• Maintain design specifications and requirements by constraining the geometry within adrawing
• Apply multiple geometric constraints to objects instantly
• Include formulas and equations within dimensional constraints
• Make design changes quickly by changing the value of a variable
8/17/2019 2 Constraint Modeling
4/31
Designing with Constraints
When you work with constraints, a drawing will be in one of three states:• Unconstrained. No constraints are applied to any geometry.
• Underconstrained. Some constraints are applied to the geometry.• Fully constrained. All relevant geometric and dimensional constraints are applied to the geometry. A fully
constrained set of objects also needs to include at least one Fix constraint to lock the location of thegeometry.
Thus, there are two general methods for designing with constraints:• You can work in an underconstrained drawing and make changes as you go, using a combination ofediting commands, grips, and adding or changing constraints.
• You can create and fully constrain a drawing first, and then control the design exclusively by relaxing andreplacing geometric constraints, and changing the values in dimensional constraints.
The method that you choose depends on your design practices and the requirements of your
discipline.
Note: The program prevents you from applying any constraints that result in an overconstrainedcondition -> Error Messages->Diagnostic tools
8/17/2019 2 Constraint Modeling
5/31
Example
8/17/2019 2 Constraint Modeling
6/31
GEOMETRIC CONSTRAINTS
8/17/2019 2 Constraint Modeling
7/31
Basic Geometric Constraints
• Constraints relative to the normalconventions for direction.
Examples: vertical, horizontal
• Constraints that are relative to othersketch entities.
Examples: perpendicular, parallel
8/17/2019 2 Constraint Modeling
8/31
Advanced Geometric Constraints
• Tangent Constraints• Arcs or Circles
• Equality Constraints
• Equal sizes
• Concentric constraints• Align Center Points
8/17/2019 2 Constraint Modeling
9/31
Automatic Constraints
• Constraints are automatically applied as you sketch. The constraint symbol onthe cursor shows the constraint type. Constraints prevent unwanted changesto a feature when dimensions are changed or referenced geometry is moved.
8/17/2019 2 Constraint Modeling
10/31
Automatic Constraints
While sketching SolidWorkswill automatically guess at
the constraints that the userimplies
Dotted lines show alignmentand icons show the
constraints
Unwanted constraints can beselected (left click) and
deleted (delete key)
8/17/2019 2 Constraint Modeling
11/31
SolidWorks: Selecting
Lines or points can be
selected by holding Ctrland left clicking on each
At the left of the screenrelations can be added
by selecting theappropriate icon
The lines will snap to the
applied constraint andicons will display thecurrent constraints
8/17/2019 2 Constraint Modeling
12/31
Exercise
Relationships:• Vertical
• Horizontal
• Parallel
• Perpendicular• Equal
• Coincident
Circular Relationships:• Tangent
• Concentric
Draw the following object andconstrain with geometricconstraints only
8/17/2019 2 Constraint Modeling
13/31
Exercise
• List all the necessary constraints to go from the initial shape to the final,then apply the constraints on the SolidWorks part file to confirm
1
23
4
5
6
78
8/17/2019 2 Constraint Modeling
14/31
DIMENSIONAL CONSTRAINTS
8/17/2019 2 Constraint Modeling
15/31
Dimensional Constraints
• Linear Dimensions
• Radial Dimensions
• Angular Dimensions
8/17/2019 2 Constraint Modeling
16/31
Algebraic (dimensional) Constraints
• Simple AlgebraicExpressions
• i.e. 20/3
• Related to Other
Dimensions
• Driving vs. Driven
Is D5Driving or
Driven?
8/17/2019 2 Constraint Modeling
17/31
SolidWorks: Dimensions
Dimensional Constraints can
be added using the SmartDimension Button
1. Click on the entity2. Move cursor off object3. Click once more to place
dimension
When Constraints are appliedthe following dialog box willappear displaying• Dimension Name
• Editable Dimension Value• Options (direction, etc.)
8/17/2019 2 Constraint Modeling
18/31
Or even 2 points as long asthe correct direction is chosen
( the Smart Dimension tool
shows options when movingthe mouse)
SolidWorks: Dimension Options
Dimensions can be addedbetween 2 lines by selecting
the lines sequentially
Between a point and a line
8/17/2019 2 Constraint Modeling
19/31
SolidWorks: Circles and Arcs
Circles or Arcs can bedimensioned by thediameter (Ø) or radius (R)
A circle can be located by itscenter point by constrainingboth the x and y directions
8/17/2019 2 Constraint Modeling
20/31
SolidWorks: Angular Dimensions
Angular Constraints can be addedby clicking one line and then the
other line. SolidWorks willautomatically assume angularconstraint.
8/17/2019 2 Constraint Modeling
21/31
SolidWorks: Algebraic Constraints
Constraints can beadded in the form ofequations by:1. Entering “=“
2. Entering a valueor by left clickingon a dimension
3. Using operations+, -, *, /
8/17/2019 2 Constraint Modeling
22/31
BEST PRACTICE: Design Strategy
Effective robust designsstarts with shape andgeometry constraints,and then dimensionalconstraints are added
8/17/2019 2 Constraint Modeling
23/31
Dimensions for reference only
• You cannot overconstrain a sketch, but you can add dimensions for reference only.
• Usually, a dimension constrains sketch geometry to a specific size. You can add dimensionsuntil a sketch is fully defined (all degrees of freedom are removed). Elements of the sketchthat are not dimensioned are adaptive and can resize when another dimension changes.
• Sometimes, you want to place (driven) dimensions. Driven dimension do not constrain thesketch and reflect the current value of the geometry. They are enclosed in parentheses todistinguish them from normal (parametric) dimensions.
• You can change a driven dimension to a normal dimension. If the driven dimension you wantto change would overconstrain the sketch, delete or change another dimension before you
change the driven dimension. Select the Style box, and click Normal.
• To change a normal dimension to a driven dimension, select the Style box, and click Driven.
8/17/2019 2 Constraint Modeling
24/31
OVER-CONSTRAINED, UNDER-
CONSTRAINED OR JUSTRIGHT?
Evaluating DOF of Sketched Profiles
8/17/2019 2 Constraint Modeling
25/31
Degrees of Freedom for 2D Entities
8/17/2019 2 Constraint Modeling
26/31
Combining DOF in 2D Profiles
Thus, for any continuous, closed profile composed of only line segmentsand arcs, we can calculate the number of degrees of freedom in thesketch. Each line requires 4 DOF and each arc requires 5 DOF.
Each coincidence removes two DOF. Note that there is the same numberof coincident points as there are entities in the sketch.
Therefore, we can derive the following simple formula for DOF of a closedsketch:
DOF = 2*L + 3*A
where DOF is the number of degrees of freedom, L is the number of linesegments and A is the number of arcs in the loop
8/17/2019 2 Constraint Modeling
27/31
Example: evaluating DOF
4*2 + 1*3 = 11 DOF
8/17/2019 2 Constraint Modeling
28/31
Example: constraining
8/17/2019 2 Constraint Modeling
29/31
Example: constraining
5*1 + 4*1 = 9 DOF removed
Thus, the profile is not fullyconstrained. The two remainingDOF represent the position of the
sketch in the local coordinatesystem.
One vertex needs to be
specified (x1,y1).
8/17/2019 2 Constraint Modeling
30/31
Exercise
• Model this 2D sketch asfully constrained.
• If some dimensions aremissing, assume them.
8/17/2019 2 Constraint Modeling
31/31
Exercise
• Model this part with fullyconstrained sketches.
• If some dimensions aremissing, assume them.