User Tools

Site Tools


CIGAL Reference Manual, Chapter 4 (Variables): vecs

Vecs -- List of vectors comprising active vector graphics data

usage: vecs = vectorlist

VECS is an internally defined vector list variable. It is created by the SKETCH or INPUT commands to store graphics vectors associated with the active graphics image. The number of vectors stored is determined by the complexity of the graphics image. Because VECS is created as a variable in a temporary disk file there is no limit to the number of entries you can store (up to the total free space on your disk). Each time you draw new vectors using SKETCH or read in new vectors using INPUT, the values are added to the end of VECS. If you go in and out of the SKETCH command, the vector list does not start over, new vectors just keep adding on at the end. If you want to erase the values in VECS and start again you use the ERASE command as:

              erase vecs

This does not delete the variable. It simply resets its pointers to empty. Outside of SKETCH, VECS can be manipulated just as any other vector list variable. For example, you can select subsets of the image, modify X, Y, or Z values, or change drawing intensities. You can also rotate, scale, or offset all or part of the vector image. Because VECS is stored in a temporary file you should be sure to copy it to some other file if you want to save the data beyond the end of the current CIGAL session. The easiest way to copy vectors is with the OUTPUT command.

Because the display on the screen and the vectors in VECS can be manipulated independently by many different commands, the displayed image does not always represent the current status of the list of active vectors contained within VECS. However, you can get an up-to-date graphics image if you are in graphics mode, by executing the REDRAW command, as:


The length of VECS is indicated by the internally defined integer variable NVECS, which is set to the number of vectors in the list. You can change the length of VECS by changing the value of NVECS. For example, setting NVECS to zero is equivalent to erasing VECS. You can sometimes also recover lost vectors simply by setting NVECS to the number of vectors that you used to have, provided that those vectors have not been overwritten by new values.

The temporary disk file used to store VECS (normally called VECS.TMP; see VECFIL(4) ) is not deleted at the end of a CIGAL session. The file normally truncates automatically during the next CIGAL session when you use the SKETCH or INPUT command to create VECS again. However if you assign a value to NVECS, before using the SKETCH command, then the VECS variable is created without truncating the temporary file. This can be used to recover VECS values lost if you exit CIGAL prematurely or after a power failure, etc.

See Also:

CIGAL Home, CIGAL Manual, Variables List, Manual Help

jvs/cigal/manual/chapter4/vecs.txt · Last modified: 2023/02/23 18:43 (external edit)