!=  Signature: [const] bool != (const DPolygon p) Description: Inequality test p:  The object to compare against 

*  Signature: [const] DPolygon * (double f) Description: Scaling by some factor Returns the scaled object. All coordinates are multiplied with the given factor and if necessary rounded. 
<  Signature: [const] bool < (const DPolygon p) Description: Less operator p:  The object to compare against 
This operator is provided to establish some, not necessarily a certain sorting order

==  Signature: [const] bool == (const DPolygon p) Description: Equality test p:  The object to compare against 

_create  Signature: void _create Description: Ensures the C++ object is created
Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created. 
_destroy  Signature: void _destroy Description: Explicitly destroys the object
Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception.
If the object is not owned by the script, this method will do nothing. 
_destroyed?  Signature: [const] bool _destroyed? Description: Returns a value indicating whether the object was already destroyed
This method returns true, if the object was destroyed, either explicitly or by the C++ side.
The latter may happen, if the object is owned by a C++ object which got destroyed itself. 
_is_const_object?  Signature: [const] bool _is_const_object? Description: Returns a value indicating whether the reference is a const reference
This method returns true, if self is a const reference.
In that case, only const methods may be called on self. 
_manage  Signature: void _manage Description: Marks the object as managed by the script side.
After calling this method on an object, the script side will be responsible for the management of the object. This method may be called if an object is returned from a C++ function and the object is known not to be owned by any C++ instance. If necessary, the script side may delete the object if the script's reference is no longer required. Usually it's not required to call this method. It has been introduced in version 0.24. 
_unmanage  Signature: void _unmanage Description: Marks the object as no longer owned by the script side.
Calling this method will make this object no longer owned by the script's memory management. Instead, the object must be managed in some other way. Usually this method may be called if it is known that some C++ object holds and manages this object. Technically speaking, this method will turn the script's reference into a weak reference. After the script engine decides to delete the reference, the object itself will still exist. If the object is not managed otherwise, memory leaks will occur. Usually it's not required to call this method. It has been introduced in version 0.24. 
area  Signature: [const] double area Description: The area of the polygon
The area is correct only if the polygon is not selfoverlapping and the polygon is oriented clockwise.Orientation is ensured automatically in most cases.

assign  Signature: void assign (const DPolygon other) Description: Assigns another object to self 
assign_hole  Signature: void assign_hole (unsigned int n,DPoint[] p,bool raw = false) Description: Set the points of the given hole of the polygon n:  The index of the hole to which the points should be assigned  p:  An array of points to assign to the polygon's hole  raw:  If true, the points won't be compressed (see assign_hull) 
If the hole index is not valid, this method does nothing. This method was introduced in version 0.18.
The 'raw' argument was added in version 0.24.

Signature: void assign_hole (unsigned int n,const DBox b) Description: Set the box as the given hole of the polygon n:  The index of the hole to which the points should be assigned  b:  The box to assign to the polygon's hole 
If the hole index is not valid, this method does nothing.
This method was introduced in version 0.23.

assign_hull  Signature: void assign_hull (DPoint[] p,bool raw = false) Description: Set the points of the hull of polygon p:  An array of points to assign to the polygon's hull  raw:  If true, the points won't be compressed 
If the 'raw' argument is set to true, the points are taken as they are. Specifically no removal of redundant points or joining of coincident edges will take place. In effect, polygons consisting of a single point or two points can be constructed as well as polygons with duplicate points. Note that such polygons may cause problems in some applications. Regardless of raw mode, the point list will be adjusted such that the first point is the lowestleftmost one and the orientation is clockwise always. The 'assign_hull' variant is provided in analogy to 'assign_hole'. The 'raw' argument was added in version 0.24.

bbox  Signature: [const] DBox bbox Description: Return the bounding box of the polygon
The bounding box is the box enclosing all points of the polygon.

compress  Signature: void compress (bool remove_reflected) Description: Compress the polygon. remove_reflected:  See description of the functionality. 
This method removes redundant points from the polygon, such as points being on a line formed by two other points.
If remove_reflected is true, points are also removed if the two adjacent edges form a spike. This method was introduced in version 0.18.

create  Signature: void create Description: Ensures the C++ object is created Use of this method is deprecated. Use _create instead 
destroy  Signature: void destroy Description: Explicitly destroys the object Use of this method is deprecated. Use _destroy instead 
destroyed?  Signature: [const] bool destroyed? Description: Returns a value indicating whether the object was already destroyed Use of this method is deprecated. Use _destroyed? instead 
dup  Signature: [const] new DPolygon ptr dup Description: Creates a copy of self 
each_edge  Signature: [const,iter] DEdge each_edge Description: Iterate over the edges that make up the polygon This iterator will deliver all edges, including those of the holes. Hole edges are oriented counterclockwise while hull egdes are oriented clockwise.

