the fair gds editor PolygonFundamentals

Storage of Polygons

polygon The LayoutEditor is like other CAD programs a vector program. This means, that every shape is save as a sequence of vectors. So a rectangular polygon consists of 5 coordinates with the last one identical with the first one. In this case inside and outside of the polygon is clear declared. This is strongly required for some algorithmen like the size adjust. Furthermore the LayoutEditor will sort the points automaticly in a counterclockwise order.

Polygons with Holes

hole polygon A polygon is a squence of vectors describing the outer contour. To define a hole inside a polygon a link will be added from the outer contour to the inner hole contour. By this way a polygon keeps still a single sequence of vectors. To keep polygon processing simple it is recomended that all links between the outer contour and an inner contour are vertical or horizontal.



Selfintersecting Polygons

polygon Already with an other five point polygon you may get trouble. In this example it is still clear what is inside and outside the polygon. A filling can be calculated correctly. But if you try to adjust the size of this polygon by moving the existing points, you can not reach expected shape. Also it is not possible to sort the points in a counterclockwise order.





polygon The next example is a little more complex. In this polygon there is an area which is surrounded twice. It is not clear defined, if this area is part of the polygon. Any program will handle it different. Many common algorithms will not work with this kind of polygon.





The two examples show that it is important to avoid selfintersecting polygons. The LayoutEditor will help you to do so. It automaticly detects selfintersecting polygons and convert them to non problematic polygons. The two examples will be converted like this:

polygon polygon

Not needed Points

polygon

Even simple polygons can have points which make no effect. These unneeded points can be a result of a prior operation. The LayoutEditor will detect these points and remove them.




CategoryTutorial


PolygonFundamentals (last edited 2014-09-27 12:37:23 by JurgenThies)