mirror of https://github.com/KLayout/klayout.git
parent
915a27e67e
commit
8dae4161e1
|
|
@ -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);
|
std::pair<bool, db::Point> ip2 = pe2.intersect_point (q);
|
||||||
|
|
||||||
if (ip1.first && ip2.first) {
|
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 {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -674,3 +674,43 @@ TEST(14_SwitchingTargets)
|
||||||
|
|
||||||
db::compare_layouts (_this, layout2, au2, db::NoNormalization);
|
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);
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -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)
|
||||||
|
|
||||||
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue