Basic Mathematical Functions

This page discusses:

CubicInterpolation

Must be used when creating a parallel curve from a law.

Signature

CubicInterpolation(arg1: Real, arg2: Real, arg3: Real) : Real

Arguments

NameInput / OutputRequired?TypeComment
arg1InYesReal-
arg2InYesReal-
arg3InYesReal-

ReturnType

Real

Example

  1. Create a line in Generative Shape Design.

  2. Access the Engineering Rules Capture app and create the law below: FormalReal.1 = CubicInterpolation(1,50,FormalReal.2).

  3. Back to the Generative Shape Design, create a parallel curve. Select the Law mode and specify the law above as the one to be applied.

LinearInterpolation

Must be used when creating a parallel curve from a law.

Signature

LinearInterpolation(arg1: Real, arg2: Real, arg3: Real) : Real

Arguments

NameInput / OutputRequired?TypeComment
arg1InYesReal-
arg2InYesReal-
arg3InYesReal-

ReturnType

Real

Example

  1. Create a line in Generative Shape Design.

  2. Access the Engineering Rules Capture app and create the law below: FormalReal.1 = LinearInterpolation(1,9,FormalReal.2).

  3. Back to Generative Shape Design, create a parallel curve. Select the Law mode and specify the law above as the one to be applied.

abs

Calculates the absolute value of the argument.

Signature

abs(Real) : Real

Arguments

NameInput / OutputRequired?TypeComment
InYesReal-

ReturnType

Real

acos

Calculates the arccosine.

Note: These functions are designed to work on Angle values. They however accept a Real as input but a warning appears in this case.

Signature

acos(Real) : ANGLE

Arguments

NameInput / OutputRequired?TypeComment
InYesReal-

ReturnType

ANGLE

acosh

Calculates the hyperbolic arccosine.

Note: These functions are designed to work on Angle values. They however accept a Real as input but a warning appears in this case.

Signature

acosh(Real) : Real

Arguments

NameInput / OutputRequired?TypeComment
InYesReal-

ReturnType

Real

asin

Calculates the arcsine

Note: These functions are designed to work on Angle values. They however accept a Real as input but a warning appears in this case.

Signature

asin(Real) : ANGLE

Arguments

NameInput / OutputRequired?TypeComment
InYesReal-

ReturnType

ANGLE

asinh

Calculates the hyperbolic arcsine.

Signature

asinh(Real) : Real

Arguments

NameInput / OutputRequired?TypeComment
InYesReal-

ReturnType

Real

atan

Calculates the arctangent.

Note: These functions are designed to work on Angle values. They however accept a Real as input but a warning appears in this case.

Signature

atan(Real) : ANGLE

Arguments

NameInput / OutputRequired?TypeComment
InYesReal-

ReturnType

ANGLE

atanh

Calculates the hyperbolic arctangent.

Signature

atanh(Real) : Real

Arguments

NameInput / OutputRequired?TypeComment
InYesReal-

ReturnType

Real

ceil

Returns the smallest integer value that is greater than or equal to the value specified in the argument.

Signature

ceil(Real) : Real

Arguments

NameInput / OutputRequired?TypeComment
InYesReal-

ReturnType

Real

cos

Calculates the cosine(cos)

Note: These functions are designed to work on Angle values. They however accept a Real as input but a warning appears in this case.

Signature

cos(Real) : Real

Arguments

NameInput / OutputRequired?TypeComment
InYesReal-

ReturnType

Real

Example

Real.1 = cos(PI*1rad/4) 
			Real.1 = cos(45deg)

cosh

Calculates the hyperbolic cosine(cosh).

Signature

cosh(Real) : Real

Arguments

NameInput / OutputRequired?TypeComment
InYesReal-

ReturnType

Real

exp

Returns the exponential.

Signature

exp(Real) : Real

Arguments

NameInput / OutputRequired?TypeComment
InYesReal-

ReturnType

Real

floor

Returns the largest integer value that is less than or equal to the value specified in the argument.

