CASPA is an interactive system for the definition and display of sculptured surface geometry. It is independent from the APT4 Sculptured Surfaces system but is fully compatible with it. The CASPA system is intended to be used for the interactive definition of the basic part geometry before using the APT system to define the machining operations. CASPA is also capable of displaying geometry previously defined with the APT system and displaying cutter paths from an APT CL file. The standard graphics output from the system conforms to the international GKS standard and can be displayed on any device which supports this standard. The CASPA system has its own on-line help facility.

10.1 Geometry Definitions

CASPA supports all sculptured surface geometry but not the unbounded APT4 geometry. This means that all geometric definitions described in the earlier chapters of this volume, with the exception of SCURV/SEG (section 2.2.3), can be used with the CASPA system. In addition CASPA supports some of the PLANE definitions described in Volume 1. In every case the language used in CASPA for these geometric definitions is identical to the APT4 Sculptured Surfaces language. The CASPA system uses many of the APT subroutines and the canonical forms generated by CASPA are identical to the APT canonical forms for SCURV and SSURF. Where errors are generated by geometric definitions the error messages are as given in Appendix B.

10.1.1 Point and Polygon Definitions

Valid point definitions in CASPA are: POINT/x, y ›,z! POINT/INTOF, Scurve, FLOW, u, arcno PARAM POINT/INTOF, Ssurf, PARAM, u, v, patchno POINT/INTOF, Plane, Scurve, Nearpt POINT/INTOF, Ssurf, Nearpt POINT/INTOF, Ssurf, Point1, Point2 POINT/INTOF, Ssurf, Point1, Vector ›,Nearpt! The first of these definitions defines the point directly by its 3 coordinates x, y, z. If the z coordinate is omitted the value 0.0 is assumed unless a ZSURF value has been previously defined. The remaining definitions use the INTOF facility which is described in detail in section 9.1 of this manual. In these definitions Scurve is the name of a previously defined curve, Ssurf the name of a sculptured surface and Nearpoint is the name of a previously defined point which is somewhere near the required point and makes the definition unambiguous. The last two definitions define the point as the intersection between a line and a sculptured surface. In one case the line is defined as the line from Point1 to Point2, in the other as the line through Point1 in the direction Vector. Examples: P1 = POINT/1.0, 2.0, 1.0 P2 = POINT/3.0, 1.0, 5.0 P3 = POINT/INTOF, Surf1, PARAM, 0.4, 0.6, 2 P4 = POINT/INTOF, Surf1, P1, P2 In these examples it is assumed that Surf1 is a previously defined SSURF. P1 and P2 are then directly defined as the points (1,2,1) and (3,1,5) P3 is the point on patch2 of Surf1 with - parameters u = 0.4, v = 0.6. P4 is defined as the intersection of the line from P1 to P2 with Surf1. One geometric structure available in the CASPA system which is not defined in APT4 is the polygon. This is a graphics entity only and is not associated with any stored canonical form. The user is able to display a polygon on the screen, that is a series of points joined by straight lines, with the graphics command: DRAW/POLYGN, P1, P2, P3, P4

10.1.2 Vector and Plane Definitions

