I am working on a project and need some assistance with the resizing (biasing) of polygons. Specifically, I would like to modify the behavior such that when expanding or contracting the polygons, if a vertical or horizontal edge forms an angle less than 90 degrees with a diagonal edge, the resulting edge should be adjusted to be perfectly horizontal or vertical.
Currently, when I use the built-in methods, the resulting edges in such cases remain at an angle. My goal is to ensure that after resizing, any edges formed from angles less than 90 degrees between a vertical/horizontal edge and a diagonal edge are adjusted to align perfectly as either horizontal or vertical.
Could you provide guidance or suggestions on how I might achieve this effect using scripting?
The red represents the original size contracted by 2.5 µm, while the blue represents the desired result.
Thank you very much for your assistance.
Comments
I have tried all five modes, but none of them can maintain the horizontal and vertical edges, which is why I’m reaching out for assistance.![
Hi @neil,
here is my solution. The script is Python and can be run on the sample layout you provided. If you don't see the layer 100 generated use "Add Other Layer Entries" from the layer list's context menu.
The idea is to combine two versions of size: one two-step version that does a horizontal size and a vertical size. This renders too thin diagonal lines. This is compensated by a normal size which does not get the edges right. The "OR" operation will merge both, rendering your desired output.
Matthias
Thank you so much for sharing your solution and providing such a detailed explanation along with the Python script. Your approach effectively addressed the issue I was facing, and I especially appreciate the creativity in combining two sizing methods to achieve the desired output.
Your support and patience mean a lot to me, not only in helping me move forward with my work but also in teaching me valuable techniques along the way. I’m truly grateful for the time you took to assist me.
Thanks again, and I look forward to the possibility of collaborating with you in the future.
Neil