mirror of https://github.com/KLayout/klayout.git
DRC: tiling mode with global transformation, debug + tested
This commit is contained in:
parent
afdc50d05a
commit
866ee9bd81
|
|
@ -593,6 +593,8 @@ RecursiveShapeIterator::bbox () const
|
|||
}
|
||||
}
|
||||
|
||||
box = box.transformed (m_global_trans);
|
||||
|
||||
if (m_region != box_type::world ()) {
|
||||
box &= m_region;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -107,6 +107,16 @@ TEST(1)
|
|||
|
||||
std::string x;
|
||||
|
||||
db::RecursiveShapeIterator i0s (g, c0, 0);
|
||||
x = collect(i0s, g);
|
||||
EXPECT_EQ (x, "[$1](0,100;1000,1200)/[$2](0,100;1000,1200)/[$3](100,0;1100,1100)/[$4](1200,0;2200,1100)/[$4](-1200,0;-100,1000)");
|
||||
EXPECT_EQ (i0s.bbox ().to_string (), "(-1200,0;2200,1200)");
|
||||
|
||||
i0s.set_global_trans (db::ICplxTrans (2.0));
|
||||
x = collect(i0s, g);
|
||||
EXPECT_EQ (x, "[$1](0,200;2000,2400)/[$2](0,200;2000,2400)/[$3](200,0;2200,2200)/[$4](2400,0;4400,2200)/[$4](-2400,0;-200,2000)");
|
||||
EXPECT_EQ (i0s.bbox ().to_string (), "(-2400,0;4400,2400)");
|
||||
|
||||
db::RecursiveShapeIterator i1 (g, c0, 0, db::Box (0, 0, 100, 100));
|
||||
x = collect(i1, g);
|
||||
EXPECT_EQ (x, "[$1](0,100;1000,1200)/[$2](0,100;1000,1200)/[$3](100,0;1100,1100)");
|
||||
|
|
|
|||
|
|
@ -1188,3 +1188,8 @@ TEST(32d_globalTransformationWithClip)
|
|||
run_test (_this, "32", true);
|
||||
}
|
||||
|
||||
TEST(33_globalTransformationWithTiles)
|
||||
{
|
||||
run_test (_this, "33", true);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,34 @@
|
|||
|
||||
source $drc_test_source
|
||||
target $drc_test_target
|
||||
|
||||
tiles(10.um)
|
||||
|
||||
global_transform(magnify(2.0), shift(10.um, 20.um))
|
||||
|
||||
# The actual DRC test
|
||||
|
||||
l1 = input(1, 0)
|
||||
l2 = input(2, 0)
|
||||
|
||||
l1.output(1, 0)
|
||||
l2.output(2, 0)
|
||||
|
||||
l1.merged.output(10, 0)
|
||||
l1.sized(100.nm).output(11, 0)
|
||||
l2.sized(100.nm).output(12, 0)
|
||||
|
||||
# reset
|
||||
global_transform
|
||||
|
||||
l1 = input(1, 0)
|
||||
l2 = input(2, 0)
|
||||
|
||||
|
||||
l1.output(101, 0)
|
||||
l2.output(102, 0)
|
||||
|
||||
l1.merged.output(110, 0)
|
||||
l1.sized(100.nm).output(111, 0)
|
||||
l2.sized(100.nm).output(112, 0)
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue