API reference - Class EdgesNotation used in Ruby API documentation Description: A collection of edges (Not necessarily describing closed contours)
This class was introduced to simplify operations on edges sets. See Edge for a description of the individual edge object. The edge collection contains an arbitrary number of edges and supports operations to select edges by various criteria, produce polygons from the edges by applying an extension, filtering edges against other edges collections and checking geometrical relations to other edges (DRC functionality). The edge collection is supposed to work closely with the Region polygon set. Both are related, although the edge collection has a lower rank since it potentially represents a disconnected collection of edges. Edge collections may form closed contours, for example immediately after they have been derived from a polygon set using Region#edges. But this state is volatile and can easily be destroyed by filtering edges. Hence the connected state does not play an important role in the edge collection's API. Edge collections may also contain points (degenerated edges with identical start and end points). Such point-like objects participate in some although not all methods of the edge collection class. Edge collections can be used in two different flavors: in raw mode or merged semantics. With merged semantics (the default), connected edges are considered to belong together and are effectively merged. Overlapping parts are counted once in that mode. Dot-like edges are not considered in merged semantics. In raw mode (without merged semantics), each edge is considered as it is. Overlaps between edges may exists and merging has to be done explicitly using the merge method. The semantics can be selected using merged_semantics=. 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 description[const] Edges &(const Edges other)Description: Returns the boolean AND between self and the other edge collection
The boolean AND operation will return all parts of the edges in this collection which are coincident with parts of the edges in the other collection.The result will be a merged edge collection. [const] Edges &(const Region other)Description: Returns the parts of the edges inside the given region
This operation returns the parts of the edges which are inside the given region. Edges on the borders of the polygons are included in the edge set. As a side effect, the edges are made non-intersecting by introducing cut points where edges intersect. This method has been introduced in version 0.24. Edges &=(const Edges other)Description: Performs the boolean AND between self and the other edge collection
The boolean AND operation will return all parts of the edges in this collection which are coincident with parts of the edges in the other collection.The result will be a merged edge collection. Edges &=(const Region other)Description: Selects the parts of the edges inside the given region
This operation selects the parts of the edges which are inside the given region. Edges on the borders of the polygons are included in the edge set. As a side effect, the edges are made non-intersecting by introducing cut points where edges intersect. This method has been introduced in version 0.24. [const] Edges +(const Edges other)Description: Returns the combined edge set of self and the other one
This operator adds the edges of the other edge set to self and returns a new combined edge set. This usually creates unmerged edge sets and edges may overlap. Use merge if you want to ensure the result edge set is merged. Edges +=(const Edges other)Description: Adds the edges of the other edge collection to self
This operator adds the edges of the other edge set to self. This usually creates unmerged edge sets and edges may overlap. Use merge if you want to ensure the result edge set is merged. [const] Edges -(const Edges other)Description: Returns the boolean NOT between self and the other edge collection
The boolean NOT operation will return all parts of the edges in this collection which are not coincident with parts of the edges in the other collection.The result will be a merged edge collection. [const] Edges -(const Region other)Description: Returns the parts of the edges outside the given region
This operation returns the parts of the edges which are outside the given region. Edges on the borders of the polygons are not included in the edge set. As a side effect, the edges are made non-intersecting by introducing cut points where edges intersect. This method has been introduced in version 0.24. Edges -=(const Edges other)Description: Performs the boolean NOT between self and the other edge collection
The boolean NOT operation will return all parts of the edges in this collection which are not coincident with parts of the edges in the other collection.The result will be a merged edge collection. Edges -=(const Region other)Description: Selects the parts of the edges outside the given region
This operation selects the parts of the edges which are outside the given region. Edges on the borders of the polygons are not included in the edge set. As a side effect, the edges are made non-intersecting by introducing cut points where edges intersect. This method has been introduced in version 0.24. [static] int EuclidianDescription: Specifies Euclidian metrics for the check functions This value can be used for the metrics parameter in the check functions, i.e. width_check. This value specifies Euclidian metrics, i.e. the distance between two points is measured by: d = sqrt(dx^2 + dy^2) All points within a circle with radius d around one point are considered to have a smaller distance than d. [static] int ProjectionDescription: Specifies projected distance metrics for the check functions This value can be used for the metrics parameter in the check functions, i.e. width_check. This value specifies projected metrics, i.e. the distance is defined as the minimum distance measured perpendicular to one edge. That implies that the distance is defined only where two edges have a non-vanishing projection onto each other. [static] int SquareDescription: Specifies square metrics for the check functions This value can be used for the metrics parameter in the check functions, i.e. width_check. This value specifies sqaure metrics, i.e. the distance between two points is measured by: d = max(abs(dx), abs(dy)) All points within a square with length 2*d around one point are considered to have a smaller distance than d in this metrics. [const] const Edge ptr [](unsigned long n)Description: Returns the nth edge of the edge collection This method returns nil if the index is out of range. [const] Edges ^(const Edges other)Description: Returns the boolean XOR between self and the other edge collection
The boolean XOR operation will return all parts of the edges in this and the other collection except the parts where both are coincident. The result will be a merged edge collection. Edges ^=(const Edges other)Description: Performs the boolean XOR between self and the other edge collection
The boolean XOR operation will return all parts of the edges in this and the other collection except the parts where both are coincident. The result will be a merged edge collection. 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. 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 Edges other)Description: Assigns another object to self [const] Box bboxDescription: Returns the bounding box of the edge collection The bounding box is the box enclosing all points of all edges. [const] Edges centers(unsigned int length,double fraction)Description: Returns edges representing the center part of the edges
This method allows to specify the length of these segments in a twofold way: either as a fixed length or by specifying a fraction of the original length: edges = ... # An edge collection edges.centers(100, 0.0) # All segments have a length of 100 DBU edges.centers(0, 50.0) # All segments have a length of half the original length edges.centers(100, 50.0) # All segments have a length of half the original length # or 100 DBU, whichever is larger It is possible to specify 0 for both values. In this case, degenerated edges (points) are delivered which specify the centers of the edges but can't participate in some functions. void clearDescription: Clears the edge collection 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 void disable_progressDescription: Disable progress reporting Calling this method will disable progress reporting. See enable_progress. [const] new Edges ptr dupDescription: Creates a copy of self [iter] Edge eachDescription: Returns each edge of the region Python specific notes:This method enables iteration of the object void enable_progress(string label)Description: Enable progress reporting After calling this method, the edge collection will report the progress through a progress bar while expensive operations are running. The label is a text which is put in front of the progress bar. Using a progress bar will imply a performance penalty of a few percent typically. [const] EdgePairs enclosing_check(const Edges other,int d)Description: Performs an enclosing check between edges
To understand the enclosing check for edges, one has to be familiar with the concept of the inside and outside interpretation of an edge. An edge is considered a boundary between "inside" and "outside" where "inside" is right to the edge. Although there is not necessarily a contiguous region for edges, the definition of the inside part allows to specify edge relations which are denoted by "space", "width", "inside" and "enclosing". In that sense, enclosing means that another edge is parallel and left to the edge under test with a distance of less than the given threshold. This method returns an EdgePairs collection which contains the parts of the edges violating the check criterion. A version of this method is available with more options (i.e. the option the deliver whole edges). Other checks with different edge relations are width_check, space_check, overlap_check, separation_check and inside_check. [const] EdgePairs enclosing_check(const Edges other,int d,bool whole_edges,variant metrics,variant ignore_angle,variant min_projection,variant max_projection)Description: Performs an enclosing check with options
This version is similar to the simple version with one parameter. In addition, it allows to specify many more options. If "whole_edges" is true, the resulting EdgePairs collection will receive the whole edges which contribute in the width check. "metrics" can be one of the constants Euclidian, Square or Projection. See there for a description of these constants. Use nil for this value to select the default (Euclidian metrics). "ignore_angle" specifies the angle threshold of two edges. If two edges form an angle equal or above the given value, they will not contribute in the check. Setting this value to 90 (the default) will exclude edges with an angle of 90 degree or more from the check. Use nil for this value to select the default. "min_projection" and "max_projection" allow to select edges by their projected value upon each other. It is sufficient if the projection of one edge on the other matches the specified condition. The projected length must be larger or equal to "min_projection" and less than "max_projection". If you don't want to specify one threshold, pass nil to the respective value. [const] Edges end_segments(unsigned int length,double fraction)Description: Returns edges representing a part of the edge before the end point
This method allows to specify the length of these segments in a twofold way: either as a fixed length or by specifying a fraction of the original length: edges = ... # An edge collection edges.end_segments(100, 0.0) # All segments have a length of 100 DBU edges.end_segments(0, 50.0) # All segments have a length of half the original length edges.end_segments(100, 50.0) # All segments have a length of half the original length # or 100 DBU, whichever is larger It is possible to specify 0 for both values. In this case, degenerated edges (points) are delivered which specify the end positions of the edges but can't participate in some functions. [const] Region extended(int b,int e,int o,int i,bool join)Description: Returns a region with shapes representing the edges with the specified extensions
This is a generic version of extended_in and extended_out. It allows to specify extensions for all four directions of an edge and to join the edges before the extension is applied. For degenerated edges forming a point, a rectangle with the b, e, o and i used as left, right, top and bottom distance to the center point of this edge is created. If join is true and edges form a closed loop, the b and e parameters are ignored and a rim polygon is created that forms the loop with the outside and inside extension given by o and i. [const] Region extended_in(int e)Description: Returns a region with shapes representing the edges with the given width
The edges are extended to the "inside" by the given distance "e". The distance will be applied to the right side as seen in the direction of the edge. By definition, this is the side pointing to the inside of the polygon if the edge was derived from a polygon. Other versions of this feature are extended_out and extended. [const] Region extended_out(int e)Description: Returns a region with shapes representing the edges with the given width
The edges are extended to the "outside" by the given distance "e". The distance will be applied to the left side as seen in the direction of the edge. By definition, this is the side pointing to the outside of the polygon if the edge was derived from a polygon. Other versions of this feature are extended_in and extended. [const] Region extentsDescription: Returns a region with the bounding boxes of the edges This method will return a region consisting of the bounding boxes of the edges. The boxes will not be merged, so it is possible to determine overlaps of these boxes for example. [const] Region extents(int d)Description: Returns a region with the enlarged bounding boxes of the edges This method will return a region consisting of the bounding boxes of the edges enlarged by the given distance d. The enlargement is specified per edge, i.e the width and height will be increased by 2*d. The boxes will not be merged, so it is possible to determine overlaps of these boxes for example. [const] Region extents(int dx,int dy)Description: Returns a region with the enlarged bounding boxes of the edges This method will return a region consisting of the bounding boxes of the edges enlarged by the given distance dx in x direction and dy in y direction. The enlargement is specified per edge, i.e the width will be increased by 2*dx. The boxes will not be merged, so it is possible to determine overlaps of these boxes for example. [const] Edges in(const Edges other)Description: Returns all edges which are members of the other edge collection Use of this method is deprecated. Use members_of instead void insert(const Edge edge)Description: Inserts an edge Inserts the edge into the edge collection. void insert(const Box box)Description: Inserts a box Inserts the edges that form the contour of the box into the edge collection. void insert(const Polygon polygon)Description: Inserts a polygon Inserts the edges that form the contour of the polygon into the edge collection. void insert(const SimplePolygon polygon)Description: Inserts a simple polygon Inserts the edges that form the contour of the simple polygon into the edge collection. void insert(const Path path)Description: Inserts a path Inserts the edges that form the contour of the path into the edge collection. void insert(RecursiveShapeIterator shape_iterator)Description: Inserts all shapes delivered by the recursive shape iterator into this edge collection For "solid" shapes (boxes, polygons, paths), this method inserts the edges that form the contour of the shape into the edge collection. Edge shapes are inserted as such. Text objects are not inserted, because they cannot be converted to polygons. void insert(RecursiveShapeIterator shape_iterator,ICplxTrans trans)Description: Inserts all shapes delivered by the recursive shape iterator into this edge collection with a transformation For "solid" shapes (boxes, polygons, paths), this method inserts the edges that form the contour of the shape into the edge collection. Edge shapes are inserted as such. Text objects are not inserted, because they cannot be converted to polygons. This variant will apply the given transformation to the shapes. This is useful to scale the shapes to a specific database unit for example. void insert(Polygon[] array)Description: Inserts all polygons from the array into this edge collection void insert(Edge[] array)Description: Inserts all edges from the array into this edge collection [const] EdgePairs inside_check(const Edges other,int d)Description: Performs an inside check between edges
To understand the inside check for edges, one has to be familiar with the concept of the inside and outside interpretation of an edge. An edge is considered a boundary between "inside" and "outside" where "inside" is right to the edge. Although there is not necessarily a contiguous region for edges, the definition of the inside part allows to specify edge relations which are denoted by "space", "width", "inside" and "enclosing". In that sense, inside means that another edge is parallel and right to the edge under test with a distance of less than the given threshold. This method returns an EdgePairs collection which contains the parts of the edges violating the check criterion. A version of this method is available with more options (i.e. the option the deliver whole edges). Other checks with different edge relations are width_check, space_check, overlap_check, separation_check and enclosing_check. [const] EdgePairs inside_check(const Edges other,int d,bool whole_edges,variant metrics,variant ignore_angle,variant min_projection,variant max_projection)Description: Performs an inside check with options
This version is similar to the simple version with one parameter. In addition, it allows to specify many more options. If "whole_edges" is true, the resulting EdgePairs collection will receive the whole edges which contribute in the width check. "metrics" can be one of the constants Euclidian, Square or Projection. See there for a description of these constants. Use nil for this value to select the default (Euclidian metrics). "ignore_angle" specifies the angle threshold of two edges. If two edges form an angle equal or above the given value, they will not contribute in the check. Setting this value to 90 (the default) will exclude edges with an angle of 90 degree or more from the check. Use nil for this value to select the default. "min_projection" and "max_projection" allow to select edges by their projected value upon each other. It is sufficient if the projection of one edge on the other matches the specified condition. The projected length must be larger or equal to "min_projection" and less than "max_projection". If you don't want to specify one threshold, pass nil to the respective value. [const] Edges inside_part(const Region other)Description: Returns the parts of the edges of this edge collection which are inside the polygons of the region
This operation returns the parts of the edges which are inside the given region. This functionality is similar to the '&' operator, but edges on the borders of the polygons are not included in the edge set. As a side effect, the edges are made non-intersecting by introducing cut points where edges intersect. This method has been introduced in version 0.24. [const] Edges interacting(const Edges other)Description: Returns the edges of this edge collection which overlap or touch edges from the other edge collection
This method does not merge the edges before they are selected. If you want to select coherent edges, make sure the edge collection is merged before this method is used. [const] Edges interacting(const Region other)Description: Returns the edges from this region which overlap or touch polygons from the region
This method does not merge the edges before they are selected. If you want to select coherent edges, make sure the edge collection is merged before this method is used. [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 [const] bool is_empty?Description: Returns true if the edge collection is empty [const] bool is_merged?Description: Returns true if the edge collection is merged If the region is merged, coincident edges have been merged into single edges. You can ensure merged state by calling merge. [const] unsigned int lengthDescription: Returns the total length of all edges in the edge collection Merged semantics applies for this method (see merged_semantics= of merged semantics) [const] unsigned int length(const Box rect)Description: Returns the total length of all edges in the edge collection (restricted to a rectangle) This version will compute the total length of all edges in the collection, restricting the computation to the given rectangle. Edges along the border are handled in a special way: they are counted when they are oriented with their inside side toward the rectangle (in other words: outside edges must coincide with the rectangle's border in order to be counted). Merged semantics applies for this method (see merged_semantics= of merged semantics) [const] Edges members_of(const Edges other)Description: Returns all edges which are members of the other edge collection This method returns all edges in self which can be found in the other edge collection as well with exactly the same geometry. Python specific notes:This method is available as method 'in_' in Python Edges mergeDescription: Merge the edges
Merging joins parallel edges which overlap or touch. Crossing edges are not merged. If the edge collection is already merged, this method does nothing [const] Edges mergedDescription: Returns the merged edge collection
Merging joins parallel edges which overlap or touch. Crossing edges are not merged. In contrast to merge, this method does not modify the edge collection but returns a merged copy. void merged_semantics=(bool f)Description: Enable or disable merged semantics If merged semantics is enabled (the default), colinear, connected or overlapping edges will be considered as single edges. Python specific notes:The object exposes a writable attribute 'merged_semantics'. This is the setter. [const] bool merged_semantics?Description: Gets a flag indicating whether merged semantics is enabled See merged_semantics= for a description of this attribute. Python specific notes:The object exposes a readable attribute 'merged_semantics'. This is the getter. Edges move(const Point p)Description: Moves the edge collection
Moves the polygon by the given offset and returns the moved edge collection. The edge collection is overwritten. Edges move(int x,int y)Description: Moves the edge collection
Moves the edge collection by the given offset and returns the moved edge collection. The edge collection is overwritten. [const] Edges moved(const Point p)Description: Returns the moved edge collection (does not modify self)
Moves the edge collection by the given offset and returns the moved edge collection. The edge collection is not modified. [const] Edges moved(int x,int y)Description: Returns the moved edge collection (does not modify self)
Moves the edge collection by the given offset and returns the moved edge collection. The edge collection is not modified. [static] new Edges ptr newDescription: Default constructor This constructor creates an empty edge collection. Python specific notes:This method is the default initializer of the object [static] new Edges ptr new(const Edge edge)Description: Constructor from a single edge This constructor creates an edge collection with a single edge. Python specific notes:This method is the default initializer of the object [static] new Edges ptr new(Polygon[] array)Description: Constructor from a polygon array This constructor creates a region from an array of polygons. The edges form the contours of the polygons. Python specific notes:This method is the default initializer of the object [static] new Edges ptr new(Edge[] array)Description: Constructor from an egde array This constructor creates a region from an array of edges. Python specific notes:This method is the default initializer of the object [static] new Edges ptr new(const Box box)Description: Box constructor This constructor creates an edge collection from a box. The edges form the contour of the box. Python specific notes:This method is the default initializer of the object [static] new Edges ptr new(const Polygon polygon)Description: Polygon constructor This constructor creates an edge collection from a polygon. The edges form the contour of the polygon. Python specific notes:This method is the default initializer of the object [static] new Edges ptr new(const SimplePolygon polygon)Description: Simple polygon constructor This constructor creates an edge collection from a simple polygon. The edges form the contour of the polygon. Python specific notes:This method is the default initializer of the object [static] new Edges ptr new(const Path path)Description: Path constructor This constructor creates an edge collection from a path. The edges form the contour of the path. Python specific notes:This method is the default initializer of the object [static] new Edges ptr new(const RecursiveShapeIterator shape_iterator,bool as_edges)Description: Constructor from a hierarchical shape set This constructor creates an edge collection from the shapes delivered by the given recursive shape iterator. It feeds the shapes from a hierarchy of cells into the edge set. Text objects are not inserted, because they cannot be converted to edges. Edge objects are inserted as such. If "as_edges" is true, "solid" objects (boxes, polygons, paths) are converted to edges which form the hull of these objects. If "as_edges" is false, solid objects are ignored. layout = ... # a layout cell = ... # the index of the initial cell layer = ... # the index of the layer from where to take the shapes from r = RBA::Edges::new(layout.begin_shapes(cell, layer), false) Python specific notes:This method is the default initializer of the object [static] new Edges ptr new(const RecursiveShapeIterator shape_iterator,const ICplxTrans trans,bool as_edges)Description: Constructor from a hierarchical shape set with a transformation This constructor creates an edge collection from the shapes delivered by the given recursive shape iterator. It feeds the shapes from a hierarchy of cells into the edge set. The transformation is useful to scale to a specific database unit for example. Text objects are not inserted, because they cannot be converted to edges. Edge objects are inserted as such. If "as_edges" is true, "solid" objects (boxes, polygons, paths) are converted to edges which form the hull of these objects. If "as_edges" is false, solid objects are ignored. layout = ... # a layout cell = ... # the index of the initial cell layer = ... # the index of the layer from where to take the shapes from dbu = 0.1 # the target database unit r = RBA::Edges::new(layout.begin_shapes(cell, layer), RBA::ICplxTrans::new(layout.dbu / dbu)) Python specific notes:This method is the default initializer of the object [const] Edges not_in(const Edges other)Description: Returns all edges which are not members of the other edge collection Use of this method is deprecated. Use not_members_of instead [const] Edges not_interacting(const Edges other)Description: Returns the edges of this edge collection which do not overlap or touch edges from the other edge collection
This method does not merge the edges before they are selected. If you want to select coherent edges, make sure the edge collection is merged before this method is used. [const] Edges not_interacting(const Region other)Description: Returns the edges from this region which do not overlap or touch polygons from the region
This method does not merge the edges before they are selected. If you want to select coherent edges, make sure the edge collection is merged before this method is used. [const] Edges not_members_of(const Edges other)Description: Returns all edges which are not members of the other edge collection This method returns all edges in self which can not be found in the other edge collection with exactly the same geometry. [const] Edges outside_part(const Region other)Description: Returns the parts of the edges of this edge collection which are outside the polygons of the region
This operation returns the parts of the edges which are not inside the given region. This functionality is similar to the '-' operator, but edges on the borders of the polygons are included in the edge set. As a side effect, the edges are made non-intersecting by introducing cut points where edges intersect. This method has been introduced in version 0.24. [const] EdgePairs overlap_check(const Edges other,int d)Description: Performs an overlap check between edges
Technically, the overlap check is a width check between edges from different collections. The check is performed where the edges are orientation towards each other with their 'inside' side and they are orientation anti-parallel. This situation is found where two polygons overlap. Hence the check is an 'overlap' check. This method returns an EdgePairs collection which contains the parts of the edges violating the check criterion. A version of this method is available with more options (i.e. the option the deliver whole edges). Other checks with different edge relations are width_check, space_check, enclosing_check, separation_check and inside_check. [const] EdgePairs overlap_check(const Edges other,int d,bool whole_edges,variant metrics,variant ignore_angle,variant min_projection,variant max_projection)Description: Performs an overlap check with options
This version is similar to the simple version with one parameter. In addition, it allows to specify many more options. If "whole_edges" is true, the resulting EdgePairs collection will receive the whole edges which contribute in the width check. "metrics" can be one of the constants Euclidian, Square or Projection. See there for a description of these constants. Use nil for this value to select the default (Euclidian metrics). "ignore_angle" specifies the angle threshold of two edges. If two edges form an angle equal or above the given value, they will not contribute in the check. Setting this value to 90 (the default) will exclude edges with an angle of 90 degree or more from the check. Use nil for this value to select the default. "min_projection" and "max_projection" allow to select edges by their projected value upon each other. It is sufficient if the projection of one edge on the other matches the specified condition. The projected length must be larger or equal to "min_projection" and less than "max_projection". If you don't want to specify one threshold, pass nil to the respective value. Edges select_inside_part(const Region other)Description: Selects the parts of the edges from this edge collection which are inside the polygons of the given region
This operation selects the parts of the edges which are inside the given region. This functionality is similar to the '&=' operator, but edges on the borders of the polygons are not included in the edge set. As a side effect, the edges are made non-intersecting by introducing cut points where edges intersect. This method has been introduced in version 0.24. Edges select_interacting(const Edges other)Description: Selects the edges from this edge collection which overlap or touch edges from the other edge collection
This method does not merge the edges before they are selected. If you want to select coherent edges, make sure the edge collection is merged before this method is used. Edges select_interacting(const Region other)Description: Selects the edges from this region which overlap or touch polygons from the region
This method does not merge the edges before they are selected. If you want to select coherent edges, make sure the edge collection is merged before this method is used. Edges select_not_interacting(const Edges other)Description: Selects the edges from this edge collection which do not overlap or touch edges from the other edge collection
This method does not merge the edges before they are selected. If you want to select coherent edges, make sure the edge collection is merged before this method is used. Edges select_not_interacting(const Region other)Description: Selects the edges from this region which do not overlap or touch polygons from the region
This method does not merge the edges before they are selected. If you want to select coherent edges, make sure the edge collection is merged before this method is used. Edges select_outside_part(const Region other)Description: Selects the parts of the edges from this edge collection which are outside the polygons of the given region
This operation selects the parts of the edges which are not inside the given region. This functionality is similar to the '-=' operator, but edges on the borders of the polygons are included in the edge set. As a side effect, the edges are made non-intersecting by introducing cut points where edges intersect. This method has been introduced in version 0.24. [const] EdgePairs separation_check(const Edges other,int d)Description: Performs an separation check between edges
Technically, the separation check is a space check between edges from different collections. The check is performed where the edges are orientation towards each other with their 'outside' side and they are orientation anti-parallel. This situation is found where two polygons have a space. Hence the check is a 'separation' check. This method returns an EdgePairs collection which contains the parts of the edges violating the check criterion. A version of this method is available with more options (i.e. the option the deliver whole edges). Other checks with different edge relations are width_check, space_check, enclosing_check, overlap_check and inside_check. [const] EdgePairs separation_check(const Edges other,int d,bool whole_edges,variant metrics,variant ignore_angle,variant min_projection,variant max_projection)Description: Performs an overlap check with options
This version is similar to the simple version with one parameter. In addition, it allows to specify many more options. If "whole_edges" is true, the resulting EdgePairs collection will receive the whole edges which contribute in the width check. "metrics" can be one of the constants Euclidian, Square or Projection. See there for a description of these constants. Use nil for this value to select the default (Euclidian metrics). "ignore_angle" specifies the angle threshold of two edges. If two edges form an angle equal or above the given value, they will not contribute in the check. Setting this value to 90 (the default) will exclude edges with an angle of 90 degree or more from the check. Use nil for this value to select the default. "min_projection" and "max_projection" allow to select edges by their projected value upon each other. It is sufficient if the projection of one edge on the other matches the specified condition. The projected length must be larger or equal to "min_projection" and less than "max_projection". If you don't want to specify one threshold, pass nil to the respective value. [const] unsigned long sizeDescription: Returns the number of edges in the edge collection Python specific notes:This method is also available as 'len(object)' [const] EdgePairs space_check(int d)Description: Performs a space check between edges
To understand the space check for edges, one has to be familiar with the concept of the inside and outside interpretation of an edge. An edge is considered a boundary between "inside" and "outside" where "inside" is right to the edge. Although there is not necessarily a contiguous region for edges, the definition of the inside part allows to specify edge relations which are denoted by "space", "width", "inside" and "enclosing". In that sense, space means that another edge is anti-parallel and right to the edge under test with a distance of less than the given threshold. This method returns an EdgePairs collection which contains the parts of the edges violating the check criterion. A version of this method is available with more options (i.e. the option the deliver whole edges). Other checks with different edge relations are width_check, inside_check, overlap_check, separation_check and enclosing_check. [const] EdgePairs space_check(int d,bool whole_edges,variant metrics,variant ignore_angle,variant min_projection,variant max_projection)Description: Performs a space check with options
This version is similar to the simple version with one parameter. In addition, it allows to specify many more options. If "whole_edges" is true, the resulting EdgePairs collection will receive the whole edges which contribute in the space check. "metrics" can be one of the constants Euclidian, Square or Projection. See there for a description of these constants. Use nil for this value to select the default (Euclidian metrics). "ignore_angle" specifies the angle threshold of two edges. If two edges form an angle equal or above the given value, they will not contribute in the check. Setting this value to 90 (the default) will exclude edges with an angle of 90 degree or more from the check. Use nil for this value to select the default. "min_projection" and "max_projection" allow to select edges by their projected value upon each other. It is sufficient if the projection of one edge on the other matches the specified condition. The projected length must be larger or equal to "min_projection" and less than "max_projection". If you don't want to specify one threshold, pass nil to the respective value. [const] Edges start_segments(unsigned int length,double fraction)Description: Returns edges representing a part of the edge after the start point
This method allows to specify the length of these segments in a twofold way: either as a fixed length or by specifying a fraction of the original length: edges = ... # An edge collection edges.start_segments(100, 0.0) # All segments have a length of 100 DBU edges.start_segments(0, 50.0) # All segments have a length of half the original length edges.start_segments(100, 50.0) # All segments have a length of half the original length # or 100 DBU, whichever is larger It is possible to specify 0 for both values. In this case, degenerated edges (points) are delivered which specify the start positions of the edges but can't participate in some functions. void swap(Edges other)Description: Swap the contents of this edge collection with the contents of another one This method is useful to avoid excessive memory allocation in some cases. For managed memory languages such as Ruby, those cases will be rare. [const] string to_sDescription: Converts the edge collection to a string The length of the output is limited to 20 edges to avoid giant strings on large regions. For full output use "to_s" with a maximum count parameter. Python specific notes:This method is also available as 'str(object)' [const] string to_s(unsigned long max_count)Description: Converts the edge collection to a string This version allows specification of the maximum number of edges contained in the string. Python specific notes:This method is also available as 'str(object)' Edges transform(const Trans t)Description: Transform the edge collection (modifies self)
Transforms the edge collection with the given transformation. This version modifies the edge collection and returns a reference to self. Edges transform(const ICplxTrans t)Description: Transform the edge collection with a complex transformation (modifies self)
Transforms the edge collection with the given transformation. This version modifies the edge collection and returns a reference to self. Edges transform_icplx(const ICplxTrans t)Description: Transform the edge collection with a complex transformation (modifies self)
Use of this method is deprecated. Use transform instead [const] Edges transformed(const Trans t)Description: Transform the edge collection
Transforms the edge collection with the given transformation. Does not modify the edge collection but returns the transformed edge collection. [const] Edges transformed(const ICplxTrans t)Description: Transform the edge collection with a complex transformation
Transforms the edge collection with the given complex transformation. Does not modify the edge collection but returns the transformed edge collection. [const] Edges transformed_icplx(const ICplxTrans t)Description: Transform the edge collection with a complex transformation
Use of this method is deprecated. Use transformed instead [const] EdgePairs width_check(int other)Description: Performs a width check between edges
To understand the overlap check for edges, one has to be familiar with the concept of the inside and outside interpretation of an edge. An edge is considered a boundary between "inside" and "outside" where "inside" is right to the edge. Although there is not necessarily a contiguous region for edges, the definition of the inside part allows to specify edge relations which are denoted by "space", "width", "inside" and "enclosing". In that sense, width means that another edge is anti-parallel and left to the edge under test with a distance of less than the given threshold. This method returns an EdgePairs collection which contains the parts of the edges violating the check criterion. A version of this method is available with more options (i.e. the option the deliver whole edges). Other checks with different edge relations are space_check, inside_check, overlap_check, separation_check and enclosing_check. [const] EdgePairs width_check(int d,bool whole_edges,variant metrics,variant ignore_angle,variant min_projection,variant max_projection)Description: Performs a width check with options
This version is similar to the simple version with one parameter. In addition, it allows to specify many more options. If "whole_edges" is true, the resulting EdgePairs collection will receive the whole edges which contribute in the width check. "metrics" can be one of the constants Euclidian, Square or Projection. See there for a description of these constants. Use nil for this value to select the default (Euclidian metrics). "ignore_angle" specifies the angle threshold of two edges. If two edges form an angle equal or above the given value, they will not contribute in the check. Setting this value to 90 (the default) will exclude edges with an angle of 90 degree or more from the check. Use nil for this value to select the default. "min_projection" and "max_projection" allow to select edges by their projected value upon each other. It is sufficient if the projection of one edge on the other matches the specified condition. The projected length must be larger or equal to "min_projection" and less than "max_projection". If you don't want to specify one threshold, pass nil to the respective value. [const] Edges with_angle(double length,bool inverse)Description: Filter the edges by orientation Filters the edges in the edge collection by orientation. If "inverse" is false, only edges which have the given angle to the x-axis are returned. If "inverse" is true, edges not having the given angle are returned. This will filter horizontal edges: horizontal = edges.with_orientation(0, true) [const] Edges with_angle(double min_angle,double max_angle,bool inverse)Description: Filter the edges by orientation Filters the edges in the edge collection by orientation. If "inverse" is false, only edges which have an angle to the x-axis larger or equal to "min_angle" and less than "max_angle" are returned. If "inverse" is true, edges which do not conform to this criterion are returned. [const] Edges with_length(unsigned int length,bool inverse)Description: Filter the edges by length Filters the edges in the edge collection by length. If "inverse" is false, only edges which have the given length are returned. If "inverse" is true, edges not having the given length are returned. [const] Edges with_length(variant min_length,variant max_length,bool inverse)Description: Filter the edges by length Filters the edges in the edge collection by length. If "inverse" is false, only edges which have a length larger or equal to "min_length" and less than "max_length" are returned. If "inverse" is true, edges not having a length less than "min_length" or larger or equal than "max_length" are returned. If you don't want to specify a lower or upper limit, pass nil to that parameter. [const] Edges |(const Edges other)Description: Returns the boolean OR between self and the other edge set
The boolean OR is implemented by merging the edges of both edge sets. To simply join the edge collections without merging, the + operator is more efficient. Edges |=(const Edges other)Description: Performs the boolean OR between self and the other redge set
The boolean OR is implemented by merging the edges of both edge sets. To simply join the edge collections without merging, the + operator is more efficient. |