Home / Docs / SharkCAD Training Guide / Constrants Tutorial

Constrants Tutorial

Constrants Tutorial

Estimated reading: 4 minutes 6 views

resources

Download the Drawing

Constraints Tutorial

Download the sample drawing for this tutorial.

Display in the editor the Constraints toolbar and the Variables/Equations popup. These are accessed from the Window menu.

In the example below, the line defined as D1 is set to a current value of 32.

The circle defined as D3 is of equal radius to the circle to the left of it. The current Radius for both circles is set 4.

The line defined as D4 a line with a constrained angle of 45°.

The dimensions shown are inserted as Smart Dimensions (Window | Constraints | Smart Dimension, or Draw | Dimension | Smart Dimension) allowing them to be updated in the Value field and responsive to design rules and formulas input into the Equation field.

Constrained sketch

In the example above, auto-constraints were applied to the sketch, which attaches all logical constraints to the sketch. In this case, concentric, coincident, vertical and horizontal constraints were added.

The line associated with D1 is currently set to a length of 32, but can be updated in the Equation field of D1. All associated geometric constraints will be recruited if the value of D1 is updated, maintaining the integrity of connected lines.

By adding the Equal constraint to the 2 lines associated with D2, both lines will remain in equal length to each other, irrespective of the length input into the D2 Equation field.

By adding the Equal constraint to the 2 circles associated with D3, both circles will remain in equal diameter to each other, irrespective of the diameter input into the D3 Equation field.

The line associated with D4 is constrained to an angle of 45° and the integrity of this angle will be maintained during the update of associated constrained objects. For example, if the length of D1 is modified, the line associated with D4 will maintain its angle of 45°.

Updating a value

In the example below, the value of D1 will be changed from 32 to 40. The new value of 40 is input into the Equations field. As can be observed from the illustration below, the integrity of connected lines, including the angle of D4 is maintained.

Changing the value of D1; maintains the integrity of associated conditions

Variables and Equations

Formulas defined in the Equation field are used to define the relational values between objects and to create predictive behavioral patterns when associated constraints are modified. Simple formulas are used to fix an object’s position in relation to other objects and are commonly referred to as a Design Rule.

When a condition is applied in the Equation field, it defines a predictable behavioral pattern when the constrained sketch object is updated. For example, in the illustration below, a condition will be applied to imply that the length of the line defined as D2 will always remain exactly half of the value of the line defined as D1.

The formula D1/2 is input into the Equation field of D2 to imply that the length of D2 will always be maintained as half the length of D1.

Creating a relationship using an Equation

When changes are applied D1 by inputting a new value in the Equation field, the relationship to D2 is maintained, shown below. In the example below, the length of D2 is still half the value of D1.

Maintaining a defined relationship after update

The diameter of the 2 circles is maintained as equal when the value of D3 is updated, shown below.

Circle diameters maintained as equal when updated

Sketch Constraints on a Solid

When the curves of a sketch are extruded or lathed to form a solid, all constraints associated with the original sketch are retained. This means that changes to the model can be done by updating the sketch constraints.

In the example below, the sketch is extruded to a height of 15, creating a solid.

Sketch objects extruded to a height of 15

By adjusting the values of the constraints in the Equation fields, the properties of the solid will be correspondingly updated. In the example below, the value of D1 is changed to 50. The associated value of D2 is also updated.

Updating the constrained sketch of a solid

In the example below, the height of the extrusion has been changed to 5. This is done by double-clicking on the solid and updating the object distance data in the Inspector. The new value for D1 has been updated to 100. All associated constraints are maintained, including the angle of D4.

New extrusion height of 5; new value of 100 for D1

Leave a Comment

Share this Doc

Constrants Tutorial

Or copy link

CONTENTS