mirror of https://github.com/KLayout/klayout.git
Convenience: simple version of DRC layer.with_holes and layer.without_holes
This commit is contained in:
parent
93e789a861
commit
29384bf3f3
|
|
@ -544,22 +544,24 @@ CODE
|
|||
# %DRC%
|
||||
# @name with_holes
|
||||
# @brief Selects all polygons with the specified number of holes
|
||||
# @synopsis layer.with_holes
|
||||
# @synopsis layer.with_holes(count)
|
||||
# @synopsis layer.with_holes(min_count, max_count)
|
||||
# @synopsis layer.with_holes(min_count .. max_count)
|
||||
#
|
||||
# This method is available for polygon layers. It will select all polygons from the input layer
|
||||
# which have the specified number of holes.
|
||||
# which have the specified number of holes. Without any argument, all polygons with holes are selected.
|
||||
|
||||
# %DRC%
|
||||
# @name without_holes
|
||||
# @brief Selects all polygons with the specified number of holes
|
||||
# @synopsis layer.without_holes
|
||||
# @synopsis layer.without_holes(count)
|
||||
# @synopsis layer.without_holes(min_count, max_count)
|
||||
# @synopsis layer.without_holes(min_count .. max_count)
|
||||
#
|
||||
# This method is available for polygon layers. It will select all polygons from the input layer
|
||||
# which do not have the specified number of holes.
|
||||
# which do not have the specified number of holes. Without any arguments, all polygons without holes are selected.
|
||||
|
||||
%w(holes).each do |f|
|
||||
[true, false].each do |inv|
|
||||
|
|
@ -570,7 +572,9 @@ CODE
|
|||
@engine._context("#{mn}") do
|
||||
|
||||
requires_region
|
||||
if args.size == 1
|
||||
if args.size == 0
|
||||
DRCLayer::new(@engine, @engine._tcmd(self.data, 0, RBA::Region, :with_#{f}, 1, nil, #{inv.inspect}))
|
||||
elsif args.size == 1
|
||||
a = args[0]
|
||||
if a.is_a?(Range)
|
||||
min = @engine._make_numeric_value_with_nil(a.begin)
|
||||
|
|
|
|||
|
|
@ -3423,13 +3423,14 @@ This method is available for edge pair layers only.
|
|||
<keyword name="with_holes"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>layer.with_holes</tt></li>
|
||||
<li><tt>layer.with_holes(count)</tt></li>
|
||||
<li><tt>layer.with_holes(min_count, max_count)</tt></li>
|
||||
<li><tt>layer.with_holes(min_count .. max_count)</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
This method is available for polygon layers. It will select all polygons from the input layer
|
||||
which have the specified number of holes.
|
||||
which have the specified number of holes. Without any argument, all polygons with holes are selected.
|
||||
</p>
|
||||
<a name="with_internal_angle"/><h2>"with_internal_angle" - Selects edge pairs by their internal angle</h2>
|
||||
<keyword name="with_internal_angle"/>
|
||||
|
|
@ -3667,13 +3668,14 @@ This method is available for edge pair layers only.
|
|||
<keyword name="without_holes"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>layer.without_holes</tt></li>
|
||||
<li><tt>layer.without_holes(count)</tt></li>
|
||||
<li><tt>layer.without_holes(min_count, max_count)</tt></li>
|
||||
<li><tt>layer.without_holes(min_count .. max_count)</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
This method is available for polygon layers. It will select all polygons from the input layer
|
||||
which do not have the specified number of holes.
|
||||
which do not have the specified number of holes. Without any arguments, all polygons without holes are selected.
|
||||
</p>
|
||||
<a name="without_internal_angle"/><h2>"without_internal_angle" - Selects edge pairs by their internal angle</h2>
|
||||
<keyword name="without_internal_angle"/>
|
||||
|
|
|
|||
|
|
@ -22,4 +22,6 @@ h.with_holes(1..3).output(103, 0)
|
|||
h.with_holes(1..1).output(104, 0)
|
||||
h.with_holes(2, nil).output(105, 0)
|
||||
h.with_holes(0, nil).output(106, 0)
|
||||
h.with_holes.output(107, 0)
|
||||
h.without_holes.output(108, 0)
|
||||
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue