Component Parameters Dialog
The Component Parameters dialog allows you to create or enter values for Component Parameters. This dialog is accessible from the Component Properties Dialog by highlighting a Custom Component and pressing the Modify button.
Name
Name of the parameter. This field should not be a numeric operator such as +-/% etc.
Type
Template parameters can be any one of the following:
User
|
This is the most common type of parameter. It can be a numerical value or a slope percent.
|
Reference Feature X Offset
|
Allows the user to specify an optional horizontal alignment instead of a numerical offset from center-line. See Reference Features for more information.
|
Reference Feature Y Offset
|
Allows the user to specify an optional vertical alignment instead of a numerical offset from center-line. See Reference Features for more information.
|
Reference Surface
|
Allows the user to specify a ground layer surface.
|
System
|
This variable is a predefined value such as super elevation or curve widening.
|
Expression
|
This variable is used to enter a mathematical expression.
|
Surface Function
|
This variable is used to create a surface from 2 other surfaces (Surface A and Surface B).
|
Fragment and Leg definitions can refer to Parameters from their parent component. The parameters are evaluated before the template is processed. The values are substituted into the corresponding fields in the Fragments and Legs before they are processed.
Description
The parameter description.
Apply As slope
If set, the parameter will be applied as a slope %.
User Editable Check Box
If set, the user will be allowed to change the value of the parameter.
User Overridable Check Box
If set, the user will be allowed to override the value of the parameter.
Expression
An expression consisting of other parameters and constants can be entered.
The function string understood by the class is very similar to the C-syntax.
Arithmetic float expressions can be created from float literals, variables
or functions using the following operators in this order of precedence:
() expressions in parentheses first
-A unary minus
A^B exponentiation (A raised to the power B)
A*B A/B A%B multiplication, division and modulo
A+B A-B addition and subtraction
A=B A<B A>B comparison between A and B (result is either 0 or 1)
A&B result is 1 if int(A) and int(B) differ from 0, else 0.
A|B result is 1 if int(A) or int(B) differ from 0, else 0.
Since the unary minus has higher precedence than any other operator, for
example the following expression is valid: x*-y
Note that the '=' comparison can be inaccurate due to floating point
precision problems (eg. "sqrt(100)=10" probably returns 0, not 1).
The class supports these functions:
abs(A)
|
Absolute value of A. If A is negative, returns -A otherwise returns A.
|
acos(A)
|
Arc-cosine of A. Returns the angle, measured in radians, whose cosine is A.
|
acosh(A)
|
Same as acos() but for hyperbolic cosine.
|
asin(A)
|
Arc-sine of A. Returns the angle, measured in radians, whose sine is A.
|
asinh(A)
|
Same as asin() but for hyperbolic sine.
|
atan(A)
|
Arc-tangent of (A). Returns the angle, measured in radians, whose tangent is (A).
|
atan2(A,B)
|
Arc-tangent of A/B. The two main differences to atan() is that it will return the right angle depending on the signs of A and B (atan() can only return values betwen -pi/2 and pi/2), and that the return value of pi/2 and -pi/2 are possible.
|
atanh(A)
|
Same as atan() but for hyperbolic tangent.
|
ceil(A)
|
Ceiling of A. Returns the smallest integer greater than A. Rounds up to the next higher integer.
|
cos(A)
|
Cosine of A. Returns the cosine of the angle A, where A is measured in radians.
|
cosh(A)
|
Same as cos() but for hyperbolic cosine.
|
cot(A)
|
Cotangent of A (equivalent to 1/tan(A)).
|
csc(A)
|
Cosecant of A (equivalent to 1/sin(A)).
|
eval(...)
|
This a recursive call to the function to be evaluated. The number of parameters must be the same as the number of parameters taken by the function. Usually called inside if() to avoid infinite recursion.
|
exp(A)
|
Exponential of A. Returns the value of e raised to the power A where e is the base of the natural logarithm, i.e. the non-repeating value approximately equal to 2.71828182846.
|
floor(A)
|
Floor of A. Returns the largest integer less than A. Rounds down to the next lower integer.
|
if(A,B,C)
|
If int(A) differs from 0, the return value of this function is B, else C. Only the parameter which needs to be evaluated is evaluated, the other parameter is skipped; this makes it safe to use eval() in them.
|
int(A)
|
Rounds A to the closest integer. 0.5 is rounded to 1.
|
log(A)
|
Natural (base e) logarithm of A.
|
log10(A)
|
Base 10 logarithm of A.
|
max(A,B)
|
If A>B, the result is A, else B.
|
min(A,B)
|
If A<B, the result is A, else B.
|
sec(A)
|
Secant of A (equivalent to 1/cos(A)).
|
sin(A)
|
Sine of A. Returns the sine of the angle A, where A is measured in radians.
|
sinh(A)
|
Same as sin() but for hyperbolic sine.
|
sqrt(A)
|
Square root of A. Returns the value whose square is A.
|
tan(A)
|
Tangent of A. Returns the tangent of the angle A, where A is measured in radians.
|
tanh(A)
|
Same as tan() but for hyperbolic tangent.
|
Examples of function string understood by the class:
"1+2"
"x-1"
"-sin(sqrt(x^2+y^2))"
"sqrt(XCoord*XCoord + YCoord*YCoord)"
SurfaceA / SurfaceB / Operation
These combo boxes allow you to choose surfaces A and B and an Operation for Surface Function variables. A Surface function can be used to create a new surface which is either a Minimum or Maximum of 2 other surfaces.
Horizontal Extents are controlled by All or Overlap radio buttons.
The surface will be created over the defined horizontal extent as follows:
If All is selected, the new surface will exist wherever SurfaceA is defined or SurfaceB is defined.
If Overlap is selected, the new surface will exist only where SurfaceA and SurfaceB overlap.