Making circles

edited November 2011 in General
Hi there,

I would like to make a circle and cannot get the rounding corners to work. I have a 0.001um grid and would like to round the corners of a 5000um square path, ideally so it's a 5000um diameter circle. I can't find any values for outer corner radius and number of points to make this happen for any corner radius.

How is this function supposed to work, or can you give me some examples of appropriate values that do work?




  • edited November -1

    Hi Sebastian,

    that's how it works for me on 0.21.13:

    • draw a circle of 5000x5000 micron. Since that circle has to be exactly 5000x5000, I used a large grid of 1000 micron.
    • select the circle and choose Edit->Selection->Round corners
    • Enter 2500 for the Outer radius
    • if you hit Ok, the square becomes a circle

    You can use Edit->Selection->Round corners on the circle again to change the number of points for example.

    Best regards,


  • edited November -1
    Hi Matthias,

    - I open klayout 0.21.13
    - Start new layout with database unit 1000micron, initial window size 10000 micron
    - Create new layer (layer 1, datatype 0)
    - Create a box 5000um x 5000um
    - Round corners with outer radius 2500 micron and number of points 100
    - Error message "Number of points is too large (one segment must be larger than 10 database units)"

    So I don't understand how this is supposed to work.

    What is the 'segment' it refers to? Segments are measured in radians (angle) not units of length so this doesn't make sense to me. Can someone please explain how this tool is supposed to work?

    I want to draw a circle with radius 2500um on a layout with database unit 0.001um. Help?


  • edited November -1
    Hi Seb,

    Why do you specify 1000 micron for the database unit for the new layout when you want to have 0.001 micron? I guess that is the problem.

    For a general explanation of the function:

    Circles are not basic objects of GDS2, hence there is no function (yet) to create "real" circles.

    Instead you can use the "round corners" function to create circles from squares by choosing a rounding corner radius that exactly matches half the dimension of the square. In result you get a polygon that is a circle.

    That scenario is a special case of the rounding function which is basically provided to create "soft" corners from rectilinear polygons. The number of segments specifies into how many points one corner is resolved. If you create a circle from the square, the resolution circle will have four times the number of segments points.

    The round corner function can also be applied again. Therefore it must be able to derive the original layout. For that, the points of the polygon must not be too far off the real circle. Since all points are snapped to the database unit in GDS2, the segments must not be too short compared to the database unit. Hence the 10 times DBU limit.

    Hopefully that helps.


  • edited November -1
    Hi Matthias,

    In my last comment I was trying to replicate your suggestion, hence the 1000 micron database unit.

    In my own case, yes, I have a 0.001um database unit. I now have it working - I didn't realise it was an issue with 'rounding' the coordinates of points defining the 'circle'. E.g. for an 80nm square, radius 40nm, point 20 it works fine.

    The error message "Number of points is too large (one segment must be larger than 10 database units)" really means "I can't divide X into Y points and keep whole database units"

    Thanks for your help.

  • edited November -1
    That's good :-)

    Sorry for creating the confusion about the database unit.

    It's a know issue that the "round corners" function is somewhat picky. because it wants to maintain nice arcs even under grid snapping. On the other hand by doing so it is able to derive the original figure from the rounded-corner polygon and it is able to reapply a rounding with different parameters. That's a major feature which is not easy to sacrifice ...

    Best regards,

Sign In or Register to comment.