Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Clarification: ObjectInstPath.source_dtrans() vs ObjectInstPath.dtrans()

edited May 22 in KLayout Support

Hello,
The documentation about ObjectInstPath.dtrans() reads: "This method is not applicable to instance selections. A more generic attribute is source_dtrans" (cf. https://www.klayout.de/doc-qt5/code/class_ObjectInstPath.html).
However, when I try it with an instance, it seems to work. Is the documentation up-to-date? Is there a case where source_dtrans() and dtrans() would differ?

Olivier (with KLayout 0.25.8)

Comments

  • Hi Olivier,

    sorry for the sloppy description. The reason is history: first there was only "trans" (or "dtrans" if you like). But there was a flaw in the design: for selected instances this transformation included the transformation of the instance itself. This makes this attribute difficult to use and is very counter-intuitive.

    "source_trans"/"source_dtrans" was added to mitigate this issue: for shapes this is the transformation of the shape to the upper end of the path. For instances this is the transformation of the instance, not including the instance transformation itself.

    Matthias

Sign In or Register to comment.