Using Dimensional Constraints

Commands: DIMCONSTRAINT, DCALIGNED, DCANGULAR, DCCONVERT, DCDIAMETER, DCHORIZONTAL, DCLINEAR, DCRADIUS, DCVERTICAL, DELCONSTRAINT

 

The dimensions of the geometry can be controlled by dimensional constraints:

 

 

NOTE

Dimensional constraints are created using the current dimension style.

 

To edit dimensional constraints

Dimensional constraints can be edited using the DDEDIT command or in the Properties bar.

To edit dimensional constraints in the Properties bar.

  1. Select the dimensional constraint.
    The properties of the entity display in the Properties bar.

  2. Type a new value or expression in the Expression field, then press Enter.
    The readout of the Value field changes accordingly.

  1. Press the  Esc key to unselect.

 

NOTE

You can select multiple dimensional constraints simultaneously to set their value equally.

 

To edit a single dimensional constraint:

  1. Double click the dimensional constraint.
    The command bar reads: _ddedit
    The Edit Text dialog box displays.

  1. Type a new value in the Text field, then press Enter or click the OK button.
    The new value is applied and the geometry is rebuild accordingly.

To edit multiple dimensional constraints:

  1. Type ddedit or ed in the command bar, then press Enter.
    The command bar reads: Select entity to modify:

  2. Click the a dimensional constraint.
    The Edit Text dialog box displays.

  1. Type a new value in the Text field, then press Enter or click the OK button.

  2. (option) Repeat steps 2 and 3 to edit more dimensional constraints.

  3. Press Enter or right click to stop editing dimensional constraints.
    All edited dimensional constraints are updated simultaneously.
    The geometry is rebuild accordingly.

Using expressions to define dimensional constraints

Each dimensional constraint is named automatically upon its creation.

 

The naming is as follows:

distance: d1, d2, d3, ...

radius: rad1, rad2, rad3, ...

diameter: dia1, dia2, dia3, ..

angular: ang1, ang2, ang3, ..

To rename a dimensional constraint

  1. Select the dimensional constraint.
    The properties of the entity display in the Properties bar.

  2. Edit the Name field.

  3. Press the  Esc key to unselect.

The name of a constraint can be used in a mathematical expression to define another dimensional constraint.

The dimensions of the bracket below are controlled through the rad1 radius, d1 distance and ang1 angular dimensional constraints.

The radius of the hole (rad2) and the length of the second leg (d2) are defined by expressions.

Geometrical constraints force the width of the second leg and the hole in it to be equal to the first leg.

 

 

NOTES

  • The constants Pi and e can be used in expressions.

  • The CLEANUNUSEDVARIABLES command purges variables not used in constraint expressions and not linked to dimensions.

 

Expressions are evaluated according to the standard mathematical rules of precedence:

  1. Expressions within brackets; innermost sets first.

  2. Standard operations order:  

    1. exponent

    2. multiplication and division

    3. addition and subtraction

  3. Operators of equal precedence from left to right.

Using operators in expressions

The following operators can be used in expressions:

 

Operator

Description

+

Addition

-

Subtraction or Negative

*

Multiplication

/

Division

^

Exponentiation

%

Modulo or Remainder operator

The expression "5 % 2" would evaluate to 1, because 5 divided by 2 leaves a quotient of 2 and a remainder of .

 

Using functions in expressions

The following functions can be used in expressions:

 

Function

Syntax

Cosine

cos(expression)

Sine

sin(expression)

Tangent

tan(expression)

Arc cosine

acos(expression)

Arc sine

asin(expression)

Arc tangent

atan(expression)

Hyperbolic cosine

cosh(expression)

Hyperbolic sine

sinh(expression)

Hyperbolic tangent

tanh(expression)

Arc hyperbolic cosine

acosh(expression)

Arc hyperbolic sine

asinh(expression)

Arc hyperbolic tangent

atanh(expression)

Square root

sqrt(expression)

Signum function (-1,0,1)

sign(expression)

Round to nearest integer

round(expression)

Truncate decimal

trunc(expression)

Round down

floor(expression)

Round up

ceil(expression)

Absolute value

abs(expression)

Largest element in array

max(expression1;expression2) 1

Smallest element in array

min(expression1;expression2) 1

Degrees to radians

d2r(expression)

Radians to degrees

r2d(expression)

Logarithm, base e

ln(expression)

Logarithm, base

10 log(expression)

Exponent, base e

exp(expression)

Exponent, base 10

exp10(expression)

Power function

pow(expression1;expression2) 1

Random decimal, 0-1

Random

 

(1) Use the list separator character as defined on your system: , (comma) or ; (semicolon).

 

 

 

 

 

 

 

 

 

 

 

 

 


© Menhirs NV. All rights reserved.