Signature

floor(Real) : Real

Arguments

NameInput / OutputRequired?TypeComment
InYesReal-

ReturnType

Real

int

Returns the integer part of the argument.

Signature

int(v: Real) : Integer

Arguments

NameInput / OutputRequired?TypeComment
vInYesReal-

ReturnType

Integer

ln

Returns the natural logarithm.

Signature

ln(Real) : Real

Arguments

NameInput / OutputRequired?TypeComment
InYesReal-

ReturnType

Real

log

Returns the logarithm.

Signature

log(Real) : Real

Arguments

NameInput / OutputRequired?TypeComment
InYesReal-

ReturnType

Real

max

Returns the highest parameter.

Signature

max(arg1: Real [, arg2: Real, ..]) : Real

Arguments

NameInput / OutputRequired?TypeComment
arg1InYesReal-
arg2InNoReal-

ReturnType

Real

min

Returns the smallest parameter.

Signature

min(arg1: Real [, arg2: Real, ..]) : Real

Arguments

NameInput / OutputRequired?TypeComment
arg1InYesReal-
arg2InNoReal-

ReturnType

Real

mod

Gives the remainder on division of Real by Integer. The returned value is of integer type.

Signature

mod(Real, Integer) : Real

Arguments

NameInput / OutputRequired?TypeComment
InYesReal-
InYesInteger-

ReturnType

Real

not

Verifies the contrary of the expression between parentheses.

Signature

not(Boolean) : Boolean

Arguments

NameInput / OutputRequired?TypeComment
InYesBoolean-

ReturnType

Boolean

Example

not(A==B) is the equivalent of A<>B
Note: Use real numbers only.

round

Rounds numbers of the form x.5 towards the nearest even integer.

Signature

round(Real) : Real

Arguments

NameInput / OutputRequired?TypeComment
InYesReal-

ReturnType

Real

round

Returns a rounded number. This method is available for the types requiring units (Length, Angle, ...).

Signature

round(Real, String, Integer) : Real

Arguments

NameInput / OutputRequired?TypeComment
InYesRealReal number that you want to round (for example 13.552).
InYesStringUnit (for example "mm").
InYesIntegerCorresponds to the number of digits that you want to display after the dot.

ReturnType

Real

Example

Formula.2: Length.2=round(Length.1, "mm",2)

Important: A dimensioned value is required for the round function to work properly. Please find here below some examples on how the Round function works:
  • round (12.333mm,"mm",1) will return 12.3 for the value is a length
  • round (12.333mm+1mm,"mm",1) will display an error for the sum result is a non-dimensioned real value
  • round (-12.333mm,"mm",1)will return an error for the subtraction result is a non-dimensioned real value
The two last examples results using the + / - arithmetic operators may seem strange. However, this should be considered as a standard behavior. Beware that using the + / - arithmetic operators will always return a non-dimensioned value. When using this function, a parameter is logically selected as input so the + / - issue should not be recurrent in this context.

sin

Calculates the sine.

Note: These functions are designed to work on Angle values. They however accept a Real as input but a warning appears in this case.

Signature

sin(Real) : Real

Arguments

NameInput / OutputRequired?TypeComment
InYesReal-

ReturnType

Real

sinh

Calculates the hyperbolic sine

Signature

sinh(Real) : Real

Arguments

NameInput / OutputRequired?TypeComment
InYesReal-

ReturnType

Real

sqrt

Returns the square root.

Signature

sqrt(Real) : Real

Arguments

NameInput / OutputRequired?TypeComment
InYesReal-

ReturnType

Real

tan

Calculates the tangent.

Note: These functions are designed to work on Angle values. They however accept a Real as input but a warning appears in this case.

Signature

tan(Real) : Real

Arguments

NameInput / OutputRequired?TypeComment
InYesReal

ReturnType

Real

tanh

Returns the hyperbolic tangent.

Signature

tanh(Real) : Real

Arguments

NameInput / OutputRequired?TypeComment
InYesReal-

ReturnType

Real