Notation used in Ruby API documentation

**Module**: db

**Description**: A region (a potentially complex area consisting of multiple polygons)

**Class hierarchy**: Region » ShapeCollection

**Sub-classes**: Metrics, RectFilter, OppositeFilter

- Public constructors
- Public methods
- Public static methods and constants
- Deprecated methods (protected, public, static, non-static and constructors)
- Detailed description

This class was introduced to simplify operations on polygon sets like boolean or sizing operations. Regions consist of many polygons and thus are a generalization of single polygons which describes a single coherence set of points. Regions support a variety of operations and have several states.

The region's state can be empty (does not contain anything) or box-like, i.e. the region consists of a single box. In that case, some operations can be simplified. Regions can have merged state. In merged state, regions consist of merged (non-touching, non-self overlapping) polygons. Each polygon describes one coherent area in merged state.

The preferred representation of polygons inside the region are polygons with holes.

Regions are always expressed in database units. If you want to use regions from different database unit domains, scale the regions accordingly, i.e. by using the transformed method.

Regions provide convenient operators for the boolean operations. Hence it is often no longer required to work with the EdgeProcessor class. For example:

r1 = RBA::Region::new(RBA::Box::new(0, 0, 100, 100)) r2 = RBA::Region::new(RBA::Box::new(20, 20, 80, 80)) # compute the XOR: r1_xor_r2 = r1 ^ r2

Regions can be used in two different flavors: in raw mode or merged semantics. With merged semantics (the default), connected polygons are considered to belong together and are effectively merged. Overlapping areas are counted once in that mode. Internal edges (i.e. arising from cut lines) are not considered. In raw mode (without merged semantics), each polygon is considered as it is. Overlaps between polygons 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.

new Region ptr | new | Default constructor | |

new Region ptr | new | (Polygon[] array) | Constructor from a polygon array |

new Region ptr | new | (const Box box) | Box constructor |

new Region ptr | new | (const Polygon polygon) | Polygon constructor |

new Region ptr | new | (const SimplePolygon polygon) | Simple polygon constructor |

new Region ptr | new | (const Path path) | Path constructor |

new Region ptr | new | (const Shapes shapes) | Shapes constructor |

new Region ptr | new | (const RecursiveShapeIterator shape_iterator) | Constructor from a hierarchical shape set |

new Region ptr | new | (const RecursiveShapeIterator shape_iterator, const ICplxTrans trans) | Constructor from a hierarchical shape set with a transformation |

new Region ptr | new | (const RecursiveShapeIterator shape_iterator, DeepShapeStore deep_shape_store, double area_ratio = 0, unsigned long max_vertex_count = 0) | Constructor for a deep region from a hierarchical shape set |

new Region ptr | new | (const RecursiveShapeIterator shape_iterator, DeepShapeStore deep_shape_store, const ICplxTrans trans, double area_ratio = 0, unsigned long max_vertex_count = 0) | Constructor for a deep region from a hierarchical shape set |

new Region ptr | new | (const RecursiveShapeIterator shape_iterator, string expr, bool as_pattern = true, int enl = 1) | Constructor from a text set |

new Region ptr | new | (const RecursiveShapeIterator shape_iterator, DeepShapeStore dss, string expr, bool as_pattern = true, int enl = 1) | Constructor from a text set |

[const] | Region | & | (const Region other) | Returns the boolean AND between self and the other region |

Region | &= | (const Region other) | Performs the boolean AND between self and the other region | |

[const] | Region | + | (const Region other) | Returns the combined region of self and the other region |

Region | += | (const Region other) | Adds the polygons of the other region to self | |

[const] | Region | - | (const Region other) | Returns the boolean NOT between self and the other region |

Region | -= | (const Region other) | Performs the boolean NOT between self and the other region | |

[const] | const Polygon ptr | [] | (unsigned long n) | Returns the nth polygon of the region |

[const] | Region | ^ | (const Region other) | Returns the boolean NOT between self and the other region |

Region | ^= | (const Region other) | Performs the boolean XOR between self and the other region | |

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] | Region[] | andnot | (const Region other) | Returns the boolean AND and NOT between self and the other region |

[const] | long | area | The area of the region | |

[const] | long | area | (const Box rect) | The area of the region (restricted to a rectangle) |

void | assign | (const Region other) | Assigns another object to self | |

[const] | unsigned int | base_verbosity | Gets the minimum verbosity for timing reports | |

void | base_verbosity= | (int verbosity) | Sets the minimum verbosity for timing reports | |

[const] | Box | bbox | Return the bounding box of the region | |

void | break | (unsigned long max_vertex_count, double max_area_ratio = 0) | Breaks the polygons of the region into smaller ones | |

void | clear | Clears the region | ||

variant | complex_op | (CompoundRegionOperationNode ptr node) | Executes a complex operation (see CompoundRegionOperationNode for details) | |

[const] | Region | corners | (double angle_min = -180, double angle_max = 180, int dim = 1, bool include_min_angle = true, bool include_max_angle = true) | This method will select all corners whose attached edges satisfy the angle condition. |

[const] | Edges | corners_dots | (double angle_start = -180, double angle_end = 180, bool include_min_angle = true, bool include_max_angle = true) | This method will select all corners whose attached edges satisfy the angle condition. |

[const] | EdgePairs | corners_edge_pairs | (double angle_start = -180, double angle_end = 180, bool include_min_angle = true, bool include_max_angle = true) | This method will select all corners whose attached edges satisfy the angle condition. |

[const] | unsigned long | count | Returns the (flat) number of polygons in the region | |

[const] | Region | covering | (const Region other, unsigned long min_count = 1, unsigned long max_count = unlimited) | Returns the polygons of this region which are completely covering polygons from the other region |

[const] | unsigned long | data_id | Returns the data ID (a unique identifier for the underlying data storage) | |

