DRC implementation + doc update

This commit is contained in:
Matthias Koefferlein 2022-08-31 22:39:05 +02:00
parent 2ac9336204
commit 81b605c197
14 changed files with 445 additions and 172 deletions

View File

@ -600,6 +600,32 @@ 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)
pts = [
RBA::Point::new(0 , 0 ),
RBA::Point::new(0 , 3000),
RBA::Point::new(2000, 3000),
RBA::Point::new(2000, 5000),
RBA::Point::new(6000, 5000),
RBA::Point::new(6000, 0 )
];
s1.insert(RBA::Polygon::new(pts))
s2.insert(RBA::Box::new(0, 0, 4000, 6000))
end
end
gen = Gen::new
run_demo gen, "input1.edges.inside(input2)", "drc_inside_ep.png"
run_demo gen, "input1.edges.inside(input2.edges)", "drc_inside_ee.png"
run_demo gen, "input1.edges.not_inside(input2)", "drc_not_inside_ep.png"
run_demo gen, "input1.edges.not_inside(input2.edges)", "drc_not_inside_ee.png"
run_demo gen, "input1.edges.outside(input2)", "drc_outside_ep.png"
run_demo gen, "input1.edges.outside(input2.edges)", "drc_outside_ee.png"
run_demo gen, "input1.edges.not_outside(input2)", "drc_not_outside_ep.png"
run_demo gen, "input1.edges.not_outside(input2.edges)", "drc_not_outside_ee.png"
class Gen
def produce(s1, s2)
s1.insert(RBA::Box::new(-1000, 0, 1000, 2000))

View File

