Shapes · Files
Boxes are just rectangles
An axis-aligned rectangle is a native four-number object. Rotate, chamfer, or boolean it and it becomes a polygon.
Last edited: September 20, 2026

You want a pad or a strap whose edges stay horizontal and vertical, and you want the file to remember that cheap fact.
You drag two corners. The program stores four numbers — left, right, bottom, top — not a free list of vertices. That object is a box. In layout language a box is an axis-aligned rectangle on one layer: sides parallel to the axes, nothing rotated off those axes, nothing chamfered. Rotate it by ninety degrees and it usually stays a box, because width and height swap. Rotate it by one degree and most editors convert it to a polygon. A boolean OR of two boxes writes a polygon even when the outline is still rectangular. The picture at the top of this page is a handful of those four-number rectangles on different sheets, some of them overlapping. Overlap does not promote them. Touching does not merge them.
When a rectangle stops being a box
The second picture puts the cheap object beside the one that graduated.

On the left, four numbers. On the right, the same outer size after the corners were cut. That cut-corner shape is a polygon. The factory can build both. Only the left one is still the four-number object. Some tools can recast a perfectly rectangular polygon back into a box. Many flows never bother, so the OR you ran to join two pads has already thrown the cheap contract away.
The center of a box is obvious: halfway between left and right, halfway between bottom and top. Via-in-pad and device-origin formulas lean on that. A general polygon's center might mean the centroid of the area, the center of the bounding box, or a point a placer invented. After a box becomes a polygon, confirm which formula your tool still uses.
Why the cheap contract matters
Mask writers and many checkers treat axis-aligned rectangles as the cheap case. Variable shaped-beam tools expose with rectangular shots. Mask fracture spends less time when the layout is already boxes and trapezoids. OASIS has a dedicated rectangle record. GDSII can store a box element, though many shops prefer ordinary boundary polygons for every filled shape so old readers do not treat a box as an unfilled outline. Either way, keeping a pad as a true box in the editor is a kindness to stretch, selection, and compression.
On a board, copper pads often start as boxes even when the finished plot is a polygon language. On a chip, metal straps and many vias are boxes until a rule asks for a chamfer or an octagon. A square rotated forty-five degrees is a diamond, not a layout box. Four separate lines are four objects, not one rectangle.
A pad that stopped being a box
A connector footprint used boxes for the pads. Someone cleaned the library by converting everything to polygons and rotating the part a fraction of a degree so the silk matched a scanned outline. The pads were no longer boxes. Pick-and-place still used the old box centers. Pins sat on the edge of copper. The drawing still looked rectangular at arm's length. Open the properties. If the type is polygon, the cheap contract is already gone.
Do not draw a notch by overlapping a second box and hoping the overlap is a bite. Overlap is not a hole. You needed a polygon, or a boolean subtract. If the job is an axis-aligned pad, start with a box and keep it a box until a chamfer forces the upgrade.
When you stretch the rectangle on the left of the second picture, the opposite edge stays put and the width changes, because a box stretch edits one of the four numbers. Try the same gesture on the cut-corner shape and you are pulling a vertex. The neighbors of that vertex move along the cut corners. That is the moment the object stopped being cheap. If a library part must stay a pad, refuse the rotation that is not a right angle, and refuse the chamfer until the assembly drawing truly needs it.
Selection tells you the truth faster than the fill does. Click one rectangle at the top. The property line should say box, with a width and a height. Click the cut-corner shape and the property line should say polygon, with a vertex count. If a library of rectangles reports polygons, someone already rotated them off a right angle, chamfered them, or joined them with a boolean, and every center calculation downstream is a guess you have not audited. Audit it before the footprint or the via array ships.
Four numbers, then a vertex count
Click the rectangle on the left of the second picture and read the property line. It should say box, with a width and a height. Those four edges are two coordinates and two sizes. Stretch one edge. The opposite edge stays put, and only the width or the height changes. That is the cheap edit a pad wants.
Click the cut-corner shape. The property line should say polygon, and it should give a vertex count. The same stretch now pulls a vertex, and the neighbors of that vertex move along the cut. If a library of pads reports polygons, someone rotated a rectangle off a right angle, chamfered it, or joined two boxes with a boolean. A notch you tried to make by laying a second box on the first is still two boxes. Overlap is not a bite. Audit the property line before a footprint or a via array ships, and keep an axis-aligned pad a box until a chamfer is actually required.
Continue exploring
-
Polygons in a layout: vertices, holes, and why a box is not enough
A layout polygon is a closed list of vertices on one layer: how GDSII and OASIS store it, vertex order and area, holes as cut lines, broken polygons, vertex limits, and how to check them in LayoutEditor.
-
Manhattan versus all-angle
Manhattan layouts use only horizontal and vertical edges; 45-degree and all-angle layouts allow slants and curves. The choice changes wire length, how gaps are measured, which corners land on the grid, which rules apply, and what the mask costs.
-
Layout grids: display grid, database unit, and manufacturing grid
A corner can sit on the display grid and still miss the manufacturing grid. How the three grids differ, and why an off-grid corner is rounded by the mask writer and can fail a space check.
-
Select, move, stretch, copy: editing layout without breaking it
How the selection in LayoutEditor decides between move and stretch, why a pad moved alone opens a joint without a DRC error, which SKY130 rules a stretch can break, and how copies differ from cell references, with tested LayoutScript and .ledrc examples.
-
Overlapping is not merging
Two shapes sharing coordinates are still two objects. A merge is one outline. Factories care which you meant.
-
GDSII in plain language
A 1970s suitcase that still carries almost every chip drawing on Earth.
-
Mask fracture in one sitting
Your polygons become the shots a mask writer can fire. The file grows. Slivers appear.
-
Paths in layout: centerline, width, end caps, and bends
A layout path stores a centerline and one width. How end caps and corners are built, when a path turns into a polygon, and how a wrong cap causes an open or a short.