Not signed in (Sign In)

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorChristian
    • CommentTimeJun 30th 2016 edited
     

    Hi,

    first of all, thank you very much for that nice software and implementing the python scripting engine. It is really fun working with klayout.

    As said in the title I would like to know how to convert a Basic.TEXT PCell to a polygon so that I can use it in a boolean operation. I the end I want to get an inverted text in the layout. The easiest way to do that using the GUI is to create a Basic.TEXT instance, flatten the top cell and then draw a box with the difference background-mode around the text object. What would be the equivalent using a script? I got a little further by converting the PCell in a static cell but still I cannot figure out how to do boolean operations between static cells and polygons (regions).

    Regards, Christian

    • CommentAuthorChristian
    • CommentTimeJun 30th 2016
     

    I found a way to get what I want but it seems a bit cumbersome. I write the text to a new layer and use cell.top.begin_shapes_rec(layer) to convert all objects from that layer into a region. Then I can use the boolean operations on the regions and write the result back to the layer where I want the inverted text to appear.

    • CommentAuthorMatthias
    • CommentTimeJul 7th 2016
     

    Hi Christian,

    thanks for this nice feedback :-)

    The Basic.TEXT PCell already has a "inverse" option. With this option, the text will be "holes". Did you try this option? It's available below the "magnification".

    Regards,

    Matthias