VARY DIMENSIONS AND SPACING AUTOMATICALLY.

Hi
In my project, I want to draw arrays of rectangles, but their dimensions (width needs to vary as an A.P. eg: rectangles with width 2um, 4um, 6um, 8um........etc.
I also want to vary the spacing between these structures in a similar way.
Is there any easy way to do this, other than changing dimensions in properties one by one?
Thanks in advance.

Comments

  • edited October 2013

    Hallo,

    your problem is typically solved by scripting the generation of such layout.

    You can use KLayout's built-in scripting feature to do so, but now it's up to you whether you want to spend time to learn how to do so or still create the layout manually.

    Please see http://www.klayout.de/doc/programming/index.html and specifically http://www.klayout.de/doc/programming/database_api.html for an introduction.

    Matthias

  • edited November -1
    Hi Matthias -

    as we discussed recently, for many people (including myself), doing scripting with Ruby and its API to klayout, while being extremely powerful (that's why it's on my list of things to learn), poses a very steep learning barrier.

    Also, for many people (including myself), who know at least some scripting or programming language (C, Fortran, perl, tcl, matlab,...), the barrier would be much lower for direct scripting of text GDS format. All one needs to do is generate some elements in klayout, save as text format, analyze and understand the structure, do the coding,... done.

    Max
    ---------
  • edited October 2013

    Hi Max,

    you indicated the problem already - there are too many ways to go and everybody prefers his or her favourite language. One feasible and language-independent way is to write a text file in KLayout's GDS text format and use KLayout to convert to "real GDS". You'll have to be familiar with the record structure of GDS in order to produce valid GDS, but there is enough documentation around for that.

    There are also numerous libraries out there which allow writing of GDS file with all kind of programming languages. That's an option as well.

    The reason why I am advertising KLayout's Ruby API is that is comes integrated into a viewer and editor and supports advanced functionality like boolean operations and sizing which you can employ inside layout generation. The target of the API is beyond layout generation - manipulation of existing layouts is another one.

    And be frank - if you compare the complexity of the layout generation API with the GDS2 Perl module - I don't think it's quite different.

    I agree, Ruby is not everybody's darling. But it's a language which is easy to integrate into an application, it is widely used and well documented and unlike Perl or plain Tcl it is a modern-style OO language with a lot of nice built-in features. One day I might integrate Python as well, but currently that does not have topmost priority for me.

    Regards,

    Matthias

  • edited November -1
    Hi Matthias -

    understood, and 100% agreed.

    Regarding layout manipulation (boolean, sizing operations, etc.), if I can ask - how far do you plan to grow klayout in that direction? (are you planning to implement other geometrical operations available in Calibre or Assura?).

    Regards,

    Max
    ---
  • edited October 2013

    Boolean operations? Not just that.

    Stay tuned ... I guess you'll like 0.23 ... :-)

    Matthias

Sign In or Register to comment.