About The Basic Library

The "Basic" library

The "Basic" Library provides some useful generic PCells. One use model is to draw a shape and convert the shape to one of the provided PCells. This use model is suitable for creating Circles, Ellipses, Donuts, Texts and rounded and stroked polygons or rounded paths.

To use that feature, draw the shape and choose "Convert To PCells" from the "Edit"/"Selection" menu. A dialog will be shown where the target PCell can be selected. Only those PCells supporting that shape type will be shown.

The "Basic" library provides the following PCells:

TEXT

The text generator can produce texts in various forms. The following sample shows inverse text, normal text and text with bias and enlarged character spacing:

It's even possible to install custom fonts. Fonts are basically GDS files with the following features:

Custom fonts are installed by copying the font file to a folder named "fonts" in one of the places in KLayout's path. The standard font can be found in "src/db/db/std_font.gds" in the source package.

CIRCLE and ELLIPSE

These PCells define a circle and an ellipse. In both cases, the number of interpolation points (per full circle) can be specified. The default is 64 points. A circle features a handle to define the diameter. An ellipse features two handles defining the diameters in x and y direction.

When a shape is converted to a circle or ellipse PCell, the shape's bounding box will be used to define the enclosing box of the circle or ellipse.

DONUT

The donut PCell creates a circle with a hole. This PCell features the same parameters than the circle but an additional parameter defining the hole radius. For that, it provides two handles - one for the outer and one for the inner radius.

When a shape is converted to a donut, the shape's bounding box will be used to define the enclosing box of the donut and the hole's diameter will be chosen to be half of the outer diameter.

PIE and ARC

Both of these PCells are segments of circles or donuts. The PIE PCell features two handles to define the radius and start and end angle. The ARC PCell also features two handles to define outer and inner radius as well. The following image shows PIE and ARC in action:

Both PCells do not support conversion of shapes.

ROUND_PATH

The round path is a PCell that is based on a path object but is capable of smoothing the path's corners by applying a radius. The following image gives an example:

The PCell features a parameter that defines the radius. The path itself can be manipulated as usual, in particular with partial edit mode. Path objects can be converted to ROUND_PATH pcells. In that case, the initial radius will be chosen to be roughly 10 percent of the minimum bounding box dimensions of the original path.

ROUND_POLYGON

The round polygon is a PCell that is based on a polygon object but is capable of smoothing the polygon's corners by applying a radius. The following image gives an example:

The PCell features a parameter that defines the radius. The polygon itself can be manipulated as usual, in particular with partial edit mode. Polygon, box or path objects can be converted to ROUND_POLYGON pcells. In that case, the initial radius will be chosen to be roughly 10 percent of the minimum bounding box dimensions of the original polygon.

STROKED_POLYGON or STROKED_BOX

The stroked polygon or box is a PCell that is based on a polygon object but will produce the "rim" of this polygon. In addition, it can apply corner rounding with a given radius.

The PCell features two parameters that define the radius and width of the "rim" line. The polygon or box itself can be manipulated as usual. Polygon, box or path objects can be converted to STROKED_POLYGON or STROKED_BOX pcells. In that case, the initial radius will be zero. The width of the rim line will be chosen to be roughly 10 percent of the minimum bounding box dimensions of the original polygon. For STROKED_BOX, the bounding box of the original shape will be used as the basic shape.