Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The description of a parametric part consists of the entire contents of a text file, except comments, tabs, and other control characters, which are ignored.
Comments are specified either using "//" characters that mean that all subsequent characters up to the end of the line are comments, or using the pair "/" and "/" that denote beginning and end of the comment, respectively.

A text description is a set of two types of operators:
<Identifier>
and
<Expression>;

Identifiers

The <Identifier> defines the symbolic name of an object. It is a set of Roman letters and Arabic numerals, which must start with a letter.

For example valid names would be:

PART2a
MyPart
A134

Object identifiers may not be the same as names of functions or such names as PI, or LINEAR. These are reserved words that are used to designate the constants of the scripting language. The list of all reserved names is provided in the reserved word list which appears at the end of this chapter.

...

Expressions define the associated identifier. Expression syntax matches the expression syntax in the majority of programming languages. They may define numeric value, arithmetic operations, the dependence of the defined object on other objects and function calls.
The structure of a function call is:
<Function name> (<list of parameters>),

Examples of correct expression syntax:

Code Block
(D \--1/4) * k;

...


Polyline(Point(0, 0.25 - 1/8), Point(0, D), Arc1(L-C, - m, m), Point(0,0));

...


A = B + 0.5;

...


B = 7;

Arithmetic Operations

Arithmetic operations may use the standard arithmetical operators '+' (addition), '--'(subtraction), '*' (multiplication), '/' (Division) and parenthesis '('and ')', to determine the sequence of performing arithmetic operations. Object identifiers and numbers serve as operands.

...

A script contains full description of a parametric part. The collection of script operators determines which actions need to be performed to create the resultant object(s). Correct understanding of a script, requires having a clear understanding of how its operators are interpreted.
Identifiers that are used in a <Expression> must be defined. In other words it must have been used as:

<Identifier> = <Expression>;

The list of resultant objects is defined in the Output(..) operator. The Output(..) operator contains a list of which objects are to be displayed in the resulting part. This operator must be present in the script. Each object in the list of arguments for Output(..) must be defined. In other words it must have been used as:

<Identifier> = <Expression>;

This operator must be present in the script. At least one object must be listed in the Output operator, but you need not output every object used in the script.
The Output operator determines the method that will be used to create an object with this name.

...

The following situations:
A = B + 0.5;
B = sin(A);
or
A = C+5;
B = D+42;
C = (3*(2+A));*
D = A/2;


are not allowed. The first case A and B define each other directly. In the second case A is defined by B through C, and B is defined by A through D. This also means that an identifier is not allowed to depend on itself. For example, you cannot use an operator of this form:
H = H*1.05;

Panel

NOTE: The sequence of script operators is not important (except certain special cases that will be described later); because operators are sorted before the script is run.


Basic Functions

Probably the most significant advantage of this method of creating parametric parts is the compact size and clarity of the text description of parametric parts in script form. The set of basic functions used in such a description, determines the level of clarity and simplicity of scripts for a particular class of parametric parts.
Note: It is intended that the set of basic functions will expand from version to version.

...