You could cut (subtract) along the inner vertical edges and
stretch (Partial) to re-butt the ends of the horizontal edges?
At least that's how I'd do it, by hand knowing only what I know.
If your question was how to script it, I got nuthin'.
Hi Dick, Thanks for your feedback, if I do it by hand, I'll use your method.
Yes, my question is how to do it by python script.
Anyway, really appreciate your comment. Thanks.
"decompose_trapezoids" is not available as a DRC or LVS function (yet). It is a method the of "Region" class.
But there is a workaround: every DRC or LVS layer has a member called "data" which is the internal "Region" object. Here is how you can use "decompose_trapezoids":
As discussed in our other thread, you can also use"delaunay" instead of "decompose_trapezoids" which gives a constrained Delaunay triangulation avoiding skinny shapes for example.
Comments
You could cut (subtract) along the inner vertical edges and
stretch (Partial) to re-butt the ends of the horizontal edges?
At least that's how I'd do it, by hand knowing only what I know.
If your question was how to script it, I got nuthin'.
Hi Dick, Thanks for your feedback, if I do it by hand, I'll use your method.
Yes, my question is how to do it by python script.
Anyway, really appreciate your comment. Thanks.
Hi kmho,
the method you're looking for is "Polygon#decompose_trapezoids". It will give you a set of smaller (4 corners max) polygons from a bigger one.
Regards,
Matthias
Thanks Matthias. It's exactly what I'm need.
I have tried to use this decompose_trapezoids method, but my syntax is no good in my LVS file :
There is probably something missing between Gates and decompose_trapezoids ?
Regards,
Laurent
Hi Laurent,
"decompose_trapezoids" is not available as a DRC or LVS function (yet). It is a method the of "Region" class.
But there is a workaround: every DRC or LVS layer has a member called "data" which is the internal "Region" object. Here is how you can use "decompose_trapezoids":
"decomposed" is a "Region" object, not a DRC layer. If you want a DRC layer, you can use:
There is a related discussion on this: https://www.klayout.de/forum/discussion/1827
As discussed in our other thread, you can also use"delaunay" instead of "decompose_trapezoids" which gives a constrained Delaunay triangulation avoiding skinny shapes for example.
Best regards,
Matthias