Magic-8.3 Command Reference

#

## snap

Cause box to snap to the selected grid when moved by the cursor. Also, cause distance measurements to be interpreted by default as measurments in the selected grid.

### Usage:

> snap [internal|lambda|user]

### Summary:

> The snap command causes the cursor box to snap to the selected grid when moved by pointer button events. The selected grids are internal, the size of the internal database, lambda, the lambda grid based on the technology minimum feature size, and user, based on the value given by the user to the grid command.

> Historically, in addition to changing the behavior of the box to mouse button events, the snap command also changed the way that distance measurements are interpreted in commands that take distance arguments. This behavior remains the default for backwards compatibility. The units command overrides this behavior and allows snap to control only the box positioning behavior, independently of how unsuffixed values are parsed by the interpreter.

> snap with no arguments returns the current snap grid type.

> By default, the internal and lambda grids are the same. However, CIF, GDS, or LEF/DEF input on a finer scale can cause the internal grid to be set finer than the lambda grid. Also, the scalegrid command can be used to separate the internal and lambda grids. Note that the use of "lambda" is merely a convention. Traditionally, scalable CMOS rules were based on units of "lambda", equal to one-half the minimum feature size of the technology. Many technology files are still based on lambda rules, which are usually more conservative than vendor rules. However, some technology files may be based on exactly implementing vendor rules, and may set the internal grid spacing to a finer resolution, such as 0.1 micron or smaller. In such cases, the use of the term "lambda" is a misnomer.

### Implementation Notes:

> snap is implemented as a built-in command in magic.

### See Also:

> units
> grid

Return to command index

Last updated: March 7, 2020 at 1:06pm