Wire Drawing

Drawing wires is an important aspect of creating diagrams in CertSAFE. Wires connect the outputs of components to the inputs of other components to visually describe the flow of data in a computation.

Collectively, inputs and outputs of components in a diagram are called pins. You can draw wire segments to connect pins together. A wire segment is a straight horizontal or vertical line segment that conducts values from one grid location to another. Multiple wire segments can be connected to each other to create paths with corners and branches. A location where three or more pins or wire segments come together is called a junction and is drawn with a thick black dot in CertSAFE. A group of pins and wire segments that are all connected together is called a wire network. The diagram below illustrates these terms:

ALT

Wire drawing mode

When you click on a pin or the end of a wire segment, CertSAFE enters wire drawing mode, indicated by a small yellow dot that follows the mouse cursor around in the diagram. In wire drawing mode, clicking on locations in the diagram will draw wires. Each click draws a single wire segment.

ALT
ALT
ALT
ALT
ALT

You can also start wire drawing mode from any point in your diagram by right-clicking on the desired start location and choosing Start Wire Drawing Here from the menu.

In wire drawing mode, CertSAFE will gently snap the end of the wire being drawn to align with existing pins and wire segments in the diagram. This helps when trying to line up different parts of a diagram. A light blue circle is drawn around the end of the wire to indicate when snapping is occurring:

ALT

CertSAFE exits wire drawing mode if you do any of the following: * Connect the wire you are drawing to an existing pin or wire segment. * Click at the same grid position twice in a row. * Right-click anywhere in the diagram. * Use the Undo command.

Editing existing wires

In wire drawing mode, drawing back over the wire segment currently being drawn from will shorten or delete that wire segment:

ALT

Outside of wire drawing mode, wire segments can be selected in the same ways as components, by clicking on them or dragging a selection box. Wire segments can be deleted, cut, and copied just like components as well.

Guess What I Mean mode

If you try to move a group of wires or components connected to wires, CertSAFE will perform one of two behaviors. The default behavior is called Guess What I Mean mode, because CertSAFE will attempt to guess what action you are trying to perform and change the diagram appropriately by stretching or moving wire segments:

ALT

The rules CertSAFE uses to guess what you are trying to do are fairly simple by design, to avoid causing the interface to feel unpredictable. In particular, CertSAFE makes no attempt to route wires around components. If you drag at a diagonal angle instead of horizontally or vertically, CertSAFE will disconnect all the wires you are dragging; this gives a way to break connections if CertSAFE is being too aggressive with keeping wires connected.

Sometimes Guess What I Mean mode is still too much. There is a toggle button at the bottom-left of the CertSAFE window with a magic wand icon that controls whether Guess What I Mean mode is enabled:

ALT

If you turn this option off, CertSAFE will not do any wire stretching no matter how you move diagram elements:

ALT

Connecting components without wire segments

It is also possible to connect pins together just by positioning components so that their pins line up, without drawing wire segments between them:

ALT

A useful trick that works when Guess What I Mean mode is enabled is to move a component so that its pins are connected the way you want, then move it again to the position you’d like, allowing CertSAFE to fill in the connecting wire segments:

ALT
ALT
ALT

Fixing common problems

A common mistake for those new to CertSAFE is to try to drop a component on top of a wire to connect it:

ALT
ALT

This will actually result in a wire segment connecting the component’s input to its output, causing a “too many producers” error. If this happens, you can quickly fix the issue by selecting the wire segment on top of the component and deleting it:

ALT
ALT

Deleting entire networks

Sometimes you have made a mess out of your wires and just want to start that area over. Double-clicking on a wire segment will select the entire wire network connected to that segment. Pressing Delete will then delete that entire network, leaving only the pins it connected:

ALT
ALT