It looks like you're new here. If you want to get involved, click one of these buttons!
recently, I'm using klayout standalone python module to do some scripting works。But I am really confused about the DCplxTrans/DTrans behaviour.
In my script, I use some code like below to insert some polygon Text in my layout.
layer = layout.layer(layer_info, layer_info) text = textGen.text(string, dbu) trans = db.DCplxTrans(db.DTrans(3, False, coord_info-5, coord_info+5), 10) #coord_info is a list which contains two float numbers topCell.shapes(layer).insert(text, trans)
And thoes codes work fine, polygon Text is placed in the float-number coordinate correctly.
But, when I use some code shown as below to insert CellInstArray in topcell
letter_top = layout.cell(letterTopName) letter_top_index = letter_top.cell_index() trans = db.DCplxTrans(1, 270, False, x, y)# x, y both are float number topCell.insert(db.CellInstArray(letter_top_index, trans))
instances cannot be placed in the float-number coordinate correctly, except I provide parameter x/dbu, y/dbu to DCplxTrans as coordinates
It seems cell.insert function always handles DCplxTrans/DTrans as an interger transfomation.
Is it a bug?