Notation used in Ruby API documentation
Module: db
Description: An edge pair (a pair of two edges)
Edge pairs are objects representing two edges or parts of edges. They play a role mainly in the context of DRC functions, where they specify a DRC violation by connecting two edges which violate the condition checked. Within the framework of polygon and edge collections which provide DRC functionality, edges pairs with integer coordinates (EdgePair type) are used in the form of edge pair collections (EdgePairs).
Edge pairs basically consist of two edges, called first and second. If created by a two-layer DRC function, the first edge will correspond to edges from the first layer and the second to edges from the second layer.
This class has been introduced in version 0.23.
new DEdgePair ptr | new | (const EdgePair edge_pair) | Creates a floating-point coordinate edge pair from an integer coordinate edge |
new DEdgePair ptr | new | Default constructor | |
new DEdgePair ptr | new | (const DEdge first, const DEdge second, bool symmetric = false) | Constructor from two edges |
[const] | bool | != | (const DEdgePair box) | Inequality |
[const] | bool | < | (const DEdgePair box) | Less operator |
[const] | bool | == | (const DEdgePair box) | Equality |
[const] | DEdgePair ptr | _const_cast | Returns a non-const reference to self. | |
void | _create | Ensures the C++ object is created | ||
void | _destroy | Explicitly destroys the object | ||
[const] | bool | _destroyed? | Returns a value indicating whether the object was already destroyed | |
[const] | bool | _is_const_object? | Returns a value indicating whether the reference is a const reference | |
void | _manage | Marks the object as managed by the script side. | ||
void | _unmanage | Marks the object as no longer owned by the script side. | ||
[const] | double | area | Gets the area between the edges of the edge pair | |
void | assign | (const DEdgePair other) | Assigns another object to self | |
[const] | DBox | bbox | Gets the bounding box of the edge pair | |
[const] | double | distance | Gets the distance of the edges in the edge pair | |
[const] | new DEdgePair ptr | dup | Creates a copy of self | |
[const] | DEdge | first | Gets the first edge | |
void | first= | (const DEdge edge) | Sets the first edge | |
[const] | DEdge | greater | Gets the 'greater' edge for symmetric edge pairs | |
[const] | unsigned long | hash | Computes a hash value | |
[const] | DEdge | lesser | Gets the 'lesser' edge for symmetric edge pairs | |
[const] | DEdgePair | normalized | Normalizes the edge pair | |
[const] | double | perimeter | Gets the perimeter of the edge pair | |
[const] | DPolygon | polygon | (double e) | Convert an edge pair to a polygon |
[const] | DEdge | second | Gets the second edge | |
void | second= | (const DEdge edge) | Sets the second edge | |
[const] | DSimplePolygon | simple_polygon | (double e) | Convert an edge pair to a simple polygon |
void | symmetric= | (bool flag) | Sets a value indicating whether the edge pair is symmetric | |
[const] | bool | symmetric? | Returns a value indicating whether the edge pair is symmetric | |
[const] | EdgePair | to_itype | (double dbu = 1) | Converts the edge pair to an integer coordinate edge pair |
[const] | string | to_s | (double dbu = 0) | Returns a string representing the edge pair |
[const] | EdgePair | transformed | (const VCplxTrans t) | Transforms the edge pair with the given complex transformation |
[const] | DEdgePair | transformed | (const DTrans t) | Returns the transformed pair |
[const] | DEdgePair | transformed | (const DCplxTrans t) | Returns the transformed edge pair |
new DEdgePair ptr | from_s | (string s) | Creates an object from a string |
void | create | Use of this method is deprecated. Use _create instead | ||
void | destroy | Use of this method is deprecated. Use _destroy instead | ||
[const] | bool | destroyed? | Use of this method is deprecated. Use _destroyed? instead | |
[const] | bool | is_const_object? | Use of this method is deprecated. Use _is_const_object? instead |
!= | Signature: [const] bool != (const DEdgePair box) Description: Inequality Returns true, if this edge pair and the given one are not equal This method has been introduced in version 0.25. | ||||
< | Signature: [const] bool < (const DEdgePair box) Description: Less operator Returns true, if this edge pair is 'less' with respect to first and second edge This method has been introduced in version 0.25. | ||||
== | Signature: [const] bool == (const DEdgePair box) Description: Equality Returns true, if this edge pair and the given one are equal This method has been introduced in version 0.25. | ||||
_const_cast | Signature: [const] DEdgePair ptr _const_cast Description: Returns a non-const reference to self. Basically, this method allows turning a const object reference to a non-const one. This method is provided as last resort to remove the constness from an object. Usually there is a good reason for a const object reference, so using this method may have undesired side effects. This method has been introduced in version 0.29.6. | ||||
_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: Gets the area between the edges of the edge pair This attribute has been introduced in version 0.28. | ||||
assign | Signature: void assign (const DEdgePair other) Description: Assigns another object to self | ||||
bbox | Signature: [const] DBox bbox Description: Gets the bounding box of the edge pair | ||||
create | Signature: void create Description: Ensures the C++ object is created Use of this method is deprecated. Use _create instead 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 Use of this method is deprecated. Use _destroy instead 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 Use of this method is deprecated. Use _destroyed? instead 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. | ||||
distance | Signature: [const] double distance Description: Gets the distance of the edges in the edge pair The distance between the two edges is defined as the minimum distance between any two points on the two edges. This attribute has been introduced in version 0.28.14. | ||||
dup | Signature: [const] new DEdgePair ptr dup Description: Creates a copy of self Python specific notes: | ||||
first | Signature: [const] DEdge first Description: Gets the first edge Python specific notes: | ||||
first= | Signature: void first= (const DEdge edge) Description: Sets the first edge Python specific notes: | ||||
from_s | Signature: [static] new DEdgePair 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. | ||||
greater | Signature: [const] DEdge greater Description: Gets the 'greater' edge for symmetric edge pairs As first and second edges are commutable for symmetric edge pairs (see symmetric?), this accessor allows retrieving a 'second' edge in a way independent on the actual assignment. This read-only attribute has been introduced in version 0.27. | ||||
hash | Signature: [const] unsigned long hash Description: Computes a hash value Returns a hash value for the given edge pair. This method enables edge pairs as hash keys. This method has been introduced in version 0.25. Python specific notes: | ||||
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 This method returns true, if self is a const reference. In that case, only const methods may be called on self. | ||||
lesser | Signature: [const] DEdge lesser Description: Gets the 'lesser' edge for symmetric edge pairs As first and second edges are commutable for symmetric edge pairs (see symmetric?), this accessor allows retrieving a 'first' edge in a way independent on the actual assignment. This read-only attribute has been introduced in version 0.27. | ||||
new | (1) Signature: [static] new DEdgePair ptr new (const EdgePair edge_pair) Description: Creates a floating-point coordinate edge pair from an integer coordinate edge This constructor has been introduced in version 0.25 and replaces the previous static method 'from_iedge_pair'. Python specific notes: | ||||
(2) Signature: [static] new DEdgePair ptr new Description: Default constructor This constructor creates an default edge pair. Python specific notes: | |||||
(3) Signature: [static] new DEdgePair ptr new (const DEdge first, const DEdge second, bool symmetric = false) Description: Constructor from two edges This constructor creates an edge pair from the two edges given. See symmetric? for a description of this attribute. Python specific notes: | |||||
normalized | Signature: [const] DEdgePair normalized Description: Normalizes the edge pair This method normalized the edge pair such that when connecting the edges at their start and end points a closed loop is formed which is oriented clockwise. To achieve this, the points of the first and/or first and second edge are swapped. Normalization is a first step recommended before converting an edge pair to a polygon, because that way the polygons won't be self-overlapping and the enlargement parameter is applied properly. | ||||
perimeter | Signature: [const] double perimeter Description: Gets the perimeter of the edge pair The perimeter is defined as the sum of the lengths of both edges ('active perimeter'). This attribute has been introduced in version 0.28. | ||||
polygon | Signature: [const] DPolygon polygon (double e) Description: Convert an edge pair to a polygon
The polygon is formed by connecting the end and start points of the edges. It is recommended to use normalized before converting the edge pair to a polygon. The enlargement parameter applies the specified enlargement parallel and perpendicular to the edges. Basically this introduces a bias which blows up edge pairs by the specified amount. That parameter is useful to convert degenerated edge pairs to valid polygons, i.e. edge pairs with coincident edges and edge pairs consisting of two point-like edges. Another version for converting edge pairs to simple polygons is simple_polygon which renders a SimplePolygon object. | ||||
second | Signature: [const] DEdge second Description: Gets the second edge Python specific notes: | ||||
second= | Signature: void second= (const DEdge edge) Description: Sets the second edge Python specific notes: | ||||
simple_polygon | Signature: [const] DSimplePolygon simple_polygon (double e) Description: Convert an edge pair to a simple polygon
The polygon is formed by connecting the end and start points of the edges. It is recommended to use normalized before converting the edge pair to a polygon. The enlargement parameter applies the specified enlargement parallel and perpendicular to the edges. Basically this introduces a bias which blows up edge pairs by the specified amount. That parameter is useful to convert degenerated edge pairs to valid polygons, i.e. edge pairs with coincident edges and edge pairs consisting of two point-like edges. Another version for converting edge pairs to polygons is polygon which renders a Polygon object. | ||||
symmetric= | Signature: void symmetric= (bool flag) Description: Sets a value indicating whether the edge pair is symmetric See symmetric? for a description of this attribute. Symmetric edge pairs have been introduced in version 0.27. Python specific notes: | ||||
symmetric? | Signature: [const] bool symmetric? Description: Returns a value indicating whether the edge pair is symmetric For symmetric edge pairs, the edges are commutable. Specifically, a symmetric edge pair with (e1,e2) is identical to (e2,e1). Symmetric edge pairs are generated by some checks for which there is no directed error marker (width, space, notch, isolated). Symmetric edge pairs have been introduced in version 0.27. Python specific notes: | ||||
to_itype | Signature: [const] EdgePair to_itype (double dbu = 1) Description: Converts the edge pair to an integer coordinate edge pair The database unit can be specified to translate the floating-point coordinate edge pair in micron units to an integer-coordinate edge pair in database units. The edge pair's' coordinates will be divided by the database unit. This method has been introduced in version 0.25. | ||||
to_s | Signature: [const] string to_s (double dbu = 0) Description: Returns a string representing the edge pair If a DBU is given, the output units will be micrometers. The DBU argument has been added in version 0.27.6. Python specific notes: | ||||
transformed | (1) Signature: [const] EdgePair transformed (const VCplxTrans t) Description: Transforms the edge pair with the given complex transformation
This method has been introduced in version 0.25. | ||||
(2) Signature: [const] DEdgePair transformed (const DTrans t) Description: Returns the transformed pair
Transforms the edge pair with the given transformation. Does not modify the edge pair but returns the transformed edge. | |||||
(3) Signature: [const] DEdgePair transformed (const DCplxTrans t) Description: Returns the transformed edge pair
Transforms the edge pair with the given complex transformation. Does not modify the edge pair but returns the transformed edge. |