@ -1873,7 +1873,9 @@ CODE
# This method returns a two-element array containing one layer for the
# AND result and one for the NOT result.
#
# This method is available for polygon layers.
# This method is available for polygon and edge layers.
# For polygon layers, the other input must be a polygon layer too.
# For edge layers, the other input can be polygon or edge.
#
# It can be used to initialize two variables with the AND and NOT results:
#
@ -1889,8 +1891,12 @@ CODE
@engine._context("andnot") do
check_is_layer(other)
requires_region
other.requires_region
requires_edges_or_region
if self.data.is_a?(RBA::Edges)
other.requires_edges_or_region
elsif self.data.is_a?(RBA::Region)
other.requires_region
end
res = @engine._tcmd_a2(self.data, 0, self.data.class, self.data.class, :andnot, other.data)
@ -2140,54 +2146,94 @@ CODE
# %DRC%
# @name inside
# @brief Selects shapes or regions of self which are inside the other region
# @brief Selects edges or polygons of self which are inside edges or polygons from the other layer
# @synopsis layer.inside(other)
# This method selects all shapes or regions from self which are inside the other region.
# completely (completely covered by polygons from the other region). If self is
# in raw mode, this method will select individual shapes. Otherwise, this method
# will select coherent regions and no part of these regions may be outside the
# other region.
# It returns a new layer containing the selected shapes. A version which modifies self
# is \select_inside.
#
# This method is available for polygon layers.
# If layer is a polygon layer, the other layer needs to be a polygon layer too.
# In this case, this method selects all polygons which are completely inside
# polygons from the other layer.
#
# The following image shows the effect of the "inside" method (input1: red, input2: blue):
# If layer is an edge layer, the other layer can be polygon or edge layer. In the
# first case, all edges completely inside the polygons from the other layer are
# selected. If the other layer is an edge layer, all edges completely contained
# in edges from the other layer are selected.
#
# Merged semantics applies - i.e. edges or polygons are joined before the
# result is computed, unless the layers are in \raw mode.
#
# This method returns a new layer containing the selected shapes. A version which modifies self
# is \select_inside. \not_inside is a function computing the inverse of \inside.
# \split_inside is a function computing both results in a single call. \outside
# is a similar function selecting edges or polygons outside other edges or polygons.
#
# The following image shows the effect of the "inside" method for polygons (input1: red, input2: blue):
#
# @table
# @tr
# @td @img(/images/drc_inside.png) @/td
# @/tr
# @/table
#
# The following images show the effect of the "inside" method for edge layers and edge or polygon layers
# the second input. Note that the edges are computed from the polygons in this example
# (input1: red, input2: blue):
#
# @table
# @tr
# @td @img(/images/drc_inside_ee.png) @/td
# @/tr
# @/table
#
# @table
# @tr
# @td @img(/images/drc_inside_ep.png) @/td
# @/tr
# @/table
# %DRC%
# @name not_inside
# @brief Selects shapes or regions of self which are not inside the other region
# @brief Selects edges or polygons of self which are not inside edges or polygons from the other layer
# @synopsis layer.not_inside(other)
# This method selects all shapes or regions from self which are not inside the other region.
# completely (completely covered by polygons from the other region). If self is
# in raw mode, this method will select individual shapes. Otherwise, this method
# will select coherent regions and no part of these regions may be outside the
# other region.
# It returns a new layer containing the selected shapes. A version which modifies self
#
# This method computes the inverse of \inside - i.e. edges or polygons from the layer
# not being inside polygons or edges from the other layer.
#
# This method returns a new layer containing the selected shapes. A version which modifies self
# is \select_not_inside.
# \split_inside is a function computing both results of \inside and \not_inside in a single call. \outside
# is a similar function selecting edges or polygons outside other edges or polygons. Note
# that "outside" is not the same than "not inside".
#
# This method is available for polygon layers.
#
# The following image shows the effect of the "not_inside" method (input1: red, input2: blue):
# The following image shows the effect of the "not_inside" method for polygon layers (input1: red, input2: blue):
#
# @table
# @tr
# @td @img(/images/drc_not_inside.png) @/td
# @/tr
# @/table
#
# The following images show the effect of the "not_inside" method for edge layers and edge or polygon layers
# the second input. Note that the edges are computed from the polygons in this example
# (input1: red, input2: blue):
#
# @table
# @tr
# @td @img(/images/drc_not_inside_ee.png) @/td
# @/tr
# @/table
#
# @table
# @tr
# @td @img(/images/drc_not_inside_ep.png) @/td
# @/tr
# @/table
# %DRC%
# @name split_inside
# @brief Returns the results of \inside and \not_inside at the same time
# @synopsis (a, b) = layer.split_inside(other)
#
# This method returns the polygons inside of polygons from the other layer in
# This method returns the polygons or edges inside of polygons or edges from the other layer in
# one layer and all others in a second layer. This method is equivalent to calling
# \inside and \not_inside, but is faster than doing this in separate steps:
#
@ -2197,82 +2243,110 @@ CODE
# %DRC%
# @name select_inside
# @brief Selects shapes or regions of self which are inside the other region
# @brief Selects edges or polygons of self which are inside edges or polygons from the other layer
# @synopsis layer.select_inside(other)
# This method selects all shapes or regions from self which are inside the other region.
# completely (completely covered by polygons from the other region). If self is
# in raw mode, this method will select individual shapes. Otherwise, this method
# will select coherent regions and no part of these regions may be outside the
# other region.
# It modifies self to contain the selected shapes. A version which does not modify self
# is \inside.
#
# This method is available for polygon layers.
# This method is the in-place version of \inside - i.e. it modifies the layer instead
# of returning a new layer and leaving the original layer untouched.
# %DRC%
# @name select_not_inside
# @brief Selects shapes or regions of self which are not inside the other region
# @brief Selects edges or polygons of self which are not inside edges or polygons from the other layer
# @synopsis layer.select_not_inside(other)
# This method selects all shapes or regions from self which are not inside the other region.
# completely (completely covered by polygons from the other region). If self is
# in raw mode, this method will select individual shapes. Otherwise, this method
# will select coherent regions and no part of these regions may be outside the
# other region.
# It modifies self to contain the selected shapes. A version which does not modify self
# is \not_inside.
#
# This method is available for polygon layers.
# This method is the in-place version of \inside - i.e. it modifies the layer instead
# of returning a new layer and leaving the original layer untouched.
# %DRC%
# @name outside
# @brief Selects shapes or regions of self which are outside the other region
# @brief Selects edges or polygons of self which are outside edges or polygons from the other layer
# @synopsis layer.outside(other)
# This method selects all shapes or regions from self which are completely outside
# the other region (no part of these shapes or regions may be covered by shapes from
# the other region). If self is in raw mode, this method will select individual
# shapes. Otherwise, this method will select coherent regions and no part of these
# regions may overlap with shapes from the other region.
# It returns a new layer containing the selected shapes. A version which modifies self
# is \select_outside.
#
# This method is available for polygon layers.
# If layer is a polygon layer, the other layer needs to be a polygon layer too.
# In this case, this method selects all polygons which are entirely outside
# polygons from the other layer.
#
# The following image shows the effect of the "outside" method (input1: red, input2: blue):
# If layer is an edge layer, the other layer can be polygon or edge layer. In the
# first case, all edges entirely outside the polygons from the other layer are
# selected. If the other layer is an edge layer, all edges entirely outside
# of edges from the other layer are selected.
#
# Merged semantics applies - i.e. edges or polygons are joined before the
# result is computed, unless the layers are in \raw mode.
#
# This method returns a new layer containing the selected shapes. A version which modifies self
# is \select_outside. \not_outside is a function computing the inverse of \outside.
# \split_outside is a function computing both results in a single call. \outside
# is a similar function selecting edges or polygons outside other edges or polygons.
#
# The following image shows the effect of the "outside" method for polygons (input1: red, input2: blue):
#
# @table
# @tr
# @td @img(/images/drc_outside.png) @/td
# @/tr
# @/table
#
# The following images show the effect of the "outside" method for edge layers and edge or polygon layers
# the second input. Note that the edges are computed from the polygons in this example
# (input1: red, input2: blue):
#
# @table
# @tr
# @td @img(/images/drc_outside_ee.png) @/td
# @/tr
# @/table
#
# @table
# @tr
# @td @img(/images/drc_outside_ep.png) @/td
# @/tr
# @/table
# %DRC%
# @name not_outside
# @brief Selects shapes or regions of self which are not outside the other region
# @brief Selects edges or polygons of self which are not outside edges or polygons from the other layer
# @synopsis layer.not_outside(other)
# This method selects all shapes or regions from self which are not completely outside
# the other region (part of these shapes or regions may be covered by shapes from
# the other region). If self is in raw mode, this method will select individual
# shapes. Otherwise, this method will select coherent regions and no part of these
# regions may overlap with shapes from the other region.
# It returns a new layer containing the selected shapes. A version which modifies self
#
# This method computes the inverse of \outside - i.e. edges or polygons from the layer
# not being outside polygons or edges from the other layer.
#
# This method returns a new layer containing the selected shapes. A version which modifies self
# is \select_not_outside.
# \split_outside is a function computing both results of \outside and \not_outside in a single call. \outside
# is a similar function selecting edges or polygons outside other edges or polygons. Note
# that "outside" is not the same than "not outside".
#
# This method is available for polygon layers.
#
# The following image shows the effect of the "not_outside" method (input1: red, input2: blue):
# The following image shows the effect of the "not_outside" method for polygon layers (input1: red, input2: blue):
#
# @table
# @tr
# @td @img(/images/drc_not_outside.png) @/td
# @/tr
# @/table
#
# The following images show the effect of the "not_outside" method for edge layers and edge or polygon layers
# the second input. Note that the edges are computed from the polygons in this example
# (input1: red, input2: blue):
#
# @table
# @tr
# @td @img(/images/drc_not_outside_ee.png) @/td
# @/tr
# @/table
#
# @table
# @tr
# @td @img(/images/drc_not_outside_ep.png) @/td
# @/tr
# @/table
# %DRC%
# @name split_outside
# @brief Returns the results of \outside and \not_outside at the same time
# @synopsis (a, b) = layer.split_outside(other)
#
# This method returns the polygons outside of polygons from the other layer in
# This method returns the polygons or edges outside of polygons or edges from the other layer in
# one layer and all others in a second layer. This method is equivalent to calling
# \outside and \not_outside, but is faster than doing this in separate steps:
#
@ -2282,31 +2356,19 @@ CODE
# %DRC%
# @name select_outside
# @brief Selects shapes or regions of self which are outside the other region
# @brief Selects edges or polygons of self which are outside edges or polygons from the other layer
# @synopsis layer.select_outside(other)
# This method selects all shapes or regions from self which are completely outside
# the other region (no part of these shapes or regions may be covered by shapes from
# the other region). If self is in raw mode, this method will select individual
# shapes. Otherwise, this method will select coherent regions and no part of these
# regions may overlap with shapes from the other region.
# It modifies self to contain the selected shapes. A version which does not modify self
# is \outside.
#
# This method is available for polygon layers.
# This method is the in-place version of \outside - i.e. it modifies the layer instead
# of returning a new layer and leaving the original layer untouched.
# %DRC%
# @name select_not_outside
# @brief Selects shapes or regions of self which are not outside the other region
# @brief Selects edges or polygons of self which are not outside edges or polygons from the other layer
# @synopsis layer.select_not_outside(other)
# This method selects all shapes or regions from self which are not completely outside
# the other region (part of these shapes or regions may be covered by shapes from
# the other region). If self is in raw mode, this method will select individual
# shapes. Otherwise, this method will select coherent regions and no part of these
# regions may overlap with shapes from the other region.
# It modifies self to contain the selected shapes. A version which does not modify self
# is \not_outside.
#
# This method is available for polygon layers.
# This method is the in-place version of \outside - i.e. it modifies the layer instead
# of returning a new layer and leaving the original layer untouched.
# %DRC%
# @name in
@ -2439,7 +2501,7 @@ CODE
# @brief Returns the results of \interacting and \not_interacting at the same time
# @synopsis (a, b) = layer.split_interacting(other [, options ])
#
# This method returns the polygons interacting with objects from the other container in
# This method returns the polygons or edges interacting with objects from the other container in
# one layer and all others in a second layer. This method is equivalent to calling
# \interacting and \not_interacting, but is faster than doing this in separate steps:
#
@ -2513,6 +2575,9 @@ CODE
#
# This method is available for edge layers. The argument must be a polygon layer.
#
# \outside_part is a method computing the opposite part. \inside_outside_part is a
# method computing both inside and outside part in a single call.
#
# @table
# @tr
# @td @img(/images/drc_inside_part.png) @/td
@ -2529,12 +2594,26 @@ CODE
#
# This method is available for edge layers. The argument must be a polygon layer.
#
# \inside_part is a method computing the opposite part. \inside_outside_part is a
# method computing both inside and outside part in a single call.
#
# @table
# @tr
# @td @img(/images/drc_outside_part.png) @/td
# @/tr
# @/table
# %DRC%
# @name inside_outside_part
# @brief Returns the parts of the edges inside and outside the given region
# @synopsis (inside_part, outside_part) = layer.inside_outside_part(region)
# The method is available for edge layers. The argument must be a polygon layer.
#
# This method returns two layers: the first with the edge parts inside the given region
# and the second with the parts outside the given region. It is equivalent
# to calling \inside_part and \outside_part, but more efficient if both parts
# need to be computed.
# %DRC%
# @name pull_interacting
# @brief Selects shapes or edges of other which touch or overlap shapes from the this region
@ -2608,7 +2687,28 @@ CODE
CODE
end
%w(| ^ inside not_inside outside not_outside in not_in).each do |f|
%w(inside not_inside outside not_outside).each do |f|
eval <<"CODE"
def #{f}(other)
@engine._context("#{f}") do
requires_edges_or_region
if self.data.is_a?(RBA::Edges)
other.requires_edges_or_region
else
other.requires_region
end
DRCLayer::new(@engine, @engine._tcmd(self.data, 0, self.data.class, :#{f}, other.data))
end
end
CODE
end
%w(| ^ in not_in).each do |f|
eval <<"CODE"
def #{f}(other)
@ -2723,8 +2823,54 @@ CODE
@engine._context("#{f}") do
check_is_layer(other)
requires_region
other.requires_edges_texts_or_region
requires_edges_or_region
if self.data.is_a?(RBA::Edges)
other.requires_edges_or_region
elsif self.data.is_a?(RBA::Region)
other.requires_edges_texts_or_region
end
res = @engine._tcmd_a2(self.data, 0, self.data.class, self.data.class, :#{f}, other.data, *minmax_count(*args))
[ DRCLayer::new(@engine, res[0]), DRCLayer::new(@engine, res[1]) ]
end
end
CODE
end
%w(inside_outside_part).each do |f|
eval <<"CODE"
def #{f}(other, *args)
@engine._context("#{f}") do
check_is_layer(other)
requires_edges
other.requires_region
res = @engine._tcmd_a2(self.data, 0, self.data.class, self.data.class, :#{f}, other.data, *minmax_count(*args))
[ DRCLayer::new(@engine, res[0]), DRCLayer::new(@engine, res[1]) ]
end
end
CODE
end
%w(split_inside split_outside).each do |f|
eval <<"CODE"
def #{f}(other, *args)
@engine._context("#{f}") do
check_is_layer(other)
requires_edges_or_region
if self.data.is_a?(RBA::Edges)
other.requires_edges_or_region
elsif self.data.is_a?(RBA::Region)
other.requires_region
end
res = @engine._tcmd_a2(self.data, 0, self.data.class, self.data.class, :#{f}, other.data, *minmax_count(*args))
[ DRCLayer::new(@engine, res[0]), DRCLayer::new(@engine, res[1]) ]
@ -2803,8 +2949,12 @@ CODE
@engine._context("#{f}") do
requires_region
requires_same_type(other)
requires_edges_or_region
if self.data.is_a?(RBA::Edges)
other.requires_edges_or_region
else
other.requires_region
end
if @engine.is_tiled?
self.data = @engine._tcmd(self.data, 0, self.data.class, :#{fi}, other.data)

View File

@ -103,7 +103,9 @@ polygons will be written to the output (labels: red, input2: blue):
This method returns a two-element array containing one layer for the
AND result and one for the NOT result.
</p><p>
This method is available for polygon layers.
This method is available for polygon and edge layers.
For polygon layers, the other input must be a polygon layer too.
For edge layers, the other input can be polygon or edge.
</p><p>
It can be used to initialize two variables with the AND and NOT results:
</p><p>
@ -1343,30 +1345,67 @@ pl = polygon_layer
pl.insert(box(0.0, 0.0, 100.0, 200.0)
</pre>
</p>
<a name="inside"/><h2>"inside" - Selects shapes or regions of self which are inside the other region</h2>
<a name="inside"/><h2>"inside" - Selects edges or polygons of self which are inside edges or polygons from the other layer</h2>
<keyword name="inside"/>
<p>Usage:</p>
<ul>
<li><tt>layer.inside(other)</tt></li>
</ul>
<p>
This method selects all shapes or regions from self which are inside the other region.
completely (completely covered by polygons from the other region). If self is
in raw mode, this method will select individual shapes. Otherwise, this method
will select coherent regions and no part of these regions may be outside the
other region.
It returns a new layer containing the selected shapes. A version which modifies self
is <a href="#select_inside">select_inside</a>.
If layer is a polygon layer, the other layer needs to be a polygon layer too.
In this case, this method selects all polygons which are completely inside
polygons from the other layer.
</p><p>
This method is available for polygon layers.
If layer is an edge layer, the other layer can be polygon or edge layer. In the
first case, all edges completely inside the polygons from the other layer are
selected. If the other layer is an edge layer, all edges completely contained
in edges from the other layer are selected.
</p><p>
The following image shows the effect of the "inside" method (input1: red, input2: blue):
Merged semantics applies - i.e. edges or polygons are joined before the
result is computed, unless the layers are in <a href="#raw">raw</a> mode.
</p><p>
This method returns a new layer containing the selected shapes. A version which modifies self
is <a href="#select_inside">select_inside</a>. <a href="#not_inside">not_inside</a> is a function computing the inverse of <a href="#inside">inside</a>.
<a href="#split_inside">split_inside</a> is a function computing both results in a single call. <a href="#outside">outside</a>
is a similar function selecting edges or polygons outside other edges or polygons.
</p><p>
The following image shows the effect of the "inside" method for polygons (input1: red, input2: blue):
</p><p>
<table>
<tr>
<td><img src="/images/drc_inside.png"/></td>
</tr>
</table>
</p><p>
The following images show the effect of the "inside" method for edge layers and edge or polygon layers
the second input. Note that the edges are computed from the polygons in this example
(input1: red, input2: blue):
</p><p>
<table>
<tr>
<td><img src="/images/drc_inside_ee.png"/></td>
</tr>
</table>
</p><p>
<table>
<tr>
<td><img src="/images/drc_inside_ep.png"/></td>
</tr>
</table>
</p>
<a name="inside_outside_part"/><h2>"inside_outside_part" - Returns the parts of the edges inside and outside the given region</h2>
<keyword name="inside_outside_part"/>
<p>Usage:</p>
<ul>
<li><tt>(inside_part, outside_part) = layer.inside_outside_part(region)</tt></li>
</ul>
<p>
The method is available for edge layers. The argument must be a polygon layer.
</p><p>
This method returns two layers: the first with the edge parts inside the given region
and the second with the parts outside the given region. It is equivalent
to calling <a href="#inside_part">inside_part</a> and <a href="#outside_part">outside_part</a>, but more efficient if both parts
need to be computed.
</p>
<a name="inside_part"/><h2>"inside_part" - Returns the parts of the edges inside the given region</h2>
<keyword name="inside_part"/>
@ -1381,6 +1420,9 @@ of the polygons of the region.
</p><p>
This method is available for edge layers. The argument must be a polygon layer.
</p><p>
<a href="#outside_part">outside_part</a> is a method computing the opposite part. <a href="#inside_outside_part">inside_outside_part</a> is a
method computing both inside and outside part in a single call.
</p><p>
<table>
<tr>
<td><img src="/images/drc_inside_part.png"/></td>
@ -1798,30 +1840,45 @@ The following image shows the effect of the "not_in" method (input1: red, input2
</tr>
</table>
</p>
<a name="not_inside"/><h2>"not_inside" - Selects shapes or regions of self which are not inside the other region</h2>
<a name="not_inside"/><h2>"not_inside" - Selects edges or polygons of self which are not inside edges or polygons from the other layer</h2>
<keyword name="not_inside"/>
<p>Usage:</p>
<ul>
<li><tt>layer.not_inside(other)</tt></li>
</ul>
<p>
This method selects all shapes or regions from self which are not inside the other region.
completely (completely covered by polygons from the other region). If self is
in raw mode, this method will select individual shapes. Otherwise, this method
will select coherent regions and no part of these regions may be outside the
other region.
It returns a new layer containing the selected shapes. A version which modifies self
This method computes the inverse of <a href="#inside">inside</a> - i.e. edges or polygons from the layer
not being inside polygons or edges from the other layer.
</p><p>
This method returns a new layer containing the selected shapes. A version which modifies self
is <a href="#select_not_inside">select_not_inside</a>.
<a href="#split_inside">split_inside</a> is a function computing both results of <a href="#inside">inside</a> and <a href="#not_inside">not_inside</a> in a single call. <a href="#outside">outside</a>
is a similar function selecting edges or polygons outside other edges or polygons. Note
that "outside" is not the same than "not inside".
</p><p>
This method is available for polygon layers.
</p><p>
The following image shows the effect of the "not_inside" method (input1: red, input2: blue):
The following image shows the effect of the "not_inside" method for polygon layers (input1: red, input2: blue):
</p><p>
<table>
<tr>
<td><img src="/images/drc_not_inside.png"/></td>
</tr>
</table>
</p><p>
The following images show the effect of the "not_inside" method for edge layers and edge or polygon layers
the second input. Note that the edges are computed from the polygons in this example
(input1: red, input2: blue):
</p><p>
<table>
<tr>
<td><img src="/images/drc_not_inside_ee.png"/></td>
</tr>
</table>
</p><p>
<table>
<tr>
<td><img src="/images/drc_not_inside_ep.png"/></td>
</tr>
</table>
</p>
<a name="not_interacting"/><h2>"not_interacting" - Selects shapes or regions of self which do not touch or overlap shapes from the other region</h2>
<keyword name="not_interacting"/>
@ -1867,30 +1924,45 @@ from the other layer. Two polygons overlapping or touching at two locations are
</tr>
</table>
</p>
<a name="not_outside"/><h2>"not_outside" - Selects shapes or regions of self which are not outside the other region</h2>
<a name="not_outside"/><h2>"not_outside" - Selects edges or polygons of self which are not outside edges or polygons from the other layer</h2>
<keyword name="not_outside"/>
<p>Usage:</p>
<ul>
<li><tt>layer.not_outside(other)</tt></li>
</ul>
<p>
This method selects all shapes or regions from self which are not completely outside
the other region (part of these shapes or regions may be covered by shapes from
the other region). If self is in raw mode, this method will select individual
shapes. Otherwise, this method will select coherent regions and no part of these
regions may overlap with shapes from the other region.
It returns a new layer containing the selected shapes. A version which modifies self
This method computes the inverse of <a href="#outside">outside</a> - i.e. edges or polygons from the layer
not being outside polygons or edges from the other layer.
</p><p>
This method returns a new layer containing the selected shapes. A version which modifies self
is <a href="#select_not_outside">select_not_outside</a>.
<a href="#split_outside">split_outside</a> is a function computing both results of <a href="#outside">outside</a> and <a href="#not_outside">not_outside</a> in a single call. <a href="#outside">outside</a>
is a similar function selecting edges or polygons outside other edges or polygons. Note
that "outside" is not the same than "not outside".
</p><p>
This method is available for polygon layers.
</p><p>
The following image shows the effect of the "not_outside" method (input1: red, input2: blue):
The following image shows the effect of the "not_outside" method for polygon layers (input1: red, input2: blue):
</p><p>
<table>
<tr>
<td><img src="/images/drc_not_outside.png"/></td>
</tr>
</table>
</p><p>
The following images show the effect of the "not_outside" method for edge layers and edge or polygon layers
the second input. Note that the edges are computed from the polygons in this example
(input1: red, input2: blue):
</p><p>
<table>
<tr>
<td><img src="/images/drc_not_outside_ee.png"/></td>
</tr>
</table>
</p><p>
<table>
<tr>
<td><img src="/images/drc_not_outside_ep.png"/></td>
</tr>
</table>
</p>
<a name="not_overlapping"/><h2>"not_overlapping" - Selects shapes or regions of self which do not overlap shapes from the other region</h2>
<keyword name="not_overlapping"/>
@ -2009,30 +2081,53 @@ a single <class_doc href="LayerInfo">LayerInfo</class_doc> object.
See <a href="/about/drc_ref_global.xml#report">report</a> and <a href="/about/drc_ref_global.xml#target">target</a> on how to configure output to a target layout
or report database.
</p>
<a name="outside"/><h2>"outside" - Selects shapes or regions of self which are outside the other region</h2>
<a name="outside"/><h2>"outside" - Selects edges or polygons of self which are outside edges or polygons from the other layer</h2>
<keyword name="outside"/>
<p>Usage:</p>
<ul>
<li><tt>layer.outside(other)</tt></li>
</ul>
<p>
This method selects all shapes or regions from self which are completely outside
the other region (no part of these shapes or regions may be covered by shapes from
the other region). If self is in raw mode, this method will select individual
shapes. Otherwise, this method will select coherent regions and no part of these
regions may overlap with shapes from the other region.
It returns a new layer containing the selected shapes. A version which modifies self
is <a href="#select_outside">select_outside</a>.
If layer is a polygon layer, the other layer needs to be a polygon layer too.
In this case, this method selects all polygons which are entirely outside
polygons from the other layer.
</p><p>
This method is available for polygon layers.
If layer is an edge layer, the other layer can be polygon or edge layer. In the
first case, all edges entirely outside the polygons from the other layer are
selected. If the other layer is an edge layer, all edges entirely outside
of edges from the other layer are selected.
</p><p>
The following image shows the effect of the "outside" method (input1: red, input2: blue):
Merged semantics applies - i.e. edges or polygons are joined before the
result is computed, unless the layers are in <a href="#raw">raw</a> mode.
</p><p>
This method returns a new layer containing the selected shapes. A version which modifies self
is <a href="#select_outside">select_outside</a>. <a href="#not_outside">not_outside</a> is a function computing the inverse of <a href="#outside">outside</a>.
<a href="#split_outside">split_outside</a> is a function computing both results in a single call. <a href="#outside">outside</a>
is a similar function selecting edges or polygons outside other edges or polygons.
</p><p>
The following image shows the effect of the "outside" method for polygons (input1: red, input2: blue):
</p><p>
<table>
<tr>
<td><img src="/images/drc_outside.png"/></td>
</tr>
</table>
</p><p>
The following images show the effect of the "outside" method for edge layers and edge or polygon layers
the second input. Note that the edges are computed from the polygons in this example
(input1: red, input2: blue):
</p><p>
<table>
<tr>
<td><img src="/images/drc_outside_ee.png"/></td>
</tr>
</table>
</p><p>
<table>
<tr>
<td><img src="/images/drc_outside_ep.png"/></td>
</tr>
</table>
</p>
<a name="outside_part"/><h2>"outside_part" - Returns the parts of the edges outside the given region</h2>
<keyword name="outside_part"/>
@ -2047,6 +2142,9 @@ of the polygons of the region.
</p><p>
This method is available for edge layers. The argument must be a polygon layer.
</p><p>
<a href="#inside_part">inside_part</a> is a method computing the opposite part. <a href="#inside_outside_part">inside_outside_part</a> is a
method computing both inside and outside part in a single call.
</p><p>
<table>
<tr>
<td><img src="/images/drc_outside_part.png"/></td>
@ -2401,22 +2499,15 @@ is <a href="#covering">covering</a>.
</p><p>
This method is available for polygons only.
</p>
<a name="select_inside"/><h2>"select_inside" - Selects shapes or regions of self which are inside the other region</h2>
<a name="select_inside"/><h2>"select_inside" - Selects edges or polygons of self which are inside edges or polygons from the other layer</h2>
<keyword name="select_inside"/>
<p>Usage:</p>
<ul>
<li><tt>layer.select_inside(other)</tt></li>
</ul>
<p>
This method selects all shapes or regions from self which are inside the other region.
completely (completely covered by polygons from the other region). If self is
in raw mode, this method will select individual shapes. Otherwise, this method
will select coherent regions and no part of these regions may be outside the
other region.
It modifies self to contain the selected shapes. A version which does not modify self
is <a href="#inside">inside</a>.
</p><p>
This method is available for polygon layers.
This method is the in-place version of <a href="#inside">inside</a> - i.e. it modifies the layer instead
of returning a new layer and leaving the original layer untouched.
</p>
<a name="select_interacting"/><h2>"select_interacting" - Selects shapes or regions of self which touch or overlap shapes from the other region</h2>
<keyword name="select_interacting"/>
@ -2461,22 +2552,15 @@ is <a href="#not_covering">not_covering</a>.
</p><p>
This method is available for polygons only.
</p>
<a name="select_not_inside"/><h2>"select_not_inside" - Selects shapes or regions of self which are not inside the other region</h2>
<a name="select_not_inside"/><h2>"select_not_inside" - Selects edges or polygons of self which are not inside edges or polygons from the other layer</h2>
<keyword name="select_not_inside"/>
<p>Usage:</p>
<ul>
<li><tt>layer.select_not_inside(other)</tt></li>
</ul>
<p>
This method selects all shapes or regions from self which are not inside the other region.
completely (completely covered by polygons from the other region). If self is
in raw mode, this method will select individual shapes. Otherwise, this method
will select coherent regions and no part of these regions may be outside the
other region.
It modifies self to contain the selected shapes. A version which does not modify self
is <a href="#not_inside">not_inside</a>.
</p><p>
This method is available for polygon layers.
This method is the in-place version of <a href="#inside">inside</a> - i.e. it modifies the layer instead
of returning a new layer and leaving the original layer untouched.
</p>
<a name="select_not_interacting"/><h2>"select_not_interacting" - Selects shapes or regions of self which do not touch or overlap shapes from the other region</h2>
<keyword name="select_not_interacting"/>
@ -2503,22 +2587,15 @@ number of (different) shapes from the other layer. If a min and max count is giv
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.
</p>
<a name="select_not_outside"/><h2>"select_not_outside" - Selects shapes or regions of self which are not outside the other region</h2>
<a name="select_not_outside"/><h2>"select_not_outside" - Selects edges or polygons of self which are not outside edges or polygons from the other layer</h2>
<keyword name="select_not_outside"/>
<p>Usage:</p>
<ul>
<li><tt>layer.select_not_outside(other)</tt></li>
</ul>
<p>
This method selects all shapes or regions from self which are not completely outside
the other region (part of these shapes or regions may be covered by shapes from
the other region). If self is in raw mode, this method will select individual
shapes. Otherwise, this method will select coherent regions and no part of these
regions may overlap with shapes from the other region.
It modifies self to contain the selected shapes. A version which does not modify self
is <a href="#not_outside">not_outside</a>.
</p><p>
This method is available for polygon layers.
This method is the in-place version of <a href="#outside">outside</a> - i.e. it modifies the layer instead
of returning a new layer and leaving the original layer untouched.
</p>
<a name="select_not_overlapping"/><h2>"select_not_overlapping" - Selects shapes or regions of self which do not overlap shapes from the other region</h2>
<keyword name="select_not_overlapping"/>
@ -2538,22 +2615,15 @@ is <a href="#not_overlapping">not_overlapping</a>.
</p><p>
This method is available for polygons only.
</p>
<a name="select_outside"/><h2>"select_outside" - Selects shapes or regions of self which are outside the other region</h2>
<a name="select_outside"/><h2>"select_outside" - Selects edges or polygons of self which are outside edges or polygons from the other layer</h2>
<keyword name="select_outside"/>
<p>Usage:</p>
<ul>
<li><tt>layer.select_outside(other)</tt></li>
</ul>
<p>
This method selects all shapes or regions from self which are completely outside
the other region (no part of these shapes or regions may be covered by shapes from
the other region). If self is in raw mode, this method will select individual
shapes. Otherwise, this method will select coherent regions and no part of these
regions may overlap with shapes from the other region.
It modifies self to contain the selected shapes. A version which does not modify self
is <a href="#outside">outside</a>.
</p><p>
This method is available for polygon layers.
This method is the in-place version of <a href="#outside">outside</a> - i.e. it modifies the layer instead
of returning a new layer and leaving the original layer untouched.
</p>
<a name="select_overlapping"/><h2>"select_overlapping" - Selects shapes or regions of self which overlap shapes from the other region</h2>
<keyword name="select_overlapping"/>
@ -2866,7 +2936,7 @@ The options of this method are the same than <a href="#covering">covering</a>.
<li><tt>(a, b) = layer.split_inside(other)</tt></li>
</ul>
<p>
This method returns the polygons inside of polygons from the other layer in
This method returns the polygons or edges inside of polygons or edges from the other layer in
one layer and all others in a second layer. This method is equivalent to calling
<a href="#inside">inside</a> and <a href="#not_inside">not_inside</a>, but is faster than doing this in separate steps:
</p><p>
@ -2881,7 +2951,7 @@ one layer and all others in a second layer. This method is equivalent to calling
<li><tt>(a, b) = layer.split_interacting(other [, options ])</tt></li>
</ul>
<p>
This method returns the polygons interacting with objects from the other container in
This method returns the polygons or edges interacting with objects from the other container in
one layer and all others in a second layer. This method is equivalent to calling
<a href="#interacting">interacting</a> and <a href="#not_interacting">not_interacting</a>, but is faster than doing this in separate steps:
</p><p>
@ -2898,7 +2968,7 @@ The options of this method are the same than <a href="#interacting">interacting<
<li><tt>(a, b) = layer.split_outside(other)</tt></li>
</ul>
<p>
This method returns the polygons outside of polygons from the other layer in
This method returns the polygons or edges outside of polygons or edges from the other layer in
one layer and all others in a second layer. This method is equivalent to calling
<a href="#outside">outside</a> and <a href="#not_outside">not_outside</a>, but is faster than doing this in separate steps:
</p><p>

View File

@ -37,7 +37,7 @@ See <a href="/about/lvs_ref_netter.xml#align">Netter#align</a> for a description
<p>
See <a href="/about/lvs_ref_netter.xml#blank_circuit">Netter#blank_circuit</a> for a description of that function.
</p>
<a name="compare"/><h2>"compare" - Compares the extracted netlist vs. the schematic</h2>
<a name="compare"/><h2>"compare" - Compares the extracted netlist vs. the schematic netlist</h2>
<keyword name="compare"/>
<p>Usage:</p>
<ul>
@ -154,6 +154,15 @@ See <a href="/about/lvs_ref_netter.xml#min_caps">Netter#min_caps</a> for a descr
<p>
See <a href="/about/lvs_ref_netter.xml">Netter</a> for more details
</p>
<a name="no_lvs_hints"/><h2>"no_lvs_hints" - Disables LVS hints</h2>
<keyword name="no_lvs_hints"/>
<p>Usage:</p>
<ul>
<li><tt>no_lvs_hints</tt></li>
</ul>
<p>
See <a href="/about/lvs_ref_netter.xml#no_lvs_hints">Netter#no_lvs_hints</a> for a description of that feature.
</p>
<a name="report_lvs"/><h2>"report_lvs" - Specifies an LVS report for output</h2>
<keyword name="report_lvs"/>
<p>Usage:</p>

View File

@ -302,6 +302,16 @@ with a resistance value above the given threshold (in Farad).
After using this method, the netlist compare will ignore capacitance devices
with a capacitance values below the given threshold (in Farad).
</p>
<a name="no_lvs_hints"/><h2>"no_lvs_hints" - Disables LVS hints</h2>
<keyword name="no_lvs_hints"/>
<p>Usage:</p>
<ul>
<li><tt>no_lvs_hints</tt></li>
</ul>
<p>
LVS hints may be expensive to compute. Use this function to disable
generation of LVS hints
</p>
<a name="same_circuits"/><h2>"same_circuits" - Establishes an equivalence between the circuits</h2>
<keyword name="same_circuits"/>
<p>Usage:</p>

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

View File

@ -78,6 +78,14 @@
<file alias="drc_not3.png">doc/images/drc_not3.png</file>
<file alias="drc_inside_part.png">doc/images/drc_inside_part.png</file>
<file alias="drc_outside_part.png">doc/images/drc_outside_part.png</file>
<file alias="drc_inside_ep.png">doc/images/drc_inside_ep.png</file>
<file alias="drc_inside_ee.png">doc/images/drc_inside_ee.png</file>
<file alias="drc_not_inside_ep.png">doc/images/drc_not_inside_ep.png</file>
<file alias="drc_not_inside_ee.png">doc/images/drc_not_inside_ee.png</file>
<file alias="drc_outside_ep.png">doc/images/drc_outside_ep.png</file>
<file alias="drc_outside_ee.png">doc/images/drc_outside_ee.png</file>
<file alias="drc_not_outside_ep.png">doc/images/drc_not_outside_ep.png</file>
<file alias="drc_not_outside_ee.png">doc/images/drc_not_outside_ee.png</file>
<file alias="drc_covering.png">doc/images/drc_covering.png</file>
<file alias="drc_not_covering.png">doc/images/drc_not_covering.png</file>
<file alias="drc_interacting2.png">doc/images/drc_interacting2.png</file>