It looks like you're new here. If you want to get involved, click one of these buttons!
hello everyone.
i just starting tinkering with klayout. I have a top cell full of instances of the same daughter cell. Some of them have a rotation angle of 0 degrees, while some of them are rotated by 180 degrees. How can I select all and only instances which are rotated, keeping the rest unselected?
TIA
Comments
Here is a recipe for version 0.29.11:
Matthias
Thank you so much, Matthias! Sorry for my late reply, i was ill.
It works just fine!
I also tried another option, changing slightly the query in "where inst.trans.angle != 0"; although, it works correctly only with zero; when i typed 180 the angle gave erratic results, selecting all instances. It looks like a "contains" criterion is being performed, because 180 contains the figure 0 so it will select either 0 and 180...
Hi @Clod,
actually, the rotation angle of the "simple transformation" is encoded in multiples of 90 degree, so 0 = 0°, 1 = 90°, 2 = 180° and 3 = 270°. In addition the codes 4 to 7 encode additional mirroring at the x axis before the rotation.
So checking rot != 180 will render all instances as the code is 0 to 7 only.
There is a complex transformation available (that is "cplx_trans" instead of "trans") which also includes scaling and arbitrary angle rotations. This is rarely used in VLSI layouts, so it's not first choice. This features a float rotation angle and with this transformation, "angle != 180" is the right approach.
Matthias
Understood. Thank you so much for your clear explaination!