CIGAL Reference Manual, Chapter 2 (Commands): SKETCH
SKETCH is a generic command for drawing graphics and doing interactive morphometric measurements. SKETCH works best when using a display screen capable of graphics. This is not required, it is just easier to know what's going on if you can see what you are drawing.
SKETCH is an unusual command because it creates its own interactive environment and has a number of its own special sub-commands (i.e., commands recognized only by SKETCH). This is done so that once you start drawing you can efficiently call up a variety of useful drawing-related operations, without having to deal with the overhead of continuously going back to the main command reading routines. However, in addition to its intrinsic repertoire of drawing operations, SKETCH also has a feature that allows one to leave SKETCH temporarily in order to execute other CIGAL commands, and then return automatically to SKETCH when they are through. This temporary escape feature is used in conjunction with screen menus (see MENUS(1)) and greatly increases the scope of commands you can call up while drawing, simply by moving the cursor.
The following is a list of SKETCH's internal commands activated by touching a button on a mouse or digitizing tablet, by selecting a menu entry, or by typing a character at the keyboard. The codes are:
Drawing Commands: D, MouseLeft, or Pen 1 Draw to the current position M, MouseRight, or Pen 2 Move to the current position (without drawing) . Draw a point at the current position T Enter text at the current position P Paint inside the last list of vectors B Set color for back of last paint region (see note) A Draw an arrowhead (see note below) Editting Commands: E (or End key) Erase the last vector H (or Home key) Un-erase the last vector X (or Ctrl-End) Erase the last list of vectors R (or Ctrl-Home) Un-erase the last list of vectors O Offset the marked vector (see note below) W Convert absolute to relative coordinates (see note) Y Convert relative to absolute coordinates (see note) Measuring Commands: L (or * key) Measure Length and Area of all vectors drawn since last measurement (or since Marked vector) (Measured values are stored in variable VDATA.) C Measure calibration bar (see note below) Vector Selection Commands: F (or /) Find (next) nearest vector N (or +) Find next vector list (not implemented) K (or -) Find previous vector list (not implemented) V Mark current vector U Unmark marked vector S Show marked vector Miscellaneous Commands: Z Enter Z value ? Display short SKETCH command summary q (or Q or ESC) Quit SKETCH
NOTE: Most of these commands should be self-explanatory, with the following exceptions:
A The Arrow command has 2 ways of determining the position and direction to use in drawing an arrowhead. If the previous SKETCH command was a line drawing command (see 'D' above), the Arrow command places an arrowhead at the end of that line segment. Otherwise, Arrow waits for you to enter 2 new screen positions (by clicking the cursor or pressing <Enter>); the arrowhead is then drawn at the second position, facing away from the first position. B The Back command allows you to specify a different drawing intensity (color) for the back side of a painted region than that used for the front side. To do so, immediately after painting a region select a new color and then use the B command to assign the back color. Obviously, the back color will not be seen unless you rotate the vector image to view the painted region from the other side (see [ROTATE]). C The Calibrate command prompts you to trace a scale bar, when you are done enter a Move or type any character. It will then ask you to enter the length of bar you have just drawn (enter the number and press <RETURN>). From then on all length and area measurements will be expressed in the same units as your calibration bar. O The Offset command lets you move a vector by adding offset values to its XYZ coordinates. To do so, you must first mark the vector you want to move (using the V command) and then click on the new position for that vector. Note that if the vectors stored after the moved vector are in relative coordinates, then they will all be moved as well. W Although SKETCH enters all vectors in absolute XYZ coordinates (i.e., with respect to the screen origin) the W command lets you convert these to relative coordinates with respect to the position of the previous vector. If you have marked a set of vectors using the V command then only those vectors will be converted, otherwise the W command converts the entire vector list to relative coordinates. Y This command is the converse of the W command; it converts vectors stored in relative coordinates back to absolute coordinates. You can convert the entire vector list, or a marked portion just as with the W command.
There is an internal CIGAL variable called SFLAGS which controls various aspects of how SKETCH does drawing and morphometry. See SFLAGS(4) for a description of the SFLAGS flag values.