Hi, I'm wondering if there is a easy solution to "smoothen" the jagged edges of a curved lines? This image attached is from a Python script. Also I converted from PNG to GDS, but they all suffer from the jagged edges 1-2nm step size.
Yes, there is the DRC "smoothed" function. It eliminates additional vertexes to return a smoothed polygon that deviates from the original contour by a given maximum distance.
Here is a one-liner that applies the smoothing to layer 1/0 and writes the result to layer 100/0. The deviation allowed is 1nm:
input(1, 0).smoothed(1.nm).output(100, 0)
And here is a sample:
Caveat: the deviation measurement is only accurate to one database unit, so if you have a 1 nm database unit, the actual deviation can be larger (up to 1.5 nm). In my example I used a 0.1nm database unit to get a "real" 1 nm maximum deviation.
Comments
Yes, there is the DRC "smoothed" function. It eliminates additional vertexes to return a smoothed polygon that deviates from the original contour by a given maximum distance.
Here is a one-liner that applies the smoothing to layer 1/0 and writes the result to layer 100/0. The deviation allowed is 1nm:
And here is a sample:
Caveat: the deviation measurement is only accurate to one database unit, so if you have a 1 nm database unit, the actual deviation can be larger (up to 1.5 nm). In my example I used a 0.1nm database unit to get a "real" 1 nm maximum deviation.
Matthias
Thanks a lot @Matthias!
That worked well.
I'm just wondering if there is also a curve smoothing?