Glade Reference


lpp (formerly dbLpp)

A lpp object forms a layer-purpose pair. It manages objects in a tree structure for fast spatial searching.

 

l = lpp(cellView *cv)

Constructs a lpp object with master cellView cv.

 

l.layerName(const char *name)

Sets the layer name of the lpp.

 

const char * l.layerName()

Gets the lpp's layer name

 

l.purpose(const char *name)

Sets the purpose name of the lpp.

 

const char * l.purpose()

Gets the lpp's purpose name

 

l.layerNum(int layerNum)

Sets the layer number of the lpp.

 

int l.layerNum()

Gets the lpp's layer number

 

int l.numShapes()

Gets the number of shapes in this lpp.

 

cellView *cv = l.cv()

Get the cellView for this lpp.

 

Rect box = l.bBox()

Get the bounding box of all shapes in this lpp.

 

l.bBox(Rect box)

Set the bounding box of the lpp.

 

l.optimiseTree()

Optimise the lpp. Must be carried out after adding objects.

 

l.updateTree(dbObj *obj)

Update the lpp for an object

 

dbObjList<dbObj> * list = l.getOverlaps (Rect searchRect, int filterSize=0)

Search the lpp for shapes overlapping the search rectangle searchRect. If filterSize is non-zero, only shapes with a width and height greater than filterSize are reported.

list = l.getOverlaps_py (Rect searchRect, int filterSize=0)

As above, but returns a Python list.

l.getOverlaps (dbObjList<dbObj> *list, Rect searchRect, int filterSize=0)

As getOverlaps, but shapes are appended to the existing list.

 

Iterator

An iterator to allow traversing the objects in the lpp using Python.

 

iter = objIterator(lpp *l)

Initialises the dbObj iterator for the lpp. For example:


iter = objIterator(lpp)
while not iter.end() :
    obj = iter.value()
    type = obj.objType()
    print "object type = ", type
    iter.next()

 

dbObj *obj = iter.value()

Returns the current object.

 

iter.next()

Advances the iterator to the next dbObj.

 

bool iter.end()

Returns false if there are more objects, else returns true if there are no more.

 

Contents|Index

Copyright © Peardrop Design 2020.