Creating Clips

KLayout provides a utility to create rectangular clips from a given cell. One or more rectangles can be specified. The current cell is cut along the edges of these rectangles. For each rectangle, a new cell is created containing the clipped content for the rectangle. Finally, if more than one rectangle is specified, all the clips are combined into a master top cell which appears as a new top cell in the cell hierarchy.

The clips can be either specified by coordinates, taken from another layer (which must contain boxes which then are copied into the output as well) or taken from the rulers. In the latter case, the rulers' start and end points are taken as the corners of the clip rectangles. It is convenient therefore to create a new ruler type with a box appearance for this purpose.

Clips are done hierarchically: child cells are clipped as well, potentially creating variants (which may be shared by several clips). This way, large clips can be created from large layouts in an efficient way. Hint: Clipping will not work exactly if the layout contains cell instances with arbitrary rotation angles such as 45 degree.