mirror of https://github.com/KLayout/klayout.git
[CONSIDER MERGING] Clarification and typo fixed in DRC doc.
This commit is contained in:
parent
7a9e9989d3
commit
4a854bfa5e
|
|
@ -1594,6 +1594,14 @@ CODE
|
|||
# @brief Specifies cell filters on the default source
|
||||
# @synopsis select(args)
|
||||
# See \Source#select for a description of that function.
|
||||
# Using the global version does not create a new source, but
|
||||
# modifies the default source.
|
||||
#
|
||||
# @code
|
||||
# # Selects only B cell instances below the top cell
|
||||
# select("-", "+B*")
|
||||
# l1 = input(1, 0)
|
||||
# @/code
|
||||
|
||||
def select(*args)
|
||||
self._context("select") do
|
||||
|
|
|
|||
|
|
@ -161,9 +161,11 @@ module DRC
|
|||
# %DRC%
|
||||
# @name select
|
||||
# @brief Adds cell name expressions to the cell filters
|
||||
# @synopsis source.select(filter1, filter2, ...)
|
||||
# @synopsis new_source = source.select(filter1, filter2, ...)
|
||||
# This method will construct a new source object with the given cell filters
|
||||
# applied.
|
||||
# applied. Note that there is a global version of "select" which does not
|
||||
# create a new source, but acts on the default source.
|
||||
#
|
||||
# Cell filters will enable or disable cells plus their subtree.
|
||||
# Cells can be switched on and off, which makes the hierarchy traversal
|
||||
# stop or begin delivering shapes at the given cell. The arguments of
|
||||
|
|
@ -184,8 +186,8 @@ module DRC
|
|||
# code:
|
||||
#
|
||||
# @code
|
||||
# layout_with_selection = source.select("-TOP", "+B")
|
||||
# l1 = source.input(1, 0)
|
||||
# source_with_selection = source.select("-TOP", "+B")
|
||||
# l1 = source_with_selection.input(1, 0)
|
||||
# ...
|
||||
# @/code
|
||||
#
|
||||
|
|
@ -201,8 +203,8 @@ module DRC
|
|||
# first "-*" selection, all cells including the children of "B" are disabled:
|
||||
#
|
||||
# @code
|
||||
# layout_with_selection = source.select("-*", "+B")
|
||||
# l1 = source.input(1, 0)
|
||||
# source_with_selection = source.select("-*", "+B")
|
||||
# l1 = source_with_selection.input(1, 0)
|
||||
# ...
|
||||
# @/code
|
||||
#
|
||||
|
|
@ -210,8 +212,8 @@ module DRC
|
|||
# and will start with a disabled top cell regardless of its name:
|
||||
#
|
||||
# @code
|
||||
# layout_with_selection = source.select("-", "+B")
|
||||
# l1 = source.input(1, 0)
|
||||
# source_with_selection = source.select("-", "+B")
|
||||
# l1 = source_with_selection.input(1, 0)
|
||||
# ...
|
||||
# @/code
|
||||
|
||||
|
|
|
|||
|
|
@ -1597,6 +1597,14 @@ out = l1.drc(primary & secondary(l2))
|
|||
</ul>
|
||||
<p>
|
||||
See <a href="/about/drc_ref_source.xml#select">Source#select</a> for a description of that function.
|
||||
Using the global version does not create a new source, but
|
||||
modifies the default source.
|
||||
</p><p>
|
||||
<pre>
|
||||
# Selects only B cell instances below the top cell
|
||||
select("-", "+B*")
|
||||
l1 = input(1, 0)
|
||||
</pre>
|
||||
</p>
|
||||
<a name="sep"/><h2>"sep" - Synonym for "separation"</h2>
|
||||
<keyword name="sep"/>
|
||||
|
|
|
|||
|
|
@ -320,11 +320,13 @@ Use the global version of "polygons" without a source object to address the defa
|
|||
<keyword name="select"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>source.select(filter1, filter2, ...)</tt></li>
|
||||
<li><tt>new_source = source.select(filter1, filter2, ...)</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
This method will construct a new source object with the given cell filters
|
||||
applied.
|
||||
applied. Note that there is a global version of "select" which does not
|
||||
create a new source, but acts on the default source.
|
||||
</p><p>
|
||||
Cell filters will enable or disable cells plus their subtree.
|
||||
Cells can be switched on and off, which makes the hierarchy traversal
|
||||
stop or begin delivering shapes at the given cell. The arguments of
|
||||
|
|
@ -345,8 +347,8 @@ To disable the TOP cell but enabled a hypothetical cell B below the top cell, us
|
|||
code:
|
||||
</p><p>
|
||||
<pre>
|
||||
layout_with_selection = source.select("-TOP", "+B")
|
||||
l1 = source.input(1, 0)
|
||||
source_with_selection = source.select("-TOP", "+B")
|
||||
l1 = source_with_selection.input(1, 0)
|
||||
...
|
||||
</pre>
|
||||
</p><p>
|
||||
|
|
@ -362,8 +364,8 @@ The following code will just select "B" without its children, because in the
|
|||
first "-*" selection, all cells including the children of "B" are disabled:
|
||||
</p><p>
|
||||
<pre>
|
||||
layout_with_selection = source.select("-*", "+B")
|
||||
l1 = source.input(1, 0)
|
||||
source_with_selection = source.select("-*", "+B")
|
||||
l1 = source_with_selection.input(1, 0)
|
||||
...
|
||||
</pre>
|
||||
</p><p>
|
||||
|
|
@ -371,8 +373,8 @@ The short form "-" will disable the top cell. This code is identical to the firs
|
|||
and will start with a disabled top cell regardless of its name:
|
||||
</p><p>
|
||||
<pre>
|
||||
layout_with_selection = source.select("-", "+B")
|
||||
l1 = source.input(1, 0)
|
||||
source_with_selection = source.select("-", "+B")
|
||||
l1 = source_with_selection.input(1, 0)
|
||||
...
|
||||
</pre>
|
||||
</p>
|
||||
|
|
|
|||
Loading…
Reference in New Issue