Geometrical shape separation ?

edited August 2011 in KLayout Development
Hi Matthias,

I would like to know if the inverted function of "Selected Merge Shape" is well implemented in Klayout ? For instance, I want to separate a selected shape at the current layer (polygon or box) into 2 new shapes edge to edge (polygon or box). This shape separation requires to add a drawing tool like a cut line. In this function is'nt available, could I realize it by a Ruby script ?
Thanks
Best Regards
Jean-Yves

Comments

  • edited November -1

    Hi Jean-Yves,

    The only way to emulate that currently is to use a mask shape on some arbitrary layer covering one half of your original shape and perform a AND and a NOT boolean operation, both to different new layers. The first operation will select one half and the other operation the other half. If you then select all shapes on one of these layers and change their layer to the other layer, you will finally have both halves on the same layer.

    If that is too difficult, it is possible to automate the AND/NOT steps in a Ruby script, but the basic principle (a mask shape) will remain the same.

    Best regards,

    Matthias

  • edited November -1
    Hi Matthias,

    Thank you for your answer. I tried your solution by creating an additionnal cut layer followed with a NOT operation. It works perfectly !

    Thank you

    Jean-Yves
  • edited November -1
    Hi Matthias,

    Is it possible to make a boolean layer operation when Trace Net is still running ?
    In this case, Klayout returns a Bad Allocation error message.

    Thank you

    Jean-Yves
  • edited November -1
    Hi Matthias,

    hereafter some ways in order to understand the bad allocation memory error.
    When using the boolean layer menu available with Klayout, it's seems the processor shape pointer isn't destroyed after the operator execution. The memory used grows after each run.
    I tried also a boolean not operation between a box created from a cut layer and a single layer (> 250 Mb). Klayout returns in this case also a bad allocation memory error.

    Thanks
    Best regards
    Jean-Yves
  • edited November -1

    Hi Jean-Yves,

    it should not be possible to run a boolean operation while the net tracer is running. The database is not designed to support parallel reading and writing. That might explain a memory allocation problem. I'd consider it a bug, if it's possible to run the net tracer in parallel to the boolean operation.

    Another thing is, that the boolean operation is not quite efficient on hierarchical layouts. It's basically a simple flat implementation and suffers from hierarchy expansion. If you just need to use it for separating shapes, I'd suggest to select the shape to separate and then (using Shift+Mouse click) the mask shape and perform the NOT with the "Edit->Selection->Subtraction" menu, which operates on the selected shapes only.

    Best regards,

    Matthias

Sign In or Register to comment.