The CASPA system supports some of the direct vector definition formats described in Volume 1 of this manual as well as all the indirect (INTOF) definitions described in Chapter 9. Permissible definitions are: VECTOR/vx, vy, vz VECTOR/UNIT, Vector1 TANSPL CRSSPL VECTOR/INTOF, Scurve, PARAM, u, arcno, NORMAL ›,UNIT! FLOW BINORM - TANSPL VECTOR/INTOF, Surf1, PARAM, u, v, Patchno, CRSSPL ›,UNIT! NORMAL In the first of these definitions the vector is defined directly in terms of its 3 components vx, vy and vz. The second definition defines a unit vector in the same direction as an existing Vector1. In the two indirect definitions the vector is defined as a geometric vector quantity (Tangent, Cross-Tangent Normal or Binormal) associated with a particular parametric point on a curve or surface. The option UNIT is used to create a vector of unit length in the specified direction. Because the position in space of a vector is ambiguous it cannot be displayed. A plane may either be defined directly, in terms of the coefficients in its mathematical equation, or indirectly, in terms of its geometric properties. Permissible definitions are: PLANE/a, b, c, d PLANE/Point1, Point2, Point3 PLANE/Point1, PERPTO, Vector1 PLANE/Point1, PARLEL, Plane1 PLANE/PARLEL, Plane1, Side, Dist1 In these definitions it is assumed that Point1, Point2 and Point3 are the names of existing points, Vector1 is a previously defined vector and Plane1 is an existing plane. In the first direct definition a, b, c, d are numerical values to define the plane with equation ax + by + cz = d. In the last definition the plane is defined as parallel to Plane1 and at a perpendicular distance, Dist1 away from it. The qualifier side takes one of the values XLARGE, XSMALL, YLARGE, YSMALL, ZLARGE, ZSMALL and is used to make this definition unique. The previous definition also defines a plane parallel to Plane1 but in this case passing through Point1. ZSURF/Plane This command is used for the simple definition of points which lie in a fixed plane other than the XY plane. Any point definition, P1 = POINT/x,y which contains no Z coordinate and follows the ZSURF statement will define a point in - this plane, the actual Z coordinate will be determined by projection onto this plane. For example: PL2 = PLANE/1,1,1,1 ZSURF/PL2 P1 = POINT/1,2 In these statements PL2 is defined as the plane x+y+z = 1. P1 is then subsequently defined as a point on this plane with x = 1, y = 2. Hence P1 is (1,2,-2). The plane referenced in the ZSURF statement must not be perpendicular to XY plane, since in these cases the Z coordinate cannot be automatically determined. The ZSURF statement can only be cancelled by re-defining ZSURF to refer to the XY plane. This could be achieved by XYPL = PLANE/0,0,1,0 ZSURF/XYPL Examples: V1 = VECTOR/1.0, 3.0, 1.0 V2 = VECTOR/INTOF, Curve1, FLOW, 0.5, 3, TANSPL P1 = POINT/2.0, 4.0, 5.0 PL1 = PLANE/2.0, 1.0, 0.0, 3.0 PL2 = PLANE/P1, PARLEL, PL1 PL3 = PLANE/P1, PERPTO, V2 PL4 = PLANE/PARLEL, PL3, ZSMALL, 1.5 In these examples PL1 is the plane 2x + y = 3. PL2 is the plane parallel to PL1 and passing through the point (2,4,5). (PL2 has equation 2x + y = 8) PL3 is the plane which passes through (2,4,5) and which is perpendicular to (i.e. has normal) the tangent vector to Curve1 at the point with flow parameter u = 0.5 on arc 3. PL4 is parallel to PL3 and at a perpendicular distance 1.5 below it, assuming the z axis to be vertical. Note: Because of their infinite dimensions planes cannot be shown on a graphics device but they can be used in other geometric constructions.

10.1.3 Curves and Surfaces

The CASPA system includes all the SCURV and SSURF definitions described in Chapters 2-6 of this manual. The sole exception is SCURV/SEG which uses APT lines and circles in its definition. A list of available SCURV and SSURF types is: SCURV/CURSEG SCURV/SPLINE (Including Smoothing) SCURV/COMBIN SSURF/GENCUR SSURF/SMESH SSURF/RULED SSURF/REVOLV SSURF/PATCH SSURF/TRANSL SSURF/SCALE SSURF/XYROT SSURF/YZROT SSURF/ZXROT A full specification of each of these definitions can be found in the appropriate section of this manual or by using the on-line HELP facility of CASPA. Once a curve or surface has been defined using one of these definitions it generates a stored canonical array which is identical to that generated by the same command of the APT4 Sculptured Surfaces system. All curves and surfaces described in this section can be displayed on the graphics device. By using the graphics commands described in section 10.2 the user can control the amount of detail shown as well as the line type and colour and the viewpoint.

