Geometric Description Language (GDL)
Geometric Description Language (GDL) provides a means to define the original representation of component models in the CADMATIC Plant Modeller system. This representation will be called the GDL-representation of component models. A component model consists of a geometric model and optionally a set of connection points and attributes. The GDL-representation is the result of GDL-declarations stored in a text format. Plant Modeller reads the contents of a GDL object (or embedded GDL) when it needs to create an internal representation for a component model. Geometric operations (visualization, interference analysis, etc.) are always performed using internal representations of component models.
Before any further discussion, let's first look at an example of a GDL file:
/*
#ident......: XYZ Centrifugal pump
#author.....: Joe Sixpack
#data.......: 23 May 1990
*/
/*#@ADD_PARAM_INFO
0 0 100 0;3 0 300 0;3 0 570 0;6 0 150 0;
*/
PARAMS : NS, /* Nominal size */
A, B, /* dim. A and B as in manuf. brochure */
mas;
origin = POINT(0,0,0);
x_axis = DIRECTION(1,0,0);
y_axis = DIRECTION(0,1,0);
p2 = POINT(origin, x_axis, B + A);
radius = SQRT(A*A + B*B)/2;
body = CYLINDER(origin, p2, radius, 0);
IMPORT3D("PumpXYZ.dxf", origin, x_axis, y_axis);
outlet = NODE(1, p2, x_axis, NS, 0, 100, 0,0);
MAS = ATTRIBUTE(mas);
From the above example you can make the following observations:
-
Comments can be placed anywhere in the file.
-
The first comment is a general note for the whole GDL. Appropriately selected keywords can be used to enable searching, using simple text search from Object Browser. However, usually attribute info is stored as COS attributes, not hidden as a comment inside the GDL. This general note finds use to store the history of modifications made to the GDL. This simplifies blame placement. This comment is optional to the GDL syntax.
-
Text contains statements ending in semicolons.
-
You can use parameters (actual values set externally, default values are provided inside a special formatted comment). This structured parameter set comment is automatically generated by the ICM module. The default values are to be used when the geometry of the GDL object is visualized in the COS browser, after it is selected.
-
Objects are identified by names.
-
Numeric expressions can be used wherever a number is needed.
A geometric model for a component model is built from a set of geometric primitives which can have the following shapes:
-
box
-
plate
-
sweep
-
beam
-
cylinder
-
cone
-
ecc. cone
-
sphere
-
dish
-
toroid
-
flange
-
surface of revolution
-
parametric shape script
-
inline_bsv
Currently the geometric modeler has the following abilities:
-
position primitives into model space
-
cut beams, sweeps, cylinders, cones, eccentric cones and toroids
-
generate a series of primitives from one existing primitive, with stepped rotations
-
apply a Boolean operation to the intersection of two objects