diff --git a/scripts/create_drc_samples.rb b/scripts/create_drc_samples.rb index fbf37b8b5..196c6bf19 100644 --- a/scripts/create_drc_samples.rb +++ b/scripts/create_drc_samples.rb @@ -435,6 +435,37 @@ run_demo gen, "input1.edges.not(input2)", "drc_not3.png" run_demo gen, "input1.edges.inside_part(input2)", "drc_inside_part.png" run_demo gen, "input1.edges.outside_part(input2)", "drc_outside_part.png" +class Gen + def produce(s1, s2) + s1.insert(RBA::Box::new(0, 5000, 2000, 7000)) + s1.insert(RBA::Box::new(4000, 5000, 6000, 7000)) + s1.insert(RBA::Box::new(0, 0, 2000, 2000)) + s1.insert(RBA::Box::new(4000, 0, 6000, 2000)) + s2.insert(RBA::Box::new(2000, 6000, 4000, 7000)) + s2.insert(RBA::Box::new(4500, 5500, 5500, 6500)) + s2.insert(RBA::Box::new(5000, 4000, 6000, 5000)) + s2.insert(RBA::Polygon::new( + [ RBA::Point::new(2000, 0), RBA::Point::new(2000, 3000), + RBA::Point::new(1000, 3000), RBA::Point::new(1000, 2000), + RBA::Point::new(0, 2000), RBA::Point::new(0, 5000), + RBA::Point::new(1000, 5000), RBA::Point::new(1000, 4000), + RBA::Point::new(3000, 4000), RBA::Point::new(3000, 0) ] + )) + end +end + +gen = Gen::new + +run_demo gen, "input1.interacting(input2, 1)", "drc_interacting2.png" +run_demo gen, "input1.interacting(input2, 1, 1)", "drc_interacting3.png" +run_demo gen, "input1.interacting(input2, 2..)", "drc_interacting4.png" +run_demo gen, "input1.interacting(input2, 1..2)", "drc_interacting5.png" + +run_demo gen, "input1.not_interacting(input2, 1)", "drc_not_interacting2.png" +run_demo gen, "input1.not_interacting(input2, 1, 1)", "drc_not_interacting3.png" +run_demo gen, "input1.not_interacting(input2, 2..)", "drc_not_interacting4.png" +run_demo gen, "input1.not_interacting(input2, 1..2)", "drc_not_interacting5.png" + class Gen def produce(s1, s2) s1.insert(RBA::Box::new(0, 1000, 2000, 3000)) diff --git a/src/drc/drc/built-in-macros/_drc_layer.rb b/src/drc/drc/built-in-macros/_drc_layer.rb index b5a7e2269..4fd5e452a 100644 --- a/src/drc/drc/built-in-macros/_drc_layer.rb +++ b/src/drc/drc/built-in-macros/_drc_layer.rb @@ -1702,6 +1702,11 @@ CODE # @table # @tr # @td @img(/images/drc_interacting2.png) @/td + # @td @img(/images/drc_interacting3.png) @/td + # @/tr + # @tr + # @td @img(/images/drc_interacting4.png) @/td + # @td @img(/images/drc_interacting5.png) @/td # @/tr # @/table @@ -1738,6 +1743,11 @@ CODE # @table # @tr # @td @img(/images/drc_not_interacting2.png) @/td + # @td @img(/images/drc_not_interacting3.png) @/td + # @/tr + # @tr + # @td @img(/images/drc_not_interacting4.png) @/td + # @td @img(/images/drc_not_interacting5.png) @/td # @/tr # @/table diff --git a/src/lay/lay/doc/about/drc_ref_layer.xml b/src/lay/lay/doc/about/drc_ref_layer.xml index 96e0a164f..192e50857 100644 --- a/src/lay/lay/doc/about/drc_ref_layer.xml +++ b/src/lay/lay/doc/about/drc_ref_layer.xml @@ -795,6 +795,9 @@ This method is available for edge layers. The argument must be a polygon layer.
Usage:
This method selects all shapes or regions from self which touch or overlap shapes from the other @@ -814,6 +817,22 @@ The following image shows the effect of the "interacting" method (input1: red, i

+If a single count is given, shapes from self are selected only if they do interact at least with the given +number of (different) shapes from the other layer. If a min and max count is given, shapes from +self are selected only if they interact with min_count or more, but a maximum of max_count different shapes +from the other layer. Two polygons overlapping or touching at two locations are counted as single interactions. +
+
![]() |
+![]() |
+
![]() |
+![]() |
+
Usage:
This method selects all shapes or regions from self which do not touch or overlap shapes from the other @@ -1188,6 +1210,22 @@ The following image shows the effect of the "not_interacting" method (input1: re

+If a single count is given, shapes from self are selected only if they interact with less than the given +number of (different) shapes from the other layer. If a min and max count is given, shapes from +self are selected only if they interact with less than min_count or more than max_count different shapes +from the other layer. Two polygons overlapping or touching at two locations are counted as single interactions. +
+
![]() |
+![]() |
+
![]() |
+![]() |
+
Usage:
This method selects all shapes or regions from self which touch or overlap shapes from the other -region. Unless self is in raw mode (see raw), coherent regions are selected from self, +layer. Unless self is in raw mode (see raw), coherent regions are selected from self, otherwise individual shapes are selected. It modifies self to contain the selected shapes. A version which does not modify self is interacting. @@ -1711,6 +1752,11 @@ is interacting. This method is available for polygon, text and edge layers. Edges can be selected with respect to other edges or polygons. Texts can be selected with respect to polygons. Polygons can be selected with respect to edges, texts and other polygons. +
+If a single count is given, shapes from self are selected only if they do interact at least with the given +number of (different) shapes from the other layer. If a min and max count is given, shapes from +self are selected only if they interact with min_count or more, but a maximum of max_count different shapes +from the other layer. Two polygons overlapping or touching at two locations are counted as single interactions.
Usage:
This method selects all shapes or regions from self which do not touch or overlap shapes from the other -region. Unless self is in raw mode (see raw), coherent regions are selected from self, +layer. Unless self is in raw mode (see raw), coherent regions are selected from self, otherwise individual shapes are selected. It modifies self to contain the selected shapes. A version which does not modify self is not_interacting. @@ -1745,6 +1794,11 @@ is not_interacting. This method is available for polygon, text and edge layers. Edges can be selected with respect to other edges or polygons. Texts can be selected with respect to polygons. Polygons can be selected with respect to edges, texts and other polygons. +
+If a single count is given, shapes from self are selected only if they interact with less than the given +number of (different) shapes from the other layer. If a min and max count is given, shapes from +self are selected only if they interact with less than min_count or more than max_count different shapes +from the other layer. Two polygons overlapping or touching at two locations are counted as single interactions.
Shielding is enabled by default, but can be switched off with the "transparent" option.
diff --git a/src/lay/lay/doc/images/drc_interacting2.png b/src/lay/lay/doc/images/drc_interacting2.png new file mode 100644 index 000000000..c924a17d1 Binary files /dev/null and b/src/lay/lay/doc/images/drc_interacting2.png differ diff --git a/src/lay/lay/doc/images/drc_interacting3.png b/src/lay/lay/doc/images/drc_interacting3.png new file mode 100644 index 000000000..1ca5f6703 Binary files /dev/null and b/src/lay/lay/doc/images/drc_interacting3.png differ diff --git a/src/lay/lay/doc/images/drc_interacting4.png b/src/lay/lay/doc/images/drc_interacting4.png new file mode 100644 index 000000000..4eff34e8d Binary files /dev/null and b/src/lay/lay/doc/images/drc_interacting4.png differ diff --git a/src/lay/lay/doc/images/drc_interacting5.png b/src/lay/lay/doc/images/drc_interacting5.png new file mode 100644 index 000000000..63aa03f67 Binary files /dev/null and b/src/lay/lay/doc/images/drc_interacting5.png differ diff --git a/src/lay/lay/doc/images/drc_not_interacting2.png b/src/lay/lay/doc/images/drc_not_interacting2.png new file mode 100644 index 000000000..cb6ec6d38 Binary files /dev/null and b/src/lay/lay/doc/images/drc_not_interacting2.png differ diff --git a/src/lay/lay/doc/images/drc_not_interacting3.png b/src/lay/lay/doc/images/drc_not_interacting3.png new file mode 100644 index 000000000..069e09508 Binary files /dev/null and b/src/lay/lay/doc/images/drc_not_interacting3.png differ diff --git a/src/lay/lay/doc/images/drc_not_interacting4.png b/src/lay/lay/doc/images/drc_not_interacting4.png new file mode 100644 index 000000000..d78b0219e Binary files /dev/null and b/src/lay/lay/doc/images/drc_not_interacting4.png differ diff --git a/src/lay/lay/doc/images/drc_not_interacting5.png b/src/lay/lay/doc/images/drc_not_interacting5.png new file mode 100644 index 000000000..ee77c5bdd Binary files /dev/null and b/src/lay/lay/doc/images/drc_not_interacting5.png differ diff --git a/src/lay/lay/layDRCLVSHelpResources.qrc b/src/lay/lay/layDRCLVSHelpResources.qrc index e6f2f319e..41787d419 100644 --- a/src/lay/lay/layDRCLVSHelpResources.qrc +++ b/src/lay/lay/layDRCLVSHelpResources.qrc @@ -49,6 +49,14 @@