10.2 Graphics Commands

The essential function of the CASPA system is to display the geometric entities which have been defined. This offers the possibility of visual verification of the part geometry before using the APT system to define the machining operations. In essence every curve or surface is displayed on the graphics device as a sequence of straight line segments which approximate to the true geometry. The graphics command language is however sufficiently flexible for the user to control the degree of this approximation as well as more obvious factors such as the colour and the viewpoint. The graphics commands can be classified as either global commands which affect all subsequent drawings or specific commands which are concerned with the creation of a single drawing or display. In most cases reasonable default options have been provided so that the less experienced user can generate a drawing with a minimum set of these commands.

10.2.1 Global Commands

The commands in this section apply to all subsequent graphics operations or until they are countermanded by an equivalent command. DEVICE/name, model, ›UNIT, unitno!›,CLOSE! This is an essential command which defines the display device for the drawings or pictures. The device must be defined before any drawings are generated. The permitted device names and models for a particular implementation can be reviewed by the command DEVICE/REVIEW Clearly the list of available device names and models will depend upon the particular implementation, as will the associated unit number. In some implementations there may be an available default option for the unitno definition, and more than one device may be open at a time. The option CLOSE closes the specified device. Possible examples are: DEVICE/TEK, 4107 (Tektronics 4107) DEVICE/CALCMP, 1012, UNIT, 12 (Calcomp 1012 Plotter) COLOUR/colourname ›,SYMBOL, colourname! This command defines the colour of all lines and symbols displayed. By including the option SYMBOL it is possible to select a different colour for the symbols. Available colournames are: BLACK, RED, GREEN, BLUE, YELLOW, CYAN, WHITE, MAGENT (i.e.Magenta) With this command a default option is provided which assumes the colour black whenever COLOUR is undefined. LINTYP/Type This defines the type of line used to represent POLYGN, FRAME, curves and surfaces. Permissible types are: SOLID, DOTTED, DASHED, CHAIN CHAIN refers to a line made up of alternate dots and dashes. On a black and white device LINTYP can be useful to aid the visual distinction between different curves. The default option assumes the value SOLID whenever LINTYP is undefined. SYMTYP/Type This command defines the type of symbol used to denote points on the display. Permissible values of type are: Type 1 2 3 4 5 Symbol . + * o x With this definition the default option is type=4. LETTER/›HEIGHT, h!›,WIDTH, w!›,colour! This defines any or all of the height, width and colour of lettering on the drawing. This includes geometric names as labels and any user defined text. It is important to note that both height and width are defined in relative terms. The height h is a fraction of the screen height and the width w defines the maximum letter width as a fraction (or multiple) of the height of the letters. If undefined default values are 0.02 and 1.0 for h and w respectively. Colour takes one of the values: BLACK (Default), RED, GREEN, BLUE, YELLOW, CYAN, WHITE, MAGENT (Magenta). WINDOW/xmin, xmax, ymin, ymax, zmin, zmax This command specifies in 3 dimensional space the volume which can be viewed. All geometry within this space can be displayed but any geometry outside the window volume is effectively invisible. The scale of the drawing is determined by the combination of the WINDOW and SCREEN commands. To produce an enlarged drawing of part of the geometry a new smaller window should be defined enclosing the chosen part. xmin < x < xmax, ymin < y < ymax, zmin < z < zmax All these quantities are defined in global coordinates using the same axes and units as the geometric definitions. To avoid geometric distortion the window should be defined as a cube with xmax - xmin = ymax - ymin = zmax - zmin. If there is no explicit window definition default values of xmin and the other parameters are defined from the minimum and maximum coordinates of all points defined before the DEVICE command or the first graphics command. In other cases default values are -100 and 100 respectively. SCREEN/xmin,xmax,ymin,ymax This command defines the display area of the screen, corresponding to a GKS viewport. For this definition a system of screen coordinates is used with the origin at the lower left corner of the screen and the x axis horizontal. The length 1.0 corresponds to the maximum dimension of the screen. xmin, xmax, ymin and ymax should thus all lie in the range from 0.0 to 1.0. To avoid geometric distortion the screen should be defined as square with xmax - xmin = ymax - ymin. Example: SCREEN/0.1, 0.9, 0.2, 1.0 This defines a screen display area with a 20% border below and 10% borders to left and right. VIEW/›XYPLAN!›,YZPLAN!›,ZXPLAN!›,PERSP›,VIEWPT,x,y,z!! ›PLAN!›,FRONT!›,END! ›,PARLEL! This command enables the user to specify the view or views which he wishes to plot. Either a single view or a set of 4 projections on a quartered screen is permissible. XYPLAN, YZPLAN and ZXPLAN show the object projected onto the XY, YZ or ZX planes respectively. Alternatively orthodox plan (equivalent to XYPLAN), front and end elevations can be chosen. A 3 dimensional view can be either a perspective view (PERSP) or a parallel projection (PARLEL) from a viewpoint with coordinates x, y, z. Different views are obtained by varying the viewpoint rather than by moving or rotating the object being viewed. Note that this view may not be to the same scale as the PLAN views. The default option defines a single XYPLAN view. Note that the VIEW command also clears the graphics screen or initiates a new drawing on a plotter.

10.2.2 Specific Commands

The basic command to create a plot or a drawing is DRAW. Available options are: DRAW/AXES›,LENGTH, len! This draws a set OX, OY, OZ of axes centred either at the origin, if within the WINDOW, or, at the centre of the WINDOW. The user has the option of either defining the length len of each axis in world coordinates, or accepting the default value len = 10% of WINDOW dimension. DRAW/FRAME This command draws a frame, slightly larger than the SCREEN defined round the current view or set of views. DRAW/POLYGN, Point1, Point2, Point3, ... This command draws a polygon, or set of line segments, through the points Point1, Point2, Point3,... in order. DRAW/Pointname›,SYMBOL, type!›,LABEL, position! This is the command to draw a single point. The options permit the marking of the point with a specific symbol and/or the labelling of the point with its name. The colour of the symbol and the size of the lettering are defined globally by the commands COLOUR and LETTER respectively. The symbol types are: Type Symbol 1 . 2 + 3 * 4 o 5 x Alternative values for position are: LEFT, RIGHT, ABOVE, BELOW, CENTER these refer to the position of the name. DRAW/Scurvname›,UMIN,U0!›,UMAX,U1!›NSTEP,n!›,FLOW! $ ›,PARAM! ›,LABEL,position! This is the basic command to display a section of a previously defined SCURV from parameter U = U0 to U = U1. The parameter used in this definition may be the FLOW parameter (the assumed default value) or the natural parameter (PARAM) of the original definition. NSTEP is used to define the approximation of the curve by a polygon, n being the number of linear steps along each arc (i.e. 0-1 parameter range) of the curve. Optionally the curve may be labelled with its name near its mid-point ((U0 + U1)/2). The relative position of this label is defined by position which takes one of the values LEFT, RIGHT, ABOVE, BELOW or CENTRE. Default values are U0 = 0, U1 = value at end of curve, n = 10. DRAW/Surfname›,UMIN,U0!›,UMAX,U1!›,UINCR,du!$ ›,VMIN,V0!›,VMAX,V1!›,VINCR,dv!›,NSTEP,n!$ ›,LABEL›,u2,v2!,position!›,NORMAL!›,LENGTH,len! This command is used to display a section of a sculptured surface. The surface is shown by the curves of constant parametric value and the user has control of how many of these curves are drawn and how each individual curve is approximated. The area of the surface displayed is in the range U0 < U < U1, V0 < V < V1. Default values for these parameters correspond to the edges of the entire surface. The curves U = const are shown at intervals dv. Default values are du = dv = 0.25 which displays - each patch by 5 curves in each direction. The NSTEP value n controls the way in which each of these curves is approximated by a polygon, there are n sides per unit parametric length for each - displayed curve. Other options permit the surface to be labelled with its name, this can either be at the chosen location U = u2, V = v2 or at the default location which is the mid point of the section of surface displayed, position defines its relative position as for - curves. The final option allows the display of surface normals - at every intersection point of the displayed curves, the LENGTH of these can be the user defined value len or the default value len = 1.0. DRAW/CLFILE,'Filename'›,AXIS!›,NSTEP,n!›LENGTH,len! This command is used to plot data from an APT CLFILE previously stored in the names file 'Filename'. The file name must be enclosed in quotation marks and has a maximum length of 16 characters. Using all the default options a polygon corresponding to the individual tool movements is plotted. The optional AXIS facility provides for the display of the tool axis - at every nth (defined by NSTEP) point of the cutter path. This axis is displayed as a line of length len. Default values for these parameters are n = 10, len = 5.0. Note: Each DRAW command draws a single entity but more complex - drawings can be constructed from a sequence of DRAW commands not - separated by VIEW or CLEAR. The user has the option of adding his own text, such as a title, to any drawing. This is achieved by the command: TEXT/'Text-string',x,y›,HEIGHT,h!›,WIDTH,w!›,colour! This command has the effect of printing the user's text-string starting from position (x,y) on the screen. It should be noted that x and y are defined in screen coordinates with (0,0) at the lower left hand corner of the defined SCREEN area and (1.0,1.0) at the diagonally opposite corner of this area. The height h of the letters should also be defined in screen coordinates but w defines the maximum letter width as a fraction of the letter height. Default values for these parameters are h=0.02, w=1.0. With some devices, such as the Tektronix 4010 the variation of h and w has no effect on the actual display. Colour takes one of the values - BLACK (Default), RED, GREEN, BLUE, YELLOW, CYAN, WHITE, MAGENT. Finally the screen is cleared by the command CLEAR This command also indicates a new drawing if the selected device is plotter. The main function of this command is to act as a separator between drawings, each of which can be constructed from a sequence of DRAW commands.

10.2.3 Example

The example below of a typical CASPA session illustrates the use of some of the geometric definitions and graphics commands. The commands are entered interactively after the invitation to type ? from the computer. P1 = POINT/0, 0, 0 P2 = POINT/20, 10, 0 P3 = POINT/40, 20, 5 P4 = POINT/60, 5, 0 Q1 = POINT/0, 0, 50 Q2 = POINT/15, 15, 45 Q3 = POINT/35, 20, 50 Q4 = POINT/60, 5, 50 V1 = VECTOR/1.0, 2.6, 1.0 C1 = SCURV/SPLINE, P1, P2, CRSSPL, V1, P3, P4, FLOW, ARC,$ 0, 3, SEG, LENGTH, 0, 1, LENGTH, 1, 2, LENGTH, 2, 3 C2 = SCURV/SPLINE, Q1, Q2, Q3, Q4, FLOW, ARC, 0, 3, SEG, $ LENGTH, 0, 1, LENGTH, 1, 2, LENGTH, 2, 3 SURF = SSURF/GENCUR, C1, C2 DEVICE/TEK, 4010 WINDOW/-10, 70, -10, 70, -10, 70 SCREEN/0.2, 1.0, 0.2, 1.0 VIEW/XYPLAN, YZPLAN, ZXPLAN, PARLEL, VIEWPT, 80, 80, 80 DRAW/P1, LABEL, ABOVE DRAW/P2, LABEL, BELOW DRAW/P3, LABEL, LEFT DRAW/P4, LABEL, RIGHT DRAW/C1 DRAW/C2, NSTEP, 20 DRAW/FRAME TEXT/'3 PLANS PLUS PARALLEL', 0.1, 0.02 CLEAR DRAW/SURF DRAW/AXES DRAW/FRAME CLEAR VIEW/PARLEL, VIEWPT, 20, 50, -10 DRAW/SURF DRAW/AXES VIEW/PARLEL, VIEWPT, 20, 50, -10 WINDOW/0, 50, 0, 50, 0, 50 DRAW/FRAME DRAW/SURF, UMIN, 0, UMAX, 1, UINCR, 0.1, NSTEP, 20, $ NORMAL, LENGTH, 5 TEXT/'PART OF SURFACE WITH NORMALS', 0.1, 0.02 EXIT In this example the geometry statements define two sets of 4 points and a vector. These are used to define the curves C1 and C2. C1 contains a CRSSPL vector constraint. A GENCUR surface SURF is then defined from C1 and C2. The subsequent graphics commands define the device, window and screen and a set of 4 views. The first drawing shows the points and curves. The result is shown in Figure 10.1. The screen is cleared before producing the same views of the surface SURF, using all default parameters. These are shown in Figure 10.2. A parallel view with viewpoint (20,50,-10) is then defined and figure 10.3 shows this view of the surface. A smaller window is then defined before viewing the section 0 < u < 1, 0 < v < 1 of the surface. For this drawing normals are requested and a finer mesh of parametric lines is defined by setting UINCR to 0.1; NSTEP = 20 gives a closer approximation to each curve. The result is shown in Figure 10.4

