Smoothness of circle

edited August 2012 in General
Hi,

I have some CIF files that encode circles. The circles are encoded as their x position, y position, and diameter, using the standard CIF format. So, they are true circles and not polygons.

I would like these circles to be as smooth as possible. When I open the CIF file with KLayout, the circle appears to turn into a polygon -- e.g. a circle with radius 10 um turns into a polygon with 32 clearly defined straight sides. This may sound like a lot of sides but it still looks angular and is not very smooth.

I thought maybe it's just displaying that way, but still storing the circle as a circle. However when I export to GDS (File > Save As...) I get a 32-sided polygon and not a circle.

I thought maybe I just need to find the setting to reduce the manufacturing grid, but here's what I found:
View > Grid > is already set at 0.001 um. This is very fine resolution and so is not the problem.
Edit > Editor Options > Snapping > Grid > is already set to Global Grid. I suspected maybe that was the problem so tried "Other grid..." and set it to 0.001um. Same thing, even after re-importing the CIF file.

My goal is to get a nice round circle when converting a file from CIF -> GDS. Any ideas?

Thanks,
David

Comments

  • edited September 2012

    Hi David,

    Given the latest KLayout version, a CIF circle is converted to a single-point round-ended GDS path or to a OASIS circle object. You can check that by double-clicking at such a circle. The properties of that circle should show a path with one point and round ends. The 32 points are just used for display.

    So a circle should stay a circle as far as the format allows. However, if you load the GDS file into another tool it will have other ways of interpreting such a circle. At some point, at least when you print it on a mask, it has to be converted to a polygon. Since mask writers in general use a certain writer grid you will get some more distortions through grid snapping of the vertexes, so "shape fidelity" is actually a more complex topic.

    In KLayout, only when you explicitly convert a circle to a polygon (i.e. in Edit/Selection/Merge), it will be converted to a 32-point polygon. Right now, that value cannot be changed except by recompiling the code, but I'll take your issue as a suggestion to provide an option for that value.

    Regards,

    Matthias

  • edited November -1
    Hi,

    When importing a gerber file with circles, I have a similar issue. The circles or arcs, no matter what size, seem to convert into polygons defined by 36 points when imported. When double clicking on the shape, KLayout confirms the shape is a 36 point polygon and lists the coordinates of the points.

    I notice on the gerber import dialogue there is an option at the end to define how many points circles are represented by. However, whatever I select here (more or less than 36), the circles are always 36 point polygons.

    I am sure I am missing something simple, can you help?

    Thanks,

    Dave
  • edited May 2014

    Hi Dave,

    I can't confirm that there is a bug. On 0.23.4 I can import a PCB layout with round apertures and if I modify the number of points I get smoother or less smoother circles. I have been using 8 to 200 points.

    Maybe your Gerber file is using polygons already or apertures which are 36-point polygons? In that case, there are no circles or circular apertures.

    Matthias

  • edited November -1
    Thanks Matthias,

    Not sure what the problem was. The objects certainly appeared like circular apertures in my gerber program. My work around was to convert the gerber arcs/circles to polygons of a satisfactory number of points before importing to KLayout.

    Great program!

    Dave
  • I think above comments will resolves your issue still you are facing any difficulties then you can join angular course which will helps you to enhance your learning in advance programming language.

Sign In or Register to comment.