[const] | new Shapes ptr | decompose_convex | (int preferred_orientation = Polygon#PO_any) | Decomposes the region into convex pieces. |

[const] | new Region ptr | decompose_convex_to_region | (int preferred_orientation = Polygon#PO_any) | Decomposes the region into convex pieces into a region. |

[const] | new Shapes ptr | decompose_trapezoids | (int mode = Polygon#TD_simple) | Decomposes the region into trapezoids. |

[const] | new Region ptr | decompose_trapezoids_to_region | (int mode = Polygon#TD_simple) | Decomposes the region into trapezoids. |

void | disable_progress | Disable progress reporting | ||

[const] | new Region ptr | dup | Creates a copy of self | |

[const,iter] | Polygon | each | Returns each polygon of the region | |

[const,iter] | Polygon | each_merged | Returns each merged polygon of the region | |

[const] | Edges | edges | Returns an edge collection representing all edges of the polygons in this region | |

void | enable_progress | (string label) | Enable progress reporting | |

[const] | EdgePairs | enclosed_check | (const Region other, unsigned int d, bool whole_edges = false, Region::Metrics metrics = Euclidian, variant ignore_angle = default, variant min_projection = 0, variant max_projection = max, bool shielded = true, Region::OppositeFilter opposite_filter = NoOppositeFilter, Region::RectFilter rect_filter = NoRectFilter, bool negative = false) | Performs an inside check with options |

[const] | EdgePairs | enclosing_check | (const Region other, unsigned int d, bool whole_edges = false, Region::Metrics metrics = Euclidian, variant ignore_angle = default, variant min_projection = 0, variant max_projection = max, bool shielded = true, Region::OppositeFilter opposite_filter = NoOppositeFilter, Region::RectFilter rect_filter = NoRectFilter, bool negative = false) | Performs an enclosing check with options |

[const] | Region | extents | Returns a region with the bounding boxes of the polygons | |

[const] | Region | extents | (int d) | Returns a region with the enlarged bounding boxes of the polygons |

[const] | Region | extents | (int dx, int dy) | Returns a region with the enlarged bounding boxes of the polygons |

[const] | void | fill | (Cell ptr in_cell, unsigned int fill_cell_index, const Box fc_box, const Point ptr origin = (0, 0), Region ptr remaining_parts = nil, const Vector fill_margin = 0,0, Region ptr remaining_polygons = nil, const Box glue_box = ()) | A mapping of Cell#fill_region to the Region class |

[const] | void | fill | (Cell ptr in_cell, unsigned int fill_cell_index, const Box fc_origin, const Vector row_step, const Vector column_step, const Point ptr origin = (0, 0), Region ptr remaining_parts = nil, const Vector fill_margin = 0,0, Region ptr remaining_polygons = nil, const Box glue_box = ()) | A mapping of Cell#fill_region to the Region class |

[const] | void | fill_multi | (Cell ptr in_cell, unsigned int fill_cell_index, const Box fc_origin, const Vector row_step, const Vector column_step, const Vector fill_margin = 0,0, Region ptr remaining_polygons = nil, const Box glue_box = ()) | A mapping of Cell#fill_region to the Region class |

Region | flatten | Explicitly flattens a region | ||

[const] | EdgePairs | grid_check | (int gx, int gy) | Returns a marker for all vertices not being on the given grid |

[const] | bool | has_valid_polygons? | Returns true if the region is flat and individual polygons can be accessed randomly | |

[const] | unsigned long | hier_count | Returns the (hierarchical) number of polygons in the region | |

[const] | Region | holes | Returns the holes of the region | |

[const] | Region | hulls | Returns the hulls of the region | |

void | insert | (const Box box) | Inserts a box | |

void | insert | (const Polygon polygon) | Inserts a polygon | |

void | insert | (const SimplePolygon polygon) | Inserts a simple polygon | |

void | insert | (const Path path) | Inserts a path | |

void | insert | (RecursiveShapeIterator shape_iterator) | Inserts all shapes delivered by the recursive shape iterator into this region | |

void | insert | (RecursiveShapeIterator shape_iterator, ICplxTrans trans) | Inserts all shapes delivered by the recursive shape iterator into this region with a transformation | |

void | insert | (Polygon[] array) | Inserts all polygons from the array into this region | |

void | insert | (const Region region) | Inserts all polygons from the other region into this region | |

void | insert | (const Shapes shapes) | Inserts all polygons from the shape collection into this region | |

void | insert | (const Shapes shapes, const Trans trans) | Inserts all polygons from the shape collection into this region with transformation | |

void | insert | (const Shapes shapes, const ICplxTrans trans) | Inserts all polygons from the shape collection into this region with complex transformation | |

[const] | void | insert_into | (Layout ptr layout, unsigned int cell_index, unsigned int layer) | Inserts this region into the given layout, below the given cell and into the given layer. |

[const] | Region | inside | (const Region other) | Returns the polygons of this region which are completely inside polygons from the other region |

[const] | EdgePairs | inside_check | (const Region other, unsigned int d, bool whole_edges = false, Region::Metrics metrics = Euclidian, variant ignore_angle = default, variant min_projection = 0, variant max_projection = max, bool shielded = true, Region::OppositeFilter opposite_filter = NoOppositeFilter, Region::RectFilter rect_filter = NoRectFilter, bool negative = false) | Performs an inside check with options |

[const] | Region | interacting | (const Region other, unsigned long min_count = 1, unsigned long max_count = unlimited) | Returns the polygons of this region which overlap or touch polygons from the other region |

[const] | Region | interacting | (const Edges other, unsigned long min_count = 1, unsigned long max_count = unlimited) | Returns the polygons of this region which overlap or touch edges from the edge collection |

[const] | Region | interacting | (const Texts other, unsigned long min_count = 1, unsigned long max_count = unlimited) | Returns the polygons of this region which overlap or touch texts |

[const] | bool | is_box? | Returns true, if the region is a simple box | |

[const] | bool | is_deep? | Returns true if the region is a deep (hierarchical) one | |

[const] | bool | is_empty? | Returns true if the region is empty | |

[const] | bool | is_merged? | Returns true if the region is merged | |

[const] | EdgePairs | isolated_check | (unsigned int d, bool whole_edges = false, Region::Metrics metrics = Euclidian, variant ignore_angle = default, variant min_projection = 0, variant max_projection = max, bool shielded = true, Region::OppositeFilter opposite_filter = NoOppositeFilter, Region::RectFilter rect_filter = NoRectFilter, bool negative = false) | Performs a space check between edges of different polygons with options |

[const] | Region | members_of | (const Region other) | Returns all polygons which are members of the other region |

Region | merge | Merge the region | ||

Region | merge | (int min_wc) | Merge the region with options | |

Region | merge | (bool min_coherence, int min_wc) | Merge the region with options | |

[const] | Region | merged | Returns the merged region | |

Region | merged | (int min_wc) | Returns the merged region (with options) | |

Region | merged | (bool min_coherence, int min_wc) | Returns the merged region (with options) | |

void | merged_semantics= | (bool f) | Enables or disables merged semantics | |

[const] | bool | merged_semantics? | Gets a flag indicating whether merged semantics is enabled | |

void | min_coherence= | (bool f) | Enable or disable minimum coherence | |

[const] | bool | min_coherence? | Gets a flag indicating whether minimum coherence is selected | |

[const] | Region | minkowski_sum | (const Edge e) | Compute the Minkowski sum of the region and an edge |

[const] | Region | minkowski_sum | (const Polygon p) | Compute the Minkowski sum of the region and a polygon |

[const] | Region | minkowski_sum | (const Box b) | Compute the Minkowski sum of the region and a box |

[const] | Region | minkowski_sum | (Point[] b) | Compute the Minkowski sum of the region and a contour of points (a trace) |

Region | move | (const Vector v) | Moves the region | |

Region | move | (int x, int y) | Moves the region | |

[const] | Region | moved | (const Vector v) | Returns the moved region (does not modify self) |

[const] | Region | moved | (int x, int y) | Returns the moved region (does not modify self) |

[const] | Region | non_rectangles | Returns all polygons which are not rectangles | |

[const] | Region | non_rectilinear | Returns all polygons which are not rectilinear | |

[const] | Region | non_squares | Returns all polygons which are not squares | |

[const] | Region | not_covering | (const Region other, unsigned long min_count = 1, unsigned long max_count = unlimited) | Returns the polygons of this region which are not completely covering polygons from the other region |

[const] | Region | not_inside | (const Region other) | Returns the polygons of this region which are not completely inside polygons from the other region |

[const] | Region | not_interacting | (const Region other, unsigned long min_count = 1, unsigned long max_count = unlimited) | Returns the polygons of this region which do not overlap or touch polygons from the other region |

[const] | Region | not_interacting | (const Edges other, unsigned long min_count = 1, unsigned long max_count = unlimited) | Returns the polygons of this region which do not overlap or touch edges from the edge collection |

[const] | Region | not_interacting | (const Texts other, unsigned long min_count = 1, unsigned long max_count = unlimited) | Returns the polygons of this region which do not overlap or touch texts |

[const] | Region | not_members_of | (const Region other) | Returns all polygons which are not members of the other region |

[const] | Region | not_outside | (const Region other) | Returns the polygons of this region which are not completely outside polygons from the other region |

[const] | Region | not_overlapping | (const Region other, unsigned long min_count = 1, unsigned long max_count = unlimited) | Returns the polygons of this region which do not overlap polygons from the other region |

[const] | EdgePairs | notch_check | (unsigned int d, bool whole_edges = false, Region::Metrics metrics = Euclidian, variant ignore_angle = default, variant min_projection = 0, variant max_projection = max, bool shielded = true, bool negative = false) | Performs a space check between edges of the same polygon with options |

[const] | Region | outside | (const Region other) | Returns the polygons of this region which are completely outside polygons from the other region |

[const] | EdgePairs | overlap_check | (const Region other, unsigned int d, bool whole_edges = false, Region::Metrics metrics = Euclidian, variant ignore_angle = default, variant min_projection = 0, variant max_projection = max, bool shielded = true, Region::OppositeFilter opposite_filter = NoOppositeFilter, Region::RectFilter rect_filter = NoRectFilter, bool negative = false) | Performs an overlap check with options |

[const] | Region | overlapping | (const Region other, unsigned long min_count = 1, unsigned long max_count = unlimited) | Returns the polygons of this region which overlap polygons from the other region |

[const] | unsigned long | perimeter | The total perimeter of the polygons | |

[const] | unsigned long | perimeter | (const Box rect) | The total perimeter of the polygons (restricted to a rectangle) |

[const] | Region | pull_inside | (const Region other) | Returns all polygons of "other" which are inside polygons of this region |

[const] | Region | pull_interacting | (const Region other) | Returns all polygons of "other" which are interacting with (overlapping, touching) polygons of this region |

[const] | Edges | pull_interacting | (const Edges other) | Returns all edges of "other" which are interacting with polygons of this region |

[const] | Texts | pull_interacting | (const Texts other) | Returns all texts of "other" which are interacting with polygons of this region |

[const] | Region | pull_overlapping | (const Region other) | Returns all polygons of "other" which are overlapping polygons of this region |

[const] | Region | rectangles | Returns all polygons which are rectangles | |

[const] | Region | rectilinear | Returns all polygons which are rectilinear | |

void | round_corners | (double r_inner, double r_outer, unsigned int n) | Corner rounding | |

[const] | Region | rounded_corners | (double r_inner, double r_outer, unsigned int n) | Corner rounding |

void | scale_and_snap | (int gx, int mx, int dx, int gy, int my, int dy) | Scales and snaps the region to the given grid | |

[const] | Region | scaled_and_snapped | (int gx, int mx, int dx, int gy, int my, int dy) | Returns the scaled and snapped region |

Region | select_covering | (const Region other, unsigned long min_count = 1, unsigned long max_count = unlimited) | Selects the polygons of this region which are completely covering polygons from the other region | |

Region | select_inside | (const Region other) | Selects the polygons of this region which are completely inside polygons from the other region | |

Region | select_interacting | (const Region other, unsigned long min_count = 1, unsigned long max_count = unlimited) | Selects the polygons from this region which overlap or touch polygons from the other region | |

Region | select_interacting | (const Edges other, unsigned long min_count = 1, unsigned long max_count = unlimited) | Selects the polygons from this region which overlap or touch edges from the edge collection | |

Region | select_interacting | (const Texts other, unsigned long min_count = 1, unsigned long max_count = unlimited) | Selects the polygons of this region which overlap or touch texts | |

Region | select_not_covering | (const Region other, unsigned long min_count = 1, unsigned long max_count = unlimited) | Selects the polygons of this region which are not completely covering polygons from the other region | |

Region | select_not_inside | (const Region other) | Selects the polygons of this region which are not completely inside polygons from the other region | |

Region | select_not_interacting | (const Region other, unsigned long min_count = 1, unsigned long max_count = unlimited) | Selects the polygons from this region which do not overlap or touch polygons from the other region | |

Region | select_not_interacting | (const Edges other, unsigned long min_count = 1, unsigned long max_count = unlimited) | Selects the polygons from this region which do not overlap or touch edges from the edge collection | |

Region | select_not_interacting | (const Texts other, unsigned long min_count = 1, unsigned long max_count = unlimited) | Selects the polygons of this region which do not overlap or touch texts | |

Region | select_not_outside | (const Region other) | Selects the polygons of this region which are not completely outside polygons from the other region | |

Region | select_not_overlapping | (const Region other, unsigned long min_count = 1, unsigned long max_count = unlimited) | Selects the polygons from this region which do not overlap polygons from the other region | |

Region | select_outside | (const Region other) | Selects the polygons of this region which are completely outside polygons from the other region | |

Region | select_overlapping | (const Region other, unsigned long min_count = 1, unsigned long max_count = unlimited) | Selects the polygons from this region which overlap polygons from the other region | |

[const] | EdgePairs | separation_check | (const Region other, unsigned int d, bool whole_edges = false, Region::Metrics metrics = Euclidian, variant ignore_angle = default, variant min_projection = 0, variant max_projection = max, bool shielded = true, Region::OppositeFilter opposite_filter = NoOppositeFilter, Region::RectFilter rect_filter = NoRectFilter, bool negative = false) | Performs a separation check with options |

Region | size | (int dx, int dy, unsigned int mode) | Anisotropic sizing (biasing) | |

Region | size | (int d, unsigned int mode) | Isotropic sizing (biasing) | |

Region | size | (int d) | Isotropic sizing (biasing) | |

[const] | Region | sized | (int dx, int dy, unsigned int mode) | Returns the anisotropically sized region |

[const] | Region | sized | (int d, unsigned int mode) | Returns the isotropically sized region |

Region | sized | (int d) | Isotropic sizing (biasing) | |

void | smooth | (int d, bool keep_hv = false) | Smoothing | |

[const] | Region | smoothed | (int d, bool keep_hv = false) | Smoothing |

void | snap | (int gx, int gy) | Snaps the region to the given grid | |

[const] | Region | snapped | (int gx, int gy) | Returns the snapped region |

[const] | EdgePairs | space_check | (unsigned int d, bool whole_edges = false, Region::Metrics metrics = Euclidian, variant ignore_angle = default, variant min_projection = 0, variant max_projection = max, bool shielded = true, Region::OppositeFilter opposite_filter = NoOppositeFilter, Region::RectFilter rect_filter = NoRectFilter, bool negative = false) | Performs a space check with options |

[const] | Region[] | split_covering | (const Region other, unsigned long min_count = 1, unsigned long max_count = unlimited) | Returns the polygons of this region which are completely covering polygons from the other region and the ones which are not at the same time |

[const] | Region[] | split_inside | (const Region other) | Returns the polygons of this region which are completely inside polygons from the other region and the ones which are not at the same time |

[const] | Region[] | split_interacting | (const Region other, unsigned long min_count = 1, unsigned long max_count = unlimited) | Returns the polygons of this region which are interacting with polygons from the other region and the ones which are not at the same time |

[const] | Region[] | split_interacting | (const Edges other, unsigned long min_count = 1, unsigned long max_count = unlimited) | Returns the polygons of this region which are interacting with edges from the other edge collection and the ones which are not at the same time |

[const] | Region[] | split_interacting | (const Texts other, unsigned long min_count = 1, unsigned long max_count = unlimited) | Returns the polygons of this region which are interacting with texts from the other text collection and the ones which are not at the same time |

[const] | Region[] | split_outside | (const Region other) | Returns the polygons of this region which are completely outside polygons from the other region and the ones which are not at the same time |

[const] | Region[] | split_overlapping | (const Region other, unsigned long min_count = 1, unsigned long max_count = unlimited) | Returns the polygons of this region which are overlapping with polygons from the other region and the ones which are not at the same time |

[const] | Region | squares | Returns all polygons which are squares | |

[const] | Region | strange_polygon_check | Returns a region containing those parts of polygons which are "strange" | |

void | strict_handling= | (bool f) | Enables or disables strict handling | |

[const] | bool | strict_handling? | Gets a flag indicating whether merged semantics is enabled | |

void | swap | (Region other) | Swap the contents of this region with the contents of another region | |

[const] | string | to_s | Converts the region to a string | |

[const] | string | to_s | (unsigned long max_count) | Converts the region to a string |

Region | transform | (const Trans t) | Transform the region (modifies self) | |

Region | transform | (const ICplxTrans t) | Transform the region with a complex transformation (modifies self) | |

Region | transform | (const IMatrix2d t) | Transform the region (modifies self) | |

Region | transform | (const IMatrix3d t) | Transform the region (modifies self) | |

[const] | Region | transformed | (const Trans t) | Transforms the region |

[const] | Region | transformed | (const ICplxTrans t) | Transforms the region with a complex transformation |

[const] | Region | transformed | (const IMatrix2d t) | Transforms the region |

[const] | Region | transformed | (const IMatrix3d t) | Transforms the region |

[const] | EdgePairs | width_check | (unsigned int d, bool whole_edges = false, Region::Metrics metrics = Euclidian, variant ignore_angle = default, variant min_projection = 0, variant max_projection = max, bool shielded = true, bool negative = false) | Performs a width check with options |

[const] | EdgePairs | with_angle | (double angle, bool inverse) | Returns markers on every corner with the given angle (or not with the given angle) |

[const] | EdgePairs | with_angle | (double amin, double amax, bool inverse) | Returns markers on every corner with an angle of more than amin and less than amax (or the opposite) |

[const] | Region | with_area | (long area, bool inverse) | Filter the polygons by area |

[const] | Region | with_area | (variant min_area, variant max_area, bool inverse) | Filter the polygons by area |

[const] | Region | with_area_ratio | (double ratio, bool inverse) | Filters the polygons by the bounding box area to polygon area ratio |

[const] | Region | with_area_ratio | (variant min_ratio, variant max_ratio, bool inverse, bool min_included = true, bool max_included = true) | Filters the polygons by the aspect ratio of their bounding boxes |

[const] | Region | with_bbox_aspect_ratio | (double ratio, bool inverse) | Filters the polygons by the aspect ratio of their bounding boxes |

[const] | Region | with_bbox_aspect_ratio | (variant min_ratio, variant max_ratio, bool inverse, bool min_included = true, bool max_included = true) | Filters the polygons by the aspect ratio of their bounding boxes |

[const] | Region | with_bbox_height | (unsigned int height, bool inverse) | Filter the polygons by bounding box height |

[const] | Region | with_bbox_height | (variant min_height, variant max_height, bool inverse) | Filter the polygons by bounding box height |

[const] | Region | with_bbox_max | (unsigned int dim, bool inverse) | Filter the polygons by bounding box width or height, whichever is larger |

[const] | Region | with_bbox_max | (variant min_dim, variant max_dim, bool inverse) | Filter the polygons by bounding box width or height, whichever is larger |

[const] | Region | with_bbox_min | (unsigned int dim, bool inverse) | Filter the polygons by bounding box width or height, whichever is smaller |

[const] | Region | with_bbox_min | (variant min_dim, variant max_dim, bool inverse) | Filter the polygons by bounding box width or height, whichever is smaller |

[const] | Region | with_bbox_width | (unsigned int width, bool inverse) | Filter the polygons by bounding box width |

[const] | Region | with_bbox_width | (variant min_width, variant max_width, bool inverse) | Filter the polygons by bounding box width |

[const] | Region | with_holes | (unsigned long nholes, bool inverse) | Filters the polygons by their number of holes |

[const] | Region | with_holes | (variant min_bholes, variant max_nholes, bool inverse) | Filter the polygons by their number of holes |

[const] | Region | with_perimeter | (unsigned long perimeter, bool inverse) | Filter the polygons by perimeter |

[const] | Region | with_perimeter | (variant min_perimeter, variant max_perimeter, bool inverse) | Filter the polygons by perimeter |

[const] | Region | with_relative_height | (double ratio, bool inverse) | Filters the polygons by the ratio of height to width |

[const] | Region | with_relative_height | (variant min_ratio, variant max_ratio, bool inverse, bool min_included = true, bool max_included = true) | Filters the polygons by the bounding box height to width ratio |

[const] | Region | | | (const Region other) | Returns the boolean OR between self and the other region |

Region | |= | (const Region other) | Performs the boolean OR between self and the other region |

[static,const] | Region::Metrics | Euclidian | Specifies Euclidian metrics for the check functions | |

[static,const] | Region::RectFilter | FourSidesAllowed | Allow errors when on all sides | |

[static,const] | Region::OppositeFilter | NoOppositeFilter | No opposite filtering | |

[static,const] | Region::RectFilter | NoRectFilter | Specifies no filtering | |

[static,const] | Region::OppositeFilter | NotOpposite | Only errors NOT appearing on opposite sides of a figure will be reported | |

[static,const] | Region::RectFilter | OneSideAllowed | Allow errors on one side | |

[static,const] | Region::OppositeFilter | OnlyOpposite | Only errors appearing on opposite sides of a figure will be reported | |

[static,const] | Region::Metrics | Projection | Specifies projected distance metrics for the check functions | |

[static,const] | Region::Metrics | Square | Specifies square metrics for the check functions | |

[static,const] | Region::RectFilter | ThreeSidesAllowed | Allow errors when on three sides | |

[static,const] | Region::RectFilter | TwoConnectedSidesAllowed | Allow errors on two sides ("L" configuration) | |

[static,const] | Region::RectFilter | TwoOppositeSidesAllowed | Allow errors on two opposite sides | |

[static,const] | Region::RectFilter | TwoSidesAllowed | Allow errors on two sides (not specified which) |

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] | Region | in | (const Region other) | Use of this method is deprecated. Use members_of instead |

[const] | bool | is_const_object? | Use of this method is deprecated. Use _is_const_object? instead | |

[const] | Region | minkowsky_sum | (const Edge e) | Use of this method is deprecated. Use minkowski_sum instead |

[const] | Region | minkowsky_sum | (const Polygon p) | Use of this method is deprecated. Use minkowski_sum instead |

[const] | Region | minkowsky_sum | (const Box b) | Use of this method is deprecated. Use minkowski_sum instead |

[const] | Region | minkowsky_sum | (Point[] b) | Use of this method is deprecated. Use minkowski_sum instead |

[const] | Region | not_in | (const Region other) | Use of this method is deprecated. Use not_members_of instead |

[const] | unsigned long | size | Use of this method is deprecated. Use count instead | |

Region | transform_icplx | (const ICplxTrans t) | Use of this method is deprecated. Use transform instead | |

[const] | Region | transformed_icplx | (const ICplxTrans t) | Use of this method is deprecated. Use transformed instead |

## & |
This method will compute the boolean AND (intersection) between two regions. The result is often but not necessarily always merged. | ||||||||||||||||||||

## &= |
This method will compute the boolean AND (intersection) between two regions. The result is often but not necessarily always merged. | ||||||||||||||||||||

## + |
This operator adds the polygons of the other region to self and returns a new combined region. This usually creates unmerged regions and polygons may overlap. Use merge if you want to ensure the result region is merged. | ||||||||||||||||||||

## += |
This operator adds the polygons of the other region to self. This usually creates unmerged regions and polygons may overlap. Use merge if you want to ensure the result region is merged. | ||||||||||||||||||||

## - |
This method will compute the boolean NOT (intersection) between two regions. The result is often but not necessarily always merged. | ||||||||||||||||||||

## -= |
This method will compute the boolean NOT (intersection) between two regions. The result is often but not necessarily always merged. | ||||||||||||||||||||

## Euclidian |
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. | ||||||||||||||||||||

## FourSidesAllowed |
| ||||||||||||||||||||

## NoOppositeFilter |
| ||||||||||||||||||||

## NoRectFilter |
| ||||||||||||||||||||

## NotOpposite |
| ||||||||||||||||||||

## OneSideAllowed |
| ||||||||||||||||||||

## OnlyOpposite |
| ||||||||||||||||||||

## Projection |
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. | ||||||||||||||||||||

## Square |
This value can be used for the metrics parameter in the check functions, i.e. width_check. This value specifies square 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. | ||||||||||||||||||||

## ThreeSidesAllowed |
| ||||||||||||||||||||

## TwoConnectedSidesAllowed |
| ||||||||||||||||||||

## TwoOppositeSidesAllowed |
| ||||||||||||||||||||

## TwoSidesAllowed |
| ||||||||||||||||||||

## [] |
This method returns nil if the index is out of range. It is available for flat regions only - i.e. those for which has_valid_polygons? is true. Use flatten to explicitly flatten a region. This method returns the raw polygon (not merged polygons, even if merged semantics is enabled). The each iterator is the more general approach to access the polygons. | ||||||||||||||||||||

## ^ |
This method will compute the boolean XOR (intersection) between two regions. The result is often but not necessarily always merged. | ||||||||||||||||||||

## ^= |
This method will compute the boolean XOR (intersection) between two regions. The result is often but not necessarily always merged. | ||||||||||||||||||||

## _create |
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 |
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? |
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? |
This method returns true, if self is a const reference. In that case, only const methods may be called on self. | ||||||||||||||||||||

## _manage |
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 |
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. | ||||||||||||||||||||

## andnot |
This method will compute the boolean AND and NOT between two regions simultaneously. Because this requires a single sweep only, using this method is faster than doing AND and NOT separately. This method has been added in version 0.27. | ||||||||||||||||||||

## area |
Merged semantics applies for this method (see merged_semantics= for a description of this concept) If merged semantics is not enabled, overlapping areas are counted twice. | ||||||||||||||||||||

This version will compute the area of the shapes, restricting the computation to the given rectangle. Merged semantics applies for this method (see merged_semantics= for a description of this concept) If merged semantics is not enabled, overlapping areas are counted twice. | |||||||||||||||||||||

## assign |
| ||||||||||||||||||||

## base_verbosity |
See base_verbosity= for details. This method has been introduced in version 0.26.
| ||||||||||||||||||||

## base_verbosity= |
Timing reports will be given only if the verbosity is larger than this value. Detailed reports will be given when the verbosity is more than this value plus 10. In binary operations, the base verbosity of the first argument is considered. This method has been introduced in version 0.26.
| ||||||||||||||||||||

## bbox |
The bounding box is the box enclosing all points of all polygons. | ||||||||||||||||||||

## break |
There are two criteria for splitting a polygon: a polygon is split into parts with less then 'max_vertex_count' points and an bounding box-to-polygon area ratio less than 'max_area_ratio'. The area ratio is supposed to render polygons whose bounding box is a better approximation. This applies for example to 'L' shape polygons. Using a value of 0 for either limit means that the respective limit isn't checked. Breaking happens by cutting the polygons into parts at 'good' locations. The algorithm does not have a specific goal to minimize the number of parts for example. The only goal is to achieve parts within the given limits. This method has been introduced in version 0.26.
| ||||||||||||||||||||

## clear |
| ||||||||||||||||||||

## complex_op |
This method has been introduced in version 0.27. | ||||||||||||||||||||

## corners |
The angle values specify a range of angles: all corners whose attached edges form an angle between angle_min and angle_max will be reported boxes with 2*dim x 2*dim dimension. The default dimension is 2x2 DBU. If 'include_angle_min' is true, the angle condition is >= min. angle, otherwise it is > min. angle. Same for 'include_angle_,ax' and the max. angle. The angle is measured between the incoming and the outcoming edge in mathematical sense: a positive value is a turn left while a negative value is a turn right. Since polygon contours are oriented clockwise, positive angles will report concave corners while negative ones report convex ones. A similar function that reports corners as point-like edges is corners_dots. This method has been introduced in version 0.25. 'include_min_angle' and 'include_max_angle' have been added in version 0.27. | ||||||||||||||||||||

## corners_dots |
This method is similar to corners, but delivers an Edges collection with dot-like edges for each corner. This method has been introduced in version 0.25. 'include_min_angle' and 'include_max_angle' have been added in version 0.27. | ||||||||||||||||||||

## corners_edge_pairs |
This method is similar to corners, but delivers an EdgePairs collection with an edge pairs for each corner. The first edge is the incoming edge of the corner, the second one the outgoing edge. This method has been introduced in version 0.27.1. | ||||||||||||||||||||

## count |
This returns the number of raw polygons (not merged polygons if merged semantics is enabled). The count is computed 'as if flat', i.e. polygons inside a cell are multiplied by the number of times a cell is instantiated. The 'count' alias has been provided in version 0.26 to avoid ambiguity with the 'size' method which applies a geometrical bias. | ||||||||||||||||||||

## covering |
Merged semantics applies for this method (see merged_semantics= for a description of this concept) This attribute is sometimes called 'enclosing' instead of 'covering', but this term is reserved for the respective DRC function. This method has been introduced in version 0.27. | ||||||||||||||||||||

## create |
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. | ||||||||||||||||||||

## data_id |
This method has been added in version 0.26. | ||||||||||||||||||||

## decompose_convex |
This method will return a Shapes container that holds a decomposition of the region into convex, simple polygons. See Polygon#decompose_convex for details. If you want Region output, you should use decompose_convex_to_region. This method has been introduced in version 0.25. | ||||||||||||||||||||

## decompose_convex_to_region |
This method is identical to decompose_convex, but delivers a Region object. This method has been introduced in version 0.25. | ||||||||||||||||||||

## decompose_trapezoids |
This method will return a Shapes container that holds a decomposition of the region into trapezoids. See Polygon#decompose_trapezoids for details. If you want Region output, you should use decompose_trapezoids_to_region. This method has been introduced in version 0.25. | ||||||||||||||||||||

## decompose_trapezoids_to_region |
This method is identical to decompose_trapezoids, but delivers a Region object. This method has been introduced in version 0.25. | ||||||||||||||||||||

## destroy |
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? |
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. | ||||||||||||||||||||

## disable_progress |
Calling this method will disable progress reporting. See enable_progress. | ||||||||||||||||||||

## dup |
| ||||||||||||||||||||

## each |
This returns the raw polygons (not merged polygons if merged semantics is enabled).
| ||||||||||||||||||||

## each_merged |
This returns the raw polygons if merged semantics is disabled or the merged ones if merged semantics is enabled. | ||||||||||||||||||||

## edges |
This method will decompose the polygons into the individual edges. Edges making up the hulls of the polygons are oriented clockwise while edges making up the holes are oriented counterclockwise. The edge collection returned can be manipulated in various ways. See Edges for a description of the possibilities of the edge collection. Merged semantics applies for this method (see merged_semantics= for a description of this concept) | ||||||||||||||||||||

## enable_progress |
After calling this method, the region 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. | ||||||||||||||||||||

## enclosed_check |
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 limit 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 selecting 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 limit, pass nil to the respective value. "shielded" controls whether shielding is applied. Shielding means that rule violations are not detected 'through' other features. Measurements are only made where the opposite edge is unobstructed. Shielding often is not optional as a rule violation in shielded case automatically comes with rule violations between the original and the shielding features. If not necessary, shielding can be disabled by setting this flag to false. In general, this will improve performance somewhat. "opposite_filter" specifies whether to require or reject errors happening on opposite sides of a figure. "rect_filter" allows suppressing specific error configurations on rectangular input figures. If "negative" is true, only edges from the first input are output as pseudo edge-pairs where the distance is larger or equal to the limit. This is a way to flag the parts of the first input where the distance to the second input is bigger. Note that only the first input's edges are output. The output is still edge pairs, but each edge pair contains one edge from the original input and the reverse version of the edge as the second edge. Merged semantics applies for the input of this method (see merged_semantics= for a description of this concept) The 'shielded', 'negative', 'not_opposite' and 'rect_sides' options have been introduced in version 0.27. The interpretation of the 'negative' flag has been restriced to first-layout only output in 0.27.1. The 'enclosed_check' alias was introduced in version 0.27.5. | ||||||||||||||||||||

## enclosing_check |
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 limit 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 selecting 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 limit, pass nil to the respective value. "shielded" controls whether shielding is applied. Shielding means that rule violations are not detected 'through' other features. Measurements are only made where the opposite edge is unobstructed. Shielding often is not optional as a rule violation in shielded case automatically comes with rule violations between the original and the shielding features. If not necessary, shielding can be disabled by setting this flag to false. In general, this will improve performance somewhat. "opposite_filter" specifies whether to require or reject errors happening on opposite sides of a figure. "rect_filter" allows suppressing specific error configurations on rectangular input figures. If "negative" is true, only edges from the first input are output as pseudo edge-pairs where the enclosure is larger or equal to the limit. This is a way to flag the parts of the first input where the enclosure vs. the second input is bigger. Note that only the first input's edges are output. The output is still edge pairs, but each edge pair contains one edge from the original input and the reverse version of the edge as the second edge. Merged semantics applies for the input of this method (see merged_semantics= for a description of this concept) The 'shielded', 'negative', 'not_opposite' and 'rect_sides' options have been introduced in version 0.27. The interpretation of the 'negative' flag has been restriced to first-layout only output in 0.27.1. | ||||||||||||||||||||

## extents |
This method will return a region consisting of the bounding boxes of the polygons. The boxes will not be merged, so it is possible to determine overlaps of these boxes for example. Merged semantics applies for this method (see merged_semantics= for a description of this concept) | ||||||||||||||||||||

This method will return a region consisting of the bounding boxes of the polygons 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. Merged semantics applies for this method (see merged_semantics= for a description of this concept) | |||||||||||||||||||||

This method will return a region consisting of the bounding boxes of the polygons 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. Merged semantics applies for this method (see merged_semantics= for a description of this concept) | |||||||||||||||||||||

## fill |
This method is equivalent to Cell#fill_region, but is based on Region (with the cell being the first parameter). This method has been introduced in version 0.27. | ||||||||||||||||||||

This method is equivalent to Cell#fill_region, but is based on Region (with the cell being the first parameter). This method has been introduced in version 0.27. | |||||||||||||||||||||

## fill_multi |
This method is equivalent to Cell#fill_region, but is based on Region (with the cell being the first parameter). This method has been introduced in version 0.27. | ||||||||||||||||||||

## flatten |
If the region is already flat (i.e. has_valid_polygons? returns true), this method will not change it. Returns 'self', so this method can be used in a dot concatenation. This method has been introduced in version 0.26. | ||||||||||||||||||||

## grid_check |
This method will return an edge pair object for every vertex whose x coordinate is not a multiple of gx or whose y coordinate is not a multiple of gy. The edge pair objects contain two edges consisting of the same single point - the original vertex. If gx or gy is 0 or less, the grid is not checked in that direction. Merged semantics applies for this method (see merged_semantics= for a description of this concept) | ||||||||||||||||||||

## has_valid_polygons? |
This method has been introduced in version 0.26. | ||||||||||||||||||||

## hier_count |
This returns the number of raw polygons (not merged polygons if merged semantics is enabled). The count is computed 'hierarchical', i.e. polygons inside a cell are counted once even if the cell is instantiated multiple times. This method has been introduced in version 0.27. | ||||||||||||||||||||

## holes |
This method returns all holes as filled polygons. Merged semantics applies for this method (see merged_semantics= for a description of this concept) If merge semantics is not enabled, the holes may not be detected if the polygons are taken from a hole-less representation (i.e. GDS2 file). Use explicit merge (merge method) in order to merge the polygons and detect holes. | ||||||||||||||||||||

## hulls |
This method returns all hulls as polygons. The holes will be removed (filled). Merged semantics applies for this method (see merged_semantics= for a description of this concept) If merge semantics is not enabled, the hull may also enclose holes if the polygons are taken from a hole-less representation (i.e. GDS2 file). Use explicit merge (merge method) in order to merge the polygons and detect holes. | ||||||||||||||||||||

## in |
Use of this method is deprecated. Use members_of instead This method returns all polygons in self which can be found in the other region as well with exactly the same geometry.
| ||||||||||||||||||||

## insert |
Inserts a box into the region. | ||||||||||||||||||||

Inserts a polygon into the region. | |||||||||||||||||||||

Inserts a simple polygon into the region. | |||||||||||||||||||||

Inserts a path into the region. | |||||||||||||||||||||

This method will insert all shapes delivered by the shape iterator and insert them into the region. Text objects and edges are not inserted, because they cannot be converted to polygons. | |||||||||||||||||||||

This method will insert all shapes delivered by the shape iterator and insert them into the region. Text objects and edges 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. | |||||||||||||||||||||

| |||||||||||||||||||||

This method has been introduced in version 0.25. | |||||||||||||||||||||

This method takes each "polygon-like" shape from the shape collection and inserts this shape into the region. Paths and boxes are converted to polygons during this process. Edges and text objects are ignored. This method has been introduced in version 0.25. | |||||||||||||||||||||

This method takes each "polygon-like" shape from the shape collection and inserts this shape into the region after applying the given transformation. Paths and boxes are converted to polygons during this process. Edges and text objects are ignored. This method has been introduced in version 0.25. | |||||||||||||||||||||

This method takes each "polygon-like" shape from the shape collection and inserts this shape into the region after applying the given complex transformation. Paths and boxes are converted to polygons during this process. Edges and text objects are ignored. This method has been introduced in version 0.25. | |||||||||||||||||||||

## insert_into |
If the region is a hierarchical one, a suitable hierarchy will be built below the top cell or and existing hierarchy will be reused. This method has been introduced in version 0.26. | ||||||||||||||||||||

## inside |
Merged semantics applies for this method (see merged_semantics= for a description of this concept) | ||||||||||||||||||||

## inside_check |
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 limit 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 selecting 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 limit, pass nil to the respective value. "shielded" controls whether shielding is applied. Shielding means that rule violations are not detected 'through' other features. Measurements are only made where the opposite edge is unobstructed. Shielding often is not optional as a rule violation in shielded case automatically comes with rule violations between the original and the shielding features. If not necessary, shielding can be disabled by setting this flag to false. In general, this will improve performance somewhat. "opposite_filter" specifies whether to require or reject errors happening on opposite sides of a figure. "rect_filter" allows suppressing specific error configurations on rectangular input figures. If "negative" is true, only edges from the first input are output as pseudo edge-pairs where the distance is larger or equal to the limit. This is a way to flag the parts of the first input where the distance to the second input is bigger. Note that only the first input's edges are output. The output is still edge pairs, but each edge pair contains one edge from the original input and the reverse version of the edge as the second edge. Merged semantics applies for the input of this method (see merged_semantics= for a description of this concept) The 'shielded', 'negative', 'not_opposite' and 'rect_sides' options have been introduced in version 0.27. The interpretation of the 'negative' flag has been restriced to first-layout only output in 0.27.1. The 'enclosed_check' alias was introduced in version 0.27.5. | ||||||||||||||||||||

## interacting |
'min_count' and 'max_count' impose a constraint on the number of times a polygon of this region has to interact with (different) polygons of the other region to make the polygon selected. A polygon is selected by this method if the number of polygons interacting with a polygon of this region is between min_count and max_count (including max_count). Merged semantics applies for this method (see merged_semantics= for a description of this concept) The min_count and max_count arguments have been added in version 0.27. | ||||||||||||||||||||

'min_count' and 'max_count' impose a constraint on the number of times a polygon of this region has to interact with edges of the edge collection to make the polygon selected. A polygon is selected by this method if the number of edges interacting with the polygon is between min_count and max_count (including max_count). Merged semantics applies for this method (see merged_semantics= for a description of this concept) This method has been introduced in version 0.25. The min_count and max_count arguments have been added in version 0.27. | |||||||||||||||||||||

'min_count' and 'max_count' impose a constraint on the number of times a polygon of this region has to interact with texts of the text collection to make the polygon selected. A polygon is selected by this method if the number of texts interacting with the polygon is between min_count and max_count (including max_count). Merged semantics applies for this method (see merged_semantics= for a description of this concept) This method has been introduced in version 0.27 | |||||||||||||||||||||

## is_box? |
This method does not apply implicit merging if merge semantics is enabled. If the region is not merged, this method may return false even if the merged region would be a box. | ||||||||||||||||||||

## is_const_object? |
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. | ||||||||||||||||||||

## is_deep? |
This method has been added in version 0.26. | ||||||||||||||||||||

## is_empty? |
| ||||||||||||||||||||

## is_merged? |
If the region is merged, polygons will not touch or overlap. You can ensure merged state by calling merge. | ||||||||||||||||||||

## isolated_check |
The 'shielded', 'negative', 'not_opposite' and 'rect_sides' options have been introduced in version 0.27. | ||||||||||||||||||||

## members_of |
This method returns all polygons in self which can be found in the other region as well with exactly the same geometry.
| ||||||||||||||||||||

## merge |
Merging removes overlaps and joins touching polygons. If the region is already merged, this method does nothing | ||||||||||||||||||||

Merging removes overlaps and joins touching polygons. This version provides one additional option: "min_wc" controls whether output is only produced if multiple polygons overlap. The value specifies the number of polygons that need to overlap. A value of 2 means that output is only produced if two or more polygons overlap. This method is equivalent to "merge(false, min_wc). | |||||||||||||||||||||

Merging removes overlaps and joins touching polygons. This version provides two additional options: if "min_coherence" is set to true, "kissing corners" are resolved by producing separate polygons. "min_wc" controls whether output is only produced if multiple polygons overlap. The value specifies the number of polygons that need to overlap. A value of 2 means that output is only produced if two or more polygons overlap. | |||||||||||||||||||||

## merged |
Merging removes overlaps and joins touching polygons. If the region is already merged, this method does nothing. In contrast to merge, this method does not modify the region but returns a merged copy. | ||||||||||||||||||||

This version provides one additional options: "min_wc" controls whether output is only produced if multiple polygons overlap. The value specifies the number of polygons that need to overlap. A value of 2 means that output is only produced if two or more polygons overlap. This method is equivalent to "merged(false, min_wc)". In contrast to merge, this method does not modify the region but returns a merged copy. | |||||||||||||||||||||

Merging removes overlaps and joins touching polygons. This version provides two additional options: if "min_coherence" is set to true, "kissing corners" are resolved by producing separate polygons. "min_wc" controls whether output is only produced if multiple polygons overlap. The value specifies the number of polygons that need to overlap. A value of 2 means that output is only produced if two or more polygons overlap. In contrast to merge, this method does not modify the region but returns a merged copy. | |||||||||||||||||||||

## merged_semantics= |
If merged semantics is enabled (the default), coherent polygons will be considered as single regions and artificial edges such as cut-lines will not be considered. Merged semantics thus is equivalent to considering coherent areas rather than single polygons
| ||||||||||||||||||||

## merged_semantics? |
See merged_semantics= for a description of this attribute.
| ||||||||||||||||||||

## min_coherence= |
If minimum coherence is set, the merge operations (explicit merge with merge or implicit merge through merged_semantics) are performed using minimum coherence mode. The coherence mode determines how kissing-corner situations are resolved. If minimum coherence is selected, they are resolved such that multiple polygons are created which touch at a corner). The default setting is maximum coherence (min_coherence = false).
| ||||||||||||||||||||

## min_coherence? |
See min_coherence= for a description of this attribute.
| ||||||||||||||||||||

## minkowski_sum |
The Minkowski sum of a region and an edge basically results in the area covered when "dragging" the region along the line given by the edge. The effect is similar to drawing the line with a pencil that has the shape of the given region. The resulting polygons are not merged. In order to remove overlaps, use the merge or merged method.Merged semantics applies for the input of this method (see merged_semantics= for a description of this concept) | ||||||||||||||||||||

The Minkowski sum of a region and a polygon is basically the result of "painting" the region with a pen that has the shape of the second polygon. The resulting polygons are not merged. In order to remove overlaps, use the merge or merged method.Merged semantics applies for the input of this method (see merged_semantics= for a description of this concept) | |||||||||||||||||||||

The result is equivalent to the region-with-polygon Minkowski sum with the box used as the second polygon. The resulting polygons are not merged. In order to remove overlaps, use the merge or merged method.Merged semantics applies for the input of this method (see merged_semantics= for a description of this concept) | |||||||||||||||||||||

The Minkowski sum of a region and a contour basically results in the area covered when "dragging" the region along the contour. The effect is similar to drawing the contour with a pencil that has the shape of the given region. | |||||||||||||||||||||

## minkowsky_sum |
Use of this method is deprecated. Use minkowski_sum instead The Minkowski sum of a region and an edge basically results in the area covered when "dragging" the region along the line given by the edge. The effect is similar to drawing the line with a pencil that has the shape of the given region. | ||||||||||||||||||||

Use of this method is deprecated. Use minkowski_sum instead The Minkowski sum of a region and a polygon is basically the result of "painting" the region with a pen that has the shape of the second polygon. | |||||||||||||||||||||

Use of this method is deprecated. Use minkowski_sum instead The result is equivalent to the region-with-polygon Minkowski sum with the box used as the second polygon. | |||||||||||||||||||||

Use of this method is deprecated. Use minkowski_sum instead The Minkowski sum of a region and a contour basically results in the area covered when "dragging" the region along the contour. The effect is similar to drawing the contour with a pencil that has the shape of the given region. | |||||||||||||||||||||

## move |
Moves the polygon by the given offset and returns the moved region. The region is overwritten. Starting with version 0.25 this method accepts a vector argument. | ||||||||||||||||||||

Moves the region by the given offset and returns the moved region. The region is overwritten. | |||||||||||||||||||||

## moved |
Moves the region by the given offset and returns the moved region. The region is not modified. Starting with version 0.25 this method accepts a vector argument. | ||||||||||||||||||||

Moves the region by the given offset and returns the moved region. The region is not modified. | |||||||||||||||||||||

## new |
This constructor creates an empty region.
| ||||||||||||||||||||

This constructor creates a region from an array of polygons.
| |||||||||||||||||||||

This constructor creates a region from a box.
| |||||||||||||||||||||

This constructor creates a region from a polygon.
| |||||||||||||||||||||

This constructor creates a region from a simple polygon.
| |||||||||||||||||||||

This constructor creates a region from a path.
| |||||||||||||||||||||

This constructor creates a region from a Shapes collection. This constructor has been introduced in version 0.25.
| |||||||||||||||||||||

This constructor creates a region from the shapes delivered by the given recursive shape iterator. Text objects and edges are not inserted, because they cannot be converted to polygons. This method allows feeding the shapes from a hierarchy of cells into the region. 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::Region::new(layout.begin_shapes(cell, layer))
| |||||||||||||||||||||

This constructor creates a region from the shapes delivered by the given recursive shape iterator. Text objects and edges are not inserted, because they cannot be converted to polygons. On the delivered shapes it applies the given transformation. This method allows feeding the shapes from a hierarchy of cells into the region. The transformation is useful to scale to a specific database unit for example. 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::Region::new(layout.begin_shapes(cell, layer), RBA::ICplxTrans::new(layout.dbu / dbu))
| |||||||||||||||||||||

This constructor creates a hierarchical region. Use a DeepShapeStore object to supply the hierarchical heap. See DeepShapeStore for more details. 'area_ratio' and 'max_vertex' supply two optimization parameters which control how big polygons are split to reduce the region's polygon complexity. This method has been introduced in version 0.26.
| |||||||||||||||||||||

This constructor creates a hierarchical region. Use a DeepShapeStore object to supply the hierarchical heap. See DeepShapeStore for more details. 'area_ratio' and 'max_vertex' supply two optimization parameters which control how big polygons are split to reduce the region's polygon complexity. The transformation is useful to scale to a specific database unit for example. This method has been introduced in version 0.26.
| |||||||||||||||||||||

This special constructor will create a region from the text objects delivered by the shape iterator. Each text object will give a small (non-empty) box that represents the text origin. Texts can be selected by their strings - either through a glob pattern or by exact comparison with the given string. The following options are available: region = RBA::Region::new(iter, "*") # all texts region = RBA::Region::new(iter, "A*") # all texts starting with an 'A' region = RBA::Region::new(iter, "A*", false) # all texts exactly matching 'A*' This method has been introduced in version 0.25. The enlargement parameter has been added in version 0.26.
| |||||||||||||||||||||

This special constructor will create a deep region from the text objects delivered by the shape iterator. Each text object will give a small (non-empty) box that represents the text origin. Texts can be selected by their strings - either through a glob pattern or by exact comparison with the given string. The following options are available: region = RBA::Region::new(iter, dss, "*") # all texts region = RBA::Region::new(iter, dss, "A*") # all texts starting with an 'A' region = RBA::Region::new(iter, dss, "A*", false) # all texts exactly matching 'A*' This variant has been introduced in version 0.26.
| |||||||||||||||||||||

## non_rectangles |
This method returns all polygons in self which are not rectangles.Merged semantics applies for this method (see merged_semantics= for a description of this concept) | ||||||||||||||||||||

## non_rectilinear |
This method returns all polygons in self which are not rectilinear.Merged semantics applies for this method (see merged_semantics= for a description of this concept) | ||||||||||||||||||||

## non_squares |
This method returns all polygons in self which are not squares.Merged semantics applies for this method (see merged_semantics= for a description of this concept) This method has been introduced in version 0.27. | ||||||||||||||||||||

## not_covering |
Merged semantics applies for this method (see merged_semantics= for a description of this concept) This attribute is sometimes called 'enclosing' instead of 'covering', but this term is reserved for the respective DRC function. This method has been introduced in version 0.27. | ||||||||||||||||||||

## not_in |
Use of this method is deprecated. Use not_members_of instead This method returns all polygons in self which can not be found in the other region with exactly the same geometry. | ||||||||||||||||||||

## not_inside |
Merged semantics applies for this method (see merged_semantics= for a description of this concept) | ||||||||||||||||||||

## not_interacting |
'min_count' and 'max_count' impose a constraint on the number of times a polygon of this region has to interact with (different) polygons of the other region to make the polygon not selected. A polygon is not selected by this method if the number of polygons interacting with a polygon of this region is between min_count and max_count (including max_count). Merged semantics applies for this method (see merged_semantics= for a description of this concept) The min_count and max_count arguments have been added in version 0.27. | ||||||||||||||||||||

'min_count' and 'max_count' impose a constraint on the number of times a polygon of this region has to interact with edges of the edge collection to make the polygon not selected. A polygon is not selected by this method if the number of edges interacting with the polygon is between min_count and max_count (including max_count). Merged semantics applies for this method (see merged_semantics= for a description of this concept) This method has been introduced in version 0.25 The min_count and max_count arguments have been added in version 0.27. | |||||||||||||||||||||

'min_count' and 'max_count' impose a constraint on the number of times a polygon of this region has to interact with texts of the text collection to make the polygon not selected. A polygon is not selected by this method if the number of texts interacting with the polygon is between min_count and max_count (including max_count). Merged semantics applies for this method (see merged_semantics= for a description of this concept) This method has been introduced in version 0.27 | |||||||||||||||||||||

## not_members_of |
This method returns all polygons in self which can not be found in the other region with exactly the same geometry. | ||||||||||||||||||||

## not_outside |
Merged semantics applies for this method (see merged_semantics= for a description of this concept) | ||||||||||||||||||||

## not_overlapping |
Merged semantics applies for this method (see merged_semantics= for a description of this concept) The count options have been introduced in version 0.27. | ||||||||||||||||||||

## notch_check |
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. The 'shielded' and 'negative' options have been introduced in version 0.27. | ||||||||||||||||||||

## outside |
Merged semantics applies for this method (see merged_semantics= for a description of this concept) | ||||||||||||||||||||

## overlap_check |
If "negative" is true, only edges from the first input are output as pseudo edge-pairs where the overlap is larger or equal to the limit. This is a way to flag the parts of the first input where the overlap vs. the second input is bigger. Note that only the first input's edges are output. The output is still edge pairs, but each edge pair contains one edge from the original input and the reverse version of the edge as the second edge. The 'shielded', 'negative', 'not_opposite' and 'rect_sides' options have been introduced in version 0.27. The interpretation of the 'negative' flag has been restriced to first-layout only output in 0.27.1. | ||||||||||||||||||||

## overlapping |
Merged semantics applies for this method (see merged_semantics= for a description of this concept) The count options have been introduced in version 0.27. | ||||||||||||||||||||

## perimeter |
Merged semantics applies for this method (see merged_semantics= for a description of this concept) If merged semantics is not enabled, internal edges are counted as well. | ||||||||||||||||||||

This version will compute the perimeter of the polygons, 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= for a description of this concept) If merged semantics is not enabled, internal edges are counted as well. | |||||||||||||||||||||

## pull_inside |
The "pull_..." methods are similar to "select_..." but work the opposite way: they select shapes from the argument region rather than self. In a deep (hierarchical) context the output region will be hierarchically aligned with self, so the "pull_..." methods provide a way for re-hierarchization. Merged semantics applies for this method (see merged_semantics= for a description of this concept) This method has been introduced in version 0.26.1 | ||||||||||||||||||||

## pull_interacting |
See pull_inside for a description of the "pull_..." methods. Merged semantics applies for this method (see merged_semantics= for a description of this concept) This method has been introduced in version 0.26.1 | ||||||||||||||||||||

See pull_inside for a description of the "pull_..." methods. Merged semantics applies for this method (see merged_semantics= for a description of this concept) This method has been introduced in version 0.26.1 | |||||||||||||||||||||

See pull_inside for a description of the "pull_..." methods. Merged semantics applies for this method (see merged_semantics= for a description of this concept) This method has been introduced in version 0.27 | |||||||||||||||||||||

## pull_overlapping |
See pull_inside for a description of the "pull_..." methods. Merged semantics applies for this method (see merged_semantics= for a description of this concept) This method has been introduced in version 0.26.1 | ||||||||||||||||||||

## rectangles |
This method returns all polygons in self which are rectangles.Merged semantics applies for this method (see merged_semantics= for a description of this concept) | ||||||||||||||||||||

## rectilinear |
This method returns all polygons in self which are rectilinear.Merged semantics applies for this method (see merged_semantics= for a description of this concept) | ||||||||||||||||||||

## round_corners |
This method rounds the corners of the polygons in the region. Inner corners will be rounded with a radius of r_inner and outer corners with a radius of r_outer. The circles will be approximated by segments using n segments per full circle. This method modifies the region. rounded_corners is a method that does the same but returns a new region without modifying self. Merged semantics applies for this method. | ||||||||||||||||||||

## rounded_corners |
See round_corners for a description of this method. This version returns a new region instead of modifying self (out-of-place). | ||||||||||||||||||||

## scale_and_snap |
This method will first scale the region by a rational factor of mx/dx horizontally and my/dy vertically and then snap the region to the given grid - each x or y coordinate is brought on the gx or gy grid by rounding to the nearest value which is a multiple of gx or gy. If gx or gy is 0, the result is brought on a grid of 1. Merged semantics applies for this method (see merged_semantics= for a description of this concept) This method has been introduced in version 0.26.1. | ||||||||||||||||||||

## scaled_and_snapped |
This method will scale and snap the region to the given grid and return the scaled and snapped region (see scale_and_snap). The original region is not modified. This method has been introduced in version 0.26.1. | ||||||||||||||||||||

## select_covering |
Merged semantics applies for this method (see merged_semantics= for a description of this concept) This attribute is sometimes called 'enclosing' instead of 'covering', but this term is reserved for the respective DRC function. This method has been introduced in version 0.27. | ||||||||||||||||||||

## select_inside |
Merged semantics applies for this method (see merged_semantics= for a description of this concept) | ||||||||||||||||||||

## select_interacting |
'min_count' and 'max_count' impose a constraint on the number of times a polygon of this region has to interact with (different) polygons of the other region to make the polygon selected. A polygon is selected by this method if the number of polygons interacting with a polygon of this region is between min_count and max_count (including max_count). Merged semantics applies for this method (see merged_semantics= for a description of this concept) The min_count and max_count arguments have been added in version 0.27. | ||||||||||||||||||||

'min_count' and 'max_count' impose a constraint on the number of times a polygon of this region has to interact with edges of the edge collection to make the polygon selected. A polygon is selected by this method if the number of edges interacting with the polygon is between min_count and max_count (including max_count). Merged semantics applies for this method (see merged_semantics= for a description of this concept) This method has been introduced in version 0.25 The min_count and max_count arguments have been added in version 0.27. | |||||||||||||||||||||

'min_count' and 'max_count' impose a constraint on the number of times a polygon of this region has to interact with texts of the text collection to make the polygon selected. A polygon is selected by this method if the number of texts interacting with the polygon is between min_count and max_count (including max_count). Merged semantics applies for this method (see merged_semantics= for a description of this concept) This method has been introduced in version 0.27 | |||||||||||||||||||||

## select_not_covering |
Merged semantics applies for this method (see merged_semantics= for a description of this concept) This method has been introduced in version 0.27. | ||||||||||||||||||||

## select_not_inside |
Merged semantics applies for this method (see merged_semantics= for a description of this concept) | ||||||||||||||||||||

## select_not_interacting |
'min_count' and 'max_count' impose a constraint on the number of times a polygon of this region has to interact with (different) polygons of the other region to make the polygon not selected. A polygon is not selected by this method if the number of polygons interacting with a polygon of this region is between min_count and max_count (including max_count). Merged semantics applies for this method (see merged_semantics= for a description of this concept) The min_count and max_count arguments have been added in version 0.27. | ||||||||||||||||||||

'min_count' and 'max_count' impose a constraint on the number of times a polygon of this region has to interact with edges of the edge collection to make the polygon not selected. A polygon is not selected by this method if the number of edges interacting with the polygon is between min_count and max_count (including max_count). Merged semantics applies for this method (see merged_semantics= for a description of this concept) This method has been introduced in version 0.25 The min_count and max_count arguments have been added in version 0.27. | |||||||||||||||||||||

'min_count' and 'max_count' impose a constraint on the number of times a polygon of this region has to interact with texts of the text collection to make the polygon not selected. A polygon is not selected by this method if the number of texts interacting with the polygon is between min_count and max_count (including max_count). Merged semantics applies for this method (see merged_semantics= for a description of this concept) This method has been introduced in version 0.27 | |||||||||||||||||||||

## select_not_outside |
Merged semantics applies for this method (see merged_semantics= for a description of this concept) | ||||||||||||||||||||

## select_not_overlapping |
Merged semantics applies for this method (see merged_semantics= for a description of this concept) The count options have been introduced in version 0.27. | ||||||||||||||||||||

## select_outside |
Merged semantics applies for this method (see merged_semantics= for a description of this concept) | ||||||||||||||||||||

## select_overlapping |
Merged semantics applies for this method (see merged_semantics= for a description of this concept) The count options have been introduced in version 0.27. | ||||||||||||||||||||

## separation_check |
If "negative" is true, only edges from the first input are output as pseudo edge-pairs where the separation is larger or equal to the limit. This is a way to flag the parts of the first input where the distance to the second input is bigger. Note that only the first input's edges are output. The output is still edge pairs, but each edge pair contains one edge from the original input and the reverse version of the edge as the second edge. The 'shielded', 'negative', 'not_opposite' and 'rect_sides' options have been introduced in version 0.27. The interpretation of the 'negative' flag has been restriced to first-layout only output in 0.27.1. | ||||||||||||||||||||

## size |
Shifts the contour outwards (dx,dy>0) or inwards (dx,dy<0). dx is the sizing in x-direction and dy is the sizing in y-direction. The sign of dx and dy should be identical. This method applies a sizing to the region. Before the sizing is done, the region is merged if this is not the case already. The mode defines at which bending angle cutoff occurs (0:>0, 1:>45, 2:>90, 3:>135, 4:>approx. 168, other:>approx. 179) Merged semantics applies for this method (see merged_semantics= for a description of this concept) The result is a set of polygons which may be overlapping, but are not self- intersecting. Polygons may overlap afterwards because they grew big enough to overlap their neighbors. In that case, merge can be used to detect this overlaps by setting the "min_wc" parameter to value 1: r = RBA::Region::new r.insert(RBA::Box::new(0, 0, 50, 50)) r.insert(RBA::Box::new(100, 0, 150, 50)) r.size(50, 2) r.merge(false, 1) # r now is (50,-50;50,100;100,100;100,-50) | ||||||||||||||||||||

This method is equivalent to "size(d, d, mode)". Merged semantics applies for this method (see merged_semantics= for a description of this concept) | |||||||||||||||||||||

This method is equivalent to "size(d, d, 2)". Merged semantics applies for this method (see merged_semantics= for a description of this concept) | |||||||||||||||||||||

Use of this method is deprecated. Use count instead This returns the number of raw polygons (not merged polygons if merged semantics is enabled). The count is computed 'as if flat', i.e. polygons inside a cell are multiplied by the number of times a cell is instantiated. The 'count' alias has been provided in version 0.26 to avoid ambiguity with the 'size' method which applies a geometrical bias. | |||||||||||||||||||||

## sized |
This method is returns the sized region (see size), but does not modify self. Merged semantics applies for this method (see merged_semantics= for a description of this concept) | ||||||||||||||||||||

This method is returns the sized region (see size), but does not modify self. Merged semantics applies for this method (see merged_semantics= for a description of this concept) | |||||||||||||||||||||

This method is equivalent to "sized(d, d, 2)". Merged semantics applies for this method (see merged_semantics= for a description of this concept) | |||||||||||||||||||||

## smooth |
This method will simplify the merged polygons of the region by removing vertexes if the resulting polygon stays equivalent with the original polygon. Equivalence is measured in terms of a deviation which is guaranteed to not become larger than d. This method modifies the region. smoothed is a method that does the same but returns a new region without modifying self. Merged semantics applies for this method. | ||||||||||||||||||||

## smoothed |
See smooth for a description of this method. This version returns a new region instead of modifying self (out-of-place). It has been introduced in version 0.25. | ||||||||||||||||||||

## snap |
This method will snap the region to the given grid - each x or y coordinate is brought on the gx or gy grid by rounding to the nearest value which is a multiple of gx or gy. If gx or gy is 0, no snapping happens in that direction. Merged semantics applies for this method (see merged_semantics= for a description of this concept) | ||||||||||||||||||||

## snapped |
This method will snap the region to the given grid and return the snapped region (see snap). The original region is not modified. | ||||||||||||||||||||

## space_check |
The 'shielded', 'negative', 'not_opposite' and 'rect_sides' options have been introduced in version 0.27. | ||||||||||||||||||||

## split_covering |
This method is equivalent to calling covering and not_covering, but is faster when both results are required. Merged semantics applies for this method (see merged_semantics= for a description of this concept). This method has been introduced in version 0.27. | ||||||||||||||||||||

## split_inside |
This method is equivalent to calling inside and not_inside, but is faster when both results are required. Merged semantics applies for this method (see merged_semantics= for a description of this concept). This method has been introduced in version 0.27. | ||||||||||||||||||||

## split_interacting |
This method is equivalent to calling interacting and not_interacting, but is faster when both results are required. Merged semantics applies for this method (see merged_semantics= for a description of this concept). This method has been introduced in version 0.27. | ||||||||||||||||||||

This method is equivalent to calling interacting and not_interacting, but is faster when both results are required. Merged semantics applies for this method (see merged_semantics= for a description of this concept). This method has been introduced in version 0.27. | |||||||||||||||||||||

This method is equivalent to calling interacting and not_interacting, but is faster when both results are required. Merged semantics applies for this method (see merged_semantics= for a description of this concept). This method has been introduced in version 0.27. | |||||||||||||||||||||

## split_outside |
This method is equivalent to calling outside and not_outside, but is faster when both results are required. Merged semantics applies for this method (see merged_semantics= for a description of this concept). This method has been introduced in version 0.27. | ||||||||||||||||||||

## split_overlapping |
This method is equivalent to calling overlapping and not_overlapping, but is faster when both results are required. Merged semantics applies for this method (see merged_semantics= for a description of this concept). This method has been introduced in version 0.27. | ||||||||||||||||||||

## squares |
This method returns all polygons in self which are squares.Merged semantics applies for this method (see merged_semantics= for a description of this concept) This method has been introduced in version 0.27. | ||||||||||||||||||||

## strange_polygon_check |
Strange parts of polygons are self-overlapping parts or non-orientable parts (i.e. in the "8" configuration). Merged semantics does not apply for this method (see merged_semantics= for a description of this concept) | ||||||||||||||||||||

## strict_handling= |
Strict handling means to leave away some optimizations. Specifically the output of boolean operations will be merged even if one input is empty. Without strict handling, the operation will be optimized and output won't be merged. Strict handling is disabled by default and optimization is in place. This method has been introduced in version 0.23.2.
| ||||||||||||||||||||

## strict_handling? |
See strict_handling= for a description of this attribute. This method has been introduced in version 0.23.2.
| ||||||||||||||||||||

## swap |
This method is useful to avoid excessive memory allocation in some cases. For managed memory languages such as Ruby, those cases will be rare. | ||||||||||||||||||||

## to_s |
The length of the output is limited to 20 polygons to avoid giant strings on large regions. For full output use "to_s" with a maximum count parameter.
| ||||||||||||||||||||

This version allows specification of the maximum number of polygons contained in the string.
| |||||||||||||||||||||

## transform |
Transforms the region with the given transformation. This version modifies the region and returns a reference to self. | ||||||||||||||||||||

Transforms the region with the given transformation. This version modifies the region and returns a reference to self. | |||||||||||||||||||||

Transforms the region with the given 2d matrix transformation. This version modifies the region and returns a reference to self. This variant was introduced in version 0.27. | |||||||||||||||||||||

Transforms the region with the given 3d matrix transformation. This version modifies the region and returns a reference to self. This variant was introduced in version 0.27. | |||||||||||||||||||||

## transform_icplx |
Use of this method is deprecated. Use transform instead Transforms the region with the given transformation. This version modifies the region and returns a reference to self. | ||||||||||||||||||||

## transformed |
Transforms the region with the given transformation. Does not modify the region but returns the transformed region. | ||||||||||||||||||||

Transforms the region with the given complex transformation. Does not modify the region but returns the transformed region. | |||||||||||||||||||||

Transforms the region with the given 2d matrix transformation. Does not modify the region but returns the transformed region. This variant was introduced in version 0.27. | |||||||||||||||||||||

Transforms the region with the given 3d matrix transformation. Does not modify the region but returns the transformed region. This variant was introduced in version 0.27. | |||||||||||||||||||||

## transformed_icplx |
Use of this method is deprecated. Use transformed instead Transforms the region with the given complex transformation. Does not modify the region but returns the transformed region. | ||||||||||||||||||||

## width_check |
This version is similar to the simple version with one parameter. In addition, it allows to specify many more options. The 'shielded' and 'negative' options have been introduced in version 0.27. | ||||||||||||||||||||

## with_angle |
If the inverse flag is false, this method returns an error marker (an EdgePair object) for every corner whose connected edges form an angle with the given value (in degree). If the inverse flag is true, the method returns markers for every corner whose angle is not the given value. The edge pair objects returned will contain both edges forming the angle. Merged semantics applies for this method (see merged_semantics= for a description of this concept) | ||||||||||||||||||||

If the inverse flag is false, this method returns an error marker (an EdgePair object) for every corner whose connected edges form an angle whose value is more or equal to amin (in degree) or less (but not equal to) amax. If the inverse flag is true, the method returns markers for every corner whose angle is not matching that criterion. The edge pair objects returned will contain both edges forming the angle. Merged semantics applies for this method (see merged_semantics= for a description of this concept) | |||||||||||||||||||||

## with_area |
Filters the polygons of the region by area. If "inverse" is false, only polygons which have the given area are returned. If "inverse" is true, polygons not having the given area are returned. Merged semantics applies for this method (see merged_semantics= for a description of this concept) | ||||||||||||||||||||

Filters the polygons of the region by area. If "inverse" is false, only polygons which have an area larger or equal to "min_area" and less than "max_area" are returned. If "inverse" is true, polygons having an area less than "min_area" or larger or equal than "max_area" are returned. If you don't want to specify a lower or upper limit, pass nil to that parameter. Merged semantics applies for this method (see merged_semantics= for a description of this concept) | |||||||||||||||||||||

## with_area_ratio |
The area ratio is defined by the ratio of bounding box area to polygon area. It's a measure how much the bounding box is approximating the polygon. 'Thin polygons' have a large area ratio, boxes has an area ratio of 1. The area ratio is always larger or equal to 1. With 'inverse' set to false, this version filters polygons which have an area ratio equal to the given value. With 'inverse' set to true, all other polygons will be returned. Merged semantics applies for this method (see merged_semantics= for a description of this concept) This method has been introduced in version 0.27. | ||||||||||||||||||||

The area ratio is defined by the ratio of bounding box area to polygon area. It's a measure how much the bounding box is approximating the polygon. 'Thin polygons' have a large area ratio, boxes has an area ratio of 1. The area ratio is always larger or equal to 1. With 'inverse' set to false, this version filters polygons which have an area ratio between 'min_ratio' and 'max_ratio'. With 'min_included' set to true, the 'min_ratio' value is included in the range, otherwise it's excluded. Same for 'max_included' and 'max_ratio'. With 'inverse' set to true, all other polygons will be returned. If you don't want to specify a lower or upper limit, pass nil to that parameter. Merged semantics applies for this method (see merged_semantics= for a description of this concept) This method has been introduced in version 0.27. | |||||||||||||||||||||

## with_bbox_aspect_ratio |
Filters the polygons of the region by the aspect ratio of their bounding boxes. The aspect ratio is the ratio of larger to smaller dimension of the bounding box. A square has an aspect ratio of 1. With 'inverse' set to false, this version filters polygons which have a bounding box aspect ratio equal to the given value. With 'inverse' set to true, all other polygons will be returned. Merged semantics applies for this method (see merged_semantics= for a description of this concept) This method has been introduced in version 0.27. | ||||||||||||||||||||

Filters the polygons of the region by the aspect ratio of their bounding boxes. The aspect ratio is the ratio of larger to smaller dimension of the bounding box. A square has an aspect ratio of 1. With 'inverse' set to false, this version filters polygons which have a bounding box aspect ratio between 'min_ratio' and 'max_ratio'. With 'min_included' set to true, the 'min_ratio' value is included in the range, otherwise it's excluded. Same for 'max_included' and 'max_ratio'. With 'inverse' set to true, all other polygons will be returned. If you don't want to specify a lower or upper limit, pass nil to that parameter. Merged semantics applies for this method (see merged_semantics= for a description of this concept) This method has been introduced in version 0.27. | |||||||||||||||||||||

## with_bbox_height |
Filters the polygons of the region by the height of their bounding box. If "inverse" is false, only polygons whose bounding box has the given height are returned. If "inverse" is true, polygons whose bounding box does not have the given height are returned. Merged semantics applies for this method (see merged_semantics= for a description of this concept) | ||||||||||||||||||||

Filters the polygons of the region by the height of their bounding box. If "inverse" is false, only polygons whose bounding box has a height larger or equal to "min_height" and less than "max_height" are returned. If "inverse" is true, all polygons not matching this criterion are returned. If you don't want to specify a lower or upper limit, pass nil to that parameter. Merged semantics applies for this method (see merged_semantics= for a description of this concept) | |||||||||||||||||||||

## with_bbox_max |
Filters the polygons of the region by the maximum dimension of their bounding box. If "inverse" is false, only polygons whose bounding box's larger dimension is equal to the given value are returned. If "inverse" is true, all polygons not matching this criterion are returned. Merged semantics applies for this method (see merged_semantics= for a description of this concept) | ||||||||||||||||||||

Filters the polygons of the region by the minimum dimension of their bounding box. If "inverse" is false, only polygons whose bounding box's larger dimension is larger or equal to "min_dim" and less than "max_dim" are returned. If "inverse" is true, all polygons not matching this criterion are returned. If you don't want to specify a lower or upper limit, pass nil to that parameter. Merged semantics applies for this method (see merged_semantics= for a description of this concept) | |||||||||||||||||||||

## with_bbox_min |
Filters the polygons inside the region by the minimum dimension of their bounding box. If "inverse" is false, only polygons whose bounding box's smaller dimension is equal to the given value are returned. If "inverse" is true, all polygons not matching this criterion are returned. Merged semantics applies for this method (see merged_semantics= for a description of this concept) | ||||||||||||||||||||

Filters the polygons of the region by the minimum dimension of their bounding box. If "inverse" is false, only polygons whose bounding box's smaller dimension is larger or equal to "min_dim" and less than "max_dim" are returned. If "inverse" is true, all polygons not matching this criterion are returned. If you don't want to specify a lower or upper limit, pass nil to that parameter. Merged semantics applies for this method (see merged_semantics= for a description of this concept) | |||||||||||||||||||||

## with_bbox_width |
Filters the polygons of the region by the width of their bounding box. If "inverse" is false, only polygons whose bounding box has the given width are returned. If "inverse" is true, polygons whose bounding box does not have the given width are returned. Merged semantics applies for this method (see merged_semantics= for a description of this concept) | ||||||||||||||||||||

Filters the polygons of the region by the width of their bounding box. If "inverse" is false, only polygons whose bounding box has a width larger or equal to "min_width" and less than "max_width" are returned. If "inverse" is true, all polygons not matching this criterion are returned. If you don't want to specify a lower or upper limit, pass nil to that parameter. Merged semantics applies for this method (see merged_semantics= for a description of this concept) | |||||||||||||||||||||

## with_holes |
Filters the polygons of the region by number of holes. If "inverse" is false, only polygons which have the given number of holes are returned. If "inverse" is true, polygons not having the given of holes are returned. Merged semantics applies for this method (see merged_semantics= for a description of this concept) This method has been introduced in version 0.27. | ||||||||||||||||||||

Filters the polygons of the region by number of holes. If "inverse" is false, only polygons which have a hole count larger or equal to "min_nholes" and less than "max_nholes" are returned. If "inverse" is true, polygons having a hole count less than "min_nholes" or larger or equal than "max_nholes" are returned. If you don't want to specify a lower or upper limit, pass nil to that parameter. Merged semantics applies for this method (see merged_semantics= for a description of this concept) This method has been introduced in version 0.27. | |||||||||||||||||||||

## with_perimeter |
Filters the polygons of the region by perimeter. If "inverse" is false, only polygons which have the given perimeter are returned. If "inverse" is true, polygons not having the given perimeter are returned. Merged semantics applies for this method (see merged_semantics= for a description of this concept) | ||||||||||||||||||||

Filters the polygons of the region by perimeter. If "inverse" is false, only polygons which have a perimeter larger or equal to "min_perimeter" and less than "max_perimeter" are returned. If "inverse" is true, polygons having a perimeter less than "min_perimeter" or larger or equal than "max_perimeter" are returned. If you don't want to specify a lower or upper limit, pass nil to that parameter. Merged semantics applies for this method (see merged_semantics= for a description of this concept) | |||||||||||||||||||||

## with_relative_height |
This method filters the polygons of the region by the ratio of height vs. width of their bounding boxes. 'Tall' polygons have a large value while 'flat' polygons have a small value. A square has a relative height of 1. An alternative method is 'with_area_ratio' which can be more efficient because it's isotropic. With 'inverse' set to false, this version filters polygons which have a relative height equal to the given value. With 'inverse' set to true, all other polygons will be returned. Merged semantics applies for this method (see merged_semantics= for a description of this concept) This method has been introduced in version 0.27. | ||||||||||||||||||||

This method filters the polygons of the region by the ratio of height vs. width of their bounding boxes. 'Tall' polygons have a large value while 'flat' polygons have a small value. A square has a relative height of 1. An alternative method is 'with_area_ratio' which can be more efficient because it's isotropic. With 'inverse' set to false, this version filters polygons which have a relative height between 'min_ratio' and 'max_ratio'. With 'min_included' set to true, the 'min_ratio' value is included in the range, otherwise it's excluded. Same for 'max_included' and 'max_ratio'. With 'inverse' set to true, all other polygons will be returned. If you don't want to specify a lower or upper limit, pass nil to that parameter. Merged semantics applies for this method (see merged_semantics= for a description of this concept) This method has been introduced in version 0.27. | |||||||||||||||||||||

## | |
The boolean OR is implemented by merging the polygons of both regions. To simply join the regions without merging, the + operator is more efficient. | ||||||||||||||||||||

## |= |
The boolean OR is implemented by merging the polygons of both regions. To simply join the regions without merging, the + operator is more efficient. |