Layout Knowledge Base

Combining shapes · Size and grid

When the computer moves an edge

Sizing moves every edge of a shape outward or inward by the same distance. Masks, solder openings, and rule checks depend on it, and corners, narrow necks, and unmerged pieces are where it surprises you.

Last edited: October 8, 2026

Part of a real logic cell, a half adder from the open SkyWater SKY130 cell library, showing li1, its lowest wiring layer.

Often the shape you need is one you have already drawn, only a little fatter or a little thinner all the way around. A solder mask needs an opening slightly larger than the copper pad under it. A mask shop wants a window drawn a touch smaller because the etch will widen it. A checker wants to know which wires come closer than about a sixth of a micrometer. None of these jobs is done by dragging edges one at a time. You name a distance, and the program moves every edge of every shape by that much. That is sizing, also called growing and shrinking, biasing, or offsetting.

The picture at the top of this page is part of a real logic cell, a half adder from the open SkyWater SKY130 cell library, showing li1, its lowest wiring layer. Every tone in it was computed by LayoutEditor from the drawn shapes. The pale lilac halo is the wiring grown outward by 85 nm. The deep plum cores are the same wiring shrunk inward by 40 nm, and the violet band between them is the drawn metal that the shrink removed. Each band has the same width along every edge, around every corner, on every wire. That evenness is the whole idea of sizing.

Every edge, the same distance

Sizing moves each edge along its own outward direction, the way a coat of paint thickens an object on every side at once. The center of a rectangle stays where it was, and both its width and its height change by twice the distance, because opposite edges travel in opposite directions. A rectangle 2.0 µm by 1.0 µm, grown by 0.2 µm, becomes 2.4 µm by 1.4 µm. Shrunk by 0.2 µm, it becomes 1.6 µm by 0.6 µm.

For that reason a sizing amount is normally quoted per side. Mask makers give the example of a square 1.25 µm on a side sized by −0.125 µm per side: it ends up 1.00 µm on a side, a total change of 0.25 µm. "Grow by 0.2" and "make it 0.2 wider" are different requests.

Sizing is not the same as pulling one edge outward by hand. A stretch moves one edge, leaves the opposite edge alone, and shifts the center; stretch vs. move covers that edit. Sizing never asks which edge you mean. Most tools can also size the two directions differently, so a shape gets wider without getting taller.

Corners need a rule

Moving a straight edge is easy. A corner is where two moved edges have to be joined again, and there is more than one reasonable way to join them.

Six copies of one test shape drawn in LayoutEditor: the shape as drawn in gray with a pointed tip, a slanted edge and a step, then four grown versions and one shrunk version in blue over the dark drawn outline

The test shape at the top left, 51.78 µm², has a little of everything: right-angle corners that point outward, one corner that points inward at the step, one slanted edge, and a sharp 30° tip. The other panels show what LayoutEditor's four corner modes made of it when every edge moved 0.5 µm outward, plus one shrink. The dark line is always the drawn outline; blue is the result.

Top row, middle: the plain edge move. Each edge slides out and is extended until it meets its neighbor again, so right-angle corners stay square. At the 30° tip the two extended edges meet far out: the point moved 1.93 µm, nearly four times the distance you asked for. Two edges that meet at a narrow angle have to travel a long way before they cross again. Top row, right: rounded corners. Every outward corner becomes an arc of radius 0.5 µm centered on the old corner, so every point of the result lies within 0.5 µm of the drawn shape, and the tip grew by half a micrometer like everything else. The outline now has 103 corners instead of 10.

Bottom row, left: octagon sizing. Right-angle corners are clipped at 45°, and the tip is cut off almost where it was drawn. Bottom row, middle: the plain edge move again, but with sharp angles cut, so the right angles stay square while the spike is trimmed to 0.6 µm. Bottom right: the shape shrunk by 0.3 µm. Now the tip is the part that retreats fastest, 1.16 µm, because the same narrow angle works in reverse.

The inward corner at the step stays sharp in every grown panel; corners that point into the shape need no rule when you grow. The areas tell the same story: square corners give the most material (71.77 µm²), then cut spikes (71.29), rounded corners (70.93), and the octagon (70.37).

Why the computer does it so often

The first reason lives in the factory. Etching does not stop exactly at the edge of the resist; a wet etch eats sideways almost as fast as it eats down. A mask shop therefore draws clear features slightly smaller, so that the etch grows them back to the size you meant, and it applies that bias to every edge of the file at once. The simplest kind of optical proximity correction, the set of adjustments that make a photomask print true, is a table of such biases chosen by feature size and spacing. Some mask layers are themselves computed by growing a drawn layer by the margin a rule asks for, the enclosure, as process layers vs. drawing layers describes.

Circuit boards do it at every pad. The green coating called solder mask needs an opening a little larger than the copper so it never covers the part being soldered; board tools grow every pad by a small expansion, typically 0.05 to 0.1 mm, and write the result as the mask layer. A copper pour keeps its clearance by subtracting pads that were first grown by that clearance.

The third reason is checking. A rule that says two li1 wires must stay at least 0.17 µm apart can be tested by growing every wire by half of that, 85 nm, and looking for halos that meet. In the lead picture's cell many neighbors sit at exactly 0.17 µm. LayoutEditor's results show how sharp that test is: grown by 84 nm and merged, the eight li1 shapes give eight separate halos; grown by 85 nm, they give one, because the halos of wires at exactly 0.17 µm now touch and chain the whole cell together. The minimum-width rule can be tested the other way. Shrunk by 85 nm, half the 0.17 µm minimum width, every strip of exactly minimum width disappears, and the eight shapes fall apart into twelve leftover pieces. Many design-rule checks today measure distances between edges directly, but this grow-and-look recipe is the reasoning behind them; width and space explains the rules themselves.

