DRC questions) How can I return the 1nmX1nm dot on the center of polygon?

edited July 2015 in Layout
I think Klayout DRC is powerful like calibre DRC.
***I need to make small dot polygon(1nmX1nm) on the center of polygon.** --> This is the main question
I know there is such function in calibre DRC as option of extent command.
Is there some tips on it?
and Calibre DRC have another power function "CONVEX EDGE" it can detect specified edge with edge length and neighboring angle and neighboring length.Is there the similar function?

Comments

  • edited July 2015

    I am not familiar with calibre DRC but I'll attempt..

    Your first question: "I need to make small dot polygon(1nmX1nm) on the center of polygon... I know there is such function in calibre DRC as option of extent command."

    I'm not sure what option of extent command is. I'm also not sure why you are doing this with DRC. I will interpret your question as:

    "Given an arbitrary polygon (which can be chosen either by manual selection or by user properties or by some other method), how can I draw a 1nm x 1nm box in the center, where 'center' is defined as the center of the bounding box."

    More wordy, but more precise. Is this what you mean? If so, I can provide a (non-DRC) ruby script that would do that. But need more information -- how will these polygons be chosen? By manual selection with the mouse? By user properties? By layer (i.e. all polygons on a specified layer)? By cell (i.e. all polygons within a specified cell)? Your question is very vague. Perhaps my misunderstanding is due to my lack of knowledge of calibre DRC option of extent command though. So, if I'm way off-base with my comments then I apologize!

    It is also possible you think you want a 1nm x 1nm box, but actually there is a better way to skin your cat. Like, perhaps a 'Point' guiding shape in the center. If you explain why you want the 1nm x 1nm box that will help.

    Last comment on that question: If the center of the polygon is defined in integer database units, you can't draw a 1nm x 1nm box (0.5nm on either side) without having a fraction of a database unit (0.5nm) which is generally not allowed. Unless you do something non-standard like change the database unit to something smaller. If you understand this then that's fine -- but mentioning it in case you think you want a 1nm box but actually want a 2nm x 2nm box (so that it falls on the standard 1nm manufacturing grid, centered at the center).

    Regarding CONVEX EDGE, I have no idea and will have to wait for someone else to reply

    David

  • edited November -1

    to davidnhutch :
    Thankyou for your reply.
    calibre drc can make extend on certain polygon(DRC object) and make small rectangle on center of extent.
    I can get center location with python. but to simplify and increase repeat-ability of my study I need that function.
    I'been familiar with Calibre DRC and It have many valuable command.
    I think to explain convex edge exactly, I need to make picture about it. can I upload the picture on this page?

  • edited July 2015

    Not sure what 'calibre drc can make extend' means -- I assume that means calibre drc can find the extents of a polygon and then find the center of that extent. By 'extent' I assume you mean bounding box. Let me know if I misunderstood that.

    Probably, it is calibre terminology that I am not familiar with. Perhaps someone else will have some better idea if they have experience with calibre.

    I am not at all familiar with Python sorry, having not dived in to that in KLayout yet. I could only potentially provide some help via Ruby. It's also not clear to me that you need to do this 1nm-box-placing via DRC script, why not just Ruby/Python (non-DRC) script? Try to provide all the information you can.

    If you host the image somewhere else on the web (there are plenty of free services), then copy the URL, you can embed it here. Look at http://daringfireball.net/projects/markdown/syntax and scroll to IMAGES for instructions.

  • edited November -1

    Hi m1a2tank,

    There is no "centers" feature yet. But unlike Calibre you can access the objects inside your layers while the DRC script runs. This happens through the "data" method which returns a RBA::Region object.

    This allows you to script the center feature you ask for:

    l1 = input(1)
    
    # compute the center dots
    # centers of merged "l1" polygons will be written to "dots" layer
    dots = polygon_layer
    l1.merged.data.each do |p|
      center = p.bbox.center
      # create a box with 1x1 DBU at the center
      dots.data.insert(RBA::Box::new(center, center + RBA::Point::new(1, 1)))
    end
    
    dots.output(10)
    

    This solution is not very efficient, but for simple cases it provides a reasonable workaround.

  • edited November -1

    Thank you Mathias.
    Though I cannot understand how does it works, I confirmed It works.
    your solution outputs with polygons.
    polygon output type is useful because it can be easily filtered by and/not DRC operation.

  • edited November -1

    to David, Mathias's comment was what I wanted.
    I wanted to make dot polygon on each polygon's center.
    and the grid snapping is not problem to be. (0.5nm location error is not problem to me).
    I wanted to get "center location of each polygons as polygon object" to make it the input of machine learning task.

    for example the convex edge usage is like below. This is one of most frequently used command for Calibre DRC.

    POLY_LINEEND = CONVEX EDGE POLY ANGLE1 == 90 LENGTH1 > 10
    ANGLE2 == 90 LENGTH2 > 10
    WITH LENGTH > 1 < 2

    This example will return the poly line-end edge (line end length will be 1~2um , line end adjacent edgelength will be > 10um)
    I hope K-layout DRC will have more such useful command.

Sign In or Register to comment.