API reference - Class DEdgePairNotation used in Ruby API documentation 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. Public constructors
Public methods
Public static methods and constants
Deprecated methods (protected, public, static, non-static and constructors)
Detailed descriptionvoid _createDescription: 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. void _destroyDescription: 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. [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. [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. void _manageDescription: 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. void _unmanageDescription: 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. void assign(const DEdgePair other)Description: Assigns another object to self [const] DBox bboxDescription: Gets the bounding box of the edge pair void createDescription: Ensures the C++ object is created Use of this method is deprecated. Use _create instead void destroyDescription: Explicitly destroys the object Use of this method is deprecated. Use _destroy instead [const] bool destroyed?Description: Returns a value indicating whether the object was already destroyed Use of this method is deprecated. Use _destroyed? instead [const] new DEdgePair ptr dupDescription: Creates a copy of self [const] DEdge firstDescription: Gets the first edge Python specific notes:The object exposes a readable attribute 'first'. This is the getter. void first=(const DEdge edge)Description: Sets the first edge Python specific notes:The object exposes a writable attribute 'first'. This is the setter. [static] DEdgePair from_iedge_pair(const EdgePair int_edge_pair)Description: Construct a floating-point coordinate edge pair from an integer coordinate edge pair Create a floating-point coordinate edge pair from an integer edge pair [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. [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 [static] new DEdgePair ptr newDescription: Default constructor This constructor creates an default edge pair. Python specific notes:This method is the default initializer of the object [static] new DEdgePair ptr new(const DEdge arg1,const DEdge arg2)Description: Constructor from two edges This constructor creates an edge pair from the two edges given. Python specific notes:This method is the default initializer of the object [const] DEdgePair normalizedDescription: 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. [const] DPolygon polygon(double e The enlargement (set to zero for exact representation))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 allows to apply 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. [const] DEdge secondDescription: Gets the second edge Python specific notes:The object exposes a readable attribute 'second'. This is the getter. void second=(const DEdge edge)Description: Sets the second edge Python specific notes:The object exposes a writable attribute 'second'. This is the setter. [const] DSimplePolygon simple_polygon(double e The enlargement (set to zero for exact representation))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 allows to apply 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. [const] string to_sDescription: Returns a string representing the edge pair Python specific notes:This method is also available as 'str(object)' [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. [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. |