Syntax: !layer [join|split|splitv] [-j | -s[h] | -sv] [-d depth | -da] [-r] [-c] [-m] [-f] layer_name [=] [expression]This command produces new geometry on a new or existing layer, by applying a layer expression which takes as input geometry from the same or other layers, from the current cell or from other cells in memory. The Layer Expression button in the Edit Menu provides a panel which duplicates the functionality of this command.
This new geometry can appear as an assemblage of trapezoids if either of the split or splitv keywords is given, or alternatively as a minimal number of complex polygons if the join keyword is given instead. If splitv is given, a vertical orientation is favored for the decomposition, whereas similarly split will produce a decomposition favoring a horizontal orientation. The default is the joined form if none of these optional keywords is given, except when simply copying from another layer in which case the default is to copy objects without change. The keyword ``splith'' is a synonym for ``split''. The options -j, -s or -sh, and -sv are equivalent to giving the join, split, and splitv keywords.
The !layer command, when using boolean operations, uses gridding to improve efficiency for large data sets. Internally, a square grid with origin at the lower-left corner of the cell bounding box is logically defined. The calculations are performed for each grid square that overlaps the cell area, and the results are combined. This can be more efficient that calculating the whole cell in one shot.
The default grid size is 100 microns square, which can be changed with the PartitionSize variable. This can be set to an alternate grid size in microns, as a floating-point number. The cell lower left corner is on the grid boundary. The operations are performed piecewise in each grid area that intersects the cell.
If this variable is set to ``0'', no grid is used, and operations will be performed over the entire cell at once.
The PartitionSize variable can be set with a control in the Evaluate Layer Expression panel from the Layer Expression button in the Edit Menu, or with the !set command.
When joining objects, there are several variables which fine-tune the operation. See the description of the !join command (19.13.13) for information.
If layer_name does not exist in the layer table, it will be created. Otherwise, the layer_name is the short or long name of an existing layer. If a new layer is created, its name is generated from the given name in the same way as in the technology file layer definitions.
The expression, if given, involves layer names and operators as in the DRC layer expressions (see 15.1). The result of the expression is created on layer_name. Thus, this command provides a means of creating a new layer from geometry on existing layers. It operates on the physical part of the current cell. Labels are ignored. The same layer_name can exist on both sides of the expression, in which case the contents of the layer_name is replaced with the result of expression. The equal sign between layer_name and expression is optional.
If no expression is given, the new layer will be created if necessary, which will be the only effect if done. If the layer_name already exists, and one of the split, splitv, or join keywords is given, the operation will be applied to that layer, much like the !split and !join commands.
If the expression consists of a layer name only, the objects on that layer will be copied to layer_name, and split/joined if the keywords are given. When simply copying and/or joining/splitting, no grid partitioning is used.
Copying and splitting/joining are available in electrical mode. Other operations require running the !layer command in physical mode, and apply to physical data.
There are several option flags which can be given. These must appear before layer_name in the command line. The options can be given separately as shown in the syntax example above, or grouped, e.g., ``-dmf depth'' is equivalent to ``-d depth -m -f''. Any combination of grouped or single flags can be used. If a group contains `d', the token that follows must be the depth.
The merging will defeat the purpose of the split keywords, so the user should consider whether merging is appropriate. Merging includes the initial objects on the layer_name if it is not cleared, and the accumulated objects as evaluation takes place.
The user will be prompted to confirm before the operation is actually initiated.