heitzmann / gdspy

Python module for creating GDSII stream files, usually CAD layouts.
Boost Software License 1.0
352 stars 128 forks source link

polygon in clockwise or counterclockwise #45

Closed enuinc closed 6 years ago

enuinc commented 6 years ago

Hi

maybe not totally related to gdspy, but I just wonder if there is a common convention regarding the polygon vertices orientation in GDS file. The file I am opening has counter-clockwise but I read somewhere that GDS format does not dictate one way or the other. Is this true? How to express holes in a polygon then?

Thanks enuinc

heitzmann commented 6 years ago

Hi @enuinc, that's right, there is no convention for polygon orientation in GDSII. It's also not possible to draw polygons with holes. However, it is okay to have polygons self-intersect along edges, so holes can be introduced by connecting them to the outer edge. For example, take a look at gdspy.Round with inner_radius ≠ 0 in the tutorial.