Signature: [const,iter] DEdge each_edge (unsigned int contour) Description: Iterate over the edges of one contour of the polygon contour:  The contour number (0 for hull, 1 for first hole ...) 
This iterator will deliver all edges of the contour specified by the contour parameter. The hull has contour number 0, the first hole has contour 1 etc.
Hole edges are oriented counterclockwise while hull egdes are oriented clockwise. This method was introduced in version 0.24. 
each_point_hole  Signature: [const,iter] DPoint each_point_hole (unsigned int n) Description: Iterate over the points that make up the nth hole The hole number must be less than the number of holes (see holes) 
each_point_hull  Signature: [const,iter] DPoint each_point_hull Description: Iterate over the points that make up the hull 
ellipse  Signature: [static] new DPolygon ptr ellipse (const DBox box,int n) Description: Creates a simple polygon appoximating an ellipse box:  The bounding box of the ellipse  n:  The number of points that will be used to approximate the ellipse 
This method has been introduced in version 0.23.

extract_rad  Signature: [const] variant[] extract_rad Description: Extracts the corner radii from a rounded polygon Attempts to extract the radii of rounded corner polygon. This is essentially the inverse of the round_corners method. If this method succeeds, if will return an array of four elements:  The polygon with the rounded corners replaced by edgy ones
 The radius of the inner corners
 The radius of the outer corners
 The number of points per full circle
This method is based on some assumptions and may fail. In this case, an empty array is returned. If successful, the following code will more or less render the original polygon and parameters p = ... # some polygon
p.round_corners(ri, ro, n)
(p2, ri2, ro2, n2) = p.extract_rad
# > p2 == p, ro2 == ro, ri2 == ri, n2 == n (within some limits)
This method was introduced in version 0.25.

from_ipoly  Signature: [static] new DPolygon ptr from_ipoly (const Polygon polygon) Description: Creates a floatingpoint coordinate polygon from an integer coordinate polygon Use of this method is deprecated. Use new instead Python specific notes: This method is the default initializer of the object

from_s  Signature: [static] new DPolygon ptr from_s (string s) Description: Creates an object from a string Creates the object from a string representation (as returned by to_s) This method has been added in version 0.23.

hash  Signature: [const] unsigned long hash Description: Computes a hash value
Returns a hash value for the given polygon. This method enables polygons as hash keys. This method has been introduced in version 0.25.
Python specific notes: This method is also available as 'hash(object)'

holes  Signature: [const] unsigned int holes Description: Returns the number of holes 
hull=  Signature: void hull= (DPoint[] p) Description: Set the points of the hull of polygon p:  An array of points to assign to the polygon's hull 
The 'assign_hull' variant is provided in analogy to 'assign_hole'.
Python specific notes: The object exposes a writable attribute 'hull'. This is the setter.

insert_hole  Signature: void insert_hole (DPoint[] p,bool raw = false) Description: Insert a hole with the given points p:  An array of points to insert as a new hole  raw:  If true, the points won't be compressed (see assign_hull) 
The 'raw' argument was added in version 0.24.

Signature: void insert_hole (const DBox b) Description: Insert a hole from the given box b:  The box to insert as a new hole 
This method was introduced in version 0.23.

inside?  Signature: [const] bool inside? (DPoint p) Description: Test, if the given point is inside the polygon If the given point is inside or on the edge of the polygon, true is returned. This tests works well only if the polygon is not selfoverlapping and oriented clockwise. 
is_box?  Signature: [const] bool is_box? Description: Returns true, if the polygon is a simple box. Returns:  True if the polygon is a box. 
A polygon is a box if it is identical to it's bounding box. This method was introduced in version 0.23.

is_const_object?  Signature: [const] bool is_const_object? Description: Returns a value indicating whether the reference is a const reference Use of this method is deprecated. Use _is_const_object? instead 
move  Signature: DPolygon move (const DVector p) Description: Moves the polygon. p:  The distance to move the polygon.  Returns:  The moved polygon (self). 
Moves the polygon by the given offset and returns the
moved polygon. The polygon is overwritten. This method has been introduced in version 0.23.