Shrink, then grow back

Two sizings in a row make a useful filter, and a dangerous one.

Four copies of a metal shape drawn in LayoutEditor, two square pads joined by a thin neck with a whisker, a notch and a nearby bar, shown in mauve over the dark drawn outline: as drawn, shrunk, shrunk then grown, grown then shrunk

The top-left panel is the shape as drawn: two 4 µm pads joined by a neck 0.3 µm wide, a whisker 0.1 µm wide standing on the left pad, a notch 0.3 µm wide cut into the right pad, and a separate bar 0.3 µm to the right. Top right, everything shrunk by 0.2 µm: the neck and the whisker are gone, because each was narrower than twice the shrink, and the notch has opened up.

Bottom left, the shrunk result grown back by 0.2 µm. The pads and the bar return to exactly their drawn size, 16.00, 15.55, and 4.00 µm², but the whisker and the neck do not come back. Anything narrower than twice the distance is filtered out. That is the classic way to clean slivers out of a computed layer, and a comparison tool's tolerance often works the same way. It is also how a real connection disappears: the two pads here are no longer joined.

Bottom right, the opposite order: grown by 0.2 µm, merged, then shrunk by 0.2 µm. Now the gaps narrower than 0.4 µm are filled. The notch is gone, and the bar has fused to the pad, giving one polygon of 38.26 µm². That is exactly the drawn area, 36.61 µm², plus the 0.45 µm² notch and the 1.20 µm² gap. The whisker survives this order. Neither order is an undo. Each one keeps the wide features and quietly edits the narrow ones.

Merge before you shrink

A sizing works on shapes, not on what you meant by them. Draw one wire as several rectangles that only touch end to end, shrink each rectangle, and every end moves inward too.

One wire drawn in LayoutEditor as four rectangles, four times, results in tan over the dark rectangle outlines: as drawn, each rectangle grown, each rectangle shrunk with gaps at two joints, and merged first then shrunk

The wire is 1 µm wide, drawn as four rectangles: two meet end to end along the bottom, the vertical one overlaps the second, and the top one meets the vertical one end to end. Top right, each rectangle grown by 0.2 µm: the pieces overlap generously, and once merged they give the same 15.96 µm² outline as merging first and then growing. Growing piece by piece is harmless. Bottom left, each rectangle shrunk by 0.2 µm: at both joints where rectangles only touched, a gap 0.4 µm wide opens and the wire is cut in two places. Only the joint that overlapped stays connected. Bottom right, the four pieces merged into one outline first and then shrunk: one continuous wire of 6.36 µm². Merge first, as merging polygons describes, then shrink.

The same trap waits at cell boundaries. A wire that continues from one placed copy of a cell into the next is two shapes, in two cells, and a shrink applied inside each cell cannot see that they belong together.

Things that go wrong

Typing the total instead of the amount per side doubles the change. If a rule asks for 0.2 µm of margin, the size is 0.2, and the shape gets 0.4 µm wider.

A shrink larger than half a width deletes material without saying so. A strap that is 0.3 µm wide vanishes under a shrink of 0.15 µm, and a shape with a narrow waist splits in two.

Grown shapes that meet are not yet one shape; until they are merged, they are separate outlines lying on top of each other. Sharp angles make spikes: with square corners, a narrow tip grows several times farther than the distance you typed, so choose a corner mode that cuts or rounds it.

Slanted edges and rounded corners create new corner points, and those rarely fall exactly on the grid of the file, so they are rounded, as snapping and off-grid explains. Holes work in reverse: growing the outside of a ring makes its hole smaller, and shrinking makes the hole larger.

Sizing back by the same amount is not an undo, as the shrink-and-grow panels show; if you want the old shape, use undo.

In LayoutEditor

For selected shapes, use Size Adjust among the adjust tools. A dialog takes the distance in user units; a negative value shrinks. It can also size x and y by different amounts, and it offers four ways to treat corners, the four modes in the corner figure: the plain edge move, rounded corners, octagon sizing, and the edge move with sharp angles cut.

For a whole layer, Utilities > Global Tools > Size Layer changes every shape on that layer in every cell of the design, growing for positive values and shrinking for negative ones. If the design places cells with a scale factor, the documentation recommends Remove Scaled References first, because sized shapes inside scaled copies would otherwise look scaled differently. Derived Layer, in the same menu, writes a grown or shrunk copy onto another layer and keeps the original, with variants that size only the vertical or only the horizontal edges.

In a rule file, sized(m1, 0.05 um) grows and a negative value shrinks; sized(m1, 0.1 um, 0.0 um) sizes x only, and when rectangles are grown an option such as corners=octagon picks the corner style. The rule-file reference notes that sizing works shape by shape and does not merge, so pair it with merged(...). Scripts reach the same machinery through the layout's sizing calls; the figures on this page were made that way.

One habit catches most of the failures above. Size onto a scratch layer, merge first if you are shrinking, then count polygons and compare areas with what you expected. Zoom in on every narrow neck and every sharp tip before you trust the result.

Continue exploring