10.3 Other CASPA Commands

In addition to the commands previously described for defining geometry and controlling the graphics output produced by the system CASPA further system commands. These are mainly associated with the specification and control of input and output from the system or to provide assistance to the user. Section 10.3.3 describes the special editor commands which are intended only for the use of the system programmer when installing or modifying the system.

10.3.1 Output Control

A number of options are available for the global control of output from the CASPA system to the users terminal during an interactive session. These options correspond to the PRINT options described in Chapter 9 of this manual. Options are CFPRT/ON OFF This outputs to the system output device, which is the users terminal for an interactive session, each internal canonical form as it is defined. The default value for this option, and all other options described in this section is OFF. DEBUG/ON OFF This command permits the user to have debug messages produced during sculptured surface processing sent to the system output device (i.e. his terminal). The effect of DEBUG/ON is equivalent to MAXDP/-4, 1 in APT4 System. ILPRT/ON OFF This command allows the output to the terminal of internal language records during the CASPA processing. The final two global print control options provide for different types of verification listing of SCURV and SSURF, to be sent to the terminal. These are SSPRT/ON and SSTEST/ON OFF OFF In each ON case a verification listing of all curves and surfaces is produced at the terminal as they are created. SSTEST provides more detail including some canonical form data. Full details of these commands is given in Chapter 9 with examples of the type of output produced being given in earlier chapters. In addition to the global control of output described above there are two commands available for printing selected items at the terminal. These are the TYPE and LIST commands. TYPE is used to obtain canonical form data. The two permissible formats are:- TYPE/ALL or TYPE/Symbol List In the case of TYPE/ALL, canonical forms corresponding to all the currently defined geometry are printed at the terminal. In the second case the user provides a Symbol List which contains the assigned names of all the geometric items for which he requires canonical form output. Items on this list should be separated by commas. If, for example he has previously defined an SCURV called CRV1 and an SSURF called RSF he could inspect the corresponding canonical forms with the command TYPE/CRV1, RSF The command LIST enables the user to inspect entries in either the Permanent Symbol Table, or the Temporary Symbol Table. The Permanent Symbol Table contains all CASPA language command words and will generally only be of interest to system programmers. The Temporary Symbol Table, which is re-created at each interactive CASPA session contains all the user defined symbols and Synonyms. The Symbols are the names he has assigned to the various items of geometry which he has created. The formats for the LIST command are LIST/PST›,n1!›,THRU, n2! This provides a listing at the terminal of all Permanent Symbol Table entries between positions n1 and n2. Using the default option for both of these parameters produces a listing of the entire table. LIST/PST›,symbol1!›,THRU, symbol2! This is equivalent to the above command but in this case entries to the PST are referenced by symbol name (symbol1, symbol2) rather than by position. As a third option the user can select items from the PST by type. This is achieved with the command LIST/PST, CLASS, 'Caspa class' Currently available values for the Caspa Class parameter are 'HELP', 'GLOBAL', 'GEOMETRY', 'GRAPHICS', 'FILEHANDLER' or 'EDITOR'. The command LIST/TST permits the user to make similar selections from his own Temporary Symbol Table. This facility could be particularly useful in cases where he may have forgotten, or even mis-spelt, the names he has previously assigned to some geometric entities. Permissible formats are LIST/TST›,n1!›,THRU, n2! LIST/TST›,name1!›,THRU, name2! LIST/TST›,CFType! If none of these parameters is selected the default option provides a listing of the entire Temporary Symbol Table at the users terminal. The parameter CFType permits the user to select all entries of a particular geometric type. Permissible values of CFType are POINT, MATRIX, PLANE, VECTOR, SCURV or SSURF.

10.3.2 File Handling Facilities

The CASPA system includes extensive file handling facilities which enable the user to input data to the system from files and to permanently save CASPA data, in various forms, in formatted or unformatted data files. The basic command to input data from a data file is READ/›CANON!›,'Filename'!›,unitno! This command will input to the CASPA system data from the file named 'Filename' on unit number unitno. The option CANON is used to specify the precise format of the data. If CANON is included the data is assumed to be of card image format with card sequence numbers in columns 73-80, consequently all data beyond column 72 is ignored. If CANON is omitted free format data up to a maximum of 80 columns is assumed. If unitno is omitted the default value of 5 is assumed. It should be noted that at least one of the three optional parameters for this command must be included. The data file accessed by the READ command can contain either CASPA commands or canonical forms. In the case of canonical form data this could have been produced either by the CASPA system itself or by the APT4 System. CASPA commands can include further READ statements which can be nested up to a maximum depth of 10. Canonical form data can also be input from unformatted files referred to as LDA files. These files have 80 byte, unformatted records. (i.e. Typically 10 double precision items per record). They may only be used for the storage of synthetic curve and sculptured surface canonical forms. CASPA, APT4/SS and non_native Formatter programs are the likely source of this type of file. The command to read data from LDA files is READ/LDA,›,'Filename'!›,unitno!›,ALL! ›,name1!›,name2!,.... The default unit number for this type of read is 10. The parameter ALL will cause all curve and surface canonical form data stored in the named file to be read into CASPA, alternatively selected forms may be read in. The default is ALL. Output from the system to a data file is obtained by using one of the commands SAVE, PUNCH or WRITE. The SAVE command is provided exclusively to enable the user to preserve his JOURNAL file enable the user to preserve his JOURNAL file which is created during each interactive session and contains the sequence of CASPA commands which has been used. A journal file which has been saved in this way can be re-entered by using the READ facility, further commands can then be added interactively. The format for the SAVE command, which must have at least one of the optional parameters included is SAVE/›JOURNAL!›,'Filename'!›unitno! The default value of unitno is 5. As an example SAVE/JOURNAL, 'GEOMI.DAT' Would have the effect of creating a file called GEOMI.DAT on unit 5 which contains the sequence of all CASPA commands used so far in the current interactive session. In its basic form the PUNCH command permits the user to punch out canonical forms in ASCII format to a data file. The format is - PUNCH/›CANON!›,'Filename'!›,unitno!, ALL , Symbol list For this command the default unitno is 7. The option CANON defines a card image format with card sequence numbers in columns 73-80. The user can either select ALL, which produces output for all currently defined canonical forms, or may specify his own symbol list containing the names of all geometric entities for which he requires canonical forms. Canonical forms punched out in this way can be subsequently entered into the CASPA system by using a READ statement or can be used as input data to the APT4 system. Four other types of PUNCH command are available for use by the system programmer when installing or amending the system, these are:- PUNCH/SYMBOL›,'Filename'!›,unitno! This punches out Block Data Source program for the Permanent Symbol Table. This command will normally only be used after installation or after editing the PST. PUNCH/HLPTXT›,'Filename'!›,unitno! This command punches out a Block Data Source program for the HELP messages and associated index. PUNCH/ERROR›,'Filename'!›,unitno! This command, also generally useful only at installation time, punches out Block Data Source program for the error messages. PUNCH/LOAD›,'Filename'!›,unitno! This command punches a new Permanent Symbol Table installation data file and will normally only be used after editing the PST if it is intended to reinstall CASPA on a different system. The third output command, WRITE provides the user with a facility to store synthetic curve and sculptured surface canonical form data in the more compact LDA form instead of ASCII code. The form of this command is WRITE/LDA,'filename'›,unitno!›,ALL! ›,name1!›,name2!,... 'Filename' and unitno define the name of the file and the Fortran logical unit number to which the canonical form data is to be written. The default unit number is 10. ALL will cause all the currently defined synthetic curve and sculptured surface canonical forms to be written out to the file. Alternatively, only the listed curves and surfaces will be output. The default is ALL. The final file handling command is intended to close files. It is CLOSE/'Filename'›,KEEP! unitno ›,DELETE! For this command the user must specify either the filename or the unit number and may optionally specify the status as KEEP or DELETE. The default value of the status is KEEP which saves the relevant file.

