Show only results for:

# Mathematics

## Angles

Angles are interpreted in radians if they are not followed by a degree sign (°). You can type PI or 180° for an angle of 180°. If you can’t find the degree sign on your keyboard, key in dgn instead, this will be automatically replaced by °.

## Intrinsic math functions

SymbolDesigner includes a sophisticated parser for mathematical functions. These functions may be used in any parameter cell in the project tree view (parameter cells are marked with the symbol).

Example for a formula keyed-in by the user:

Sin ( 60° ) * ( 10 * Geometry.Cover.Geometry.L1 / 4 - 0.025 * OperatorDiameter )

The formula shows the referencing style to other nodes: Geometry.Cover.Geometry.L1 references to the value of the Geometry.L1 sub-node of a graphical primitive named Cover (e.g. a box). The colour/font style mark-up is automatically done by the parser:

Formula part Font style:
Operators Upright, blue
Numbers Upright, black
Units Upright, bold, black
Functions Upright, purple
Variables Italics, black

The parser also interprets several constants:

Constant Value
Pi 3.1415…
None 0
Point 1
Line 2
Fill 3
Hidden 0
SimplePhysical 1
DetailPhysical 16
Insulation 32
Operation 64
Maintenance 128
ReferenceGeometry 256 The constants are not necessarily constants in a mathematical sense. You should use them as placeholders for the appropriate values which will be automatically filled in by 3D SymbolDesigner: If in software A None means 0 but in software B None means -1, 3D SymbolDesigner will properly replace None according to the export target.

These are the pre-defined operators:

Operator Operation
- Subtraction
* Multiplication
/ Division
^ Power
( Left bracket
) Right bracket

These functions are supported by the parser:

Function Function name Description
Abs(x) Absolute value Returns the absolute value of x.
Cos(x) Cosine trigonometric function
Exp(x) Exponential function
Fix(x) Returns the integer portion of the operand. If x is negative, Fix returns the first negative integer greater than or equal to x.
Int(x) Returns the integer portion of the operand. If x is negative, Int returns the first negative integer less than or equal to x.
Ln(x) Natural logarithm
Max(x,y) Compares x and y and returns the greater operand.
Min(x,y)

Compares x and y and returns the smaller operand.

Please note: min (lowercase) is the unit sign for minutes.

Now(x) Returns the date (in Visual Basic).
Rnd(x) Returns a random number.
x <0 The same number every time, using x as the seed.
x=0 The most recently generated number.
x>0 The next random number in the sequence.
Sgn(x) Sign function Returns the sign of x.
Sin(x) Sine trigonometric function Returns the sine of x (in radians).
Sqrt(x) Square root Returns the square root of x.
Tan(x) Tangent trigonometric function Returns the tangent of x.
Time Returns the seconds since midnight (in 3D SymbolDesigner).
Returns the time (in Visual Basic)
Asin(x) Inverse sine trigonometric function Asin(x) = Atan(x / Sqrt (-x * x + 1))
Acos(x) Inverse cosine trigonometric function Acos(x) = Atan(-x / Sqrt (-x * x + 1)) + 2 * Atan(1)
Atan(x) Inverse tangent trigonometric function

Units are defined in the Config.xls in the data subdirectory of 3D SymbolDesigner.

## Derived math functions

The following non-intrinsic math functions can be derived from the intrinsic math functions. These functions are not yet included in 3D SymbolDesigner but will be included in a future version of the software, so please regard the names of these functions as reserved:

Function Function name Derived equivalents
Sec(x) Secant Sec(x) = 1 / Cos(x)
CoSec(x) Cosecant CoSec(x) = 1 / Sin(x)
CoTan(x) Cotangent CoTan(x) = 1 / Tan(x)
ArcSec(x) Inverse Secant ArcSec(x) = ArcTan(x / Sqrt(x * x - 1)) + Sgn((x) -1) * (2 * ArcTan(1))
ArcCoSec(x) Inverse Cosecant ArcCoSec(x) = ArcTan(x / Sqrt(x * x - 1)) + (Sgn(x) - 1) * (2 * ArcTan(1))
ArcCoTan(x) Inverse Cotangent ArcCoTan(x) = ArcTan(x) + 2 * ArcTan(1)
HSin(x) Hyperbolic Sine HSin(x) = (Exp(x) - Exp(-x)) / 2
HCos(x) Hyperbolic Cosine HCos(x) = (Exp(x) + Exp(-x)) / 2
HTan(x) Hyperbolic Tangent HTan(x) = (Exp(x) - Exp(-x)) / (Exp(x) + Exp(-x))
HSec(x) Hyperbolic Secant HSec(x) = 2 / (Exp(x) + Exp(-x))
HCoSec(x) Hyperbolic Cosecant HCoSec(x) = 2 / (Exp(x) - Exp(-x))
HCoTan(x) Hyperbolic Cotangent HCoTan(x) = (Exp(x) + Exp(-x)) / (Exp(x) - Exp(-x))
HArcSin(x) Inverse Hyperbolic Sine HArcSin(x) = Log(x + Sqrt(x * x + 1))
HArcCos(x) Inverse Hyperbolic Cosine HArcCos(x) = Log(x + Sqrt(x * x - 1))
HArcTan(x) Inverse Hyperbolic Tangent HArcTan(x) = Log((1 + x) / (1 - x)) / 2
HArcSec(x) Inverse Hyperbolic Secant HArcSec(x) = Log((Sqrt(-x * x + 1) + 1) / x)
HArcCoSec(x) Inverse Hyperbolic Cosecant HArcCoSec(x) = Log((Sgn(x) * Sqrt(x * x + 1) +1) / x)
HArcCoTan(x) Inverse Hyperbolic Cotangent HArcCoTan(x) = Log((x + 1) / (x - 1)) / 2
Logarithm to base N LogN(x) = Log(x) / Log(N)

## Naming rules

There are some basic rules for how parameters and objects may be named:

1. Inside the tree view, any combination of Latin characters and numbers is allowed for naming parameters and objects. The parameter name must not be a number, physical unit or reserved word and cannot contain: -, (, ), *, /, ^, &, +. The reserved words are listed in the Config.xls in the worksheet ReservedWords.

2. Parameter mapping names must obey the limitations of Visual Basic (no reserved words, no names starting with numbers) and of the database used by SmartPlant 3D (name length). The used parameter mapping names must be unique.

3. Parameter mapping names must be carefully chosen; they are loaded into the catalogue and will remain there. Please ask the SmartPlant 3D catalogue administrator in your company which parameter names you should use.

4. Variant names must be shorter than 19 characters, no reserved words and no “Default” or “” value. The variant names must be unique and cannot be identical to the class name.