diff --git a/scripts/create_drc_samples.rb b/scripts/create_drc_samples.rb
index 4eac57da5..02be4140d 100644
--- a/scripts/create_drc_samples.rb
+++ b/scripts/create_drc_samples.rb
@@ -231,6 +231,10 @@ run_demo gen, "input.space(1.2, euclidian)", "drc_space1.png"
run_demo gen, "input.notch(1.2, euclidian)", "drc_space2.png"
run_demo gen, "input.isolated(1.2, euclidian)", "drc_space3.png"
+run_demo gen, "input.drc(space(euclidian) < 1.2)", "drc_space1u.png"
+run_demo gen, "input.drc(notch(euclidian) < 1.2)", "drc_space2u.png"
+run_demo gen, "input.drc(isolated(euclidian) < 1.2)", "drc_space3u.png"
+
class Gen
def produce(s1, s2)
pts = [
@@ -264,6 +268,7 @@ end
gen = Gen::new
run_demo gen, "input1.separation(input2, 1.2, euclidian)", "drc_separation1.png"
+run_demo gen, "input1.drc(separation(input2, euclidian) < 1.2)", "drc_separation1u.png"
class Gen
def produce(s1, s2)
@@ -442,6 +447,10 @@ gen = Gen::new
run_demo gen, "input1.enclosing(input2, 2.0.um)", "drc_enc1.png"
run_demo gen, "input1.enclosing(input2, 2.0.um, projection)", "drc_enc2.png"
+run_demo gen, "input1.drc(enclosing(input2) < 2.0.um)", "drc_enc1u.png"
+run_demo gen, "input1.drc(enclosing(input2,\n"+
+ " projection) < 2.0.um)", "drc_enc2u.png"
+
class Gen
def produce(s1, s2)
@@ -473,6 +482,10 @@ gen = Gen::new
run_demo gen, "input1.overlap(input2, 2.0.um)", "drc_overlap1.png"
run_demo gen, "input1.overlap(input2, 2.0.um, projection)", "drc_overlap2.png"
+run_demo gen, "input1.drc(overlap(input2) < 2.0.um)", "drc_overlap1u.png"
+run_demo gen, "input1.drc(overlap(input2,\n"+
+ " projection) < 2.0.um)", "drc_overlap2u.png"
+
class Gen
def produce(s1, s2)
diff --git a/src/db/db/gsiDeclDbCompoundOperation.cc b/src/db/db/gsiDeclDbCompoundOperation.cc
index 5fb0fa3b6..0ad1f0176 100644
--- a/src/db/db/gsiDeclDbCompoundOperation.cc
+++ b/src/db/db/gsiDeclDbCompoundOperation.cc
@@ -464,12 +464,12 @@ static db::CompoundRegionOperationNode *new_separation_check (db::CompoundRegion
static db::CompoundRegionOperationNode *new_overlap_check (db::CompoundRegionOperationNode *other, db::Coord d, bool whole_edges, db::metrics_type metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection, bool shielded, db::OppositeFilter opposite_filter, db::RectFilter rect_filter, bool negative)
{
- return new_check_node (other, db::OverlapRelation, true, d, whole_edges, metrics, ignore_angle, min_projection, max_projection, shielded, opposite_filter, rect_filter, negative);
+ return new_check_node (other, db::WidthRelation, true, d, whole_edges, metrics, ignore_angle, min_projection, max_projection, shielded, opposite_filter, rect_filter, negative);
}
-static db::CompoundRegionOperationNode *new_inside_check (db::CompoundRegionOperationNode *other, db::Coord d, bool whole_edges, db::metrics_type metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection, bool shielded, db::OppositeFilter opposite_filter, db::RectFilter rect_filter, bool negative)
+static db::CompoundRegionOperationNode *new_enclosing_check (db::CompoundRegionOperationNode *other, db::Coord d, bool whole_edges, db::metrics_type metrics, const tl::Variant &ignore_angle, const tl::Variant &min_projection, const tl::Variant &max_projection, bool shielded, db::OppositeFilter opposite_filter, db::RectFilter rect_filter, bool negative)
{
- return new_check_node (other, db::InsideRelation, true, d, whole_edges, metrics, ignore_angle, min_projection, max_projection, shielded, opposite_filter, rect_filter, negative);
+ return new_check_node (other, db::OverlapRelation, true, d, whole_edges, metrics, ignore_angle, min_projection, max_projection, shielded, opposite_filter, rect_filter, negative);
}
static db::CompoundRegionOperationNode *new_perimeter_filter (db::CompoundRegionOperationNode *input, bool inverse, db::coord_traits::perimeter_type pmin, db::coord_traits::perimeter_type pmax)
@@ -669,7 +669,7 @@ Class decl_CompoundRegionOperationNode ("db", "
gsi::constructor ("new_overlap_check", &new_overlap_check, gsi::arg ("other"), gsi::arg ("d"), gsi::arg ("whole_edges", false), gsi::arg ("metrics", db::Euclidian, "Euclidian"), gsi::arg ("ignore_angle", tl::Variant (), "default"), gsi::arg ("min_projection", tl::Variant (), "0"), gsi::arg ("max_projection", tl::Variant (), "max."), gsi::arg ("shielded", true), gsi::arg ("opposite_filter", db::NoOppositeFilter, "NoOppositeFilter"), gsi::arg ("rect_filter", db::NoSideAllowed, "NoSideAllowed"), gsi::arg ("negative", false),
"@brief Creates a node providing an overlap check.\n"
) +
- gsi::constructor ("new_inside_check", &new_inside_check, gsi::arg ("other"), gsi::arg ("d"), gsi::arg ("whole_edges", false), gsi::arg ("metrics", db::Euclidian, "Euclidian"), gsi::arg ("ignore_angle", tl::Variant (), "default"), gsi::arg ("min_projection", tl::Variant (), "0"), gsi::arg ("max_projection", tl::Variant (), "max."), gsi::arg ("shielded", true), gsi::arg ("opposite_filter", db::NoOppositeFilter, "NoOppositeFilter"), gsi::arg ("rect_filter", db::NoSideAllowed, "NoSideAllowed"), gsi::arg ("negative", false),
+ gsi::constructor ("new_enclosing_check", &new_enclosing_check, gsi::arg ("other"), gsi::arg ("d"), gsi::arg ("whole_edges", false), gsi::arg ("metrics", db::Euclidian, "Euclidian"), gsi::arg ("ignore_angle", tl::Variant (), "default"), gsi::arg ("min_projection", tl::Variant (), "0"), gsi::arg ("max_projection", tl::Variant (), "max."), gsi::arg ("shielded", true), gsi::arg ("opposite_filter", db::NoOppositeFilter, "NoOppositeFilter"), gsi::arg ("rect_filter", db::NoSideAllowed, "NoSideAllowed"), gsi::arg ("negative", false),
"@brief Creates a node providing an inside (enclosure) check.\n"
) +
gsi::constructor ("new_perimeter_filter", &new_perimeter_filter, gsi::arg ("input"), gsi::arg ("inverse", false), gsi::arg ("pmin", 0), gsi::arg ("pmax", std::numeric_limits::perimeter_type>::max (), "max"),
diff --git a/src/drc/drc/built-in-macros/_drc_complex_ops.rb b/src/drc/drc/built-in-macros/_drc_complex_ops.rb
index 99ec74641..30eb64908 100644
--- a/src/drc/drc/built-in-macros/_drc_complex_ops.rb
+++ b/src/drc/drc/built-in-macros/_drc_complex_ops.rb
@@ -54,7 +54,6 @@ module DRC
# @li \global#length @/li
# @li \global#middle @/li
# @li \global#notch @/li
-# @li \global#odd_polygons @/li
# @li \global#outside @/li
# @li \global#overlap @/li
# @li \global#overlapping @/li
@@ -887,22 +886,6 @@ CODE
CODE
end
- # %DRC%
- # @name odd_polygons
- # @brief Selects all polygons which are non-orientable
- # @synopsis expression.odd_polygons
- #
- # Non-orientable polygons are for example "8"-shape polygons. Such polygons are
- # usually considered harmful as their definition of covered area is depending on the
- # wrap count rule in place.
- #
- # This operation can be used as a plain function in which case it acts on primary
- # shapes or can be used as method on another DRC expression.
-
- def odd_polygons
- return DRCOpNodeFilter::new(@engine, self, :new_strange_polygons_filter, "odd_polygon")
- end
-
# %DRC%
# @name rectangles
# @brief Selects all polygons which are rectangles
@@ -1874,7 +1857,7 @@ class DRCOpNodeCheck < DRCOpNodeWithCompare
factory = { :width => :new_width_check, :space => :new_space_check,
:notch => :new_notch_check, :separation => :new_separation_check,
:isolated => :new_isolated_check, :overlap => :new_overlap_check,
- :enclosing => :new_inside_check }[self.check]
+ :enclosing => :new_enclosing_check }[self.check]
oargs = []
if self.other
diff --git a/src/drc/drc/built-in-macros/_drc_cop_integration.rb b/src/drc/drc/built-in-macros/_drc_cop_integration.rb
index 9e3a3fe2f..c596e0cde 100644
--- a/src/drc/drc/built-in-macros/_drc_cop_integration.rb
+++ b/src/drc/drc/built-in-macros/_drc_cop_integration.rb
@@ -664,7 +664,7 @@ CODE
# @synopsis area (in condition)
# @synopsis area(layer)
#
- # This function can be used with a layer argument in which case it
+ # This function can be used with a layer argument. In this case it
# is equivalent to "layer.area" (see \Layer#area) and returns the total area of the
# polygons in the layer.
#
@@ -677,7 +677,7 @@ CODE
# @synopsis hulls
# @synopsis hulls(layer)
#
- # This function can be used with a layer argument in which case it
+ # This function can be used with a layer argument. In this case it
# is equivalent to "layer.hulls" (see \Layer#hulls). Without a layer
# argument, "hulls" represents a hull contour extractor for primary shapes in
# \DRC# expressions (see \Layer#drc and \DRC#hulls for more details).
@@ -688,29 +688,18 @@ CODE
# @synopsis holes
# @synopsis holes(layer)
#
- # This function can be used with a layer argument in which case it
+ # This function can be used with a layer argument. In this case it
# is equivalent to "layer.holes" (see \Layer#hulls). Without a layer
# argument, "holes" represents a hole extractor for primary shapes in
# \DRC# expressions (see \Layer#drc and \DRC#hulls for more details).
- # %DRC%
- # @name odd_polygons
- # @brief Selects all polygons which are non-orientable
- # @synopsis odd_polygons
- # @synopsis odd_polygons(layer)
- #
- # This function can be used with a layer argument in which case it
- # is equivalent to "layer.odd_polygons" (see \Layer#odd_polygons). Without a layer
- # argument, "odd_polygons" represents an odd polygon filter for primary shapes in
- # \DRC# expressions (see \Layer#drc and \DRC#odd_polygons for more details).
-
# %DRC%
# @name perimeter
# @brief Computes the total perimeter or in universal DRC context: selects the primary shape if the perimeter is meeting the condition
# @synopsis perimeter (in condition)
# @synopsis perimeter(layer)
#
- # This function can be used with a layer argument in which case it
+ # This function can be used with a layer argument. In this case it
# is equivalent to "layer.perimeter" (see \Layer#perimeter) and returns the
# total perimeter of all polygons in the layer.
#
@@ -723,7 +712,7 @@ CODE
# @synopsis rectangles
# @synopsis rectangles(layer)
#
- # This function can be used with a layer argument in which case it
+ # This function can be used with a layer argument. In this case it
# is equivalent to "layer.rectangles" (see \Layer#rectangles). Without a layer
# argument, "rectangles" represents the rectangles filter for primary shapes in
# \DRC# expressions (see \Layer#drc and \DRC#rectangles for more details).
@@ -734,7 +723,7 @@ CODE
# @synopsis squares
# @synopsis squares(layer)
#
- # This function can be used with a layer argument in which case it
+ # This function can be used with a layer argument. In this case it
# is equivalent to "layer.squares" (see \Layer#squares). Without a layer
# argument, "squares" represents the rectangles filter for primary shapes in
# \DRC# expressions (see \Layer#drc and \DRC#squares for more details).
@@ -745,7 +734,7 @@ CODE
# @synopsis rectilinear
# @synopsis rectilinear(layer)
#
- # This function can be used with a layer argument in which case it
+ # This function can be used with a layer argument. In this case it
# is equivalent to "layer.rectilinear" (see \Layer#rectilinear). Without a layer
# argument, "rectilinear" represents the rectilinear polygons filter for primary shapes in
# \DRC# expressions (see \Layer#drc and \DRC#rectilinear for more details).
@@ -756,7 +745,7 @@ CODE
# @synopsis length (in condition)
# @synopsis length(layer)
#
- # This function can be used with a layer argument in which case it
+ # This function can be used with a layer argument. In this case it
# is equivalent to "layer.length" (see \Layer#length). Without a layer
# argument, "length" represents the edge length filter on the primary shape edges in
# \DRC# expressions (see \Layer#drc and \DRC#length for more details). In this context,
@@ -777,7 +766,6 @@ CODE
holes
hulls
length
- odd_polygons
perimeter
rectangles
rectilinear
@@ -797,7 +785,7 @@ CODE
# @synopsis corners([ options ]) (in condition)
# @synopsis corners(layer [, options ])
#
- # This function can be used with a layer argument in which case it
+ # This function can be used with a layer argument. In this case it
# is equivalent to "layer.corners" (see \Layer#corners). Without a layer
# argument, "corners" represents the corner generator/filter in primary shapes for
# \DRC# expressions (see \Layer#drc and \DRC#corners for more details).
@@ -820,7 +808,7 @@ CODE
# @synopsis extent_refs([ options ])
# @synopsis extent_refs(layer, [ options ])
#
- # This function can be used with a layer argument in which case it
+ # This function can be used with a layer argument. In this case it
# is equivalent to "layer.extent_refs" (see \Layer#extent_refs). Without a layer
# argument, "extent_refs" represents the partial extents extractor on primary shapes within
# \DRC# expressions (see \Layer#drc and \DRC#extent_refs for more details).
@@ -831,7 +819,7 @@ CODE
# @synopsis extents([ enlargement ])
# @synopsis extents(layer, [ enlargement ])
#
- # This function can be used with a layer argument in which case it
+ # This function can be used with a layer argument. In this case it
# is equivalent to "layer.extents" (see \Layer#extents). Without a layer
# argument, "extents" represents the extents generator on primary shapes within
# \DRC# expressions (see \Layer#drc and \DRC#extents for more details).
@@ -842,7 +830,7 @@ CODE
# @synopsis middle([ options ])
# @synopsis middle(layer, [ options ])
#
- # This function can be used with a layer argument in which case it
+ # This function can be used with a layer argument. In this case it
# is equivalent to "layer.middle" (see \Layer#middle). Without a layer
# argument, "middle" represents the bounding box center marker generator on primary shapes within
# \DRC# expressions (see \Layer#drc and \DRC#middle for more details).
@@ -853,7 +841,7 @@ CODE
# @synopsis rounded_corners(inner, outer, n)
# @synopsis rounded_corners(layer, inner, outer, n)
#
- # This function can be used with a layer argument in which case it
+ # This function can be used with a layer argument. In this case it
# is equivalent to "layer.rounded_corners" (see \Layer#rounded_corners). Without a layer
# argument, "rounded_corners" represents the corner rounding algorithm on primary shapes within
# \DRC# expressions (see \Layer#drc and \DRC#rounded_corners for more details).
@@ -866,7 +854,7 @@ CODE
# @synopsis sized(layer, d [, mode])
# @synopsis sized(layer, dx, dy [, mode]))
#
- # This function can be used with a layer argument in which case it
+ # This function can be used with a layer argument. In this case it
# is equivalent to "layer.sized" (see \Layer#sized). Without a layer
# argument, "sized" represents the polygon sizer on primary shapes within
# \DRC# expressions (see \Layer#drc and \DRC#sized for more details).
@@ -877,7 +865,7 @@ CODE
# @synopsis smoothed(d)
# @synopsis smoothed(layer, d)
#
- # This function can be used with a layer argument in which case it
+ # This function can be used with a layer argument. In this case it
# is equivalent to "layer.smoothed" (see \Layer#smoothed). Without a layer
# argument, "smoothed" represents the polygon smoother on primary shapes within
# \DRC# expressions (see \Layer#drc and \DRC#smoothed for more details).
@@ -971,14 +959,39 @@ CODE
# @synopsis enclosing(other [, options ]) (in conditions)
# @synopsis enclosing(layer, other [, options ])
#
- # This function can be used with a layer argument in which case it
+ # This check verifies if the polygons of the input layer are enclosing the shapes
+ # of the other input layer by a certain distance.
+ # It has manifold options. See \Layer#width for the basic options such
+ # as metrics, projection and angle constraints etc. This check also features
+ # opposite and rectangle filtering. See \Layer#separation for details about opposite and
+ # rectangle error filtering.
+ #
+ # @h3 Classic mode @/h3
+ #
+ # This function can be used in classic mode with a layer argument. In this case it
# is equivalent to "layer.enclosing" (see \Layer#enclosing).
#
- # The version without the first layer is intended for use within \DRC# expressions
- # together with the \Layer#drc method. In this case, this function needs to be
+ # @code
+ # # classic "enclosing" check for < 0.2 um
+ # in = layer(1, 0)
+ # other = layer(2, 0)
+ # errors = enclosing(in, other, 0.2.um)
+ # @/code
+ #
+ # @h3 Universal DRC @/h3
+ #
+ # The version without a first layer is intended for use within \DRC# expressions
+ # together with the "universal DRC" method \Layer#drc. In this case, this function needs to be
# put into a condition to specify the check constraints. The other options
# of \Layer#enclosing (e.g. metrics, projection constraints, angle limits etc.)
- # apply to this version too.
+ # apply to this version too:
+ #
+ # @code
+ # # universal DRC "enclosing" check for < 0.2 um
+ # in = layer(1, 0)
+ # other = layer(2, 0)
+ # errors = in.drc(enclosing(other) < 0.2.um)
+ # @/code
#
# The conditions may involve an upper and lower limit. The following examples
# illustrate the use of this function with conditions:
@@ -1001,6 +1014,13 @@ CODE
# With a lower limit alone, these markers are formed by two, identical but opposite edges attached to
# the primary shape. Without an upper limit only, the first edge of the marker is attached to the
# primary shape while the second edge is attached to the shape of the "other" layer.
+ #
+ # @table
+ # @tr
+ # @td @img(/images/drc_enc1u.png) @/td
+ # @td @img(/images/drc_enc2u.png) @/td
+ # @/tr
+ # @/table
# %DRC%
# @name separation
@@ -1009,7 +1029,45 @@ CODE
# @synopsis separation(layer, other [, options ])
#
# Provides a separation check (primary layer vs. another layer). Like \enclosing this
- # function provides a two-layer check. See there for details how to use this function.
+ # function provides a two-layer check, but checking the distance rather than the
+ # overlap.
+ # This check has manifold options. See \Layer#width for the basic options such
+ # as metrics, projection and angle constraints etc. This check also features
+ # opposite and rectangle filtering. See \Layer#separation for details about opposite and
+ # rectangle error filtering.
+ #
+ # @h3 Classic mode @/h3
+ #
+ # Like \enclosing, this function is available as a classic DRC function with a layer as the first
+ # argument and as an \DRC expression operator for use with \Layer#drc.
+ #
+ # @code
+ # # classic "separation" check for distance < 0.2 um
+ # in = layer(1, 0)
+ # other = layer(2, 0)
+ # errors = separation(in, other, 0.2.um)
+ # @/code
+ #
+ # @h3 Universal DRC @/h3
+ #
+ # For use with the "universal DRC" put the separation expression into the "drc"
+ # function call and use a condition to specify the constraint:
+ #
+ # @code
+ # # universal DRC "separation" check for distance < 0.2 um
+ # in = layer(1, 0)
+ # other = layer(2, 0)
+ # errors = in.drc(separation(other) < 0.2.um)
+ # @/code
+ #
+ # \enclosing explains the constraints and how the
+ # work in generating error markers.
+ #
+ # @table
+ # @tr
+ # @td @img(/images/drc_separation1u.png) @/td
+ # @/tr
+ # @/table
# %DRC%
# @name overlap
@@ -1017,8 +1075,42 @@ CODE
# @synopsis overlap(other [, options ]) (in conditions)
# @synopsis overlap(layer, other [, options ])
#
- # Provides an overlap check (primary layer vs. another layer). Like \enclosing this
- # function provides a two-layer check. See there for details how to use this function.
+ # Provides an overlap check (primary layer vs. another layer).
+ # This check has manifold options. See \Layer#width for the basic options such
+ # as metrics, projection and angle constraints etc. This check also features
+ # opposite and rectangle filtering. See \Layer#separation for details about opposite and
+ # rectangle error filtering.
+ #
+ # @h3 Classic mode @/h3
+ #
+ # Like other checks, this function is available as a classic DRC function with a layer as the first
+ # argument and as an \DRC expression operator for use with \Layer#drc.
+ #
+ # @code
+ # # classic "overlap" check for < 0.2 um
+ # in = layer(1, 0)
+ # other = layer(2, 0)
+ # errors = overlap(in, other, 0.2.um)
+ # @/code
+ #
+ # @h3 Universal DRC @/h3
+ #
+ # For use with the "unversal DRC" put the separation expression into the "drc"
+ # function call and use a condition to specify the constraint:
+ #
+ # @code
+ # # universal DRC "overlap" check for < 0.2 um
+ # in = layer(1, 0)
+ # other = layer(2, 0)
+ # errors = in.drc(overlap(other) < 0.2.um)
+ # @/code
+ #
+ # @table
+ # @tr
+ # @td @img(/images/drc_overlap1u.png) @/td
+ # @td @img(/images/drc_overlap2u.png) @/td
+ # @/tr
+ # @/table
# %DRC%
# @name width
@@ -1026,26 +1118,44 @@ CODE
# @synopsis width([ options ]) (in conditions)
# @synopsis width(layer [, options ])
#
- # This function can be used with a layer argument in which case it
+ # A width check is a check for the distance of edges of the same polygon.
+ #
+ # @h3 Classic mode @/h3
+ #
+ # This function can be used in classic mode with a layer argument. In this case it
# is equivalent to "layer.width" (see \Layer#width).
#
+ # @code
+ # # classic "width" check for width < 2 um
+ # in = layer(1, 0)
+ # errors = width(in, 0.2.um)
+ # @/code
+ #
+ # @h3 Universal DRC @/h3
+ #
# The version without a layer is intended for use within \DRC# expressions
- # together with the \Layer#drc method. In this case, this function needs to be
+ # together with the "universal DRC" method \Layer#drc. In this case, this function needs to be
# put into a condition to specify the check constraints. The other options
# of \Layer#width (e.g. metrics, projection constraints, angle limits etc.)
- # apply to this version too.
+ # apply to this version too:
+ #
+ # @code
+ # # universal DRC check for width < 2 um
+ # in = layer(1, 0)
+ # errors = in.drc(width < 0.2.um)
+ # @/code
#
# The conditions may involve an upper and lower limit. The following examples
# illustrate the use of this function with conditions:
#
# @code
- # out = in.drc(width < 0.2.um)
- # out = in.drc(width <= 0.2.um)
- # out = in.drc(width > 0.2.um)
- # out = in.drc(width >= 0.2.um)
- # out = in.drc(width == 0.2.um)
- # out = in.drc(width != 0.2.um)
- # out = in.drc(0.1.um <= width < 0.2.um)
+ # errors = in.drc(width < 0.2.um)
+ # errors = in.drc(width <= 0.2.um)
+ # errors = in.drc(width > 0.2.um)
+ # errors = in.drc(width >= 0.2.um)
+ # errors = in.drc(width == 0.2.um)
+ # errors = in.drc(width != 0.2.um)
+ # errors = in.drc(0.1.um <= width < 0.2.um)
# @/code
#
# @table
@@ -1079,8 +1189,46 @@ CODE
# @synopsis space([ options ]) (in conditions)
# @synopsis space(layer [, options ])
#
- # Provides a space check on the primary layer. Like \width this
- # function provides a single-layer check. See there for details how to use this function.
+ # "space" looks for spacing violations between edges of the same polygon (intra-polygon checks)
+ # and between different polygons (inter-polygon checks).
+ # \notch is similar function that provides only intra-polygon space checks. \isolated
+ # is the version checking inter-polygon distance only.
+ # The check has manifold options. See \Layer#width for the basic options such
+ # as metrics, projection and angle constraints etc.
+ #
+ # @h3 Classic mode @/h3
+ #
+ # This function can be used in classic mode with a layer argument. In this case it
+ # is equivalent to "layer.space" (see \Layer#space). In this mode, "space" is applicable to edge
+ # layers too.
+ #
+ # @code
+ # # classic "space" check for space < 0.2 um
+ # in = layer(1, 0)
+ # errors = space(in, 0.2.um)
+ # @/code
+ #
+ # @h3 Universal DRC @/h3
+ #
+ # The version without a layer is intended for use within \DRC# expressions
+ # together with the "universal DRC" method \Layer#drc. In this case, this function needs to be
+ # put into a condition to specify the check constraints. The other options
+ # of \Layer#space (e.g. metrics, projection constraints, angle limits etc.)
+ # apply to this version too:
+ #
+ # @code
+ # # universal DRC check for space < 0.2.um
+ # in = layer(1, 0)
+ # errors = in.drc(space < 0.2.um)
+ # @/code
+ #
+ # See \enclosing for more details about the various ways to specify conditions.
+ #
+ # @table
+ # @tr
+ # @td @img(/images/drc_space1u.png) @/td
+ # @/tr
+ # @/table
# %DRC%
# @name notch
@@ -1088,8 +1236,91 @@ CODE
# @synopsis notch([ options ]) (in conditions)
# @synopsis notch(layer [, options ])
#
- # Provides a intra-polygon space check for polygons from the primary layer. Like \width this
- # function provides a single-layer check. See there for details how to use this function.
+ # Provides a intra-polygon space check for polygons. It is similar to
+ # \space, but checks intra-polygon space only.
+ # It has manifold options. See \Layer#width for the basic options such
+ # as metrics, projection and angle constraints etc.
+ #
+ # @h3 Classic mode @/h3
+ #
+ # This function can be used in classic mode with a layer argument. In this case it
+ # is equivalent to "layer.notch" (see \Layer#notch).
+ #
+ # @code
+ # # classic "notch" check for space < 1.2 um
+ # in = layer(1, 0)
+ # errors = notch(in, 1.2.um)
+ # @/code
+ #
+ # @h3 Universal DRC @/h3
+ #
+ # The version without a layer is intended for use within \DRC# expressions
+ # together with the "universal DRC" method \Layer#drc. In this case, this function needs to be
+ # put into a condition to specify the check constraints. The other options
+ # of \Layer#notch (e.g. metrics, projection constraints, angle limits etc.)
+ # apply to this version too:
+ #
+ # @code
+ # # universal DRC "notch" check for space < 1.2.um
+ # in = layer(1, 0)
+ # errors = in.drc(notch < 1.2.um)
+ # @/code
+ #
+ # See \enclosing for more details about the various ways to specify conditions.
+ #
+ # @table
+ # @tr
+ # @td @img(/images/drc_space2u.png) @/td
+ # @/tr
+ # @/table
+
+ # %DRC%
+ # @name isolated
+ # @brief Performs an isolation (inter-polygon space) check
+ # @synopsis isolated([ options ]) (in conditions)
+ # @synopsis iso([ options ]) (in conditions)
+ # @synopsis isolated(layer [, options ])
+ # @synopsis iso(layer [, options ])
+ #
+ # Provides a intra-polygon space check for polygons. It is similar to
+ # \space, but checks inter-polygon space only. "iso" is a synonym for "isolated".
+ # This check has manifold options. See \Layer#width for the basic options such
+ # as metrics, projection and angle constraints etc. This check also features
+ # opposite and rectangle filtering. See \Layer#separation for details about opposite and
+ # rectangle error filtering.
+ #
+ # @h3 Classic mode @/h3
+ #
+ # This function can be used in classic mode with a layer argument. In this case it
+ # is equivalent to "layer.isolated" (see \Layer#isolated).
+ #
+ # @code
+ # # classic "isolated" check for space < 1.2 um
+ # in = layer(1, 0)
+ # errors = isolated(in, 1.2.um)
+ # @/code
+ #
+ # @h3 Universal DRC @/h3
+ #
+ # The version without a layer is intended for use within \DRC# expressions
+ # together with the "universal DRC" method \Layer#drc. In this case, this function needs to be
+ # put into a condition to specify the check constraints. The other options
+ # of \Layer#isolated (e.g. metrics, projection constraints, angle limits etc.)
+ # apply to this version too:
+ #
+ # @code
+ # # universal DRC "isolated" check for space < 1.2.um
+ # in = layer(1, 0)
+ # errors = in.drc(isolated < 1.2.um)
+ # @/code
+ #
+ # See \enclosing for more details about the various ways to specify conditions.
+ #
+ # @table
+ # @tr
+ # @td @img(/images/drc_space3u.png) @/td
+ # @/tr
+ # @/table
%w(
enclosing
diff --git a/src/drc/drc/built-in-macros/_drc_layer.rb b/src/drc/drc/built-in-macros/_drc_layer.rb
index 6b083d325..d0e9e5d3e 100644
--- a/src/drc/drc/built-in-macros/_drc_layer.rb
+++ b/src/drc/drc/built-in-macros/_drc_layer.rb
@@ -2975,6 +2975,9 @@ CODE
# @brief A width check
# @synopsis layer.width(value [, options])
#
+ # @b Note: @/b "width" is available as an operator for the "universal DRC" function \Layer#drc within
+ # the \DRC framework. This variant has more options and is more intuitive to use. See \global#width for more details.
+ #
# This method performs a width check and returns a collection of edge pairs.
# A width check can be performed on polygon and edge layers. On edge layers, all
# edges are checked against all other edges. If two edges form a "back to back" relation
@@ -3050,7 +3053,7 @@ CODE
#
# There is an alternative notation for the check using the "universal DRC" function ("\Layer#drc").
# This notation is more intuitive and allows checking for widths bigger than a certain value
- # or within a certain range.
+ # or within a certain range. See "\global#width" for details.
#
# Apart from that it provides the same options than the plain width check.
# Follow this link for the documentation of this feature: \global#width.
@@ -3074,6 +3077,9 @@ CODE
# @brief A space check
# @synopsis layer.space(value [, options])
#
+ # @b Note: @/b "space" is available as an operator for the "universal DRC" function \Layer#drc within
+ # the \DRC framework. This variant has more options and is more intuitive to use. See \global#space for more details.
+ #
# This method performs a space check and returns a collection of edge pairs.
# A space check can be performed on polygon and edge layers. On edge layers, all
# edges are checked against all other edges. If two edges form a "face to face" relation
@@ -3094,6 +3100,8 @@ CODE
# Distance values can be given as floating-point values (in micron) or integer values (in
# database units). To explicitly specify the unit, use the unit denominators.
#
+ # For the manifold options of this function see the \width method description.
+ #
# The following image shows the effect of the space check:
#
# @table
@@ -3109,6 +3117,9 @@ CODE
# @synopsis layer.isolated(value [, options])
# @synopsis layer.iso(value [, options])
#
+ # @b Note: @/b "isolated" and "iso" are available as operators for the "universal DRC" function \Layer#drc within
+ # the \DRC framework. These variants have more options and are more intuitive to use. See \global#isolated for more details.
+ #
# See \space for a description of this method.
# In contrast to \space, this
# method is available for polygon layers only, since only on such layers
@@ -3129,6 +3140,9 @@ CODE
# @brief An intra-region spacing check
# @synopsis layer.notch(value [, options])
#
+ # @b Note: @/b "notch" is available as an operator for the "universal DRC" function \Layer#drc within
+ # the \DRC framework. This variant has more options and is more intuitive to use. See \global#notch for more details.
+ #
# See \space for a description of this method.
# In contrast to \space, this
# method is available for polygon layers only, since only on such layers
@@ -3149,6 +3163,10 @@ CODE
# @synopsis layer.separation(other_layer, value [, options])
# @synopsis layer.sep(other_layer, value [, options])
#
+ # @b Note: @/b "separation" and "sep" are available as operators for the "universal DRC" function \drc within
+ # the \DRC framework. These variants have more options and are more intuitive to use.
+ # See \global#separation for more details.
+ #
# This method performs a two-layer spacing check. Like \space, this method
# can be applied to edge or polygon layers. Locations where edges of the layer
# are closer than the specified distance to the other layer are reported
@@ -3160,8 +3178,7 @@ CODE
# layers touch are also reported. More specifically, the case of zero spacing
# will also trigger an error while for \space it will not.
#
- # As for the other DRC methods, merged semantics applies. The options available
- # are the same than for \width.
+ # As for the other DRC methods, merged semantics applies.
# Distance values can be given as floating-point values (in micron) or integer values (in
# database units). To explicitly specify the unit, use the unit denominators.
#
@@ -3173,6 +3190,8 @@ CODE
# @/tr
# @/table
#
+ # @h3 opposite and rectangle error filtering @/h3
+ #
# The options for the separation check are those available for the \width or \space
# method plus opposite and rectangle error filtering.
#
@@ -3244,6 +3263,10 @@ CODE
# @brief An overlap check
# @synopsis layer.overlap(other_layer, value [, options])
#
+ # @b Note: @/b "overlap" is available as an operator for the "universal DRC" function \drc within
+ # the \DRC framework. This variant has more options and is more intuitive to use.
+ # See \global#overlap for more details.
+ #
# This method checks whether layer and other_layer overlap by at least the
# given length. Locations, where this is not the case will be reported in form
# of edge pair error markers.
@@ -3283,6 +3306,10 @@ CODE
# @synopsis layer.enclosing(other_layer, value [, options])
# @synopsis layer.enc(other_layer, value [, options])
#
+ # @b Note: @/b "enclosing" and "enc" are available as operators for the "universal DRC" function \drc within
+ # the \DRC framework. These variants have more options and are more intuitive to use.
+ # See \global#enclosing for more details.
+ #
# This method checks whether layer encloses (is bigger than) other_layer by the
# given dimension. Locations, where this is not the case will be reported in form
# of edge pair error markers.
diff --git a/src/lay/lay/doc/about/drc_ref_global.xml b/src/lay/lay/doc/about/drc_ref_global.xml
index 56a9ebb8c..6400aa092 100644
--- a/src/lay/lay/doc/about/drc_ref_global.xml
+++ b/src/lay/lay/doc/about/drc_ref_global.xml
@@ -36,7 +36,7 @@ See Netter#antenna_check f
area(layer)
-This function can be used with a layer argument in which case it
+This function can be used with a layer argument. In this case it
is equivalent to "layer.area" (see Layer#area) and returns the total area of the
polygons in the layer.
@@ -339,7 +339,7 @@ See Netter#connect_implicit
corners(layer [, options ])
-This function can be used with a layer argument in which case it
+This function can be used with a layer argument. In this case it
is equivalent to "layer.corners" (see Layer#corners). Without a layer
argument, "corners" represents the corner generator/filter in primary shapes for
DRC expressions (see Layer#drc and DRC#corners for more details).
@@ -523,14 +523,39 @@ See Source#edges for a description
enclosing(layer, other [, options ])
-This function can be used with a layer argument in which case it
+This check verifies if the polygons of the input layer are enclosing the shapes
+of the other input layer by a certain distance.
+It has manifold options. See Layer#width for the basic options such
+as metrics, projection and angle constraints etc. This check also features
+opposite and rectangle filtering. See Layer#separation for details about opposite and
+rectangle error filtering.
+
+
Classic mode
+
+This function can be used in classic mode with a layer argument. In this case it
is equivalent to "layer.enclosing" (see Layer#enclosing).
-The version without the first layer is intended for use within DRC expressions
-together with the Layer#drc method. In this case, this function needs to be
+
+# classic "enclosing" check for < 0.2 um
+in = layer(1, 0)
+other = layer(2, 0)
+errors = enclosing(in, other, 0.2.um)
+
+
+
Universal DRC
+
+The version without a first layer is intended for use within DRC expressions
+together with the "universal DRC" method Layer#drc. In this case, this function needs to be
put into a condition to specify the check constraints. The other options
of Layer#enclosing (e.g. metrics, projection constraints, angle limits etc.)
-apply to this version too.
+apply to this version too:
+
+
+# universal DRC "enclosing" check for < 0.2 um
+in = layer(1, 0)
+other = layer(2, 0)
+errors = in.drc(enclosing(other) < 0.2.um)
+
The conditions may involve an upper and lower limit. The following examples
illustrate the use of this function with conditions:
@@ -553,6 +578,13 @@ primary shape where the condition is met.
With a lower limit alone, these markers are formed by two, identical but opposite edges attached to
the primary shape. Without an upper limit only, the first edge of the marker is attached to the
primary shape while the second edge is attached to the shape of the "other" layer.
+
+
+
+ |
+ |
+
+
"error" - Prints an error
@@ -580,7 +612,7 @@ See Source#extent for a descripti
extent_refs(layer, [ options ])
-This function can be used with a layer argument in which case it
+This function can be used with a layer argument. In this case it
is equivalent to "layer.extent_refs" (see Layer#extent_refs). Without a layer
argument, "extent_refs" represents the partial extents extractor on primary shapes within
DRC expressions (see Layer#drc and DRC#extent_refs for more details).
@@ -593,7 +625,7 @@ argument, "extent_refs" represents the partial extents extractor on primary shap
extents(layer, [ enlargement ])
-This function can be used with a layer argument in which case it
+This function can be used with a layer argument. In this case it
is equivalent to "layer.extents" (see Layer#extents). Without a layer
argument, "extents" represents the extents generator on primary shapes within
DRC expressions (see Layer#drc and DRC#extents for more details).
@@ -648,7 +680,7 @@ out = in.drc(primary & foreign.sized(0.5.um))
holes(layer)
-This function can be used with a layer argument in which case it
+This function can be used with a layer argument. In this case it
is equivalent to "layer.holes" (see Layer#hulls). Without a layer
argument, "holes" represents a hole extractor for primary shapes in
DRC expressions (see Layer#drc and DRC#hulls for more details).
@@ -661,7 +693,7 @@ argument, "holes" represents a hole extractor for primary shapes in
hulls(layer)
-This function can be used with a layer argument in which case it
+This function can be used with a layer argument. In this case it
is equivalent to "layer.hulls" (see Layer#hulls). Without a layer
argument, "hulls" represents a hull contour extractor for primary shapes in
DRC expressions (see Layer#drc and DRC#hulls for more details).
@@ -775,6 +807,56 @@ as method to an expression. See there for more details: isolated.
+"isolated" - Performs an isolation (inter-polygon space) check
+
+Usage:
+
+- isolated([ options ]) (in conditions)
+- iso([ options ]) (in conditions)
+- isolated(layer [, options ])
+- iso(layer [, options ])
+
+
+Provides a intra-polygon space check for polygons. It is similar to
+space, but checks inter-polygon space only. "iso" is a synonym for "isolated".
+This check has manifold options. See Layer#width for the basic options such
+as metrics, projection and angle constraints etc. This check also features
+opposite and rectangle filtering. See Layer#separation for details about opposite and
+rectangle error filtering.
+
+
Classic mode
+
+This function can be used in classic mode with a layer argument. In this case it
+is equivalent to "layer.isolated" (see Layer#isolated).
+
+
+# classic "isolated" check for space < 1.2 um
+in = layer(1, 0)
+errors = isolated(in, 1.2.um)
+
+
+
Universal DRC
+
+The version without a layer is intended for use within DRC expressions
+together with the "universal DRC" method Layer#drc. In this case, this function needs to be
+put into a condition to specify the check constraints. The other options
+of Layer#isolated (e.g. metrics, projection constraints, angle limits etc.)
+apply to this version too:
+
+
+# universal DRC "isolated" check for space < 1.2.um
+in = layer(1, 0)
+errors = in.drc(isolated < 1.2.um)
+
+
+See enclosing for more details about the various ways to specify conditions.
+
+
+
+ |
+
+
+
"l2n_data" - Gets the internal LayoutToNetlist object for the default Netter
Usage:
@@ -847,7 +929,7 @@ For further methods on the source object see Source.
length(layer)
-This function can be used with a layer argument in which case it
+This function can be used with a layer argument. In this case it
is equivalent to "layer.length" (see Layer#length). Without a layer
argument, "length" represents the edge length filter on the primary shape edges in
DRC expressions (see Layer#drc and DRC#length for more details). In this context,
@@ -934,7 +1016,7 @@ See also max_area_ratio for the other option affec
middle(layer, [ options ])
-This function can be used with a layer argument in which case it
+This function can be used with a layer argument. In this case it
is equivalent to "layer.middle" (see Layer#middle). Without a layer
argument, "middle" represents the bounding box center marker generator on primary shapes within
DRC expressions (see Layer#drc and DRC#middle for more details).
@@ -998,8 +1080,43 @@ Resets the tile borders - see tile_borders for a des
notch(layer [, options ])
-Provides a intra-polygon space check for polygons from the primary layer. Like width this
-function provides a single-layer check. See there for details how to use this function.
+Provides a intra-polygon space check for polygons. It is similar to
+space, but checks intra-polygon space only.
+It has manifold options. See Layer#width for the basic options such
+as metrics, projection and angle constraints etc.
+
+
Classic mode
+
+This function can be used in classic mode with a layer argument. In this case it
+is equivalent to "layer.notch" (see Layer#notch).
+
+
+# classic "notch" check for space < 1.2 um
+in = layer(1, 0)
+errors = notch(in, 1.2.um)
+
+
+
Universal DRC
+
+The version without a layer is intended for use within DRC expressions
+together with the "universal DRC" method Layer#drc. In this case, this function needs to be
+put into a condition to specify the check constraints. The other options
+of Layer#notch (e.g. metrics, projection constraints, angle limits etc.)
+apply to this version too:
+
+
+# universal DRC "notch" check for space < 1.2.um
+in = layer(1, 0)
+errors = in.drc(notch < 1.2.um)
+
+
+See enclosing for more details about the various ways to specify conditions.
+
+
+
+ |
+
+
"odd_polygons" - Selects all polygons which are non-orientable
@@ -1009,7 +1126,7 @@ function provides a single-layer check. See there for details how to use this fu
odd_polygons(layer)
-This function can be used with a layer argument in which case it
+This function can be used with a layer argument. In this case it
is equivalent to "layer.odd_polygons" (see Layer#odd_polygons). Without a layer
argument, "odd_polygons" represents an odd polygon filter for primary shapes in
DRC expressions (see Layer#drc and DRC#odd_polygons for more details).
@@ -1054,8 +1171,42 @@ as method to an expression. See there for more details: enclosing this
-function provides a two-layer check. See there for details how to use this function.
+Provides an overlap check (primary layer vs. another layer).
+This check has manifold options. See Layer#width for the basic options such
+as metrics, projection and angle constraints etc. This check also features
+opposite and rectangle filtering. See Layer#separation for details about opposite and
+rectangle error filtering.
+
+
Classic mode
+
+Like other checks, this function is available as a classic DRC function with a layer as the first
+argument and as an DRC expression operator for use with Layer#drc.
+
+
+# classic "overlap" check for < 0.2 um
+in = layer(1, 0)
+other = layer(2, 0)
+errors = overlap(in, other, 0.2.um)
+
+
+
Universal DRC
+
+For use with the "unversal DRC" put the separation expression into the "drc"
+function call and use a condition to specify the constraint:
+
+
+# universal DRC "overlap" check for < 0.2 um
+in = layer(1, 0)
+other = layer(2, 0)
+errors = in.drc(overlap(other) < 0.2.um)
+
+
+
+
+ |
+ |
+
+
"overlapping" - Selects shapes overlapping with other shapes
@@ -1103,7 +1254,7 @@ This function creates a path object. The arguments are the same than for the
perimeter(layer)
-This function can be used with a layer argument in which case it
+This function can be used with a layer argument. In this case it
is equivalent to "layer.perimeter" (see Layer#perimeter) and returns the
total perimeter of all polygons in the layer.
@@ -1159,7 +1310,7 @@ is called on.
rectangles(layer)
-This function can be used with a layer argument in which case it
+This function can be used with a layer argument. In this case it
is equivalent to "layer.rectangles" (see Layer#rectangles). Without a layer
argument, "rectangles" represents the rectangles filter for primary shapes in
DRC expressions (see Layer#drc and DRC#rectangles for more details).
@@ -1172,7 +1323,7 @@ argument, "rectangles" represents the rectangles filter for primary shapes in
rectilinear(layer)
-This function can be used with a layer argument in which case it
+This function can be used with a layer argument. In this case it
is equivalent to "layer.rectilinear" (see Layer#rectilinear). Without a layer
argument, "rectilinear" represents the rectilinear polygons filter for primary shapes in
DRC expressions (see Layer#drc and DRC#rectilinear for more details).
@@ -1263,7 +1414,7 @@ about this extractor.
rounded_corners(layer, inner, outer, n)
-This function can be used with a layer argument in which case it
+This function can be used with a layer argument. In this case it
is equivalent to "layer.rounded_corners" (see Layer#rounded_corners). Without a layer
argument, "rounded_corners" represents the corner rounding algorithm on primary shapes within
DRC expressions (see Layer#drc and DRC#rounded_corners for more details).
@@ -1312,7 +1463,45 @@ See Source#select for a descripti
Provides a separation check (primary layer vs. another layer). Like enclosing this
-function provides a two-layer check. See there for details how to use this function.
+function provides a two-layer check, but checking the distance rather than the
+overlap.
+This check has manifold options. See Layer#width for the basic options such
+as metrics, projection and angle constraints etc. This check also features
+opposite and rectangle filtering. See Layer#separation for details about opposite and
+rectangle error filtering.
+
+
Classic mode
+
+Like enclosing, this function is available as a classic DRC function with a layer as the first
+argument and as an DRC expression operator for use with Layer#drc.
+
+
+# classic "separation" check for distance < 0.2 um
+in = layer(1, 0)
+other = layer(2, 0)
+errors = separation(in, other, 0.2.um)
+
+
+
Universal DRC
+
+For use with the "universal DRC" put the separation expression into the "drc"
+function call and use a condition to specify the constraint:
+
+
+# universal DRC "separation" check for distance < 0.2 um
+in = layer(1, 0)
+other = layer(2, 0)
+errors = in.drc(separation(other) < 0.2.um)
+
+
+enclosing explains the constraints and how the
+work in generating error markers.
+
+
+
+ |
+
+
"silent" - Resets verbose mode
@@ -1333,7 +1522,7 @@ This function is equivalent to "verbose(false)" (see verbose<
sized(layer, dx, dy [, mode]))
-This function can be used with a layer argument in which case it
+This function can be used with a layer argument. In this case it
is equivalent to "layer.sized" (see Layer#sized). Without a layer
argument, "sized" represents the polygon sizer on primary shapes within
DRC expressions (see Layer#drc and DRC#sized for more details).
@@ -1346,7 +1535,7 @@ argument, "sized" represents the polygon sizer on primary shapes within
smoothed(layer, d)
-This function can be used with a layer argument in which case it
+This function can be used with a layer argument. In this case it
is equivalent to "layer.smoothed" (see Layer#smoothed). Without a layer
argument, "smoothed" represents the polygon smoother on primary shapes within
DRC expressions (see Layer#drc and DRC#smoothed for more details).
@@ -1396,8 +1585,46 @@ For further methods on the source object see Source.
space(layer [, options ])
-Provides a space check on the primary layer. Like width this
-function provides a single-layer check. See there for details how to use this function.
+"space" looks for spacing violations between edges of the same polygon (intra-polygon checks)
+and between different polygons (inter-polygon checks).
+notch is similar function that provides only intra-polygon space checks. isolated
+is the version checking inter-polygon distance only.
+The check has manifold options. See Layer#width for the basic options such
+as metrics, projection and angle constraints etc.
+
+
Classic mode
+
+This function can be used in classic mode with a layer argument. In this case it
+is equivalent to "layer.space" (see Layer#space). In this mode, "space" is applicable to edge
+layers too.
+
+
+# classic "space" check for space < 0.2 um
+in = layer(1, 0)
+errors = space(in, 0.2.um)
+
+
+
Universal DRC
+
+The version without a layer is intended for use within DRC expressions
+together with the "universal DRC" method Layer#drc. In this case, this function needs to be
+put into a condition to specify the check constraints. The other options
+of Layer#space (e.g. metrics, projection constraints, angle limits etc.)
+apply to this version too:
+
+
+# universal DRC check for space < 0.2.um
+in = layer(1, 0)
+errors = in.drc(space < 0.2.um)
+
+
+See enclosing for more details about the various ways to specify conditions.
+
+
+
+ |
+
+
"squares" - Selects all polygons which are squares
@@ -1407,7 +1634,7 @@ function provides a single-layer check. See there for details how to use this fu
squares(layer)
-This function can be used with a layer argument in which case it
+This function can be used with a layer argument. In this case it
is equivalent to "layer.squares" (see Layer#squares). Without a layer
argument, "squares" represents the rectangles filter for primary shapes in
DRC expressions (see Layer#drc and DRC#squares for more details).
@@ -1569,26 +1796,44 @@ In verbose mode, more output is generated in the log file
width(layer [, options ])
-This function can be used with a layer argument in which case it
+A width check is a check for the distance of edges of the same polygon.
+
+
Classic mode
+
+This function can be used in classic mode with a layer argument. In this case it
is equivalent to "layer.width" (see Layer#width).
+
+# classic "width" check for width < 2 um
+in = layer(1, 0)
+errors = width(in, 0.2.um)
+
+
+
Universal DRC
+
The version without a layer is intended for use within DRC expressions
-together with the Layer#drc method. In this case, this function needs to be
+together with the "universal DRC" method Layer#drc. In this case, this function needs to be
put into a condition to specify the check constraints. The other options
of Layer#width (e.g. metrics, projection constraints, angle limits etc.)
-apply to this version too.
+apply to this version too:
+
+
+# universal DRC check for width < 2 um
+in = layer(1, 0)
+errors = in.drc(width < 0.2.um)
+
The conditions may involve an upper and lower limit. The following examples
illustrate the use of this function with conditions:
-out = in.drc(width < 0.2.um)
-out = in.drc(width <= 0.2.um)
-out = in.drc(width > 0.2.um)
-out = in.drc(width >= 0.2.um)
-out = in.drc(width == 0.2.um)
-out = in.drc(width != 0.2.um)
-out = in.drc(0.1.um <= width < 0.2.um)
+errors = in.drc(width < 0.2.um)
+errors = in.drc(width <= 0.2.um)
+errors = in.drc(width > 0.2.um)
+errors = in.drc(width >= 0.2.um)
+errors = in.drc(width == 0.2.um)
+errors = in.drc(width != 0.2.um)
+errors = in.drc(0.1.um <= width < 0.2.um)
diff --git a/src/lay/lay/doc/about/drc_ref_layer.xml b/src/lay/lay/doc/about/drc_ref_layer.xml
index 16206d347..c15dd08b9 100644
--- a/src/lay/lay/doc/about/drc_ref_layer.xml
+++ b/src/lay/lay/doc/about/drc_ref_layer.xml
@@ -769,6 +769,10 @@ See enclosing for a description of that method
layer.enc(other_layer, value [, options])
+Note: "enclosing" and "enc" are available as operators for the "universal DRC" function drc within
+the DRC framework. These variants have more options and are more intuitive to use.
+See enclosing for more details.
+
This method checks whether layer encloses (is bigger than) other_layer by the
given dimension. Locations, where this is not the case will be reported in form
of edge pair error markers.
@@ -1332,6 +1336,9 @@ See isolated for a description of that method
layer.iso(value [, options])
+Note: "isolated" and "iso" are available as operators for the "universal DRC" function Layer#drc within
+the DRC framework. These variants have more options and are more intuitive to use. See isolated for more details.
+
See space for a description of this method.
In contrast to space, this
method is available for polygon layers only, since only on such layers
@@ -1735,6 +1742,9 @@ is select_not_overlapping.
layer.notch(value [, options])
+Note: "notch" is available as an operator for the "universal DRC" function Layer#drc within
+the DRC framework. This variant has more options and is more intuitive to use. See notch for more details.
+
See space for a description of this method.
In contrast to space, this
method is available for polygon layers only, since only on such layers
@@ -1870,6 +1880,10 @@ This method is available for edge layers. The argument must be a polygon layer.
layer.overlap(other_layer, value [, options])
+Note: "overlap" is available as an operator for the "universal DRC" function drc within
+the DRC framework. This variant has more options and is more intuitive to use.
+See overlap for more details.
+
This method checks whether layer and other_layer overlap by at least the
given length. Locations, where this is not the case will be reported in form
of edge pair error markers.
@@ -2392,6 +2406,10 @@ See separation for a description of that method
layer.sep(other_layer, value [, options])
+Note: "separation" and "sep" are available as operators for the "universal DRC" function drc within
+the DRC framework. These variants have more options and are more intuitive to use.
+See separation for more details.
+
This method performs a two-layer spacing check. Like space, this method
can be applied to edge or polygon layers. Locations where edges of the layer
are closer than the specified distance to the other layer are reported
@@ -2403,8 +2421,7 @@ In contrast to the space and related methods, locations whe
layers touch are also reported. More specifically, the case of zero spacing
will also trigger an error while for space it will not.
-As for the other DRC methods, merged semantics applies. The options available
-are the same than for width.
+As for the other DRC methods, merged semantics applies.
Distance values can be given as floating-point values (in micron) or integer values (in
database units). To explicitly specify the unit, use the unit denominators.
@@ -2416,6 +2433,8 @@ The following image shows the effect of the separation check (input1: red, input
+
opposite and rectangle error filtering
+
The options for the separation check are those available for the width or space
method plus opposite and rectangle error filtering.
@@ -2600,6 +2619,9 @@ not modify the layer but returns a snapped copy.
layer.space(value [, options])
+Note: "space" is available as an operator for the "universal DRC" function Layer#drc within
+the DRC framework. This variant has more options and is more intuitive to use. See space for more details.
+
This method performs a space check and returns a collection of edge pairs.
A space check can be performed on polygon and edge layers. On edge layers, all
edges are checked against all other edges. If two edges form a "face to face" relation
@@ -2620,6 +2642,8 @@ Like for the width method, merged semantics applies.
Distance values can be given as floating-point values (in micron) or integer values (in
database units). To explicitly specify the unit, use the unit denominators.
+For the manifold options of this function see the width method description.
+
The following image shows the effect of the space check:
@@ -2796,6 +2820,9 @@ The following image shows the effect of the "moved" method:
layer.width(value [, options])
+Note: "width" is available as an operator for the "universal DRC" function Layer#drc within
+the DRC framework. This variant has more options and is more intuitive to use. See width for more details.
+
This method performs a width check and returns a collection of edge pairs.
A width check can be performed on polygon and edge layers. On edge layers, all
edges are checked against all other edges. If two edges form a "back to back" relation
@@ -2871,7 +2898,7 @@ The following images show the effect of various forms of the width check:
There is an alternative notation for the check using the "universal DRC" function ("Layer#drc").
This notation is more intuitive and allows checking for widths bigger than a certain value
-or within a certain range.
+or within a certain range. See "width" for details.
Apart from that it provides the same options than the plain width check.
Follow this link for the documentation of this feature: width.
diff --git a/src/lay/lay/doc/images/drc_enc1u.png b/src/lay/lay/doc/images/drc_enc1u.png
new file mode 100644
index 000000000..5d6e58bb9
Binary files /dev/null and b/src/lay/lay/doc/images/drc_enc1u.png differ
diff --git a/src/lay/lay/doc/images/drc_enc2u.png b/src/lay/lay/doc/images/drc_enc2u.png
new file mode 100644
index 000000000..8a56c4e66
Binary files /dev/null and b/src/lay/lay/doc/images/drc_enc2u.png differ
diff --git a/src/lay/lay/doc/images/drc_overlap1u.png b/src/lay/lay/doc/images/drc_overlap1u.png
new file mode 100644
index 000000000..72401d229
Binary files /dev/null and b/src/lay/lay/doc/images/drc_overlap1u.png differ
diff --git a/src/lay/lay/doc/images/drc_overlap2u.png b/src/lay/lay/doc/images/drc_overlap2u.png
new file mode 100644
index 000000000..6b4666f18
Binary files /dev/null and b/src/lay/lay/doc/images/drc_overlap2u.png differ
diff --git a/src/lay/lay/doc/images/drc_separation1u.png b/src/lay/lay/doc/images/drc_separation1u.png
new file mode 100644
index 000000000..c3bbe1416
Binary files /dev/null and b/src/lay/lay/doc/images/drc_separation1u.png differ
diff --git a/src/lay/lay/doc/images/drc_space1u.png b/src/lay/lay/doc/images/drc_space1u.png
new file mode 100644
index 000000000..c3fc2f8a1
Binary files /dev/null and b/src/lay/lay/doc/images/drc_space1u.png differ
diff --git a/src/lay/lay/doc/images/drc_space2u.png b/src/lay/lay/doc/images/drc_space2u.png
new file mode 100644
index 000000000..0f3303314
Binary files /dev/null and b/src/lay/lay/doc/images/drc_space2u.png differ
diff --git a/src/lay/lay/doc/images/drc_space3u.png b/src/lay/lay/doc/images/drc_space3u.png
new file mode 100644
index 000000000..2d304de7c
Binary files /dev/null and b/src/lay/lay/doc/images/drc_space3u.png differ
diff --git a/src/lay/lay/layDRCLVSHelpResources.qrc b/src/lay/lay/layDRCLVSHelpResources.qrc
index 0166f4b13..cdc914da3 100644
--- a/src/lay/lay/layDRCLVSHelpResources.qrc
+++ b/src/lay/lay/layDRCLVSHelpResources.qrc
@@ -13,7 +13,11 @@
doc/images/drc_space1.png
doc/images/drc_space2.png
doc/images/drc_space3.png
+ doc/images/drc_space1u.png
+ doc/images/drc_space2u.png
+ doc/images/drc_space3u.png
doc/images/drc_separation1.png
+ doc/images/drc_separation1u.png
doc/images/drc_separation2.png
doc/images/drc_separation3.png
doc/images/drc_separation4.png
@@ -29,8 +33,12 @@
doc/images/drc_raw3.png
doc/images/drc_enc1.png
doc/images/drc_enc2.png
+ doc/images/drc_enc1u.png
+ doc/images/drc_enc2u.png
doc/images/drc_overlap1.png
doc/images/drc_overlap2.png
+ doc/images/drc_overlap1u.png
+ doc/images/drc_overlap2u.png
doc/images/drc_start_segments1.png
doc/images/drc_start_segments2.png
doc/images/drc_end_segments1.png
diff --git a/testdata/drc/drcGenericTests_11.drc b/testdata/drc/drcGenericTests_11.drc
index 89c21c24c..cbf2c9380 100644
--- a/testdata/drc/drcGenericTests_11.drc
+++ b/testdata/drc/drcGenericTests_11.drc
@@ -35,6 +35,5 @@ l1.output(1, 0)
l1.odd_polygons.output(10, 0)
l1.drc(smoothed(0.5)).output(100, 0)
-l1.drc(odd_polygons).output(101, 0)
l1.drc(rounded_corners(1.0, 0.5, 8)).output(102, 0)
diff --git a/testdata/drc/drcGenericTests_11.gds b/testdata/drc/drcGenericTests_11.gds
index b4f292e1a..1f455ce41 100644
Binary files a/testdata/drc/drcGenericTests_11.gds and b/testdata/drc/drcGenericTests_11.gds differ
diff --git a/testdata/drc/drcGenericTests_2.drc b/testdata/drc/drcGenericTests_2.drc
index 17a9de05d..5a241e6cf 100644
--- a/testdata/drc/drcGenericTests_2.drc
+++ b/testdata/drc/drcGenericTests_2.drc
@@ -42,5 +42,5 @@ l1.drc(isolated(projection, not_opposite) < 1.0).output(144, 0)
# enclosing, overlap
l2.drc(enclosing(l1, projection) < 1.0).polygons.output(150, 0)
-l1.drc(overlap(l2, projection) < 1.0).polygons.output(151, 0)
+l1.drc(overlap(l2, projection) < 2.0).polygons.output(151, 0)
diff --git a/testdata/drc/drcGenericTests_au11.gds b/testdata/drc/drcGenericTests_au11.gds
index 557e81b97..482416dbb 100644
Binary files a/testdata/drc/drcGenericTests_au11.gds and b/testdata/drc/drcGenericTests_au11.gds differ
diff --git a/testdata/drc/drcGenericTests_au2.gds b/testdata/drc/drcGenericTests_au2.gds
index b36a5980f..0cd389b25 100644
Binary files a/testdata/drc/drcGenericTests_au2.gds and b/testdata/drc/drcGenericTests_au2.gds differ
diff --git a/testdata/drc/drcGenericTests_au2d.gds b/testdata/drc/drcGenericTests_au2d.gds
index 43961a211..3fb8e4e50 100644
Binary files a/testdata/drc/drcGenericTests_au2d.gds and b/testdata/drc/drcGenericTests_au2d.gds differ
diff --git a/testdata/drc/drcGenericTests_au4.gds b/testdata/drc/drcGenericTests_au4.gds
index d6ff8a437..5096a465d 100644
Binary files a/testdata/drc/drcGenericTests_au4.gds and b/testdata/drc/drcGenericTests_au4.gds differ
diff --git a/testdata/drc/drcGenericTests_au4d.gds b/testdata/drc/drcGenericTests_au4d.gds
index 96a5d5aaf..e5149aed9 100644
Binary files a/testdata/drc/drcGenericTests_au4d.gds and b/testdata/drc/drcGenericTests_au4d.gds differ