Signature: DPolygon move (double x,double y) Description: Moves the polygon. x:  The x distance to move the polygon.  y:  The y distance to move the polygon.  Returns:  The moved polygon (self). 
Moves the polygon by the given offset and returns the
moved polygon. The polygon is overwritten. 
moved  Signature: [const] DPolygon moved (const DVector p) Description: Returns the moved polygon (does not modify self) p:  The distance to move the polygon.  Returns:  The moved polygon. 
Moves the polygon by the given offset and returns the
moved polygon. The polygon is not modified. This method has been introduced in version 0.23.

Signature: [const] DPolygon moved (double x,double y) Description: Returns the moved polygon (does not modify self) x:  The x distance to move the polygon.  y:  The y distance to move the polygon.  Returns:  The moved polygon. 
Moves the polygon by the given offset and returns the
moved polygon. The polygon is not modified. This method has been introduced in version 0.23.

new  Signature: [static] new DPolygon ptr new (const Polygon polygon) Description: Creates a floatingpoint coordinate polygon from an integer coordinate polygon This constructor has been introduced in version 0.25 and replaces the previous static method 'from_ipolygon'. Python specific notes: This method is the default initializer of the object

Signature: [static] new DPolygon ptr new Description: Default constructor: creates an empty (invalid) polygon Python specific notes: This method is the default initializer of the object

Signature: [static] new DPolygon ptr new (const DSimplePolygon sp) Description: Constructor from a simple polygon sp:  The simple polygon that is converted into the polygon 
This method was introduced in version 0.22.
Python specific notes: This method is the default initializer of the object

Signature: [static] new DPolygon ptr new (DPoint[] pts,bool raw = false) Description: Constructor given the points of the polygon hull pts:  The points forming the polygon hull  raw:  If true, the point list won't be modified (see assign_hull) 
The 'raw' argument was added in version 0.24.
Python specific notes: This method is the default initializer of the object

Signature: [static] new DPolygon ptr new (const DBox box) Description: Constructor converting a box to a polygon box:  The box to convert to a polygon 
Python specific notes: This method is the default initializer of the object

num_points  Signature: unsigned long num_points Description: Get the total number of points (hull plus holes)
This method was introduced in version 0.18.

num_points_hole  Signature: unsigned long num_points_hole (unsigned int n) Description: Get the number of points of the given hole The argument gives the index of the hole of which the number of points are requested. The index must be less than the number of holes (see holes). 
num_points_hull  Signature: unsigned long num_points_hull Description: Get the number of points of the hull 
perimeter  Signature: [const] double perimeter Description: The perimeter of the polygon
The perimeter is sum of the lengths of all edges making up the polygon. This method has been introduce in version 0.23.

point_hole  Signature: DPoint point_hole (unsigned int n,unsigned long p) Description: Get a specific point of a hole n:  The index of the hole to which the points should be assigned  p:  The index of the point to get 
If the index of the point or of the hole is not valid, a default value is returned.
This method was introduced in version 0.18.

point_hull  Signature: DPoint point_hull (unsigned long p) Description: Get a specific point of the hull p:  The index of the point to get 
If the index of the point is not a valid index, a default value is returned.
This method was introduced in version 0.18.

round_corners  Signature: [const] DPolygon round_corners (double rinner,double router,unsigned int n) Description: Rounds the corners of the polygon rinner:  The circle radius of inner corners (in database units).  router:  The circle radius of outer corners (in database units).  n:  The number of points per full circle.  Returns:  The new polygon. 
Replaces the corners of the polygon with circle segments. This method was introduced in version 0.20 for integer coordinates and in 0.25 for all coordinate types.

size  Signature: void size (double dx,double dy,unsigned int mode) Description: Sizing (biasing) Shifts the contour outwards (dx,dy>0) or inwards (dx,dy<0).
dx is the sizing in xdirection and dy is the sizing in ydirection. The sign of dx and dy should be identical.
The sizing operation create invalid (selfoverlapping, reverse oriented) contours. The mode defines at which bending angle cutoff occurs
(0:>0, 1:>45, 2:>90, 3:>135, 4:>approx. 168, other:>approx. 179) In order to obtain a proper polygon in the general case, the
sized polygon must be merged in 'greater than zero' wrap count mode. This is necessary since in the general case,
sizing can be complicated operation which lets a single polygon fall apart into disjoint pieces for example.
This can be achieved using the EdgeProcessor class for example: poly = ... # a RBA::Polygon
poly.size(50, 2)
ep = RBA::EdgeProcessor::new
# result is an array of RBA::Polygon objects
result = ep.simple_merge_p2p([ poly ], false, false, 1)

Signature: void size (double d,unsigned int mode) Description: Sizing (biasing) Shifts the contour outwards (d>0) or inwards (d<0).
This method is equivalent to
size(d, d, mode)
See size for a detailed description. This method has been introduced in version 0.23.

