How to set a specific point as an "adjust origin" point

dbdb
edited May 2014 in Layout
To whom it may concern ,

i would like to define a point at specific coordinates (x,y), within a predefined cell, in order to act as an "adjust region" point. How could i do that ?

Thank you in advance.

Comments

  • edited May 2014

    Hello,

    I guess you mean "adjust origin" ... When I understand your request correctly, you want to make that point the new origin (0, 0). That boils down to shifting the content of the cell by (-x, -y).

    You can shift the contents of a cell the following way:

    • Make sure you just select top-level objects only ("View"/Check "Select Top Level Objects")
    • Select all ("Edit"/"Select"/"Select All")
    • Move the selection ("Edit"/"Selection"/"Move By" + enter -x, -y values)

    However, that won't adjust the instances of the cell, so if the cell is called in other cells, it's content will appear shifted in those cells then.

    Matthias

  • dbdb
    edited November -1
    Hi Matthias ,

    First of all thank you for your reply.To this point i would like to elaborate more on my question. Let assume that i have a cell including many shapes within its boundaries, when someone edit this cell by clicking "Edit"-> "Cell" -> "Adjust origin", should put origin relative to cell's boundaries box. So, my question is : is it possible to put origin relative to a shape (within the cell) or to put/define origin at arbitrary (x,y) coordinates in the cell. In my opinion , that would be create whether someone has to merge many cells and align them to each other in a single gds layout.

    Thank you in advance.
  • edited May 2014

    Hi,

    I'm afraid I don't understand the question.

    As sketched above it is possible to move the contents of a cell, so it's basically possible to set the origin to any position - by moving the content in the opposite direction. It's not as convenient as the "adjust origin" method, but basically that is what is happening in "adjust origin" as well.

    With one difference: "adjust origin" will make sure the instances of the cell will be adjusted too and the layout effectively does not shift.

    Is that the problem?

    Matthias

  • dbdb
    edited November -1
    Hi Matthias ,

    let me briefly describe you the situation :

    Let a assume that i have one gds file (cell) consisting of several straight waveguides and another one (the second cell) that consists of 4 parallel stacked rectangles within them are defined four parallel stacked circles at specific (x,y) coordinates.

    What i want is to align the second cell with the first,in such a way that the center of the first circle (and consequently the entire second cell) would be aligned to the first waveguide origin (i.e. actually it is an individual shape).

    In other words i would like somehow to define / put a specific shape or even a specific coordinate of the second cell to act as an "origin" point .Moving all the shapes simultaneously using "move by "indeed works but it's a really painful process, especially when someone has to align many cells within a layout.
    Finally , i can give you a more detailed description, in a pm if that would work out better for you, including some representative highlights.

    Thank you in advance.
  • edited November -1

    Hi db,

    your description calls for automation, but it's very difficult without an actual sample.

    There is another feature which may be helpful to simplify your task. You can align "objects" using the "Edit/Selection/Align" feature. You can align a cell to a shape:

    • Instantiate your cell anywhere
    • Click on the shape
    • Then click on the instance with Shift pressed (make sure you have enabled "Top level objects only" in the View menu)
    • Choose Edit/Selection/Align

    This however will not solve your problem entirely since you want to align a certain shape inside your cell. This you can achieve with a trick:

    • Create a dummy layer
    • Enter the cell which you want to align
    • Copy your alignment target shape to the dummy layer
    • Go back to your top cell
    • Create a small dummy shape on the alignment target position or copy the alignment shape to the dummy layer
    • Hide all layers except the dummy layer
    • Select the shape and then the cell with Shift+Left click
    • Choose Edit/Selection/Align, this time choose '''Use visible layers only'''

    "Use visible layers only" will make KLayout use the dummy layer for computation of the cell's bounding box. Hence the shape you have marked by copying to the dummy layer acts as the alignment center.

    Maybe that provides a solution.

    Matthias

  • dbdb
    edited November -1
    Hi Matthias,

    Thank you very much for your suggestion , which is exactly what i was looking for.

    All the best,

    db
Sign In or Register to comment.