KLayout Manual: Main Index » Class Index » API reference - Class DEdgeAPI reference - Class DEdgeNotation used in Ruby API documentation Description: An edge class
An edge is a connection between points, usually participating in a larger context such as a polygon. An edge has a defined direction (from p1 to p2). Public constructors
Public methods
Public static methods and constants
Deprecated methods (protected, public, static, non-static and constructors)
Detailed description[const] bool !=(const DEdge e)Description: Inequality test
[const] DEdge *(double scale_factor)Description: Scale edge
The * operator scales self with the given factor. This method has been introduced in version 0.22. [const] bool <(const DEdge e)Description: Less operator
[const] bool ==(const DEdge e)Description: Equality test
[const] void assign(const DEdge other)Description: Assign the contents of another object to self This method assigns the contents of another object to self. This is a deep copy that does not only copy the reference but the actual content. [const] DBox bboxDescription: Return the bounding box of the edge. [const] bool coincident?(const DEdge e)Description: Coincidence check.
Checks whether a edge is coincident with another edge. Coincidence is defined by being parallel and that at least one point of one edge is on the other edge. [const] bool contains?(const DPoint p)Description: Test whether a point is on an edge.
A point is on a edge if it is on (or at least closer than a grid point to) the edge. [const] bool contains_excl?(const DPoint p)Description: Test whether a point is on an edge excluding the endpoints.
A point is on a edge if it is on (or at least closer than a grid point to) the edge. void 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. [const] bool crossed_by?(const DEdge e)Description: Check, if an edge is cut by a line (given by an edge)
This method returns true if p1 is in one semispace while p2 is in the other or one of them is on the line through the edge "e" [const] DPoint crossing_point(const DEdge e)Description: Returns the crossing point on two edges.
This method delivers the point where the given edge (self) crosses the line given by the edge in argument "e". If self does not cross this line, the result is undefined. See crossed_by? for a description of the crossing predicate. This method has been introduced in version 0.19. void destroyDescription: Explicitly destroy the object Explicitly destroy the object on C++ side if it was owned by the Ruby interpreter. Subsequent access to this object will throw an exception. If the object is not owned by Ruby, 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] double distance(const DPoint p)Description: Distance between the edge and a point.
Returns the distance between the edge and the point. The distance is signed which is negative if the point is to the "left" of the edge and positive if the point is to the "right". The distance is measured by projecting the point onto the line through the edge. If the edge is degenerated, the distance is not defined. [const] double distance_abs(const DPoint p)Description: Absolute distance between the edge and a point.
Returns the distance between the edge and the point. [const] DEdge dupDescription: Creates a copy of self [const] double dxDescription: The horizontal extend of the edge. [const] double dx_absDescription: The absolute value of the horizontal extend of the edge. [const] double dyDescription: The vertical extend of the edge. [const] double dy_absDescription: The vertical extend of the edge. DEdge enlarge(const DPoint p)Description: Enlarges the edge.
Enlarges the edge by the given distance and returns the enlarged edge. The edge is overwritten. [const] DEdge enlarged(const DPoint p)Description: Returns the enlarged edge
Enlarges the edge by the given offset and returns the moved edge. The edge is not modified. Enlargement means that the first point is shifted by -p, the second by p. [static] DEdge from_iedge(const Edge int_edge)Description: Construct a floating-point coordinate edge from an integer coordinate edge Create a floating-point coordinate edge from an integer edge [const] bool intersect?(const DEdge e)Description: Intersection test.
Returns true if the edges intersect. Two edges intersect if they share at least one point. If the edges coincide, they also intersect. For degenerated edges, the intersection is mapped to point containment tests. [const] DPoint intersection_point(const DEdge e)Description: Returns the intersection point of two edges.
This method delivers the intersection point. If the edges do not intersect, the result is undefined. This method has been introduced in version 0.19. [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. [const] bool is_degenerate?Description: Test for degenerated edge An edge is degenerate, if both end and start point are identical. [const] bool is_parallel?(const DEdge e)Description: Test for being parallel
[const] double lengthDescription: The length of the edge DEdge move(const DPoint p)Description: Moves the edge.
Moves the edge by the given offset and returns the moved edge. The edge is overwritten. [const] DEdge moved(const DPoint p)Description: Returns the moved edge
Moves the edge by the given offset and returns the moved edge. The edge is not modified. [static] new DEdge newDescription: Default constructor: creates a degenerated edge 0,0 to 0,0 [static] new DEdge new(double x1,double y1,double x2,double y2)Description: Constructor with two coordinates given as single values Two points are given to create a new edge. [static] new DEdge new(const DPoint p1,const DPoint p2)Description: Constructor with two points Two points are given to create a new edge. [static] new DEdge new_pp(const DPoint p1,const DPoint p2)Description: Constructor with two points This method is deprecated. Use method 'new' instead [static] new DEdge new_xyxy(double x1,double y1,double x2,double y2)Description: Constructor with two coordinates given as single values This method is deprecated. Use method 'new' instead [const] double ortho_lengthDescription: The orthogonal length of the edge ("manhattan-length")
[const] DPoint p1Description: The first point. [const] DPoint p2Description: The second point. [const] int side_of(const DPoint p)Description: Indicates at which side the point is located relative to the edge.
Returns 1 if the point is "left" of the edge, 0 if on and -1 if the point is "right" of the edge. [const] double sq_lengthDescription: The square of the length of the edge void swap_pointsDescription: Swap the points of the edge [const] string to_sDescription: Convert to a string [const] DEdge transformed(const DTrans t)Description: Transform the edge.
Transforms the edge with the given transformation. Does not modify the edge but returns the transformed edge. [const] DEdge transformed_cplx(const DCplxTrans t)Description: Transform the edge.
Transforms the edge with the given complex transformation. Does not modify the edge but returns the transformed edge. [const] double x1Description: Shortcut for p1.x [const] double x2Description: Shortcut for p2.x [const] double y1Description: Shortcut for p1.y [const] double y2Description: Shortcut for p2.y |