Bugfixed tiled mode with text input, DRC tests added and test data updated.

This commit is contained in:
Matthias Koefferlein 2020-05-23 19:03:42 +02:00
parent 6fc72b2a39
commit ba9a05640c
13 changed files with 35 additions and 7 deletions

View File

@ -393,8 +393,8 @@ AsIfFlatRegion::selected_interacting_generic (const Texts &other, bool inverse)
scanner.reserve1 (size ());
scanner.reserve2 (other.size ());
std::auto_ptr<FlatRegion> output (new FlatRegion (false));
region_to_text_interaction_filter<Shapes, db::Text, db::Polygon> filter (output->raw_polygons (), inverse);
std::auto_ptr<FlatRegion> output (new FlatRegion (true));
region_to_text_interaction_filter<FlatRegion, db::Text> filter (*output, inverse);
AddressablePolygonDelivery p (begin_merged (), has_valid_merged_polygons ());

View File

@ -1448,7 +1448,7 @@ CODE
tp.input("self", obj)
tp.threads = (@tt || 1)
args.each_with_index do |a,i|
if a.is_a?(RBA::Edges) || a.is_a?(RBA::Region)
if a.is_a?(RBA::Edges) || a.is_a?(RBA::Region) || a.is_a?(RBA::EdgePairs) || a.is_a?(RBA::Texts)
tp.input("a#{i}", a)
else
tp.var("a#{i}", a)

View File

@ -1807,12 +1807,19 @@ CODE
# In tiled mode, there are no modifying versions. Emulate using the non-modifying one.
eval <<"CODE"
def #{f}(other)
if :#{fi} != :interacting && :#{f} != :not_interacting
if :#{fi} != :interacting && :#{fi} != :not_interacting
requires_edges_or_region("#{f}")
requires_same_type(other, "#{f}")
else
other.requires_edges_or_region("#{f}")
requires_edges_texts_or_region("#{f}")
if @data.is_a?(RBA::Text)
other.requires_region("#{f}")
elsif @data.is_a?(RBA::Region)
other.requires_edges_texts_or_region("#{f}")
else
other.requires_edges_or_region("#{f}")
end
end
requires_edges_or_region("#{f}")
if @engine.is_tiled?
@data = @engine._tcmd(@data, 0, @data.class, :#{fi}, other.data)
DRCLayer::new(@engine, @data)

View File

@ -545,7 +545,10 @@ output(w, "width violations")</pre>
<ul>
<li>Boolean AND with a polygon layer: will select those texts
which are inside or at the border of a polygon.
"interact" is a synonym for this operation.</li>
<a href="/about/drc_ref_global.xml#interact">interact</a> is a synonym for this operation.</li>
<li>Boolean NOT with a polygon layer: will select those texts
which are outside of any polygon.
<a href="/about/drc_ref_global.xml#not_interact">not_interact</a> is a synonym for this operation.</li>
<li>Text filtering by string: texts can be filtered either
by matching against a fixed text or a glob pattern.
The methods provided for this purpose are:

Binary file not shown.

View File

@ -638,12 +638,30 @@ def run_testsuite(dm, ic, tiled = false, hier = false)
p.output(lb, dm)
p = d.interacting(at)
p.output(lb + 1, dm)
ddup = d.dup
ddup.select_interacting(at)
ddup.output(lb + 1, dm + 1)
p = at.interacting(d)
p.output(lb + 2, dm)
atdup = at.dup
atdup.select_interacting(d)
atdup.output(lb + 2, dm + 1)
p = d.pull_interacting(at)
p.output(lb + 3, dm)
p = at.pull_interacting(d)
p.output(lb + 4, dm)
p = at - d
p.output(lb + 5, dm)
p = d.not_interacting(at)
p.output(lb + 6, dm)
ddup = d.dup
ddup.select_not_interacting(at)
ddup.output(lb + 6, dm + 1)
p = at.not_interacting(d)
p.output(lb + 7, dm)
atdup = at.dup
atdup.select_not_interacting(d)
atdup.output(lb + 7, dm + 1)
end

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.