DRC Function Internals

This document describes some of the DRC functions in detail, specifically with respect to deep mode and pre-merge behavior.

DRC Function Details

In the table below A is for the first operand in binary operators of self for methods. B is for the second operand or the first method argument. For example:

# A is self
result = A.interacting(B)

# A is first operand in binary operators
result = A - B

Further columns include:

Please see the comment column for further details.

FunctionTypePre-mergeResult mergedRangePrimary inputComment
with_* and without_* polygon or edge yes yes
Polygon predicates (rectangles, squares, rectilinear and related non_* methods) polygon yes yes
holes and hulls polygon yes no
end_segments, start_segments and centers edge yes no
extended, extended_in and extended_out edge yes no
edges polygon yes yes
first_edges and second_edges edge pair n/a n/a
bbox any no no
area, perimeter, is_box? and length polygon yes n/a
flatten any no no
select, each and collect* polygon or edge yes yes
rounded_corners polygon yes yes
smoothed polygon yes yes
corners polygon yes yes
middle polygon yes yes
extent_refs polygon yes yes
ongrid polygon yes no Reverts to flat mode for anisotropic grids.
odd_polygons polygon no no
snap and snapped polygon yes no Creates cell variants. Reverts to flat mode for anisotropic grids.
and and not (& and - operators) polygon and edge no no 0 A
andnot polygon and edge no no 0 A
xor (^ operator) polygon and edge no no 0 both Basically implemented as (A-B)+(B-A).
or (| operator) polygon and edge no yes 0 both Basically implemented as (A+B).merged.
join (+ operator) polygon and edge no no 0 both Cheap operation. Performs hierarchy mapping of B to A in case both inputs come from different hierarchies.
covering and related (not_covering, split_covering, select_covering, select_not_covering) polygon yes (A, B if counting) yes 0 A
overlapping and related (not_overlapping, split_overlapping, select_overlapping, select_not_overlapping) polygon yes (A, B if counting) yes 0 A
interacting and related (not_interacting, split_interacting, select_interacting, select_not_interacting) polygon and edge yes (A, B if counting) yes 0 A
pull_interacting polygon, edge and text yes (B) yes 0 A Can be used to re-hierarchise B along hierarchy of A (put B into raw mode to disable merging).
pull_overlapping polygon yes (B) yes 0 A Can be used to re-hierarchise B along hierarchy of A (put B into raw mode to disable merging).
pull_inside polygon yes (A, B) yes 0 A
inside and related (not_inside, split_inside, select_inside, select_not_inside) polygon and edge yes (A) yes 0 A
in and related (not_in, in_and_out) polygon and edge yes (A, B) yes 0 A
intersections edge no no 0 A
inside_part, outside_part and inside_outside_part edge (A), polygon (B) no no 0 A
width polygon yes n/a 0 Single polygon check, no neighbors needed.
space polygon no/yes n/a check value Pre-merge is needed for: whole edges, rectangle filters, opposite filters and projection filters.
notch and isolated polygon yes n/a check value
separation, overlap, enclosing and enclosed polygon no/yes n/a check value A Pre-merge of A is needed for: whole edges, rectangle filters, opposite filters and projection filters. Pre-merge of B is needed for: whole edges.
width and space edge yes n/a check value
separation, overlap, enclosing and enclosed edge yes (A) n/a check value A
with_density and without_density polygon yes n/a Runs in tiled mode always.
sized and size polygon yes no sizing value Cell variants are generated with anisotropic sizing.
extents polygon or edge yes no 0
scaled and scale any no no Reverts to flat mode.
rotated and rotate any no no Reverts to flat mode.
transformed and transform any no no Reverts to flat mode.
moved and move any no no Cell variants are generated.
merged and merge polygon or edge yes yes 0
select_props, map_props and remove_props polygon no no
nets polygon no no
fill polygon yes n/a Reverts to flat mode.
drc polygon depending on operation depending on operation depending on operation A

Edge Orientation and Edge-based Checks

By convention, edges are always oriented with "inside" being on the "right" side of the edge:

DRC checks ("width", "space" etc.) are available both for polygon and edge layers. Edges do not have a connection to a polygon and each edge is an individual objects, so the relation to other edges is purely defined by the orientation of the edge. The following pictures show these relations: