Hierarchy built-ins
inst
inst(cell: Cell, reflect?, angle?, x?, y?, xi?, yi?, construction?) -> Inst
Places a cell in the current scope.
| Argument | Type | Requirement | Description |
|---|---|---|---|
cell | Cell | Required, positional | The cell value to place, such as inverter(1200., 2000., 4). |
reflect | Bool | Optional; false | Mirror the cell before rotating and translating it. |
angle | Int | Optional; 0 | Rotation in degrees: 0, 90, 180, or 270. |
x | Float | Optional keyword | x position. |
y | Float | Optional keyword | y position. |
xi | Float | Optional fallback | Initial x position. |
yi | Float | Optional fallback | Initial y position. |
construction | Bool | Optional; false | When true, leave the instance out of layout export and of the parent bounding box. |
Returns Inst. The instance, with its position and the fields its cell exports.
let placed = inst(inverter(1200., 2000., 4), x=100., y=50., angle=90);
bbox
bbox(value: Cell | Inst) -> Rect
Returns the bounding box of a cell or a placed instance, as a construction rectangle.
| Argument | Type | Requirement | Description |
|---|---|---|---|
value | Cell | Inst | Required, positional | A cell value, measured in its own coordinates, or an instance, measured after placement. |
Returns Rect. A construction rectangle around the layout geometry.
let child = inverter(1200., 2000., 4);
let local = bbox(child);
let placed = inst(child, x=100., y=50.);
let transformed = bbox(placed);
Construction-only geometry does not count toward the bounding box.