10.3.3 Editor Commands

The editor commands, which include the LIST command described in 10.3.1, are provided to enable the system programmer to amend the Permanent Symbol Table. The commands which result in changes to the Permanent Symbol Table are:- INSERT/PST, 'Symbol', APTcode, 'Caspa Class', Caspa Action This command adds the new symbol 'Symbol' to the PST, together with its corresponding parameters. 'Caspa Class' must be one of 'HELP', 'GLOBAL', 'GEOMETRY', 'GRAPHICS', 'FILEHANDLER' or 'EDITOR'. DELETE/PST, Symbol This command deletes an existing symbol from the Permanent Symbol Table. Symbol must in this case be a word of the current CASPA language. The parameters associated with an existing symbol can be modified with the command MODIFY/PST, Symbol, APTcode, 'Caspa Class', Caspa Action.

10.3.4 Miscellaneous Commands

The CASPA system permits the user to define his own synonyms for entries in the Permanent Symbol Table. This is achieved by using the command SYN, a full description of which can be found in section 1.4 of Volume 1 of this manual. The form of this command is SYN/List of synonyms The list of synonyms contains pairs of words separated by commas. The first word of each pair is the users chosen synonym and the second word is entry from the Permanent Symbol Table which it replaces. This facility can be particularly useful to reduce the amount of typing when entering data interactively. As a simple example: The statements SYN/P, POINT, C, SCURV P1 = P/0, 1, 2 P2 = P/2, 4, 3 P3 = P/3, 2, 4 CRV1 = C/SPLINE, P1, P2, P3 Are exactly equivalent to P1 = POINT/0, 1, 2 P2 = POINT/2, 4, 3 P3 = POINT/3, 2, 4 CRV1 = SCURV/SPLINE, P1, P2, P3 The CASPA system provides an extensive interactive HELP facility. This facility is driven by Keywords which return helpful messages to the users terminal. The system is largely self-documenting and is invoked by the command HELP or by HELP/'Keyword' Use of the Keywords GEOMETRY, GRAPHICS or COMMANDS will produce list of appropriate Keywords for information in each of these areas. An interactive CASPA session is closed by using one of the commands EXIT or FINI After this command the user has the option of saving or deleting 3 files created by the system during the session. These are:- The Journal file containing the complete command sequences. A file of all CASPA error messages produced during the session. A file of all GKS (Graphics Kernel System) errors during the session.