Working with Constraints and Dimensions
With the Design Module you can apply constraints and dimensions to geometry in 2D geometry sequences, including in geometric parts and on work planes in 3D. By using drawing tools you can quickly draw geometry that resembles a desired shape, then, by adding constraints and dimensions, you can obtain the final geometry.
A dimension (or constraining dimension) is a requirement on geometric entities that has a value, for example the distance between vertex 3 and edge 7 should be 5[m]. You may also define a dimension using an expression that may include global parameters, for example A*5[m] that depends on the parameter A. A constraint is a requirement on geometric entities that does not have a value; for example, a requirement that edges 9 and 11 should be perpendicular.
When you apply a constraint or dimension feature, the software immediately adjusts the drawing to satisfy the applied feature. It does this by adjusting the values of the input fields of the geometric features that created the objects. The constraints and dimensions are visualized with symbols and arrows in the Graphics window.
Enabling the Constraints and Dimensions Functionality
The constraint and dimension functionality is automatically enabled when you add a constraint or dimension feature to a 2D geometry sequence using the buttons in the Constraints and Dimensions sections in the Sketch toolbar, and from the context menus in the Graphics and Model Builder windows. To manually enable the use of constraints and dimensions in a 2D geometry or part, or work plane, go to the Settings window for the Geometry or Plane Geometry node and set Use constraints and dimensions to On. In addition to enabling the use of constraint and dimension features, this check box also enables the editing of objects that result from previous geometric operations by dragging of vertices and edges in the Graphics window. Note that turning this functionality on for a geometry that consists of a very large number of edges and vertices may slow down the sketch visualization, and it is therefore not recommended.
To enable constraints and dimensions by default in new models make sure that the Use in new geometries check box is selected on the Geometry>2D Constraints and Dimensions page in the Preferences dialog box.
When you open an existing model, the constraint and dimension features in the model are normally active. To change this behavior clear the Use when opening a model that uses constraints and dimensions check box on the Geometry>2D Constraints and Dimensions page in the Preferences dialog box. After this, when you open a model that uses constraints and dimensions you will get a question whether you want to disable the use of constraints and dimensions. If you answer yes, the constraint and dimension features will be loaded, but they will not have any effect.
If you want to avoid that dimension and constraint features modify the input fields of a geometry feature click the Constrain () button (visible only when the use of constraints and dimensions is enabled) to the right of the text field in the Settings window of the feature. This locks the text field (the Constrain button icon changes into to accept only values or expressions that are entered directly, so that the text field now becomes a built-in dimension. In some cases this is also indicated in the Graphics window by the built-in dimensions being visualized with arrows.
Constraints and dimensions can be applied to just about any geometry object, for example to the output of features you have added from the Model Builder, and the output of features such as the Union operation. The following features create objects that cannot be modified using constraints or dimensions:
Note that even when an object cannot be modified by a constraint or dimension feature, its entities can be used as input for such a feature together with entities that can be modified.
When applying a constraint or dimension to a straight or circular edge, the entire line or full circle is usually considered. For example, a dimension that constrains the distance between a vertex and a straight edge really constrains the distance between the vertex and the straight line underlying the edge.
Creating Constraint and Dimension Features
When you are creating a drawing in sketch mode — that is, the Sketch button is active; see also The Sketch Visualization — activate the Snap to Geometry () and Constrain ) buttons in the Draw Settings group of the Sketch toolbar to automatically generate constraints as you draw curve segments using the geometry primitives. For example, a Coincident constraint is automatically applied when a vertex is snapped to an existing vertex, and Perpendicular and Tangent constraints may be applied where appropriate between curve segments as you draw them.
When applying constraint and dimension to a geometry it is recommended to add the constraints before the dimensions. The applied constraints and dimensions appear as feature nodes in the geometry sequence and the corresponding symbols are displayed in the Graphics window. You can create constraint and dimension features by using the toolbar buttons from the Sketch toolbar or the contextual menu in the Graphics window, as described below in the sections Creating Constraints and Creating Dimensions, or by using the contextual menu of a Geometry or Plane Geometry node in the Model Builder. By the latter method you first add a constraint or dimension feature to the geometry sequence, then you select the input entities in its Settings window. When assigning the selections in the Settings window, note that the numbering of the vertices and edges in the sketch visualization (see The Sketch Visualization) sometimes differs from the numbering used in the nonsketch visualization. After building the feature the symbol for the constraint will appear the Graphics window.
Creating Constraints
You can add a constraint using the buttons from the Sketch toolbar by one of the following methods:
Click the Constraint () button in the Sketch toolbar, also available from the right-click context menu in the Graphics window, to enter the smart constraint mode. In this mode, you can start with selecting edges and vertices in the Graphics window. When you have selected a sufficient number of entities, a constraint symbol will appear next to the mouse pointer. This symbol indicates a suggested constraint for the selected entities. If you are satisfied with this suggestion, move the symbol to the desired position on the canvas and left-click to place it there. This will also add the constraint feature node to the geometry sequence, and the geometry will be rebuilt so that you see the effect of the constraint. You can drag the symbol afterward to adjust its position. To select a different type of constraint from the one suggested, click the button of another constraint, from the Sketch toolbar or from the context menu displayed after right-clicking in the Graphics window, before placing the symbol. If a sufficient number of entities are selected for this new constraint, the symbol for the constraint will appear immediately at a default position, and the constraint feature node will be added to the geometry sequence. The smart constraint mode remains active after each applied constraint until you click the Constraint button again, or press Esc.
Click a button (other than Constraint) from the Constraint group of the Sketch toolbar, to select a specific constraint. If you have already selected some entities you can also select an applicable constraint from the context menu displayed when you right-click in the Graphics window. If the preselected entities are sufficient for applying the constraint, the symbol for the constraint will appear immediately at a default position, and the constraint feature node will be added to the geometry sequence. Otherwise, when you have selected a sufficient number of entities, the constraint symbol will appear under the pointer. Move the symbol to the desired position on the canvas and click to place it there. The feature node for the constraint will be added to the geometry sequence, and the geometry will be rebuilt.
Creating Dimensions
You can add a dimension using the buttons from the Sketch toolbar by one of the following methods:
Click the Dimension () button in the Sketch toolbar to enter the smart dimension mode. In this mode, you can start with selecting edges and vertices in the Graphics window. When you have selected a sufficient number of entities, a dimension symbol will appear next to the mouse pointer. This symbol indicates a suggested dimension for the selected entities (also considering the mouse pointer position in relation to the selected entities). If you are satisfied with this suggestion, move the symbol to the desired position on the canvas and click to place it there. This will also add the dimension feature node to the geometry sequence. Change the dimension’s value in the Settings window for the feature; then click Build Selected to see its effect. To select a different type of dimension from the one suggested, click the button of another dimension, from the Sketch toolbar or from the context menu displayed after right-clicking in the Graphics window, before placing the symbol. If a sufficient number of entities are selected for this new dimension, the symbol for the dimension will appear immediately at a default position, and the dimension feature node will be added to the geometry sequence. You can drag the symbol afterward to adjust its position. The smart dimension mode remains active after each applied dimension until you click the Dimension button again, or press Esc.
Click a button (other than Dimension) from the Dimensions group of the Sketch toolbar, to select a specific dimension. If you have already selected some entities you can also select an applicable dimension from the context menu displayed when you right-click in the Graphics window. If the preselected entities are sufficient for applying the dimension, the symbol for the dimension will appear immediately at a default position, and the dimension feature node will be added to the geometry sequence. Otherwise, when you have selected a sufficient number of entities, the dimension symbol will appear under the pointer. Move the symbol to the desired position on the canvas and click to place it there. This will also add the dimension feature node to the geometry sequence. Change the dimension’s value in the Settings window for the feature, then click Build Selected to see its effect.
Constraint and Dimension Symbols
In the Graphics window the constraint and dimension features are visualized with symbols, arrows, and dimension values. These are displayed when the sketch visualization (see The Sketch Visualization) is turned on. To turn on sketch visualization click the Sketch () button on the Geometry, Sketch, or Work Plane toolbars. You can use the constraint and dimension symbols in the Graphics window in the following ways:
Click the Delete () toolbar button or press the Delete key to delete the selected constraints and dimensions.
Status of the Constraints and Dimensions
Before any constraints or dimensions are applied to a geometry it is possible to grab any of the edges or points of the geometry and move it around in all directions. In this state the geometry is underdefined. All geometric entities are possible to move, and they have a gray color in the Graphics window.
As you add constraints or dimensions to the geometry, the software automatically modifies the geometry and computes the remaining degrees of freedom — that is, the directions in which it is still possible to move the geometric entities. The edges and vertices that are not possible to move become black in the Graphics window to signify that they are uniquely defined. In this state the geometry is still underdefined.
When a sufficient number constraints and dimensions are added, all degrees of freedom become locked, so that none of the vertices or edges can be moved. In this state all geometric entities are black and the geometry is now well defined.
Adding further dimensions to the geometry may cause it to be overdefined. In such a state, the geometric entities are colored magenta in the Graphics window. Note that entities might also be colored magenta due to other problems (for example, in case a constraint cannot be applied to the selected entities).
The overall status of the applied constraints and dimensions is also indicated in the Settings window for the Geometry or the Plane Geometry node, at the bottom of the Constraints and Dimensions section. The following status messages can appear there:
Note that the status concerns the state of the geometry when it was last built, that is, the geometry you see in the Graphics window.
Each constraint and dimension node in the Model Builder can have a warning subnode that tells if the node is overdefined or inconsistent. When this happens, the software tries to satisfy the other constraints and dimensions, ignoring the problematic ones.
Building a Subset of the Constraint and Dimension Features
To troubleshoot an overdefined or inconsistent state for constraints and dimensions and to find conflicting constraints or dimensions you can disable the corresponding features in the geometry sequence. Select one or several nodes in the Model Builder, then right-click the selected nodes and select Disable. Rebuild the geometry sequence to see the effect.
Another option is to change how the constraint and dimension features are built in the geometry sequence. To do this, in the Settings window for the Geometry or the Plane Geometry node, in the Constraints and Dimensions section, the Constraint and dimension features to build list provides the following options:
All: This option means that all constraint and dimension features in the sequence are applied, also the features that come after the feature which you are building up to. This is the default setting.
None: Use this option to turn off the build of constraint and dimension features. The corresponding feature nodes are grayed out in the geometry sequence. Note that built-in dimensions defined by the geometric primitive features and other features may still apply.
Up to build target: With this option selected only the constraint and dimension features up to the feature you are building up to are applied to the geometry.
Measuring Dimensions
Dimensions are created by default as constraining dimensions that are treated as a requirement on the drawing. In the settings for a dimension you can change it to become a measuring dimension by toggling the Constrain button from the locked padlock () to the open padlock (). A measuring dimension is not imposing a requirement on the entities it applies to, but rather it is updated according to the other features in the geometry sequence. In the Graphics window, measuring dimensions are displayed in a blue color that is lighter than that of the constraining dimensions. Measuring dimensions are useful when you want to know the value of dimension in the drawing but adding a constraining dimension would overdefine the geometry.
Dimension Parameters
To use the value of a dimension as a parameter in other geometry and nongeometry features select the Create measuring parameter check box in the settings for the dimension. This setting is available for both constraining and measuring dimensions. The following conditions apply when using dimension parameters:
When used in a geometry feature in the same 2D geometry sequence, the expression containing the dimension parameters must be linear in the dimension parameters. For example, if A is a parameter defined in a Global Definitions>Parameters node and geom1.dist3 is a dimension parameter, you can enter the expression 2+A^2*geom1.dist3, but not 2+A^2*geom1.dist3^2.
The Condition expression in If and Else If features does not support dimension parameters.
You can use dimension parameters created in a component in features under a Study, Results, and Global Definitions>Materials nodes.
Help Points
For some constraint and dimension features the Settings window contains a section Help Points where you can specify coordinates for the help points on curved edges. The help points are used as initial guesses when solving the constraint or dimension. More specifically, when there are several solutions to a constraint or dimension, the software chooses the solution that is closest to the help points. When you add a constraint or dimension using a toolbar button, which is the recommended way, the help points are based on the position of the mouse click for the edge selection. When you add a constraint or dimension using the context menu in the Model Builder window the coordinates for the help points are instead set to (0,0), which may sometimes result in a solution that is not desired. The software updates the help point coordinates when the geometry is built, so that the help points correspond to the found solution.