mirror of https://github.com/KLayout/klayout.git
WIP: updated test cases.
This commit is contained in:
parent
1b450c6499
commit
b30a9278d6
|
|
@ -474,6 +474,14 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Gets the shape selection flags
|
||||
*/
|
||||
unsigned int shape_flags () const
|
||||
{
|
||||
return m_shape_flags;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Changes the layer to be traversed
|
||||
*
|
||||
|
|
|
|||
|
|
@ -591,7 +591,7 @@ Region::texts_as_dots (const std::string &pat, bool pattern) const
|
|||
std::pair<db::RecursiveShapeIterator, db::ICplxTrans> si = begin_iter ();
|
||||
if (! dr) {
|
||||
// some optimization
|
||||
si.first.shape_flags (db::ShapeIterator::Texts);
|
||||
si.first.shape_flags (si.first.shape_flags () & db::ShapeIterator::Texts);
|
||||
}
|
||||
|
||||
std::auto_ptr<db::FlatEdges> res (new db::FlatEdges ());
|
||||
|
|
@ -610,7 +610,7 @@ Region::texts_as_dots (const std::string &pat, bool pattern, db::DeepShapeStore
|
|||
std::pair<db::RecursiveShapeIterator, db::ICplxTrans> si = begin_iter ();
|
||||
if (! dr) {
|
||||
// some optimization
|
||||
si.first.shape_flags (db::ShapeIterator::Texts);
|
||||
si.first.shape_flags (si.first.shape_flags () & db::ShapeIterator::Texts);
|
||||
}
|
||||
|
||||
if (! si.first.layout ()) {
|
||||
|
|
@ -644,7 +644,7 @@ Region::texts_as_boxes (const std::string &pat, bool pattern, db::Coord enl) con
|
|||
std::pair<db::RecursiveShapeIterator, db::ICplxTrans> si = begin_iter ();
|
||||
if (! dr) {
|
||||
// some optimization
|
||||
si.first.shape_flags (db::ShapeIterator::Texts);
|
||||
si.first.shape_flags (si.first.shape_flags () & db::ShapeIterator::Texts);
|
||||
}
|
||||
|
||||
std::auto_ptr<db::FlatRegion> res (new db::FlatRegion ());
|
||||
|
|
@ -663,7 +663,7 @@ Region::texts_as_boxes (const std::string &pat, bool pattern, db::Coord enl, db:
|
|||
std::pair<db::RecursiveShapeIterator, db::ICplxTrans> si = begin_iter ();
|
||||
if (! dr) {
|
||||
// some optimization
|
||||
si.first.shape_flags (db::ShapeIterator::Texts);
|
||||
si.first.shape_flags (si.first.shape_flags () & db::ShapeIterator::Texts);
|
||||
}
|
||||
|
||||
if (! si.first.layout ()) {
|
||||
|
|
|
|||
|
|
@ -409,7 +409,7 @@ Class<db::RecursiveShapeIterator> decl_RecursiveShapeIterator ("db", "RecursiveS
|
|||
"\n"
|
||||
"This method has been introduced in version 0.23.\n"
|
||||
) +
|
||||
gsi::method ("shape_flags=", &db::RecursiveShapeIterator::shape_flags,
|
||||
gsi::method ("shape_flags=", (void (db::RecursiveShapeIterator::*)(unsigned int)) &db::RecursiveShapeIterator::shape_flags,
|
||||
"@brief Specifies the shape selection flags\n"
|
||||
"@args flags\n"
|
||||
"\n"
|
||||
|
|
|
|||
|
|
@ -3539,7 +3539,7 @@ CODE
|
|||
|
||||
def polygons(*args)
|
||||
layers = parse_input_layers(*args)
|
||||
DRCLayer::new(@engine, @engine._cmd(@engine, :_input, @layout_var, @cell.cell_index, layers, @sel, @box, @clip, @overlapping, RBA::Shapes::SBoxes | RBA::Shapes::SPaths | RBA::Shapes::SPolygons))
|
||||
DRCLayer::new(@engine, @engine._cmd(@engine, :_input, @layout_var, @cell.cell_index, layers, @sel, @box, @clip, @overlapping, RBA::Shapes::SBoxes | RBA::Shapes::SPaths | RBA::Shapes::SPolygons | RBA::Shapes::SEdgePairs))
|
||||
end
|
||||
|
||||
# %DRC%
|
||||
|
|
@ -5235,6 +5235,10 @@ CODE
|
|||
sf = layout.dbu / self.dbu
|
||||
if @deep
|
||||
@dss ||= RBA::DeepShapeStore::new
|
||||
# TODO: align with LayoutToNetlist by using a "master" L2N
|
||||
# object which keeps the DSS.
|
||||
@dss.text_property_name = "LABEL"
|
||||
@dss.text_enlargement = 1
|
||||
r = RBA::Region::new(iter, @dss, RBA::ICplxTrans::new(sf.to_f))
|
||||
else
|
||||
r = RBA::Region::new(iter, RBA::ICplxTrans::new(sf.to_f))
|
||||
|
|
|
|||
|
|
@ -302,7 +302,7 @@ TEST(7_AntennaWithDiodes)
|
|||
db::compare_layouts (_this, layout, au, db::NoNormalization);
|
||||
}
|
||||
|
||||
TEST(8_FlatTextsAndPolygons)
|
||||
TEST(8_TextsAndPolygons)
|
||||
{
|
||||
std::string rs = tl::testsrc ();
|
||||
rs += "/testdata/drc/drcSimpleTests_8.drc";
|
||||
|
|
|
|||
|
|
@ -10,12 +10,12 @@ flat_labels = labels(1, 0)
|
|||
flat_all = input(1, 0)
|
||||
flat_poly = polygons(1, 0)
|
||||
|
||||
flat_texts_from_labels1 = flat_labels.texts("XYZ", false)
|
||||
flat_texts_from_labels2 = flat_labels.texts("*", true)
|
||||
flat_texts_from_all1 = flat_all.texts("XYZ", false)
|
||||
flat_texts_from_all2 = flat_all.texts("*", true)
|
||||
flat_texts_from_poly1 = flat_poly.texts("XYZ", false)
|
||||
flat_texts_from_poly2 = flat_poly.texts("*", true)
|
||||
flat_texts_from_labels1 = flat_labels.texts(text("XYZ"))
|
||||
flat_texts_from_labels2 = flat_labels.texts("*")
|
||||
flat_texts_from_all1 = flat_all.texts(text("XYZ"))
|
||||
flat_texts_from_all2 = flat_all.texts("*")
|
||||
flat_texts_from_poly1 = flat_poly.texts(text("XYZ"))
|
||||
flat_texts_from_poly2 = flat_poly.texts("*")
|
||||
|
||||
flat_labels.output(100, 0)
|
||||
flat_all.output(101, 0)
|
||||
|
|
@ -35,12 +35,12 @@ deep_labels = labels(1, 0)
|
|||
deep_all = input(1, 0)
|
||||
deep_poly = polygons(1, 0)
|
||||
|
||||
deep_texts_from_labels1 = deep_labels.texts("XYZ", false)
|
||||
deep_texts_from_labels2 = deep_labels.texts("*", true)
|
||||
deep_texts_from_all1 = deep_all.texts("XYZ", false)
|
||||
deep_texts_from_all2 = deep_all.texts("*", true)
|
||||
deep_texts_from_poly1 = deep_poly.texts("XYZ", false)
|
||||
deep_texts_from_poly2 = deep_poly.texts("*", true)
|
||||
deep_texts_from_labels1 = deep_labels.texts(text("XYZ"))
|
||||
deep_texts_from_labels2 = deep_labels.texts("*")
|
||||
deep_texts_from_all1 = deep_all.texts(text("XYZ"))
|
||||
deep_texts_from_all2 = deep_all.texts("*")
|
||||
deep_texts_from_poly1 = deep_poly.texts(text("XYZ"))
|
||||
deep_texts_from_poly2 = deep_poly.texts("*")
|
||||
|
||||
deep_labels.output(200, 0)
|
||||
deep_all.output(201, 0)
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue