Bugfix on layout query

The following query did not render the correct box
for top-level objects:

select path_dtrans*shape.dbbox.center,cell_name from shapes on layer 1/0 from instances of .*..

Reason was that "path_dtrans" returned a ICplxTrans for top
level instead of a DCplxTrans object.
This commit is contained in:
Matthias Koefferlein 2025-07-13 21:42:35 +02:00
parent 67994a2f8a
commit 1dc0a56633
2 changed files with 16 additions and 2 deletions

View File

@ -1212,12 +1212,12 @@ public:
return true;
} else {
v = tl::Variant::make_variant (db::ICplxTrans ());
v = tl::Variant::make_variant (db::DCplxTrans ());
return true;
}
} else {
v = tl::Variant::make_variant (db::ICplxTrans ());
v = tl::Variant::make_variant (db::DCplxTrans ());
return true;
}

View File

@ -1620,3 +1620,17 @@ TEST(66)
EXPECT_EQ (s, "(cell_index=0 r0 *1 10,-20),(cell_index=4 r0 *1 10,-20)");
}
}
// Bug: path_dtrans was ICplxTrans on top level
TEST(67)
{
db::Layout g;
init_layout (g);
{
db::LayoutQuery q ("select path_dtrans*shape.dbbox from shapes on layer l1 from instances of .*");
db::LayoutQueryIterator iq (q, &g);
std::string s = q2s_var (iq, "data");
EXPECT_EQ (s, "((0,0.001;0.002,0.003)),((0,0.001;0.002,0.003))");
}
}