Signature: void size (double d) Description: Sizing (biasing) Shifts the contour outwards (d>0) or inwards (d<0).
This method is equivalent to
size(d, d, 2)
See size for a detailed description.

sized  Signature: [const] DPolygon sized (double dx,double dy,unsigned int mode) Description: Sizing (biasing) without modifying self This method applies sizing to the polygon but does not modify self. Instead a sized copy is returned.
See size for a description of the operation. This method has been introduced in version 0.23.

Signature: [const] DPolygon sized (double d,unsigned int mode) Description: Sizing (biasing) without modifying self Shifts the contour outwards (d>0) or inwards (d<0).
This method is equivalent to
sized(d, d, mode)
See size and sized for a detailed description.

Signature: [const] DPolygon sized (double d) Description: Sizing (biasing) without modifying self This method is equivalent to
sized(d, d, 2)
See size and sized for a detailed description.

split  Signature: [const] DPolygon[] split Description: Splits the polygon into two or more parts
This method will break the polygon into parts. The exact breaking algorithm is unspecified, the result are smaller polygons of roughly equal number of points and 'less concave' nature. Usually the returned polygon set consists of two polygons, but there can be more. The merged region of the resulting polygons equals the original polygon with the exception of small snapping effects at new vertexes. The intended use for this method is a iteratively split polygons until the satisfy some maximum number of points limit. This method has been introduced in version 0.25.3. 
to_itype  Signature: [const] Polygon to_itype (double dbu = 1) Description: Converts the polygon to an integer coordinate polygon The database unit can be specified to translate the floatingpoint coordinate polygon in micron units to an integercoordinate polygon in database units. The polygons coordinates will be divided by the database unit. This method has been introduced in version 0.25. 
to_s  Signature: [const] string to_s Description: Convert to a string Python specific notes: This method is also available as 'str(object)' and 'repr(object)'

touches?  Signature: [const] bool touches? (const DBox box) Description: Returns true, if the polygon touches the given box.
The box and the polygon touch if they overlap or their contours share at least one point. This method was introduced in version 0.25.1.

Signature: [const] bool touches? (const DEdge edge) Description: Returns true, if the polygon touches the given edge.
The edge and the polygon touch if they overlap or the edge shares at least one point with the polygon's contour. This method was introduced in version 0.25.1.

Signature: [const] bool touches? (const DPolygon polygon) Description: Returns true, if the polygon touches the other polygon.
The polygons touch if they overlap or their contours share at least one point. This method was introduced in version 0.25.1.

Signature: [const] bool touches? (const DSimplePolygon simple_polygon) Description: Returns true, if the polygon touches the other polygon.
The polygons touch if they overlap or their contours share at least one point. This method was introduced in version 0.25.1.

transform  Signature: DPolygon ptr transform (const DCplxTrans t) Description: Transforms the polygon with a complex transformation (inplace) t:  The transformation to apply. 
Transforms the polygon with the given complex transformation.
Modifies self and returns self. An outofplace version which does not modify self is transformed. This method has been introduced in version 0.24.

Signature: DPolygon ptr transform (const DTrans t) Description: Transforms the polygon (inplace) t:  The transformation to apply. 
Transforms the polygon with the given transformation.
Modifies self and returns self. An outofplace version which does not modify self is transformed. This method has been introduced in version 0.24.

transformed  Signature: [const] Polygon transformed (const VCplxTrans t) Description: Transforms the polygon with the given complex transformation t:  The magnifying transformation to apply  Returns:  The transformed polygon (in this case an integer coordinate polygon) 
This method has been introduced in version 0.25.

Signature: [const] DPolygon transformed (const DTrans t) Description: Transforms the polygon t:  The transformation to apply.  Returns:  The transformed polygon. 
Transforms the polygon with the given transformation.
Does not modify the polygon but returns the transformed polygon. 
Signature: [const] DPolygon transformed (const DCplxTrans t) Description: Transforms the polygon with a complex transformation t:  The transformation to apply.  Returns:  The transformed polygon. 
Transforms the polygon with the given complex transformation.
Does not modify the polygon but returns the transformed polygon. With version 0.25, the original 'transformed_cplx' method is deprecated and 'transformed' takes both simple and complex transformations. 
transformed_cplx  Signature: [const] DPolygon transformed_cplx (const DCplxTrans t) Description: Transforms the polygon with a complex transformation t:  The transformation to apply.  Returns:  The transformed polygon. 
Use of this method is deprecated. Use transformed instead 