Fixed #548 (shield issue on space) (#549)

This commit is contained in:
Matthias Köfferlein 2020-04-30 22:03:16 +02:00 committed by GitHub
parent 915a27e67e
commit 8dae4161e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 51 additions and 1 deletions

View File

@ -76,7 +76,7 @@ static inline bool shields (const db::EdgePair &ep, const db::Edge &q)
std::pair<bool, db::Point> ip2 = pe2.intersect_point (q);
if (ip1.first && ip2.first) {
return ip1.second != ip2.second || (ip1.second != q.p1 () && ip2.second != q.p2 ());
return ip1.second != ip2.second || (pe1.side_of (q.p1 ()) != 0 && pe2.side_of (q.p2 ()) != 0);
} else {
return false;
}

View File

@ -674,3 +674,43 @@ TEST(14_SwitchingTargets)
db::compare_layouts (_this, layout2, au2, db::NoNormalization);
}
TEST(15_issue548)
{
std::string rs = tl::testsrc ();
rs += "/testdata/drc/drcSimpleTests_15.drc";
std::string input = tl::testsrc ();
input += "/testdata/drc/drcSimpleTests_15.gds";
std::string au = tl::testsrc ();
au += "/testdata/drc/drcSimpleTests_au15.gds";
std::string output = this->tmp_file ("tmp.gds");
{
// Set some variables
lym::Macro config;
config.set_text (tl::sprintf (
"$drc_test_source = '%s'\n"
"$drc_test_target = '%s'\n"
, input, output)
);
config.set_interpreter (lym::Macro::Ruby);
EXPECT_EQ (config.run (), 0);
}
lym::Macro drc;
drc.load_from (rs);
EXPECT_EQ (drc.run (), 0);
db::Layout layout;
{
tl::InputStream stream (output);
db::Reader reader (stream);
reader.read (layout);
}
db::compare_layouts (_this, layout, au, db::NoNormalization);
}

10
testdata/drc/drcSimpleTests_15.drc vendored Normal file
View File

@ -0,0 +1,10 @@
source($drc_test_source, "TOP")
target($drc_test_target)
# various shielding configurations
l1 = input(1,0)
l1.output(1, 0)
l1.space(0.21.um, euclidian).output(10, 0)

BIN
testdata/drc/drcSimpleTests_15.gds vendored Normal file

Binary file not shown.

BIN
testdata/drc/drcSimpleTests_au15.gds vendored Normal file

Binary file not shown.