kqcircuits.util.refpoints

class kqcircuits.util.refpoints.Refpoints(layer, cell, trans, rec_levels)[source]

Bases: object

Helper class for extracting reference points from given layer and cell.

Once Refpoints is initialized, it can be used similar way as dictionary, where reference point text (string) field is the key and reference point position (pya.DPoint) is the value.

Refpoints is implemented such that the dictionary is extracted from given layer and cell only when it’s used for the first time. Extracting the dictionary can be relatively time-demanding process, so this way we can speed up the element creation process in KQC.

layer

layer specification for source of reference points

cell

cell containing the reference points

trans

transform for converting reference points into target coordinate system

rec_levels

recursion level when looking for reference points from subcells. Set to 0 to disable recursion.

dict()[source]

Extracts and returns reference points as dictionary, where text is the key and position is the value.

items()[source]

Returns a list of text-position pairs.

keys()[source]

Returns a list of texts.

values()[source]

Returns a list of positions.

../_images/kqcircuits.util.refpoints.png